Skip to content

Latest commit

 

History

History
53 lines (32 loc) · 3.17 KB

File metadata and controls

53 lines (32 loc) · 3.17 KB

Deploying Axis to a new chain

Order of ceremony

The following actions need to be carried out in order to add a new chain to Axis:

  1. Deploy the smart contracts to the new chain
  2. Add the new chain config to the subgraph repo
  3. Deploy the subgraph
  4. Obtain an RPC URL for the new chain from your RPC provider (e.g. Alchemy)
  5. Add the new chain and deployment configuration to the deployments package
  6. Add a cloak watcher to the cloak package
  7. Confirm the new deployments package has been published to NPM
  8. Consume the new deployments package version inside launchpad and standalone
  9. Test the launchpad and standalone dapp using the new chain: pnpm dev

Deploy the smart contracts

Each chain requires the Axis smart contracts to be deployed. This is handled from the respective contract repos:

Add the new chain to the subgraph

The subgraph needs to be updated to include the new chain. This is achieved by updating the networks.json file in the subgraph package.

See the subgraph README for more information.

Deploy the subgraph

Once the the new chain config has been added to the subgraph repo, the new subgraph can be deployed. This is done by following the subgraph README.

Obtain an RPC URL for the new chain

This is a manual process. The RPC URL for the new chain needs to be obtained from your RPC provider (Alchemy, Infura, etc.). Axis currently uses Alchemy.

Add the new chain to the deployments package

The deployments package needs to be updated to include the new chain.

See the deployments README for how to do this.

Add a cloak watcher to the cloak package

The cloak package needs to be updated to include the new chain. This is achieved by updating the cloak.json file in the cloak package.

See the cloak README for more information.

Update and test

Make sure you've updated launchpad and standalone @axis-finance/deployments dependency to the new published version, then run pnpm i to install the new dependencies, and pnpm dev to test the dapp using the new chain.