Bidders
Bidder Node Commands
Interacting with the Bidder Node
Ensure you have completed the Quickstart step in a separate terminal. This will set up your environment and place your key in the
$HOME/.mev-commit
directory, along with running the required bidder node.Now that you’ve made sure we have a bidder node running, we can interact with it using the following commands:
❯_ terminal
cd $HOME/.mev-commit;
export KEY=$(cat key);
export ADDRESS=$(cast wallet address --private-key 0x$(cat key))
Getting Deposit
To get the current deposit balance in the contract for the current window:
❯_ terminal
curl -s http://localhost:13523/v1/bidder/get_deposit
To get the current deposit balance in the contract for a specific window:
❯_ terminal
curl -s http://localhost:13523/v1/bidder/get_deposit?windowNumber=1
💡Deposit represents the funds in the bidder’s account that can be used to submit bids on the mev-commit p2p-network and settled on-chain.
Withdraw Deposited Funds
This command will allow you to withdraw funds from the specific window. Window number is the number where the bidder deposited funds.
❯_ terminal
cast send 0x7ffa86fF89489Bca72Fec2a978e33f9870B2Bd25 "withdrawBidderAmountFromWindow(address,uint256)" $ADDRESS <window_number> \
--rpc-url https://chainrpc.testnet.mev-commit.xyz --private-key $KEY
Checking the Balance of your Wallet
This command will allow you to check your current wallet balance on mev-commit chain:
❯_ terminal
cast b $ADDRESS --rpc-url https://chainrpc.testnet.mev-commit.xyz
Check Total Value Locked in Contracts
❯_ terminal
python3 -c "print($(cast b 0x7ffa86fF89489Bca72Fec2a978e33f9870B2Bd25 \
--rpc-url https://chainrpc.testnet.mev-commit.xyz) + $(cast b 0x4FC9b98e1A0Ff10de4c2cf294656854F1d5B207D \
--rpc-url https://chainrpc.testnet.mev-commit.xyz))"
Topology
❯_ terminal
curl http://localhost:13523/v1/debug/topology