APE Price: $0.93 (+5.20%)

Contract

0xcD601dbae004cf33b38914fFf041C7EAEf1eEAcb

Overview

APE Balance

Apechain LogoApechain LogoApechain Logo0 APE

APE Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

Parent Transaction Hash Block From To
View All Internal Transactions

Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
FallbackHandler

Compiler Version
v0.8.19+commit.7dd6d404

Optimization Enabled:
Yes with 500 runs

Other Settings:
default evmVersion
File 1 of 9 : FallbackHandler.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;

import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol";

import "../helpers/Utils.sol";
import "./CoreStorage.sol";
import "./Lockers.sol" as Lockers;

/// @title Cyan Wallet Fallback Handler - A Cyan wallet's fallback handler.
/// @author Bulgantamir Gankhuyag - <[email protected]>
/// @author Naranbayar Uuganbayar - <[email protected]>
contract FallbackHandler is CoreStorage, IERC721Receiver, IERC1155Receiver {
    // bytes4(keccak256("isValidSignature(bytes32,bytes)"));
    bytes4 internal constant ERC1271_MAGIC_VALUE = 0x1626ba7e;

    // bytes4(keccak256("supportsInterface(bytes4)"))
    bytes4 private constant ERC165_INTERFACE = 0x01ffc9a7;

    // bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"));
    bytes4 private constant ERC1155_RECEIVED = 0xf23a6e61;

    // bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"));
    bytes4 private constant ERC1155_BATCH_RECEIVED = 0xbc197c81;

    // bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"));
    bytes4 private constant ERC721_RECEIVED = 0x150b7a02;

    event EthTransferred(address indexed receiver, uint256 value);

    /// @notice Allows the wallet to receive an ERC721 tokens.
    function onERC721Received(
        address,
        address,
        uint256,
        bytes calldata
    ) external pure returns (bytes4) {
        return ERC721_RECEIVED;
    }

    /// @notice Allows the wallet to receive an ERC1155 token.
    function onERC1155Received(
        address,
        address,
        uint256,
        uint256,
        bytes calldata
    ) external pure returns (bytes4) {
        return ERC1155_RECEIVED;
    }

    /// @notice Allows the wallet to receive an ERC1155 tokens.
    function onERC1155BatchReceived(
        address,
        address,
        uint256[] calldata,
        uint256[] calldata,
        bytes calldata
    ) external pure returns (bytes4) {
        return ERC1155_BATCH_RECEIVED;
    }

    function supportsInterface(bytes4 interfaceId) external view virtual override returns (bool) {
        return
            interfaceId == type(IERC1155Receiver).interfaceId ||
            interfaceId == type(IERC721Receiver).interfaceId ||
            interfaceId == type(IERC165).interfaceId;
    }

    /// @notice Return whether the signature provided is valid for the provided data.
    /// @param data Data signed on the behalf of the wallet.
    /// @param signature Signature byte array associated with the data.
    /// @return magicValue Returns a magic value (0x1626ba7e) if the given signature is correct.
    function isValidSignature(bytes32 data, bytes calldata signature) external view returns (bytes4 magicValue) {
        require(signature.length == 65, "Invalid signature length.");
        address signer = Utils.recoverSigner(data, signature);
        require(signer == _owner, "Invalid signer.");
        return ERC1271_MAGIC_VALUE;
    }

    function isLockedERC721(address collection, uint256 tokenId) external view returns (bool) {
        return Lockers.isLockedERC721(collection, tokenId);
    }

    function isLockedByCyanPlanERC721(address collection, uint256 tokenId) external view returns (bool) {
        return Lockers.isLockedByCyanPlanERC721(collection, tokenId);
    }

    function isLockedByApePlan(address collection, uint256 tokenId) external view returns (bool) {
        return Lockers.isLockedByApePlan(collection, tokenId);
    }

    function getLockedERC1155Amount(address collection, uint256 tokenId) external view returns (uint256) {
        return Lockers.getLockedERC1155Amount(collection, tokenId);
    }

    function getApeLockState(address collection, uint256 tokenId) external view returns (uint8) {
        return Lockers.getApeLockState(collection, tokenId);
    }
}

