pyth-crosschain/target_chains/cosmwasm/deploy-scripts
Ali Behjati 736a20208b
chore(target_chains/sui): update sui js packages (#1340)
* chore(target_chains/sui): update sui js packages

* chore: bump version

---------

Co-authored-by: Amin Moghaddam <amin@pyth.network>
2024-03-01 17:05:52 +01:00
..
src Entropy support in contract manager (#1242) 2024-01-24 14:36:10 +01:00
README.md [cosmwasm] CosmWasm integration with contract manager (#1025) 2023-08-25 16:38:42 +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 id>
    

    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>
    
  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