From ca87cbfd67e5592feff636de1746b1c6ba407f56 Mon Sep 17 00:00:00 2001 From: Paul Noel Date: Thu, 23 May 2024 12:09:52 -0500 Subject: [PATCH] github: change node version of cli to 20 --- .github/workflows/build.yml | 2 +- clients/js/README.md | 64 +++++++---------- clients/js/src/algorand.ts | 1 - clients/js/src/aptos.ts | 1 - clients/js/src/chains/generic/provider.ts | 1 - clients/js/src/chains/sei/submit.ts | 2 - clients/js/src/cmds/evm.ts | 12 ++-- clients/js/src/cmds/generate.ts | 17 +++-- clients/js/src/cmds/info/contract.ts | 9 ++- clients/js/src/cmds/info/registrations.ts | 2 +- clients/js/src/cmds/info/rpc.ts | 8 +-- clients/js/src/cmds/status.ts | 87 ++++++++++++----------- clients/js/src/cmds/submit.ts | 30 +++++--- clients/js/src/utils.ts | 4 +- scripts/guardian-set-init.sh | 28 ++++---- 15 files changed, 133 insertions(+), 135 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b6e13df832..115fa008ed 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -244,7 +244,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-node@v2 with: - node-version: "16" + node-version: "20" - run: | cd clients/js && make test make docs diff --git a/clients/js/README.md b/clients/js/README.md index 35b414e8bb..51349dd983 100644 --- a/clients/js/README.md +++ b/clients/js/README.md @@ -248,16 +248,7 @@ Positionals: Options: --help Show help [boolean] --version Show version number [boolean] - -c, --chain chain name - [choices: "unset", "solana", "ethereum", "terra", "bsc", "polygon", - "avalanche", "oasis", "algorand", "aurora", "fantom", "karura", "acala", - "klaytn", "celo", "near", "moonbeam", "neon", "terra2", "injective", - "osmosis", "sui", "aptos", "arbitrum", "optimism", "gnosis", "pythnet", - "xpla", "btc", "base", "sei", "rootstock", "scroll", "mantle", "blast", - "xlayer", "linea", "berachain", "seievm", "wormchain", "cosmoshub", "evmos", - "kujira", "neutron", "celestia", "stargaze", "seda", "dymension", - "provenance", "sepolia", "arbitrum_sepolia", "base_sepolia", - "optimism_sepolia", "holesky", "polygon_sepolia"] + -c, --chain chain name [string] -n, --network Network [required] [choices: "mainnet", "testnet", "devnet"] -a, --contract-address Contract to submit VAA to (override config) [string] @@ -308,25 +299,25 @@ Options: --help Show help [boolean] --version Show version number [boolean] --src-chain source chain - [required] [choices: "solana", "ethereum", "terra", "bsc", "polygon", - "avalanche", "oasis", "algorand", "aurora", "fantom", "karura", "acala", - "klaytn", "celo", "near", "moonbeam", "neon", "terra2", "injective", - "osmosis", "sui", "aptos", "arbitrum", "optimism", "gnosis", "pythnet", - "xpla", "btc", "base", "sei", "rootstock", "scroll", "mantle", "blast", - "xlayer", "linea", "berachain", "seievm", "wormchain", "cosmoshub", "evmos", - "kujira", "neutron", "celestia", "stargaze", "seda", "dymension", - "provenance", "sepolia", "arbitrum_sepolia", "base_sepolia", - "optimism_sepolia", "holesky", "polygon_sepolia"] + [required] [choices: "Solana", "Ethereum", "Terra", "Bsc", "Polygon", + "Avalanche", "Oasis", "Algorand", "Aurora", "Fantom", "Karura", "Acala", + "Klaytn", "Celo", "Near", "Moonbeam", "Neon", "Terra2", "Injective", + "Osmosis", "Sui", "Aptos", "Arbitrum", "Optimism", "Gnosis", "Pythnet", + "Xpla", "Btc", "Base", "Sei", "Rootstock", "Scroll", "Mantle", "Blast", + "Xlayer", "Linea", "Berachain", "Seievm", "Wormchain", "Cosmoshub", "Evmos", + "Kujira", "Neutron", "Celestia", "Stargaze", "Seda", "Dymension", + "Provenance", "Sepolia", "ArbitrumSepolia", "BaseSepolia", "OptimismSepolia", + "Holesky", "PolygonSepolia"] --dst-chain destination chain - [required] [choices: "solana", "ethereum", "terra", "bsc", "polygon", - "avalanche", "oasis", "algorand", "aurora", "fantom", "karura", "acala", - "klaytn", "celo", "near", "moonbeam", "neon", "terra2", "injective", - "osmosis", "sui", "aptos", "arbitrum", "optimism", "gnosis", "pythnet", - "xpla", "btc", "base", "sei", "rootstock", "scroll", "mantle", "blast", - "xlayer", "linea", "berachain", "seievm", "wormchain", "cosmoshub", "evmos", - "kujira", "neutron", "celestia", "stargaze", "seda", "dymension", - "provenance", "sepolia", "arbitrum_sepolia", "base_sepolia", - "optimism_sepolia", "holesky", "polygon_sepolia"] + [required] [choices: "Solana", "Ethereum", "Terra", "Bsc", "Polygon", + "Avalanche", "Oasis", "Algorand", "Aurora", "Fantom", "Karura", "Acala", + "Klaytn", "Celo", "Near", "Moonbeam", "Neon", "Terra2", "Injective", + "Osmosis", "Sui", "Aptos", "Arbitrum", "Optimism", "Gnosis", "Pythnet", + "Xpla", "Btc", "Base", "Sei", "Rootstock", "Scroll", "Mantle", "Blast", + "Xlayer", "Linea", "Berachain", "Seievm", "Wormchain", "Cosmoshub", "Evmos", + "Kujira", "Neutron", "Celestia", "Stargaze", "Seda", "Dymension", + "Provenance", "Sepolia", "ArbitrumSepolia", "BaseSepolia", "OptimismSepolia", + "Holesky", "PolygonSepolia"] --dst-addr destination address [string] [required] --token-addr token address [string] [default: native token] --amount token amount [string] [required] @@ -354,15 +345,14 @@ Options: Positionals: network Network [choices: "mainnet", "testnet", "devnet"] chain Source chain - [choices: "unset", "solana", "ethereum", "terra", "bsc", "polygon", - "avalanche", "oasis", "algorand", "aurora", "fantom", "karura", "acala", - "klaytn", "celo", "near", "moonbeam", "neon", "terra2", "injective", - "osmosis", "sui", "aptos", "arbitrum", "optimism", "gnosis", "pythnet", - "xpla", "btc", "base", "sei", "rootstock", "scroll", "mantle", "blast", - "xlayer", "linea", "berachain", "seievm", "wormchain", "cosmoshub", "evmos", - "kujira", "neutron", "celestia", "stargaze", "seda", "dymension", - "provenance", "sepolia", "arbitrum_sepolia", "base_sepolia", - "optimism_sepolia", "holesky", "polygon_sepolia"] + [choices: "Solana", "Ethereum", "Terra", "Bsc", "Polygon", "Avalanche", + "Oasis", "Algorand", "Aurora", "Fantom", "Karura", "Acala", "Klaytn", "Celo", + "Near", "Moonbeam", "Neon", "Terra2", "Injective", "Osmosis", "Sui", "Aptos", + "Arbitrum", "Optimism", "Gnosis", "Pythnet", "Xpla", "Btc", "Base", "Sei", + "Rootstock", "Scroll", "Mantle", "Blast", "Xlayer", "Linea", "Berachain", + "Seievm", "Wormchain", "Cosmoshub", "Evmos", "Kujira", "Neutron", "Celestia", + "Stargaze", "Seda", "Dymension", "Provenance", "Sepolia", "ArbitrumSepolia", + "BaseSepolia", "OptimismSepolia", "Holesky", "PolygonSepolia"] tx Source transaction hash [string] Options: diff --git a/clients/js/src/algorand.ts b/clients/js/src/algorand.ts index 114b1ff063..b67f297e7e 100644 --- a/clients/js/src/algorand.ts +++ b/clients/js/src/algorand.ts @@ -162,7 +162,6 @@ export async function transferAlgorand( if (!key) { throw Error(`No ${network} key defined for Algorand`); } - // const contracts = CONTRACTS[network].algorand; const client = getClient(network, rpc); const wallet: Account = mnemonicToSecretKey(key); const CORE_ID = BigInt(parseInt(contracts.coreBridge(network, "Algorand"))); diff --git a/clients/js/src/aptos.ts b/clients/js/src/aptos.ts index e552e8368a..ad1a2f9022 100644 --- a/clients/js/src/aptos.ts +++ b/clients/js/src/aptos.ts @@ -391,7 +391,6 @@ export async function queryRegistrationsAptos( ): Promise { const n = NETWORKS[network]["Aptos"]; const client = new AptosClient(n.rpc); - // const contracts = CONTRACTS[network]["aptos"]; let stateObjectId: string | undefined; switch (module) { diff --git a/clients/js/src/chains/generic/provider.ts b/clients/js/src/chains/generic/provider.ts index 137b2cf914..ba4987728d 100644 --- a/clients/js/src/chains/generic/provider.ts +++ b/clients/js/src/chains/generic/provider.ts @@ -53,7 +53,6 @@ export const getProviderForChain = ( network: Network, options?: { rpc?: string; [opt: string]: any } ): ChainProvider => { - // const chainName = toChain(chain); const rpc = options?.rpc ?? NETWORKS[network][chain].rpc; if (!rpc) { throw new Error(`No ${network} rpc defined for ${chain}`); diff --git a/clients/js/src/chains/sei/submit.ts b/clients/js/src/chains/sei/submit.ts index b91130480e..fe18f24d2b 100644 --- a/clients/js/src/chains/sei/submit.ts +++ b/clients/js/src/chains/sei/submit.ts @@ -15,7 +15,6 @@ export const submit = async ( network: Network, rpc?: string ) => { - // const contracts = CONTRACTS[network].Sei; const networkInfo = NETWORKS[network].Sei; rpc = rpc || networkInfo.rpc; const key = networkInfo.key; @@ -37,7 +36,6 @@ export const submit = async ( } target_contract = core; - // sigh... execute_msg = { submit_v_a_a: { vaa: vaa.toString("base64"), diff --git a/clients/js/src/cmds/evm.ts b/clients/js/src/cmds/evm.ts index 66798ec8d5..da2054c234 100644 --- a/clients/js/src/cmds/evm.ts +++ b/clients/js/src/cmds/evm.ts @@ -9,7 +9,12 @@ import { setStorageAt, } from "../evm"; import { runCommand, VALIDATOR_OPTIONS } from "../startValidator"; -import { assertEVMChain, evm_address, getNetwork } from "../utils"; +import { + assertEVMChain, + chainToChain, + evm_address, + getNetwork, +} from "../utils"; import { assertChain, chains, @@ -88,7 +93,7 @@ export const builder = function (y: typeof yargs) { .option("chain", { alias: "c", describe: "Chain to query", - choices: chains, + type: "string", demandOption: true, } as const) .option("module", { @@ -112,8 +117,7 @@ export const builder = function (y: typeof yargs) { demandOption: false, }), async (argv) => { - const chain = argv.chain; - assertChain(chain); + const chain = chainToChain(argv.chain); assertEVMChain(chain); const network = getNetwork(argv.network); const module = argv.module; diff --git a/clients/js/src/cmds/generate.ts b/clients/js/src/cmds/generate.ts index e7e9a6eacd..2c35d66274 100644 --- a/clients/js/src/cmds/generate.ts +++ b/clients/js/src/cmds/generate.ts @@ -65,7 +65,7 @@ export const builder = function (y: typeof yargs) { .option("chain", { alias: "c", describe: "Chain to register", - choices: chains, + type: "string", demandOption: true, } as const) .option("contract-address", { @@ -108,7 +108,7 @@ export const builder = function (y: typeof yargs) { .option("chain", { alias: "c", describe: "Chain to upgrade", - choices: chains, + type: "string", demandOption: true, } as const) .option("contract-address", { @@ -149,7 +149,7 @@ export const builder = function (y: typeof yargs) { .option("emitter-chain", { alias: "e", describe: "Emitter chain of the VAA", - choices: chains, + type: "string", demandOption: true, } as const) .option("emitter-address", { @@ -161,7 +161,7 @@ export const builder = function (y: typeof yargs) { .option("chain", { alias: "c", describe: "Token's chain", - choices: chains, + type: "string", demandOption: true, } as const) .option("token-address", { @@ -189,9 +189,8 @@ export const builder = function (y: typeof yargs) { demandOption: true, }), (argv) => { - const emitter_chain = argv["emitter-chain"]; + const emitter_chain = chainToChain(argv["emitter-chain"]); const chain = chainToChain(argv.chain); - const emitterChain = chainToChain(emitter_chain); const payload: TokenBridgeAttestMeta = { module: "TokenBridge", type: "AttestMeta", @@ -203,8 +202,8 @@ export const builder = function (y: typeof yargs) { name: argv["name"], }; const vaa = makeVAA( - toChainId(emitterChain), - parseAddress(emitterChain, argv["emitter-address"]), + toChainId(emitter_chain), + parseAddress(emitter_chain, argv["emitter-address"]), argv["guardian-secret"].split(","), payload ); @@ -260,7 +259,7 @@ export const builder = function (y: typeof yargs) { .option("chain", { alias: "c", describe: "Chain of Wormhole Relayer contract", - choices: chains, + type: "string", demandOption: true, } as const) .option("delivery-provider-address", { diff --git a/clients/js/src/cmds/info/contract.ts b/clients/js/src/cmds/info/contract.ts index f68c8095bf..3a32069b80 100644 --- a/clients/js/src/cmds/info/contract.ts +++ b/clients/js/src/cmds/info/contract.ts @@ -1,7 +1,7 @@ import yargs from "yargs"; import { impossible } from "../../vaa"; -import { assertChain, chains, contracts } from "@wormhole-foundation/sdk-base"; -import { getNetwork } from "../../utils"; +import { contracts } from "@wormhole-foundation/sdk-base"; +import { chainToChain, getNetwork } from "../../utils"; export const command = "contract "; export const desc = "Print contract address"; @@ -14,7 +14,7 @@ export const builder = (y: typeof yargs) => } as const) .positional("chain", { describe: "Chain to query", - choices: chains, + type: "string", demandOption: true, } as const) .positional("module", { @@ -26,8 +26,7 @@ export const handler = async ( argv: Awaited["argv"]> ) => { const network = getNetwork(argv.network); - const chain = argv.chain; - assertChain(chain); + const chain = chainToChain(argv.chain); const module = argv["module"]; let addr: string | undefined; diff --git a/clients/js/src/cmds/info/registrations.ts b/clients/js/src/cmds/info/registrations.ts index 30909f450c..b35b696281 100644 --- a/clients/js/src/cmds/info/registrations.ts +++ b/clients/js/src/cmds/info/registrations.ts @@ -26,7 +26,7 @@ export const builder = (y: typeof yargs) => { } as const) .positional("chain", { describe: "Chain to query", - choices: chains, + type: "string", demandOption: true, } as const) .positional("module", { diff --git a/clients/js/src/cmds/info/rpc.ts b/clients/js/src/cmds/info/rpc.ts index 78498eab20..feabb7c601 100644 --- a/clients/js/src/cmds/info/rpc.ts +++ b/clients/js/src/cmds/info/rpc.ts @@ -1,7 +1,6 @@ import yargs from "yargs"; import { NETWORKS } from "../../consts"; -import { assertChain, chains } from "@wormhole-foundation/sdk-base"; -import { getNetwork } from "../../utils"; +import { chainToChain, getNetwork } from "../../utils"; export const command = "rpc "; export const desc = "Print RPC address"; @@ -14,13 +13,12 @@ export const builder = (y: typeof yargs) => } as const) .positional("chain", { describe: "Chain to query", - choices: chains, + type: "string", demandOption: true, } as const); export const handler = async ( argv: Awaited["argv"]> ) => { - assertChain(argv.chain); const network = getNetwork(argv.network); - console.log(NETWORKS[network][argv.chain].rpc); + console.log(NETWORKS[network][chainToChain(argv.chain)].rpc); }; diff --git a/clients/js/src/cmds/status.ts b/clients/js/src/cmds/status.ts index 7c5ba96087..9330009364 100644 --- a/clients/js/src/cmds/status.ts +++ b/clients/js/src/cmds/status.ts @@ -8,50 +8,51 @@ import { Chain, assertChain, contracts } from "@wormhole-foundation/sdk-base"; export const command = "status "; export const desc = "Prints information about the automatic delivery initiated on the specified network, chain, and tx"; -// export const builder = (y: typeof yargs) => -// y -// .positional("network", { -// describe: "Network", -// choices: ["mainnet", "testnet", "devnet"], -// demandOption: true, -// } as const) -// .positional("chain", { -// describe: "Source chain", -// choices: CHAIN_NAME_CHOICES, -// demandOption: true, -// } as const) -// .positional("tx", { -// describe: "Source transaction hash", -// type: "string", -// demandOption: true, -// } as const); -// export const handler = async ( -// argv: Awaited["argv"]> -// ) => { -// const network = getNetwork(argv.network); -// const chain = argv.chain; -// assertChain(chain); +export const builder = (y: typeof yargs) => + y + .positional("network", { + describe: "Network", + choices: ["mainnet", "testnet", "devnet"], + demandOption: true, + } as const) + .positional("chain", { + describe: "Source chain", + choices: CHAIN_NAME_CHOICES, + demandOption: true, + } as const) + .positional("tx", { + describe: "Source transaction hash", + type: "string", + demandOption: true, + } as const); +export const handler = async ( + argv: Awaited["argv"]> +) => { + const network = getNetwork(argv.network); + const chain = argv.chain; + assertChain(chain); -// const addr = contracts.relayer.get(network, chain); -// if (!addr) { -// throw new Error(`Wormhole Relayer not deployed on ${chain} in ${network}`); -// } + const addr = contracts.relayer.get(network, chain); + if (!addr) { + throw new Error(`Wormhole Relayer not deployed on ${chain} in ${network}`); + } -// const sourceRPC = NETWORKS[network][chain].rpc; -// const sourceChainProvider = new ethers.providers.JsonRpcProvider(sourceRPC); -// const targetChainProviders = new Map(); -// for (const key in NETWORKS[network]) { -// targetChainProviders.set( -// key as Chain, -// new ethers.providers.JsonRpcProvider(NETWORKS[network][key as Chain].rpc) -// ); -// } + const sourceRPC = NETWORKS[network][chain].rpc; + const sourceChainProvider = new ethers.providers.JsonRpcProvider(sourceRPC); + const targetChainProviders = new Map(); + for (const key in NETWORKS[network]) { + targetChainProviders.set( + key as Chain, + new ethers.providers.JsonRpcProvider(NETWORKS[network][key as Chain].rpc) + ); + } -// const info = await relayer.getWormholeRelayerInfo(chain, argv.tx, { -// environment: network, -// sourceChainProvider, -// targetChainProviders, -// }); + // const info = await relayer.getWormholeRelayerInfo(chain, argv.tx, { + // environment: network, + // sourceChainProvider, + // targetChainProviders, + // }); -// console.log(relayer.stringifyWormholeRelayerInfo(info)); -// }; + // console.log(relayer.stringifyWormholeRelayerInfo(info)); + console.log("Not implemented"); +}; diff --git a/clients/js/src/cmds/submit.ts b/clients/js/src/cmds/submit.ts index de526bc410..e2165f89c3 100644 --- a/clients/js/src/cmds/submit.ts +++ b/clients/js/src/cmds/submit.ts @@ -3,27 +3,27 @@ import { execute_algorand } from "../algorand"; import { execute_aptos } from "../aptos"; import { submit as submitSei } from "../chains/sei"; import { submit as submitSui } from "../chains/sui"; -import { CHAIN_NAME_CHOICES, NETWORK_OPTIONS } from "../consts"; +import { NETWORK_OPTIONS } from "../consts"; import { execute_evm } from "../evm"; import { execute_injective } from "../injective"; import { execute_near } from "../near"; import { execute_solana } from "../solana"; import { execute_terra } from "../terra"; -import { assertKnownPayload, impossible, parse, Payload, VAA } from "../vaa"; +import { assertKnownPayload, parse, Payload, VAA } from "../vaa"; import { execute_xpla } from "../xpla"; import { NETWORKS } from "../consts"; -import { getNetwork } from "../utils"; +import { chainToChain, getNetwork } from "../utils"; import { Chain, Network, PlatformToChains, assertChain, assertChainId, + chainIdToChain, chainToPlatform, chains, contracts, toChain, - toChainId, } from "@wormhole-foundation/sdk"; export const command = "submit "; @@ -38,7 +38,7 @@ export const builder = (y: typeof yargs) => .option("chain", { alias: "c", describe: "chain name", - choices: CHAIN_NAME_CHOICES, + type: "string", demandOption: false, } as const) .option("network", NETWORK_OPTIONS) @@ -102,22 +102,34 @@ export const handler = async ( // get VAA chain const vaa_chain_id = "chain" in parsed_vaa.payload ? parsed_vaa.payload.chain : 0; - assertChainId(vaa_chain_id); - const vaa_chain = toChain(vaa_chain_id); + + // if vaa_chain_id is 0, it means the chain is not specified in the VAA. + // We don't have a notion of an unsupported chain, so we don't want to just assert. + let vaa_chain; + if (vaa_chain_id !== 0) { + assertChainId(vaa_chain_id); + vaa_chain = chainIdToChain(vaa_chain_id); + } // get chain from command line arg - const cli_chain = argv.chain; + const cli_chain = argv.chain ? chainToChain(argv.chain) : argv.chain; let chain: Chain; if (cli_chain !== undefined) { assertChain(cli_chain); - if (cli_chain !== vaa_chain) { + if (vaa_chain && cli_chain !== vaa_chain) { throw Error( `Specified target chain (${cli_chain}) does not match VAA target chain (${vaa_chain})` ); } chain = toChain(cli_chain); } else { + if (!vaa_chain) { + throw Error( + `VAA does not specify a target chain and one was not provided, please specify one with --chain or -c` + ); + } + assertChain(vaa_chain); chain = vaa_chain; } diff --git a/clients/js/src/utils.ts b/clients/js/src/utils.ts index 3473ac7083..e7a3bec233 100644 --- a/clients/js/src/utils.ts +++ b/clients/js/src/utils.ts @@ -53,8 +53,8 @@ export function getNetwork(network: string): Network { } export function chainToChain(input: string): Chain { - if (input.length === 0) { - throw new Error("Empty chain"); + if (input.length < 2) { + throw new Error(`Invalid chain: ${input}`); } const chainStr = input[0].toUpperCase() + input.slice(1).toLowerCase(); return toChain(chainStr); diff --git a/scripts/guardian-set-init.sh b/scripts/guardian-set-init.sh index c901ef5983..d3bb3f123b 100755 --- a/scripts/guardian-set-init.sh +++ b/scripts/guardian-set-init.sh @@ -96,24 +96,24 @@ aptosNFTBridge=$(jq --raw-output '.chains."22".contracts.nftBridgeEmitterAddress # 4) create token bridge registration VAAs # invoke CLI commands to create registration VAAs -solTokenBridgeVAA=$(worm generate registration -m TokenBridge -c Solana -a ${solTokenBridge} -g ${guardiansPrivateCSV}) -ethTokenBridgeVAA=$(worm generate registration -m TokenBridge -c Ethereum -a ${ethTokenBridge} -g ${guardiansPrivateCSV}) -terraTokenBridgeVAA=$(worm generate registration -m TokenBridge -c Terra -a ${terraTokenBridge} -g ${guardiansPrivateCSV}) -bscTokenBridgeVAA=$(worm generate registration -m TokenBridge -c Bsc -a ${bscTokenBridge} -g ${guardiansPrivateCSV}) -algoTokenBridgeVAA=$(worm generate registration -m TokenBridge -c Algorand -a ${algoTokenBridge} -g ${guardiansPrivateCSV}) -nearTokenBridgeVAA=$(worm generate registration -m TokenBridge -c Near -a ${nearTokenBridge} -g ${guardiansPrivateCSV}) -terra2TokenBridgeVAA=$(worm generate registration -m TokenBridge -c Terra2 -a ${terra2TokenBridge} -g ${guardiansPrivateCSV}) -suiTokenBridgeVAA=$(worm generate registration -m TokenBridge -c Sui -a ${suiTokenBridge} -g ${guardiansPrivateCSV}) -aptosTokenBridgeVAA=$(worm generate registration -m TokenBridge -c Aptos -a ${aptosTokenBridge} -g ${guardiansPrivateCSV}) -wormchainTokenBridgeVAA=$(worm generate registration -m TokenBridge -c Wormchain -a ${wormchainTokenBridge} -g ${guardiansPrivateCSV}) +solTokenBridgeVAA=$(worm generate registration -m TokenBridge -c solana -a ${solTokenBridge} -g ${guardiansPrivateCSV}) +ethTokenBridgeVAA=$(worm generate registration -m TokenBridge -c ethereum -a ${ethTokenBridge} -g ${guardiansPrivateCSV}) +terraTokenBridgeVAA=$(worm generate registration -m TokenBridge -c terra -a ${terraTokenBridge} -g ${guardiansPrivateCSV}) +bscTokenBridgeVAA=$(worm generate registration -m TokenBridge -c bsc -a ${bscTokenBridge} -g ${guardiansPrivateCSV}) +algoTokenBridgeVAA=$(worm generate registration -m TokenBridge -c algorand -a ${algoTokenBridge} -g ${guardiansPrivateCSV}) +nearTokenBridgeVAA=$(worm generate registration -m TokenBridge -c near -a ${nearTokenBridge} -g ${guardiansPrivateCSV}) +terra2TokenBridgeVAA=$(worm generate registration -m TokenBridge -c terra2 -a ${terra2TokenBridge} -g ${guardiansPrivateCSV}) +suiTokenBridgeVAA=$(worm generate registration -m TokenBridge -c sui -a ${suiTokenBridge} -g ${guardiansPrivateCSV}) +aptosTokenBridgeVAA=$(worm generate registration -m TokenBridge -c aptos -a ${aptosTokenBridge} -g ${guardiansPrivateCSV}) +wormchainTokenBridgeVAA=$(worm generate registration -m TokenBridge -c wormchain -a ${wormchainTokenBridge} -g ${guardiansPrivateCSV}) # 5) create nft bridge registration VAAs echo "generating contract registration VAAs for nft bridges" -solNFTBridgeVAA=$(worm generate registration -m NFTBridge -c Solana -a ${solNFTBridge} -g ${guardiansPrivateCSV}) -ethNFTBridgeVAA=$(worm generate registration -m NFTBridge -c Ethereum -a ${ethNFTBridge} -g ${guardiansPrivateCSV}) -nearNFTBridgeVAA=$(worm generate registration -m NFTBridge -c Near -a ${nearNFTBridge} -g ${guardiansPrivateCSV}) -aptosNFTBridgeVAA=$(worm generate registration -m NFTBridge -c Aptos -a ${aptosNFTBridge} -g ${guardiansPrivateCSV}) +solNFTBridgeVAA=$(worm generate registration -m NFTBridge -c solana -a ${solNFTBridge} -g ${guardiansPrivateCSV}) +ethNFTBridgeVAA=$(worm generate registration -m NFTBridge -c ethereum -a ${ethNFTBridge} -g ${guardiansPrivateCSV}) +nearNFTBridgeVAA=$(worm generate registration -m NFTBridge -c near -a ${nearNFTBridge} -g ${guardiansPrivateCSV}) +aptosNFTBridgeVAA=$(worm generate registration -m NFTBridge -c aptos -a ${aptosNFTBridge} -g ${guardiansPrivateCSV}) # 6) write the registration VAAs to env files