Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: enhance fallback handler documentation in Safe.sol and IFallbackManager.sol #879

Merged
merged 4 commits into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion contracts/Safe.sol
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import {Enum} from "./libraries/Enum.sol";
* 1. Transaction Guard: managed in `GuardManager` for transactions executed with `execTransaction`.
* 2. Module Guard: managed in `ModuleManager` for transactions executed with `execTransactionFromModule`
* - Modules: Modules are contracts that can be used to extend the write functionality of a Safe. Managed in `ModuleManager`.
* - Fallback: Fallback handler is a contract that can provide additional read-only functionality for Safe. Managed in `FallbackManager`.
* - Fallback: Fallback handler is a contract that can provide additional functionality for Safe. Managed in `FallbackManager`. Please read the security risks in the `IFallbackManager` interface.
* Note: This version of the implementation contract doesn't emit events for the sake of gas efficiency and therefore requires a tracing node for indexing/
* For the events-based implementation see `SafeL2.sol`.
* @author Stefan George - @Georgi87
Expand Down
9 changes: 6 additions & 3 deletions contracts/interfaces/IFallbackManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@ interface IFallbackManager {

/**
* @notice Set Fallback Handler to `handler` for the Safe.
* @dev Only fallback calls without value and with data will be forwarded.
* This can only be done via a Safe transaction.
* Cannot be set to the Safe itself.
* @dev 1. Only fallback calls without value and with data will be forwarded.
* 2. Changing the fallback handler can only be done via a Safe transaction.
* 3. Cannot be set to the Safe itself.
* 4. IMPORTANT! SECURITY RISK! The fallback handler can be set to any address and all the calls will be forwarded to it,
* bypassing all the Safe's access control mechanisms. When setting the fallback handler, make sure to check the address
* is a trusted contract and if it supports state changes, it implements the necessary checks.
* @param handler contract to handle fallback calls.
*/
function setFallbackHandler(address handler) external;
Expand Down
Loading