Skip to content

test(evm): migrate cosmos deploy bash scripts off -b block (CON-256)#3469

Draft
wen-coding wants to merge 1 commit into
mainfrom
wen/migrate_deploy_bash_off_b_block
Draft

test(evm): migrate cosmos deploy bash scripts off -b block (CON-256)#3469
wen-coding wants to merge 1 commit into
mainfrom
wen/migrate_deploy_bash_off_b_block

Conversation

@wen-coding
Copy link
Copy Markdown
Contributor

Bash twin of #3406's lib.js work. Submit cosmos txs with -b sync and
poll the actual on-chain side effect rather than relying on -b block —
under Autobahn the KV indexer that BroadcastTxCommit polls isn't
populated, so -b block can hang to its 60s timeout.

New shared helper integration_test/contracts/_tx_helpers.sh:

  • store_wasm — submit wasm store -b sync, return new code_id once
    max wasm code_id grows (mirrors lib.js storeWasm).
  • instantiate_wasm — submit wasm instantiate -b sync, return new
    contract address once it appears under code_id via list-contract-
    by-code set-diff (mirrors lib.js instantiateWasm).
  • bank_send_and_wait — submit bank send -b sync, wait for sender's
    account sequence to advance. Denom-agnostic causal commit signal
    used between consecutive sends from the same key (mirrors lib.js
    getAccountSequence-based wait).
  • _wait_until — generic check-loop with 30s default timeout, for
    one-off side-effect waits not covered by typed helpers.

Migrated scripts:

  • deploy_wasm_contracts.sh: 30 × (store + instantiate). Helpers
    capture the new code_id / contract address inside the wait
    closure so a concurrent store/instantiate from another test can't
    substitute its value.
  • create_tokenfactory_denoms.sh: 30 × create-denom. The denom is
    deterministic (factory//); the inline
    create_denom_and_wait polls denom-authority-metadata for non-empty
    admin (matches the lib.js createTokenFactoryTokenAndMint pattern).
  • deploy_timelocked_token_contract.sh: 7 × bank send (admin funding
    7 admin/op/dest accounts sequentially) + 2 × store + 2 ×
    instantiate. bank_send_and_wait between consecutive funds prevents
    "account sequence mismatch" rejections when -b sync returns before
    the prior tx commits.
  • deploy_dex_contract.sh: store + instantiate + dex register-contract
    • 4 × dex register-pairs. The dex txs have no convenient
      single-query side effect; inline dex_tx_and_wait waits for the
      sender's sequence to advance.

Wait-timeout cases preserve the original error contract: scripts
print to stderr and exit 1, same as before.

Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com

Bash twin of #3406's lib.js work. Submit cosmos txs with -b sync and
poll the actual on-chain side effect rather than relying on -b block —
under Autobahn the KV indexer that BroadcastTxCommit polls isn't
populated, so -b block can hang to its 60s timeout.

New shared helper integration_test/contracts/_tx_helpers.sh:

  - store_wasm — submit `wasm store` -b sync, return new code_id once
    max wasm code_id grows (mirrors lib.js storeWasm).
  - instantiate_wasm — submit `wasm instantiate` -b sync, return new
    contract address once it appears under code_id via list-contract-
    by-code set-diff (mirrors lib.js instantiateWasm).
  - bank_send_and_wait — submit `bank send` -b sync, wait for sender's
    account sequence to advance. Denom-agnostic causal commit signal
    used between consecutive sends from the same key (mirrors lib.js
    getAccountSequence-based wait).
  - _wait_until — generic check-loop with 30s default timeout, for
    one-off side-effect waits not covered by typed helpers.

Migrated scripts:

  - deploy_wasm_contracts.sh: 30 × (store + instantiate). Helpers
    capture the new code_id / contract address inside the wait
    closure so a concurrent store/instantiate from another test can't
    substitute its value.
  - create_tokenfactory_denoms.sh: 30 × create-denom. The denom is
    deterministic (factory/<creator>/<subdenom>); the inline
    create_denom_and_wait polls denom-authority-metadata for non-empty
    admin (matches the lib.js createTokenFactoryTokenAndMint pattern).
  - deploy_timelocked_token_contract.sh: 7 × bank send (admin funding
    7 admin/op/dest accounts sequentially) + 2 × store + 2 ×
    instantiate. bank_send_and_wait between consecutive funds prevents
    "account sequence mismatch" rejections when -b sync returns before
    the prior tx commits.
  - deploy_dex_contract.sh: store + instantiate + dex register-contract
    + 4 × dex register-pairs. The dex txs have no convenient
    single-query side effect; inline dex_tx_and_wait waits for the
    sender's sequence to advance.

Wait-timeout cases preserve the original error contract: scripts
print to stderr and exit 1, same as before.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedMay 20, 2026, 4:14 AM

@github-actions
Copy link
Copy Markdown

The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedMay 20, 2026, 4:14 AM

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant