Skip to content

fix: make cast --json parsing compatible with foundry >= 1.8 - #266

Merged
leovct merged 1 commit into
mainfrom
fix/cast-1.8-json-envelope
Aug 28, 2026
Merged

fix: make cast --json parsing compatible with foundry >= 1.8#266
leovct merged 1 commit into
mainfrom
fix/cast-1.8-json-envelope

Conversation

@leovct

@leovct leovct commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

Since foundry 1.8.0, many cast --json commands wrap their output in a versioned envelope {schema_version, success, data, errors, warnings} (e.g. cast wallet new, cast decode-event). This broke _setup_vars (jq: error: Cannot index object with number) on CI runners that install foundry >= 1.8, e.g. 0xPolygon/kurtosis-cdk#939 (run-with-op-succinct job, the only kurtosis-cdk job running bats on the host).

The (.data? // .) jq pattern keeps compatibility with both the old bare output and the new envelope. Fixed spots:

  • core/helpers/common.bash: _setup_vars foo wallet
  • core/helpers/agglayer-cdk-common-setup.bash: _generate_and_fund_wallet
  • core/helpers/scripts/bridging.bash: cast receipt + cast decode-event fallback path

Same class of issue as 0xPolygon/pos-e2e#88.

🤖 Generated with Claude Code

Since foundry 1.8.0, many cast --json commands wrap their output in a
versioned envelope {schema_version, success, data, errors, warnings}
(e.g. cast wallet new, cast decode-event). The (.data? // .) jq pattern
keeps working with both the old bare output and the new envelope.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
leovct added a commit to 0xPolygon/kurtosis-cdk that referenced this pull request Aug 28, 2026
cast >= 1.8 wraps --json output in a versioned envelope {data,...},
which broke _setup_vars in agglayer/e2e (jq: Cannot index object with
number) in the op-succinct job, the only one running bats on the host
foundry. Pin the previous e2e commit + the compat fix (agglayer/e2e#266
backport); re-pin to main once merged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@leovct
leovct merged commit 3a80868 into main Aug 28, 2026
7 checks passed
leovct added a commit to 0xPolygon/kurtosis-cdk that referenced this pull request Aug 28, 2026
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Ekleog-Polygon added a commit to agglayer/agglayer that referenced this pull request Aug 31, 2026
Dependabot only bumps the reusable-workflow ref on the `uses:` line, but
the e2e test sources are checked out from the separate `agglayer-e2e-ref`
input. Bump it to the same commit so the fix from agglayer/e2e#266
actually applies, and refresh the pin date comments (3a80868 is from
2026/08/28).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

1 participant