ETH Price: $3,106.51 (-0.02%)

Contract

0xBe6a60772Cc87f10921B1bdC13f89c4920040a75
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Transfer Ownersh...144361112022-03-22 12:26:59974 days ago1647952019IN
0xBe6a6077...920040a75
0 ETH0.0006930224.20286961
Add Controller144358992022-03-22 11:41:35974 days ago1647949295IN
0xBe6a6077...920040a75
0 ETH0.0014276230.93038552
Add Controller144358972022-03-22 11:41:00974 days ago1647949260IN
0xBe6a6077...920040a75
0 ETH0.0014608531.65043035
0x60806040144358942022-03-22 11:40:19974 days ago1647949219IN
 Create: MetroVaultStorage
0 ETH0.0944806432.22728887

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
180038882023-08-27 5:22:35451 days ago1693113755
0xBe6a6077...920040a75
0 ETH
180038882023-08-27 5:22:35451 days ago1693113755
0xBe6a6077...920040a75
0 ETH
180038882023-08-27 5:22:35451 days ago1693113755
0xBe6a6077...920040a75
0 ETH
176862842023-07-13 18:13:23495 days ago1689272003
0xBe6a6077...920040a75
0 ETH
176862842023-07-13 18:13:23495 days ago1689272003
0xBe6a6077...920040a75
0 ETH
176862842023-07-13 18:13:23495 days ago1689272003
0xBe6a6077...920040a75
0 ETH
176862842023-07-13 18:13:23495 days ago1689272003
0xBe6a6077...920040a75
0 ETH
176862842023-07-13 18:13:23495 days ago1689272003
0xBe6a6077...920040a75
0 ETH
174709402023-06-13 12:01:23526 days ago1686657683
0xBe6a6077...920040a75
0 ETH
174709402023-06-13 12:01:23526 days ago1686657683
0xBe6a6077...920040a75
0 ETH
174709402023-06-13 12:01:23526 days ago1686657683
0xBe6a6077...920040a75
0 ETH
174709402023-06-13 12:01:23526 days ago1686657683
0xBe6a6077...920040a75
0 ETH
174709402023-06-13 12:01:23526 days ago1686657683
0xBe6a6077...920040a75
0 ETH
174709402023-06-13 12:01:23526 days ago1686657683
0xBe6a6077...920040a75
0 ETH
174709402023-06-13 12:01:23526 days ago1686657683
0xBe6a6077...920040a75
0 ETH
174709402023-06-13 12:01:23526 days ago1686657683
0xBe6a6077...920040a75
0 ETH
174709402023-06-13 12:01:23526 days ago1686657683
0xBe6a6077...920040a75
0 ETH
169942352023-04-07 4:22:23593 days ago1680841343
0xBe6a6077...920040a75
0 ETH
169942352023-04-07 4:22:23593 days ago1680841343
0xBe6a6077...920040a75
0 ETH
169942352023-04-07 4:22:23593 days ago1680841343
0xBe6a6077...920040a75
0 ETH
169942352023-04-07 4:22:23593 days ago1680841343
0xBe6a6077...920040a75
0 ETH
169942352023-04-07 4:22:23593 days ago1680841343
0xBe6a6077...920040a75
0 ETH
169942352023-04-07 4:22:23593 days ago1680841343
0xBe6a6077...920040a75
0 ETH
169942352023-04-07 4:22:23593 days ago1680841343
0xBe6a6077...920040a75
0 ETH
169942352023-04-07 4:22:23593 days ago1680841343
0xBe6a6077...920040a75
0 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MetroVaultStorage

Compiler Version
v0.8.12+commit.f00d7308

Optimization Enabled:
Yes with 2000 runs

Other Settings:
default evmVersion
File 1 of 9 : MetroVaultStorage.sol
// SPDX-License-Identifier: MIT LICENSE

pragma solidity 0.8.12;

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

import "../../lib/Controllable.sol";
import "./structs/MetroVaultStorageStructs.sol";
import "./interfaces/IMetroVaultStorage.sol";
import "../../nfts/interfaces/IMetroNFTLookup.sol";

contract MetroVaultStorage is Controllable, IMetroVaultStorage {

    address public nftLookupAddress;
    
    mapping(uint256 => Stake) vault;
    mapping(address => Account) accounts;

    event BlockStaked(address indexed owner, uint256 indexed tokenId, uint256 timestamp, uint16 indexed cityId, uint40 extra);
    event BlockUnstaked(address indexed owner, uint256 indexed tokenId, uint256 timestamp, uint16 indexed cityId, uint40 extra);
    event BlockTransfer(address indexed owner, uint256 indexed tokenId,  address indexed to);

    constructor(address _nftLookupAddress) {
      nftLookupAddress = _nftLookupAddress;
    }

    function setNFTLookup(address _nftLookupAddress) external onlyOwner {
        nftLookupAddress = _nftLookupAddress;
    }

    function getNFTContractAddress(uint256 tokenId) public view returns (address) {
        return IMetroNFTLookup(nftLookupAddress).getNFTContractAddress(tokenId);
    }

    function balanceOf(address owner) public view returns (uint256){
      return accounts[owner].balance;
    }

    function ownerOf(uint256 tokenId) public view returns (address){
      address owner = vault[tokenId].owner;
      require(owner != address(0x0), 'Token not in vault');
      return owner;
    }

    function getAccount(address owner) external view returns (Account memory) {
        return accounts[owner];
    }

    function getStake(uint256 tokenId) external view returns (Stake memory) {
        return vault[tokenId];
    }

    function stakeBlocks(address owner, uint256[] calldata tokenIds, uint16 cityId, uint40 extra) external onlyController {
        for (uint i = 0; i < tokenIds.length; i++) {
            uint256 tokenId = tokenIds[i];
            Stake storage s = vault[tokenId];
            require(s.owner == address(0), "Token is already staked");

            IERC721 nft = IERC721(getNFTContractAddress(tokenId));
            nft.transferFrom(owner, address(this), tokenId);

            s.owner = owner;
            s.timestamp = uint40(block.timestamp);
            s.cityId = cityId;
            s.extra = extra;

            emit BlockStaked(owner, tokenId, uint40(block.timestamp), cityId, extra);
        }

        accounts[owner].balance += uint24(tokenIds.length);
    }

    function stakeBlocks(
      address owner,
      uint256[] calldata tokenIds,
      uint16[] calldata cityIds,
      uint40[] calldata extras,
      uint40[] calldata timestamps
    ) external onlyController {

        require(tokenIds.length == cityIds.length && tokenIds.length == extras.length && tokenIds.length == timestamps.length);

        for (uint i = 0; i < tokenIds.length; i++) {
            uint256 tokenId = tokenIds[i];
            Stake storage s = vault[tokenId];
            require(s.owner == address(0), "Token is already staked");

            IERC721 nft = IERC721(getNFTContractAddress(tokenId));
            nft.transferFrom(owner, address(this), tokenId);

            s.owner = owner;
            s.timestamp = timestamps[i];
            s.cityId = cityIds[i];
            s.extra = extras[i];

            emit BlockStaked(owner, tokenId, timestamps[i], cityIds[i], extras[i]);
        }

        accounts[owner].balance += uint24(tokenIds.length);
    }

    function stakeFromMint(address owner, uint256[] calldata tokenIds, uint16 cityId, uint40 extra) public onlyController {
        for (uint i = 0; i < tokenIds.length; i++) {
            uint256 tokenId = tokenIds[i];

            Stake storage s = vault[tokenId];
            s.owner = owner;
            s.timestamp = uint40(block.timestamp);
            s.cityId = cityId;
            s.extra = extra;

            emit BlockStaked(owner, tokenId, block.timestamp, cityId, extra);
        }

        accounts[owner].balance += uint24(tokenIds.length);
    }

    function stakeFromMint(address owner, uint256[] calldata tokenIds, uint16 cityId, uint32 extra) external onlyController {
        stakeFromMint(owner, tokenIds, cityId, uint40(extra));
    }

    function unstakeBlocks(address owner, uint256[] calldata tokenIds) external onlyController {
      _unstakeBlocks(owner, owner, tokenIds);
    }

    function unstakeBlocksTo(address owner, address to, uint256[] calldata tokenIds) external onlyController {
      _unstakeBlocks(owner, to, tokenIds);
    }

    function _unstakeBlocks(address owner, address to, uint256[] calldata tokenIds) private {
        for (uint i = 0; i < tokenIds.length; i++) {
            uint256 tokenId = tokenIds[i];      
            Stake memory staked = vault[tokenId];
            require(owner == staked.owner, "Not an owner");

            delete vault[tokenId];
            IERC721 nft = IERC721(getNFTContractAddress(tokenId));
            nft.transferFrom(address(this), to, tokenId);
            emit BlockUnstaked(staked.owner, tokenId, block.timestamp, staked.cityId, staked.extra);
        }

        accounts[owner].balance -= uint24(tokenIds.length);
    }

    function setStake(uint256 tokenId, Stake calldata newStake) external onlyController {
        require(newStake.owner != address(0), "Owner cannot be nil");

        if (vault[tokenId].owner != newStake.owner) {
          accounts[vault[tokenId].owner].balance -= 1;
          accounts[newStake.owner].balance += 1;
          emit BlockTransfer(vault[tokenId].owner, tokenId, newStake.owner);
        }

        vault[tokenId] = newStake;
    }

    function setStakeTimestamp(uint256[] calldata tokenIds, uint40 timestamp) external onlyController {
        for (uint i = 0; i < tokenIds.length; i++) {
          uint256 tokenId = tokenIds[i];
          Stake storage staked = vault[tokenId];
          staked.timestamp = timestamp;
        }
    }

    function setStakeCity(uint256[] calldata tokenIds, uint16 cityId, bool resetTimestamp) external onlyController {
        for (uint i = 0; i < tokenIds.length; i++) {
          uint256 tokenId = tokenIds[i];
          Stake storage staked = vault[tokenId];
          staked.cityId = cityId;
          if (resetTimestamp) {
            staked.timestamp = uint40(block.timestamp);
          }
        }
    }

    function setStakeExtra(uint256[] calldata tokenIds, uint40 extra, bool resetTimestamp) external onlyController {
        for (uint i = 0; i < tokenIds.length; i++) {
          uint256 tokenId = tokenIds[i];
          Stake storage staked = vault[tokenId];
          staked.extra = extra;
          if (resetTimestamp) {
            staked.timestamp = uint40(block.timestamp);
          }
        }
    }

    function changeStakeOwner(uint256 tokenId, address newOwner, bool resetTimestamp) external onlyController {
        require(newOwner != address(0x0), "Owner cannot be nil");

        Stake storage s = vault[tokenId];

        require(s.owner != address(0x0), "No stake found");

        emit BlockTransfer(s.owner, tokenId, newOwner);

        accounts[s.owner].balance -= 1;
        accounts[newOwner].balance += 1;

        s.owner = newOwner;

        if (resetTimestamp) {
          s.timestamp = uint40(block.timestamp);
        }
    }

    function setStakeOwner(uint256[] calldata tokenIds, address newOwner, bool resetTimestamp) external onlyController {
        require(newOwner != address(0), "Owner cannot be nil");

        address[] memory owners = new address[](tokenIds.length);
        uint256[] memory amounts = new uint256[](tokenIds.length);

        for (uint i = 0; i < tokenIds.length; i++) {
          uint256 tokenId = tokenIds[i];
          Stake storage staked = vault[tokenId];

          for (uint256 j; j < owners.length; j++) {
            if (owners[j] == address(0x0)) {
              owners[j] = staked.owner; 
              amounts[j] = 1;
              break;
            } else if (owners[j] == staked.owner) {
              amounts[j] += 1;
              break;
            }
          }

          emit BlockTransfer(staked.owner, tokenId, newOwner);

          staked.owner = newOwner;
          if (resetTimestamp) {
            staked.timestamp = uint40(block.timestamp);
          }
        }

        for (uint256 j; j < owners.length; j++) {
          if (owners[j] != address(0x0)) {
            accounts[owners[j]].balance -= uint24(amounts[j]); 
          } else {
            break;
          }
        }

        accounts[newOwner].balance += uint24(tokenIds.length);
    }

    function setAccountExtra(address owner, uint232 extra) external onlyController {
        accounts[owner].extra = extra;
    }

    function setAccountsExtra(address[] calldata owners, uint232[] calldata extras) external onlyController {
        require(owners.length == extras.length, "Incorrect input");

        for (uint i; i < owners.length; i++) {
          address owner = owners[i];
          uint232 extra = extras[i];
          accounts[owner].extra = extra;
        }
    }

    function deleteStake(uint256[] calldata tokenIds) public onlyController {
        address[] memory owners = new address[](tokenIds.length);
        uint256[] memory amounts = new uint256[](tokenIds.length);

        for (uint i = 0; i < tokenIds.length; i++) {
          uint256 tokenId = tokenIds[i];

          Stake memory staked = vault[tokenId];
          delete vault[tokenId];

          for (uint256 j; j < owners.length; j++) {
            if (owners[j] == address(0x0)) {
              owners[j] = staked.owner; 
              amounts[j] = 1;
              break;
            } else if (owners[j] == staked.owner) {
              amounts[j] += 1;
              break;
            }
          }

        }

        for (uint256 j; j < owners.length; j++) {
          if (owners[j] != address(0x0)) {
            accounts[owners[j]].balance -= uint24(amounts[j]); 
          } else {
            break;
          }
        }

    }

    // should never be used inside of transaction because of gas fee
    function tokensOfOwner(address owner, uint256 start, uint256 stop) public view returns (uint256[] memory) {
        uint256 balance = accounts[owner].balance;
        if (balance == 0) {
            return new uint256[](0);
        }

        uint256 index = 0;
        uint256[] memory tmp = new uint256[](balance);

        for(uint tokenId = start; tokenId <= stop; tokenId++) {
            if (vault[tokenId].owner == owner) {
                    tmp[index] = tokenId;
                    index += 1;
                    if (index == balance) {
                        break;
                }
            }
        }

        uint256[] memory tokens = new uint256[](index);
        for(uint i = 0; i < index; i++) {
            tokens[i] = tmp[i];
        }

        return tokens;
    }
}

File 2 of 9 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, 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 9 : Controllable.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.12;

import "@openzeppelin/contracts/access/Ownable.sol";

abstract contract Controllable is Ownable {

    mapping(address => bool) private controllers;

    function addController(address controller) external onlyOwner {
      controllers[controller] = true;
    }

    function removeController(address controller) external onlyOwner {
      controllers[controller] = false;
    }

    function isController(address account) public view returns (bool) {
        return controllers[account];
    }

    modifier onlyController() {
        require(controllers[_msgSender()], "Controllable: caller is not the controller");
        _;
    }
}

File 4 of 9 : MetroVaultStorageStructs.sol
// SPDX-License-Identifier: MIT LICENSE

pragma solidity 0.8.12;

struct Stake {
    address owner;
    uint40 timestamp;
    uint16 cityId;
    uint40 extra;
}

struct Account {
    uint24 balance;
    uint232 extra;
}

File 5 of 9 : IMetroVaultStorage.sol
// SPDX-License-Identifier: MIT LICENSE

import "../structs/MetroVaultStorageStructs.sol";
import "../../../nfts/interfaces/IMetroNFTLookup.sol";


pragma solidity 0.8.12;


interface IMetroVaultStorage is IMetroNFTLookup {

    function getStake(uint256 tokenId) external view returns (Stake memory);
    function getAccount(address owner) external view returns (Account memory);

    function setStake(uint256 tokenId, Stake calldata newStake) external;
    function setStakeTimestamp(uint256[] calldata tokenIds, uint40 timestamp) external;
    function setStakeCity(uint256[] calldata tokenIds, uint16 cityId, bool resetTimestamp) external;
    function setStakeExtra(uint256[] calldata tokenIds, uint40 extra, bool resetTimestamp) external;
    function setStakeOwner(uint256[] calldata tokenIds, address owner, bool resetTimestamp) external;
    function changeStakeOwner(uint256 tokenId, address newOwner, bool resetTimestamp) external;

    function setAccountsExtra(address[] calldata owners, uint232[] calldata extras) external;
    function setAccountExtra(address owner, uint232 extra) external;

    function deleteStake(uint256[] calldata tokenIds) external;
    
    function stakeBlocks(address owner, uint256[] calldata tokenIds, uint16 cityId, uint40 extra) external;
    function stakeFromMint(address owner, uint256[] calldata tokenIds, uint16 cityId, uint40 extra) external;
    function unstakeBlocks(address owner, uint256[] calldata tokenIds) external;
    function unstakeBlocksTo(address owner, address to, uint256[] calldata tokenIds) external;
    
    function tokensOfOwner(address account, uint256 start, uint256 stop) external view returns (uint256[] memory);

    function stakeBlocks(
      address owner,
      uint256[] calldata tokenIds,
      uint16[] calldata cityIds,
      uint40[] calldata extras,
      uint40[] calldata timestamps
    ) external;
}

File 6 of 9 : IMetroNFTLookup.sol
// SPDX-License-Identifier: MIT LICENSE

pragma solidity 0.8.12;

interface IMetroNFTLookup {

    function getNFTContractAddress(uint256 tokenId) external view returns (address);
}

File 7 of 9 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (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 8 of 9 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (access/Ownable.sol)

pragma solidity ^0.8.0;

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

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

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

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

    /**
     * @dev 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 9 of 9 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (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": 2000
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_nftLookupAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"},{"indexed":true,"internalType":"uint16","name":"cityId","type":"uint16"},{"indexed":false,"internalType":"uint40","name":"extra","type":"uint40"}],"name":"BlockStaked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"BlockTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"},{"indexed":true,"internalType":"uint16","name":"cityId","type":"uint16"},{"indexed":false,"internalType":"uint40","name":"extra","type":"uint40"}],"name":"BlockUnstaked","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"},{"inputs":[{"internalType":"address","name":"controller","type":"address"}],"name":"addController","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"newOwner","type":"address"},{"internalType":"bool","name":"resetTimestamp","type":"bool"}],"name":"changeStakeOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"deleteStake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"getAccount","outputs":[{"components":[{"internalType":"uint24","name":"balance","type":"uint24"},{"internalType":"uint232","name":"extra","type":"uint232"}],"internalType":"struct Account","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getNFTContractAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getStake","outputs":[{"components":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint40","name":"timestamp","type":"uint40"},{"internalType":"uint16","name":"cityId","type":"uint16"},{"internalType":"uint40","name":"extra","type":"uint40"}],"internalType":"struct Stake","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isController","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nftLookupAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"controller","type":"address"}],"name":"removeController","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint232","name":"extra","type":"uint232"}],"name":"setAccountExtra","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"owners","type":"address[]"},{"internalType":"uint232[]","name":"extras","type":"uint232[]"}],"name":"setAccountsExtra","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_nftLookupAddress","type":"address"}],"name":"setNFTLookup","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"components":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint40","name":"timestamp","type":"uint40"},{"internalType":"uint16","name":"cityId","type":"uint16"},{"internalType":"uint40","name":"extra","type":"uint40"}],"internalType":"struct Stake","name":"newStake","type":"tuple"}],"name":"setStake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint16","name":"cityId","type":"uint16"},{"internalType":"bool","name":"resetTimestamp","type":"bool"}],"name":"setStakeCity","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint40","name":"extra","type":"uint40"},{"internalType":"bool","name":"resetTimestamp","type":"bool"}],"name":"setStakeExtra","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"address","name":"newOwner","type":"address"},{"internalType":"bool","name":"resetTimestamp","type":"bool"}],"name":"setStakeOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint40","name":"timestamp","type":"uint40"}],"name":"setStakeTimestamp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint16[]","name":"cityIds","type":"uint16[]"},{"internalType":"uint40[]","name":"extras","type":"uint40[]"},{"internalType":"uint40[]","name":"timestamps","type":"uint40[]"}],"name":"stakeBlocks","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint16","name":"cityId","type":"uint16"},{"internalType":"uint40","name":"extra","type":"uint40"}],"name":"stakeBlocks","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint16","name":"cityId","type":"uint16"},{"internalType":"uint40","name":"extra","type":"uint40"}],"name":"stakeFromMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint16","name":"cityId","type":"uint16"},{"internalType":"uint32","name":"extra","type":"uint32"}],"name":"stakeFromMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"stop","type":"uint256"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"unstakeBlocks","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"unstakeBlocksTo","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b5060405162003431380380620034318339810160408190526200003491620000b5565b6200003f3362000065565b600280546001600160a01b0319166001600160a01b0392909216919091179055620000e7565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600060208284031215620000c857600080fd5b81516001600160a01b0381168114620000e057600080fd5b9392505050565b61333a80620000f76000396000f3fe608060405234801561001057600080fd5b50600436106101cf5760003560e01c8063a23817f411610104578063ead9189e116100a2578063f4407a6511610071578063f4407a65146104ee578063f6a74ed714610501578063f747dee014610514578063fbcbc0f11461052757600080fd5b8063ead9189e146104a2578063ec74cbeb146104b5578063f2d72353146104c8578063f2fde38b146104db57600080fd5b8063b3776f8c116100de578063b3776f8c14610352578063b429afeb14610365578063c839fe94146103a1578063ce325bf8146103c157600080fd5b8063a23817f414610319578063a7fc7a071461032c578063b31fc2301461033f57600080fd5b806370a08231116101715780638da5cb5b1161014b5780638da5cb5b146102cf57806391555a92146102e057806397f37c15146102f35780639fc5686d1461030657600080fd5b806370a0823114610278578063715018a6146102b4578063869d40ef146102bc57600080fd5b80636352211e116101ad5780636352211e1461020f578063664ba91b1461023f578063685d9c5f146102525780636b4934851461026557600080fd5b806307b450e7146101d45780631c22d611146101e95780634aea31f0146101fc575b600080fd5b6101e76101e2366004612a43565b6105e2565b005b6101e76101f7366004612aaf565b6106c8565b6101e761020a366004612b88565b610ac4565b61022261021d366004612bdd565b610b47565b6040516001600160a01b0390911681526020015b60405180910390f35b6101e761024d366004612c1b565b610bb2565b6101e7610260366004612c81565b610cd3565b6101e7610273366004612c9e565b610d5c565b6102a6610286366004612c81565b6001600160a01b031660009081526004602052604090205462ffffff1690565b604051908152602001610236565b6101e7610f91565b600254610222906001600160a01b031681565b6000546001600160a01b0316610222565b6101e76102ee366004612cf4565b610ff7565b6101e7610301366004612d71565b6112cb565b6101e7610314366004612dbe565b6113e3565b6101e7610327366004612e50565b611461565b6101e761033a366004612c81565b611524565b6101e761034d366004612cf4565b6115a5565b6101e7610360366004612e85565b611756565b610391610373366004612c81565b6001600160a01b031660009081526001602052604090205460ff1690565b6040519015158152602001610236565b6103b46103af366004612efd565b6117db565b6040516102369190612f32565b6104556103cf366004612bdd565b60408051608081018252600080825260208201819052918101829052606081019190915250600090815260036020908152604091829020825160808101845290546001600160a01b038116825264ffffffffff600160a01b820481169383019390935261ffff600160c81b82041693820193909352600160d81b90920416606082015290565b604051610236919081516001600160a01b0316815260208083015164ffffffffff9081169183019190915260408084015161ffff1690830152606092830151169181019190915260800190565b6102226104b0366004612bdd565b61197e565b6101e76104c3366004612f76565b611a05565b6101e76104d6366004612fb8565b611da1565b6101e76104e9366004612c81565b611f24565b6101e76104fc366004613018565b612006565b6101e761050f366004612c81565b612255565b6101e7610522366004613056565b6122d0565b6105a3610535366004612c81565b6040805180820190915260008082526020820152506001600160a01b031660009081526004602090815260409182902082518084019093525462ffffff81168352630100000090047cffffffffffffffffffffffffffffffffffffffffffffffffffffffffff169082015290565b60408051825162ffffff1681526020928301517cffffffffffffffffffffffffffffffffffffffffffffffffffffffffff169281019290925201610236565b3360009081526001602052604090205460ff166106595760405162461bcd60e51b815260206004820152602a60248201527f436f6e74726f6c6c61626c653a2063616c6c6572206973206e6f74207468652060448201526931b7b73a3937b63632b960b11b60648201526084015b60405180910390fd5b60005b828110156106c2576000848483818110610678576106786130a3565b60209081029290920135600090815260039092525060409020805464ffffffffff60a01b1916600160a01b64ffffffffff86160217905550806106ba816130cf565b91505061065c565b50505050565b3360009081526001602052604090205460ff1661073a5760405162461bcd60e51b815260206004820152602a60248201527f436f6e74726f6c6c61626c653a2063616c6c6572206973206e6f74207468652060448201526931b7b73a3937b63632b960b11b6064820152608401610650565b868514801561074857508683145b801561075357508681145b61075c57600080fd5b60005b87811015610a6f57600089898381811061077b5761077b6130a3565b602090810292909201356000818152600390935260409092208054929350916001600160a01b03161590506107f25760405162461bcd60e51b815260206004820152601760248201527f546f6b656e20697320616c7265616479207374616b65640000000000000000006044820152606401610650565b60006107fd8361197e565b6040516323b872dd60e01b81526001600160a01b038f8116600483015230602483015260448201869052919250908216906323b872dd90606401600060405180830381600087803b15801561085157600080fd5b505af1158015610865573d6000803e3d6000fd5b505050508c8260000160006101000a8154816001600160a01b0302191690836001600160a01b031602179055508585858181106108a4576108a46130a3565b90506020020160208101906108b99190613108565b825464ffffffffff91909116600160a01b0264ffffffffff60a01b199091161782558989858181106108ed576108ed6130a3565b90506020020160208101906109029190613125565b825461ffff91909116600160c81b027fffffffffff0000ffffffffffffffffffffffffffffffffffffffffffffffffff90911617825587878581811061094a5761094a6130a3565b905060200201602081019061095f9190613108565b825464ffffffffff91909116600160d81b027affffffffffffffffffffffffffffffffffffffffffffffffffffff9091161782558989858181106109a5576109a56130a3565b90506020020160208101906109ba9190613125565b61ffff16838e6001600160a01b03167f1e1fa260a8fa220eb1fa317e76f9185f62691fd78c05e02136e0ad593b67be848989898181106109fc576109fc6130a3565b9050602002016020810190610a119190613108565b8c8c8a818110610a2357610a236130a3565b9050602002016020810190610a389190613108565b6040805164ffffffffff93841681529290911660208301520160405180910390a45050508080610a67906130cf565b91505061075f565b506001600160a01b03891660009081526004602052604081208054899290610a9d90849062ffffff16613142565b92506101000a81548162ffffff021916908362ffffff160217905550505050505050505050565b3360009081526001602052604090205460ff16610b365760405162461bcd60e51b815260206004820152602a60248201527f436f6e74726f6c6c61626c653a2063616c6c6572206973206e6f74207468652060448201526931b7b73a3937b63632b960b11b6064820152608401610650565b610b4283848484612758565b505050565b6000818152600360205260408120546001600160a01b031680610bac5760405162461bcd60e51b815260206004820152601260248201527f546f6b656e206e6f7420696e207661756c7400000000000000000000000000006044820152606401610650565b92915050565b3360009081526001602052604090205460ff16610c245760405162461bcd60e51b815260206004820152602a60248201527f436f6e74726f6c6c61626c653a2063616c6c6572206973206e6f74207468652060448201526931b7b73a3937b63632b960b11b6064820152608401610650565b60005b83811015610ccc576000858583818110610c4357610c436130a3565b6020908102929092013560008181526003909352604090922080547fffffffffff0000ffffffffffffffffffffffffffffffffffffffffffffffffff16600160c81b61ffff891602178155919250508315610cb757805464ffffffffff60a01b1916600160a01b4264ffffffffff16021781555b50508080610cc4906130cf565b915050610c27565b5050505050565b6000546001600160a01b03163314610d2d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610650565b6002805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b3360009081526001602052604090205460ff16610dce5760405162461bcd60e51b815260206004820152602a60248201527f436f6e74726f6c6c61626c653a2063616c6c6572206973206e6f74207468652060448201526931b7b73a3937b63632b960b11b6064820152608401610650565b6000610ddd6020830183612c81565b6001600160a01b03161415610e345760405162461bcd60e51b815260206004820152601360248201527f4f776e65722063616e6e6f74206265206e696c000000000000000000000000006044820152606401610650565b610e416020820182612c81565b6000838152600360205260409020546001600160a01b03908116911614610f77576000828152600360209081526040808320546001600160a01b0316835260049091528120805460019290610e9c90849062ffffff16613169565b92506101000a81548162ffffff021916908362ffffff160217905550600160046000836000016020810190610ed19190612c81565b6001600160a01b03168152602081019190915260400160009081208054909190610f0190849062ffffff16613142565b92506101000a81548162ffffff021916908362ffffff160217905550806000016020810190610f309190612c81565b6000838152600360205260408082205490516001600160a01b039384169386939216917fc684ee2300c5b698e0bd994ada3aeb89e75a70cf7098f0a9cac9759594a17ab991a45b600082815260036020526040902081906106c2828261318d565b6000546001600160a01b03163314610feb5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610650565b610ff56000612987565b565b3360009081526001602052604090205460ff166110695760405162461bcd60e51b815260206004820152602a60248201527f436f6e74726f6c6c61626c653a2063616c6c6572206973206e6f74207468652060448201526931b7b73a3937b63632b960b11b6064820152608401610650565b60005b8381101561127a576000858583818110611088576110886130a3565b602090810292909201356000818152600390935260409092208054929350916001600160a01b03161590506110ff5760405162461bcd60e51b815260206004820152601760248201527f546f6b656e20697320616c7265616479207374616b65640000000000000000006044820152606401610650565b600061110a8361197e565b6040516323b872dd60e01b81526001600160a01b038b8116600483015230602483015260448201869052919250908216906323b872dd90606401600060405180830381600087803b15801561115e57600080fd5b505af1158015611172573d6000803e3d6000fd5b50505050888260000160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550428260000160146101000a81548164ffffffffff021916908364ffffffffff160217905550858260000160196101000a81548161ffff021916908361ffff1602179055508482600001601b6101000a81548164ffffffffff021916908364ffffffffff1602179055508561ffff16838a6001600160a01b03167f1e1fa260a8fa220eb1fa317e76f9185f62691fd78c05e02136e0ad593b67be84428960405161125c92919064ffffffffff92831681529116602082015260400190565b60405180910390a45050508080611272906130cf565b91505061106c565b506001600160a01b038516600090815260046020526040812080548592906112a890849062ffffff16613142565b92506101000a81548162ffffff021916908362ffffff1602179055505050505050565b3360009081526001602052604090205460ff1661133d5760405162461bcd60e51b815260206004820152602a60248201527f436f6e74726f6c6c61626c653a2063616c6c6572206973206e6f74207468652060448201526931b7b73a3937b63632b960b11b6064820152608401610650565b60005b83811015610ccc57600085858381811061135c5761135c6130a3565b6020908102929092013560008181526003909352604090922080547affffffffffffffffffffffffffffffffffffffffffffffffffffff16600160d81b64ffffffffff8916021781559192505083156113ce57805464ffffffffff60a01b1916600160a01b4264ffffffffff16021781555b505080806113db906130cf565b915050611340565b3360009081526001602052604090205460ff166114555760405162461bcd60e51b815260206004820152602a60248201527f436f6e74726f6c6c61626c653a2063616c6c6572206973206e6f74207468652060448201526931b7b73a3937b63632b960b11b6064820152608401610650565b6106c284848484612758565b3360009081526001602052604090205460ff166114d35760405162461bcd60e51b815260206004820152602a60248201527f436f6e74726f6c6c61626c653a2063616c6c6572206973206e6f74207468652060448201526931b7b73a3937b63632b960b11b6064820152608401610650565b6001600160a01b03909116600090815260046020526040902080547cffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90921663010000000262ffffff909216919091179055565b6000546001600160a01b0316331461157e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610650565b6001600160a01b03166000908152600160208190526040909120805460ff19169091179055565b3360009081526001602052604090205460ff166116175760405162461bcd60e51b815260206004820152602a60248201527f436f6e74726f6c6c61626c653a2063616c6c6572206973206e6f74207468652060448201526931b7b73a3937b63632b960b11b6064820152608401610650565b60005b8381101561127a576000858583818110611636576116366130a3565b9050602002013590506000600360008381526020019081526020016000209050878160000160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550428160000160146101000a81548164ffffffffff021916908364ffffffffff160217905550848160000160196101000a81548161ffff021916908361ffff1602179055508381600001601b6101000a81548164ffffffffff021916908364ffffffffff1602179055508461ffff1682896001600160a01b03167f1e1fa260a8fa220eb1fa317e76f9185f62691fd78c05e02136e0ad593b67be84428860405161173992919091825264ffffffffff16602082015260400190565b60405180910390a45050808061174e906130cf565b91505061161a565b3360009081526001602052604090205460ff166117c85760405162461bcd60e51b815260206004820152602a60248201527f436f6e74726f6c6c61626c653a2063616c6c6572206973206e6f74207468652060448201526931b7b73a3937b63632b960b11b6064820152608401610650565b610ccc858585858563ffffffff166115a5565b6001600160a01b03831660009081526004602052604090205460609062ffffff1680611817575050604080516000815260208101909152611977565b6000808267ffffffffffffffff8111156118335761183361329e565b60405190808252806020026020018201604052801561185c578160200160208202803683370190505b509050855b8581116118d4576000818152600360205260409020546001600160a01b03898116911614156118c2578082848151811061189d5761189d6130a3565b60209081029190910101526118b36001846132b4565b9250838314156118c2576118d4565b806118cc816130cf565b915050611861565b5060008267ffffffffffffffff8111156118f0576118f061329e565b604051908082528060200260200182016040528015611919578160200160208202803683370190505b50905060005b8381101561197057828181518110611939576119396130a3565b6020026020010151828281518110611953576119536130a3565b602090810291909101015280611968816130cf565b91505061191f565b5093505050505b9392505050565b6002546040517fead9189e000000000000000000000000000000000000000000000000000000008152600481018390526000916001600160a01b03169063ead9189e90602401602060405180830381865afa1580156119e1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bac91906132cc565b3360009081526001602052604090205460ff16611a775760405162461bcd60e51b815260206004820152602a60248201527f436f6e74726f6c6c61626c653a2063616c6c6572206973206e6f74207468652060448201526931b7b73a3937b63632b960b11b6064820152608401610650565b60008167ffffffffffffffff811115611a9257611a9261329e565b604051908082528060200260200182016040528015611abb578160200160208202803683370190505b50905060008267ffffffffffffffff811115611ad957611ad961329e565b604051908082528060200260200182016040528015611b02578160200160208202803683370190505b50905060005b83811015611cbf576000858583818110611b2457611b246130a3565b60209081029290920135600081815260038085526040808320815160808101835281546001600160a01b038116825264ffffffffff600160a01b82048116838b015261ffff600160c81b83041694830194909452600160d81b900490921660608301528484529190955281905590935090505b8551811015611ca95760006001600160a01b0316868281518110611bbd57611bbd6130a3565b60200260200101516001600160a01b03161415611c30578160000151868281518110611beb57611beb6130a3565b60200260200101906001600160a01b031690816001600160a01b0316815250506001858281518110611c1f57611c1f6130a3565b602002602001018181525050611ca9565b81600001516001600160a01b0316868281518110611c5057611c506130a3565b60200260200101516001600160a01b03161415611c97576001858281518110611c7b57611c7b6130a3565b60200260200101818151611c8f91906132b4565b905250611ca9565b80611ca1816130cf565b915050611b97565b5050508080611cb7906130cf565b915050611b08565b5060005b8251811015610ccc5760006001600160a01b0316838281518110611ce957611ce96130a3565b60200260200101516001600160a01b031614611d8a57818181518110611d1157611d116130a3565b602002602001015160046000858481518110611d2f57611d2f6130a3565b6020908102919091018101516001600160a01b0316825281019190915260400160009081208054909190611d6990849062ffffff16613169565b92506101000a81548162ffffff021916908362ffffff160217905550611d8f565b610ccc565b80611d99816130cf565b915050611cc3565b3360009081526001602052604090205460ff16611e135760405162461bcd60e51b815260206004820152602a60248201527f436f6e74726f6c6c61626c653a2063616c6c6572206973206e6f74207468652060448201526931b7b73a3937b63632b960b11b6064820152608401610650565b828114611e625760405162461bcd60e51b815260206004820152600f60248201527f496e636f727265637420696e70757400000000000000000000000000000000006044820152606401610650565b60005b83811015610ccc576000858583818110611e8157611e816130a3565b9050602002016020810190611e969190612c81565b90506000848484818110611eac57611eac6130a3565b9050602002016020810190611ec191906132e9565b6001600160a01b03909216600090815260046020526040902080547cffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90931663010000000262ffffff909316929092179091555080611f1c816130cf565b915050611e65565b6000546001600160a01b03163314611f7e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610650565b6001600160a01b038116611ffa5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610650565b61200381612987565b50565b3360009081526001602052604090205460ff166120785760405162461bcd60e51b815260206004820152602a60248201527f436f6e74726f6c6c61626c653a2063616c6c6572206973206e6f74207468652060448201526931b7b73a3937b63632b960b11b6064820152608401610650565b6001600160a01b0382166120ce5760405162461bcd60e51b815260206004820152601360248201527f4f776e65722063616e6e6f74206265206e696c000000000000000000000000006044820152606401610650565b600083815260036020526040902080546001600160a01b03166121335760405162461bcd60e51b815260206004820152600e60248201527f4e6f207374616b6520666f756e640000000000000000000000000000000000006044820152606401610650565b80546040516001600160a01b038086169287929116907fc684ee2300c5b698e0bd994ada3aeb89e75a70cf7098f0a9cac9759594a17ab990600090a480546001600160a01b0316600090815260046020526040812080546001929061219e90849062ffffff16613169565b82546101009290920a62ffffff8181021990931691831602179091556001600160a01b038516600090815260046020526040812080546001945090926121e691859116613142565b82546101009290920a62ffffff81810219909316919092169190910217905550805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03841617815581156106c257805464ffffffffff60a01b1916600160a01b4264ffffffffff1602179055505050565b6000546001600160a01b031633146122af5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610650565b6001600160a01b03166000908152600160205260409020805460ff19169055565b3360009081526001602052604090205460ff166123425760405162461bcd60e51b815260206004820152602a60248201527f436f6e74726f6c6c61626c653a2063616c6c6572206973206e6f74207468652060448201526931b7b73a3937b63632b960b11b6064820152608401610650565b6001600160a01b0382166123985760405162461bcd60e51b815260206004820152601360248201527f4f776e65722063616e6e6f74206265206e696c000000000000000000000000006044820152606401610650565b60008367ffffffffffffffff8111156123b3576123b361329e565b6040519080825280602002602001820160405280156123dc578160200160208202803683370190505b50905060008467ffffffffffffffff8111156123fa576123fa61329e565b604051908082528060200260200182016040528015612423578160200160208202803683370190505b50905060005b85811015612624576000878783818110612445576124456130a3565b905060200201359050600060036000838152602001908152602001600020905060005b85518110156125875760006001600160a01b031686828151811061248e5761248e6130a3565b60200260200101516001600160a01b0316141561250c57815486516001600160a01b03909116908790839081106124c7576124c76130a3565b60200260200101906001600160a01b031690816001600160a01b03168152505060018582815181106124fb576124fb6130a3565b602002602001018181525050612587565b815486516001600160a01b039091169087908390811061252e5761252e6130a3565b60200260200101516001600160a01b03161415612575576001858281518110612559576125596130a3565b6020026020010181815161256d91906132b4565b905250612587565b8061257f816130cf565b915050612468565b5080546040516001600160a01b03808a169285929116907fc684ee2300c5b698e0bd994ada3aeb89e75a70cf7098f0a9cac9759594a17ab990600090a4805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038816178155851561260f57805464ffffffffff60a01b1916600160a01b4264ffffffffff16021781555b5050808061261c906130cf565b915050612429565b5060005b82518110156127065760006001600160a01b031683828151811061264e5761264e6130a3565b60200260200101516001600160a01b0316146126ef57818181518110612676576126766130a3565b602002602001015160046000858481518110612694576126946130a3565b6020908102919091018101516001600160a01b03168252810191909152604001600090812080549091906126ce90849062ffffff16613169565b92506101000a81548162ffffff021916908362ffffff1602179055506126f4565b612706565b806126fe816130cf565b915050612628565b506001600160a01b0384166000908152600460205260408120805487929061273490849062ffffff16613142565b92506101000a81548162ffffff021916908362ffffff160217905550505050505050565b60005b81811015612937576000838383818110612777576127776130a3565b60209081029290920135600081815260038452604090819020815160808101835290546001600160a01b0380821680845264ffffffffff600160a01b840481169885019890985261ffff600160c81b84041694840194909452600160d81b9091049095166060820152919450909289161490506128365760405162461bcd60e51b815260206004820152600c60248201527f4e6f7420616e206f776e657200000000000000000000000000000000000000006044820152606401610650565b60008281526003602052604081208190556128508361197e565b6040516323b872dd60e01b81523060048201526001600160a01b03898116602483015260448201869052919250908216906323b872dd90606401600060405180830381600087803b1580156128a457600080fd5b505af11580156128b8573d6000803e3d6000fd5b50505050816040015161ffff168383600001516001600160a01b03167f52cf9557909c923f423f3a206b25eb84d1399b75b65389e2cc4686fdf93f9d5342866060015160405161291992919091825264ffffffffff16602082015260400190565b60405180910390a4505050808061292f906130cf565b91505061275b565b506001600160a01b0384166000908152600460205260408120805483929061296590849062ffffff16613169565b92506101000a81548162ffffff021916908362ffffff16021790555050505050565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008083601f8401126129f657600080fd5b50813567ffffffffffffffff811115612a0e57600080fd5b6020830191508360208260051b8501011115612a2957600080fd5b9250929050565b64ffffffffff8116811461200357600080fd5b600080600060408486031215612a5857600080fd5b833567ffffffffffffffff811115612a6f57600080fd5b612a7b868287016129e4565b9094509250506020840135612a8f81612a30565b809150509250925092565b6001600160a01b038116811461200357600080fd5b600080600080600080600080600060a08a8c031215612acd57600080fd5b8935612ad881612a9a565b985060208a013567ffffffffffffffff80821115612af557600080fd5b612b018d838e016129e4565b909a50985060408c0135915080821115612b1a57600080fd5b612b268d838e016129e4565b909850965060608c0135915080821115612b3f57600080fd5b612b4b8d838e016129e4565b909650945060808c0135915080821115612b6457600080fd5b50612b718c828d016129e4565b915080935050809150509295985092959850929598565b600080600060408486031215612b9d57600080fd5b8335612ba881612a9a565b9250602084013567ffffffffffffffff811115612bc457600080fd5b612bd0868287016129e4565b9497909650939450505050565b600060208284031215612bef57600080fd5b5035919050565b61ffff8116811461200357600080fd5b80358015158114612c1657600080fd5b919050565b60008060008060608587031215612c3157600080fd5b843567ffffffffffffffff811115612c4857600080fd5b612c54878288016129e4565b9095509350506020850135612c6881612bf6565b9150612c7660408601612c06565b905092959194509250565b600060208284031215612c9357600080fd5b813561197781612a9a565b60008082840360a0811215612cb257600080fd5b8335925060807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082011215612ce657600080fd5b506020830190509250929050565b600080600080600060808688031215612d0c57600080fd5b8535612d1781612a9a565b9450602086013567ffffffffffffffff811115612d3357600080fd5b612d3f888289016129e4565b9095509350506040860135612d5381612bf6565b91506060860135612d6381612a30565b809150509295509295909350565b60008060008060608587031215612d8757600080fd5b843567ffffffffffffffff811115612d9e57600080fd5b612daa878288016129e4565b9095509350506020850135612c6881612a30565b60008060008060608587031215612dd457600080fd5b8435612ddf81612a9a565b93506020850135612def81612a9a565b9250604085013567ffffffffffffffff811115612e0b57600080fd5b612e17878288016129e4565b95989497509550505050565b80357cffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81168114612c1657600080fd5b60008060408385031215612e6357600080fd5b8235612e6e81612a9a565b9150612e7c60208401612e23565b90509250929050565b600080600080600060808688031215612e9d57600080fd5b8535612ea881612a9a565b9450602086013567ffffffffffffffff811115612ec457600080fd5b612ed0888289016129e4565b9095509350506040860135612ee481612bf6565b9150606086013563ffffffff81168114612d6357600080fd5b600080600060608486031215612f1257600080fd5b8335612f1d81612a9a565b95602085013595506040909401359392505050565b6020808252825182820181905260009190848201906040850190845b81811015612f6a57835183529284019291840191600101612f4e565b50909695505050505050565b60008060208385031215612f8957600080fd5b823567ffffffffffffffff811115612fa057600080fd5b612fac858286016129e4565b90969095509350505050565b60008060008060408587031215612fce57600080fd5b843567ffffffffffffffff80821115612fe657600080fd5b612ff2888389016129e4565b9096509450602087013591508082111561300b57600080fd5b50612e17878288016129e4565b60008060006060848603121561302d57600080fd5b83359250602084013561303f81612a9a565b915061304d60408501612c06565b90509250925092565b6000806000806060858703121561306c57600080fd5b843567ffffffffffffffff81111561308357600080fd5b61308f878288016129e4565b9095509350506020850135612c6881612a9a565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613101576131016130b9565b5060010190565b60006020828403121561311a57600080fd5b813561197781612a30565b60006020828403121561313757600080fd5b813561197781612bf6565b600062ffffff808316818516808303821115613160576131606130b9565b01949350505050565b600062ffffff83811690831681811015613185576131856130b9565b039392505050565b813561319881612a9a565b6001600160a01b038116905081548173ffffffffffffffffffffffffffffffffffffffff19821617835560208401356131d081612a30565b78ffffffffff00000000000000000000000000000000000000008160a01b16905080837fffffffffffffff00000000000000000000000000000000000000000000000000841617178455604085013561322881612bf6565b7affff000000000000000000000000000000000000000000000000008160c81b1690507fffffffffff00000000000000000000000000000000000000000000000000000081858286161784171786556060870135935061328784612a30565b808460d81b16858417831717865550505050505050565b634e487b7160e01b600052604160045260246000fd5b600082198211156132c7576132c76130b9565b500190565b6000602082840312156132de57600080fd5b815161197781612a9a565b6000602082840312156132fb57600080fd5b61197782612e2356fea26469706673582212204cd2a18e73e5a7b037e1012fc001c72d0250698acdba6f8918df83ac06bf6aca64736f6c634300080c0033000000000000000000000000c81e0a00ba9feb8064c0323c6a8b75b5747c6d64

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101cf5760003560e01c8063a23817f411610104578063ead9189e116100a2578063f4407a6511610071578063f4407a65146104ee578063f6a74ed714610501578063f747dee014610514578063fbcbc0f11461052757600080fd5b8063ead9189e146104a2578063ec74cbeb146104b5578063f2d72353146104c8578063f2fde38b146104db57600080fd5b8063b3776f8c116100de578063b3776f8c14610352578063b429afeb14610365578063c839fe94146103a1578063ce325bf8146103c157600080fd5b8063a23817f414610319578063a7fc7a071461032c578063b31fc2301461033f57600080fd5b806370a08231116101715780638da5cb5b1161014b5780638da5cb5b146102cf57806391555a92146102e057806397f37c15146102f35780639fc5686d1461030657600080fd5b806370a0823114610278578063715018a6146102b4578063869d40ef146102bc57600080fd5b80636352211e116101ad5780636352211e1461020f578063664ba91b1461023f578063685d9c5f146102525780636b4934851461026557600080fd5b806307b450e7146101d45780631c22d611146101e95780634aea31f0146101fc575b600080fd5b6101e76101e2366004612a43565b6105e2565b005b6101e76101f7366004612aaf565b6106c8565b6101e761020a366004612b88565b610ac4565b61022261021d366004612bdd565b610b47565b6040516001600160a01b0390911681526020015b60405180910390f35b6101e761024d366004612c1b565b610bb2565b6101e7610260366004612c81565b610cd3565b6101e7610273366004612c9e565b610d5c565b6102a6610286366004612c81565b6001600160a01b031660009081526004602052604090205462ffffff1690565b604051908152602001610236565b6101e7610f91565b600254610222906001600160a01b031681565b6000546001600160a01b0316610222565b6101e76102ee366004612cf4565b610ff7565b6101e7610301366004612d71565b6112cb565b6101e7610314366004612dbe565b6113e3565b6101e7610327366004612e50565b611461565b6101e761033a366004612c81565b611524565b6101e761034d366004612cf4565b6115a5565b6101e7610360366004612e85565b611756565b610391610373366004612c81565b6001600160a01b031660009081526001602052604090205460ff1690565b6040519015158152602001610236565b6103b46103af366004612efd565b6117db565b6040516102369190612f32565b6104556103cf366004612bdd565b60408051608081018252600080825260208201819052918101829052606081019190915250600090815260036020908152604091829020825160808101845290546001600160a01b038116825264ffffffffff600160a01b820481169383019390935261ffff600160c81b82041693820193909352600160d81b90920416606082015290565b604051610236919081516001600160a01b0316815260208083015164ffffffffff9081169183019190915260408084015161ffff1690830152606092830151169181019190915260800190565b6102226104b0366004612bdd565b61197e565b6101e76104c3366004612f76565b611a05565b6101e76104d6366004612fb8565b611da1565b6101e76104e9366004612c81565b611f24565b6101e76104fc366004613018565b612006565b6101e761050f366004612c81565b612255565b6101e7610522366004613056565b6122d0565b6105a3610535366004612c81565b6040805180820190915260008082526020820152506001600160a01b031660009081526004602090815260409182902082518084019093525462ffffff81168352630100000090047cffffffffffffffffffffffffffffffffffffffffffffffffffffffffff169082015290565b60408051825162ffffff1681526020928301517cffffffffffffffffffffffffffffffffffffffffffffffffffffffffff169281019290925201610236565b3360009081526001602052604090205460ff166106595760405162461bcd60e51b815260206004820152602a60248201527f436f6e74726f6c6c61626c653a2063616c6c6572206973206e6f74207468652060448201526931b7b73a3937b63632b960b11b60648201526084015b60405180910390fd5b60005b828110156106c2576000848483818110610678576106786130a3565b60209081029290920135600090815260039092525060409020805464ffffffffff60a01b1916600160a01b64ffffffffff86160217905550806106ba816130cf565b91505061065c565b50505050565b3360009081526001602052604090205460ff1661073a5760405162461bcd60e51b815260206004820152602a60248201527f436f6e74726f6c6c61626c653a2063616c6c6572206973206e6f74207468652060448201526931b7b73a3937b63632b960b11b6064820152608401610650565b868514801561074857508683145b801561075357508681145b61075c57600080fd5b60005b87811015610a6f57600089898381811061077b5761077b6130a3565b602090810292909201356000818152600390935260409092208054929350916001600160a01b03161590506107f25760405162461bcd60e51b815260206004820152601760248201527f546f6b656e20697320616c7265616479207374616b65640000000000000000006044820152606401610650565b60006107fd8361197e565b6040516323b872dd60e01b81526001600160a01b038f8116600483015230602483015260448201869052919250908216906323b872dd90606401600060405180830381600087803b15801561085157600080fd5b505af1158015610865573d6000803e3d6000fd5b505050508c8260000160006101000a8154816001600160a01b0302191690836001600160a01b031602179055508585858181106108a4576108a46130a3565b90506020020160208101906108b99190613108565b825464ffffffffff91909116600160a01b0264ffffffffff60a01b199091161782558989858181106108ed576108ed6130a3565b90506020020160208101906109029190613125565b825461ffff91909116600160c81b027fffffffffff0000ffffffffffffffffffffffffffffffffffffffffffffffffff90911617825587878581811061094a5761094a6130a3565b905060200201602081019061095f9190613108565b825464ffffffffff91909116600160d81b027affffffffffffffffffffffffffffffffffffffffffffffffffffff9091161782558989858181106109a5576109a56130a3565b90506020020160208101906109ba9190613125565b61ffff16838e6001600160a01b03167f1e1fa260a8fa220eb1fa317e76f9185f62691fd78c05e02136e0ad593b67be848989898181106109fc576109fc6130a3565b9050602002016020810190610a119190613108565b8c8c8a818110610a2357610a236130a3565b9050602002016020810190610a389190613108565b6040805164ffffffffff93841681529290911660208301520160405180910390a45050508080610a67906130cf565b91505061075f565b506001600160a01b03891660009081526004602052604081208054899290610a9d90849062ffffff16613142565b92506101000a81548162ffffff021916908362ffffff160217905550505050505050505050565b3360009081526001602052604090205460ff16610b365760405162461bcd60e51b815260206004820152602a60248201527f436f6e74726f6c6c61626c653a2063616c6c6572206973206e6f74207468652060448201526931b7b73a3937b63632b960b11b6064820152608401610650565b610b4283848484612758565b505050565b6000818152600360205260408120546001600160a01b031680610bac5760405162461bcd60e51b815260206004820152601260248201527f546f6b656e206e6f7420696e207661756c7400000000000000000000000000006044820152606401610650565b92915050565b3360009081526001602052604090205460ff16610c245760405162461bcd60e51b815260206004820152602a60248201527f436f6e74726f6c6c61626c653a2063616c6c6572206973206e6f74207468652060448201526931b7b73a3937b63632b960b11b6064820152608401610650565b60005b83811015610ccc576000858583818110610c4357610c436130a3565b6020908102929092013560008181526003909352604090922080547fffffffffff0000ffffffffffffffffffffffffffffffffffffffffffffffffff16600160c81b61ffff891602178155919250508315610cb757805464ffffffffff60a01b1916600160a01b4264ffffffffff16021781555b50508080610cc4906130cf565b915050610c27565b5050505050565b6000546001600160a01b03163314610d2d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610650565b6002805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b3360009081526001602052604090205460ff16610dce5760405162461bcd60e51b815260206004820152602a60248201527f436f6e74726f6c6c61626c653a2063616c6c6572206973206e6f74207468652060448201526931b7b73a3937b63632b960b11b6064820152608401610650565b6000610ddd6020830183612c81565b6001600160a01b03161415610e345760405162461bcd60e51b815260206004820152601360248201527f4f776e65722063616e6e6f74206265206e696c000000000000000000000000006044820152606401610650565b610e416020820182612c81565b6000838152600360205260409020546001600160a01b03908116911614610f77576000828152600360209081526040808320546001600160a01b0316835260049091528120805460019290610e9c90849062ffffff16613169565b92506101000a81548162ffffff021916908362ffffff160217905550600160046000836000016020810190610ed19190612c81565b6001600160a01b03168152602081019190915260400160009081208054909190610f0190849062ffffff16613142565b92506101000a81548162ffffff021916908362ffffff160217905550806000016020810190610f309190612c81565b6000838152600360205260408082205490516001600160a01b039384169386939216917fc684ee2300c5b698e0bd994ada3aeb89e75a70cf7098f0a9cac9759594a17ab991a45b600082815260036020526040902081906106c2828261318d565b6000546001600160a01b03163314610feb5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610650565b610ff56000612987565b565b3360009081526001602052604090205460ff166110695760405162461bcd60e51b815260206004820152602a60248201527f436f6e74726f6c6c61626c653a2063616c6c6572206973206e6f74207468652060448201526931b7b73a3937b63632b960b11b6064820152608401610650565b60005b8381101561127a576000858583818110611088576110886130a3565b602090810292909201356000818152600390935260409092208054929350916001600160a01b03161590506110ff5760405162461bcd60e51b815260206004820152601760248201527f546f6b656e20697320616c7265616479207374616b65640000000000000000006044820152606401610650565b600061110a8361197e565b6040516323b872dd60e01b81526001600160a01b038b8116600483015230602483015260448201869052919250908216906323b872dd90606401600060405180830381600087803b15801561115e57600080fd5b505af1158015611172573d6000803e3d6000fd5b50505050888260000160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550428260000160146101000a81548164ffffffffff021916908364ffffffffff160217905550858260000160196101000a81548161ffff021916908361ffff1602179055508482600001601b6101000a81548164ffffffffff021916908364ffffffffff1602179055508561ffff16838a6001600160a01b03167f1e1fa260a8fa220eb1fa317e76f9185f62691fd78c05e02136e0ad593b67be84428960405161125c92919064ffffffffff92831681529116602082015260400190565b60405180910390a45050508080611272906130cf565b91505061106c565b506001600160a01b038516600090815260046020526040812080548592906112a890849062ffffff16613142565b92506101000a81548162ffffff021916908362ffffff1602179055505050505050565b3360009081526001602052604090205460ff1661133d5760405162461bcd60e51b815260206004820152602a60248201527f436f6e74726f6c6c61626c653a2063616c6c6572206973206e6f74207468652060448201526931b7b73a3937b63632b960b11b6064820152608401610650565b60005b83811015610ccc57600085858381811061135c5761135c6130a3565b6020908102929092013560008181526003909352604090922080547affffffffffffffffffffffffffffffffffffffffffffffffffffff16600160d81b64ffffffffff8916021781559192505083156113ce57805464ffffffffff60a01b1916600160a01b4264ffffffffff16021781555b505080806113db906130cf565b915050611340565b3360009081526001602052604090205460ff166114555760405162461bcd60e51b815260206004820152602a60248201527f436f6e74726f6c6c61626c653a2063616c6c6572206973206e6f74207468652060448201526931b7b73a3937b63632b960b11b6064820152608401610650565b6106c284848484612758565b3360009081526001602052604090205460ff166114d35760405162461bcd60e51b815260206004820152602a60248201527f436f6e74726f6c6c61626c653a2063616c6c6572206973206e6f74207468652060448201526931b7b73a3937b63632b960b11b6064820152608401610650565b6001600160a01b03909116600090815260046020526040902080547cffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90921663010000000262ffffff909216919091179055565b6000546001600160a01b0316331461157e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610650565b6001600160a01b03166000908152600160208190526040909120805460ff19169091179055565b3360009081526001602052604090205460ff166116175760405162461bcd60e51b815260206004820152602a60248201527f436f6e74726f6c6c61626c653a2063616c6c6572206973206e6f74207468652060448201526931b7b73a3937b63632b960b11b6064820152608401610650565b60005b8381101561127a576000858583818110611636576116366130a3565b9050602002013590506000600360008381526020019081526020016000209050878160000160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550428160000160146101000a81548164ffffffffff021916908364ffffffffff160217905550848160000160196101000a81548161ffff021916908361ffff1602179055508381600001601b6101000a81548164ffffffffff021916908364ffffffffff1602179055508461ffff1682896001600160a01b03167f1e1fa260a8fa220eb1fa317e76f9185f62691fd78c05e02136e0ad593b67be84428860405161173992919091825264ffffffffff16602082015260400190565b60405180910390a45050808061174e906130cf565b91505061161a565b3360009081526001602052604090205460ff166117c85760405162461bcd60e51b815260206004820152602a60248201527f436f6e74726f6c6c61626c653a2063616c6c6572206973206e6f74207468652060448201526931b7b73a3937b63632b960b11b6064820152608401610650565b610ccc858585858563ffffffff166115a5565b6001600160a01b03831660009081526004602052604090205460609062ffffff1680611817575050604080516000815260208101909152611977565b6000808267ffffffffffffffff8111156118335761183361329e565b60405190808252806020026020018201604052801561185c578160200160208202803683370190505b509050855b8581116118d4576000818152600360205260409020546001600160a01b03898116911614156118c2578082848151811061189d5761189d6130a3565b60209081029190910101526118b36001846132b4565b9250838314156118c2576118d4565b806118cc816130cf565b915050611861565b5060008267ffffffffffffffff8111156118f0576118f061329e565b604051908082528060200260200182016040528015611919578160200160208202803683370190505b50905060005b8381101561197057828181518110611939576119396130a3565b6020026020010151828281518110611953576119536130a3565b602090810291909101015280611968816130cf565b91505061191f565b5093505050505b9392505050565b6002546040517fead9189e000000000000000000000000000000000000000000000000000000008152600481018390526000916001600160a01b03169063ead9189e90602401602060405180830381865afa1580156119e1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bac91906132cc565b3360009081526001602052604090205460ff16611a775760405162461bcd60e51b815260206004820152602a60248201527f436f6e74726f6c6c61626c653a2063616c6c6572206973206e6f74207468652060448201526931b7b73a3937b63632b960b11b6064820152608401610650565b60008167ffffffffffffffff811115611a9257611a9261329e565b604051908082528060200260200182016040528015611abb578160200160208202803683370190505b50905060008267ffffffffffffffff811115611ad957611ad961329e565b604051908082528060200260200182016040528015611b02578160200160208202803683370190505b50905060005b83811015611cbf576000858583818110611b2457611b246130a3565b60209081029290920135600081815260038085526040808320815160808101835281546001600160a01b038116825264ffffffffff600160a01b82048116838b015261ffff600160c81b83041694830194909452600160d81b900490921660608301528484529190955281905590935090505b8551811015611ca95760006001600160a01b0316868281518110611bbd57611bbd6130a3565b60200260200101516001600160a01b03161415611c30578160000151868281518110611beb57611beb6130a3565b60200260200101906001600160a01b031690816001600160a01b0316815250506001858281518110611c1f57611c1f6130a3565b602002602001018181525050611ca9565b81600001516001600160a01b0316868281518110611c5057611c506130a3565b60200260200101516001600160a01b03161415611c97576001858281518110611c7b57611c7b6130a3565b60200260200101818151611c8f91906132b4565b905250611ca9565b80611ca1816130cf565b915050611b97565b5050508080611cb7906130cf565b915050611b08565b5060005b8251811015610ccc5760006001600160a01b0316838281518110611ce957611ce96130a3565b60200260200101516001600160a01b031614611d8a57818181518110611d1157611d116130a3565b602002602001015160046000858481518110611d2f57611d2f6130a3565b6020908102919091018101516001600160a01b0316825281019190915260400160009081208054909190611d6990849062ffffff16613169565b92506101000a81548162ffffff021916908362ffffff160217905550611d8f565b610ccc565b80611d99816130cf565b915050611cc3565b3360009081526001602052604090205460ff16611e135760405162461bcd60e51b815260206004820152602a60248201527f436f6e74726f6c6c61626c653a2063616c6c6572206973206e6f74207468652060448201526931b7b73a3937b63632b960b11b6064820152608401610650565b828114611e625760405162461bcd60e51b815260206004820152600f60248201527f496e636f727265637420696e70757400000000000000000000000000000000006044820152606401610650565b60005b83811015610ccc576000858583818110611e8157611e816130a3565b9050602002016020810190611e969190612c81565b90506000848484818110611eac57611eac6130a3565b9050602002016020810190611ec191906132e9565b6001600160a01b03909216600090815260046020526040902080547cffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90931663010000000262ffffff909316929092179091555080611f1c816130cf565b915050611e65565b6000546001600160a01b03163314611f7e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610650565b6001600160a01b038116611ffa5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610650565b61200381612987565b50565b3360009081526001602052604090205460ff166120785760405162461bcd60e51b815260206004820152602a60248201527f436f6e74726f6c6c61626c653a2063616c6c6572206973206e6f74207468652060448201526931b7b73a3937b63632b960b11b6064820152608401610650565b6001600160a01b0382166120ce5760405162461bcd60e51b815260206004820152601360248201527f4f776e65722063616e6e6f74206265206e696c000000000000000000000000006044820152606401610650565b600083815260036020526040902080546001600160a01b03166121335760405162461bcd60e51b815260206004820152600e60248201527f4e6f207374616b6520666f756e640000000000000000000000000000000000006044820152606401610650565b80546040516001600160a01b038086169287929116907fc684ee2300c5b698e0bd994ada3aeb89e75a70cf7098f0a9cac9759594a17ab990600090a480546001600160a01b0316600090815260046020526040812080546001929061219e90849062ffffff16613169565b82546101009290920a62ffffff8181021990931691831602179091556001600160a01b038516600090815260046020526040812080546001945090926121e691859116613142565b82546101009290920a62ffffff81810219909316919092169190910217905550805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03841617815581156106c257805464ffffffffff60a01b1916600160a01b4264ffffffffff1602179055505050565b6000546001600160a01b031633146122af5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610650565b6001600160a01b03166000908152600160205260409020805460ff19169055565b3360009081526001602052604090205460ff166123425760405162461bcd60e51b815260206004820152602a60248201527f436f6e74726f6c6c61626c653a2063616c6c6572206973206e6f74207468652060448201526931b7b73a3937b63632b960b11b6064820152608401610650565b6001600160a01b0382166123985760405162461bcd60e51b815260206004820152601360248201527f4f776e65722063616e6e6f74206265206e696c000000000000000000000000006044820152606401610650565b60008367ffffffffffffffff8111156123b3576123b361329e565b6040519080825280602002602001820160405280156123dc578160200160208202803683370190505b50905060008467ffffffffffffffff8111156123fa576123fa61329e565b604051908082528060200260200182016040528015612423578160200160208202803683370190505b50905060005b85811015612624576000878783818110612445576124456130a3565b905060200201359050600060036000838152602001908152602001600020905060005b85518110156125875760006001600160a01b031686828151811061248e5761248e6130a3565b60200260200101516001600160a01b0316141561250c57815486516001600160a01b03909116908790839081106124c7576124c76130a3565b60200260200101906001600160a01b031690816001600160a01b03168152505060018582815181106124fb576124fb6130a3565b602002602001018181525050612587565b815486516001600160a01b039091169087908390811061252e5761252e6130a3565b60200260200101516001600160a01b03161415612575576001858281518110612559576125596130a3565b6020026020010181815161256d91906132b4565b905250612587565b8061257f816130cf565b915050612468565b5080546040516001600160a01b03808a169285929116907fc684ee2300c5b698e0bd994ada3aeb89e75a70cf7098f0a9cac9759594a17ab990600090a4805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038816178155851561260f57805464ffffffffff60a01b1916600160a01b4264ffffffffff16021781555b5050808061261c906130cf565b915050612429565b5060005b82518110156127065760006001600160a01b031683828151811061264e5761264e6130a3565b60200260200101516001600160a01b0316146126ef57818181518110612676576126766130a3565b602002602001015160046000858481518110612694576126946130a3565b6020908102919091018101516001600160a01b03168252810191909152604001600090812080549091906126ce90849062ffffff16613169565b92506101000a81548162ffffff021916908362ffffff1602179055506126f4565b612706565b806126fe816130cf565b915050612628565b506001600160a01b0384166000908152600460205260408120805487929061273490849062ffffff16613142565b92506101000a81548162ffffff021916908362ffffff160217905550505050505050565b60005b81811015612937576000838383818110612777576127776130a3565b60209081029290920135600081815260038452604090819020815160808101835290546001600160a01b0380821680845264ffffffffff600160a01b840481169885019890985261ffff600160c81b84041694840194909452600160d81b9091049095166060820152919450909289161490506128365760405162461bcd60e51b815260206004820152600c60248201527f4e6f7420616e206f776e657200000000000000000000000000000000000000006044820152606401610650565b60008281526003602052604081208190556128508361197e565b6040516323b872dd60e01b81523060048201526001600160a01b03898116602483015260448201869052919250908216906323b872dd90606401600060405180830381600087803b1580156128a457600080fd5b505af11580156128b8573d6000803e3d6000fd5b50505050816040015161ffff168383600001516001600160a01b03167f52cf9557909c923f423f3a206b25eb84d1399b75b65389e2cc4686fdf93f9d5342866060015160405161291992919091825264ffffffffff16602082015260400190565b60405180910390a4505050808061292f906130cf565b91505061275b565b506001600160a01b0384166000908152600460205260408120805483929061296590849062ffffff16613169565b92506101000a81548162ffffff021916908362ffffff16021790555050505050565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008083601f8401126129f657600080fd5b50813567ffffffffffffffff811115612a0e57600080fd5b6020830191508360208260051b8501011115612a2957600080fd5b9250929050565b64ffffffffff8116811461200357600080fd5b600080600060408486031215612a5857600080fd5b833567ffffffffffffffff811115612a6f57600080fd5b612a7b868287016129e4565b9094509250506020840135612a8f81612a30565b809150509250925092565b6001600160a01b038116811461200357600080fd5b600080600080600080600080600060a08a8c031215612acd57600080fd5b8935612ad881612a9a565b985060208a013567ffffffffffffffff80821115612af557600080fd5b612b018d838e016129e4565b909a50985060408c0135915080821115612b1a57600080fd5b612b268d838e016129e4565b909850965060608c0135915080821115612b3f57600080fd5b612b4b8d838e016129e4565b909650945060808c0135915080821115612b6457600080fd5b50612b718c828d016129e4565b915080935050809150509295985092959850929598565b600080600060408486031215612b9d57600080fd5b8335612ba881612a9a565b9250602084013567ffffffffffffffff811115612bc457600080fd5b612bd0868287016129e4565b9497909650939450505050565b600060208284031215612bef57600080fd5b5035919050565b61ffff8116811461200357600080fd5b80358015158114612c1657600080fd5b919050565b60008060008060608587031215612c3157600080fd5b843567ffffffffffffffff811115612c4857600080fd5b612c54878288016129e4565b9095509350506020850135612c6881612bf6565b9150612c7660408601612c06565b905092959194509250565b600060208284031215612c9357600080fd5b813561197781612a9a565b60008082840360a0811215612cb257600080fd5b8335925060807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082011215612ce657600080fd5b506020830190509250929050565b600080600080600060808688031215612d0c57600080fd5b8535612d1781612a9a565b9450602086013567ffffffffffffffff811115612d3357600080fd5b612d3f888289016129e4565b9095509350506040860135612d5381612bf6565b91506060860135612d6381612a30565b809150509295509295909350565b60008060008060608587031215612d8757600080fd5b843567ffffffffffffffff811115612d9e57600080fd5b612daa878288016129e4565b9095509350506020850135612c6881612a30565b60008060008060608587031215612dd457600080fd5b8435612ddf81612a9a565b93506020850135612def81612a9a565b9250604085013567ffffffffffffffff811115612e0b57600080fd5b612e17878288016129e4565b95989497509550505050565b80357cffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81168114612c1657600080fd5b60008060408385031215612e6357600080fd5b8235612e6e81612a9a565b9150612e7c60208401612e23565b90509250929050565b600080600080600060808688031215612e9d57600080fd5b8535612ea881612a9a565b9450602086013567ffffffffffffffff811115612ec457600080fd5b612ed0888289016129e4565b9095509350506040860135612ee481612bf6565b9150606086013563ffffffff81168114612d6357600080fd5b600080600060608486031215612f1257600080fd5b8335612f1d81612a9a565b95602085013595506040909401359392505050565b6020808252825182820181905260009190848201906040850190845b81811015612f6a57835183529284019291840191600101612f4e565b50909695505050505050565b60008060208385031215612f8957600080fd5b823567ffffffffffffffff811115612fa057600080fd5b612fac858286016129e4565b90969095509350505050565b60008060008060408587031215612fce57600080fd5b843567ffffffffffffffff80821115612fe657600080fd5b612ff2888389016129e4565b9096509450602087013591508082111561300b57600080fd5b50612e17878288016129e4565b60008060006060848603121561302d57600080fd5b83359250602084013561303f81612a9a565b915061304d60408501612c06565b90509250925092565b6000806000806060858703121561306c57600080fd5b843567ffffffffffffffff81111561308357600080fd5b61308f878288016129e4565b9095509350506020850135612c6881612a9a565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613101576131016130b9565b5060010190565b60006020828403121561311a57600080fd5b813561197781612a30565b60006020828403121561313757600080fd5b813561197781612bf6565b600062ffffff808316818516808303821115613160576131606130b9565b01949350505050565b600062ffffff83811690831681811015613185576131856130b9565b039392505050565b813561319881612a9a565b6001600160a01b038116905081548173ffffffffffffffffffffffffffffffffffffffff19821617835560208401356131d081612a30565b78ffffffffff00000000000000000000000000000000000000008160a01b16905080837fffffffffffffff00000000000000000000000000000000000000000000000000841617178455604085013561322881612bf6565b7affff000000000000000000000000000000000000000000000000008160c81b1690507fffffffffff00000000000000000000000000000000000000000000000000000081858286161784171786556060870135935061328784612a30565b808460d81b16858417831717865550505050505050565b634e487b7160e01b600052604160045260246000fd5b600082198211156132c7576132c76130b9565b500190565b6000602082840312156132de57600080fd5b815161197781612a9a565b6000602082840312156132fb57600080fd5b61197782612e2356fea26469706673582212204cd2a18e73e5a7b037e1012fc001c72d0250698acdba6f8918df83ac06bf6aca64736f6c634300080c0033

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

000000000000000000000000c81e0a00ba9feb8064c0323c6a8b75b5747c6d64

-----Decoded View---------------
Arg [0] : _nftLookupAddress (address): 0xc81E0a00ba9feB8064C0323c6a8b75B5747c6D64

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000c81e0a00ba9feb8064c0323c6a8b75b5747c6d64


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.