An Example project to demonstrate how to use the OEV Network to place bids on dAPI IDs and then update dAPIs for the dAPP ID using the awarded signature from the OEV Network.
- Create a
.env
file similar toexample.env
. The scripts work with mantle mainnet by default, but you can change the network to any of the networks supported by the API3 Market.
yarn
- Deploy a OevFeedUpdater contract on the target chain. The OevFeedUpdater contract is used to pay the bid, perform the oracle update and any other subsequent calls in a single transaction. You can use the
deploy-oevfeedupdater
script to deploy the contract.
yarn deploy-oevfeedupdater
-
Bridge ETH to the OEV Network using the OEV Network bridge
-
After Bridging ETH to the OEV Network, deposit ETH to the
OevAuctionHouse
contract. Use thedeposit-collateral
script to deposit ETH to the contract.
yarn deposit-collateral
Note: The script deposits 0.0001
ETH to the contract. You can change the amount by passing the AMOUNT
environment variable.
AMOUNT=0.1 yarn deposit-collateral
- You can now place bid, retrieve the encoded signature and update the dAPI values for
dappID 1
communal proxies using thesubmit-bid-update
script. The script also reports the fulfillment of the oracle update which is required to release the collateral.
yarn submit-bid-update
-
The script fetches the OEV encoded values and signatures from the public OEV endpoints for the
ETH/USD
dAPI, it then proceeds to place a bid of0.01
MNT for the recurringdappID 1
auction round on mantle. Upon winning in the auction round, the script fetches the awarded signature and uses the awarded signature and OEV encoded values to update thedappID 1
ETH/USD
dAPI. -
You can change the bid amount, dAPI Name via the CLI. For example to update
dappID 1
BTC/USD dAPI on Mantle mainnet with a bid amount of0.1
MNT, you can run the following command:
BID_AMOUNT=0.1 DAPI_NAME="BTC/USD" yarn submit-bid-update
Note: Make sure the OevFeedUpdater contract is deployed on the target chain before running the script.