Skip to content

feat: support axelarnet proposals#1322

Open
isi8787 wants to merge 2 commits into
mainfrom
feat/add-axelarnet-proposal
Open

feat: support axelarnet proposals#1322
isi8787 wants to merge 2 commits into
mainfrom
feat/add-axelarnet-proposal

Conversation

@isi8787

@isi8787 isi8787 commented Dec 23, 2025

Copy link
Copy Markdown
Contributor

why

how


Note

Introduces governance-driven support to add IBC chains through axelarnet.

  • New axelarnet proto: cosmwasm/proto/axelarnet_add_chain.proto defining AddCosmosBasedChainRequest and related types
  • Adds getAxelarnetProtoType and encodeAddIBCChain(options) in cosmwasm/utils.js; validates inputs and returns /axelar.axelarnet.v1beta1.AddCosmosBasedChainRequest
  • Wires new CLI command add-ibc-chain in cosmwasm/core.ts (args: chainName, chainPrefix, ibcPath) using existing governance proposal flow
  • Exposes new utilities from utils.js and integrates with executeCoreOperation

Written by Cursor Bugbot for commit 899783a. This will update automatically on new commits. Configure here.

@isi8787 isi8787 marked this pull request as ready for review December 23, 2025 17:30
@isi8787 isi8787 requested a review from a team as a code owner December 23, 2025 17:30
Comment thread cosmwasm/utils.js
};

const encodeAddIBCChain = (options) => {
const { cosmosChain, addrPrefix, ibcPath } = options;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Array passed to function expecting object destructuring

The encodeAddIBCChain function uses object destructuring ({ cosmosChain, addrPrefix, ibcPath } = options) but receives an array from the caller addIBCChain which passes args directly. When object destructuring is applied to an array like ['chain1', 'prefix1', 'path1'], all named properties will be undefined since arrays have numeric indices, not named properties. This will cause the feature to fail at the validateParameters check.

Additional Locations (1)

Fix in Cursor Fix in Web

Comment thread cosmwasm/core.ts
) => nexusChainState('deactivate', client, config, options, args, fee);

const addIBCChain = (client: ClientManager, config: ConfigManager, options: CoreCommandOptions, args: string[], fee?: string | StdFee) =>
executeCoreOperation(client, config, options, [encodeAddIBCChain(args)], fee);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing default title causes required option error

The addIBCChain function calls executeCoreOperation without providing a defaultTitle parameter. In executeCoreOperation, the title defaults to options.title || defaultTitle, and validation requires a non-empty string. Unlike nexusChainState which generates a default title like `${actionText} ${args.join(', ')} on Nexus`, addIBCChain will cause validation to fail if users don't explicitly provide --title and --description options. This creates inconsistent behavior compared to the activate-chain and deactivate-chain commands.

Fix in Cursor Fix in Web

Comment thread cosmwasm/core.ts
Comment on lines +102 to +104
.argument('<chainName>', 'chain name to add')
.argument('<chainPrefix>', 'chain prefix to add')
.argument('<ibcPath>', 'IBC path to add')

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

match the args match the function parameter names?

Suggested change
.argument('<chainName>', 'chain name to add')
.argument('<chainPrefix>', 'chain prefix to add')
.argument('<ibcPath>', 'IBC path to add')
.argument('<cosmosChain>', 'cosmos chain name to add')
.argument('<addrPrefix>', 'address prefix')
.argument('<ibcPath>', 'IBC path')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants