S Price: $0.055321 (-8.16%)
Gas: 55 Gwei

Contract

0xA28eE260Fb36c3f74b8fE67A43DB3edE7E813CE9

Overview

S Balance

Sonic LogoSonic LogoSonic Logo0 S

S Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Block
From
To

There are no matching entries

1 Internal Transaction found.

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Block From To
527714592025-10-31 8:51:0992 days ago1761900669  Contract Creation0 S
Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
DZapWallet

Compiler Version
v0.8.30+commit.73712a01

Optimization Enabled:
Yes with 300 runs

Other Settings:
paris EvmVersion
// SPDX-License-Identifier: MIT
pragma solidity 0.8.30;

import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import { ReentrancyGuardUpgradeable } from "@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol";

import { MinimalWallet } from "../wallet/MinimalWallet.sol";

import { IDZapWalletManager } from "../interfaces/IDZapWalletManager.sol";
import { IDZapWallet } from "../interfaces/IDZapWallet.sol";

import { UnauthorizedInitializer, WalletIsPaused, SigDeadlineExpired, NonceAlreadyProcessed, UnauthorizedCall, WalletExecutionFailed, SelfCallNotAllowed, CallerIsNotOwnerOrExecutor } from "./Errors.sol";

/*  
---------------------------------------------------------
---------------------------------------------------------

 /$$$$$$$  /$$$$$$$$  /$$$$$$  /$$$$$$$ 
| $$__  $$|_____ $$  /$$__  $$| $$__  $$
| $$  \ $$     /$$/ | $$  \ $$| $$  \ $$
| $$  | $$    /$$/  | $$$$$$$$| $$$$$$$/
| $$  | $$   /$$/   | $$__  $$| $$____/ 
| $$  | $$  /$$/    | $$  | $$| $$      
| $$$$$$$/ /$$$$$$$$| $$  | $$| $$      
|_______/ |________/|__/  |__/|__/      


Author: DZap <https://dzap.io> (https://x.com/dzap_io)

---------------------------------------------------------
---------------------------------------------------------
*/

contract DZapWallet is Initializable, MinimalWallet, ReentrancyGuardUpgradeable, IDZapWallet {
    // -------------STATE-------------

    IDZapWalletManager public immutable DZAP_WALLET_MANAGER;
    mapping(uint256 nonce => bool isUsed) public nonces;

    bytes32 private _DOMAIN_SEPARATOR;
    bytes32 private constant _DOMAIN_TYPEHASH =
        keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract,bytes32 salt)");
    bytes32 private constant _VALIDATOR_SIGNED_DATA_TYPEHASH =
        keccak256("SignedValidatorData(bytes32 txId,address sender,uint256 deadline,uint256 nonce,bytes32 data)");
    string private constant _DOMAIN_NAME = "DZapWallet";
    string private constant _WALLET_VERSION = "1";

    // -------------MODIFIERS-------------

    modifier onlyAuthorizedExecutorOrOwner() {
        require(DZAP_WALLET_MANAGER.isExecutorWhitelisted(msg.sender) || msg.sender == owner, CallerIsNotOwnerOrExecutor());
        if (msg.sender != owner) {
            require(!DZAP_WALLET_MANAGER.walletPaused(), WalletIsPaused());
        }
        _;
    }

    // -------------VIEW-------------

    function getDomainSeparator() public view returns (bytes32) {
        return _DOMAIN_SEPARATOR;
    }

    // -------------INITIALIZER-------------

    constructor(address _dZapWalletManager) {
        DZAP_WALLET_MANAGER = IDZapWalletManager(_dZapWalletManager);
        _disableInitializers();
    }

    function initialize(address _user, bytes32 _salt) public initializer {
        require(DZAP_WALLET_MANAGER.walletFactory() == msg.sender, UnauthorizedInitializer());

        _setOwner(_user);
        __ReentrancyGuard_init();

        _DOMAIN_SEPARATOR = keccak256(
            abi.encode(_DOMAIN_TYPEHASH, keccak256(bytes(_DOMAIN_NAME)), keccak256(bytes(_WALLET_VERSION)), block.chainid, address(this), _salt)
        );
    }

    // -------------EXTERNAL-------------

    function execute(
        bytes32 _txId,
        uint256 _deadline,
        uint256 _nonce,
        bytes calldata _data,
        bytes calldata _validatorSignatures
    ) external payable onlyAuthorizedExecutorOrOwner nonReentrant {
        _verify(_txId, _deadline, _nonce, _data, _validatorSignatures);
        nonces[_nonce] = true;

        (address[] memory _callTo, bytes[] memory _callData, uint256[] memory _nativeValue, bool[] memory _isDelegateCall) = abi.decode(
            _data,
            (address[], bytes[], uint256[], bool[])
        );

        uint256 length = _callTo.length;
        for (uint256 i; i < length; ++i) {
            _execute(_callTo[i], _callData[i], _nativeValue[i], _isDelegateCall[i]);
        }

        emit Executed(_txId);
    }

    // -------------INTERNAL-------------

    function _verify(bytes32 _txId, uint256 _deadline, uint256 _nonce, bytes calldata _data, bytes calldata _validatorSignatures) private view {
        require(_deadline >= block.timestamp, SigDeadlineExpired());
        require(!nonces[_nonce], NonceAlreadyProcessed());
        bytes32 msgHash = keccak256(abi.encode(_VALIDATOR_SIGNED_DATA_TYPEHASH, _txId, msg.sender, _deadline, _nonce, keccak256(_data)));
        bytes32 digest = keccak256(abi.encodePacked("\x19\x01", _DOMAIN_SEPARATOR, msgHash));
        DZAP_WALLET_MANAGER.verify(_validatorSignatures, digest);
    }

    function _execute(
        address _callTo,
        bytes memory _callData,
        uint256 _nativeValue,
        bool _isDelegateCall
    ) private returns (bool success, bytes memory res) {
        if (_callData.length != 0) {
            require(_callTo != address(this), SelfCallNotAllowed());
            if (_isDelegateCall) {
                require(DZAP_WALLET_MANAGER.isCallWhitelisted(_callTo), UnauthorizedCall(_callTo));
                (success, res) = _callTo.delegatecall(_callData);
                require(success, WalletExecutionFailed(_callTo, bytes4(_callData), res));
            } else {
                (success, res) = _callTo.call{ value: _nativeValue }(_callData);
                require(success, WalletExecutionFailed(_callTo, bytes4(_callData), res));
            }
        }
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/Initializable.sol)

pragma solidity ^0.8.20;

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
 * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
 * case an upgrade adds a module that needs to be initialized.
 *
 * For example:
 *
 * [.hljs-theme-light.nopadding]
 * ```solidity
 * contract MyToken is ERC20Upgradeable {
 *     function initialize() initializer public {
 *         __ERC20_init("MyToken", "MTK");
 *     }
 * }
 *
 * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
 *     function initializeV2() reinitializer(2) public {
 *         __ERC20Permit_init("MyToken");
 *     }
 * }
 * ```
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 *
 * [CAUTION]
 * ====
 * Avoid leaving a contract uninitialized.
 *
 * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
 * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke
 * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * /// @custom:oz-upgrades-unsafe-allow constructor
 * constructor() {
 *     _disableInitializers();
 * }
 * ```
 * ====
 */
abstract contract Initializable {
    /**
     * @dev Storage of the initializable contract.
     *
     * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions
     * when using with upgradeable contracts.
     *
     * @custom:storage-location erc7201:openzeppelin.storage.Initializable
     */
    struct InitializableStorage {
        /**
         * @dev Indicates that the contract has been initialized.
         */
        uint64 _initialized;
        /**
         * @dev Indicates that the contract is in the process of being initialized.
         */
        bool _initializing;
    }

    // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Initializable")) - 1)) & ~bytes32(uint256(0xff))
    bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00;

    /**
     * @dev The contract is already initialized.
     */
    error InvalidInitialization();

    /**
     * @dev The contract is not initializing.
     */
    error NotInitializing();

    /**
     * @dev Triggered when the contract has been initialized or reinitialized.
     */
    event Initialized(uint64 version);

    /**
     * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
     * `onlyInitializing` functions can be used to initialize parent contracts.
     *
     * Similar to `reinitializer(1)`, except that in the context of a constructor an `initializer` may be invoked any
     * number of times. This behavior in the constructor can be useful during testing and is not expected to be used in
     * production.
     *
     * Emits an {Initialized} event.
     */
    modifier initializer() {
        // solhint-disable-next-line var-name-mixedcase
        InitializableStorage storage $ = _getInitializableStorage();

        // Cache values to avoid duplicated sloads
        bool isTopLevelCall = !$._initializing;
        uint64 initialized = $._initialized;

        // Allowed calls:
        // - initialSetup: the contract is not in the initializing state and no previous version was
        //                 initialized
        // - construction: the contract is initialized at version 1 (no reininitialization) and the
        //                 current contract is just being deployed
        bool initialSetup = initialized == 0 && isTopLevelCall;
        bool construction = initialized == 1 && address(this).code.length == 0;

        if (!initialSetup && !construction) {
            revert InvalidInitialization();
        }
        $._initialized = 1;
        if (isTopLevelCall) {
            $._initializing = true;
        }
        _;
        if (isTopLevelCall) {
            $._initializing = false;
            emit Initialized(1);
        }
    }

    /**
     * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
     * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
     * used to initialize parent contracts.
     *
     * A reinitializer may be used after the original initialization step. This is essential to configure modules that
     * are added through upgrades and that require initialization.
     *
     * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`
     * cannot be nested. If one is invoked in the context of another, execution will revert.
     *
     * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
     * a contract, executing them in the right order is up to the developer or operator.
     *
     * WARNING: Setting the version to 2**64 - 1 will prevent any future reinitialization.
     *
     * Emits an {Initialized} event.
     */
    modifier reinitializer(uint64 version) {
        // solhint-disable-next-line var-name-mixedcase
        InitializableStorage storage $ = _getInitializableStorage();

        if ($._initializing || $._initialized >= version) {
            revert InvalidInitialization();
        }
        $._initialized = version;
        $._initializing = true;
        _;
        $._initializing = false;
        emit Initialized(version);
    }

    /**
     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
     * {initializer} and {reinitializer} modifiers, directly or indirectly.
     */
    modifier onlyInitializing() {
        _checkInitializing();
        _;
    }

    /**
     * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.
     */
    function _checkInitializing() internal view virtual {
        if (!_isInitializing()) {
            revert NotInitializing();
        }
    }

    /**
     * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
     * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
     * to any version. It is recommended to use this to lock implementation contracts that are designed to be called
     * through proxies.
     *
     * Emits an {Initialized} event the first time it is successfully executed.
     */
    function _disableInitializers() internal virtual {
        // solhint-disable-next-line var-name-mixedcase
        InitializableStorage storage $ = _getInitializableStorage();

        if ($._initializing) {
            revert InvalidInitialization();
        }
        if ($._initialized != type(uint64).max) {
            $._initialized = type(uint64).max;
            emit Initialized(type(uint64).max);
        }
    }

    /**
     * @dev Returns the highest version that has been initialized. See {reinitializer}.
     */
    function _getInitializedVersion() internal view returns (uint64) {
        return _getInitializableStorage()._initialized;
    }

    /**
     * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.
     */
    function _isInitializing() internal view returns (bool) {
        return _getInitializableStorage()._initializing;
    }

    /**
     * @dev Returns a pointer to the storage namespace.
     */
    // solhint-disable-next-line var-name-mixedcase
    function _getInitializableStorage() private pure returns (InitializableStorage storage $) {
        assembly {
            $.slot := INITIALIZABLE_STORAGE
        }
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/ReentrancyGuard.sol)

