diff --git a/axelar-chains-config/info/devnet-amplifier.json b/axelar-chains-config/info/devnet-amplifier.json index c18db356..f3a54076 100644 --- a/axelar-chains-config/info/devnet-amplifier.json +++ b/axelar-chains-config/info/devnet-amplifier.json @@ -839,10 +839,6 @@ "codeId": 844, "address": "axelar1wvms3cy5hxrgl7uxhkz7yth4qzqum6aaccwkmvafq8z0mgdfxr8qrnvw0k", "nexus": "axelar17h8uk4ct0mdv9mgkuxszt4gp2htpfr08mge20r", - "axelar": { - "storeInstantiateProposalId": "59", - "codeId": 845 - }, "storeCodeProposalCodeHash": "c7286d0f59276b794641bdfbb4f96fafcee3553b67f3397d662a4683968f525b", "storeCodeProposalId": "60", "lastUploadedCodeId": 845 @@ -852,10 +848,7 @@ "governanceAddress": "axelar1zlr7e5qf3sz7yf890rkh9tcnu87234k6k7ytd9", "codeId": 843, "address": "axelar157hl7gpuknjmhtac2qnphuazv2yerfagva7lsu9vuj2pgn32z22qa26dk4", - "axelar": { - "codeId": 843, - "instantiateProposalId": "61" - }, + "instantiateProposalId": "61", "sui": { "maxUintBits": 64, "maxDecimalsWhenTruncating": 8 diff --git a/axelar-chains-config/info/stagenet.json b/axelar-chains-config/info/stagenet.json index fe74a23c..4f806358 100644 --- a/axelar-chains-config/info/stagenet.json +++ b/axelar-chains-config/info/stagenet.json @@ -1851,10 +1851,7 @@ "storeCodeProposalCodeHash": "b60d0d227c7a400a0fcc80ed52f0e6688e5da6db676a61ed8b6942823294031d", "governanceAddress": "axelar10d07y265gmmuvt4z0w9aw880jnsr700j7v9daj", "adminAddress": "axelar12qvsvse32cjyw60ztysd3v655aj5urqeup82ky", - "axelar": { - "codeId": 17, - "address": "axelar1ph8qufmsh556e40uk0ceaufc06nwhnw0ksgdqqk6ldszxchh8llq8x52dk" - }, + "codeId": 17, "address": "axelar1ph8qufmsh556e40uk0ceaufc06nwhnw0ksgdqqk6ldszxchh8llq8x52dk", "lastUploadedCodeId": 17 }, @@ -1864,10 +1861,6 @@ "nexus": "axelar17h8uk4ct0mdv9mgkuxszt4gp2htpfr08mge20r", "address": "axelar1s9amtxejrdlsunwdf0cclhjtezdp6wmurxxnh45gfvtpa2jrsusqv934n6", "codeId": 20, - "axelar": { - "codeId": 20, - "address": "axelar1s9amtxejrdlsunwdf0cclhjtezdp6wmurxxnh45gfvtpa2jrsusqv934n6" - }, "lastUploadedCodeId": 20 } }, diff --git a/cosmwasm/cli-utils.js b/cosmwasm/cli-utils.js index 75746a07..446946d2 100644 --- a/cosmwasm/cli-utils.js +++ b/cosmwasm/cli-utils.js @@ -3,7 +3,7 @@ require('dotenv').config(); const { isNumber, addEnvOption } = require('../common'); -const { governanceAddress } = require('./utils'); +const { CONTRACT_SCOPE_CHAIN, CONTRACT_SCOPE_GLOBAL, CONTRACTS, governanceAddress } = require('./utils'); const { Option, InvalidArgumentError } = require('commander'); @@ -83,6 +83,32 @@ const addAmplifierOptions = (program, options) => { const addContractOptions = (program) => { program.addOption(new Option('-c, --contractName ', 'contract name').makeOptionMandatory(true)); program.addOption(new Option('-n, --chainName ', 'chain name').env('CHAIN').argParser((value) => value.toLowerCase())); + program.hook('preAction', (command) => { + const chainName = command.opts().chainName; + const contractName = command.opts().contractName; + + if (!CONTRACTS[contractName]) { + throw new Error(`contract ${contractName} is not supported`); + } + + if (!CONTRACTS[contractName].makeInstantiateMsg) { + throw new Error(`makeInstantiateMsg function for contract ${contractName} is not defined`); + } + + const scope = CONTRACTS[contractName].scope; + + if (!scope) { + throw new Error(`scope of contract ${contractName} is not defined`); + } + + if (scope === CONTRACT_SCOPE_CHAIN && !chainName) { + throw new Error(`${contractName} requires chainName option`); + } + + if (scope === CONTRACT_SCOPE_GLOBAL && chainName) { + throw new Error(`${contractName} does not support chainName option`); + } + }); }; const addStoreOptions = (program) => { diff --git a/cosmwasm/deploy-contract.js b/cosmwasm/deploy-contract.js index 486e7f12..e2050ffa 100644 --- a/cosmwasm/deploy-contract.js +++ b/cosmwasm/deploy-contract.js @@ -7,6 +7,7 @@ const { instantiate2Address } = require('@cosmjs/cosmwasm-stargate'); const { printInfo, loadConfig, saveConfig, prompt } = require('../common'); const { + CONTRACTS, prepareWallet, prepareClient, fromHex, @@ -16,7 +17,6 @@ const { updateCodeId, uploadContract, instantiateContract, - makeInstantiateMsg, } = require('./utils'); const { Command, Option } = require('commander'); @@ -66,7 +66,7 @@ const instantiate = async (client, wallet, config, options) => { await updateCodeId(client, config, options); - const initMsg = makeInstantiateMsg(contractName, chainName, config); + const initMsg = CONTRACTS[contractName].makeInstantiateMsg(config, options, contractConfig); const contractAddress = await instantiateContract(client, wallet, initMsg, config, options); contractConfig.address = contractAddress; diff --git a/cosmwasm/submit-proposal.js b/cosmwasm/submit-proposal.js index 92c29a15..441b86d5 100644 --- a/cosmwasm/submit-proposal.js +++ b/cosmwasm/submit-proposal.js @@ -7,6 +7,7 @@ const { createHash } = require('crypto'); const { instantiate2Address } = require('@cosmjs/cosmwasm-stargate'); const { + CONTRACTS, prepareWallet, prepareClient, fromHex, @@ -26,7 +27,6 @@ const { encodeParameterChangeProposal, encodeMigrateContractProposal, submitProposal, - makeInstantiateMsg, } = require('./utils'); const { saveConfig, loadConfig, printInfo, prompt, getChainConfig, getItsEdgeContract } = require('../common'); const { @@ -94,14 +94,14 @@ const storeCode = async (client, wallet, config, options) => { }; const storeInstantiate = async (client, wallet, config, options) => { - const { contractName, instantiate2, chainName } = options; + const { contractName, instantiate2 } = options; const { contractConfig, contractBaseConfig } = getAmplifierContractConfig(config, options); if (instantiate2) { throw new Error('instantiate2 not supported for storeInstantiate'); } - const initMsg = makeInstantiateMsg(contractName, chainName, config); + const initMsg = CONTRACTS[contractName].makeInstantiateMsg(config, options, contractConfig); const proposal = encodeStoreInstantiateProposal(config, options, initMsg); if (!confirmProposalSubmission(options, proposal, StoreAndInstantiateContractProposal)) { @@ -115,7 +115,7 @@ const storeInstantiate = async (client, wallet, config, options) => { }; const instantiate = async (client, wallet, config, options) => { - const { contractName, instantiate2, predictOnly, chainName } = options; + const { contractName, instantiate2, predictOnly } = options; const { contractConfig } = getAmplifierContractConfig(config, options); await updateCodeId(client, config, options); @@ -129,7 +129,7 @@ const instantiate = async (client, wallet, config, options) => { return; } - const initMsg = makeInstantiateMsg(contractName, chainName, config); + const initMsg = CONTRACTS[contractName].makeInstantiateMsg(config, options, contractConfig); let proposal; let proposalType; diff --git a/cosmwasm/utils.js b/cosmwasm/utils.js index cbaf8400..787feb39 100644 --- a/cosmwasm/utils.js +++ b/cosmwasm/utils.js @@ -22,7 +22,6 @@ const { printInfo, isString, isStringArray, - isStringLowercase, isKeccak256Hash, isNumber, toBigNumberString, @@ -36,6 +35,9 @@ const { normalizeBech32 } = require('@cosmjs/encoding'); const DEFAULT_MAX_UINT_BITS_EVM = 256; const DEFAULT_MAX_DECIMALS_WHEN_TRUNCATING_EVM = 255; +const CONTRACT_SCOPE_GLOBAL = 'global'; +const CONTRACT_SCOPE_CHAIN = 'chain'; + const governanceAddress = 'axelar10d07y265gmmuvt4z0w9aw880jnsr700j7v9daj'; const prepareWallet = async ({ mnemonic }) => await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: 'axelar' }); @@ -165,7 +167,15 @@ const validateAddress = (address) => { return isString(address) && isValidCosmosAddress(address); }; -const makeCoordinatorInstantiateMsg = ({ governanceAddress }, { ServiceRegistry: { address: registryAddress } }) => { +const makeCoordinatorInstantiateMsg = (config, _options, contractConfig) => { + const { + axelar: { contracts }, + } = config; + const { + ServiceRegistry: { address: registryAddress }, + } = contracts; + const { governanceAddress } = contractConfig; + if (!validateAddress(governanceAddress)) { throw new Error('Missing or invalid Coordinator.governanceAddress in axelar info'); } @@ -177,7 +187,9 @@ const makeCoordinatorInstantiateMsg = ({ governanceAddress }, { ServiceRegistry: return { governance_address: governanceAddress, service_registry: registryAddress }; }; -const makeServiceRegistryInstantiateMsg = ({ governanceAccount }) => { +const makeServiceRegistryInstantiateMsg = (_config, _options, contractConfig) => { + const { governanceAccount } = contractConfig; + if (!validateAddress(governanceAccount)) { throw new Error('Missing or invalid ServiceRegistry.governanceAccount in axelar info'); } @@ -185,7 +197,15 @@ const makeServiceRegistryInstantiateMsg = ({ governanceAccount }) => { return { governance_account: governanceAccount }; }; -const makeMultisigInstantiateMsg = ({ adminAddress, governanceAddress, blockExpiry }, { Rewards: { address: rewardsAddress } }) => { +const makeMultisigInstantiateMsg = (config, _options, contractConfig) => { + const { + axelar: { contracts }, + } = config; + const { + Rewards: { address: rewardsAddress }, + } = contracts; + const { adminAddress, governanceAddress, blockExpiry } = contractConfig; + if (!validateAddress(adminAddress)) { throw new Error('Missing or invalid Multisig.adminAddress in axelar info'); } @@ -210,7 +230,9 @@ const makeMultisigInstantiateMsg = ({ adminAddress, governanceAddress, blockExpi }; }; -const makeRewardsInstantiateMsg = ({ governanceAddress, rewardsDenom }) => { +const makeRewardsInstantiateMsg = (_config, _options, contractConfig) => { + const { governanceAddress, rewardsDenom } = contractConfig; + if (!validateAddress(governanceAddress)) { throw new Error('Missing or invalid Rewards.governanceAddress in axelar info'); } @@ -222,7 +244,15 @@ const makeRewardsInstantiateMsg = ({ governanceAddress, rewardsDenom }) => { return { governance_address: governanceAddress, rewards_denom: rewardsDenom }; }; -const makeRouterInstantiateMsg = ({ adminAddress, governanceAddress }, { AxelarnetGateway: { address: axelarnetGateway } }) => { +const makeRouterInstantiateMsg = (config, _options, contractConfig) => { + const { + axelar: { contracts }, + } = config; + const { + AxelarnetGateway: { address: axelarnetGateway }, + } = contracts; + const { adminAddress, governanceAddress } = contractConfig; + if (!validateAddress(adminAddress)) { throw new Error('Missing or invalid Router.adminAddress in axelar info'); } @@ -238,28 +268,26 @@ const makeRouterInstantiateMsg = ({ adminAddress, governanceAddress }, { Axelarn return { admin_address: adminAddress, governance_address: governanceAddress, axelarnet_gateway: axelarnetGateway }; }; -const makeVotingVerifierInstantiateMsg = ( - contractConfig, - { ServiceRegistry: { address: serviceRegistryAddress }, Rewards: { address: rewardsAddress } }, - { axelarId }, -) => { +const makeVotingVerifierInstantiateMsg = (config, options, contractConfig) => { + const { chainName } = options; const { - [axelarId]: { - governanceAddress, - serviceName, - sourceGatewayAddress, - votingThreshold, - blockExpiry, - confirmationHeight, - msgIdFormat, - addressFormat, - }, + axelar: { contracts }, + } = config; + const { + ServiceRegistry: { address: serviceRegistryAddress }, + Rewards: { address: rewardsAddress }, + } = contracts; + const { + governanceAddress, + serviceName, + sourceGatewayAddress, + votingThreshold, + blockExpiry, + confirmationHeight, + msgIdFormat, + addressFormat, } = contractConfig; - if (!isStringLowercase(axelarId)) { - throw new Error('Missing or invalid axelar ID'); - } - if (!validateAddress(serviceRegistryAddress)) { throw new Error('Missing or invalid ServiceRegistry.address in axelar info'); } @@ -269,35 +297,35 @@ const makeVotingVerifierInstantiateMsg = ( } if (!validateAddress(governanceAddress)) { - throw new Error(`Missing or invalid VotingVerifier[${axelarId}].governanceAddress in axelar info`); + throw new Error(`Missing or invalid VotingVerifier[${chainName}].governanceAddress in axelar info`); } if (!isString(serviceName)) { - throw new Error(`Missing or invalid VotingVerifier[${axelarId}].serviceName in axelar info`); + throw new Error(`Missing or invalid VotingVerifier[${chainName}].serviceName in axelar info`); } if (!isString(sourceGatewayAddress)) { - throw new Error(`Missing or invalid VotingVerifier[${axelarId}].sourceGatewayAddress in axelar info`); + throw new Error(`Missing or invalid VotingVerifier[${chainName}].sourceGatewayAddress in axelar info`); } if (!isStringArray(votingThreshold)) { - throw new Error(`Missing or invalid VotingVerifier[${axelarId}].votingThreshold in axelar info`); + throw new Error(`Missing or invalid VotingVerifier[${chainName}].votingThreshold in axelar info`); } if (!isNumber(blockExpiry)) { - throw new Error(`Missing or invalid VotingVerifier[${axelarId}].blockExpiry in axelar info`); + throw new Error(`Missing or invalid VotingVerifier[${chainName}].blockExpiry in axelar info`); } if (!isNumber(confirmationHeight)) { - throw new Error(`Missing or invalid VotingVerifier[${axelarId}].confirmationHeight in axelar info`); + throw new Error(`Missing or invalid VotingVerifier[${chainName}].confirmationHeight in axelar info`); } if (!isString(msgIdFormat)) { - throw new Error(`Missing or invalid VotingVerifier[${axelarId}].msgIdFormat in axelar info`); + throw new Error(`Missing or invalid VotingVerifier[${chainName}].msgIdFormat in axelar info`); } if (!isString(addressFormat)) { - throw new Error(`Missing or invalid VotingVerifier[${axelarId}].addressFormat in axelar info`); + throw new Error(`Missing or invalid VotingVerifier[${chainName}].addressFormat in axelar info`); } return { @@ -309,65 +337,55 @@ const makeVotingVerifierInstantiateMsg = ( voting_threshold: votingThreshold, block_expiry: toBigNumberString(blockExpiry), confirmation_height: confirmationHeight, - source_chain: axelarId, + source_chain: chainName, msg_id_format: msgIdFormat, address_format: addressFormat, }; }; -const makeGatewayInstantiateMsg = ({ Router: { address: routerAddress }, VotingVerifier }, { axelarId: chainId }) => { +const makeGatewayInstantiateMsg = (config, options, _contractConfig) => { + const { chainName } = options; const { - [chainId]: { address: verifierAddress }, - } = VotingVerifier; + axelar: { + contracts: { + Router: { address: routerAddress }, + VotingVerifier: { + [chainName]: { address: verifierAddress }, + }, + }, + }, + } = config; if (!validateAddress(routerAddress)) { throw new Error('Missing or invalid Router.address in axelar info'); } if (!validateAddress(verifierAddress)) { - throw new Error(`Missing or invalid VotingVerifier[${chainId}].address in axelar info`); + throw new Error(`Missing or invalid VotingVerifier[${chainName}].address in axelar info`); } return { router_address: routerAddress, verifier_address: verifierAddress }; }; -const makeMultisigProverInstantiateMsg = (config, chainName) => { +const makeMultisigProverInstantiateMsg = (config, options, contractConfig) => { + const { chainName } = options; const { axelar: { contracts, chainId: axelarChainId }, } = config; - const chainConfig = getChainConfig(config, chainName); - - const { axelarId } = chainConfig; - const { Router: { address: routerAddress }, Coordinator: { address: coordinatorAddress }, Multisig: { address: multisigAddress }, ServiceRegistry: { address: serviceRegistryAddress }, VotingVerifier: { - [axelarId]: { address: verifierAddress }, + [chainName]: { address: verifierAddress }, }, Gateway: { - [axelarId]: { address: gatewayAddress }, + [chainName]: { address: gatewayAddress }, }, - MultisigProver: contractConfig, } = contracts; - const { - [axelarId]: { - adminAddress, - governanceAddress, - domainSeparator, - signingThreshold, - serviceName, - verifierSetDiffThreshold, - encoder, - keyType, - }, - } = contractConfig; - - if (!isStringLowercase(axelarId)) { - throw new Error(`Missing or invalid axelar ID for chain ${chainName}`); - } + const { adminAddress, governanceAddress, domainSeparator, signingThreshold, serviceName, verifierSetDiffThreshold, encoder, keyType } = + contractConfig; if (!validateAddress(routerAddress)) { throw new Error('Missing or invalid Router.address in axelar info'); @@ -377,19 +395,19 @@ const makeMultisigProverInstantiateMsg = (config, chainName) => { throw new Error(`Missing or invalid chain ID`); } - const separator = domainSeparator || calculateDomainSeparator(axelarId, routerAddress, axelarChainId); - contractConfig[axelarId].domainSeparator = separator; + const separator = domainSeparator || calculateDomainSeparator(chainName, routerAddress, axelarChainId); + contractConfig.domainSeparator = separator; if (!validateAddress(adminAddress)) { - throw new Error(`Missing or invalid MultisigProver[${axelarId}].adminAddress in axelar info`); + throw new Error(`Missing or invalid MultisigProver[${chainName}].adminAddress in axelar info`); } if (!validateAddress(governanceAddress)) { - throw new Error(`Missing or invalid MultisigProver[${axelarId}].governanceAddress in axelar info`); + throw new Error(`Missing or invalid MultisigProver[${chainName}].governanceAddress in axelar info`); } if (!validateAddress(gatewayAddress)) { - throw new Error(`Missing or invalid Gateway[${axelarId}].address in axelar info`); + throw new Error(`Missing or invalid Gateway[${chainName}].address in axelar info`); } if (!validateAddress(coordinatorAddress)) { @@ -405,31 +423,31 @@ const makeMultisigProverInstantiateMsg = (config, chainName) => { } if (!validateAddress(verifierAddress)) { - throw new Error(`Missing or invalid VotingVerifier[${axelarId}].address in axelar info`); + throw new Error(`Missing or invalid VotingVerifier[${chainName}].address in axelar info`); } if (!isKeccak256Hash(separator)) { - throw new Error(`Invalid MultisigProver[${axelarId}].domainSeparator in axelar info`); + throw new Error(`Invalid MultisigProver[${chainName}].domainSeparator in axelar info`); } if (!isStringArray(signingThreshold)) { - throw new Error(`Missing or invalid MultisigProver[${axelarId}].signingThreshold in axelar info`); + throw new Error(`Missing or invalid MultisigProver[${chainName}].signingThreshold in axelar info`); } if (!isString(serviceName)) { - throw new Error(`Missing or invalid MultisigProver[${axelarId}].serviceName in axelar info`); + throw new Error(`Missing or invalid MultisigProver[${chainName}].serviceName in axelar info`); } if (!isNumber(verifierSetDiffThreshold)) { - throw new Error(`Missing or invalid MultisigProver[${axelarId}].verifierSetDiffThreshold in axelar info`); + throw new Error(`Missing or invalid MultisigProver[${chainName}].verifierSetDiffThreshold in axelar info`); } if (!isString(encoder)) { - throw new Error(`Missing or invalid MultisigProver[${axelarId}].encoder in axelar info`); + throw new Error(`Missing or invalid MultisigProver[${chainName}].encoder in axelar info`); } if (!isString(keyType)) { - throw new Error(`Missing or invalid MultisigProver[${axelarId}].keyType in axelar info`); + throw new Error(`Missing or invalid MultisigProver[${chainName}].keyType in axelar info`); } return { @@ -443,18 +461,18 @@ const makeMultisigProverInstantiateMsg = (config, chainName) => { domain_separator: separator.replace('0x', ''), signing_threshold: signingThreshold, service_name: serviceName, - chain_name: axelarId, + chain_name: chainName, verifier_set_diff_threshold: verifierSetDiffThreshold, encoder, key_type: keyType, }; }; -const makeAxelarnetGatewayInstantiateMsg = ({ nexus }, config) => { +const makeAxelarnetGatewayInstantiateMsg = (config, _options, contractConfig) => { + const { nexus } = contractConfig; const { axelar: { contracts, axelarId }, } = config; - const { Router: { address: routerAddress }, } = contracts; @@ -474,7 +492,8 @@ const makeAxelarnetGatewayInstantiateMsg = ({ nexus }, config) => { }; }; -const makeInterchainTokenServiceInstantiateMsg = (config, { adminAddress, governanceAddress }) => { +const makeInterchainTokenServiceInstantiateMsg = (config, _options, contractConfig) => { + const { adminAddress, governanceAddress } = contractConfig; const { axelar: { contracts }, } = config; @@ -494,95 +513,6 @@ const makeInterchainTokenServiceInstantiateMsg = (config, { adminAddress, govern }; }; -const makeInstantiateMsg = (contractName, chainName, config) => { - const { - axelar: { contracts }, - } = config; - const chainConfig = getChainConfig(config, chainName); - - const { [contractName]: contractConfig } = contracts; - - switch (contractName) { - case 'Coordinator': { - if (chainConfig) { - throw new Error('Coordinator does not support chainName option'); - } - - return makeCoordinatorInstantiateMsg(contractConfig, contracts); - } - - case 'ServiceRegistry': { - if (chainConfig) { - throw new Error('ServiceRegistry does not support chainName option'); - } - - return makeServiceRegistryInstantiateMsg(contractConfig); - } - - case 'Multisig': { - if (chainConfig) { - throw new Error('Multisig does not support chainName option'); - } - - return makeMultisigInstantiateMsg(contractConfig, contracts); - } - - case 'Rewards': { - if (chainConfig) { - throw new Error('Rewards does not support chainName option'); - } - - return makeRewardsInstantiateMsg(contractConfig); - } - - case 'Router': { - if (chainConfig) { - throw new Error('Router does not support chainName option'); - } - - return makeRouterInstantiateMsg(contractConfig, contracts); - } - - case 'VotingVerifier': { - if (!chainConfig) { - throw new Error('VotingVerifier requires chainName option'); - } - - return makeVotingVerifierInstantiateMsg(contractConfig, contracts, chainConfig); - } - - case 'Gateway': { - if (!chainConfig) { - throw new Error('Gateway requires chainName option'); - } - - return makeGatewayInstantiateMsg(contracts, chainConfig); - } - - case 'MultisigProver': { - if (!chainConfig) { - throw new Error('MultisigProver requires chainName option'); - } - - return makeMultisigProverInstantiateMsg(config, chainName); - } - - case 'AxelarnetGateway': { - if (!chainConfig) { - throw new Error('AxelarnetGateway requires chainName option'); - } - - return makeAxelarnetGatewayInstantiateMsg(contractConfig, config); - } - - case 'InterchainTokenService': { - return makeInterchainTokenServiceInstantiateMsg(config, contractConfig); - } - } - - throw new Error(`${contractName} is not supported.`); -}; - const fetchCodeIdFromCodeHash = async (client, contractBaseConfig) => { if (!contractBaseConfig.storeCodeProposalCodeHash) { throw new Error('storeCodeProposalCodeHash not found in contract config'); @@ -846,7 +776,53 @@ const submitProposal = async (client, wallet, config, options, content) => { return events.find(({ type }) => type === 'submit_proposal').attributes.find(({ key }) => key === 'proposal_id').value; }; +const CONTRACTS = { + Coordinator: { + scope: CONTRACT_SCOPE_GLOBAL, + makeInstantiateMsg: makeCoordinatorInstantiateMsg, + }, + ServiceRegistry: { + scope: CONTRACT_SCOPE_GLOBAL, + makeInstantiateMsg: makeServiceRegistryInstantiateMsg, + }, + Multisig: { + scope: CONTRACT_SCOPE_GLOBAL, + makeInstantiateMsg: makeMultisigInstantiateMsg, + }, + Rewards: { + scope: CONTRACT_SCOPE_GLOBAL, + makeInstantiateMsg: makeRewardsInstantiateMsg, + }, + Router: { + scope: CONTRACT_SCOPE_GLOBAL, + makeInstantiateMsg: makeRouterInstantiateMsg, + }, + VotingVerifier: { + scope: CONTRACT_SCOPE_CHAIN, + makeInstantiateMsg: makeVotingVerifierInstantiateMsg, + }, + Gateway: { + scope: CONTRACT_SCOPE_CHAIN, + makeInstantiateMsg: makeGatewayInstantiateMsg, + }, + MultisigProver: { + scope: CONTRACT_SCOPE_CHAIN, + makeInstantiateMsg: makeMultisigProverInstantiateMsg, + }, + AxelarnetGateway: { + scope: CONTRACT_SCOPE_GLOBAL, + makeInstantiateMsg: makeAxelarnetGatewayInstantiateMsg, + }, + InterchainTokenService: { + scope: CONTRACT_SCOPE_GLOBAL, + makeInstantiateMsg: makeInterchainTokenServiceInstantiateMsg, + }, +}; + module.exports = { + CONTRACT_SCOPE_CHAIN, + CONTRACT_SCOPE_GLOBAL, + CONTRACTS, governanceAddress, prepareWallet, prepareClient, @@ -860,7 +836,6 @@ module.exports = { updateCodeId, uploadContract, instantiateContract, - makeInstantiateMsg, fetchCodeIdFromCodeHash, getChainTruncationParams, decodeProposalAttributes,