Skip to content
Verified contractExactUNLICENSED

DelegatedWalletClaimBatcher

Address0x4eef24c93643490fe20cc45e89fceae2dea1b7cc
Balance

0 ETH

 

Transactions

1

 

Compiler

solc 0.8.28

 

Same code

Only this contract

 

Details

Compiler
solc 0.8.28+commit.7893614a
Language
solidity
Optimization
No
License
UNLICENSED
Match
Exactcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
24,490,436
Creation transaction
0x528ba92bd9…2e160f7931

claimBatcher.sol

// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.28;

interface IEIP7702Wallet {
    function call(address _to, uint256 _value, bytes memory _data) external payable;
}

contract DelegatedWalletClaimBatcher {
    
    address public immutable owner;
    
    constructor() {
        owner = msg.sender;
    }

    modifier onlyOwner() {
        require(msg.sender == owner, "Not owner");
        _;
    }

    /**
     * @notice Execute a single call through the delegated EIP-7702 wallet
     * @param delegatedEOA The EOA address that has been EIP-7702 delegated
     * @param target The target contract to call
     * @param value ETH value to send with the call
     * @param data Calldata to send
     */
    function executeViaWallet(
        address delegatedEOA,
        address target,
        uint256 value,
        bytes calldata data
    ) external payable onlyOwner {
        IEIP7702Wallet(delegatedEOA).call{value: value}(target, value, data);
    }

    /**
     * @notice Execute multiple calls sequentially through the delegated EIP-7702 wallet
     * @param delegatedEOA The EOA address that has been EIP-7702 delegated
     * @param targets Array of target addresses
     * @param values Array of ETH values per call
     * @param datas Array of calldata per call
     */
    function batchViaWallet(
        address delegatedEOA,
        address[] calldata targets,
        uint256[] calldata values,
        bytes[] calldata datas
    ) external payable onlyOwner {
        require(targets.length == values.length && values.length == datas.length, "Array length mismatch");

        for (uint256 i = 0; i < targets.length; i++) {
            IEIP7702Wallet(delegatedEOA).call{value: values[i]}(targets[i], values[i], datas[i]);
        }
    }

    /**
     * @notice Convenience: claim tokens then transfer — your specific use case
     * @param delegatedEOA The EIP-7702 delegated EOA
     * @param merkleVester The MerkleVester contract address
     * @param claimFee 0.0005 ETH = 500000000000000 wei
     * @param claimData The full ABI-encoded withdraw(...) calldata
     * @param token The token contract address
     * @param tokenTransferData ABI-encoded transfer(address,uint256) calldata
     */
    function claimAndTransfer(
        address delegatedEOA,
        address merkleVester,
        uint256 claimFee,
        bytes calldata claimData,
        address token,
        bytes calldata tokenTransferData
    ) external payable onlyOwner {
        require(msg.value >= claimFee, "Insufficient ETH for claim fee");

        // Step 1: Call vester via delegated wallet, forwarding claim fee
        IEIP7702Wallet(delegatedEOA).call{value: claimFee}(merkleVester, claimFee, claimData);

        // Step 2: Transfer tokens via delegated wallet (no ETH needed)
        IEIP7702Wallet(delegatedEOA).call{value: 0}(token, 0, tokenTransferData);
    }

    /// @notice Rescue any stuck ETH
    function rescueETH() external onlyOwner {
        payable(owner).transfer(address(this).balance);
    }

    receive() external payable {}
}
Compiler settingsShow
{
  "optimizer": {
    "runs": 200,
    "enabled": false
  },
  "remappings": []
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.