Skip to content

Commit

Permalink
fix(cosmwasm): prevent contract config initialization when no contrac…
Browse files Browse the repository at this point in the history
…t name is required for the script (#486)
  • Loading branch information
eguajardo authored Dec 24, 2024
1 parent 69b5f09 commit f837a1f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cosmwasm/submit-proposal.js
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ const programHandler = () => {
options.chains = chains;
mainProcessor(registerItsChain, options);
});
addAmplifierOptions(registerItsChainCmd, { registerItsChainOptions: true, proposalOptions: true, runAs: true });
addAmplifierOptions(registerItsChainCmd, { proposalOptions: true, runAs: true });

const paramChangeCmd = program
.command('paramChange')
Expand Down
4 changes: 4 additions & 0 deletions cosmwasm/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ const getLabel = ({ contractName, label }) => label || contractName;
const readWasmFile = ({ artifactPath, contractName }) => readFileSync(`${artifactPath}/${pascalToSnake(contractName)}.wasm`);

const initContractConfig = (config, { contractName, chainName }) => {
if (!contractName) {
return;
}

config.axelar = config.axelar || {};
config.axelar.contracts = config.axelar.contracts || {};
config.axelar.contracts[contractName] = config.axelar.contracts[contractName] || {};
Expand Down

0 comments on commit f837a1f

Please sign in to comment.