File 2 of 9 : IERC1155Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev _Available since v3.1._
 */
interface IERC1155Receiver is IERC165 {
    /**
     * @dev Handles the receipt of a single ERC1155 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 ERC1155 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);
}

File 3 of 9 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 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 4 of 9 : IERC165.sol
// 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);
}

File 5 of 9 : CoreStorage.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;

import { RoleManagerStorage } from "./managers/RoleManager.sol";
import { ModuleManagerStorage } from "./managers/ModuleManager.sol";

/// @title Cyan Wallet Core Storage - A Cyan wallet's core storage.
/// @dev This contract only needed if the Module wants to access main storage of the wallet.
///     Must be the very first parent of the Module contract.
/// @author Bulgantamir Gankhuyag - <[email protected]>
/// @author Naranbayar Uuganbayar - <[email protected]>
abstract contract CoreStorage is RoleManagerStorage, ModuleManagerStorage {

}

File 6 of 9 : Lockers.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;

// keccak256("wallet.YugaModule.lockedApe")
bytes32 constant APE_PLAN_LOCKER_SLOT = 0x010881fa8a1edce184936a8e4e08060bba49cb5145c9b396e6e80c0c6b0e1269;

// keccak256("wallet.ERC721Module.lockedERC721")
bytes32 constant CYAN_PLAN_LOCKER_SLOT_ERC721 = 0x25888debd3e1e584ccaebe1162c7763ec457a94078c5d0d9a1d32a926ff9973c;

// keccak256("wallet.ERC1155Module.lockedERC1155")
bytes32 constant CYAN_PLAN_LOCKER_SLOT_ERC1155 = 0xdcc609ac7fc3b6a216ce1445788736c9dbe88a58b25a13af71623e6da931efa0;

// keccak256("wallet.CryptoPunksModule.lockedCryptoPunks")
bytes32 constant CRYPTO_PUNKS_PLAN_LOCKER_SLOT = 0x67ae504a494a1bd5120fdcd8b3565de046d61ac7bb95311090f1976ec179a99a;

struct ApePlanLocker {
    /// @notice Map of the locked tokens.
    ///     Note: Collection Address => Token ID => Lock state
    mapping(address => mapping(uint256 => uint8)) tokens;
}

struct CyanPlanLockerERC721 {
    /// @notice Locked tokens count of the collection.
    ///     Note: Collection Address => Number of locked tokens
    mapping(address => uint256) count;
    /// @notice Map of the locked tokens.
    ///     Note: Collection Address => Token ID => isLocked
    mapping(address => mapping(uint256 => bool)) tokens;
}

struct CyanPlanLockerCryptoPunks {
    /// @notice Locked tokens count of the CryptoPunks.
    ///     Note: Number of locked tokens
    uint256 count;
    /// @notice Map of the locked tokens.
    ///     Note: CryptoPunk index => isLocked
    mapping(uint256 => bool) tokens;
}

struct CyanPlanLockerERC1155 {
    /// @notice Map of the locked ERC1155 tokens.
    ///     Note: Collection Address => Token ID => amount
    mapping(address => mapping(uint256 => uint256)) tokens;
}

/// @notice Checks whether the NFT is locked or not. This method checks both ERC721 lock and ApePlan lock.
/// @param collection Collection address.
/// @param tokenId Token ID.
/// @return isLocked Whether the token is locked or not.
function isLockedERC721(address collection, uint256 tokenId) view returns (bool) {
    return isLockedByCyanPlanERC721(collection, tokenId) || isLockedByApePlan(collection, tokenId);
}

/// @notice Checks whether the ERC721 token is locked or not.
/// @param collection Collection address.
/// @param tokenId Token ID.
/// @return isLocked Whether the token is locked or not.
function isLockedByCyanPlanERC721(address collection, uint256 tokenId) view returns (bool) {
    return getCyanPlanLockerERC721().tokens[collection][tokenId];
}

/// @notice Checks whether the CryptoPunks token is locked or not.
/// @param tokenId Token ID.
/// @return isLocked Whether the token is locked or not.
function isLockedByCryptoPunkPlan(uint256 tokenId) view returns (bool) {
    return getCyanPlanLockerCryptoPunks().tokens[tokenId];
}

/// @notice Checks whether the BAYC, MAYC or BAKC token is locked or not.
/// @param collection Ape collection address.
/// @param tokenId Token ID.
/// @return isLocked Whether the token is ape locked or not.
function isLockedByApePlan(address collection, uint256 tokenId) view returns (bool) {
    return getApePlanLocker().tokens[collection][tokenId] != 0;
}

/// @notice Returns amount of locked ERC1155Token items.
/// @param collection Collection address.
/// @param tokenId Token ID.
/// @return isLocked Whether the token is locked or not.
function getLockedERC1155Amount(address collection, uint256 tokenId) view returns (uint256) {
    return getCyanPlanLockerERC1155().tokens[collection][tokenId];
}

/// @notice Returns ape lock state.
/// @param collection Ape collection address.
/// @param tokenId Token ID.
/// @return Ape locks state.
function getApeLockState(address collection, uint256 tokenId) view returns (uint8) {
    return getApePlanLocker().tokens[collection][tokenId];
}

/// @dev Returns the map of the locked ERC721 tokens.
/// @return result CyanPlanLockerERC721 struct of the locked tokens.
///     Note: Collection Address => Token ID => isLocked
function getCyanPlanLockerERC721() pure returns (CyanPlanLockerERC721 storage result) {
    assembly {
        result.slot := CYAN_PLAN_LOCKER_SLOT_ERC721
    }
}

/// @dev Returns the map of the locked ERC1155 tokens.
/// @return result CyanPlanERC1155Locker struct of the locked tokens.
///     Note: Collection Address => Token ID => locked amount
function getCyanPlanLockerERC1155() pure returns (CyanPlanLockerERC1155 storage result) {
    assembly {
        result.slot := CYAN_PLAN_LOCKER_SLOT_ERC1155
    }
}

/// @dev Returns the map of the locked Crypto Punks.
/// @return result CryptoPunksPlanLocker struct of the locked tokens.
///     Note: CryptoPunk index => isLocked
function getCyanPlanLockerCryptoPunks() pure returns (CyanPlanLockerCryptoPunks storage result) {
    assembly {
        result.slot := CRYPTO_PUNKS_PLAN_LOCKER_SLOT
    }
}

/// @dev Returns the map of the locked tokens.
/// @return result ApePlanLocker struct of the locked tokens.
///     Note: Collection Address => Token ID => Lock state
function getApePlanLocker() pure returns (ApePlanLocker storage result) {
    assembly {
        result.slot := APE_PLAN_LOCKER_SLOT
    }
}

File 7 of 9 : ModuleManager.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;

/// @title Cyan Wallet Module Manager Storage - A Cyan wallet's module manager's storage.
/// @author Bulgantamir Gankhuyag - <[email protected]>
/// @author Naranbayar Uuganbayar - <[email protected]>
abstract contract ModuleManagerStorage {
    /// @notice Storing allowed contract methods.
    ///     Note: Target Contract Address => Sighash of method => Module address
    mapping(address => mapping(bytes4 => address)) internal _modules;

    /// @notice Storing internally allowed module methods.
    ///     Note: Sighash of module method => Module address
    mapping(bytes4 => address) internal _internalModules;
}

/// @title Cyan Wallet Module Manager - A Cyan wallet's module manager's functionalities.
/// @author Bulgantamir Gankhuyag - <[email protected]>
/// @author Naranbayar Uuganbayar - <[email protected]>
abstract contract IModuleManager is ModuleManagerStorage {
    event SetModule(address target, bytes4 funcHash, address oldModule, address newModule);
    event SetInternalModule(bytes4 funcHash, address oldModule, address newModule);

    /// @notice Sets the handler module of the target's function.
    /// @param target Address of the target contract.
    /// @param funcHash Sighash of the target contract's method.
    /// @param module Address of the handler module.
    function setModule(
        address target,
        bytes4 funcHash,
        address module
    ) external virtual;

    /// @notice Returns a handling module of the target function.
    /// @param target Address of the target contract.
    /// @param funcHash Sighash of the target contract's method.
    /// @return module Handler module.
    function getModule(address target, bytes4 funcHash) external view returns (address) {
        return _modules[target][funcHash];
    }

    /// @notice Sets the internal handler module of the function.
    /// @param funcHash Sighash of the module method.
    /// @param module Address of the handler module.
    function setInternalModule(bytes4 funcHash, address module) external virtual;

    /// @notice Returns an internal handling module of the given function.
    /// @param funcHash Sighash of the module's method.
    /// @return module Handler module.
    function getInternalModule(bytes4 funcHash) external view returns (address) {
        return _internalModules[funcHash];
    }

    /// @notice Used to call module functions on the wallet.
    ///     Usually used to call locking function of the module on the wallet.
    /// @param data Data payload of the transaction.
    /// @return Result of the execution.
    function executeModule(bytes memory data) external virtual returns (bytes memory);
}

File 8 of 9 : RoleManager.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;

/// @title Cyan Wallet Role Manager - A Cyan wallet's role manager's storage.
/// @author Bulgantamir Gankhuyag - <[email protected]>
/// @author Naranbayar Uuganbayar - <[email protected]>
abstract contract RoleManagerStorage {
    address[3] internal _deprecatedOperators; // Deprecated
    address internal _admin;
    address internal _owner;
    mapping(address => bool) internal _operators;
}

/// @title Cyan Wallet Role Manager - A Cyan wallet's role manager's functionalities.
/// @author Bulgantamir Gankhuyag - <[email protected]>
/// @author Naranbayar Uuganbayar - <[email protected]>
abstract contract IRoleManager is RoleManagerStorage {
    event SetOwner(address owner);
    event SetAdmin(address admin);
    event SetOperator(address operator, bool isActive);

    modifier onlyOperator() {
        _checkOnlyOperator();
        _;
    }

    modifier onlyAdmin() {
        _checkOnlyAdmin();
        _;
    }

    modifier onlyOwner() {
        _checkOnlyOwner();
        _;
    }

    constructor(address admin) {
        require(admin != address(0x0), "Invalid admin address.");
        _admin = admin;
    }

    /// @notice Returns current owner of the wallet.
    /// @return Address of the current owner.
    function getOwner() external view virtual returns (address);

    /// @notice Changes the current admin.
    /// @param admin New admin address.
    function setAdmin(address admin) external virtual;

    /// @notice Returns current admin of the core contract.
    /// @return Address of the current admin.
    function getAdmin() external view virtual returns (address);

    /// @notice Sets the operator status.
    /// @param operator Operator address.
    /// @param isActive Is active or not.
    function setOperator(address operator, bool isActive) external virtual;

    /// @notice Checks whether the given address is an operator.
    /// @param operator Address that will be checked.
    /// @return result Boolean result.
    function isOperator(address operator) external view virtual returns (bool result);

    /// @notice Checks whether the message sender is an operator.
    function _checkOnlyOperator() internal view virtual;

    /// @notice Checks whether the message sender is an admin.
    function _checkOnlyAdmin() internal view virtual;

    /// @notice Checks whether the message sender is an owner.
    function _checkOnlyOwner() internal view virtual;
}

File 9 of 9 : Utils.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;

library Utils {
    /// @notice Executes a transaction to the given address.
    /// @param to Target address.
    /// @param value Native token value to be sent to the address.
    /// @param data Data to be sent to the address.
    /// @return result Result of the transaciton.
    function _execute(
        address to,
        uint256 value,
        bytes memory data
    ) internal returns (bytes memory result) {
        assembly {
            let success := call(gas(), to, value, add(data, 0x20), mload(data), 0, 0)

            mstore(result, returndatasize())
            returndatacopy(add(result, 0x20), 0, returndatasize())

            if eq(success, 0) {
                revert(add(result, 0x20), returndatasize())
            }
        }
    }

    /// @notice Recover signer address from signature.
    /// @param signedHash Arbitrary length data signed on the behalf of the wallet.
    /// @param signature Signature byte array associated with signedHash.
    /// @return Recovered signer address.
    function recoverSigner(bytes32 signedHash, bytes memory signature) internal pure returns (address) {
        uint8 v;
        bytes32 r;
        bytes32 s;
        // we jump 32 (0x20) as the first slot of bytes contains the length
        // we jump 65 (0x41) per signature
        // for v we load 32 bytes ending with v (the first 31 come from s) then apply a mask
        assembly {
            r := mload(add(signature, 0x20))
            s := mload(add(signature, 0x40))
            v := byte(0, mload(add(signature, 0x60)))
        }
        require(v == 27 || v == 28, "Bad v value in signature.");

        address recoveredAddress = ecrecover(signedHash, v, r, s);
        require(recoveredAddress != address(0), "ecrecover returned 0.");
        return recoveredAddress;
    }

    /// @notice Helper method to parse the function selector from data.
    /// @param data Any data to be parsed, mostly calldata of transaction.
    /// @return result Parsed function sighash.
    function parseFunctionSelector(bytes memory data) internal pure returns (bytes4 result) {
        require(data.length >= 4, "Invalid data.");
        assembly {
            result := mload(add(data, 0x20))
        }
    }

    /// @notice Parse uint256 from given data.
    /// @param data Any data to be parsed, mostly calldata of transaction.
    /// @param position Position in the data.
    /// @return result Uint256 parsed from given data.
    function getUint256At(bytes memory data, uint8 position) internal pure returns (uint256 result) {
        assembly {
            result := mload(add(data, add(position, 0x20)))
        }
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 500
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"EthTransferred","type":"event"},{"inputs":[{"internalType":"address","name":"collection","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApeLockState","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"collection","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getLockedERC1155Amount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"collection","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"isLockedByApePlan","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"collection","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"isLockedByCyanPlanERC721","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"collection","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"isLockedERC721","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"data","type":"bytes32"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"isValidSignature","outputs":[{"internalType":"bytes4","name":"magicValue","type":"bytes4"}],"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":"pure","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":"pure","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":"pure","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b5061095d806100206000396000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c806397708dd01161006657806397708dd01461014a578063b1296e341461015d578063bc197c8114610182578063be06124c146101a4578063f23a6e61146101b757600080fd5b806301ffc9a7146100a3578063150b7a02146100cb5780631626ba7e146101035780631ff3e6761461011657806334b56e2e14610137575b600080fd5b6100b66100b136600461063b565b6101d7565b60405190151581526020015b60405180910390f35b6100ea6100d93660046106ca565b630a85bd0160e11b95945050505050565b6040516001600160e01b031990911681526020016100c2565b6100ea610111366004610739565b610229565b610129610124366004610785565b610333565b6040519081526020016100c2565b6100b6610145366004610785565b61037e565b6100b6610158366004610785565b6103c9565b61017061016b366004610785565b6103d5565b60405160ff90911681526020016100c2565b6100ea6101903660046107f4565b63bc197c8160e01b98975050505050505050565b6100b66101b2366004610785565b610420565b6100ea6101c53660046108af565b63f23a6e6160e01b9695505050505050565b60006001600160e01b03198216630271189760e51b148061020857506001600160e01b03198216630a85bd0160e11b145b8061022357506001600160e01b031982166301ffc9a760e01b145b92915050565b6000604182146102805760405162461bcd60e51b815260206004820152601960248201527f496e76616c6964207369676e6174757265206c656e6774682e0000000000000060448201526064015b60405180910390fd5b60006102c28585858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061046d92505050565b6004549091506001600160a01b038083169116146103225760405162461bcd60e51b815260206004820152600f60248201527f496e76616c6964207369676e65722e00000000000000000000000000000000006044820152606401610277565b50630b135d3f60e11b949350505050565b6001600160a01b03821660009081527fdcc609ac7fc3b6a216ce1445788736c9dbe88a58b25a13af71623e6da931efa0602090815260408083208484529091528120545b9392505050565b6001600160a01b03821660009081527f25888debd3e1e584ccaebe1162c7763ec457a94078c5d0d9a1d32a926ff9973d6020908152604080832084845290915281205460ff16610377565b600061037783836105a2565b6001600160a01b03821660009081527f010881fa8a1edce184936a8e4e08060bba49cb5145c9b396e6e80c0c6b0e12696020908152604080832084845290915281205460ff16610377565b6001600160a01b03821660009081527f010881fa8a1edce184936a8e4e08060bba49cb5145c9b396e6e80c0c6b0e12696020908152604080832084845290915281205460ff161515610377565b60208101516040820151606083015160009290831a91601b83148061049557508260ff16601c145b6104e15760405162461bcd60e51b815260206004820152601960248201527f42616420762076616c756520696e207369676e61747572652e000000000000006044820152606401610277565b6040805160008082526020820180845289905260ff861692820192909252606081018490526080810183905260019060a0016020604051602081039080840390855afa158015610535573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166105985760405162461bcd60e51b815260206004820152601560248201527f65637265636f7665722072657475726e656420302e00000000000000000000006044820152606401610277565b9695505050505050565b6001600160a01b03821660009081527f25888debd3e1e584ccaebe1162c7763ec457a94078c5d0d9a1d32a926ff9973d6020908152604080832084845290915281205460ff168061037757506001600160a01b03831660009081527f010881fa8a1edce184936a8e4e08060bba49cb5145c9b396e6e80c0c6b0e12696020908152604080832085845290915290205460ff161515610377565b60006020828403121561064d57600080fd5b81356001600160e01b03198116811461037757600080fd5b80356001600160a01b038116811461067c57600080fd5b919050565b60008083601f84011261069357600080fd5b50813567ffffffffffffffff8111156106ab57600080fd5b6020830191508360208285010111156106c357600080fd5b9250929050565b6000806000806000608086880312156106e257600080fd5b6106eb86610665565b94506106f960208701610665565b935060408601359250606086013567ffffffffffffffff81111561071c57600080fd5b61072888828901610681565b969995985093965092949392505050565b60008060006040848603121561074e57600080fd5b83359250602084013567ffffffffffffffff81111561076c57600080fd5b61077886828701610681565b9497909650939450505050565b6000806040838503121561079857600080fd5b6107a183610665565b946020939093013593505050565b60008083601f8401126107c157600080fd5b50813567ffffffffffffffff8111156107d957600080fd5b6020830191508360208260051b85010111156106c357600080fd5b60008060008060008060008060a0898b03121561081057600080fd5b61081989610665565b975061082760208a01610665565b9650604089013567ffffffffffffffff8082111561084457600080fd5b6108508c838d016107af565b909850965060608b013591508082111561086957600080fd5b6108758c838d016107af565b909650945060808b013591508082111561088e57600080fd5b5061089b8b828c01610681565b999c989b5096995094979396929594505050565b60008060008060008060a087890312156108c857600080fd5b6108d187610665565b95506108df60208801610665565b94506040870135935060608701359250608087013567ffffffffffffffff81111561090957600080fd5b61091589828a01610681565b979a969950949750929593949250505056fea26469706673582212205dca761282b9f9dfbf1a9a007abf560e0af3aa22927176d95e6e2e892401c14c64736f6c63430008130033

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061009e5760003560e01c806397708dd01161006657806397708dd01461014a578063b1296e341461015d578063bc197c8114610182578063be06124c146101a4578063f23a6e61146101b757600080fd5b806301ffc9a7146100a3578063150b7a02146100cb5780631626ba7e146101035780631ff3e6761461011657806334b56e2e14610137575b600080fd5b6100b66100b136600461063b565b6101d7565b60405190151581526020015b60405180910390f35b6100ea6100d93660046106ca565b630a85bd0160e11b95945050505050565b6040516001600160e01b031990911681526020016100c2565b6100ea610111366004610739565b610229565b610129610124366004610785565b610333565b6040519081526020016100c2565b6100b6610145366004610785565b61037e565b6100b6610158366004610785565b6103c9565b61017061016b366004610785565b6103d5565b60405160ff90911681526020016100c2565b6100ea6101903660046107f4565b63bc197c8160e01b98975050505050505050565b6100b66101b2366004610785565b610420565b6100ea6101c53660046108af565b63f23a6e6160e01b9695505050505050565b60006001600160e01b03198216630271189760e51b148061020857506001600160e01b03198216630a85bd0160e11b145b8061022357506001600160e01b031982166301ffc9a760e01b145b92915050565b6000604182146102805760405162461bcd60e51b815260206004820152601960248201527f496e76616c6964207369676e6174757265206c656e6774682e0000000000000060448201526064015b60405180910390fd5b60006102c28585858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061046d92505050565b6004549091506001600160a01b038083169116146103225760405162461bcd60e51b815260206004820152600f60248201527f496e76616c6964207369676e65722e00000000000000000000000000000000006044820152606401610277565b50630b135d3f60e11b949350505050565b6001600160a01b03821660009081527fdcc609ac7fc3b6a216ce1445788736c9dbe88a58b25a13af71623e6da931efa0602090815260408083208484529091528120545b9392505050565b6001600160a01b03821660009081527f25888debd3e1e584ccaebe1162c7763ec457a94078c5d0d9a1d32a926ff9973d6020908152604080832084845290915281205460ff16610377565b600061037783836105a2565b6001600160a01b03821660009081527f010881fa8a1edce184936a8e4e08060bba49cb5145c9b396e6e80c0c6b0e12696020908152604080832084845290915281205460ff16610377565b6001600160a01b03821660009081527f010881fa8a1edce184936a8e4e08060bba49cb5145c9b396e6e80c0c6b0e12696020908152604080832084845290915281205460ff161515610377565b60208101516040820151606083015160009290831a91601b83148061049557508260ff16601c145b6104e15760405162461bcd60e51b815260206004820152601960248201527f42616420762076616c756520696e207369676e61747572652e000000000000006044820152606401610277565b6040805160008082526020820180845289905260ff861692820192909252606081018490526080810183905260019060a0016020604051602081039080840390855afa158015610535573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166105985760405162461bcd60e51b815260206004820152601560248201527f65637265636f7665722072657475726e656420302e00000000000000000000006044820152606401610277565b9695505050505050565b6001600160a01b03821660009081527f25888debd3e1e584ccaebe1162c7763ec457a94078c5d0d9a1d32a926ff9973d6020908152604080832084845290915281205460ff168061037757506001600160a01b03831660009081527f010881fa8a1edce184936a8e4e08060bba49cb5145c9b396e6e80c0c6b0e12696020908152604080832085845290915290205460ff161515610377565b60006020828403121561064d57600080fd5b81356001600160e01b03198116811461037757600080fd5b80356001600160a01b038116811461067c57600080fd5b919050565b60008083601f84011261069357600080fd5b50813567ffffffffffffffff8111156106ab57600080fd5b6020830191508360208285010111156106c357600080fd5b9250929050565b6000806000806000608086880312156106e257600080fd5b6106eb86610665565b94506106f960208701610665565b935060408601359250606086013567ffffffffffffffff81111561071c57600080fd5b61072888828901610681565b969995985093965092949392505050565b60008060006040848603121561074e57600080fd5b83359250602084013567ffffffffffffffff81111561076c57600080fd5b61077886828701610681565b9497909650939450505050565b6000806040838503121561079857600080fd5b6107a183610665565b946020939093013593505050565b60008083601f8401126107c157600080fd5b50813567ffffffffffffffff8111156107d957600080fd5b6020830191508360208260051b85010111156106c357600080fd5b60008060008060008060008060a0898b03121561081057600080fd5b61081989610665565b975061082760208a01610665565b9650604089013567ffffffffffffffff8082111561084457600080fd5b6108508c838d016107af565b909850965060608b013591508082111561086957600080fd5b6108758c838d016107af565b909650945060808b013591508082111561088e57600080fd5b5061089b8b828c01610681565b999c989b5096995094979396929594505050565b60008060008060008060a087890312156108c857600080fd5b6108d187610665565b95506108df60208801610665565b94506040870135935060608701359250608087013567ffffffffffffffff81111561090957600080fd5b61091589828a01610681565b979a969950949750929593949250505056fea26469706673582212205dca761282b9f9dfbf1a9a007abf560e0af3aa22927176d95e6e2e892401c14c64736f6c63430008130033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits

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.