APE Price: $0.94 (+4.52%)

Contract

0xd95f3090798D566a35C9D8fF5Ed0836550C40e5A

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:
ERC1155Module

Compiler Version
v0.8.19+commit.7dd6d404

Optimization Enabled:
Yes with 500 runs

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

import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";

import "../core/Lockers.sol" as Lockers;
import "../interfaces/core/IModule.sol";
import "../helpers/Utils.sol";

/// @title Cyan Wallet ERC1155 Module - A Cyan wallet's ERC1155 token handling module.
/// @author Bulgantamir Gankhuyag - <[email protected]>
/// @author Naranbayar Uuganbayar - <[email protected]>
contract ERC1155Module is IModule {
    bytes4 private constant ERC1155_SAFE_TRANSFER_FROM = IERC1155.safeTransferFrom.selector;
    bytes4 private constant ERC1155_SAFE_BATCH_TRANSFER_FROM = IERC1155.safeBatchTransferFrom.selector;
    bytes4 private constant ERC1155_SET_APPROVAL_FOR_ALL = IERC1155.setApprovalForAll.selector;

    event IncreaseLockedERC1155Token(address collection, uint256 tokenId, uint256 amount);
    event DecreaseLockedERC1155Token(address collection, uint256 tokenId, uint256 amount);

    /// @notice Increases locked ERC1155 tokens.
    /// @param collection Token address.
    /// @param tokenId ID of the token.
    /// @param amount Token amount to be locked.
    function increaseLockedERC1155Token(
        address collection,
        uint256 tokenId,
        uint256 amount
    ) external {
        require(_isAvailable(collection, tokenId, amount), "Cannot perform this action on locked token.");
        Lockers.getCyanPlanLockerERC1155().tokens[collection][tokenId] += amount;
        emit IncreaseLockedERC1155Token(collection, tokenId, amount);
    }

    /// @notice Decrease locked ERC1155 tokens.
    /// @param collection Token address.
    /// @param tokenId ID of the token.
    /// @param amount Token amount to be unlocked.
    function decreaseLockedERC1155Token(
        address collection,
        uint256 tokenId,
        uint256 amount
    ) external {
        require(
            Lockers.getLockedERC1155Amount(collection, tokenId) >= amount,
            "Amount must not be greater than locked amount."
        );
        Lockers.getCyanPlanLockerERC1155().tokens[collection][tokenId] -= amount;
        emit DecreaseLockedERC1155Token(collection, tokenId, amount);
    }

    /// @inheritdoc IModule
    function handleTransaction(
        address to,
        uint256 value,
        bytes calldata data
    ) external payable override returns (bytes memory) {
        bytes4 funcHash = Utils.parseFunctionSelector(data);
        if (funcHash == ERC1155_SAFE_TRANSFER_FROM) {
            (, , uint256 tokenId, uint256 amount, ) = abi.decode(data[4:], (address, address, uint256, uint256, bytes));
            require(_isAvailable(to, tokenId, amount), "Cannot perform this action on locked token.");
        }

        if (funcHash == ERC1155_SAFE_BATCH_TRANSFER_FROM) {
            (, , uint256[] memory ids, uint256[] memory amounts, ) = abi.decode(
                data[4:],
                (address, address, uint256[], uint256[], bytes)
            );
            require(ids.length == amounts.length, "IDs and amounts length mismatch");

            for (uint256 i = 0; i < ids.length; i++) {
                require(_isAvailable(to, ids[i], amounts[i]), "Cannot perform this action on locked token.");
            }
        }

        require(funcHash != ERC1155_SET_APPROVAL_FOR_ALL, "Cannot perform this action.");

        return Utils._execute(to, value, data);
    }

    /// @notice Allows operators to transfer out non locked ERC1155 tokens.
    ///     Note: Can only transfer if token is locked.
    /// @param collection Collection address.
    /// @param tokenId Token ID.
    /// @param amount Amount.
    /// @param to Receiver address.
    function transferNonLockedERC1155(
        address collection,
        uint256 tokenId,
        uint256 amount,
        address to
    ) external returns (bytes memory) {
        uint256 balance = IERC1155(collection).balanceOf(address(this), tokenId);
        require(
            (balance - Lockers.getLockedERC1155Amount(collection, tokenId)) >= amount,
            "Cannot perform this action on locked token."
        );

        bytes memory data = abi.encodeWithSelector(
            ERC1155_SAFE_TRANSFER_FROM,
            address(this),
            to,
            tokenId,
            amount,
            "0x"
        );
        return Utils._execute(collection, 0, data);
    }

    /// @dev Checks the amount of non-locked tokens available in the wallet.
    /// @param collection Address of the collection.
    /// @param tokenId Token ID.
    /// @param amount Requesting amount.
    /// @return Boolean to give truthy if requested amount of non-locked tokens are available.
    function _isAvailable(
        address collection,
        uint256 tokenId,
        uint256 amount
    ) internal view returns (bool) {
        uint256 balance = IERC1155(collection).balanceOf(address(this), tokenId);
        uint256 lockedAmount = Lockers.getLockedERC1155Amount(collection, tokenId);

        return lockedAmount + amount <= balance;
    }
}

