ETH Price: $3,509.89 (+3.23%)
Gas: 11 Gwei

Contract

0x135236008b5a5b0099E0c2A46882785b619E5dEc
 
Transaction Hash
Method
Block
From
To
Unstake202138572024-07-01 19:48:1115 days ago1719863291IN
0x13523600...b619E5dEc
0 ETH0.000551310.59210548
Unstake202138512024-07-01 19:46:5915 days ago1719863219IN
0x13523600...b619E5dEc
0 ETH0.0007634711.04095225
Unstake201936232024-06-28 23:59:3518 days ago1719619175IN
0x13523600...b619E5dEc
0 ETH0.000306262.22255904
Unstake201935812024-06-28 23:50:5918 days ago1719618659IN
0x13523600...b619E5dEc
0 ETH0.000189172.18814051
Unstake201275842024-06-19 18:30:1127 days ago1718821811IN
0x13523600...b619E5dEc
0 ETH0.002018814.69300086
Unstake199950872024-06-01 6:10:1146 days ago1717222211IN
0x13523600...b619E5dEc
0 ETH0.001257585.10956853
Unstake199581412024-05-27 2:11:4751 days ago1716775907IN
0x13523600...b619E5dEc
0 ETH0.000327774.74019505
Unstake199389992024-05-24 9:58:5953 days ago1716544739IN
0x13523600...b619E5dEc
0 ETH0.000491237.10395886
Unstake198854982024-05-16 22:23:5961 days ago1715898239IN
0x13523600...b619E5dEc
0 ETH0.000233343.37451296
Unstake198297332024-05-09 3:13:4769 days ago1715224427IN
0x13523600...b619E5dEc
0 ETH0.000527454.39205799
Unstake198259992024-05-08 14:41:1169 days ago1715179271IN
0x13523600...b619E5dEc
0 ETH0.0015904611.57656485
Unstake198259772024-05-08 14:36:4769 days ago1715179007IN
0x13523600...b619E5dEc
0 ETH0.0031100511.69777621
Unstake197842492024-05-02 18:32:4775 days ago1714674767IN
0x13523600...b619E5dEc
0 ETH0.000548476.34410486
Unstake197566582024-04-28 22:00:5979 days ago1714341659IN
0x13523600...b619E5dEc
0 ETH0.000758635.52139089
Unstake197347042024-04-25 20:15:2382 days ago1714076123IN
0x13523600...b619E5dEc
0 ETH0.000980089.44559576
Unstake197346802024-04-25 20:10:3582 days ago1714075835IN
0x13523600...b619E5dEc
0 ETH0.0013074810.79972159
Unstake196665212024-04-16 7:21:4791 days ago1713252107IN
0x13523600...b619E5dEc
0 ETH0.000640439.26173824
Unstake196444972024-04-13 5:13:2395 days ago1712985203IN
0x13523600...b619E5dEc
0 ETH0.0021039410.97133691
Unstake195249092024-03-27 9:55:35111 days ago1711533335IN
0x13523600...b619E5dEc
0 ETH0.0026948322.43954203
Unstake195035042024-03-24 9:25:35114 days ago1711272335IN
0x13523600...b619E5dEc
0 ETH0.001066915.42900614
Unstake194977072024-03-23 13:50:59115 days ago1711201859IN
0x13523600...b619E5dEc
0 ETH0.0017148919.83564329
Unstake194665552024-03-19 4:55:47120 days ago1710824147IN
0x13523600...b619E5dEc
0 ETH0.0080809318.68048879
Unstake194610592024-03-18 10:22:47120 days ago1710757367IN
0x13523600...b619E5dEc
0 ETH0.0016763124.24206362
Unstake194609012024-03-18 9:50:59120 days ago1710755459IN
0x13523600...b619E5dEc
0 ETH0.0023940223.07244861
Unstake194333732024-03-14 12:53:47124 days ago1710420827IN
0x13523600...b619E5dEc
0 ETH0.0054333662.84619944
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:
ResourceField

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 1000 runs

Other Settings:
default evmVersion
File 1 of 16 : ResourceField.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/// @author: manifold.xyz

////////////////////////////////////////////////////////////////////////////////////////
//                                                                                    //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ██████████████▌          ╟██           ████████████████          j██████████████  //
//  ██████████████▌          ╟███           ███████████████          j██████████████  //
//  ██████████████▌          ╟███▌           ██████████████          j██████████████  //
//  ██████████████▌          ╟████▌           █████████████          j██████████████  //
//  ██████████████▌          ╟█████▌          ╙████████████          j██████████████  //
//  ██████████████▌          ╟██████▄          ╙███████████          j██████████████  //
//  ██████████████▌          ╟███████           ╙██████████          j██████████████  //
//  ██████████████▌          ╟████████           ╟█████████          j██████████████  //
//  ██████████████▌          ╟█████████           █████████          j██████████████  //
//  ██████████████▌          ╟██████████           ████████          j██████████████  //
//  ██████████████▌          ╟██████████▌           ███████          j██████████████  //
//  ██████████████▌          ╟███████████▌           ██████          j██████████████  //
//  ██████████████▌          ╟████████████▄          ╙█████        ,████████████████  //
//  ██████████████▌          ╟█████████████           ╙████      ▄██████████████████  //
//  ██████████████▌          ╟██████████████           ╙███    ▄████████████████████  //
//  ██████████████▌          ╟███████████████           ╟██ ,███████████████████████  //
//  ██████████████▌                      ,████           ███████████████████████████  //
//  ██████████████▌                    ▄██████▌           ██████████████████████████  //
//  ██████████████▌                  ▄█████████▌           █████████████████████████  //
//  ██████████████▌               ,█████████████▄           ████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//                                                                                    //
////////////////////////////////////////////////////////////////////////////////////////

import "@manifoldxyz/libraries-solidity/contracts/access/AdminControl.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "../resources/IResources.sol";
import "./IResourceField.sol";

