Skip to content

Commit

Permalink
chore(cosmwasm): update nexus gateway instantiation message (#365)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcs47 authored Sep 5, 2024
1 parent e91aa78 commit 4e472c5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cosmwasm/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,16 +200,20 @@ const makeRouterInstantiateMsg = ({ adminAddress, governanceAddress }, { NexusGa
return { admin_address: adminAddress, governance_address: governanceAddress, nexus_gateway: nexusGateway };
};

const makeNexusGatewayInstantiateMsg = ({ nexus }, { Router: { address: router } }) => {
const makeNexusGatewayInstantiateMsg = ({ nexus }, { Router: { address: router }, AxelarnetGateway: { address: axelarnetGateway } }) => {
if (!validateAddress(nexus)) {
throw new Error('Missing or invalid NexusGateway.nexus in axelar info');
}

if (!validateAddress(axelarnetGateway)) {
throw new Error('Missing or invalid AxelarnetGateway.address in axelar info');
}

if (!validateAddress(router)) {
throw new Error('Missing or invalid Router.address in axelar info');
}

return { nexus, router };
return { nexus, axelarnet_gateway: axelarnetGateway, router };
};

const makeVotingVerifierInstantiateMsg = (
Expand Down

0 comments on commit 4e472c5

Please sign in to comment.