Bidder Node Commands
Interacting with the Bidder Node
$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:
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:
curl -s http://localhost:13523/v1/bidder/get_deposit
To get the current deposit balance in the contract for a specific window:
curl -s http://localhost:13523/v1/bidder/get_deposit?windowNumber=1
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.
curl -X POST http://localhost:13523/v1/bidder/withdraw?windowNumber=1 \
Autodeposit Funds
The auto deposit feature allows you to automate the process of depositing funds for the bidder account. This is useful for ensuring your bidder account always has funds available to bid. In order to achieve this, the node will keep issuing deposits for the new windows and also withdrawing funds from the previous windows.
4 * amountPerWindow
. The user’s wallet should have enough funds to be able to maintain these deposits as well as cover gas costs to issue transactions.There are two ways to enable this feature:
On node boot up
Users can use the command-line or the configuration file to enable this feature on node boot-up. The autodeposit-enabled
flag should be set as well as the autodeposit-amount
needs to be set to the amount to be deposited in each window.
mev-commit --keystore-path ~/.mev-commit \
--keystore-password <PASSWORD> \
--bootnodes /dnsaddr/bootnode.testnet.mev-commit.xyz \
--settlement-rpc-endpoint https://chainrpc.testnet.mev-commit.xyz
--autodeposit-enabled true
--autodeposit-amount 1000000000000000000
Use the Bidder API
Another option to enable this is using the Bidder API.
curl -X POST http://localhost:13523/v1/bidder/auto_deposit?amount=1000000000000000000
Get Auto Deposit Status
To get the status of the auto deposit process:
curl -s http://localhost:13523/v1/bidder/auto_deposit_status
Cancel Auto Deposit
To cancel the auto deposit process:
curl -X POST http://localhost:13523/v1/bidder/cancel_auto_deposit?withdraw=true
This will stop the ongoing auto deposit process.
Withdraw Funds
To withdraw funds from the several windows, you can use the following command:
curl -X POST http://localhost:13523/v1/bidder/withdraw_from_windows \
-H "Content-Type: application/json" \
-d '{"windowNumbers": [1, 2, 3]}'
Checking the Balance of your Wallet
This command will allow you to check your current wallet balance on mev-commit chain:
cast b $ADDRESS --rpc-url https://chainrpc.testnet.mev-commit.xyz
Check Total Value Locked in Contracts
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
curl http://localhost:13523/v1/debug/topology
Configuring custom provider sets
Users can also set-up a specific subset of provider nodes in order to send their bids. By default the mev-commit bidder node will send bids to all the available and staked providers. However, if the user wants only a specific subset of providers to be able to see their bids, the can use the --provider-whitelist
option to set it up. The list should contain the ethereum wallet addresses of the provider nodes.
mev-commit --keystore-path ~/.mev-commit \
--keystore-password <PASSWORD> \
--bootnodes /dnsaddr/bootnode.testnet.mev-commit.xyz \
--settlement-rpc-endpoint https://chainrpc.testnet.mev-commit.xyz
--provider-whitelist 0x6DcE7bcF4fCA9E14b546e583049B82474631b185,0x0979c194EaD08444B6e40415F5822AB32363f580