contract ResourceField is AdminControl, IResourceField {
    using ECDSA for bytes32;
    using Strings for uint256;

    // Resource contract address
    address public immutable RESOURCE_ADDRESS;
    
    // Whether or not contract is enabled
    bool private _enabled;

    // Validation signing address
    address private _signingAddress;

    // Message nonces
    mapping(bytes32 => bool) private _usedNonces;

    // Mapping for staked token info
    mapping (address => mapping (uint256 => address)) private _stakeOwner;

    constructor(address resourceAddress, address signingAddress) {
        RESOURCE_ADDRESS = resourceAddress;
        _signingAddress = signingAddress;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(AdminControl, IERC165) returns (bool) {
        return
            interfaceId == type(IResourceField).interfaceId ||
            interfaceId == type(IERC165).interfaceId ||
            AdminControl.supportsInterface(interfaceId);
    }

    /**
     * @dev See {IResourceField-updateSigner}.
     */
    function updateSigner(address signingAddress) external override onlyOwner {
        _signingAddress = signingAddress;
    }

    /**
     * @dev See {IResourceField-enable}.
     */
    function enable() external override onlyOwner {
        _enabled = true;
    }

    /**
     * @dev See {IResourceField-disable}.
     */
    function disable() external override adminRequired {
        _enabled = false;
    }

    /**
     * @dev See {IResourceField-stakeMultiple}.
     */
    function stakeMultiple(address[] calldata tokenAddresses, uint256[] calldata tokenIds, bytes calldata data) external override {
        require(tokenAddresses.length == tokenIds.length, "Invalid input");
        require(_enabled, "Disabled");
        uint256 length = tokenAddresses.length;
        for (uint i = 0; i < length;) {
            IERC721(tokenAddresses[i]).safeTransferFrom(msg.sender, address(this), tokenIds[i], data);
            unchecked { i++; }
        }
    }

    /**
     * @dev See {IResourceField-unstake}.
     */
    function unstake(address[] calldata tokenAddresses, uint256[] calldata tokenIds) external override {
        require(tokenAddresses.length == tokenIds.length, "Invalid input");
        uint256 length = tokenAddresses.length;
        for (uint i = 0; i < length;) {
            address tokenAddress = tokenAddresses[i];
            uint256 tokenId = tokenIds[i];
            address ownerAddress = _stakeOwner[tokenAddress][tokenId];
            require(ownerAddress == msg.sender, "Cannot unstake token you do not own");
            _stakeOwner[tokenAddress][tokenId] = address(0);
            IERC721(tokenAddress).transferFrom(address(this), msg.sender, tokenId);
            emit Unstake(ownerAddress, tokenAddress, tokenId);
            unchecked { i++; }
        }
    }

    /**
     * @dev See {IResourceField-recover}.
     */
    function recover(address tokenAddress, uint256 tokenId, address recipient) external override onlyOwner {
        require(_stakeOwner[tokenAddress][tokenId] == address(0), "Cannot recover staked token");
        IERC721(tokenAddress).transferFrom(address(this), recipient, tokenId);
    }

    /**
     * @dev See {IResourceField-claimResources}.
     */
    function claimResources(uint256[] calldata tokenIds, uint256[] calldata amounts, bytes32 message, bytes calldata signature, bytes32 nonce) external override {
        require(_enabled, "Disabled");
        // Check signature data
        _validateClaimSignature(tokenIds, amounts, message, signature, nonce);
        IResources(RESOURCE_ADDRESS).safeBatchTransferFrom(address(this), msg.sender, tokenIds, amounts, "");
        emit ClaimResource(nonce, msg.sender, tokenIds, amounts);
    }

    /**
     * @dev See {IResourceField-burnResources}.
     */
    function burnResources(uint256[] calldata tokenIds, uint256[] calldata amounts) external override onlyOwner {
        IResources(RESOURCE_ADDRESS).burn(address(this), tokenIds, amounts);
    }

    /**
     * Validate claim signature
     */
    function _validateClaimSignature(uint256[] calldata tokenIds, uint256[] calldata amounts, bytes32 message, bytes calldata signature, bytes32 nonce) internal virtual {
        // Verify nonce usage/re-use
        require(!_usedNonces[nonce], "Cannot replay transaction");
        // Verify valid message based on input variables
        uint256 length = 52+64*tokenIds.length;
        bytes32 expectedMessage = keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", length.toString(), msg.sender, nonce, tokenIds, amounts));
        require(message == expectedMessage, "Malformed message");
        // Verify signature was performed by the expected signing address
        address signer = message.recover(signature);
        require(signer == _signingAddress, "Invalid signature");

        _usedNonces[nonce] = true;
    }

    /**
     * @dev See {IResourceField-nonceUsed}.
     */
    function nonceUsed(bytes32 nonce) external view override returns (bool) {
        return _usedNonces[nonce];
    }

    /**
     * @dev See {IERC721Receiver-onERC721Received}.
     */
    function onERC721Received(
        address,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external override returns (bytes4) {
        require(_enabled, "Disabled");
        // Check that this is a token that can be staked
        _stakeOwner[msg.sender][tokenId] = from;
        emit Stake(from, msg.sender, tokenId, data);
        return this.onERC721Received.selector;
    }

    /**
     * @dev See {IERC1155Receiver-onERC1155Received}.
     */
    function onERC1155Received(
        address,
        address,
        uint256,
        uint256,
        bytes calldata
    ) view public override returns (bytes4) {
        require(msg.sender == RESOURCE_ADDRESS, "Only LVCIDIA// RESOURCES accepted");
        return this.onERC1155Received.selector;
    }

    /**
     * @dev See {IERC1155Receiver-onERC1155BatchReceived}.
     */
    function onERC1155BatchReceived(
        address,
        address,
        uint256[] calldata,
        uint256[] calldata,
        bytes calldata
    ) view public override returns (bytes4) {
        require(msg.sender == RESOURCE_ADDRESS, "Only LVCIDIA// RESOURCES accepted");
        return this.onERC1155BatchReceived.selector;
    }

}

File 2 of 16 : IResourceField.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/// @author: manifold.xyz

////////////////////////////////////////////////////////////////////////////////////////
//                                                                                    //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ██████████████▌          ╟██           ████████████████          j██████████████  //
//  ██████████████▌          ╟███           ███████████████          j██████████████  //
//  ██████████████▌          ╟███▌           ██████████████          j██████████████  //
//  ██████████████▌          ╟████▌           █████████████          j██████████████  //
//  ██████████████▌          ╟█████▌          ╙████████████          j██████████████  //
//  ██████████████▌          ╟██████▄          ╙███████████          j██████████████  //
//  ██████████████▌          ╟███████           ╙██████████          j██████████████  //
//  ██████████████▌          ╟████████           ╟█████████          j██████████████  //
//  ██████████████▌          ╟█████████           █████████          j██████████████  //
//  ██████████████▌          ╟██████████           ████████          j██████████████  //
//  ██████████████▌          ╟██████████▌           ███████          j██████████████  //
//  ██████████████▌          ╟███████████▌           ██████          j██████████████  //
//  ██████████████▌          ╟████████████▄          ╙█████        ,████████████████  //
//  ██████████████▌          ╟█████████████           ╙████      ▄██████████████████  //
//  ██████████████▌          ╟██████████████           ╙███    ▄████████████████████  //
//  ██████████████▌          ╟███████████████           ╟██ ,███████████████████████  //
//  ██████████████▌                      ,████           ███████████████████████████  //
//  ██████████████▌                    ▄██████▌           ██████████████████████████  //
//  ██████████████▌                  ▄█████████▌           █████████████████████████  //
//  ██████████████▌               ,█████████████▄           ████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//                                                                                    //
////////////////////////////////////////////////////////////////////////////////////////

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

interface IResourceField is IERC165, IERC721Receiver, IERC1155Receiver {

    event Stake(address ownerAddress, address tokenAddress, uint256 tokenId, bytes data);
    event Unstake(address ownerAddress, address tokenAddress, uint256 tokenId);
    event ClaimResource(bytes32 nonce, address ownerAddress, uint256[] tokenIds, uint256[] amounts);
    
    /**
     * @dev Update the message signer
     * Can only be called by the contract owner.
     */
    function updateSigner(address signingAddress) external;

    /**
     * @dev Enable the contract
     * Can only be called by the contract owner.
     */
    function enable() external;

    /**
     * @dev Disable the contract
     * Can only be called by the contract owner or any admins.
     */
    function disable() external;

    /**
     * @dev Claim resources
     */
    function claimResources(uint256[] calldata tokenIds, uint256[] calldata amounts, bytes32 message, bytes calldata signature, bytes32 nonce) external;

    /**
     * @dev Burn resources held by the ResourceField.
     * Can only be called by the contract owner.
     */
    function burnResources(uint256[] calldata tokenIds, uint256[] calldata amounts) external;

    /**
     * @dev Stake multiple tokens.
     */
    function stakeMultiple(address[] calldata tokenAddresses, uint256[] calldata tokenIds, bytes calldata data) external;

    /**
     * @dev Unstake token
     * Can only unstake tokens that were staked by the requestor.
     */
    function unstake(address[] calldata tokenAddresses, uint256[] calldata tokenIds) external;

    /**
     * @dev Recover token.
     * Can only be used to recover a token that was sent in using transferFrom accidentally.
     * Can only be called by the contract owner.
     */
    function recover(address tokenAddress, uint256 tokenId, address recipient) external;

    /**
     * @dev Check if nonce has been used
     */
    function nonceUsed(bytes32 nonce) external view returns (bool);

}

File 3 of 16 : IResources.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/// @author: manifold.xyz

////////////////////////////////////////////////////////////////////////////////////////
//                                                                                    //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ██████████████▌          ╟██           ████████████████          j██████████████  //
//  ██████████████▌          ╟███           ███████████████          j██████████████  //
//  ██████████████▌          ╟███▌           ██████████████          j██████████████  //
//  ██████████████▌          ╟████▌           █████████████          j██████████████  //
//  ██████████████▌          ╟█████▌          ╙████████████          j██████████████  //
//  ██████████████▌          ╟██████▄          ╙███████████          j██████████████  //
//  ██████████████▌          ╟███████           ╙██████████          j██████████████  //
//  ██████████████▌          ╟████████           ╟█████████          j██████████████  //
//  ██████████████▌          ╟█████████           █████████          j██████████████  //
//  ██████████████▌          ╟██████████           ████████          j██████████████  //
//  ██████████████▌          ╟██████████▌           ███████          j██████████████  //
//  ██████████████▌          ╟███████████▌           ██████          j██████████████  //
//  ██████████████▌          ╟████████████▄          ╙█████        ,████████████████  //
//  ██████████████▌          ╟█████████████           ╙████      ▄██████████████████  //
//  ██████████████▌          ╟██████████████           ╙███    ▄████████████████████  //
//  ██████████████▌          ╟███████████████           ╟██ ,███████████████████████  //
//  ██████████████▌                      ,████           ███████████████████████████  //
//  ██████████████▌                    ▄██████▌           ██████████████████████████  //
//  ██████████████▌                  ▄█████████▌           █████████████████████████  //
//  ██████████████▌               ,█████████████▄           ████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//                                                                                    //
////////////////////////////////////////////////////////////////////////////////////////

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

interface IResources is IERC1155 {

    /**
     * @dev Mint tokens
     */
    function mint(address to, uint256[] memory tokenIds, uint256[] memory amounts) external;

    /**
     * @dev Set the tokenURI of a token.
     */
    function setTokenURI(uint256 tokenId, string calldata uri_) external;

    /**
     * @dev set the tokenURI of multiple tokens.
     */
    function setTokenURIs(uint256[] memory tokenIds, string[] calldata uris) external;

    /**
     * @dev burn tokens. Can only be called by token owner or approved address.
     * On burn, calls back to the registered extension's onBurn method
     */
    function burn(address account, uint256[] calldata tokenIds, uint256[] calldata amounts) external;

    /**
     * @dev Total amount of tokens of resource with a given id.
     */
    function totalSupply(uint256 tokenId) external view returns (uint256);

    /**
     * @dev Total amount of burned tokens of resource with a given id.
     */
    function burnedSupply(uint256 tokenId) external view returns (uint256);
}

File 4 of 16 : AdminControl.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/// @author: manifold.xyz

import "@openzeppelin/contracts/utils/introspection/ERC165.sol";
import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./IAdminControl.sol";

abstract contract AdminControl is Ownable, IAdminControl, ERC165 {
    using EnumerableSet for EnumerableSet.AddressSet;

    // Track registered admins
    EnumerableSet.AddressSet private _admins;

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
        return interfaceId == type(IAdminControl).interfaceId
            || super.supportsInterface(interfaceId);
    }

    /**
     * @dev Only allows approved admins to call the specified function
     */
    modifier adminRequired() {
        require(owner() == msg.sender || _admins.contains(msg.sender), "AdminControl: Must be owner or admin");
        _;
    }   

    /**
     * @dev See {IAdminControl-getAdmins}.
     */
    function getAdmins() external view override returns (address[] memory admins) {
        admins = new address[](_admins.length());
        for (uint i = 0; i < _admins.length(); i++) {
            admins[i] = _admins.at(i);
        }
        return admins;
    }

    /**
     * @dev See {IAdminControl-approveAdmin}.
     */
    function approveAdmin(address admin) external override onlyOwner {
        if (!_admins.contains(admin)) {
            emit AdminApproved(admin, msg.sender);
            _admins.add(admin);
        }
    }

    /**
     * @dev See {IAdminControl-revokeAdmin}.
     */
    function revokeAdmin(address admin) external override onlyOwner {
        if (_admins.contains(admin)) {
            emit AdminRevoked(admin, msg.sender);
            _admins.remove(admin);
        }
    }

    /**
     * @dev See {IAdminControl-isAdmin}.
     */
    function isAdmin(address admin) public override view returns (bool) {
        return (owner() == admin || _admins.contains(admin));
    }

}

File 5 of 16 : ECDSA.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.3) (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.0;

import "../Strings.sol";

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSA {
    enum RecoverError {
        NoError,
        InvalidSignature,
        InvalidSignatureLength,
        InvalidSignatureS,
        InvalidSignatureV
    }

    function _throwError(RecoverError error) private pure {
        if (error == RecoverError.NoError) {
            return; // no error: do nothing
        } else if (error == RecoverError.InvalidSignature) {
            revert("ECDSA: invalid signature");
        } else if (error == RecoverError.InvalidSignatureLength) {
            revert("ECDSA: invalid signature length");
        } else if (error == RecoverError.InvalidSignatureS) {
            revert("ECDSA: invalid signature 's' value");
        } else if (error == RecoverError.InvalidSignatureV) {
            revert("ECDSA: invalid signature 'v' value");
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature` or error string. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     *
     * Documentation for signature generation:
     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
     *
     * _Available since v4.3._
     */
    function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
        if (signature.length == 65) {
            bytes32 r;
            bytes32 s;
            uint8 v;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            /// @solidity memory-safe-assembly
            assembly {
                r := mload(add(signature, 0x20))
                s := mload(add(signature, 0x40))
                v := byte(0, mload(add(signature, 0x60)))
            }
            return tryRecover(hash, v, r, s);
        } else {
            return (address(0), RecoverError.InvalidSignatureLength);
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, signature);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
     *
     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address, RecoverError) {
        bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
        uint8 v = uint8((uint256(vs) >> 255) + 27);
        return tryRecover(hash, v, r, s);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
     *
     * _Available since v4.2._
     */
    function recover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, r, vs);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,
     * `r` and `s` signature fields separately.
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address, RecoverError) {
        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
        // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
        // signatures from current libraries generate a unique signature with an s-value in the lower half order.
        //
        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
        // these malleable signatures as well.
        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
            return (address(0), RecoverError.InvalidSignatureS);
        }
        if (v != 27 && v != 28) {
            return (address(0), RecoverError.InvalidSignatureV);
        }

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        if (signer == address(0)) {
            return (address(0), RecoverError.InvalidSignature);
        }

        return (signer, RecoverError.NoError);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function recover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, v, r, s);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from a `hash`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
        // 32 is the length in bytes of hash,
        // enforced by the type signature above
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from `s`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s));
    }

    /**
     * @dev Returns an Ethereum Signed Typed Data, created from a
     * `domainSeparator` and a `structHash`. This produces hash corresponding
     * to the one signed with the
     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
     * JSON-RPC method as part of EIP-712.
     *
     * See {recover}.
     */
    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
    }
}

File 6 of 16 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
    uint8 private constant _ADDRESS_LENGTH = 20;

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }

    /**
     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
     */
    function toHexString(address addr) internal pure returns (string memory) {
        return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
    }
}

File 7 of 16 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes calldata data
    ) external;

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: 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 Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool _approved) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);
}

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

pragma solidity ^0.8.0;

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
interface IERC721Receiver {
    /**
     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
     * by `operator` from `from`, this function is called.
     *
     * It must return its Solidity selector to confirm the token transfer.
     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
     *
     * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

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

pragma solidity ^0.8.0;

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

/**
 * @dev _Available since v3.1._
 */
interface IERC1155Receiver is IERC165 {
    /**
     * @dev Handles the receipt of a single ERC1155 token type. This function is
     * called at the end of a `safeTransferFrom` after the balance has been updated.
     *
     * NOTE: To accept the transfer, this must return
     * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`
     * (i.e. 0xf23a6e61, or its own function selector).
     *
     * @param operator The address which initiated the transfer (i.e. msg.sender)
     * @param from The address which previously owned the token
     * @param id The ID of the token being transferred
     * @param value The amount of tokens being transferred
     * @param data Additional data with no specified format
     * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed
     */
    function onERC1155Received(
        address operator,
        address from,
        uint256 id,
        uint256 value,
        bytes calldata data
    ) external returns (bytes4);

    /**
     * @dev Handles the receipt of a multiple ERC1155 token types. This function
     * is called at the end of a `safeBatchTransferFrom` after the balances have
     * been updated.
     *
     * NOTE: To accept the transfer(s), this must return
     * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`
     * (i.e. 0xbc197c81, or its own function selector).
     *
     * @param operator The address which initiated the batch transfer (i.e. msg.sender)
     * @param from The address which previously owned the token
     * @param ids An array containing ids of each token being transferred (order and length must match values array)
     * @param values An array containing amounts of each token being transferred (order and length must match ids array)
     * @param data Additional data with no specified format
     * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed
     */
    function onERC1155BatchReceived(
        address operator,
        address from,
        uint256[] calldata ids,
        uint256[] calldata values,
        bytes calldata data
    ) external returns (bytes4);
}

File 10 of 16 : 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 11 of 16 : IERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Required interface of an ERC1155 compliant contract, as defined in the
 * https://eips.ethereum.org/EIPS/eip-1155[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155 is IERC165 {
    /**
     * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.
     */
    event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);

    /**
     * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all
     * transfers.
     */
    event TransferBatch(
        address indexed operator,
        address indexed from,
        address indexed to,
        uint256[] ids,
        uint256[] values
    );

    /**
     * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to
     * `approved`.
     */
    event ApprovalForAll(address indexed account, address indexed operator, bool approved);

    /**
     * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.
     *
     * If an {URI} event was emitted for `id`, the standard
     * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value
     * returned by {IERC1155MetadataURI-uri}.
     */
    event URI(string value, uint256 indexed id);

    /**
     * @dev Returns the amount of tokens of token type `id` owned by `account`.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) external view returns (uint256);

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)
        external
        view
        returns (uint256[] memory);

    /**
     * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,
     *
     * Emits an {ApprovalForAll} event.
     *
     * Requirements:
     *
     * - `operator` cannot be the caller.
     */
    function setApprovalForAll(address operator, bool approved) external;

    /**
     * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.
     *
     * See {setApprovalForAll}.
     */
    function isApprovedForAll(address account, address operator) external view returns (bool);

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.
     * - `from` must have a balance of tokens of type `id` of at least `amount`.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes calldata data
    ) external;

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] calldata ids,
        uint256[] calldata amounts,
        bytes calldata data
    ) external;
}