pragma solidity ^0.8.20;
import {Initializable} from "../proxy/utils/Initializable.sol";

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If EIP-1153 (transient storage) is available on the chain you're deploying at,
 * consider using {ReentrancyGuardTransient} instead.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuardUpgradeable is Initializable {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant NOT_ENTERED = 1;
    uint256 private constant ENTERED = 2;

    /// @custom:storage-location erc7201:openzeppelin.storage.ReentrancyGuard
    struct ReentrancyGuardStorage {
        uint256 _status;
    }

    // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.ReentrancyGuard")) - 1)) & ~bytes32(uint256(0xff))
    bytes32 private constant ReentrancyGuardStorageLocation = 0x9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00;

    function _getReentrancyGuardStorage() private pure returns (ReentrancyGuardStorage storage $) {
        assembly {
            $.slot := ReentrancyGuardStorageLocation
        }
    }

    /**
     * @dev Unauthorized reentrant call.
     */
    error ReentrancyGuardReentrantCall();

    function __ReentrancyGuard_init() internal onlyInitializing {
        __ReentrancyGuard_init_unchained();
    }

    function __ReentrancyGuard_init_unchained() internal onlyInitializing {
        ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();
        $._status = NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();
        // On the first call to nonReentrant, _status will be NOT_ENTERED
        if ($._status == ENTERED) {
            revert ReentrancyGuardReentrantCall();
        }

        // Any calls to nonReentrant after this point will fail
        $._status = ENTERED;
    }

    function _nonReentrantAfter() private {
        ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();
        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        $._status = NOT_ENTERED;
    }

    /**
     * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
     * `nonReentrant` function in the call stack.
     */
    function _reentrancyGuardEntered() internal view returns (bool) {
        ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();
        return $._status == ENTERED;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (interfaces/IERC1363.sol)

pragma solidity ^0.8.20;

import {IERC20} from "./IERC20.sol";
import {IERC165} from "./IERC165.sol";

/**
 * @title IERC1363
 * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].
 *
 * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract
 * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.
 */
interface IERC1363 is IERC20, IERC165 {
    /*
     * Note: the ERC-165 identifier for this interface is 0xb0202a11.
     * 0xb0202a11 ===
     *   bytes4(keccak256('transferAndCall(address,uint256)')) ^
     *   bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^
     *   bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^
     *   bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^
     *   bytes4(keccak256('approveAndCall(address,uint256)')) ^
     *   bytes4(keccak256('approveAndCall(address,uint256,bytes)'))
     */

    /**
     * @dev Moves a `value` amount of tokens from the caller's account to `to`
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferAndCall(address to, uint256 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from the caller's account to `to`
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @param data Additional data with no specified format, sent in call to `to`.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param from The address which you want to send tokens from.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferFromAndCall(address from, address to, uint256 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param from The address which you want to send tokens from.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @param data Additional data with no specified format, sent in call to `to`.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);

    /**
     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the
     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.
     * @param spender The address which will spend the funds.
     * @param value The amount of tokens to be spent.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function approveAndCall(address spender, uint256 value) external returns (bool);

    /**
     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the
     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.
     * @param spender The address which will spend the funds.
     * @param value The amount of tokens to be spent.
     * @param data Additional data with no specified format, sent in call to `spender`.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);
}

File 5 of 24 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC165.sol)

pragma solidity ^0.8.20;

import {IERC165} from "../utils/introspection/IERC165.sol";

File 6 of 24 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20.sol)

pragma solidity ^0.8.20;

import {IERC20} from "../token/ERC20/IERC20.sol";

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC1155/IERC1155.sol)

pragma solidity ^0.8.20;

import {IERC165} from "../../utils/introspection/IERC165.sol";

/**
 * @dev Required interface of an ERC-1155 compliant contract, as defined in the
 * https://eips.ethereum.org/EIPS/eip-1155[ERC].
 */
interface IERC1155 is IERC165 {
    /**
     * @dev Emitted when `value` amount of tokens of type `id` are transferred from `from` to `to` by `operator`.
     */
    event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);

    /**
     * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all
     * transfers.
     */
    event TransferBatch(
        address indexed operator,
        address indexed from,
        address indexed to,
        uint256[] ids,
        uint256[] values
    );

    /**
     * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to
     * `approved`.
     */
    event ApprovalForAll(address indexed account, address indexed operator, bool approved);

    /**
     * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.
     *
     * If an {URI} event was emitted for `id`, the standard
     * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value
     * returned by {IERC1155MetadataURI-uri}.
     */
    event URI(string value, uint256 indexed id);

    /**
     * @dev Returns the value of tokens of token type `id` owned by `account`.
     */
    function balanceOf(address account, uint256 id) external view returns (uint256);

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(
        address[] calldata accounts,
        uint256[] calldata ids
    ) external view returns (uint256[] memory);

    /**
     * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,
     *
     * Emits an {ApprovalForAll} event.
     *
     * Requirements:
     *
     * - `operator` cannot be the zero address.
     */
    function setApprovalForAll(address operator, bool approved) external;

    /**
     * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.
     *
     * See {setApprovalForAll}.
     */
    function isApprovedForAll(address account, address operator) external view returns (bool);

    /**
     * @dev Transfers a `value` amount of tokens of type `id` from `from` to `to`.
     *
     * WARNING: This function can potentially allow a reentrancy attack when transferring tokens
     * to an untrusted contract, when invoking {onERC1155Received} on the receiver.
     * Ensure to follow the checks-effects-interactions pattern and consider employing
     * reentrancy guards when interacting with untrusted contracts.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.
     * - `from` must have a balance of tokens of type `id` of at least `value` amount.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function safeTransferFrom(address from, address to, uint256 id, uint256 value, bytes calldata data) external;

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.
     *
     * WARNING: This function can potentially allow a reentrancy attack when transferring tokens
     * to an untrusted contract, when invoking {onERC1155BatchReceived} on the receiver.
     * Ensure to follow the checks-effects-interactions pattern and consider employing
     * reentrancy guards when interacting with untrusted contracts.
     *
     * Emits either a {TransferSingle} or a {TransferBatch} event, depending on the length of the array arguments.
     *
     * Requirements:
     *
     * - `ids` and `values` must have the same length.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] calldata ids,
        uint256[] calldata values,
        bytes calldata data
    ) external;
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC1155/IERC1155Receiver.sol)

pragma solidity ^0.8.20;

import {IERC165} from "../../utils/introspection/IERC165.sol";

/**
 * @dev Interface that must be implemented by smart contracts in order to receive
 * ERC-1155 token transfers.
 */
interface IERC1155Receiver is IERC165 {
    /**
     * @dev Handles the receipt of a single ERC-1155 token type. This function is
     * called at the end of a `safeTransferFrom` after the balance has been updated.
     *
     * NOTE: To accept the transfer, this must return
     * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`
     * (i.e. 0xf23a6e61, or its own function selector).
     *
     * @param operator The address which initiated the transfer (i.e. msg.sender)
     * @param from The address which previously owned the token
     * @param id The ID of the token being transferred
     * @param value The amount of tokens being transferred
     * @param data Additional data with no specified format
     * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed
     */
    function onERC1155Received(
        address operator,
        address from,
        uint256 id,
        uint256 value,
        bytes calldata data
    ) external returns (bytes4);

    /**
     * @dev Handles the receipt of a multiple ERC-1155 token types. This function
     * is called at the end of a `safeBatchTransferFrom` after the balances have
     * been updated.
     *
     * NOTE: To accept the transfer(s), this must return
     * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`
     * (i.e. 0xbc197c81, or its own function selector).
     *
     * @param operator The address which initiated the batch transfer (i.e. msg.sender)
     * @param from The address which previously owned the token
     * @param ids An array containing ids of each token being transferred (order and length must match values array)
     * @param values An array containing amounts of each token being transferred (order and length must match ids array)
     * @param data Additional data with no specified format
     * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed
     */
    function onERC1155BatchReceived(
        address operator,
        address from,
        uint256[] calldata ids,
        uint256[] calldata values,
        bytes calldata data
    ) external returns (bytes4);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC1155/utils/ERC1155Holder.sol)

pragma solidity ^0.8.20;

import {IERC165, ERC165} from "../../../utils/introspection/ERC165.sol";
import {IERC1155Receiver} from "../IERC1155Receiver.sol";

/**
 * @dev Simple implementation of `IERC1155Receiver` that will allow a contract to hold ERC-1155 tokens.
 *
 * IMPORTANT: When inheriting this contract, you must include a way to use the received tokens, otherwise they will be
 * stuck.
 */
abstract contract ERC1155Holder is ERC165, IERC1155Receiver {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
        return interfaceId == type(IERC1155Receiver).interfaceId || super.supportsInterface(interfaceId);
    }

    function onERC1155Received(
        address,
        address,
        uint256,
        uint256,
        bytes memory
    ) public virtual override returns (bytes4) {
        return this.onERC1155Received.selector;
    }

    function onERC1155BatchReceived(
        address,
        address,
        uint256[] memory,
        uint256[] memory,
        bytes memory
    ) public virtual override returns (bytes4) {
        return this.onERC1155BatchReceived.selector;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC-20 standard as defined in the ERC.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the value of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the value of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves a `value` amount of tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 value) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the
     * caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the
     * allowance mechanism. `value` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 value) external returns (bool);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.20;

import {IERC20} from "../IERC20.sol";
import {IERC1363} from "../../../interfaces/IERC1363.sol";
import {Address} from "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC-20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    /**
     * @dev An operation with an ERC-20 token failed.
     */
    error SafeERC20FailedOperation(address token);

    /**
     * @dev Indicates a failed `decreaseAllowance` request.
     */
    error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);

    /**
     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value)));
    }

    /**
     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
     */
    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value)));
    }

    /**
     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     *
     * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client"
     * smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using
     * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract
     * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.
     */
    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 oldAllowance = token.allowance(address(this), spender);
        forceApprove(token, spender, oldAllowance + value);
    }

    /**
     * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no
     * value, non-reverting calls are assumed to be successful.
     *
     * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client"
     * smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using
     * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract
     * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.
     */
    function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {
        unchecked {
            uint256 currentAllowance = token.allowance(address(this), spender);
            if (currentAllowance < requestedDecrease) {
                revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);
            }
            forceApprove(token, spender, currentAllowance - requestedDecrease);
        }
    }

    /**
     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
     * to be set to zero before setting it to a non-zero value, such as USDT.
     *
     * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function
     * only sets the "standard" allowance. Any temporary allowance will remain active, in addition to the value being
     * set here.
     */
    function forceApprove(IERC20 token, address spender, uint256 value) internal {
        bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));

        if (!_callOptionalReturnBool(token, approvalCall)) {
            _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));
            _callOptionalReturn(token, approvalCall);
        }
    }

    /**
     * @dev Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no
     * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
     * targeting contracts.
     *
     * Reverts if the returned value is other than `true`.
     */
    function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {
        if (to.code.length == 0) {
            safeTransfer(token, to, value);
        } else if (!token.transferAndCall(to, value, data)) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target
     * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
     * targeting contracts.
     *
     * Reverts if the returned value is other than `true`.
     */
    function transferFromAndCallRelaxed(
        IERC1363 token,
        address from,
        address to,
        uint256 value,
        bytes memory data
    ) internal {
        if (to.code.length == 0) {
            safeTransferFrom(token, from, to, value);
        } else if (!token.transferFromAndCall(from, to, value, data)) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no
     * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
     * targeting contracts.
     *
     * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.
     * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}
     * once without retrying, and relies on the returned value to be true.
     *
     * Reverts if the returned value is other than `true`.
     */
    function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {
        if (to.code.length == 0) {
            forceApprove(token, to, value);
        } else if (!token.approveAndCall(to, value, data)) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     *
     * This is a variant of {_callOptionalReturnBool} that reverts if call fails to meet the requirements.
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        uint256 returnSize;
        uint256 returnValue;
        assembly ("memory-safe") {
            let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)
            // bubble errors
            if iszero(success) {
                let ptr := mload(0x40)
                returndatacopy(ptr, 0, returndatasize())
                revert(ptr, returndatasize())
            }
            returnSize := returndatasize()
            returnValue := mload(0)
        }

        if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     *
     * This is a variant of {_callOptionalReturn} that silently catches all reverts and returns a bool instead.
     */
    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
        bool success;
        uint256 returnSize;
        uint256 returnValue;
        assembly ("memory-safe") {
            success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)
            returnSize := returndatasize()
            returnValue := mload(0)
        }
        return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.20;

