From 8c03d7dd3b9b602253eeb0170274dee3736ddb57 Mon Sep 17 00:00:00 2001 From: livingrockrises <90545960+livingrockrises@users.noreply.github.com> Date: Sun, 11 Aug 2024 00:41:55 +0400 Subject: [PATCH 1/5] updates regarding falback --- ERCS/erc-7579.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ERCS/erc-7579.md b/ERCS/erc-7579.md index 16ec1f804e..c333796a33 100644 --- a/ERCS/erc-7579.md +++ b/ERCS/erc-7579.md @@ -218,9 +218,8 @@ Smart accounts MAY implement a fallback function that forwards the call to a fal If the smart account has a fallback handler installed, it: -- MUST implement authorization control -- MUST use `call` to invoke the fallback handler -- MUST utilize [ERC-2771](./eip-2771.md) to add the original `msg.sender` to the `calldata` sent to the fallback handler +- MUST use `call` or `staticcall` to invoke the fallback handler +- MUST utilize [ERC-2771](./eip-2771.md) to add the original `msg.sender` to the `calldata` sent to the fallback handler. Authorization control MAY be implemented by the fallback handler - MUST route to fallback handlers based on the function selector of the calldata #### ERC-165 From cd1b0fe4c488d7b20847c7443a759d1a4548bc04 Mon Sep 17 00:00:00 2001 From: livingrockrises <90545960+livingrockrises@users.noreply.github.com> Date: Tue, 13 Aug 2024 14:06:23 +0400 Subject: [PATCH 2/5] respind to PR comments --- ERCS/erc-7579.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ERCS/erc-7579.md b/ERCS/erc-7579.md index c333796a33..20abdffae0 100644 --- a/ERCS/erc-7579.md +++ b/ERCS/erc-7579.md @@ -219,8 +219,9 @@ Smart accounts MAY implement a fallback function that forwards the call to a fal If the smart account has a fallback handler installed, it: - MUST use `call` or `staticcall` to invoke the fallback handler -- MUST utilize [ERC-2771](./eip-2771.md) to add the original `msg.sender` to the `calldata` sent to the fallback handler. Authorization control MAY be implemented by the fallback handler +- MUST utilize [ERC-2771](./eip-2771.md) to add the original `msg.sender` to the `calldata` sent to the fallback handler. - MUST route to fallback handlers based on the function selector of the calldata +- MAY implement authorization control. This SHOULD be done via hooks #### ERC-165 @@ -304,6 +305,8 @@ Executors MUST implement the `IModule` interface and have module type id: `2`. Fallback handlers MUST implement the `IModule` interface and have module type id: `3`. +Fallback handlers MAY implement Authorization control + Fallback handlers that implement authorization control, MUST NOT rely on `msg.sender` for authorization control but MUST use ERC-2771 `_msgSender()` instead. #### Hooks From 96b9f223a861680e3496b9f1e9645f8ffb015caf Mon Sep 17 00:00:00 2001 From: livingrockrises <90545960+livingrockrises@users.noreply.github.com> Date: Tue, 13 Aug 2024 14:38:59 +0400 Subject: [PATCH 3/5] Update ERCS/erc-7579.md Co-authored-by: Konrad --- ERCS/erc-7579.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ERCS/erc-7579.md b/ERCS/erc-7579.md index 20abdffae0..21bc2a9169 100644 --- a/ERCS/erc-7579.md +++ b/ERCS/erc-7579.md @@ -221,7 +221,7 @@ If the smart account has a fallback handler installed, it: - MUST use `call` or `staticcall` to invoke the fallback handler - MUST utilize [ERC-2771](./eip-2771.md) to add the original `msg.sender` to the `calldata` sent to the fallback handler. - MUST route to fallback handlers based on the function selector of the calldata -- MAY implement authorization control. This SHOULD be done via hooks +- MAY implement authorization control, which SHOULD be done via hooks #### ERC-165 From f8f618a874df261ecf0e53cc8041d624366bc3e5 Mon Sep 17 00:00:00 2001 From: livingrockrises <90545960+livingrockrises@users.noreply.github.com> Date: Tue, 13 Aug 2024 14:39:13 +0400 Subject: [PATCH 4/5] Update ERCS/erc-7579.md Co-authored-by: Konrad --- ERCS/erc-7579.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ERCS/erc-7579.md b/ERCS/erc-7579.md index 21bc2a9169..5f767a78f9 100644 --- a/ERCS/erc-7579.md +++ b/ERCS/erc-7579.md @@ -305,9 +305,7 @@ Executors MUST implement the `IModule` interface and have module type id: `2`. Fallback handlers MUST implement the `IModule` interface and have module type id: `3`. -Fallback handlers MAY implement Authorization control - -Fallback handlers that implement authorization control, MUST NOT rely on `msg.sender` for authorization control but MUST use ERC-2771 `_msgSender()` instead. +Fallback handlers MAY implement authorization control. Fallback handlers that do implement authorization control, MUST NOT rely on `msg.sender` for authorization control but MUST use ERC-2771 `_msgSender()` instead. #### Hooks From 9b79f3e85f2886f06ba96eae56bbb805fead928e Mon Sep 17 00:00:00 2001 From: livingrockrises <90545960+livingrockrises@users.noreply.github.com> Date: Tue, 13 Aug 2024 14:39:23 +0400 Subject: [PATCH 5/5] Update ERCS/erc-7579.md Co-authored-by: Konrad --- ERCS/erc-7579.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ERCS/erc-7579.md b/ERCS/erc-7579.md index 5f767a78f9..778b8f1592 100644 --- a/ERCS/erc-7579.md +++ b/ERCS/erc-7579.md @@ -219,7 +219,7 @@ Smart accounts MAY implement a fallback function that forwards the call to a fal If the smart account has a fallback handler installed, it: - MUST use `call` or `staticcall` to invoke the fallback handler -- MUST utilize [ERC-2771](./eip-2771.md) to add the original `msg.sender` to the `calldata` sent to the fallback handler. +- MUST utilize [ERC-2771](./eip-2771.md) to add the original `msg.sender` to the `calldata` sent to the fallback handler - MUST route to fallback handlers based on the function selector of the calldata - MAY implement authorization control, which SHOULD be done via hooks