Skip to content

Latest commit

 

History

History
40 lines (27 loc) · 2.05 KB

README.md

File metadata and controls

40 lines (27 loc) · 2.05 KB

Advanced instructions

Update the proxy address of DataFeedReaderExample

You can update the data feed that your DataFeedReaderExample reads by updating its proxy address.

  • Follow the instructions
  • Find a new data feed on market.api3.org and copy the address of its proxy
  • Use the command below with your NETWORK and PROXY values
NETWORK=ethereum-sepolia-testnet PROXY=0xCAc4d304032a46C8D0947396B7cBb07986826A36 yarn update-proxy
  • Use the command below to confirm that DataFeedReaderExample now reads the new data feed
NETWORK=ethereum-sepolia-testnet yarn read-data-feed

Deploying proxy contracts programmatically

The instructions have you use the communal Api3ReaderProxyV1, which gets deployed automatically with a subscription purchase. To deploy the same proxy programmatically, use the command below with your NETWORK and PROXY values.

NETWORK=ethereum-sepolia-testnet DAPI_NAME=ETH/USD yarn deploy:communal-api3readerproxyv1

You can also refer to the print:communal-api3readerproxyv1-address script to see how the @api3/contracts package can be used to derive the respective Api3ReaderProxyV1 address without needing to make any RPC calls.

To deploy a proxy for a specific dApp, use the command below with your DAPP_ALIAS value. Note that your dApp will need to have been assigned an alias at @api3/contracts. Refer to the docs for more information.

NETWORK=ethereum-sepolia-testnet DAPI_NAME=ETH/USD DAPP_ALIAS=lendle yarn deploy:dapp-specific-api3readerproxyv1

Similar to the above, you can refer to the print:dapp-specific-api3readerproxyv1-address script to see how the @api3/contracts package can be used to derive the dApp-specific Api3ReaderProxyV1 address without needing to make any RPC calls.