Skip to content
Merged
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
15 changes: 7 additions & 8 deletions src/interfaces/ITrailsRouter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ interface ITrailsRouter is IDelegatedExtension {
/// @return returnResults The result of the execution.
function execute(bytes calldata data) external payable returns (IMulticall3.Result[] memory returnResults);

/// @notice Pull ERC20 from msg.sender, then delegatecall into Multicall3.
/// @dev Requires prior approval to this router.
/// @notice Pull tokens from msg.sender, then delegatecall into Multicall3.
/// @dev For ERC20: pulls entire balance and requires prior approval. For ETH: uses msg.value.
/// @param token The ERC20 token to pull, or address(0) for ETH.
/// @param data The calldata for Multicall3.
/// @return returnResults The result of the execution.
Expand All @@ -52,8 +52,8 @@ interface ITrailsRouter is IDelegatedExtension {
payable
returns (IMulticall3.Result[] memory returnResults);

/// @notice Pull specific amount of ERC20 from msg.sender, then delegatecall into Multicall3.
/// @dev Requires prior approval to this router.
/// @notice Pull specific amount of tokens from msg.sender, then delegatecall into Multicall3.
/// @dev For ERC20: requires prior approval. For ETH: requires msg.value.
/// @param token The ERC20 token to pull, or address(0) for ETH.
/// @param amount The amount to pull.
/// @param data The calldata for Multicall3.
Expand All @@ -68,7 +68,7 @@ interface ITrailsRouter is IDelegatedExtension {
// ---------------------------------------------------------------------

/// @notice Sweeps tokens from msg.sender and calls target with modified calldata.
/// @dev For regular calls (not delegatecall). Transfers tokens from msg.sender to this contract first.
/// @dev Transfers tokens from msg.sender to this contract first.
/// @param token The ERC-20 token to sweep, or address(0) for ETH.
/// @param target The address to call with modified calldata.
/// @param callData The original calldata (must include a 32-byte placeholder).
Expand All @@ -83,7 +83,6 @@ interface ITrailsRouter is IDelegatedExtension {
) external payable;

/// @notice Injects balance and calls target (for delegatecall context).
/// @dev For delegatecalls from Sequence wallets. Reads balance from address(this).
/// @param token The ERC-20 token to sweep, or address(0) for ETH.
/// @param target The address to call with modified calldata.
/// @param callData The original calldata (must include a 32-byte placeholder).
Expand All @@ -108,8 +107,8 @@ interface ITrailsRouter is IDelegatedExtension {
// Sweeper
// ---------------------------------------------------------------------

/// @notice Approves the sweeper if ERC20, then sweeps the entire balance to recipient.
/// @dev For delegatecall context. Approval is set for `SELF` on the wallet.
/// @notice Sweeps the entire balance to recipient.
/// @dev For delegatecall context. Transfers all tokens/ETH held by the wallet to the recipient.
/// @param token The address of the token to sweep. Use address(0) for the native token.
/// @param recipient The address to send the swept tokens to.
function sweep(address token, address recipient) external payable;
Expand Down