hermeznetwork / cli-bidding Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
Sometimes bidding transactions take too long to process because gas price is too low (https://goerli.etherscan.io/tx/0x4fc4fca293e0792c88b2a5f25a1cdeb08eff788433ed183395ae87f031757e29). It would be nice to have an option to increase the price by some factor, and even to speed previously sent transactions.
let dataPermit;
if(command === "BID" || command === "MULTIBID") {
// Create Permit Signature
const nonce = await HezContract.nonces(wallet.getAddress());
const deadline = ethers.constants.MaxUint256;
let amountUnits = amount
let bidAmountUnits = bidAmount
let maxBidUnits = maxBid
let minBidUnits = minBid
if (units == "ether") {
amountUnits = ethers.utils.parseEther(amount);
bidAmountUnits = ethers.utils.parseEther(bidAmount);
maxBidUnits = ethers.utils.parseEther(maxBid);
minBidUnits = ethers.utils.parseEther(minBid);
}
amountUnits
and bidAmountUnits
are defined in a limited scope, but then are used after the if
block
./src/.env.example
PRIVATE_KEY_CLI_BIDDING
(it must include 0x
)NODE_ETHEREUM_URL
to https://localhost:8545
amount
and bidAmount
when bidding in quick guide (or just link to the explanation)eslint
--> https://github.com/hermeznetwork/circuits/blob/master/.eslintrc.jspackage-lock.json
to ensure node_modules versionsmainnet
, rinkeby
or goerli
. Contracts addressescould be overwritten is set actual environment vars HERMEZ_AUCTION_ADDRESS
& HEZ_TOKEN_ADDRESS
console client
and functionality, just to keep the repo best organized and probably functionality could be used externally (in a webApp for bidding for example)package.json
to publish npm package @hermeznetwork/cli-bidding
maxBid
and minBid
parameters are used for multibid. However, the code uses them in the simple bid scenario and returns an error.
if(command === "BID" || command === "MULTIBID") {
// Create Permit Signature
const nonce = await HezContract.nonces(wallet.getAddress());
const deadline = ethers.constants.MaxUint256;
amountUnits = amount
bidAmountUnits = bidAmount
let maxBidUnits = maxBid
let minBidUnits = minBid
if (units == "ether") {
amountUnits = ethers.utils.parseEther(amount);
bidAmountUnits = ethers.utils.parseEther(bidAmount);
maxBidUnits = ethers.utils.parseEther(maxBid);
minBidUnits = ethers.utils.parseEther(minBid);
}
If I do node src/biddingCLI.js slotinfo --startingSlot 4350 --endingSlot 4370
to get the first biddable slot, and then bid in the returned first biddable slot, the bid returns an AUTION_CLOSED
error
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.