Deploying an Adapter to an EVM Target Chain

Deploying an Adapter to an EVM Target Chain

Adapter contracts are required to bring Allora Network prices to a chain. Follow the instructions below to deploy the Adapter to a new EVM chain.

1. Set up the repo

  1. Git pull the the Allora Adapter repository (opens in a new tab).
  2. run yarn
  3. run forge build

If forge is not already installed, follow these directions (opens in a new tab) to install foundryup and forge.

2. Set up the deploy script

The deploy script can be found under deploy/deploy.ts

Replace the ADMIN address with the desired admin for the new adapter.

3. Set up the .env file

Create a .env file in the root of the project with the following structure:

deploymentName=<chain name string>
chainId=<chain id unt>
rpcUrl=<rpc url>
privateKey=<private key hex without '0x'>
etherscanApiKey=<etherscan api key string>

4. Run the deployment

yarn deploy

You should see output indicating that each of three contracts are being deployed, and then verified on etherscan. Deployed addresses will be saved in /deploy/deployments/<deploymentName>.json. If a given contract is already deployed with that deployment name, it will be skipped. Delete the deployment record /deploy/deployments/<deploymentName>.json to deploy new contracts.