Skip to content

Support child array paths in interpolated intents - #54

Merged
manuelwedler merged 7 commits into
sourcifyeth:mainfrom
shukudaidayo:fix-child-array-interpolated-intent
Jul 29, 2026
Merged

Support child array paths in interpolated intents#54
manuelwedler merged 7 commits into
sourcifyeth:mainfrom
shukudaidayo:fix-child-array-interpolated-intent

Conversation

@shukudaidayo

Copy link
Copy Markdown
Contributor

Summary

  • Store joined rendered values for child array paths such as items.[].amount
  • Preserve existing interpolation behavior for top-level array paths such as items.[]
  • Add regression coverage for child-array interpolatedIntent placeholders with item-scoped token formatting

The interpolation code can stay unchanged because it already resolves placeholders from the renderedValues map.

Context

This was surfaced while testing the Ocarina ERC-7730 registry submission: ethereum/clear-signing-erc7730-registry#2598.

That descriptor uses an EIP-712 interpolatedIntent like:

"interpolatedIntent": "Authorize {tips.[].amount} tip"

The referenced field is formatted as tokenAmount using an item-scoped tokenPath such as tips.[].token.

Details

This updates array-path metadata tracking so rendered values are joined and stored under the full wildcard path:

  • items.[]
  • items.[].amount
  • tips.[].amount

Top-level array fields still also store the joined value under the base path for compatibility.

Validation

  • npm test
  • npm run check:types
  • npm run check:prettier
  • npm run check:eslint

@manuelwedler
manuelwedler merged commit 5332b18 into sourcifyeth:main Jul 29, 2026
2 checks passed
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