import {IERC165} from "../../utils/introspection/IERC165.sol";

/**
 * @dev Required interface of an ERC-721 compliant contract.
 */
interface IERC721 is IERC165 {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in ``owner``'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon
     *   a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC-721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or
     *   {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon
     *   a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(address from, address to, uint256 tokenId) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC-721
     * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
     * understand this adds an external call which potentially creates a reentrancy vulnerability.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 tokenId) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the address zero.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool approved) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);
}

File 13 of 24 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.20;

/**
 * @title ERC-721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC-721 asset contracts.
 */
interface IERC721Receiver {
    /**
     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
     * by `operator` from `from`, this function is called.
     *
     * It must return its Solidity selector to confirm the token transfer.
     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be
     * reverted.
     *
     * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

File 14 of 24 : ERC721Holder.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/utils/ERC721Holder.sol)

pragma solidity ^0.8.20;

import {IERC721Receiver} from "../IERC721Receiver.sol";

/**
 * @dev Implementation of the {IERC721Receiver} interface.
 *
 * Accepts all token transfers.
 * Make sure the contract is able to use its token with {IERC721-safeTransferFrom}, {IERC721-approve} or
 * {IERC721-setApprovalForAll}.
 */
abstract contract ERC721Holder is IERC721Receiver {
    /**
     * @dev See {IERC721Receiver-onERC721Received}.
     *
     * Always returns `IERC721Receiver.onERC721Received.selector`.
     */
    function onERC721Received(address, address, uint256, bytes memory) public virtual returns (bytes4) {
        return this.onERC721Received.selector;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/Address.sol)

pragma solidity ^0.8.20;

import {Errors} from "./Errors.sol";

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev There's no code at `target` (it is not a contract).
     */
    error AddressEmptyCode(address target);

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        if (address(this).balance < amount) {
            revert Errors.InsufficientBalance(address(this).balance, amount);
        }

        (bool success, ) = recipient.call{value: amount}("");
        if (!success) {
            revert Errors.FailedCall();
        }
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason or custom error, it is bubbled
     * up by this function (like regular Solidity function calls). However, if
     * the call reverted with no returned reason, this function reverts with a
     * {Errors.FailedCall} error.
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        if (address(this).balance < value) {
            revert Errors.InsufficientBalance(address(this).balance, value);
        }
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target
     * was not a contract or bubbling up the revert reason (falling back to {Errors.FailedCall}) in case
     * of an unsuccessful call.
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata
    ) internal view returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            // only check if target is a contract if the call was successful and the return data is empty
            // otherwise we already know that it was a contract
            if (returndata.length == 0 && target.code.length == 0) {
                revert AddressEmptyCode(target);
            }
            return returndata;
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the
     * revert reason or with a default {Errors.FailedCall} error.
     */
    function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            return returndata;
        }
    }

    /**
     * @dev Reverts with returndata if present. Otherwise reverts with {Errors.FailedCall}.
     */
    function _revert(bytes memory returndata) private pure {
        // Look for revert reason and bubble it up if present
        if (returndata.length > 0) {
            // The easiest way to bubble the revert reason is using memory via assembly
            assembly ("memory-safe") {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert Errors.FailedCall();
        }
    }
}

File 16 of 24 : Errors.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/Errors.sol)

pragma solidity ^0.8.20;

/**
 * @dev Collection of common custom errors used in multiple contracts
 *
 * IMPORTANT: Backwards compatibility is not guaranteed in future versions of the library.
 * It is recommended to avoid relying on the error API for critical functionality.
 *
 * _Available since v5.1._
 */
library Errors {
    /**
     * @dev The ETH balance of the account is not enough to perform the operation.
     */
    error InsufficientBalance(uint256 balance, uint256 needed);

    /**
     * @dev A call to an address target failed. The target may have reverted.
     */
    error FailedCall();

    /**
     * @dev The deployment failed.
     */
    error FailedDeployment();

    /**
     * @dev A necessary precompile is missing.
     */
    error MissingPrecompile(address);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/ERC165.sol)

pragma solidity ^0.8.20;

import {IERC165} from "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC-165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/IERC165.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC-165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[ERC].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

// SPDX-License-Identifier: MIT
pragma solidity 0.8.30;

interface IDZapWallet {
    // -------------EVENTS-------------

    event Executed(bytes32 indexed txId);

    // -------------VIEWS-------------

    function getDomainSeparator() external view returns (bytes32);

    // -------------EXTERNAL-------------

    function initialize(address _user, bytes32 _salt) external;

    function execute(bytes32 _txId, uint256 _deadline, uint256 _nonce, bytes calldata _data, bytes calldata _validatorSignatures) external payable;
}

