Cryo Explorer Ethereum Mainnet

Address Contract Verified

Address 0x4C60256bD2907916505079a41CCbC4979D4019D2
Balance 0 ETH
Nonce 1
Code Size 3989 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

3989 bytes
0x608060405234801561000f575f80fd5b5060043610610090575f3560e01c8063d036176b11610063578063d036176b146100f1578063d1efd30d14610104578063e949580e14610117578063f29d2f2814610155578063f2fde38b14610168575f80fd5b8063420a83e7146100945780636c19e783146100c4578063715018a6146100d95780638da5cb5b146100e1575b5f80fd5b6002546100a7906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6100d76100d2366004610b1d565b61017b565b005b6100d7610225565b5f546001600160a01b03166100a7565b6100d76100ff366004610ce1565b610238565b6001546100a7906001600160a01b031681565b610145610125366004610db2565b805160208183018101805160038252928201919093012091525460ff1681565b60405190151581526020016100bb565b6100d7610163366004610b1d565b6106fb565b6100d7610176366004610b1d565b610799565b610183610812565b6001600160a01b0381166101d05760405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b60448201526064015b60405180910390fd5b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527fbb10aee7ef5a307b8097c6a7f2892b909ff1736fd24a6a5260640c185f7153b6906020015b60405180910390a150565b61022d610812565b6102365f61086b565b565b42821161029b5760405162461bcd60e51b815260206004820152602b60248201527f77697468647261774e4654576974685369676e61747572653a205369676e617460448201526a1d5c9948195e1c1a5c995960aa1b60648201526084016101c7565b845186511480156102ad575083518551145b6103095760405162461bcd60e51b815260206004820152602760248201527f77697468647261774e4654576974685369676e61747572653a20496e76616c6960448201526619081a5b9c1d5d60ca1b60648201526084016101c7565b5f8686868686604051602001610323959493929190610e26565b60405160208183030381529060405280519060200120905061034581836108ba565b5f5b87518110156106f1575f88828151811061036357610363610ede565b602002602001015190505f88838151811061038057610380610ede565b602002602001015190505f88848151811061039d5761039d610ede565b60200260200101519050805f03610518576002546040516331a9108f60e11b8152600481018490526001600160a01b0391821691851690636352211e90602401602060405180830381865afa1580156103f8573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061041c9190610ef2565b6001600160a01b0316146104aa5760405162461bcd60e51b815260206004820152604960248201527f77697468647261774e4654576974685369676e61747572653a204e6f7420656e60448201527f6f7567682045524337323120746f6b656e7320696e207265736572766520746f60648201526820776974686472617760b81b608482015260a4016101c7565b600254604051632142170760e11b81526001600160a01b039182166004820152898216602482015260448101849052908416906342842e0e906064015f604051808303815f87803b1580156104fd575f80fd5b505af115801561050f573d5f803e3d5ffd5b5050505061068f565b600254604051627eeac760e11b81526001600160a01b039182166004820152602481018490529084169062fdd58e90604401602060405180830381865afa158015610565573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105899190610f0d565b8111156106115760405162461bcd60e51b815260206004820152604a60248201527f77697468647261774e4654576974685369676e61747572653a204e6f7420656e60448201527f6f756768204552433131353520746f6b656e7320696e207265736572766520746064820152696f20776974686472617760b01b608482015260a4016101c7565b600254604051637921219560e11b81526001600160a01b0391821660048201528982166024820152604481018490526064810183905260a060848201525f60a48201529084169063f242432a9060c4015f604051808303815f87803b158015610678575f80fd5b505af115801561068a573d5f803e3d5ffd5b505050505b604080516001600160a01b038581168252602082018590528183018490528a16606082015233608082015290517f1b3bfe851162f1adc68158faaa779a53b6b2c5cf1fd0d482ab8439b10465d3299181900360a00190a1505050600101610347565b5050505050505050565b610703610812565b6001600160a01b03811661074b5760405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b60448201526064016101c7565b600280546001600160a01b0319166001600160a01b0383169081179091556040519081527f44c3faf887af0712a59c8accc41bb5eb9be8fce47ad719e00f343a5e689c547e9060200161021a565b6107a1610812565b6001600160a01b0381166108065760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016101c7565b61080f8161086b565b50565b5f546001600160a01b031633146102365760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016101c7565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6108c482826109d1565b61091b5760405162461bcd60e51b815260206004820152602260248201527f68616e646c655369676e61747572653a20496e76616c6964207369676e617475604482015261726560f01b60648201526084016101c7565b60038160405161092b9190610f24565b9081526040519081900360200190205460ff161561099b5760405162461bcd60e51b815260206004820152602760248201527f68616e646c655369676e61747572653a205369676e617475726520616c726561604482015266191e481d5cd95960ca1b60648201526084016101c7565b60016003826040516109ad9190610f24565b908152604051908190036020019020805491151560ff199092169190911790555050565b6040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c81018390525f908190605c016040516020818303038152906040528051906020012090505f805f8551604114610a38575f945050505050610af3565b5050506020830151604084015160608501515f1a601b811015610a6357610a60601b82610f3a565b90505b5f8160ff16601b1480610a7957508160ff16601c145b15610adb57604080515f81526020810180835287905260ff841691810191909152606081018590526080810184905260019060a0016020604051602081039080840390855afa158015610ace573d5f803e3d5ffd5b5050506020604051035190505b6001546001600160a01b039081169116149450505050505b92915050565b6001600160a01b038116811461080f575f80fd5b8035610b1881610af9565b919050565b5f60208284031215610b2d575f80fd5b8135610b3881610af9565b9392505050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610b7c57610b7c610b3f565b604052919050565b5f67ffffffffffffffff821115610b9d57610b9d610b3f565b5060051b60200190565b5f82601f830112610bb6575f80fd5b8135610bc9610bc482610b84565b610b53565b8082825260208201915060208360051b860101925085831115610bea575f80fd5b602085015b83811015610c10578035610c0281610af9565b835260209283019201610bef565b5095945050505050565b5f82601f830112610c29575f80fd5b8135610c37610bc482610b84565b8082825260208201915060208360051b860101925085831115610c58575f80fd5b602085015b83811015610c10578035835260209283019201610c5d565b5f82601f830112610c84575f80fd5b813567ffffffffffffffff811115610c9e57610c9e610b3f565b610cb1601f8201601f1916602001610b53565b818152846020838601011115610cc5575f80fd5b816020850160208301375f918101602001919091529392505050565b5f805f805f8060c08789031215610cf6575f80fd5b863567ffffffffffffffff811115610d0c575f80fd5b610d1889828a01610ba7565b965050602087013567ffffffffffffffff811115610d34575f80fd5b610d4089828a01610c1a565b955050604087013567ffffffffffffffff811115610d5c575f80fd5b610d6889828a01610c1a565b945050610d7760608801610b0d565b92506080870135915060a087013567ffffffffffffffff811115610d99575f80fd5b610da589828a01610c75565b9150509295509295509295565b5f60208284031215610dc2575f80fd5b813567ffffffffffffffff811115610dd8575f80fd5b610de484828501610c75565b949350505050565b5f8151808452602084019350602083015f5b82811015610e1c578151865260209586019590910190600101610dfe565b5093949350505050565b60c080825286519082018190525f90602088019060e0840190835b81811015610e685783516001600160a01b0316835260209384019390920191600101610e41565b50508381036020850152610e7c8189610dec565b9150508281036040840152610e918187610dec565b6001600160a01b0386166060850152905083608084015282810360a0840152610ed281600b81526a436c61696d696e6741706560a81b602082015260400190565b98975050505050505050565b634e487b7160e01b5f52603260045260245ffd5b5f60208284031215610f02575f80fd5b8151610b3881610af9565b5f60208284031215610f1d575f80fd5b5051919050565b5f82518060208501845e5f920191825250919050565b60ff8181168382160190811115610af357634e487b7160e01b5f52601160045260245ffdfea2646970667358221220068f89af415e8f82f12a1db9f8d3486732bc2576c4b5fe0bb9a89cbed278c14564736f6c634300081a0033

