Add a Topic to an Adapter

By deploying to a new target chain, one allows anyone to bring data from our appchain to new networks.

First, set up the repo.

  1. Git pull the the Allora Adapter repository.
  2. run yarn at the command line.

Second, make sure forge is installed.

Follow the directions to install foundryup and forge: https://book.getfoundry.sh/getting-started/installation

Third, update the script

The script can be found at script/AddTopicScript.sol

  • title: The title of your feed
  • owner: The owner of the feed. By default, you should make this the account's public key running the script.
  • totalFee: How much the contributing predictors are paid for a prediction.
  • aggregator: Leave this as the default value unless you want to use custom aggregator logic.
  • ownerSwitchedOn: Leave this on if you want this feed usable by default.
  • adminSwitchedOn: Leave this on if you want this feed usable by default.
  • feeHandler: Leave this as the default value unless you want to use custom fee handler logic.
  • dataProviderQuorum: How many data providers must provide predictions. Recommend one to start.
  • dataValiditySeconds: How long predictions are valid for. Recommend default of one hour.

Fourth, run the script command

In a local .env file, add the private key of the address with Sepolia Eth for the transaction. Use the following format:

SCRIPT_RUNNER_PRIVATE_KEY=<private key>

Run the script command commented at the top of the file, providing an rpcUrl and etherscan api key in the command. The script should output a line