pyth-crosschain/target_chains/cosmwasm/deploy-scripts
Dev Kalra d31cefb446
feat(contract_manager): separate store for wormhole (#1493)
* rename wormhole contract as per other names

* store for wormhole

* fix var name

* rename var

* rename contract based on other namings

* add yaml for aptos and cosmwasm
2024-04-24 16:32:16 +05:30
..
src feat(contract_manager): separate store for wormhole (#1493) 2024-04-24 16:32:16 +05:30
README.md chore(target_chains/cosmwasm): add rol_testnet network (#1419) 2024-04-04 19:05:39 +02:00
package.json chore(target_chains/sui): update sui js packages (#1340) 2024-03-01 17:05:52 +01:00
tsconfig.json [cosmwasm] CosmWasm integration with contract manager (#1025) 2023-08-25 16:38:42 +02:00

README.md

How to add a new chain or contract

  1. Add the chain information to contract manager CosmWasmChains.yaml. You can lookup for rpc endpoints in this repo. The gasPrice is the average_gas_price of the chain + the chain token denom (Available in chain-registry chain.json file).

  2. If the wormhole contract is not deployed on the target chain run the following command:

    npm run instantiate-wormhole -- --private-key <YOUR_PRIVATE_KEY_HEX> --deploy <stable or edge> --chain <chain>
    

    You can re-build the wormhole contract using the scripts given in wormhole-stub. Run build.sh and you will get the compiled contract code in wormhole-stub/artifacts

  3. Deploy the pyth contract:

    npm run instantiate-pyth --contract-version <X.Y.Z> --private-key <YOUR_PRIVATE_KEY_HEX> \
        --deploy <stable or edge> --wormhole <WORMHOLE_CONTRACT_ADDRESS> --chain <chain>
    
  4. You can test the new contract via contract manager scripts like this:

    cd ../../../contract_manager
    npx ts-node scripts/update_pricefeed.ts --private-key <YOUR_PRIVATE_KEY_HEX> --contract <CONTRACT_ID> --feed-id <FEED_ID>
    
  5. Commit the new entries added to contract manager yaml files

  6. Update documentation repos and add the new contract address