File 2 of 6 : IERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.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;
}

File 3 of 6 : 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 4 of 6 : 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 5 of 6 : 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)))
        }
    }
}

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

interface IModule {
    /// @notice Executes given transaction data to given address.
    /// @param to Target contract address.
    /// @param value Value of the given transaction.
    /// @param data Calldata of the transaction.
    /// @return Result of the execution.
    function handleTransaction(
        address to,
        uint256 value,
        bytes calldata data
    ) external payable returns (bytes memory);
}

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":false,"internalType":"address","name":"collection","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"DecreaseLockedERC1155Token","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"collection","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"IncreaseLockedERC1155Token","type":"event"},{"inputs":[{"internalType":"address","name":"collection","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"decreaseLockedERC1155Token","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"handleTransaction","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"collection","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"increaseLockedERC1155Token","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"collection","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"transferNonLockedERC1155","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50610d64806100206000396000f3fe60806040526004361061003f5760003560e01c8063865d533f14610044578063a8763a2414610066578063ab6a377b1461009c578063f13304c5146100af575b600080fd5b34801561005057600080fd5b5061006461005f3660046108e7565b6100cf565b005b34801561007257600080fd5b5061008661008136600461091c565b6101fa565b6040516100939190610966565b60405180910390f35b6100866100aa3660046109b4565b610383565b3480156100bb57600080fd5b506100646100ca3660046108e7565b610669565b806100da8484610772565b10156101535760405162461bcd60e51b815260206004820152602e60248201527f416d6f756e74206d757374206e6f742062652067726561746572207468616e2060448201527f6c6f636b656420616d6f756e742e00000000000000000000000000000000000060648201526084015b60405180910390fd5b6001600160a01b03831660009081527fdcc609ac7fc3b6a216ce1445788736c9dbe88a58b25a13af71623e6da931efa060209081526040808320858452909152812080548392906101a5908490610a53565b9091555050604080516001600160a01b0385168152602081018490529081018290527ff7f9d1ebcc273e3facb7f6af8304ebd2747fee26308e240f2449d32db7e99003906060015b60405180910390a1505050565b604051627eeac760e11b8152306004820152602481018490526060906000906001600160a01b0387169062fdd58e90604401602060405180830381865afa158015610249573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061026d9190610a66565b90508361027a8787610772565b6102849083610a53565b10156102e65760405162461bcd60e51b815260206004820152602b60248201527f43616e6e6f7420706572666f726d207468697320616374696f6e206f6e206c6f60448201526a31b5b2b2103a37b5b2b71760a91b606482015260840161014a565b604080513060248201526001600160a01b0385166044820152606481018790526084810186905260a060a4820152600260c482015261060f60f31b60e480830191909152825180830390910181526101049091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16637921219560e11b179052610378876000836107bc565b979650505050505050565b606060006103c684848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506107ea92505050565b90506306dede6b60e11b6001600160e01b0319821601610472576000806103f08560048189610a7f565b8101906103fd9190610b60565b5093509350505061040f888383610836565b61046f5760405162461bcd60e51b815260206004820152602b60248201527f43616e6e6f7420706572666f726d207468697320616374696f6e206f6e206c6f60448201526a31b5b2b2103a37b5b2b71760a91b606482015260840161014a565b50505b6368a69e9560e11b6001600160e01b03198216016105be5760008061049a8560048189610a7f565b8101906104a79190610c4b565b5093509350505080518251146104ff5760405162461bcd60e51b815260206004820152601f60248201527f49447320616e6420616d6f756e7473206c656e677468206d69736d6174636800604482015260640161014a565b60005b82518110156105ba576105488984838151811061052157610521610cec565b602002602001015184848151811061053b5761053b610cec565b6020026020010151610836565b6105a85760405162461bcd60e51b815260206004820152602b60248201527f43616e6e6f7420706572666f726d207468697320616374696f6e206f6e206c6f60448201526a31b5b2b2103a37b5b2b71760a91b606482015260840161014a565b806105b281610d02565b915050610502565b5050505b635dd34b9b60e01b6001600160e01b031982160161061e5760405162461bcd60e51b815260206004820152601b60248201527f43616e6e6f7420706572666f726d207468697320616374696f6e2e0000000000604482015260640161014a565b61065f868686868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506107bc92505050565b9695505050505050565b610674838383610836565b6106d45760405162461bcd60e51b815260206004820152602b60248201527f43616e6e6f7420706572666f726d207468697320616374696f6e206f6e206c6f60448201526a31b5b2b2103a37b5b2b71760a91b606482015260840161014a565b6001600160a01b03831660009081527fdcc609ac7fc3b6a216ce1445788736c9dbe88a58b25a13af71623e6da931efa06020908152604080832085845290915281208054839290610726908490610d1b565b9091555050604080516001600160a01b0385168152602081018490529081018290527f54b3da1f18a19455f8e1343b4fa89829db905f60a95ee3bb431a96a9f13f7288906060016101ed565b6001600160a01b03821660009081527fdcc609ac7fc3b6a216ce1445788736c9dbe88a58b25a13af71623e6da931efa0602090815260408083208484529091529020545b92915050565b606060008083516020850186885af13d82523d6000602084013e806107e2573d60208301fd5b509392505050565b600060048251101561082e5760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b2103230ba309760991b604482015260640161014a565b506020015190565b604051627eeac760e11b81523060048201526024810183905260009081906001600160a01b0386169062fdd58e90604401602060405180830381865afa158015610884573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108a89190610a66565b905060006108b68686610772565b9050816108c38583610d1b565b11159695505050505050565b6001600160a01b03811681146108e457600080fd5b50565b6000806000606084860312156108fc57600080fd5b8335610907816108cf565b95602085013595506040909401359392505050565b6000806000806080858703121561093257600080fd5b843561093d816108cf565b93506020850135925060408501359150606085013561095b816108cf565b939692955090935050565b600060208083528351808285015260005b8181101561099357858101830151858201604001528201610977565b506000604082860101526040601f19601f8301168501019250505092915050565b600080600080606085870312156109ca57600080fd5b84356109d5816108cf565b935060208501359250604085013567ffffffffffffffff808211156109f957600080fd5b818701915087601f830112610a0d57600080fd5b813581811115610a1c57600080fd5b886020828501011115610a2e57600080fd5b95989497505060200194505050565b634e487b7160e01b600052601160045260246000fd5b818103818111156107b6576107b6610a3d565b600060208284031215610a7857600080fd5b5051919050565b60008085851115610a8f57600080fd5b83861115610a9c57600080fd5b5050820193919092039150565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610ae857610ae8610aa9565b604052919050565b600082601f830112610b0157600080fd5b813567ffffffffffffffff811115610b1b57610b1b610aa9565b610b2e601f8201601f1916602001610abf565b818152846020838601011115610b4357600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a08688031215610b7857600080fd5b8535610b83816108cf565b94506020860135610b93816108cf565b93506040860135925060608601359150608086013567ffffffffffffffff811115610bbd57600080fd5b610bc988828901610af0565b9150509295509295909350565b600082601f830112610be757600080fd5b8135602067ffffffffffffffff821115610c0357610c03610aa9565b8160051b610c12828201610abf565b9283528481018201928281019087851115610c2c57600080fd5b83870192505b8483101561037857823582529183019190830190610c32565b600080600080600060a08688031215610c6357600080fd5b8535610c6e816108cf565b94506020860135610c7e816108cf565b9350604086013567ffffffffffffffff80821115610c9b57600080fd5b610ca789838a01610bd6565b94506060880135915080821115610cbd57600080fd5b610cc989838a01610bd6565b93506080880135915080821115610cdf57600080fd5b50610bc988828901610af0565b634e487b7160e01b600052603260045260246000fd5b600060018201610d1457610d14610a3d565b5060010190565b808201808211156107b6576107b6610a3d56fea2646970667358221220c9f8088e21602a1b415a884e84558b7c0b6fc4fdeb8da26ca94013bd322d01bc64736f6c63430008130033

Deployed Bytecode

0x60806040526004361061003f5760003560e01c8063865d533f14610044578063a8763a2414610066578063ab6a377b1461009c578063f13304c5146100af575b600080fd5b34801561005057600080fd5b5061006461005f3660046108e7565b6100cf565b005b34801561007257600080fd5b5061008661008136600461091c565b6101fa565b6040516100939190610966565b60405180910390f35b6100866100aa3660046109b4565b610383565b3480156100bb57600080fd5b506100646100ca3660046108e7565b610669565b806100da8484610772565b10156101535760405162461bcd60e51b815260206004820152602e60248201527f416d6f756e74206d757374206e6f742062652067726561746572207468616e2060448201527f6c6f636b656420616d6f756e742e00000000000000000000000000000000000060648201526084015b60405180910390fd5b6001600160a01b03831660009081527fdcc609ac7fc3b6a216ce1445788736c9dbe88a58b25a13af71623e6da931efa060209081526040808320858452909152812080548392906101a5908490610a53565b9091555050604080516001600160a01b0385168152602081018490529081018290527ff7f9d1ebcc273e3facb7f6af8304ebd2747fee26308e240f2449d32db7e99003906060015b60405180910390a1505050565b604051627eeac760e11b8152306004820152602481018490526060906000906001600160a01b0387169062fdd58e90604401602060405180830381865afa158015610249573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061026d9190610a66565b90508361027a8787610772565b6102849083610a53565b10156102e65760405162461bcd60e51b815260206004820152602b60248201527f43616e6e6f7420706572666f726d207468697320616374696f6e206f6e206c6f60448201526a31b5b2b2103a37b5b2b71760a91b606482015260840161014a565b604080513060248201526001600160a01b0385166044820152606481018790526084810186905260a060a4820152600260c482015261060f60f31b60e480830191909152825180830390910181526101049091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16637921219560e11b179052610378876000836107bc565b979650505050505050565b606060006103c684848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506107ea92505050565b90506306dede6b60e11b6001600160e01b0319821601610472576000806103f08560048189610a7f565b8101906103fd9190610b60565b5093509350505061040f888383610836565b61046f5760405162461bcd60e51b815260206004820152602b60248201527f43616e6e6f7420706572666f726d207468697320616374696f6e206f6e206c6f60448201526a31b5b2b2103a37b5b2b71760a91b606482015260840161014a565b50505b6368a69e9560e11b6001600160e01b03198216016105be5760008061049a8560048189610a7f565b8101906104a79190610c4b565b5093509350505080518251146104ff5760405162461bcd60e51b815260206004820152601f60248201527f49447320616e6420616d6f756e7473206c656e677468206d69736d6174636800604482015260640161014a565b60005b82518110156105ba576105488984838151811061052157610521610cec565b602002602001015184848151811061053b5761053b610cec565b6020026020010151610836565b6105a85760405162461bcd60e51b815260206004820152602b60248201527f43616e6e6f7420706572666f726d207468697320616374696f6e206f6e206c6f60448201526a31b5b2b2103a37b5b2b71760a91b606482015260840161014a565b806105b281610d02565b915050610502565b5050505b635dd34b9b60e01b6001600160e01b031982160161061e5760405162461bcd60e51b815260206004820152601b60248201527f43616e6e6f7420706572666f726d207468697320616374696f6e2e0000000000604482015260640161014a565b61065f868686868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506107bc92505050565b9695505050505050565b610674838383610836565b6106d45760405162461bcd60e51b815260206004820152602b60248201527f43616e6e6f7420706572666f726d207468697320616374696f6e206f6e206c6f60448201526a31b5b2b2103a37b5b2b71760a91b606482015260840161014a565b6001600160a01b03831660009081527fdcc609ac7fc3b6a216ce1445788736c9dbe88a58b25a13af71623e6da931efa06020908152604080832085845290915281208054839290610726908490610d1b565b9091555050604080516001600160a01b0385168152602081018490529081018290527f54b3da1f18a19455f8e1343b4fa89829db905f60a95ee3bb431a96a9f13f7288906060016101ed565b6001600160a01b03821660009081527fdcc609ac7fc3b6a216ce1445788736c9dbe88a58b25a13af71623e6da931efa0602090815260408083208484529091529020545b92915050565b606060008083516020850186885af13d82523d6000602084013e806107e2573d60208301fd5b509392505050565b600060048251101561082e5760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b2103230ba309760991b604482015260640161014a565b506020015190565b604051627eeac760e11b81523060048201526024810183905260009081906001600160a01b0386169062fdd58e90604401602060405180830381865afa158015610884573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108a89190610a66565b905060006108b68686610772565b9050816108c38583610d1b565b11159695505050505050565b6001600160a01b03811681146108e457600080fd5b50565b6000806000606084860312156108fc57600080fd5b8335610907816108cf565b95602085013595506040909401359392505050565b6000806000806080858703121561093257600080fd5b843561093d816108cf565b93506020850135925060408501359150606085013561095b816108cf565b939692955090935050565b600060208083528351808285015260005b8181101561099357858101830151858201604001528201610977565b506000604082860101526040601f19601f8301168501019250505092915050565b600080600080606085870312156109ca57600080fd5b84356109d5816108cf565b935060208501359250604085013567ffffffffffffffff808211156109f957600080fd5b818701915087601f830112610a0d57600080fd5b813581811115610a1c57600080fd5b886020828501011115610a2e57600080fd5b95989497505060200194505050565b634e487b7160e01b600052601160045260246000fd5b818103818111156107b6576107b6610a3d565b600060208284031215610a7857600080fd5b5051919050565b60008085851115610a8f57600080fd5b83861115610a9c57600080fd5b5050820193919092039150565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610ae857610ae8610aa9565b604052919050565b600082601f830112610b0157600080fd5b813567ffffffffffffffff811115610b1b57610b1b610aa9565b610b2e601f8201601f1916602001610abf565b818152846020838601011115610b4357600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a08688031215610b7857600080fd5b8535610b83816108cf565b94506020860135610b93816108cf565b93506040860135925060608601359150608086013567ffffffffffffffff811115610bbd57600080fd5b610bc988828901610af0565b9150509295509295909350565b600082601f830112610be757600080fd5b8135602067ffffffffffffffff821115610c0357610c03610aa9565b8160051b610c12828201610abf565b9283528481018201928281019087851115610c2c57600080fd5b83870192505b8483101561037857823582529183019190830190610c32565b600080600080600060a08688031215610c6357600080fd5b8535610c6e816108cf565b94506020860135610c7e816108cf565b9350604086013567ffffffffffffffff80821115610c9b57600080fd5b610ca789838a01610bd6565b94506060880135915080821115610cbd57600080fd5b610cc989838a01610bd6565b93506080880135915080821115610cdf57600080fd5b50610bc988828901610af0565b634e487b7160e01b600052603260045260246000fd5b600060018201610d1457610d14610a3d565b5060010190565b808201808211156107b6576107b6610a3d56fea2646970667358221220c9f8088e21602a1b415a884e84558b7c0b6fc4fdeb8da26ca94013bd322d01bc64736f6c63430008130033

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.