// SPDX-License-Identifier: MIT
pragma solidity 0.8.30;

interface IDZapWalletManager {
    function walletPaused() external view returns (bool);
    function quorum() external view returns (uint8);
    function verify(bytes memory _signatures, bytes32 _hash) external view;
    function isCallWhitelisted(address _callTo) external view returns (bool);

    function walletFactory() external view returns (address);
    function isExecutorWhitelisted(address _executor) external view returns (bool);
    function setExecutorWhitelisting(address _executor, bool _whitelisted) external;
}

// SPDX-License-Identifier: MIT
pragma solidity 0.8.30;

import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { IERC721 } from "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import { IERC1155 } from "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";

import { TokenTransfer, TokenApproval } from "../wallet/Types.sol";

interface IMinimalWallet {
    event WithdrawnNative();
    event WithdrawnErc20();
    event WithdrawnErc721();
    event WithdrawnErc1155();
    event Erc20ApprovalRevoked();
    event Erc721ApprovalRevoked();
    event Erc1155ApprovalRevoked();

    function owner() external returns (address);

    function withdraw(TokenTransfer[] calldata _info) external;

    function withdrawNative(uint256 amount, address recipient) external;

    function withdrawERC20s(IERC20[] calldata erc20s, uint256[] calldata amounts, address[] calldata recipients) external;

    function withdrawERC721s(IERC721[] calldata erc721s, uint256[] calldata ids, address[] calldata recipients) external;

    function withdrawERC1155s(IERC1155 erc1155, uint256[] calldata ids, uint256[] calldata amounts, address recipient) external;

    function revokeApprovals(TokenApproval[] calldata notes) external;

    function revokeERC20Approvals(IERC20 erc20, address[] calldata operators) external;

    function revokeERC721Approvals(IERC721 erc721, address[] calldata operators) external;

    function revokeERC1155Approvals(IERC1155 erc1155, address[] calldata operators) external;
}

File 22 of 24 : Errors.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.30;

// ============= WALLET ERRORS =============

error ZeroAddress();
error CallerIsNotOwnerOrExecutor();
error UnauthorizedInitializer();
error OwnableUnauthorizedAccount(address);
error InvalidAccount();
error ExecutorUnauthorizedAccount(address);

error InvalidArrayLength();
error WithdrawFailed();

error InvalidWalletImp();
error AlreadyDeployed();
error WalletNotDeployed();
error AddressIsWallet();
error NoLabel();

error WalletIsPaused();

error QuorumTooLow();
error SigDeadlineExpired();
error NonceAlreadyProcessed();

error SelfCallNotAllowed();
error UnauthorizedCall(address callTo);
error WalletExecutionFailed(address target, bytes4 funSig, bytes reason);

// SPDX-License-Identifier: GPL-3.0-only
pragma solidity 0.8.30;

