Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
de25d11
Draft companion ERC: non-ABI encoded fields for ERC-7730
forshtat Jul 26, 2026
440a6ab
Add 'bitfield' and 'initCode' formats
forshtat Jul 27, 2026
afb9d31
Add missing assets for bitfield/initCode/$fallback additions
forshtat Jul 27, 2026
7bb4e36
WIP manual example rewrite
forshtat Jul 30, 2026
c806235
Fix latest format
forshtat Jul 30, 2026
80fe8bf
add $index
forshtat Jul 30, 2026
6f62a31
WIP: Adding BalancerRelayer as example
forshtat Jul 30, 2026
cd29f16
Add pointer layout node for offset-indirected buffers (Safe execTrans…
forshtat Jul 30, 2026
597e002
Remove initCode/$fallback/pointer, migrate examples, add full compani…
forshtat Jul 31, 2026
cd9ee24
Improve examples
forshtat Jul 31, 2026
d78fcc2
Add "test cases"
forshtat Aug 3, 2026
624bea3
Add ERC-7579
forshtat Aug 3, 2026
3466312
Fix all examples to match ERC-0000
forshtat Aug 3, 2026
2b861c9
Elaborate some rules
forshtat Aug 3, 2026
03cdc48
Explain other examples & drop EAS
forshtat Aug 3, 2026
f78597b
Drop old erc draft file
forshtat Aug 3, 2026
3e65912
Delete assets/erc-non-abi-dispatch/feature-stateref-based-dispatch.md
forshtat Aug 3, 2026
c295703
Drop 'tillEnd' for sequnece, add 'countFrom' option, add AI suggested…
forshtat Aug 3, 2026
791b87b
Fix CI errors: rename to erc-0000, update links, fill empty sections
forshtat Aug 3, 2026
1e78f25
Elaborate new examples
forshtat Aug 4, 2026
b00aac6
Update section headers in erc-0000.md
forshtat Aug 4, 2026
7ec37e1
Rename `layout` to `customEncoding`; expand JSON examples
kuzdogan Aug 4, 2026
9eb2316
Merge pull request #4 from kuzdogan/rename-layout-to-custom-encoding
forshtat Aug 4, 2026
e0a58f1
Add $fallback keyword and top-level switch selector
forshtat Aug 7, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
637 changes: 637 additions & 0 deletions ERCS/erc-0000.md

Large diffs are not rendered by default.

47 changes: 47 additions & 0 deletions assets/erc-0000/TieredExecutor.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
// SPDX-License-Identifier: CC0-1.0
pragma solidity ^0.8.20;

// Illustrative contract written for the non-ABI-dispatch companion ERC.
// It is NOT deployed anywhere; it exists to demonstrate a real pattern
// (a small trusted relayer that accepts one numeric operation tag and
// re-dispatches the call to one of several unrelated target interfaces,
// each with its own function signature and its own argument order) using
// concrete, compilable Solidity rather than pseudocode.
//
// See example-tiered-executor.json in this same folder for the ERC-7730
// descriptor that clear-signs calls to `executeOperation`, and
// example-reward-vault.json / example-legacy-token.json for the
// descriptors of the two target interfaces it dispatches into.

interface IRewardVault {
function grantReward(address to, uint256 amount) external;
}

interface ILegacyToken {
function creditAccount(uint256 amount, address to) external;
}

contract TieredExecutor {
enum Operation {
None, // 0 - unused, always rejected
GrantReward, // 1 - IRewardVault.grantReward(address,uint256)
CreditLegacy // 2 - ILegacyToken.creditAccount(uint256,address)
}

event Executed(Operation indexed op, address indexed target, address indexed account, uint256 amount);

/// @param target The contract to route the call to.
/// @param op Which trusted operation to perform.
/// @param account The account argument for that operation.
/// @param amount The amount argument for that operation.
function executeOperation(address target, Operation op, address account, uint256 amount) external {
if (op == Operation.GrantReward) {
IRewardVault(target).grantReward(account, amount);
} else if (op == Operation.CreditLegacy) {
ILegacyToken(target).creditAccount(amount, account);
} else {
revert("TieredExecutor: unsupported operation");
}
emit Executed(op, target, account, amount);
}
}
1,978 changes: 1,978 additions & 0 deletions assets/erc-0000/erc7730-non-abi-dispatch.schema.json

Large diffs are not rendered by default.

463 changes: 463 additions & 0 deletions assets/erc-0000/example-balancer-relayer-library.json

Large diffs are not rendered by default.

40 changes: 40 additions & 0 deletions assets/erc-0000/example-balancer-relayer-multicall.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"$schema": "https://eips.ethereum.org/assets/eip-7730/erc7730-non-abi-dispatch.schema.json",
"context": {
"$id": "Balancer Relayer Multicall",
"contract": {
"deployments": [
{
"chainId": 1,
"address": "0x35Cea9e57A393ac66Aaa7E25C391D52C74B5648f"
}
]
}
},
"metadata": {
"owner": "Balancer",
"contractName": "BalancerRelayer",
"info": {
"url": "https://docs-v2.balancer.fi/concepts/advanced/relayers.html"
}
},
"display": {
"formats": {
"multicall(bytes[] data)": {
"$id": "Balancer Relayer Multicall",
"intent": "Execute batch",
"fields": [
{
"path": "data[]",
"label": "Batched relayer action",
"format": "calldata",
"params": {
"callee": "0xeA66501dF1A00261E3bB79D1E90444fc6A186B62",
"operation": "DELEGATECALL"
}
}
]
}
}
}
}
129 changes: 129 additions & 0 deletions assets/erc-0000/example-compound-bulker.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
{
"$schema": "https://eips.ethereum.org/assets/eip-7730/erc7730-non-abi-dispatch.schema.json",
"context": {
"$id": "Compound III Bulker",
"contract": {
"deployments": [
{
"chainId": 1,
"address": "0xa397a8C2086C554B531c02E29f3291c9704B00c7"
}
]
}
},
"metadata": {
"owner": "Compound",
"contractName": "Bulker",
"info": {
"url": "https://github.com/compound-finance/comet"
}
},
"display": {
"formats": {
"invoke(bytes32[] actions,bytes[] data)": {
"$id": "Compound III Bulk Actions",
"intent": "Execute batch",
"fields": [
{
"path": "data[]",
"label": "Batched action",
"switch": {
"expression": {
"path": "actions[$index]"
},
"cases": {
"0x414354494f4e5f535550504c595f415353455400000000000000000000000000": {
"(address comet,address to,address asset,uint256 amount)": {
"intent": "Supply collateral",
"fields": [
{ "path": "to", "label": "On behalf of", "format": "addressName" },
{ "path": "asset", "label": "Asset", "format": "addressName" },
{ "path": "amount", "label": "Amount", "format": "tokenAmount", "params": { "tokenPath": "asset" } },
{
"interaction": {
"to": "comet",
"signature": "supplyFrom(address,address,address,uint256)",
"args": [
{ "path": "@.from" },
{ "path": "to" },
{ "path": "asset" },
{ "path": "amount" }
]
}
}
]
}
},
"0x414354494f4e5f5452414e534645525f41535345540000000000000000000000": {
"(address comet,address to,address asset,uint256 amount)": {
"intent": "Transfer within Compound",
"fields": [
{ "path": "to", "label": "Recipient", "format": "addressName" },
{ "path": "asset", "label": "Asset", "format": "addressName" },
{ "path": "amount", "label": "Amount", "format": "tokenAmount", "params": { "tokenPath": "asset" } },
{
"interaction": {
"to": "comet",
"signature": "transferAssetFrom(address,address,address,uint256)",
"args": [
{ "path": "@.from" },
{ "path": "to" },
{ "path": "asset" },
{ "path": "amount" }
]
}
}
]
}
},
"0x414354494f4e5f57495448445241575f41535345540000000000000000000000": {
"(address comet,address to,address asset,uint256 amount)": {
"intent": "Withdraw or borrow",
"fields": [
{ "path": "to", "label": "Recipient", "format": "addressName" },
{ "path": "asset", "label": "Asset", "format": "addressName" },
{ "path": "amount", "label": "Amount", "format": "tokenAmount", "params": { "tokenPath": "asset" } },
{
"interaction": {
"to": "comet",
"signature": "withdrawFrom(address,address,address,uint256)",
"args": [
{ "path": "@.from" },
{ "path": "to" },
{ "path": "asset" },
{ "path": "amount" }
]
}
}
]
}
},
"0x414354494f4e5f434c41494d5f52455741524400000000000000000000000000": {
"(address comet,address rewards,address src,bool shouldAccrue)": {
"intent": "Claim rewards",
"fields": [
{ "path": "src", "label": "Claim for", "format": "addressName" },
{ "path": "shouldAccrue", "label": "Accrue first", "format": "raw" },
{
"interaction": {
"to": "rewards",
"signature": "claim(address,address,bool)",
"args": [
{ "path": "comet" },
{ "path": "src" },
{ "path": "shouldAccrue" }
]
}
}
]
}
},
"$default": "reject"
}
}
}
]
}
}
}
}
164 changes: 164 additions & 0 deletions assets/erc-0000/example-erc7579-execute.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
{
"$schema": "https://eips.ethereum.org/assets/eip-7730/erc7730-non-abi-dispatch.schema.json",
"context": {
"$id": "ERC-7579 Account Execute",
"contract": {
"deployments": [
{
"chainId": 8453,
"address": "0x510a1274373c8120DE634dB372723edcBE899994"
},
{
"chainId": 8453,
"address": "0xE8cCb14989F0dB3f51A71876195D5867F7fa943d"
}
]
}
},
"metadata": {
"owner": "Biconomy",
"contractName": "Nexus",
"info": {
"url": "https://github.com/bcnmy/nexus"
}
},
"display": {
"formats": {
"execute(bytes32 mode,bytes executionCalldata)": {
"$id": "ERC-7579 Execute",
"intent": "Execute",
"fields": [
{
"path": "mode",
"label": "Mode",
"customEncoding": {
"type": "object",
"fields": [
{
"name": "callType",
"schema": {
"type": "uint",
"bytes": 1
}
},
{
"name": "execType",
"schema": {
"type": "uint",
"bytes": 1
}
},
{
"name": "unused",
"schema": {
"type": "bytes",
"length": 4
}
},
{
"name": "modeSelector",
"schema": {
"type": "bytes",
"length": 4
}
},
{
"name": "modePayload",
"schema": {
"type": "bytes",
"length": 22
}
}
]
}
},
{
"path": "executionCalldata",
"label": "Execution",
"switch": {
"expression": {
"path": "mode.callType"
},
"cases": {
"0x00": {
"customEncoding": {
"type": "object",
"fields": [
{
"name": "target",
"schema": {
"type": "address"
}
},
{
"name": "value",
"schema": {
"type": "uint",
"bytes": 32
}
},
{
"name": "callData",
"schema": {
"type": "bytes"
},
"label": "Execution",
"format": "calldata",
"params": {
"calleePath": "target",
"amountPath": "value"
}
}
]
}
},
"0x01": {
"(address target,uint256 value,bytes callData)[]": {
"intent": "Execute batch",
"fields": [
{
"path": ".[].callData",
"label": "Batched call data",
"format": "calldata",
"params": {
"calleePath": ".[].target",
"amountPath": ".[].value"
}
}
]
}
},
"0xff": {
"customEncoding": {
"type": "object",
"fields": [
{
"name": "target",
"schema": {
"type": "address"
}
},
{
"name": "callData",
"schema": {
"type": "bytes"
},
"label": "Execution",
"format": "calldata",
"params": {
"calleePath": "target",
"operation": "DELEGATECALL"
}
}
]
}
},
"$default": "reject"
}
}
}
]
}
}
}
}
Loading
Loading