File 12 of 16 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions 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 13 of 16 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

File 14 of 16 : EnumerableSet.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol)

pragma solidity ^0.8.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 *
 * [WARNING]
 * ====
 *  Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable.
 *  See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.
 *
 *  In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet.
 * ====
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;
        // Position of the value in the `values` array, plus 1 because index 0
        // means a value is not in the set.
        mapping(bytes32 => uint256) _indexes;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._indexes[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We read and store the value's index to prevent multiple reads from the same storage slot
        uint256 valueIndex = set._indexes[value];

        if (valueIndex != 0) {
            // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 toDeleteIndex = valueIndex - 1;
            uint256 lastIndex = set._values.length - 1;

            if (lastIndex != toDeleteIndex) {
                bytes32 lastValue = set._values[lastIndex];

                // Move the last value to the index where the value to delete is
                set._values[toDeleteIndex] = lastValue;
                // Update the index for the moved value
                set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex
            }

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the index for the deleted slot
            delete set._indexes[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._indexes[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        return set._values[index];
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function _values(Set storage set) private view returns (bytes32[] memory) {
        return set._values;
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _add(set._inner, value);
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _remove(set._inner, value);
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
        return _contains(set._inner, value);
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(Bytes32Set storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
        return _at(set._inner, index);
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {
        return _values(set._inner);
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(AddressSet storage set, uint256 index) internal view returns (address) {
        return address(uint160(uint256(_at(set._inner, index))));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(AddressSet storage set) internal view returns (address[] memory) {
        bytes32[] memory store = _values(set._inner);
        address[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(UintSet storage set) internal view returns (uint256[] memory) {
        bytes32[] memory store = _values(set._inner);
        uint256[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }
}

File 15 of 16 : IAdminControl.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/// @author: manifold.xyz

import "@openzeppelin/contracts/utils/introspection/IERC165.sol";

/**
 * @dev Interface for admin control
 */
interface IAdminControl is IERC165 {

    event AdminApproved(address indexed account, address indexed sender);
    event AdminRevoked(address indexed account, address indexed sender);

    /**
     * @dev gets address of all admins
     */
    function getAdmins() external view returns (address[] memory);

    /**
     * @dev add an admin.  Can only be called by contract owner.
     */
    function approveAdmin(address admin) external;

    /**
     * @dev remove an admin.  Can only be called by contract owner.
     */
    function revokeAdmin(address admin) external;

    /**
     * @dev checks whether or not given address is an admin
     * Returns True if they are
     */
    function isAdmin(address admin) external view returns (bool);

}

File 16 of 16 : 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
{
  "viaIR": true,
  "optimizer": {
    "enabled": true,
    "runs": 1000
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"resourceAddress","type":"address"},{"internalType":"address","name":"signingAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"AdminApproved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"AdminRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"nonce","type":"bytes32"},{"indexed":false,"internalType":"address","name":"ownerAddress","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"ClaimResource","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":"ownerAddress","type":"address"},{"indexed":false,"internalType":"address","name":"tokenAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"}],"name":"Stake","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"ownerAddress","type":"address"},{"indexed":false,"internalType":"address","name":"tokenAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Unstake","type":"event"},{"inputs":[],"name":"RESOURCE_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"name":"approveAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"burnResources","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes32","name":"message","type":"bytes32"},{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"bytes32","name":"nonce","type":"bytes32"}],"name":"claimResources","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"disable","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"enable","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getAdmins","outputs":[{"internalType":"address[]","name":"admins","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"name":"isAdmin","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"nonce","type":"bytes32"}],"name":"nonceUsed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155BatchReceived","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","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":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"name":"recover","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"name":"revokeAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"tokenAddresses","type":"address[]"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"stakeMultiple","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"tokenAddresses","type":"address[]"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"signingAddress","type":"address"}],"name":"updateSigner","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60a0346100f657601f62001cb438819003918201601f19168301916001600160401b038311848410176100fb5780849260409485528339810103126100f657610053602061004c83610111565b9201610111565b60008054336001600160a01b0319821681178355604051949290916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a360805260038054610100600160a81b03191660089290921b610100600160a81b0316919091179055611b8e9081620001268239608051818181610249015281816102bd015281816105c501528181610a88015261118c0152f35b600080fd5b634e487b7160e01b600052604160045260246000fd5b51906001600160a01b03821682036100f65756fe60806040818152600436101561001457600080fd5b600091823560e01c90816301ffc9a7146111b057508063043bd5ed1461116d578063150b7a021461107f57806324d7806c1461101f578063285ecb4614610ee95780632d34567014610e705780632f2770db14610dbc57806331ae450b14610cbd5780633ac4e935146108c257806361a4422b146108955780636d73e66914610817578063715018a6146107b15780638da5cb5b1461078c5780638e5116bc146106a5578063a3907d711461067c578063a7ecd37e14610612578063bc197c8114610539578063bcca1e041461037357828163cb97cd8a1461029957508063f23a6e61146101f25763f2fde38b1461010b57600080fd5b346101ee5760203660031901126101ee57610124611282565b61012c6113e6565b6001600160a01b03809116918215610185575082548273ffffffffffffffffffffffffffffffffffffffff198216178455167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b6084905162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152fd5b5080fd5b50346101ee5760a03660031901126101ee5761020c611282565b5061021561129d565b506084359167ffffffffffffffff8311610296575061023a60209236906004016112b3565b50506102706001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163314611ae7565b517ff23a6e61000000000000000000000000000000000000000000000000000000008152f35b80fd5b808334610370576102a936611312565b94926102b36113e6565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001691823b1561036c576103319361034386928851998a97889687957f3db0f8ab0000000000000000000000000000000000000000000000000000000087523060048801526060602488015260648701916116f9565b848103600319016044860152916116f9565b03925af19081156103635750610357575080f35b6103609061135d565b80f35b513d84823e3d90fd5b8480fd5b50fd5b50346101ee5761038236611312565b9093916103908282146115f9565b855b81811061039d578680f35b6103b06103ab82848861168f565b61169f565b6103bb82858961168f565b356001600160a01b0390818316808b526005926020908482528c848b822091528252898d205416933385036104d057828d528152888c2090838d5252878b2073ffffffffffffffffffffffffffffffffffffffff198154169055803b156104cc5787516323b872dd60e01b815230600482015233602482015260448101839052908b908290606490829084905af180156104c25760019594927f390b1276974b9463e5d66ab10df69b6f3d7b930eb066a0e66df327edd2cc811c94926104aa926104b3575b508951938493846040919493929460608201956001600160a01b0380921683521660208201520152565b0390a101610392565b6104bc9061135d565b38610480565b88513d8d823e3d90fd5b8a80fd5b6084828b519062461bcd60e51b82526004820152602360248201527f43616e6e6f7420756e7374616b6520746f6b656e20796f7520646f206e6f742060448201527f6f776e00000000000000000000000000000000000000000000000000000000006064820152fd5b50346101ee5760a03660031901126101ee57610553611282565b5061055c61129d565b5067ffffffffffffffff916044358381116101ee5761057f9036906004016112e1565b50506064358381116101ee576105999036906004016112e1565b505060843592831161029657506105b660209236906004016112b3565b50506105ec6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163314611ae7565b517fbc197c81000000000000000000000000000000000000000000000000000000008152f35b82346102965760203660031901126102965761062c611282565b6106346113e6565b7fffffffffffffffffffffff0000000000000000000000000000000000000000ff74ffffffffffffffffffffffffffffffffffffffff006003549260081b1691161760035580f35b82346102965780600319360112610296576106956113e6565b600160ff19600354161760035580f35b50346101ee5760603660031901126101ee576106bf611282565b90602435604435926001600160a01b039081851685036107885781906106e36113e6565b16908186526005602052838620838752602052838620541661074557908185923b156107415783516323b872dd60e01b81523060048201526001600160a01b0390951660248601526044850191909152839081838160648101610343565b8280fd5b6064835162461bcd60e51b815260206004820152601b60248201527f43616e6e6f74207265636f766572207374616b656420746f6b656e00000000006044820152fd5b8580fd5b50346101ee57816003193601126101ee576001600160a01b0360209254169051908152f35b82346102965780600319360112610296576107ca6113e6565b806001600160a01b03815473ffffffffffffffffffffffffffffffffffffffff1981168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b8234610296576020366003190112610296576001600160a01b03610839611282565b6108416113e6565b16610859816000526002602052604060002054151590565b15610862575080f35b6108919033817f7e1a1a08d52e4ba0e21554733d66165fd5151f99460116223d9e3a608eec5cb18580a361148b565b5080f35b50346101ee5760203660031901126101ee5760ff8160209360043581526004855220541690519015158152f35b50346101ee5760a03660031901126101ee5767ffffffffffffffff600435818111610cb9576108f59036906004016112e1565b906024358381116107885761090e9036906004016112e1565b929093606435908111610bac576109299036906004016112b3565b906003549161093a60ff8416611644565b6084358952600460205260ff888a205416610c76577f03ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff84168403610c62578360061b60340180603411610c4e5761099090611786565b8851907f19457468657265756d205369676e6564204d6573736167653a0a0000000000006020830152818151918c5b838110610c365750506109f66109ef606e610a049484013360601b603a820152608435604e82015201898b611736565b8a8c611736565b03601f198101835282611387565b60208151910120604435908103610bf357610a1e8261176a565b90610a2b8a519283611387565b8282528a368486011161029657602084610a5095610a589783870137840101526119fe565b919091611890565b6001600160a01b0380809360081c16911603610bb05760843587526004602052858720805460ff191660011790557f000000000000000000000000000000000000000000000000000000000000000016803b15610bac5786865180927f2eb2c2d600000000000000000000000000000000000000000000000000000000825230600483015233602483015260a0604483015281836020610b12610aff60a485018a8c6116f9565b8481036003190160648601528b8d6116f9565b8284820391600319830160848701525201925af18015610ba257610b8d93608096937f31c3a3da4902702c2c271431c1c6125fc4d0b714b0b12f0da763381539e77483989693610b7f93610b93575b50865197889760843589523360208a015288015260808701916116f9565b9184830360608601526116f9565b0390a180f35b610b9c9061135d565b38610b61565b86513d89823e3d90fd5b8680fd5b6064865162461bcd60e51b815260206004820152601160248201527f496e76616c6964207369676e61747572650000000000000000000000000000006044820152fd5b6064895162461bcd60e51b815260206004820152601160248201527f4d616c666f726d6564206d6573736167650000000000000000000000000000006044820152fd5b6020828201810151603a8784010152859350016109bf565b60248a634e487b7160e01b81526011600452fd5b602489634e487b7160e01b81526011600452fd5b6064885162461bcd60e51b815260206004820152601960248201527f43616e6e6f74207265706c6179207472616e73616374696f6e000000000000006044820152fd5b8380fd5b50346101ee57816003193601126101ee576001805492610cdc846113a9565b610ce884519182611387565b848152610cf4856113a9565b6020828101969091601f1901368837835b818110610d4a5750508451948186019282875251809352850195925b828110610d2e5785870386f35b83516001600160a01b0316875295810195928101928401610d21565b8585939495989698526001600160a01b03817fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf60154168551821015610da85790610d9c91858260051b880101526113c1565b96949693929193610d05565b602484634e487b7160e01b81526032600452fd5b50346101ee57816003193601126101ee576001600160a01b0382541633148015610e5c575b15610df4575060ff196003541660035580f35b6084905162461bcd60e51b8152602060048201526024808201527f41646d696e436f6e74726f6c3a204d757374206265206f776e6572206f72206160448201527f646d696e000000000000000000000000000000000000000000000000000000006064820152fd5b503382526002602052808220541515610de1565b8234610296576020366003190112610296576001600160a01b03610e92611282565b610e9a6113e6565b16610eb2816000526002602052604060002054151590565b610eba575080f35b6108919033817f7c0c3c84c67c85fcac635147348bfe374c24a1a93d0366d1cfe9d8853cbf89d58580a361150f565b50346101ee5760603660031901126101ee57816004359167ffffffffffffffff9283811161074157610f1f9036906004016112e1565b60249391933585811161074157610f3a9036906004016112e1565b95604435908111610cb957610f539036906004016112b3565b929095610f618883146115f9565b610f6f60ff60035416611644565b845b828110610f7c578580f35b6001600160a01b03610f926103ab83868661168f565b16610f9e828b8761168f565b3590803b1561101b578688918b83610fe7958d51968795869485937fb88d4fde0000000000000000000000000000000000000000000000000000000085523033600487016116b3565b03925af18015611011579060019291611002575b5001610f71565b61100b9061135d565b38610ffb565b88513d89823e3d90fd5b8780fd5b50346101ee5760203660031901126101ee579060209161103d611282565b91546001600160a01b039283169216821491821561105f575b50519015158152f35b6110789192506000526002602052604060002054151590565b9038611056565b50346101ee5760803660031901126101ee57611099611282565b506110a261129d565b6044359060643567ffffffffffffffff811161036c5790611144846020966110f07f0956338b00ab275fa76c175d99d04b91c295a1b6b2d9ab590efcd95095fbb137969536906004016112b3565b92909161110160ff60035416611644565b33815260058a528181208782528a52206001600160a01b03851673ffffffffffffffffffffffffffffffffffffffff1982541617905586519485943390866116b3565b0390a1517f150b7a02000000000000000000000000000000000000000000000000000000008152f35b50346101ee57816003193601126101ee57602090516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b8390346101ee5760203660031901126101ee576004357fffffffff00000000000000000000000000000000000000000000000000000000811680910361074157602092507fa1697bbe000000000000000000000000000000000000000000000000000000008114908115611271575b811561122d575b5015158152f35b7f553e757e00000000000000000000000000000000000000000000000000000000811491508115611260575b5083611226565b6301ffc9a760e01b91501483611259565b6301ffc9a760e01b8114915061121f565b600435906001600160a01b038216820361129857565b600080fd5b602435906001600160a01b038216820361129857565b9181601f840112156112985782359167ffffffffffffffff8311611298576020838186019501011161129857565b9181601f840112156112985782359167ffffffffffffffff8311611298576020808501948460051b01011161129857565b60406003198201126112985767ffffffffffffffff91600435838111611298578261133f916004016112e1565b9390939260243591821161129857611359916004016112e1565b9091565b67ffffffffffffffff811161137157604052565b634e487b7160e01b600052604160045260246000fd5b90601f8019910116810190811067ffffffffffffffff82111761137157604052565b67ffffffffffffffff81116113715760051b60200190565b60001981146113d05760010190565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b036000541633036113fa57565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b6001548110156114755760016000527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf60190600090565b634e487b7160e01b600052603260045260246000fd5b60008181526002602052604081205461150a57600154680100000000000000008110156114f65790826114e26114c98460016040960160015561143e565b819391549060031b600019811b9283911b169119161790565b905560015492815260026020522055600190565b602482634e487b7160e01b81526041600452fd5b905090565b60008181526002602052604081205490919080156115f457600019908082018181116115e057600154908382019182116115cc57808203611598575b5050506001548015611584578101906115638261143e565b909182549160031b1b19169055600155815260026020526040812055600190565b602484634e487b7160e01b81526031600452fd5b6115b66115a76114c99361143e565b90549060031b1c92839261143e565b905584526002602052604084205538808061154b565b602486634e487b7160e01b81526011600452fd5b602485634e487b7160e01b81526011600452fd5b505090565b1561160057565b606460405162461bcd60e51b815260206004820152600d60248201527f496e76616c696420696e707574000000000000000000000000000000000000006044820152fd5b1561164b57565b606460405162461bcd60e51b815260206004820152600860248201527f44697361626c65640000000000000000000000000000000000000000000000006044820152fd5b91908110156114755760051b0190565b356001600160a01b03811681036112985790565b939092859360a096936001600160a01b038092168752166020860152604085015260806060850152816080850152848401376000828201840152601f01601f1916010190565b90918281527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83116112985760209260051b809284830137010190565b91907f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81116112985760051b809282370190565b67ffffffffffffffff811161137157601f01601f191660200190565b801561184557600081805b611831575061179f8161176a565b906117ad6040519283611387565b808252601f196117bc8261176a565b013660208401375b8092801561182a5760001982019182116113d0578193600a9260309084840682018092116113d057855111156114755760f81b7fff000000000000000000000000000000000000000000000000000000000000001660001a908401601f015304916117c4565b5050905090565b9061183d600a916113c1565b910480611791565b506040516040810181811067ffffffffffffffff82111761137157604052600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b60058110156119e857806118a15750565b600181036118ed57606460405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152fd5b6002810361193957606460405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152fd5b6003810361199057608460405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152fd5b60041461199957565b608460405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152fd5b634e487b7160e01b600052602160045260246000fd5b906041815114600014611a2857611359916020820151906060604084015193015160001a90611a32565b5050600090600290565b9291907f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311611adb5760ff16601b81141580611ad0575b611ac4579160809493916020936040519384528484015260408301526060820152600093849182805260015afa15611ab75781516001600160a01b03811615611ab1579190565b50600190565b50604051903d90823e3d90fd5b50505050600090600490565b50601c811415611a6a565b50505050600090600390565b15611aee57565b608460405162461bcd60e51b815260206004820152602160248201527f4f6e6c79204c5643494449412f2f205245534f5552434553206163636570746560448201527f64000000000000000000000000000000000000000000000000000000000000006064820152fdfea2646970667358221220c4489b918fc4e31c6cdf5ef72bf1035473958d64b3003e135c63315fdc694b0a64736f6c6343000811003300000000000000000000000097a20815a061eae224c4fdf3109731f73743db73000000000000000000000000679b437657763825f834d24fe6894ee1762c72cc

Deployed Bytecode

0x60806040818152600436101561001457600080fd5b600091823560e01c90816301ffc9a7146111b057508063043bd5ed1461116d578063150b7a021461107f57806324d7806c1461101f578063285ecb4614610ee95780632d34567014610e705780632f2770db14610dbc57806331ae450b14610cbd5780633ac4e935146108c257806361a4422b146108955780636d73e66914610817578063715018a6146107b15780638da5cb5b1461078c5780638e5116bc146106a5578063a3907d711461067c578063a7ecd37e14610612578063bc197c8114610539578063bcca1e041461037357828163cb97cd8a1461029957508063f23a6e61146101f25763f2fde38b1461010b57600080fd5b346101ee5760203660031901126101ee57610124611282565b61012c6113e6565b6001600160a01b03809116918215610185575082548273ffffffffffffffffffffffffffffffffffffffff198216178455167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b6084905162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152fd5b5080fd5b50346101ee5760a03660031901126101ee5761020c611282565b5061021561129d565b506084359167ffffffffffffffff8311610296575061023a60209236906004016112b3565b50506102706001600160a01b037f00000000000000000000000097a20815a061eae224c4fdf3109731f73743db73163314611ae7565b517ff23a6e61000000000000000000000000000000000000000000000000000000008152f35b80fd5b808334610370576102a936611312565b94926102b36113e6565b6001600160a01b037f00000000000000000000000097a20815a061eae224c4fdf3109731f73743db731691823b1561036c576103319361034386928851998a97889687957f3db0f8ab0000000000000000000000000000000000000000000000000000000087523060048801526060602488015260648701916116f9565b848103600319016044860152916116f9565b03925af19081156103635750610357575080f35b6103609061135d565b80f35b513d84823e3d90fd5b8480fd5b50fd5b50346101ee5761038236611312565b9093916103908282146115f9565b855b81811061039d578680f35b6103b06103ab82848861168f565b61169f565b6103bb82858961168f565b356001600160a01b0390818316808b526005926020908482528c848b822091528252898d205416933385036104d057828d528152888c2090838d5252878b2073ffffffffffffffffffffffffffffffffffffffff198154169055803b156104cc5787516323b872dd60e01b815230600482015233602482015260448101839052908b908290606490829084905af180156104c25760019594927f390b1276974b9463e5d66ab10df69b6f3d7b930eb066a0e66df327edd2cc811c94926104aa926104b3575b508951938493846040919493929460608201956001600160a01b0380921683521660208201520152565b0390a101610392565b6104bc9061135d565b38610480565b88513d8d823e3d90fd5b8a80fd5b6084828b519062461bcd60e51b82526004820152602360248201527f43616e6e6f7420756e7374616b6520746f6b656e20796f7520646f206e6f742060448201527f6f776e00000000000000000000000000000000000000000000000000000000006064820152fd5b50346101ee5760a03660031901126101ee57610553611282565b5061055c61129d565b5067ffffffffffffffff916044358381116101ee5761057f9036906004016112e1565b50506064358381116101ee576105999036906004016112e1565b505060843592831161029657506105b660209236906004016112b3565b50506105ec6001600160a01b037f00000000000000000000000097a20815a061eae224c4fdf3109731f73743db73163314611ae7565b517fbc197c81000000000000000000000000000000000000000000000000000000008152f35b82346102965760203660031901126102965761062c611282565b6106346113e6565b7fffffffffffffffffffffff0000000000000000000000000000000000000000ff74ffffffffffffffffffffffffffffffffffffffff006003549260081b1691161760035580f35b82346102965780600319360112610296576106956113e6565b600160ff19600354161760035580f35b50346101ee5760603660031901126101ee576106bf611282565b90602435604435926001600160a01b039081851685036107885781906106e36113e6565b16908186526005602052838620838752602052838620541661074557908185923b156107415783516323b872dd60e01b81523060048201526001600160a01b0390951660248601526044850191909152839081838160648101610343565b8280fd5b6064835162461bcd60e51b815260206004820152601b60248201527f43616e6e6f74207265636f766572207374616b656420746f6b656e00000000006044820152fd5b8580fd5b50346101ee57816003193601126101ee576001600160a01b0360209254169051908152f35b82346102965780600319360112610296576107ca6113e6565b806001600160a01b03815473ffffffffffffffffffffffffffffffffffffffff1981168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b8234610296576020366003190112610296576001600160a01b03610839611282565b6108416113e6565b16610859816000526002602052604060002054151590565b15610862575080f35b6108919033817f7e1a1a08d52e4ba0e21554733d66165fd5151f99460116223d9e3a608eec5cb18580a361148b565b5080f35b50346101ee5760203660031901126101ee5760ff8160209360043581526004855220541690519015158152f35b50346101ee5760a03660031901126101ee5767ffffffffffffffff600435818111610cb9576108f59036906004016112e1565b906024358381116107885761090e9036906004016112e1565b929093606435908111610bac576109299036906004016112b3565b906003549161093a60ff8416611644565b6084358952600460205260ff888a205416610c76577f03ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff84168403610c62578360061b60340180603411610c4e5761099090611786565b8851907f19457468657265756d205369676e6564204d6573736167653a0a0000000000006020830152818151918c5b838110610c365750506109f66109ef606e610a049484013360601b603a820152608435604e82015201898b611736565b8a8c611736565b03601f198101835282611387565b60208151910120604435908103610bf357610a1e8261176a565b90610a2b8a519283611387565b8282528a368486011161029657602084610a5095610a589783870137840101526119fe565b919091611890565b6001600160a01b0380809360081c16911603610bb05760843587526004602052858720805460ff191660011790557f00000000000000000000000097a20815a061eae224c4fdf3109731f73743db7316803b15610bac5786865180927f2eb2c2d600000000000000000000000000000000000000000000000000000000825230600483015233602483015260a0604483015281836020610b12610aff60a485018a8c6116f9565b8481036003190160648601528b8d6116f9565b8284820391600319830160848701525201925af18015610ba257610b8d93608096937f31c3a3da4902702c2c271431c1c6125fc4d0b714b0b12f0da763381539e77483989693610b7f93610b93575b50865197889760843589523360208a015288015260808701916116f9565b9184830360608601526116f9565b0390a180f35b610b9c9061135d565b38610b61565b86513d89823e3d90fd5b8680fd5b6064865162461bcd60e51b815260206004820152601160248201527f496e76616c6964207369676e61747572650000000000000000000000000000006044820152fd5b6064895162461bcd60e51b815260206004820152601160248201527f4d616c666f726d6564206d6573736167650000000000000000000000000000006044820152fd5b6020828201810151603a8784010152859350016109bf565b60248a634e487b7160e01b81526011600452fd5b602489634e487b7160e01b81526011600452fd5b6064885162461bcd60e51b815260206004820152601960248201527f43616e6e6f74207265706c6179207472616e73616374696f6e000000000000006044820152fd5b8380fd5b50346101ee57816003193601126101ee576001805492610cdc846113a9565b610ce884519182611387565b848152610cf4856113a9565b6020828101969091601f1901368837835b818110610d4a5750508451948186019282875251809352850195925b828110610d2e5785870386f35b83516001600160a01b0316875295810195928101928401610d21565b8585939495989698526001600160a01b03817fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf60154168551821015610da85790610d9c91858260051b880101526113c1565b96949693929193610d05565b602484634e487b7160e01b81526032600452fd5b50346101ee57816003193601126101ee576001600160a01b0382541633148015610e5c575b15610df4575060ff196003541660035580f35b6084905162461bcd60e51b8152602060048201526024808201527f41646d696e436f6e74726f6c3a204d757374206265206f776e6572206f72206160448201527f646d696e000000000000000000000000000000000000000000000000000000006064820152fd5b503382526002602052808220541515610de1565b8234610296576020366003190112610296576001600160a01b03610e92611282565b610e9a6113e6565b16610eb2816000526002602052604060002054151590565b610eba575080f35b6108919033817f7c0c3c84c67c85fcac635147348bfe374c24a1a93d0366d1cfe9d8853cbf89d58580a361150f565b50346101ee5760603660031901126101ee57816004359167ffffffffffffffff9283811161074157610f1f9036906004016112e1565b60249391933585811161074157610f3a9036906004016112e1565b95604435908111610cb957610f539036906004016112b3565b929095610f618883146115f9565b610f6f60ff60035416611644565b845b828110610f7c578580f35b6001600160a01b03610f926103ab83868661168f565b16610f9e828b8761168f565b3590803b1561101b578688918b83610fe7958d51968795869485937fb88d4fde0000000000000000000000000000000000000000000000000000000085523033600487016116b3565b03925af18015611011579060019291611002575b5001610f71565b61100b9061135d565b38610ffb565b88513d89823e3d90fd5b8780fd5b50346101ee5760203660031901126101ee579060209161103d611282565b91546001600160a01b039283169216821491821561105f575b50519015158152f35b6110789192506000526002602052604060002054151590565b9038611056565b50346101ee5760803660031901126101ee57611099611282565b506110a261129d565b6044359060643567ffffffffffffffff811161036c5790611144846020966110f07f0956338b00ab275fa76c175d99d04b91c295a1b6b2d9ab590efcd95095fbb137969536906004016112b3565b92909161110160ff60035416611644565b33815260058a528181208782528a52206001600160a01b03851673ffffffffffffffffffffffffffffffffffffffff1982541617905586519485943390866116b3565b0390a1517f150b7a02000000000000000000000000000000000000000000000000000000008152f35b50346101ee57816003193601126101ee57602090516001600160a01b037f00000000000000000000000097a20815a061eae224c4fdf3109731f73743db73168152f35b8390346101ee5760203660031901126101ee576004357fffffffff00000000000000000000000000000000000000000000000000000000811680910361074157602092507fa1697bbe000000000000000000000000000000000000000000000000000000008114908115611271575b811561122d575b5015158152f35b7f553e757e00000000000000000000000000000000000000000000000000000000811491508115611260575b5083611226565b6301ffc9a760e01b91501483611259565b6301ffc9a760e01b8114915061121f565b600435906001600160a01b038216820361129857565b600080fd5b602435906001600160a01b038216820361129857565b9181601f840112156112985782359167ffffffffffffffff8311611298576020838186019501011161129857565b9181601f840112156112985782359167ffffffffffffffff8311611298576020808501948460051b01011161129857565b60406003198201126112985767ffffffffffffffff91600435838111611298578261133f916004016112e1565b9390939260243591821161129857611359916004016112e1565b9091565b67ffffffffffffffff811161137157604052565b634e487b7160e01b600052604160045260246000fd5b90601f8019910116810190811067ffffffffffffffff82111761137157604052565b67ffffffffffffffff81116113715760051b60200190565b60001981146113d05760010190565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b036000541633036113fa57565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b6001548110156114755760016000527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf60190600090565b634e487b7160e01b600052603260045260246000fd5b60008181526002602052604081205461150a57600154680100000000000000008110156114f65790826114e26114c98460016040960160015561143e565b819391549060031b600019811b9283911b169119161790565b905560015492815260026020522055600190565b602482634e487b7160e01b81526041600452fd5b905090565b60008181526002602052604081205490919080156115f457600019908082018181116115e057600154908382019182116115cc57808203611598575b5050506001548015611584578101906115638261143e565b909182549160031b1b19169055600155815260026020526040812055600190565b602484634e487b7160e01b81526031600452fd5b6115b66115a76114c99361143e565b90549060031b1c92839261143e565b905584526002602052604084205538808061154b565b602486634e487b7160e01b81526011600452fd5b602485634e487b7160e01b81526011600452fd5b505090565b1561160057565b606460405162461bcd60e51b815260206004820152600d60248201527f496e76616c696420696e707574000000000000000000000000000000000000006044820152fd5b1561164b57565b606460405162461bcd60e51b815260206004820152600860248201527f44697361626c65640000000000000000000000000000000000000000000000006044820152fd5b91908110156114755760051b0190565b356001600160a01b03811681036112985790565b939092859360a096936001600160a01b038092168752166020860152604085015260806060850152816080850152848401376000828201840152601f01601f1916010190565b90918281527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83116112985760209260051b809284830137010190565b91907f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81116112985760051b809282370190565b67ffffffffffffffff811161137157601f01601f191660200190565b801561184557600081805b611831575061179f8161176a565b906117ad6040519283611387565b808252601f196117bc8261176a565b013660208401375b8092801561182a5760001982019182116113d0578193600a9260309084840682018092116113d057855111156114755760f81b7fff000000000000000000000000000000000000000000000000000000000000001660001a908401601f015304916117c4565b5050905090565b9061183d600a916113c1565b910480611791565b506040516040810181811067ffffffffffffffff82111761137157604052600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b60058110156119e857806118a15750565b600181036118ed57606460405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152fd5b6002810361193957606460405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152fd5b6003810361199057608460405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152fd5b60041461199957565b608460405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152fd5b634e487b7160e01b600052602160045260246000fd5b906041815114600014611a2857611359916020820151906060604084015193015160001a90611a32565b5050600090600290565b9291907f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311611adb5760ff16601b81141580611ad0575b611ac4579160809493916020936040519384528484015260408301526060820152600093849182805260015afa15611ab75781516001600160a01b03811615611ab1579190565b50600190565b50604051903d90823e3d90fd5b50505050600090600490565b50601c811415611a6a565b50505050600090600390565b15611aee57565b608460405162461bcd60e51b815260206004820152602160248201527f4f6e6c79204c5643494449412f2f205245534f5552434553206163636570746560448201527f64000000000000000000000000000000000000000000000000000000000000006064820152fdfea2646970667358221220c4489b918fc4e31c6cdf5ef72bf1035473958d64b3003e135c63315fdc694b0a64736f6c63430008110033

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

00000000000000000000000097a20815a061eae224c4fdf3109731f73743db73000000000000000000000000679b437657763825f834d24fe6894ee1762c72cc

-----Decoded View---------------
Arg [0] : resourceAddress (address): 0x97A20815a061EaE224c4fdF3109731f73743db73
Arg [1] : signingAddress (address): 0x679B437657763825F834D24Fe6894EE1762c72Cc

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 00000000000000000000000097a20815a061eae224c4fdf3109731f73743db73
Arg [1] : 000000000000000000000000679b437657763825f834d24fe6894ee1762c72cc


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.