import { SafeERC20, IERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import { IERC721 } from "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import { IERC1155 } from "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";
import { ERC721Holder } from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";
import { ERC1155Holder } from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";

import { IMinimalWallet } from "../interfaces/IMinimalWallet.sol";

import { TokenType, TokenTransfer, TokenApproval } from "./Types.sol";
import { OwnableUnauthorizedAccount, InvalidArrayLength, WithdrawFailed, InvalidAccount, ZeroAddress } from "./Errors.sol";

/* Refrence : Enso base wallet : https://github.com/EnsoBuild/shortcuts-contracts/blob/a575b19e02139137d1056514112087bb80f8ce96/contracts/wallet/MinimalWallet.sol */
abstract contract MinimalWallet is ERC721Holder, ERC1155Holder, IMinimalWallet {
    using SafeERC20 for IERC20;

    address public owner;

    //--------------------MODIFIERS----------------------------

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

    //--------------------INITIALIZER----------------------------

    function _setOwner(address _owner) internal {
        require(_owner != address(0), InvalidAccount());
        owner = _owner;
    }

    //--------------------EXTERNAL----------------------------

    // @notice Withdraw an array of assets
    // @dev Works for ETH, ERC20s, ERC721s, and ERC1155s
    // @param notes A tuple that contains the tokenType id, token address, array of ids and amounts
    // solhint-disable-next-line code-complexity
    function withdraw(TokenTransfer[] calldata _info) external onlyOwner {
        TokenTransfer memory transferInfo;
        TokenType tokenType;
        uint256[] memory ids;
        uint256[] memory amounts;

        uint256 length = _info.length;
        for (uint256 i; i < length; ++i) {
            transferInfo = _info[i];
            tokenType = transferInfo.tokenType;
            if (tokenType == TokenType.ETH) {
                amounts = transferInfo.amounts;
                require(amounts.length == 1, InvalidArrayLength());
                _withdrawETH(amounts[0], transferInfo.recipient);
            } else if (tokenType == TokenType.ERC20) {
                amounts = transferInfo.amounts;
                require(amounts.length == 1, InvalidArrayLength());
                _withdrawERC20(IERC20(transferInfo.token), amounts[0], transferInfo.recipient);
            } else if (tokenType == TokenType.ERC721) {
                ids = transferInfo.ids;
                _withdrawERC721s(IERC721(transferInfo.token), ids[0], transferInfo.recipient);
            } else if (tokenType == TokenType.ERC1155) {
                ids = transferInfo.ids;
                amounts = transferInfo.amounts;
                _withdrawERC1155s(IERC1155(transferInfo.token), ids, amounts, transferInfo.recipient);
            }
        }
    }

    // @notice Withdraw ETH from this contract to the msg.sender
    // @param amount The amount of ETH to be withdrawn
    function withdrawNative(uint256 amount, address recipient) external onlyOwner {
        _withdrawETH(amount, recipient);
        emit WithdrawnNative();
    }

    // @notice Withdraw ERC20s
    // @param erc20s An array of erc20 addresses
    // @param amounts An array of amounts for each erc20
    function withdrawERC20s(IERC20[] calldata erc20s, uint256[] calldata amounts, address[] calldata recipients) external onlyOwner {
        uint256 length = erc20s.length;
        require(amounts.length == length, InvalidArrayLength());
        for (uint256 i; i < length; ++i) {
            require(recipients[i] != address(0), ZeroAddress());
            _withdrawERC20(erc20s[i], amounts[i], recipients[i]);
        }
        emit WithdrawnErc20();
    }

    // @notice Withdraw multiple ERC721 ids for a single ERC721 contract
    // @param erc721 The address of the ERC721 contract
    // @param ids An array of ids that are to be withdrawn
    function withdrawERC721s(IERC721[] calldata erc721s, uint256[] calldata ids, address[] calldata recipients) external onlyOwner {
        uint256 length = ids.length;
        for (uint256 i; i < length; ++i) {
            _withdrawERC721s(erc721s[i], ids[i], recipients[i]);
        }
        emit WithdrawnErc721();
    }

    // @notice Withdraw multiple ERC1155 ids for a single ERC1155 contract
    // @param erc1155 The address of the ERC155 contract
    // @param ids An array of ids that are to be withdrawn
    // @param amounts An array of amounts per id
    function withdrawERC1155s(IERC1155 erc1155, uint256[] calldata ids, uint256[] calldata amounts, address recipient) external onlyOwner {
        _withdrawERC1155s(erc1155, ids, amounts, recipient);
        emit WithdrawnErc1155();
    }

    // @notice Revoke approval on an array of assets and operators
    // @dev Works for ERC20s, ERC721s, and ERC1155s
    // @param notes A tuple that contains the tokenType id, token address, and array of operators
    function revokeApprovals(TokenApproval[] calldata notes) external onlyOwner {
        TokenApproval memory transferInfo;
        TokenType tokenType;

        uint256 length = notes.length;
        for (uint256 i; i < length; ++i) {
            transferInfo = notes[i];
            tokenType = transferInfo.tokenType;
            if (tokenType == TokenType.ERC20) {
                _revokeERC20Approvals(IERC20(transferInfo.token), transferInfo.operators);
            } else if (tokenType == TokenType.ERC721) {
                _revokeERC721Approvals(IERC721(transferInfo.token), transferInfo.operators);
            } else if (tokenType == TokenType.ERC1155) {
                _revokeERC1155Approvals(IERC1155(transferInfo.token), transferInfo.operators);
            }
        }
    }

    // @notice Revoke approval of an ERC20 for an array of operators
    // @param erc20 The address of the ERC20 token
    // @param operators The array of operators to have approval revoked
    function revokeERC20Approvals(IERC20 erc20, address[] calldata operators) external onlyOwner {
        _revokeERC20Approvals(erc20, operators);
        emit Erc20ApprovalRevoked();
    }

    // @notice Revoke approval of an ERC721 for an array of operators
    // @param erc721 The address of the ERC721 token
    // @param operators The array of operators to have approval revoked
    function revokeERC721Approvals(IERC721 erc721, address[] calldata operators) external onlyOwner {
        _revokeERC721Approvals(erc721, operators);
        emit Erc721ApprovalRevoked();
    }

    // @notice Revoke approval of an ERC1155 for an array of operators
    // @param erc1155 The address of the ERC1155 token
    // @param operators The array of operators to have approval revoked
    function revokeERC1155Approvals(IERC1155 erc1155, address[] calldata operators) external onlyOwner {
        _revokeERC1155Approvals(erc1155, operators);
        emit Erc1155ApprovalRevoked();
    }

    //--------------------INTERNAL----------------------------

    function _withdrawETH(uint256 amount, address recipient) internal {
        (bool success, ) = recipient.call{ value: amount }("");
        require(success, WithdrawFailed());
    }

    function _withdrawERC20(IERC20 erc20, uint256 amount, address recipient) internal {
        erc20.safeTransfer(recipient, amount);
    }

    function _withdrawERC721s(IERC721 erc721, uint256 ids, address recipient) internal {
        require(recipient != address(0), ZeroAddress());
        erc721.safeTransferFrom(address(this), recipient, ids);
    }

    function _withdrawERC1155s(IERC1155 erc1155, uint256[] memory ids, uint256[] memory amounts, address recipient) internal {
        // safeBatchTransferFrom will validate the array lengths
        erc1155.safeBatchTransferFrom(address(this), recipient, ids, amounts, "");
    }

    function _revokeERC20Approvals(IERC20 erc20, address[] memory operators) internal {
        uint256 length = operators.length;
        for (uint256 i; i < length; ++i) {
            erc20.approve(operators[i], 0);
        }
    }

    function _revokeERC721Approvals(IERC721 erc721, address[] memory operators) internal {
        uint256 length = operators.length;
        for (uint256 i; i < length; ++i) {
            erc721.setApprovalForAll(operators[i], false);
        }
    }

    function _revokeERC1155Approvals(IERC1155 erc1155, address[] memory operators) internal {
        uint256 length = operators.length;
        for (uint256 i; i < length; ++i) {
            erc1155.setApprovalForAll(operators[i], false);
        }
    }

    //--------------------RECEIVE/FALLBACK---------------------

    receive() external payable {}
}

File 24 of 24 : Types.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.30;

struct SigData {
    uint256 deadline;
    bytes32 msgHash;
}

enum TokenType {
    ETH,
    ERC20,
    ERC721,
    ERC1155
}

struct TokenTransfer {
    TokenType tokenType;
    address token;
    uint256[] ids; // nftIds
    uint256[] amounts;
    address recipient;
}

struct TokenApproval {
    TokenType tokenType;
    address token;
    address[] operators;
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 300
  },
  "viaIR": true,
  "evmVersion": "paris",
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_dZapWalletManager","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"CallerIsNotOwnerOrExecutor","type":"error"},{"inputs":[],"name":"InvalidAccount","type":"error"},{"inputs":[],"name":"InvalidArrayLength","type":"error"},{"inputs":[],"name":"InvalidInitialization","type":"error"},{"inputs":[],"name":"NonceAlreadyProcessed","type":"error"},{"inputs":[],"name":"NotInitializing","type":"error"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"inputs":[],"name":"SelfCallNotAllowed","type":"error"},{"inputs":[],"name":"SigDeadlineExpired","type":"error"},{"inputs":[{"internalType":"address","name":"callTo","type":"address"}],"name":"UnauthorizedCall","type":"error"},{"inputs":[],"name":"UnauthorizedInitializer","type":"error"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes4","name":"funSig","type":"bytes4"},{"internalType":"bytes","name":"reason","type":"bytes"}],"name":"WalletExecutionFailed","type":"error"},{"inputs":[],"name":"WalletIsPaused","type":"error"},{"inputs":[],"name":"WithdrawFailed","type":"error"},{"inputs":[],"name":"ZeroAddress","type":"error"},{"anonymous":false,"inputs":[],"name":"Erc1155ApprovalRevoked","type":"event"},{"anonymous":false,"inputs":[],"name":"Erc20ApprovalRevoked","type":"event"},{"anonymous":false,"inputs":[],"name":"Erc721ApprovalRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"txId","type":"bytes32"}],"name":"Executed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"version","type":"uint64"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[],"name":"WithdrawnErc1155","type":"event"},{"anonymous":false,"inputs":[],"name":"WithdrawnErc20","type":"event"},{"anonymous":false,"inputs":[],"name":"WithdrawnErc721","type":"event"},{"anonymous":false,"inputs":[],"name":"WithdrawnNative","type":"event"},{"inputs":[],"name":"DZAP_WALLET_MANAGER","outputs":[{"internalType":"contract IDZapWalletManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_txId","type":"bytes32"},{"internalType":"uint256","name":"_deadline","type":"uint256"},{"internalType":"uint256","name":"_nonce","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"},{"internalType":"bytes","name":"_validatorSignatures","type":"bytes"}],"name":"execute","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"getDomainSeparator","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"bytes32","name":"_salt","type":"bytes32"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"nonce","type":"uint256"}],"name":"nonces","outputs":[{"internalType":"bool","name":"isUsed","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155BatchReceived","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"enum TokenType","name":"tokenType","type":"uint8"},{"internalType":"address","name":"token","type":"address"},{"internalType":"address[]","name":"operators","type":"address[]"}],"internalType":"struct TokenApproval[]","name":"notes","type":"tuple[]"}],"name":"revokeApprovals","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC1155","name":"erc1155","type":"address"},{"internalType":"address[]","name":"operators","type":"address[]"}],"name":"revokeERC1155Approvals","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"erc20","type":"address"},{"internalType":"address[]","name":"operators","type":"address[]"}],"name":"revokeERC20Approvals","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC721","name":"erc721","type":"address"},{"internalType":"address[]","name":"operators","type":"address[]"}],"name":"revokeERC721Approvals","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"enum TokenType","name":"tokenType","type":"uint8"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"address","name":"recipient","type":"address"}],"internalType":"struct TokenTransfer[]","name":"_info","type":"tuple[]"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC1155","name":"erc1155","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"address","name":"recipient","type":"address"}],"name":"withdrawERC1155s","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20[]","name":"erc20s","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"address[]","name":"recipients","type":"address[]"}],"name":"withdrawERC20s","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC721[]","name":"erc721s","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"address[]","name":"recipients","type":"address[]"}],"name":"withdrawERC721s","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"name":"withdrawNative","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60a03461013a57601f611e4238819003918201601f19168301916001600160401b0383118484101761013f5780849260209460405283398101031261013a57516001600160a01b0381169081900361013a576080527ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005460ff8160401c16610129576002600160401b03196001600160401b038216016100c0575b604051611cec9081610156823960805181818161057e01528181610d2201526110aa0152f35b6001600160401b0319166001600160401b039081177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d290602090a13861009a565b63f92ee8a960e01b60005260046000fd5b600080fd5b634e487b7160e01b600052604160045260246000fdfe608080604052600436101561001d575b50361561001b57600080fd5b005b600090813560e01c90816301ffc9a714611517575080630fe786e1146114b0578063141a468c14611481578063150b7a021461142b5780632566e9811461116c57806331b455a5146110f45780638da5cb5b146110ce578063add99be81461108a578063b8ca8dd814611028578063bc197c8114610f92578063be13f47c14610c89578063bf110de314610b3c578063db62695f14610513578063e1084a1314610387578063e5cb3703146102f2578063ec0958ed1461021a578063ed24911d146101fc578063f23a6e61146101a25763f5d4297b0361000f573461019f576101053661173c565b92909361011e336001600160a01b0389541633146117db565b865b83811061014f57877f2b2708fed19ad1b8802fb60a678f2f20c688af39e744252eeccccbb9ba3181ed8180a180f35b61015a81838961188c565b35906001600160a01b038216820361019d5761019760019261017d83888861188c565b3561019161018c858b8d61188c565b61189c565b91611a54565b01610120565b885b80fd5b503461019f5760a036600319011261019f576101bc61156c565b506101c56115b7565b506084356001600160401b0381116101f8576101e59036906004016116a0565b5060405163f23a6e6160e01b8152602090f35b5080fd5b503461019f578060031936011261019f576020600254604051908152f35b503461019f57608036600319011261019f5761023461156c565b6024356001600160401b0381116102ee57610253903690600401611587565b916044356001600160401b0381116102ea57610273903690600401611587565b9092606435936001600160a01b03851685036102e6576102b16102b9926102bf976102aa336001600160a01b038c541633146117db565b36916116d5565b9236916116d5565b916119a9565b7f28b68992e73157421085eb6cfe9f98e8022412d41fb3b71eabe2da43b95179518180a180f35b8680fd5b8480fd5b8280fd5b503461019f57604036600319011261019f576004356001600160a01b03811681036101f857602435906001600160401b0382116102ee5761035a61033d610360933690600401611587565b610353336001600160a01b0388541633146117db565b3691611801565b906118e3565b7f803808b3da62d0bfc3234a3a0be47dc8b4ddb2b82d3327d83b2f22585408dc358180a180f35b503461019f57602036600319011261019f576004356001600160401b0381116101f8576103b8903690600401611587565b906103cf336001600160a01b0385541633146117db565b6040516103db81611612565b83815283602082015260606040820152508290605e1981360301915b8381101561050f578060051b8201358381121561050b57820160608136031261050b5760405161042681611612565b8135600481101561050757815261043f602083016115cd565b91602082019283526040810135906001600160401b03821161019d57610467913691016118c8565b90604081019182525160048110156104f3576001939291908481036104a357506001600160a01b0361049d925116905190611b1b565b016103f7565b600281036104c757506001600160a01b036104c29251169051906118e3565b61049d565b6003146104d6575b505061049d565b6001600160a01b036104ec9251169051906118e3565b38806104cf565b634e487b7160e01b88526021600452602488fd5b8780fd5b8580fd5b8480f35b5060a036600319011261019f576004356044356024356064356001600160401b0381116102ea576105489036906004016117ae565b90926084356001600160401b0381116102e6576105699036906004016117ae565b604051630abaeddd60e01b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031695906020816024818a5afa908115610af0578a91610b1d575b508015610b0a575b15610afb576001600160a01b038954163303610a98575b60027f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f005414610a895760027f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055428110610a7a57838952600160205260ff60408a205416610a6b5790889161065436878a611669565b602081519101206040519060208201927f0a39e3a6e1a74a53a19989edd5ccf7d51664ea4371753f6add7c5e4b8a5aea7984528b604084015233606084015260808301528660a083015260c082015260c081526106b260e08261162d565b5190206002549060405190602082019261190160f01b845260228301526042820152604281526106e360628261162d565b51902092863b156102ee57606490826040519586948593636b40634160e01b8552604060048601528160448601528585013782820184018690526024830152601f01601f19168101030181875afa8015610a6057610a4c575b508552600160205260408520600160ff1982541617905582016080838203126102ea5782356001600160401b03811161050b578161077b9185016118c8565b9160208401356001600160401b0381116102e65784019180601f840112156102e6578235926107a9846116be565b936107b7604051958661162d565b80855260208086019160051b83010191838311610a175760208101915b838310610a1b575050505060408501356001600160401b03811161050757816107fe918701611721565b946060810135906001600160401b03821161019d57019080601f830112156105075781359061082c826116be565b9261083a604051948561162d565b82845260208085019360051b820101918211610a1757602001915b8183106109fa57505050835193875b8581106108b85788887fa74c8847d513feba22a0f0cb38d53081abf97562cdb293926ba243689e7c41ca8280a260017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f005580f35b6001600160a01b036108ca8284611878565b51166108d68287611878565b51906108e2838a611878565b516108ed8487611878565b5115158351610903575b50505050600101610864565b3083146109eb578c9190156109c4575050604051638e01410360e01b8152600481018290526020816024818a5afa9081156109b9578c9161098b575b50156109795781610970918c80600196955160208501845af49061096a610964611ac0565b93611ba5565b91611be2565b903880806108f7565b631b46195760e31b8b5260045260248afd5b6109ac915060203d81116109b2575b6109a4818361162d565b8101906118b0565b3861093f565b503d61099a565b6040513d8e823e3d90fd5b918184926109e6946001979651906020860190855af19061096a610964611ac0565b610970565b633f89638160e11b8d5260048dfd5b82358015158103610a1357815260209283019201610855565b8a80fd5b8980fd5b82356001600160401b038111610a4857602091610a3d878480948701016116a0565b8152019201916107d4565b8b80fd5b86610a599197929761162d565b943861073c565b6040513d89823e3d90fd5b63752eea4f60e01b8952600489fd5b63e354457160e01b8952600489fd5b633ee5aeb560e01b8952600489fd5b60405163d4ea246d60e01b81526020816004818a5afa908115610af0578a91610ad1575b50156105de57632678214d60e11b8952600489fd5b610aea915060203d6020116109b2576109a4818361162d565b38610abc565b6040513d8c823e3d90fd5b63fd4bf3d160e01b8952600489fd5b506001600160a01b0389541633146105c7565b610b36915060203d6020116109b2576109a4818361162d565b386105bf565b503461019f57610b4b3661173c565b90919293610b68969596336001600160a01b0388541633146117db565b808403610c7a57855b818110610ba057867f11f3ae7db4be0fb9f9cb9ed059a7666ac735836879e11085fd912dbeab30a9388180a180f35b6001600160a01b03610bb661018c83868861188c565b1615610c6b57610bc781838a61188c565b356001600160a01b0381169081810361019d5788602091610be9858a8c61188c565b3582610bf961018c888b8d61188c565b91604051906001600160a01b038783019463a9059cbb60e01b8652166024830152604482015260448152610c2e60648261162d565b51925af115610a605787513d610c625750803b155b610c505750600101610b71565b635274afe760e01b8852600452602487fd5b60011415610c43565b63d92e233d60e01b8752600487fd5b634ec4810560e11b8652600486fd5b503461019f57604036600319011261019f57610ca361156c565b600080516020611c97833981519152549060ff8260401c1615916001600160401b03811680159081610f8a575b6001149081610f80575b159081610f77575b50610f685767ffffffffffffffff198116600117600080516020611c978339815191525582610f3b575b5060405163c5c0369960e01b81526020816004817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa908115610f30578491610eea575b506001600160a01b0333911603610edb576001600160a01b03168015610ecc57825473ffffffffffffffffffffffffffffffffffffffff1916178255610d9e611c68565b610da6611c68565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055604090600a60208351610ddd858261162d565b82815201691116985c15d85b1b195d60b21b815220600160208451610e02868261162d565b82815201603160f81b81522083519060208201927fd87cd6ef79d4e2b95e15ce8abf732db51ec771f1ca2edccf22a46c729ac5647284528583015260608201524660808201523060a082015260243560c082015260c08152610e6560e08261162d565b519020600255610e73575080f35b60207fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29168ff000000000000000019600080516020611c978339815191525416600080516020611c97833981519152555160018152a180f35b630da30f6560e31b8352600483fd5b630d622feb60e01b8352600483fd5b90506020813d602011610f28575b81610f056020938361162d565b81010312610f2457516001600160a01b0381168103610f245738610d5a565b8380fd5b3d9150610ef8565b6040513d86823e3d90fd5b68ffffffffffffffffff19166801000000000000000117600080516020611c978339815191525538610d0c565b63f92ee8a960e01b8452600484fd5b90501538610ce2565b303b159150610cda565b849150610cd0565b503461019f5760a036600319011261019f57610fac61156c565b50610fb56115b7565b506044356001600160401b0381116101f857610fd5903690600401611721565b506064356001600160401b0381116101f857610ff5903690600401611721565b506084356001600160401b0381116101f8576110159036906004016116a0565b5060405163bc197c8160e01b8152602090f35b503461019f57604036600319011261019f576110636110456115b7565b61105b336001600160a01b0385541633146117db565b600435611af0565b7f0cfd0f2a11f313ddbab6a2f285921746e46f88477e009881e7ceb73d3fec60b88180a180f35b503461019f578060031936011261019f5760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b503461019f578060031936011261019f576001600160a01b036020915416604051908152f35b503461019f57604036600319011261019f576004356001600160a01b03811681036101f857602435906001600160401b0382116102ee5761113f61033d611145933690600401611587565b90611b1b565b7fbcd27884cf321c8d0beb91ef8bab7459e9c6c290bf655bcbb732f0fdead3385f8180a180f35b503461019f57602036600319011261019f576004356001600160401b0381116101f85761119d903690600401611587565b906111b4336001600160a01b0385541633146117db565b6040516111c0816115e1565b83815283602082015260606040820152606080820152836080820152508290609e1981360301915b8381101561050f578060051b8201358381121561050b57820160a08136031261050b57604051611217816115e1565b81356004811015610507578152611230602083016115cd565b916020820192835260408101356001600160401b03811161019d576112589036908301611721565b6040830190815260608201356001600160401b038111610a175760806112846112929236908601611721565b9360608601948552016115cd565b926080810193845251600481101561141757806112ef5750509091505160018151036112e057600192916001600160a01b036112d06112da93611855565b5191511690611af0565b016111e8565b634ec4810560e11b8752600487fd5b600181036113a757505051916001835103611398576020916001600160a01b0361131d818b94511695611855565b5191511690604051908482019263a9059cbb60e01b8452602483015260448201526044815261134d60648261162d565b519082855af11561138d5785513d6113845750803b155b61137257506001905b6112da565b635274afe760e01b8652600452602485fd5b60011415611364565b6040513d87823e3d90fd5b634ec4810560e11b8852600488fd5b600195949193919290600281036113de5750506001600160a01b036113d48161136d955194511693611855565b5191511691611a54565b9192916003146113f2575b505050506112da565b6001600160a01b038061140e95519251935116935116926119a9565b388080806113e9565b634e487b7160e01b8a52602160045260248afd5b503461019f57608036600319011261019f5761144561156c565b5061144e6115b7565b506064356001600160401b0381116101f85761146e9036906004016116a0565b50604051630a85bd0160e11b8152602090f35b503461019f57602036600319011261019f5760ff60406020926004358152600184522054166040519015158152f35b503461019f57604036600319011261019f576114ca61156c565b602435906001600160401b0382116102ee5761035a61033d6114f0933690600401611587565b7fd7a0d1d7f6ba46f49f6b82f954f7db62877265ed0e77bd1f59dc14be42790f4e8180a180f35b9050346101f85760203660031901126101f85760043563ffffffff60e01b81168091036102ee5760209250630271189760e51b811490811561155b575b5015158152f35b6301ffc9a760e01b14905038611554565b600435906001600160a01b038216820361158257565b600080fd5b9181601f84011215611582578235916001600160401b038311611582576020808501948460051b01011161158257565b602435906001600160a01b038216820361158257565b35906001600160a01b038216820361158257565b60a081019081106001600160401b038211176115fc57604052565b634e487b7160e01b600052604160045260246000fd5b606081019081106001600160401b038211176115fc57604052565b90601f801991011681019081106001600160401b038211176115fc57604052565b6001600160401b0381116115fc57601f01601f191660200190565b9291926116758261164e565b91611683604051938461162d565b829481845281830111611582578281602093846000960137010152565b9080601f83011215611582578160206116bb93359101611669565b90565b6001600160401b0381116115fc5760051b60200190565b9291906116e1816116be565b936116ef604051958661162d565b602085838152019160051b810192831161158257905b82821061171157505050565b8135815260209182019101611705565b9080601f83011215611582578160206116bb933591016116d5565b6060600319820112611582576004356001600160401b038111611582578161176691600401611587565b929092916024356001600160401b038111611582578161178891600401611587565b92909291604435906001600160401b038211611582576117aa91600401611587565b9091565b9181601f84011215611582578235916001600160401b038311611582576020838186019501011161158257565b156117e35750565b6001600160a01b039063118cdaa760e01b6000521660045260246000fd5b92919061180d816116be565b9361181b604051958661162d565b602085838152019160051b810192831161158257905b82821061183d57505050565b6020809161184a846115cd565b815201910190611831565b8051156118625760200190565b634e487b7160e01b600052603260045260246000fd5b80518210156118625760209160051b010190565b91908110156118625760051b0190565b356001600160a01b03811681036115825790565b90816020910312611582575180151581036115825790565b9080601f83011215611582578160206116bb93359101611801565b81519060005b8281106118f65750505050565b6001600160a01b038216906001600160a01b036119138287611878565b5116823b156115825760009260448492604051958693849263a22cb46560e01b845260048401528160248401525af191821561196957600192611958575b50016118e9565b60006119639161162d565b38611951565b6040513d6000823e3d90fd5b906020808351928381520192019060005b8181106119935750505090565b8251845260209384019390920191600101611986565b6001600160a01b0390939291931691823b15611582576020926001600160a01b0392611a1a926040519586948593631759616b60e11b8552611a0860009a8b998a963060048a015216602488015260a0604488015260a4870190611975565b85810360031901606487015290611975565b8284820391600319830160848701525201925af18015611a4957611a3c575050565b81611a469161162d565b50565b6040513d84823e3d90fd5b906001600160a01b0360009316918215611ab1576001600160a01b031691823b15610f24579060648492836040519586948593632142170760e11b8552306004860152602485015260448401525af18015611a4957611a3c575050565b63d92e233d60e01b8452600484fd5b3d15611aeb573d90611ad18261164e565b91611adf604051938461162d565b82523d6000602084013e565b606090565b60008080939281935af1611b02611ac0565b5015611b0a57565b631d42c86760e21b60005260046000fd5b81519160005b838110611b2e5750505050565b6001600160a01b03611b408284611878565b5116906040519163095ea7b360e01b835260048301526000602483015260208260448160006001600160a01b0389165af191821561196957600192611b87575b5001611b21565b611b9e9060203d81116109b2576109a4818361162d565b5038611b80565b80516020909101516001600160e01b0319811692919060048210611bc7575050565b6001600160e01b031960049290920360031b82901b16169150565b9291909215611bf057505050565b6001600160a01b036040519363b7a629ed60e01b855216600484015263ffffffff60e01b166024830152606060448301528181519182606483015260005b838110611c505750508160006084809484010152601f80199101168101030190fd5b60208282018101516084878401015285935001611c2e565b60ff600080516020611c978339815191525460401c1615611c8557565b631afcd79f60e31b60005260046000fdfef0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00a26469706673582212207bcd059da1e7aff1c030040878dfef590784c20b3aab7e8a6dab12e12c02f1dd64736f6c634300081e0033000000000000000000000000055429e4bf607818d2a61e0dcfac4bbd7e0bfec0

