Ali Behjati a79a86ef3c Remove unused terra contracts (#109) há 3 anos atrás
..
artifacts b662de4efb terra: columbus-5 contracts by default há 4 anos atrás
contracts a79a86ef3c Remove unused terra contracts (#109) há 3 anos atrás
devnet 27e8952c8b sdk/js: Updated terra dependencies há 3 anos atrás
packages 40837778a7 terra/nft_bridge: vendor cw721 and cw721-base (#696) há 3 anos atrás
test 2c56a916eb fix bytes -> string, flip arg order to be less confusing há 4 anos atrás
tools a79a86ef3c Remove unused terra contracts (#109) há 3 anos atrás
.dockerignore e8b411107d Terra contract deployment moved to a separate k8s job (#130) há 5 anos atrás
.gitignore 7d41fb1ea1 Pyth terra bridge: add contract deployment script (#88) há 3 anos atrás
Cargo.lock a79a86ef3c Remove unused terra contracts (#109) há 3 anos atrás
Cargo.toml a79a86ef3c Remove unused terra contracts (#109) há 3 anos atrás
Dockerfile.build 99e2d4ac09 Add terra build & deploy instructions há 3 anos atrás
README.md 3fc065846e Add terra migrate instructions há 3 anos atrás
README.pyth.md 7d41fb1ea1 Pyth terra bridge: add contract deployment script (#88) há 3 anos atrás
build.sh 7d41fb1ea1 Pyth terra bridge: add contract deployment script (#88) há 3 anos atrás
rustfmt.toml ce6d92bb2b terra/contracts: add columbus-5 clone há 4 anos atrás

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