Skip to content

Commit

Permalink
removed extra argument
Browse files Browse the repository at this point in the history
  • Loading branch information
eguajardo committed Jul 22, 2024
1 parent 317a4db commit 002b891
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions cosmwasm/submit-proposal.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ const updateContractConfig = (contractConfig, chainConfig, key, value) => {
}
};

const predictAndUpdateAddress = (client, config, options, contractConfig, chainConfig, contractName, chainName) => {
return instantiate2AddressForProposal(client, config, options).then((contractAddress) => {
const predictAndUpdateAddress = (client, contractConfig, chainConfig, options, contractName, chainName) => {
return instantiate2AddressForProposal(client, contractConfig, options).then((contractAddress) => {
updateContractConfig(contractConfig, chainConfig, 'address', contractAddress);

printInfo(`Predicted address for ${chainName === 'none' ? '' : chainName.concat(' ')}${contractName}. Address`, contractAddress);
Expand Down Expand Up @@ -63,7 +63,7 @@ const instantiate = (client, wallet, config, options, chainName) => {
} = config;

if (predictOnly) {
return predictAndUpdateAddress(client, config, options, contractConfig, chainConfig, contractName, chainName);
return predictAndUpdateAddress(client, contractConfig, chainConfig, options, contractName, chainName);
}

const initMsg = makeInstantiateMsg(contractName, chainName, config);
Expand All @@ -75,7 +75,7 @@ const instantiate = (client, wallet, config, options, chainName) => {
}

if (instantiate2) {
return predictAndUpdateAddress(client, config, options, contractConfig, chainConfig, contractName, chainName);
return predictAndUpdateAddress(client, contractConfig, chainConfig, options, contractName, chainName);
}
});
};
Expand Down
4 changes: 2 additions & 2 deletions cosmwasm/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -492,9 +492,9 @@ const makeInstantiateMsg = (contractName, chainName, config) => {
throw new Error(`${contractName} is not supported.`);
};

const instantiate2AddressForProposal = (client, config, { contractName, salt, chainNames, runAs }) => {
const instantiate2AddressForProposal = (client, contractConfig, { contractName, salt, chainNames, runAs }) => {
return client
.getCodeDetails(config.axelar.contracts[contractName].codeId)
.getCodeDetails(contractConfig.codeId)
.then(({ checksum }) => instantiate2Address(fromHex(checksum), runAs, getSalt(salt, contractName, chainNames), 'axelar'));
};

Expand Down

0 comments on commit 002b891

Please sign in to comment.