Add ERC: Custom Encoding Layout for ERC-7730 - #1925
Conversation
Adds `layout` and `dispatch` keys so ERC-7730 descriptors can describe fields whose bytes are not plain Solidity ABI - packed structs, repeated records, and tag-selected payloads - as seen in Safe MultiSend, Uniswap's Universal Router, ERC-7579 execute, Circle CCTP messages, EAS attestations, and ERC-7683 orders. Includes a `call` construct for nested/wrapped calldata (both byte-embedded and direct signature+positional-args forms) and a top-level dispatch form for calls that only exist to be redirected. Worked examples for all six real cases are full, standalone ERC-7730 descriptor files under assets/erc-non-abi-dispatch/, verified against real mined transactions rather than inlined as snippets. A seventh, made-up TieredExecutor example demonstrates the direct/positional call form, explicitly flagged in Rationale as not grounded in an observed live transaction. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Adds the deterministic-deployment-proxy worked example (initCode/$fallback, verified EIP-1167 template plus a placeholder Permit2 template) and the parked stateRef-dispatch feature note, both referenced by the previous commit's spec text but left out of it.
…action) Safe's execTransaction signatures field repurposes a fixed-record field as a byte offset into a shared tail region for EIP-1271 contract signatures - the one case in this ERC's survey needing genuine pointer-style indirection within a custom-packed buffer, which object/ sequence/lengthFrom deliberately can't express. Adds the pointer layout node (bytes width, required containerPath, destination), extends the byte-width invariant and Security Considerations to cover it (including the real recursion case: a Safe signing for another Safe), and adds a worked example verified against a real nested-Safe transaction for the EOA/APPROVED_HASH paths, with the CONTRACT_SIGNATURE/pointer branch marked source-verified-only pending a live example. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…on schema initCode, $fallback, and pointer are reverted: real, live code paths are not the same as evidenced usage, and none of the three cleared that bar despite genuine search effort (see prior discussion). Their example files (deterministic-deployment-proxy, safe-exectransaction) are removed, and the spec text, Rationale, Security Considerations, and Test Cases are updated accordingly. Balancer's joinPool/exitPool Test Case entry is added, since those files already existed but had no prose write-up. All example descriptors are migrated to the ERC's current vocabulary (type/object/switch/expression/format:"calldata", $default inside cases) and validate cleanly against a new, full companion JSON Schema (erc7730-non-abi-dispatch.schema.json) built as a complete schema rather than a thin extension - composing new properties onto schemas closed with additionalProperties:false, or extending a schema reached only via $ref, does not validate the way a thin allOf+$ref extension would suggest (verified empirically against real tooling, not just by reading the spec). Fixed several real bugs surfaced only by validating against actual tooling: format:"array" was never a real ERC-7730 format (the Universal Router example now uses per-element switch via $index correlation instead); uint/bitfield byte widths were wrongly restricted to powers of two in the prose, contradicting the spec's own bitfield example; the switch case-value "format" branch didn't allow params. All $comment annotations are stripped from the example files. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
File
|
| @@ -0,0 +1,436 @@ | |||
| --- | |||
| eip: 0000 | |||
There was a problem hiding this comment.
| eip: 0000 | |
| eip: 8362 |
Assigning next sequential EIP/ERC/RIP number.
Numbers are assigned by editors & associates.
Please also update the filename.
| title: Custom Encoding Layout for ERC-7730 | ||
| description: Format to describes any non-standard byte encodings for ERC-7730 | ||
| author: Alex Forshtat (@forshtat) | ||
| discussions-to: https://github.com/ethereum/ERCs/pull/1925 |
There was a problem hiding this comment.
Please create a discussions topic on Eth Magicians.
Two mechanical changes, no semantic ones.
1. Rename the `layout` key to `customEncoding` everywhere it refers to the
mechanism: the Specification heading and prose, all JSON examples in the
ERC, the companion JSON Schema (including the `$layout` definition group
and every `#/$layout/...` reference), and the example descriptors under
assets/erc-0000/.
Two occurrences are deliberately left alone: the `title:` frontmatter, and
"an ABI-encoded `array` data layout" under `sequence`, which uses "layout"
as an ordinary English word rather than as the key name.
2. Reformat every JSON block in the ERC, replacing the mix of single-line and
multi-line styles with one consistent rule: any object or array that
contains another object or array is expanded one level per line, while a
flat one holding only scalars stays on a single line if it fits in 100
columns. So nesting is always visible, but short leaf entries such as
{ "path": "to", "label": "To" } are not spread over four lines.
Verified: all 47 `$ref`s in the schema still resolve, all 12 example
descriptors validate against the renamed schema (the pre-rename `layout` key
is rejected by it, so the check is not vacuous), and every JSON block in the
ERC round-trips through a parser unchanged apart from whitespace.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Just opened a PR for this https://github.com/forshtat/ERCs/pull/4/changes This, only about the naming of the "layout" field and spec styling. |
Rename `layout` to `customEncoding`; indent JSON examples
|
@kuzdogan merged, thank you! |
|
The commit e0a58f1 (as a parent of 4b555c2) contains errors. |
When opening a pull request to submit a new EIP, please use the suggested template: https://github.com/ethereum/EIPs/blob/master/eip-template.md
We have a GitHub bot that automatically merges some PRs. It will merge yours immediately if certain criteria are met: