ETH Price: $3,306.50 (-3.09%)
Gas: 20 Gwei

Contract

0xcB1a599Da5a4BD9382743eE63ACd1eabF67F036F
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
Unstake201524092024-06-23 5:47:4710 days ago1719121667IN
0xcB1a599D...bF67F036F
0 ETH0.000235452.54397122
Unstake201524072024-06-23 5:47:2310 days ago1719121643IN
0xcB1a599D...bF67F036F
0 ETH0.000197662.1981224
Unstake201524062024-06-23 5:47:1110 days ago1719121631IN
0xcB1a599D...bF67F036F
0 ETH0.000193262.21382372
Unstake201524052024-06-23 5:46:5910 days ago1719121619IN
0xcB1a599D...bF67F036F
0 ETH0.000170362.01209476
Unstake201524032024-06-23 5:46:3510 days ago1719121595IN
0xcB1a599D...bF67F036F
0 ETH0.000189632.31137715
Unstake201524012024-06-23 5:46:1110 days ago1719121571IN
0xcB1a599D...bF67F036F
0 ETH0.000184732.3260621
Unstake201524002024-06-23 5:45:5910 days ago1719121559IN
0xcB1a599D...bF67F036F
0 ETH0.000184792.40646969
Unstake201523982024-06-23 5:45:3510 days ago1719121535IN
0xcB1a599D...bF67F036F
0 ETH0.000163392.20315945
Unstake201523972024-06-23 5:45:2310 days ago1719121523IN
0xcB1a599D...bF67F036F
0 ETH0.000162622.27328575
Unstake201523952024-06-23 5:44:5910 days ago1719121499IN
0xcB1a599D...bF67F036F
0 ETH0.000160272.32585536
Unstake201523922024-06-23 5:44:2310 days ago1719121463IN
0xcB1a599D...bF67F036F
0 ETH0.000158772.39543133
Unstake201523902024-06-23 5:43:5910 days ago1719121439IN
0xcB1a599D...bF67F036F
0 ETH0.000157242.47025655
Unstake185716352023-11-14 17:28:23231 days ago1699982903IN
0xcB1a599D...bF67F036F
0 ETH0.0025847540.60503494
Unstake185716342023-11-14 17:28:11231 days ago1699982891IN
0xcB1a599D...bF67F036F
0 ETH0.0027383141.31246965
Unstake185716322023-11-14 17:27:47231 days ago1699982867IN
0xcB1a599D...bF67F036F
0 ETH0.0029119742.25766648
Unstake185716272023-11-14 17:26:47231 days ago1699982807IN
0xcB1a599D...bF67F036F
0 ETH0.0032076844.83954161
Unstake184421772023-10-27 14:35:47250 days ago1698417347IN
0xcB1a599D...bF67F036F
0 ETH0.0015593722.62917713
Unstake184421762023-10-27 14:35:35250 days ago1698417335IN
0xcB1a599D...bF67F036F
0 ETH0.0016454223.00098531
Unstake184421742023-10-27 14:35:11250 days ago1698417311IN
0xcB1a599D...bF67F036F
0 ETH0.0015178622.89971601
Unstake184140762023-10-23 16:11:23253 days ago1698077483IN
0xcB1a599D...bF67F036F
0 ETH0.00428367.28356136
Unstake176126162023-07-03 9:41:47366 days ago1688377307IN
0xcB1a599D...bF67F036F
0 ETH0.001751920.06791435
Unstake176126152023-07-03 9:41:35366 days ago1688377295IN
0xcB1a599D...bF67F036F
0 ETH0.0016755419.78866833
Unstake176126142023-07-03 9:41:23366 days ago1688377283IN
0xcB1a599D...bF67F036F
0 ETH0.0015839419.30578839
Unstake176126132023-07-03 9:41:11366 days ago1688377271IN
0xcB1a599D...bF67F036F
0 ETH0.0015462119.46930569
Unstake176126112023-07-03 9:40:47366 days ago1688377247IN
0xcB1a599D...bF67F036F
0 ETH0.0020177519.09161477
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
CubeXStake

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
Yes with 1000 runs

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

import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

contract CubeXStake is Ownable {
  event Staked(address owner, uint256 tokenId, uint256 timestamp);
  event Unstaked(address owner, uint256 tokenId, uint256 timestamp);
  event AddressUpdated(address oldAddress, address newAddress);

  struct Stake {
    address owner;
    uint256 tokenId;
    uint256 timestamp;
  }

  bool isPaused = true;
  uint256 minDays = 90;
  mapping(address => Stake[]) private stakes;

  IERC721 private cubeX;

  constructor() {
    cubeX = IERC721(0x92C93fAfc20fE882a448f86e594d9667259c42C8);
  }

  function onERC721Received(
    address,
    address,
    uint256,
    bytes calldata
  ) external returns (bytes4) {
    return bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"));
  }

  function stake(uint256[] memory _tokens) external {
    require(!isPaused, "Staking is paused.");
    require(cubeX.balanceOf(msg.sender) >= _tokens.length, "You do not have enough NFTs.");

    uint256 timestamp = block.timestamp;

    for (uint256 i = 0; i < _tokens.length; i++) {
      cubeX.safeTransferFrom(msg.sender, address(this), _tokens[i]);

      stakes[msg.sender].push(Stake(msg.sender, _tokens[i], timestamp));

      emit Staked(msg.sender, _tokens[i], timestamp);
    }
  }

  function stakeFor(uint256[] memory _tokens, address _receiver) external {
    require(!isPaused, "Staking is paused.");
    require(cubeX.balanceOf(msg.sender) >= _tokens.length, "You do not have enough NFTs.");

    uint256 timestamp = block.timestamp;

    for (uint256 i = 0; i < _tokens.length; i++) {
      cubeX.safeTransferFrom(msg.sender, address(this), _tokens[i]);

      stakes[_receiver].push(Stake(_receiver, _tokens[i], timestamp));

      emit Staked(_receiver, _tokens[i], timestamp);
    }
  }

  function unstake(uint256 _tokenId) external {
    uint256 senderStakes = stakes[msg.sender].length;

    require(senderStakes > 0, "Address has no stakes.");

    for (uint256 i = 0; i < senderStakes; i++) {
      if (stakes[msg.sender][i].tokenId == _tokenId && stakes[msg.sender][i].timestamp != 0) {
        uint256 elapsedMins = (block.timestamp - stakes[msg.sender][i].timestamp) / 60;
        uint256 elapsedDays = elapsedMins / 1440;

        require(elapsedDays >= minDays, "Can not unstake before defined time.");

        cubeX.safeTransferFrom(address(this), msg.sender, _tokenId);

        stakes[msg.sender][i].timestamp = 0;

        emit Unstaked(msg.sender, _tokenId, block.timestamp);

        break;
      }

      if (i == senderStakes - 1) {
        revert("Provided token id not staked.");
      }
    }
  }

  function updateAddress(address _oldAddress, address _newAddress) external onlyOwner {
    uint256 oldStakes = stakes[_oldAddress].length;
    uint256 newStakes = stakes[_newAddress].length;

    require(oldStakes > 0, "Old address has no stakes.");
    require(newStakes == 0, "New address already has stakes.");

    stakes[_newAddress] = stakes[_oldAddress];

    delete stakes[_oldAddress];

    emit AddressUpdated(_oldAddress, _newAddress);
  }

  function getStakes(address _address) external view returns (Stake[] memory) {
    uint256 addressStakes = stakes[_address].length;

    require(addressStakes > 0, "Address has no stakes.");

    Stake[] memory res = new Stake[](addressStakes);

    for (uint256 i = 0; i < addressStakes; i++) {
      if (stakes[_address][i].timestamp != 0) {
        res[i] = Stake(stakes[_address][i].owner, stakes[_address][i].tokenId, stakes[_address][i].timestamp);
      }
    }

    return res;
  }

  function togglePause(bool _state) external onlyOwner {
    isPaused = _state;
  }

  function updateMinDays(uint256 _days) external onlyOwner {
    minDays = _days;
  }
}

File 2 of 6 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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`, 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 be 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: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * 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 Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @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 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);

    /**
     * @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;
}

File 3 of 6 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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 `IERC721.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

File 4 of 6 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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 Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing 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);
    }
}