Verified Source Code Full Match

Compiler: v0.8.26+commit.8a97fa7a EVM: cancun Optimization: Yes (200 runs)
Context.sol 24 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}
Ownable.sol 83 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}
ApesFormulasClaiming.sol 189 lines
// SPDX-License-Identifier: GPL-3.0
// solhint-disable-next-line
pragma solidity ^0.8.20;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";

/// @notice Contract to receive and distribute ETH, ERC20, ERC721 or ERC1155 tokens

contract ApesFormulasClaiming is Ownable {
    /// @notice Address of the wallet that signs messages
    address public secret;
    /// @notice Address holding the tokens
    address public tokenHolder;

    /// @notice Mapping of used signatures
    mapping(bytes => bool) public usedSignatures;

    /// @notice Event emitted when someone withdraws ERC721 or ERC1155 tokens
    event WithdrawNFT(
        address token,
        uint256 tokenId,
        uint256 amount,
        address recipient,
        address operator
    );

    /// @notice Event emitted when a new token holder is set
    event SetTokenHolder(address tokenHolder);

    /// @notice Event emitted when a new signer is set
    event SetSigner(address signer);

    /// @notice Event emitted when a signature is marked as used without withdrawing anything
    event UseSignature(bytes signature);

    constructor(address _secret, address _tokenHolder) {
        secret = _secret;
        tokenHolder = _tokenHolder;
    }

    /// @notice use a signature to withdraw ERC721 or ERC1155 tokens
    /// @param tokenAddresses Addresses of the ERC721 or ERC1155 tokens
    /// @param tokenIds Ids of the ERC721 or ERC1155 tokens
    /// @param amounts Amounts of ERC1155 tokens to withdraw (ERC721 = 0, amount not required)
    /// @param recipient Address to withdraw ERC721 or ERC1155 tokens to
    /// @param timeOut Time out to check if the signature is valid
    /// @param signature Signature to use
    function withdrawNFTWithSignature(
        address[] memory tokenAddresses,
        uint256[] memory tokenIds,
        uint256[] memory amounts,
        address recipient,
        uint256 timeOut,
        bytes memory signature
    ) external {
        require(
            timeOut > block.timestamp,
            "withdrawNFTWithSignature: Signature expired"
        );

        require(
            tokenAddresses.length == tokenIds.length &&
                tokenIds.length == amounts.length,
            "withdrawNFTWithSignature: Invalid input"
        );

        bytes32 hash = keccak256(
            abi.encode(
                tokenAddresses,
                tokenIds,
                amounts,
                recipient,
                timeOut,
                "ClaimingApe"
            )
        );

        _handleSignature(hash, signature);

        for (uint256 i = 0; i < tokenAddresses.length; i++) {
            address token = tokenAddresses[i];
            uint256 tokenId = tokenIds[i];
            uint256 amount = amounts[i];

            if (amount == 0) {
                require(
                    IERC721(token).ownerOf(tokenId) == tokenHolder,
                    "withdrawNFTWithSignature: Not enough ERC721 tokens in reserve to withdraw"
                );

                IERC721(token).safeTransferFrom(
                    tokenHolder,
                    recipient,
                    tokenId
                );
            } else {
                require(
                    amount <= IERC1155(token).balanceOf(tokenHolder, tokenId),
                    "withdrawNFTWithSignature: Not enough ERC1155 tokens in reserve to withdraw"
                );

                IERC1155(token).safeTransferFrom(
                    tokenHolder,
                    recipient,
                    tokenId,
                    amount,
                    ""
                );
            }

            emit WithdrawNFT(token, tokenId, amount, recipient, msg.sender);
        }
    }

    /// INTERNAL FUNCTIONS

    function _handleSignature(bytes32 hash, bytes memory signature) internal {
        require(
            _verifyHashSignature(hash, signature),
            "handleSignature: Invalid signature"
        );

        require(
            !usedSignatures[signature],
            "handleSignature: Signature already used"
        );

        usedSignatures[signature] = true;
    }

    /// OWNER FUNCTIONS

    /// @notice Function to set a new signer
    /// @param newSigner: Address of the new signer
    /// @dev Only the owner can set a new signer
    function setSigner(address newSigner) external onlyOwner {
        require(newSigner != address(0), "Invalid address");
        secret = newSigner;

        emit SetSigner(newSigner);
    }

    /// @notice Function to set a new token holder
    /// @param newTokenHolder: Address of the new token holder
    /// @dev Only the owner can set a new token holder
    function setTokenHolder(address newTokenHolder) external onlyOwner {
        require(newTokenHolder != address(0), "Invalid address");
        tokenHolder = newTokenHolder;

        emit SetTokenHolder(newTokenHolder);
    }

    /// @notice Internal function to check if a signature is valid
    /// @param freshHash: Hash to check
    /// @param signature: Signature to check
    function _verifyHashSignature(
        bytes32 freshHash,
        bytes memory signature
    ) internal view returns (bool) {
        bytes32 hash = keccak256(
            abi.encodePacked("\x19Ethereum Signed Message:\n32", freshHash)
        );

        bytes32 r;
        bytes32 s;
        uint8 v;

        if (signature.length != 65) {
            return false;
        }
        assembly {
            r := mload(add(signature, 32))
            s := mload(add(signature, 64))
            v := byte(0, mload(add(signature, 96)))
        }

        if (v < 27) {
            v += 27;
        }

        address signer = address(0);
        if (v == 27 || v == 28) {
            // solium-disable-next-line arg-overflow
            signer = ecrecover(hash, v, r, s);
        }
        return secret == signer;
    }
}
IERC721.sol 132 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165.sol";