Deployed Bytecode

0x608080604052600436101561001d575b50361561001b57600080fd5b005b600090813560e01c90816301ffc9a714611517575080630fe786e1146114b0578063141a468c14611481578063150b7a021461142b5780632566e9811461116c57806331b455a5146110f45780638da5cb5b146110ce578063add99be81461108a578063b8ca8dd814611028578063bc197c8114610f92578063be13f47c14610c89578063bf110de314610b3c578063db62695f14610513578063e1084a1314610387578063e5cb3703146102f2578063ec0958ed1461021a578063ed24911d146101fc578063f23a6e61146101a25763f5d4297b0361000f573461019f576101053661173c565b92909361011e336001600160a01b0389541633146117db565b865b83811061014f57877f2b2708fed19ad1b8802fb60a678f2f20c688af39e744252eeccccbb9ba3181ed8180a180f35b61015a81838961188c565b35906001600160a01b038216820361019d5761019760019261017d83888861188c565b3561019161018c858b8d61188c565b61189c565b91611a54565b01610120565b885b80fd5b503461019f5760a036600319011261019f576101bc61156c565b506101c56115b7565b506084356001600160401b0381116101f8576101e59036906004016116a0565b5060405163f23a6e6160e01b8152602090f35b5080fd5b503461019f578060031936011261019f576020600254604051908152f35b503461019f57608036600319011261019f5761023461156c565b6024356001600160401b0381116102ee57610253903690600401611587565b916044356001600160401b0381116102ea57610273903690600401611587565b9092606435936001600160a01b03851685036102e6576102b16102b9926102bf976102aa336001600160a01b038c541633146117db565b36916116d5565b9236916116d5565b916119a9565b7f28b68992e73157421085eb6cfe9f98e8022412d41fb3b71eabe2da43b95179518180a180f35b8680fd5b8480fd5b8280fd5b503461019f57604036600319011261019f576004356001600160a01b03811681036101f857602435906001600160401b0382116102ee5761035a61033d610360933690600401611587565b610353336001600160a01b0388541633146117db565b3691611801565b906118e3565b7f803808b3da62d0bfc3234a3a0be47dc8b4ddb2b82d3327d83b2f22585408dc358180a180f35b503461019f57602036600319011261019f576004356001600160401b0381116101f8576103b8903690600401611587565b906103cf336001600160a01b0385541633146117db565b6040516103db81611612565b83815283602082015260606040820152508290605e1981360301915b8381101561050f578060051b8201358381121561050b57820160608136031261050b5760405161042681611612565b8135600481101561050757815261043f602083016115cd565b91602082019283526040810135906001600160401b03821161019d57610467913691016118c8565b90604081019182525160048110156104f3576001939291908481036104a357506001600160a01b0361049d925116905190611b1b565b016103f7565b600281036104c757506001600160a01b036104c29251169051906118e3565b61049d565b6003146104d6575b505061049d565b6001600160a01b036104ec9251169051906118e3565b38806104cf565b634e487b7160e01b88526021600452602488fd5b8780fd5b8580fd5b8480f35b5060a036600319011261019f576004356044356024356064356001600160401b0381116102ea576105489036906004016117ae565b90926084356001600160401b0381116102e6576105699036906004016117ae565b604051630abaeddd60e01b81523360048201527f000000000000000000000000055429e4bf607818d2a61e0dcfac4bbd7e0bfec06001600160a01b031695906020816024818a5afa908115610af0578a91610b1d575b508015610b0a575b15610afb576001600160a01b038954163303610a98575b60027f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f005414610a895760027f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055428110610a7a57838952600160205260ff60408a205416610a6b5790889161065436878a611669565b602081519101206040519060208201927f0a39e3a6e1a74a53a19989edd5ccf7d51664ea4371753f6add7c5e4b8a5aea7984528b604084015233606084015260808301528660a083015260c082015260c081526106b260e08261162d565b5190206002549060405190602082019261190160f01b845260228301526042820152604281526106e360628261162d565b51902092863b156102ee57606490826040519586948593636b40634160e01b8552604060048601528160448601528585013782820184018690526024830152601f01601f19168101030181875afa8015610a6057610a4c575b508552600160205260408520600160ff1982541617905582016080838203126102ea5782356001600160401b03811161050b578161077b9185016118c8565b9160208401356001600160401b0381116102e65784019180601f840112156102e6578235926107a9846116be565b936107b7604051958661162d565b80855260208086019160051b83010191838311610a175760208101915b838310610a1b575050505060408501356001600160401b03811161050757816107fe918701611721565b946060810135906001600160401b03821161019d57019080601f830112156105075781359061082c826116be565b9261083a604051948561162d565b82845260208085019360051b820101918211610a1757602001915b8183106109fa57505050835193875b8581106108b85788887fa74c8847d513feba22a0f0cb38d53081abf97562cdb293926ba243689e7c41ca8280a260017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f005580f35b6001600160a01b036108ca8284611878565b51166108d68287611878565b51906108e2838a611878565b516108ed8487611878565b5115158351610903575b50505050600101610864565b3083146109eb578c9190156109c4575050604051638e01410360e01b8152600481018290526020816024818a5afa9081156109b9578c9161098b575b50156109795781610970918c80600196955160208501845af49061096a610964611ac0565b93611ba5565b91611be2565b903880806108f7565b631b46195760e31b8b5260045260248afd5b6109ac915060203d81116109b2575b6109a4818361162d565b8101906118b0565b3861093f565b503d61099a565b6040513d8e823e3d90fd5b918184926109e6946001979651906020860190855af19061096a610964611ac0565b610970565b633f89638160e11b8d5260048dfd5b82358015158103610a1357815260209283019201610855565b8a80fd5b8980fd5b82356001600160401b038111610a4857602091610a3d878480948701016116a0565b8152019201916107d4565b8b80fd5b86610a599197929761162d565b943861073c565b6040513d89823e3d90fd5b63752eea4f60e01b8952600489fd5b63e354457160e01b8952600489fd5b633ee5aeb560e01b8952600489fd5b60405163d4ea246d60e01b81526020816004818a5afa908115610af0578a91610ad1575b50156105de57632678214d60e11b8952600489fd5b610aea915060203d6020116109b2576109a4818361162d565b38610abc565b6040513d8c823e3d90fd5b63fd4bf3d160e01b8952600489fd5b506001600160a01b0389541633146105c7565b610b36915060203d6020116109b2576109a4818361162d565b386105bf565b503461019f57610b4b3661173c565b90919293610b68969596336001600160a01b0388541633146117db565b808403610c7a57855b818110610ba057867f11f3ae7db4be0fb9f9cb9ed059a7666ac735836879e11085fd912dbeab30a9388180a180f35b6001600160a01b03610bb661018c83868861188c565b1615610c6b57610bc781838a61188c565b356001600160a01b0381169081810361019d5788602091610be9858a8c61188c565b3582610bf961018c888b8d61188c565b91604051906001600160a01b038783019463a9059cbb60e01b8652166024830152604482015260448152610c2e60648261162d565b51925af115610a605787513d610c625750803b155b610c505750600101610b71565b635274afe760e01b8852600452602487fd5b60011415610c43565b63d92e233d60e01b8752600487fd5b634ec4810560e11b8652600486fd5b503461019f57604036600319011261019f57610ca361156c565b600080516020611c97833981519152549060ff8260401c1615916001600160401b03811680159081610f8a575b6001149081610f80575b159081610f77575b50610f685767ffffffffffffffff198116600117600080516020611c978339815191525582610f3b575b5060405163c5c0369960e01b81526020816004817f000000000000000000000000055429e4bf607818d2a61e0dcfac4bbd7e0bfec06001600160a01b03165afa908115610f30578491610eea575b506001600160a01b0333911603610edb576001600160a01b03168015610ecc57825473ffffffffffffffffffffffffffffffffffffffff1916178255610d9e611c68565b610da6611c68565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055604090600a60208351610ddd858261162d565b82815201691116985c15d85b1b195d60b21b815220600160208451610e02868261162d565b82815201603160f81b81522083519060208201927fd87cd6ef79d4e2b95e15ce8abf732db51ec771f1ca2edccf22a46c729ac5647284528583015260608201524660808201523060a082015260243560c082015260c08152610e6560e08261162d565b519020600255610e73575080f35b60207fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29168ff000000000000000019600080516020611c978339815191525416600080516020611c97833981519152555160018152a180f35b630da30f6560e31b8352600483fd5b630d622feb60e01b8352600483fd5b90506020813d602011610f28575b81610f056020938361162d565b81010312610f2457516001600160a01b0381168103610f245738610d5a565b8380fd5b3d9150610ef8565b6040513d86823e3d90fd5b68ffffffffffffffffff19166801000000000000000117600080516020611c978339815191525538610d0c565b63f92ee8a960e01b8452600484fd5b90501538610ce2565b303b159150610cda565b849150610cd0565b503461019f5760a036600319011261019f57610fac61156c565b50610fb56115b7565b506044356001600160401b0381116101f857610fd5903690600401611721565b506064356001600160401b0381116101f857610ff5903690600401611721565b506084356001600160401b0381116101f8576110159036906004016116a0565b5060405163bc197c8160e01b8152602090f35b503461019f57604036600319011261019f576110636110456115b7565b61105b336001600160a01b0385541633146117db565b600435611af0565b7f0cfd0f2a11f313ddbab6a2f285921746e46f88477e009881e7ceb73d3fec60b88180a180f35b503461019f578060031936011261019f5760206040516001600160a01b037f000000000000000000000000055429e4bf607818d2a61e0dcfac4bbd7e0bfec0168152f35b503461019f578060031936011261019f576001600160a01b036020915416604051908152f35b503461019f57604036600319011261019f576004356001600160a01b03811681036101f857602435906001600160401b0382116102ee5761113f61033d611145933690600401611587565b90611b1b565b7fbcd27884cf321c8d0beb91ef8bab7459e9c6c290bf655bcbb732f0fdead3385f8180a180f35b503461019f57602036600319011261019f576004356001600160401b0381116101f85761119d903690600401611587565b906111b4336001600160a01b0385541633146117db565b6040516111c0816115e1565b83815283602082015260606040820152606080820152836080820152508290609e1981360301915b8381101561050f578060051b8201358381121561050b57820160a08136031261050b57604051611217816115e1565b81356004811015610507578152611230602083016115cd565b916020820192835260408101356001600160401b03811161019d576112589036908301611721565b6040830190815260608201356001600160401b038111610a175760806112846112929236908601611721565b9360608601948552016115cd565b926080810193845251600481101561141757806112ef5750509091505160018151036112e057600192916001600160a01b036112d06112da93611855565b5191511690611af0565b016111e8565b634ec4810560e11b8752600487fd5b600181036113a757505051916001835103611398576020916001600160a01b0361131d818b94511695611855565b5191511690604051908482019263a9059cbb60e01b8452602483015260448201526044815261134d60648261162d565b519082855af11561138d5785513d6113845750803b155b61137257506001905b6112da565b635274afe760e01b8652600452602485fd5b60011415611364565b6040513d87823e3d90fd5b634ec4810560e11b8852600488fd5b600195949193919290600281036113de5750506001600160a01b036113d48161136d955194511693611855565b5191511691611a54565b9192916003146113f2575b505050506112da565b6001600160a01b038061140e95519251935116935116926119a9565b388080806113e9565b634e487b7160e01b8a52602160045260248afd5b503461019f57608036600319011261019f5761144561156c565b5061144e6115b7565b506064356001600160401b0381116101f85761146e9036906004016116a0565b50604051630a85bd0160e11b8152602090f35b503461019f57602036600319011261019f5760ff60406020926004358152600184522054166040519015158152f35b503461019f57604036600319011261019f576114ca61156c565b602435906001600160401b0382116102ee5761035a61033d6114f0933690600401611587565b7fd7a0d1d7f6ba46f49f6b82f954f7db62877265ed0e77bd1f59dc14be42790f4e8180a180f35b9050346101f85760203660031901126101f85760043563ffffffff60e01b81168091036102ee5760209250630271189760e51b811490811561155b575b5015158152f35b6301ffc9a760e01b14905038611554565b600435906001600160a01b038216820361158257565b600080fd5b9181601f84011215611582578235916001600160401b038311611582576020808501948460051b01011161158257565b602435906001600160a01b038216820361158257565b35906001600160a01b038216820361158257565b60a081019081106001600160401b038211176115fc57604052565b634e487b7160e01b600052604160045260246000fd5b606081019081106001600160401b038211176115fc57604052565b90601f801991011681019081106001600160401b038211176115fc57604052565b6001600160401b0381116115fc57601f01601f191660200190565b9291926116758261164e565b91611683604051938461162d565b829481845281830111611582578281602093846000960137010152565b9080601f83011215611582578160206116bb93359101611669565b90565b6001600160401b0381116115fc5760051b60200190565b9291906116e1816116be565b936116ef604051958661162d565b602085838152019160051b810192831161158257905b82821061171157505050565b8135815260209182019101611705565b9080601f83011215611582578160206116bb933591016116d5565b6060600319820112611582576004356001600160401b038111611582578161176691600401611587565b929092916024356001600160401b038111611582578161178891600401611587565b92909291604435906001600160401b038211611582576117aa91600401611587565b9091565b9181601f84011215611582578235916001600160401b038311611582576020838186019501011161158257565b156117e35750565b6001600160a01b039063118cdaa760e01b6000521660045260246000fd5b92919061180d816116be565b9361181b604051958661162d565b602085838152019160051b810192831161158257905b82821061183d57505050565b6020809161184a846115cd565b815201910190611831565b8051156118625760200190565b634e487b7160e01b600052603260045260246000fd5b80518210156118625760209160051b010190565b91908110156118625760051b0190565b356001600160a01b03811681036115825790565b90816020910312611582575180151581036115825790565b9080601f83011215611582578160206116bb93359101611801565b81519060005b8281106118f65750505050565b6001600160a01b038216906001600160a01b036119138287611878565b5116823b156115825760009260448492604051958693849263a22cb46560e01b845260048401528160248401525af191821561196957600192611958575b50016118e9565b60006119639161162d565b38611951565b6040513d6000823e3d90fd5b906020808351928381520192019060005b8181106119935750505090565b8251845260209384019390920191600101611986565b6001600160a01b0390939291931691823b15611582576020926001600160a01b0392611a1a926040519586948593631759616b60e11b8552611a0860009a8b998a963060048a015216602488015260a0604488015260a4870190611975565b85810360031901606487015290611975565b8284820391600319830160848701525201925af18015611a4957611a3c575050565b81611a469161162d565b50565b6040513d84823e3d90fd5b906001600160a01b0360009316918215611ab1576001600160a01b031691823b15610f24579060648492836040519586948593632142170760e11b8552306004860152602485015260448401525af18015611a4957611a3c575050565b63d92e233d60e01b8452600484fd5b3d15611aeb573d90611ad18261164e565b91611adf604051938461162d565b82523d6000602084013e565b606090565b60008080939281935af1611b02611ac0565b5015611b0a57565b631d42c86760e21b60005260046000fd5b81519160005b838110611b2e5750505050565b6001600160a01b03611b408284611878565b5116906040519163095ea7b360e01b835260048301526000602483015260208260448160006001600160a01b0389165af191821561196957600192611b87575b5001611b21565b611b9e9060203d81116109b2576109a4818361162d565b5038611b80565b80516020909101516001600160e01b0319811692919060048210611bc7575050565b6001600160e01b031960049290920360031b82901b16169150565b9291909215611bf057505050565b6001600160a01b036040519363b7a629ed60e01b855216600484015263ffffffff60e01b166024830152606060448301528181519182606483015260005b838110611c505750508160006084809484010152601f80199101168101030190fd5b60208282018101516084878401015285935001611c2e565b60ff600080516020611c978339815191525460401c1615611c8557565b631afcd79f60e31b60005260046000fdfef0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00a26469706673582212207bcd059da1e7aff1c030040878dfef590784c20b3aab7e8a6dab12e12c02f1dd64736f6c634300081e0033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000055429e4bf607818d2a61e0dcfac4bbd7e0bfec0

-----Decoded View---------------
Arg [0] : _dZapWalletManager (address): 0x055429E4bf607818d2a61e0dcfac4bBd7e0BfeC0

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000055429e4bf607818d2a61e0dcfac4bbd7e0bfec0


Block Transaction Gas Used Reward
view all blocks ##produced##

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.