File 5 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 6 of 6 : Context.sol
// 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;
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldAddress","type":"address"},{"indexed":false,"internalType":"address","name":"newAddress","type":"address"}],"name":"AddressUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"Staked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"Unstaked","type":"event"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"getStakes","outputs":[{"components":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"timestamp","type":"uint256"}],"internalType":"struct CubeXStake.Stake[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_tokens","type":"uint256[]"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_tokens","type":"uint256[]"},{"internalType":"address","name":"_receiver","type":"address"}],"name":"stakeFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_state","type":"bool"}],"name":"togglePause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_oldAddress","type":"address"},{"internalType":"address","name":"_newAddress","type":"address"}],"name":"updateAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_days","type":"uint256"}],"name":"updateMinDays","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040526000805460ff60a01b1916600160a01b179055605a60015534801561002857600080fd5b506100323361005d565b600380546001600160a01b0319167392c93fafc20fe882a448f86e594d9667259c42c81790556100ad565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b611672806100bc6000396000f3fe608060405234801561001057600080fd5b50600436106100c95760003560e01c806357d159c6116100815780638da5cb5b1161005b5780638da5cb5b146101c55780639bfa882e146101e0578063f2fde38b146101f357600080fd5b806357d159c61461018a578063715018a61461019d5780637ba6f458146101a557600080fd5b80632e17de78116100b25780632e17de78146101515780632f9e90a6146101645780632fb72a441461017757600080fd5b80630fbf0a93146100ce578063150b7a02146100e3575b600080fd5b6100e16100dc36600461146e565b610206565b005b61011b6100f13660046113d3565b7f150b7a023d4804d13e8c85fb27262cb750cf6ba9f9dd3bb30d90f482ceeb4b1f95945050505050565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020015b60405180910390f35b6100e161015f366004611512565b610525565b6100e16101723660046114ab565b61084e565b6100e1610185366004611512565b610b69565b6100e16101983660046114f0565b610bc8565b6100e1610c5b565b6101b86101b336600461137e565b610cc1565b6040516101489190611544565b6000546040516001600160a01b039091168152602001610148565b6100e16101ee3660046113a0565b610f13565b6100e161020136600461137e565b6110c3565b600054600160a01b900460ff16156102655760405162461bcd60e51b815260206004820152601260248201527f5374616b696e67206973207061757365642e000000000000000000000000000060448201526064015b60405180910390fd5b80516003546040516370a0823160e01b81523360048201526001600160a01b03909116906370a082319060240160206040518083038186803b1580156102aa57600080fd5b505afa1580156102be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102e2919061152b565b10156103305760405162461bcd60e51b815260206004820152601c60248201527f596f7520646f206e6f74206861766520656e6f756768204e4654732e00000000604482015260640161025c565b4260005b82518110156105205760035483516001600160a01b03909116906342842e0e903390309087908690811061036a5761036a611610565b60209081029190910101516040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401600060405180830381600087803b1580156103dc57600080fd5b505af11580156103f0573d6000803e3d6000fd5b5050505060026000336001600160a01b03166001600160a01b031681526020019081526020016000206040518060600160405280336001600160a01b0316815260200185848151811061044557610445611610565b6020908102919091018101518252908101859052825460018082018555600094855293829020835160039092020180546001600160a01b0319166001600160a01b0390921691909117815590820151928101929092556040015160029091015582517f1449c6dd7851abc30abf37f57715f492010519147cc2652fbc38202c18a6ee909033908590849081106104dd576104dd611610565b602090810291909101810151604080516001600160a01b03909416845291830152810184905260600160405180910390a180610518816115df565b915050610334565b505050565b33600090815260026020526040902054806105825760405162461bcd60e51b815260206004820152601660248201527f4164647265737320686173206e6f207374616b65732e00000000000000000000604482015260640161025c565b60005b81811015610520573360009081526002602052604090208054849190839081106105b1576105b1611610565b90600052602060002090600302016001015414801561060357503360009081526002602052604090208054829081106105ec576105ec611610565b906000526020600020906003020160020154600014155b156107e2573360009081526002602052604081208054603c91908490811061062d5761062d611610565b9060005260206000209060030201600201544261064a91906115c8565b61065491906115a6565b905060006106646105a0836115a6565b90506001548110156106dd5760405162461bcd60e51b8152602060048201526024808201527f43616e206e6f7420756e7374616b65206265666f726520646566696e6564207460448201527f696d652e00000000000000000000000000000000000000000000000000000000606482015260840161025c565b6003546040517f42842e0e000000000000000000000000000000000000000000000000000000008152306004820152336024820152604481018790526001600160a01b03909116906342842e0e90606401600060405180830381600087803b15801561074857600080fd5b505af115801561075c573d6000803e3d6000fd5b5050336000908152600260205260408120805491935091508590811061078457610784611610565b6000918252602091829020600260039092020101919091556040805133815291820187905242908201527f7fc4727e062e336010f2c282598ef5f14facb3de68cf8195c2f23e1454b2b74e9060600160405180910390a15050505050565b6107ed6001836115c8565b81141561083c5760405162461bcd60e51b815260206004820152601d60248201527f50726f766964656420746f6b656e206964206e6f74207374616b65642e000000604482015260640161025c565b80610846816115df565b915050610585565b600054600160a01b900460ff16156108a85760405162461bcd60e51b815260206004820152601260248201527f5374616b696e67206973207061757365642e0000000000000000000000000000604482015260640161025c565b81516003546040516370a0823160e01b81523360048201526001600160a01b03909116906370a082319060240160206040518083038186803b1580156108ed57600080fd5b505afa158015610901573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610925919061152b565b10156109735760405162461bcd60e51b815260206004820152601c60248201527f596f7520646f206e6f74206861766520656e6f756768204e4654732e00000000604482015260640161025c565b4260005b8351811015610b635760035484516001600160a01b03909116906342842e0e90339030908890869081106109ad576109ad611610565b60209081029190910101516040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401600060405180830381600087803b158015610a1f57600080fd5b505af1158015610a33573d6000803e3d6000fd5b5050505060026000846001600160a01b03166001600160a01b031681526020019081526020016000206040518060600160405280856001600160a01b03168152602001868481518110610a8857610a88611610565b6020908102919091018101518252908101859052825460018082018555600094855293829020835160039092020180546001600160a01b0319166001600160a01b0390921691909117815590820151928101929092556040015160029091015583517f1449c6dd7851abc30abf37f57715f492010519147cc2652fbc38202c18a6ee90908490869084908110610b2057610b20611610565b602090810291909101810151604080516001600160a01b03909416845291830152810184905260600160405180910390a180610b5b816115df565b915050610977565b50505050565b6000546001600160a01b03163314610bc35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161025c565b600155565b6000546001600160a01b03163314610c225760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161025c565b60008054911515600160a01b027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff909216919091179055565b6000546001600160a01b03163314610cb55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161025c565b610cbf60006111a5565b565b6001600160a01b03811660009081526002602052604090205460609080610d2a5760405162461bcd60e51b815260206004820152601660248201527f4164647265737320686173206e6f207374616b65732e00000000000000000000604482015260640161025c565b60008167ffffffffffffffff811115610d4557610d45611626565b604051908082528060200260200182016040528015610da357816020015b610d90604051806060016040528060006001600160a01b0316815260200160008152602001600081525090565b815260200190600190039081610d635790505b50905060005b82811015610f0b576001600160a01b0385166000908152600260205260409020805482908110610ddb57610ddb611610565b906000526020600020906003020160020154600014610ef957604051806060016040528060026000886001600160a01b03166001600160a01b031681526020019081526020016000208381548110610e3557610e35611610565b600091825260208083206003909202909101546001600160a01b039081168452891682526002815260409091208054929091019184908110610e7957610e79611610565b906000526020600020906003020160010154815260200160026000886001600160a01b03166001600160a01b031681526020019081526020016000208381548110610ec657610ec6611610565b906000526020600020906003020160020154815250828281518110610eed57610eed611610565b60200260200101819052505b80610f03816115df565b915050610da9565b509392505050565b6000546001600160a01b03163314610f6d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161025c565b6001600160a01b0380831660009081526002602052604080822054928416825290205481610fdd5760405162461bcd60e51b815260206004820152601a60248201527f4f6c64206164647265737320686173206e6f207374616b65732e000000000000604482015260640161025c565b801561102b5760405162461bcd60e51b815260206004820152601f60248201527f4e6577206164647265737320616c726561647920686173207374616b65732e00604482015260640161025c565b6001600160a01b0380851660009081526002602052604080822092861682529020815461105892906111f5565b506001600160a01b038416600090815260026020526040812061107a91611277565b604080516001600160a01b038087168252851660208201527f53d43647b4e7165b1dd70c590a9244d650c4d257cbb62b799357578e780579ad910160405180910390a150505050565b6000546001600160a01b0316331461111d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161025c565b6001600160a01b0381166111995760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161025c565b6111a2816111a5565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b8280548282559060005260206000209060030281019282156112675760005260206000209160030282015b8281111561126757825482546001600160a01b0319166001600160a01b03909116178255600180840154908301556002808401549083015560039283019290910190611220565b50611273929150611294565b5090565b50805460008255600302906000526020600020908101906111a291905b5b808211156112735780546001600160a01b03191681556000600182018190556002820155600301611295565b80356001600160a01b03811681146112d857600080fd5b919050565b600082601f8301126112ee57600080fd5b8135602067ffffffffffffffff8083111561130b5761130b611626565b8260051b604051601f19603f8301168101818110848211171561133057611330611626565b6040528481528381019250868401828801850189101561134f57600080fd5b600092505b85831015611372578035845292840192600192909201918401611354565b50979650505050505050565b60006020828403121561139057600080fd5b611399826112c1565b9392505050565b600080604083850312156113b357600080fd5b6113bc836112c1565b91506113ca602084016112c1565b90509250929050565b6000806000806000608086880312156113eb57600080fd5b6113f4866112c1565b9450611402602087016112c1565b935060408601359250606086013567ffffffffffffffff8082111561142657600080fd5b818801915088601f83011261143a57600080fd5b81358181111561144957600080fd5b89602082850101111561145b57600080fd5b9699959850939650602001949392505050565b60006020828403121561148057600080fd5b813567ffffffffffffffff81111561149757600080fd5b6114a3848285016112dd565b949350505050565b600080604083850312156114be57600080fd5b823567ffffffffffffffff8111156114d557600080fd5b6114e1858286016112dd565b9250506113ca602084016112c1565b60006020828403121561150257600080fd5b8135801515811461139957600080fd5b60006020828403121561152457600080fd5b5035919050565b60006020828403121561153d57600080fd5b5051919050565b602080825282518282018190526000919060409081850190868401855b8281101561159957815180516001600160a01b0316855286810151878601528501518585015260609093019290850190600101611561565b5091979650505050505050565b6000826115c357634e487b7160e01b600052601260045260246000fd5b500490565b6000828210156115da576115da6115fa565b500390565b60006000198214156115f3576115f36115fa565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fdfea26469706673582212201dc0fa7b4bc5868df057e5b09cd57e60763302d98c0d79ab3640bf6e94d3955d64736f6c63430008070033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100c95760003560e01c806357d159c6116100815780638da5cb5b1161005b5780638da5cb5b146101c55780639bfa882e146101e0578063f2fde38b146101f357600080fd5b806357d159c61461018a578063715018a61461019d5780637ba6f458146101a557600080fd5b80632e17de78116100b25780632e17de78146101515780632f9e90a6146101645780632fb72a441461017757600080fd5b80630fbf0a93146100ce578063150b7a02146100e3575b600080fd5b6100e16100dc36600461146e565b610206565b005b61011b6100f13660046113d3565b7f150b7a023d4804d13e8c85fb27262cb750cf6ba9f9dd3bb30d90f482ceeb4b1f95945050505050565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020015b60405180910390f35b6100e161015f366004611512565b610525565b6100e16101723660046114ab565b61084e565b6100e1610185366004611512565b610b69565b6100e16101983660046114f0565b610bc8565b6100e1610c5b565b6101b86101b336600461137e565b610cc1565b6040516101489190611544565b6000546040516001600160a01b039091168152602001610148565b6100e16101ee3660046113a0565b610f13565b6100e161020136600461137e565b6110c3565b600054600160a01b900460ff16156102655760405162461bcd60e51b815260206004820152601260248201527f5374616b696e67206973207061757365642e000000000000000000000000000060448201526064015b60405180910390fd5b80516003546040516370a0823160e01b81523360048201526001600160a01b03909116906370a082319060240160206040518083038186803b1580156102aa57600080fd5b505afa1580156102be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102e2919061152b565b10156103305760405162461bcd60e51b815260206004820152601c60248201527f596f7520646f206e6f74206861766520656e6f756768204e4654732e00000000604482015260640161025c565b4260005b82518110156105205760035483516001600160a01b03909116906342842e0e903390309087908690811061036a5761036a611610565b60209081029190910101516040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401600060405180830381600087803b1580156103dc57600080fd5b505af11580156103f0573d6000803e3d6000fd5b5050505060026000336001600160a01b03166001600160a01b031681526020019081526020016000206040518060600160405280336001600160a01b0316815260200185848151811061044557610445611610565b6020908102919091018101518252908101859052825460018082018555600094855293829020835160039092020180546001600160a01b0319166001600160a01b0390921691909117815590820151928101929092556040015160029091015582517f1449c6dd7851abc30abf37f57715f492010519147cc2652fbc38202c18a6ee909033908590849081106104dd576104dd611610565b602090810291909101810151604080516001600160a01b03909416845291830152810184905260600160405180910390a180610518816115df565b915050610334565b505050565b33600090815260026020526040902054806105825760405162461bcd60e51b815260206004820152601660248201527f4164647265737320686173206e6f207374616b65732e00000000000000000000604482015260640161025c565b60005b81811015610520573360009081526002602052604090208054849190839081106105b1576105b1611610565b90600052602060002090600302016001015414801561060357503360009081526002602052604090208054829081106105ec576105ec611610565b906000526020600020906003020160020154600014155b156107e2573360009081526002602052604081208054603c91908490811061062d5761062d611610565b9060005260206000209060030201600201544261064a91906115c8565b61065491906115a6565b905060006106646105a0836115a6565b90506001548110156106dd5760405162461bcd60e51b8152602060048201526024808201527f43616e206e6f7420756e7374616b65206265666f726520646566696e6564207460448201527f696d652e00000000000000000000000000000000000000000000000000000000606482015260840161025c565b6003546040517f42842e0e000000000000000000000000000000000000000000000000000000008152306004820152336024820152604481018790526001600160a01b03909116906342842e0e90606401600060405180830381600087803b15801561074857600080fd5b505af115801561075c573d6000803e3d6000fd5b5050336000908152600260205260408120805491935091508590811061078457610784611610565b6000918252602091829020600260039092020101919091556040805133815291820187905242908201527f7fc4727e062e336010f2c282598ef5f14facb3de68cf8195c2f23e1454b2b74e9060600160405180910390a15050505050565b6107ed6001836115c8565b81141561083c5760405162461bcd60e51b815260206004820152601d60248201527f50726f766964656420746f6b656e206964206e6f74207374616b65642e000000604482015260640161025c565b80610846816115df565b915050610585565b600054600160a01b900460ff16156108a85760405162461bcd60e51b815260206004820152601260248201527f5374616b696e67206973207061757365642e0000000000000000000000000000604482015260640161025c565b81516003546040516370a0823160e01b81523360048201526001600160a01b03909116906370a082319060240160206040518083038186803b1580156108ed57600080fd5b505afa158015610901573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610925919061152b565b10156109735760405162461bcd60e51b815260206004820152601c60248201527f596f7520646f206e6f74206861766520656e6f756768204e4654732e00000000604482015260640161025c565b4260005b8351811015610b635760035484516001600160a01b03909116906342842e0e90339030908890869081106109ad576109ad611610565b60209081029190910101516040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401600060405180830381600087803b158015610a1f57600080fd5b505af1158015610a33573d6000803e3d6000fd5b5050505060026000846001600160a01b03166001600160a01b031681526020019081526020016000206040518060600160405280856001600160a01b03168152602001868481518110610a8857610a88611610565b6020908102919091018101518252908101859052825460018082018555600094855293829020835160039092020180546001600160a01b0319166001600160a01b0390921691909117815590820151928101929092556040015160029091015583517f1449c6dd7851abc30abf37f57715f492010519147cc2652fbc38202c18a6ee90908490869084908110610b2057610b20611610565b602090810291909101810151604080516001600160a01b03909416845291830152810184905260600160405180910390a180610b5b816115df565b915050610977565b50505050565b6000546001600160a01b03163314610bc35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161025c565b600155565b6000546001600160a01b03163314610c225760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161025c565b60008054911515600160a01b027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff909216919091179055565b6000546001600160a01b03163314610cb55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161025c565b610cbf60006111a5565b565b6001600160a01b03811660009081526002602052604090205460609080610d2a5760405162461bcd60e51b815260206004820152601660248201527f4164647265737320686173206e6f207374616b65732e00000000000000000000604482015260640161025c565b60008167ffffffffffffffff811115610d4557610d45611626565b604051908082528060200260200182016040528015610da357816020015b610d90604051806060016040528060006001600160a01b0316815260200160008152602001600081525090565b815260200190600190039081610d635790505b50905060005b82811015610f0b576001600160a01b0385166000908152600260205260409020805482908110610ddb57610ddb611610565b906000526020600020906003020160020154600014610ef957604051806060016040528060026000886001600160a01b03166001600160a01b031681526020019081526020016000208381548110610e3557610e35611610565b600091825260208083206003909202909101546001600160a01b039081168452891682526002815260409091208054929091019184908110610e7957610e79611610565b906000526020600020906003020160010154815260200160026000886001600160a01b03166001600160a01b031681526020019081526020016000208381548110610ec657610ec6611610565b906000526020600020906003020160020154815250828281518110610eed57610eed611610565b60200260200101819052505b80610f03816115df565b915050610da9565b509392505050565b6000546001600160a01b03163314610f6d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161025c565b6001600160a01b0380831660009081526002602052604080822054928416825290205481610fdd5760405162461bcd60e51b815260206004820152601a60248201527f4f6c64206164647265737320686173206e6f207374616b65732e000000000000604482015260640161025c565b801561102b5760405162461bcd60e51b815260206004820152601f60248201527f4e6577206164647265737320616c726561647920686173207374616b65732e00604482015260640161025c565b6001600160a01b0380851660009081526002602052604080822092861682529020815461105892906111f5565b506001600160a01b038416600090815260026020526040812061107a91611277565b604080516001600160a01b038087168252851660208201527f53d43647b4e7165b1dd70c590a9244d650c4d257cbb62b799357578e780579ad910160405180910390a150505050565b6000546001600160a01b0316331461111d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161025c565b6001600160a01b0381166111995760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161025c565b6111a2816111a5565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b8280548282559060005260206000209060030281019282156112675760005260206000209160030282015b8281111561126757825482546001600160a01b0319166001600160a01b03909116178255600180840154908301556002808401549083015560039283019290910190611220565b50611273929150611294565b5090565b50805460008255600302906000526020600020908101906111a291905b5b808211156112735780546001600160a01b03191681556000600182018190556002820155600301611295565b80356001600160a01b03811681146112d857600080fd5b919050565b600082601f8301126112ee57600080fd5b8135602067ffffffffffffffff8083111561130b5761130b611626565b8260051b604051601f19603f8301168101818110848211171561133057611330611626565b6040528481528381019250868401828801850189101561134f57600080fd5b600092505b85831015611372578035845292840192600192909201918401611354565b50979650505050505050565b60006020828403121561139057600080fd5b611399826112c1565b9392505050565b600080604083850312156113b357600080fd5b6113bc836112c1565b91506113ca602084016112c1565b90509250929050565b6000806000806000608086880312156113eb57600080fd5b6113f4866112c1565b9450611402602087016112c1565b935060408601359250606086013567ffffffffffffffff8082111561142657600080fd5b818801915088601f83011261143a57600080fd5b81358181111561144957600080fd5b89602082850101111561145b57600080fd5b9699959850939650602001949392505050565b60006020828403121561148057600080fd5b813567ffffffffffffffff81111561149757600080fd5b6114a3848285016112dd565b949350505050565b600080604083850312156114be57600080fd5b823567ffffffffffffffff8111156114d557600080fd5b6114e1858286016112dd565b9250506113ca602084016112c1565b60006020828403121561150257600080fd5b8135801515811461139957600080fd5b60006020828403121561152457600080fd5b5035919050565b60006020828403121561153d57600080fd5b5051919050565b602080825282518282018190526000919060409081850190868401855b8281101561159957815180516001600160a01b0316855286810151878601528501518585015260609093019290850190600101611561565b5091979650505050505050565b6000826115c357634e487b7160e01b600052601260045260246000fd5b500490565b6000828210156115da576115da6115fa565b500390565b60006000198214156115f3576115f36115fa565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fdfea26469706673582212201dc0fa7b4bc5868df057e5b09cd57e60763302d98c0d79ab3640bf6e94d3955d64736f6c63430008070033

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
Loading...
Loading
[ Download: CSV Export  ]

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