1.1 KiB
1.1 KiB
How to add a new chain for deployment
- Add the chain name to
ChainId
enum inchains-manager/chains.ts
- Add the network configs to
CHAINS_NETWORK_CONFIG
inchains-manager/chains.ts
. You can lookup for rpc endpoints in this repo. ThegasPrice
is theaverage_gas_price
of the chain + the chain tokendenom
(Available in chain-registrychain.json
file). - Add the contract configs to
CHAINS_CONTRACT_CONFIG
inconfigs.ts
- Add the ChainId either to
getChainIdsForStableDeployment
orgetChainIdsForEdgeDeployment
functions inhelper.ts
- If the wormhole contract is not deployed on the target chain run the following command:
ts-node src/wormhole-stub.ts --mnemonic "<YOUR_MNEMONIC>" --deploy <stable or edge>
- Deploy the pyth contract:
ts-node src/instantiate-pyth.ts --contract-version <X.Y.Z> --mnemonic "<YOUR_MNEMONIC>" --deploy <stable or edge>
- Test the new contract:
ts-node src/test.ts --mnemonic "<YOUR_MNEMONIC>" --deploy <stable or edge>
- Commit the new json files to the repo
- Update documentation repos and add the new contract address