a4c749b99c
* pyth2wormhole: implement wire format v3rev0 commit-id:c106d3b3 * pyth.js: Run prettier formatting commit-id:fc9fb160 * ethereum: Fix tab indentation in Pyth contracts commit-id:3d2ab7d8 * p2w-terra contract: fix formatting commit-id:685dd14f * p2w-sdk: Use wasm in the JS package, detect bundler/node via `window` This commit makes sure that our wasm usage is more robust. We ensure that the JSON representation renders all important numbers in their string decimal form. b commit-id:75f9c224 * p2w-sdk: review suggestions: field ranems, limit serde attributes commit-id:9f596b80 * p2w-sdk/rust: Remove utils.rs and the helper type commit-id:e72c6345 |
||
---|---|---|
.. | ||
artifacts | ||
contracts | ||
devnet | ||
packages/cw721 | ||
test | ||
tools | ||
.dockerignore | ||
.gitignore | ||
Cargo.lock | ||
Cargo.toml | ||
Dockerfile.build | ||
README.md | ||
README.pyth.md | ||
build.sh | ||
rustfmt.toml |
README.md
Deploy
First build the contracts
docker build -f Dockerfile.build -o artifacts .
Then, for example, to deploy token_bridge.wasm
, run in the tools
directory
npm ci
node deploy_single.js --network mainnet --artifact ../artifacts/token_bridge.wasm --mnemonic "..."
which will print something along the lines of
Storing WASM: ../artifacts/token_bridge.wasm (367689 bytes)
Deploy fee: 88446uluna
Code ID: 2435
Migrate
Mainnet
Migrations on mainnet have to go through governance. Once the guardians sign the
upgrade VAA, the contract can be upgraded by submitting the signed VAA to the
appropriate contract. For example, to upgrade the token bridge on mainnet,
in wormhole/clients/token_bridge/
:
node main.js terra execute_governance_vaa <signed VAA (hex)> --rpc "https://lcd.terra.dev" --chain_id "columbus-5" --mnemonic "..." --token_bridge "terra10nmmwe8r3g99a9newtqa7a75xfgs2e8z87r2sf"
Testnet
For example, to migrate the token bridge to 37262, run in tools/
:
node migrate_testnet.js --code_id 37262 --contract terra1pseddrv0yfsn76u4zxrjmtf45kdlmalswdv39a --mnemonic "..."