Skip to content

Commit

Permalink
Remove ERC-165 mention and clarify address replacement
Browse files Browse the repository at this point in the history
  • Loading branch information
ernestognw committed Dec 29, 2024
1 parent 8658d1d commit 92a21d2
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions ERCS/erc-7821.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ With the advent of [EIP-7702](./eip-7702), it is possible for Externally Owned A

We anticipate that there will be multiple EIP-7702 delegations from multiple major vendors. To enable frontends to detect and prepare a vendor-agnostic batched transaction, we will need a standardized interface for batched executions.

In the absence of such a standard, vendors may choose to create their own proprietary implementations, causing fragmentation. Imagine visiting your favorite decentralized exchange and realizing that their frontend is still incompatible with your EOA delegation. The infamous approve and swap workflow cannot be fixed just by EIP-7702 alone.
In the absence of such a standard, vendors may choose to create their own proprietary implementations, causing fragmentation. Imagine visiting your favorite decentralized exchange and realizing that their frontend is still incompatible with your EOA delegation. The infamous approve and swap workflow cannot be fixed just by EIP-7702 alone.

We need a standardized batch executor interface.

Expand Down Expand Up @@ -83,7 +83,7 @@ interface IERC7821 {

To support the approve + swap workflow on EOAs with delegations, frontends SHOULD:

1. Query `supportsExecutionMode(bytes32(0x0100000000000000000000000000000000000000000000000000000000000000))`, ensuring that it returns true.
1. Query `supportsExecutionMode(bytes32(0x0100000000000000000000000000000000000000000000000000000000000000))`, ensuring that it returns true.

2. Perform `execute(bytes32(0x0100000000000000000000000000000000000000000000000000000000000000), abi.encode(calls))`.

Expand All @@ -97,11 +97,11 @@ We have opted to use the `execute` and `supportsExecutionMode` functions in [ERC

While radical minimalism is the goal, some compromises have to be made in the pursuit for better adoption.

For minimalism, this standard does not require implementing [ERC-165](./eip-165.md) and the `executeFromExecutor` function in [ERC-7579](./eip-7579.md).
For minimalism, this standard does not require implementing the `executeFromExecutor` function in [ERC-7579](./eip-7579.md).

### Optional encoding of `opData` in `executionData`

The `opData` bytes parameter can be optionally included in `executionData` by either doing `abi.encode(calls)` or `abi.encode(calls, opData)`.
The `opData` bytes parameter can be optionally included in `executionData` by either doing `abi.encode(calls)` or `abi.encode(calls, opData)`.

### Replacing `address(0)` with `address(this)`

Expand Down Expand Up @@ -145,6 +145,8 @@ abstract contract ERC7821 {
/// The `results` are the returned data from each call.
/// Reverts and bubbles up error if any call fails.
///
/// MAY replace the `Call.target` with `address(this)` if `address(0)`.
///
/// `executionData` encoding:
/// - If `opData` is empty, `executionData` is simply `abi.encode(calls)`.
/// - Else, `executionData` is `abi.encode(calls, opData)`.
Expand Down

0 comments on commit 92a21d2

Please sign in to comment.