/**
 * @dev Required interface of an ERC721 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 ERC721 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 ERC721
     * 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 caller.
     *
     * 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);
}
IERC1155.sol 119 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/IERC1155.sol)

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165.sol";

/**
 * @dev Required interface of an ERC1155 compliant contract, as defined in the
 * https://eips.ethereum.org/EIPS/eip-1155[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155 is IERC165 {
    /**
     * @dev Emitted when `value` tokens of token 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 amount of tokens of token type `id` owned by `account`.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    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 caller.
     */
    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 `amount` tokens of token type `id` from `from` to `to`.
     *
     * 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 `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 amount, bytes calldata data) external;

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `ids` and `amounts` 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 amounts,
        bytes calldata data
    ) external;
}
IERC165.sol 25 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * 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[EIP 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);
}

Read Contract

owner 0x8da5cb5b → address
secret 0xd1efd30d → address
tokenHolder 0x420a83e7 → address
usedSignatures 0xe949580e → bool

Write Contract 5 functions

These functions modify contract state and require a wallet transaction to execute.

renounceOwnership 0x715018a6
No parameters
setSigner 0x6c19e783
address newSigner
setTokenHolder 0xf29d2f28
address newTokenHolder
transferOwnership 0xf2fde38b
address newOwner
withdrawNFTWithSignature 0xd036176b
address[] tokenAddresses
uint256[] tokenIds
uint256[] amounts
address recipient
uint256 timeOut
bytes signature

Recent Transactions

No transactions found for this address