ETH Price: $3,495.48 (+2.55%)
Gas: 3.77 Gwei

Contract

0x10B3016AFb3Eb4BD9C03203DA5b820a8F3ef400B
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Set Approval For...187197612023-12-05 11:11:23385 days ago1701774683IN
0x10B3016A...8F3ef400B
0 ETH0.0011371246.11015545
Set Approval For...186929672023-12-01 17:10:59389 days ago1701450659IN
0x10B3016A...8F3ef400B
0 ETH0.0053934115.8054714
Set Approval For...178102582023-07-31 3:18:47513 days ago1690773527IN
0x10B3016A...8F3ef400B
0 ETH0.0006604214.18038305
Set Approval For...176695132023-07-11 9:34:23532 days ago1689068063IN
0x10B3016A...8F3ef400B
0 ETH0.000780516.7587992
Safe Transfer Fr...176647172023-07-10 17:23:23533 days ago1689009803IN
0x10B3016A...8F3ef400B
0 ETH0.0019845337.71521848
Set Approval For...171157802023-04-24 11:14:23610 days ago1682334863IN
0x10B3016A...8F3ef400B
0 ETH0.0016812236.09876419
Set Approval For...163299022023-01-04 0:40:35721 days ago1672792835IN
0x10B3016A...8F3ef400B
0 ETH0.0007842916.84014205
Set Approval For...160528962022-11-26 8:13:47760 days ago1669450427IN
0x10B3016A...8F3ef400B
0 ETH0.0004981210.69557553
Set Approval For...160266532022-11-22 16:11:11763 days ago1669133471IN
0x10B3016A...8F3ef400B
0 ETH0.0009393520.16959052
Set Approval For...159686322022-11-14 13:40:35771 days ago1668433235IN
0x10B3016A...8F3ef400B
0 ETH0.0014545131.23081077
Set Approval For...157198322022-10-10 19:37:23806 days ago1665430643IN
0x10B3016A...8F3ef400B
0 ETH0.0020821844.70797824
Set Approval For...156806442022-10-05 8:14:47812 days ago1664957687IN
0x10B3016A...8F3ef400B
0 ETH0.000302086.48618259
Set Approval For...156412192022-09-29 19:55:23817 days ago1664481323IN
0x10B3016A...8F3ef400B
0 ETH0.0007303115.68099512
Set Approval For...154873832022-09-07 1:07:50840 days ago1662512870IN
0x10B3016A...8F3ef400B
0 ETH0.0004877210.4721914
Set Approval For...154311562022-08-29 1:15:27849 days ago1661735727IN
0x10B3016A...8F3ef400B
0 ETH0.0005412611.62193193
Set Approval For...154022272022-08-24 9:52:45853 days ago1661334765IN
0x10B3016A...8F3ef400B
0 ETH0.000374098.03234041
Set Approval For...153126262022-08-10 5:55:12868 days ago1660110912IN
0x10B3016A...8F3ef400B
0 ETH0.0004813610.33576024
Safe Transfer Fr...152241212022-07-27 10:53:12881 days ago1658919192IN
0x10B3016A...8F3ef400B
0 ETH0.000282315.37903072
Set Approval For...151425002022-07-14 18:50:40894 days ago1657824640IN
0x10B3016A...8F3ef400B
0 ETH0.0030215264.87720362
Set Approval For...151016662022-07-08 11:34:57900 days ago1657280097IN
0x10B3016A...8F3ef400B
0 ETH0.0006499713.95595844
Set Approval For...150933852022-07-07 4:54:01902 days ago1657169641IN
0x10B3016A...8F3ef400B
0 ETH0.0005342211.470664
Set Approval For...150206792022-06-24 23:04:27914 days ago1656111867IN
0x10B3016A...8F3ef400B
0 ETH0.0011337224.34286044
Set Approval For...150105422022-06-23 1:30:40916 days ago1655947840IN
0x10B3016A...8F3ef400B
0 ETH0.0023269949.9644122
Set Approval For...139808882022-01-11 0:07:191079 days ago1641859639IN
0x10B3016A...8F3ef400B
0 ETH0.00804588172.4474629
Set Approval For...139794722022-01-10 18:54:551079 days ago1641840895IN
0x10B3016A...8F3ef400B
0 ETH0.01279821274.30418493
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:
GoldenToken

Compiler Version
v0.8.10+commit.fc410830

Optimization Enabled:
Yes with 20 runs

Other Settings:
default evmVersion
File 1 of 17 : GoldenToken.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "openzeppelin-solidity/contracts/access/Ownable.sol";
import "./ERC1155Tradable.sol";
import "openzeppelin-solidity/contracts/utils/math/SafeMath.sol";


// ██╗    ██╗██╗  ██╗ ██████╗     ██╗███████╗    ▄▄███▄▄· █████╗ ███╗   ███╗ ██████╗ ████████╗    ██████╗
// ██║    ██║██║  ██║██╔═══██╗    ██║██╔════╝    ██╔════╝██╔══██╗████╗ ████║██╔═══██╗╚══██╔══╝    ╚════██╗
// ██║ █╗ ██║███████║██║   ██║    ██║███████╗    ███████╗███████║██╔████╔██║██║   ██║   ██║         ▄███╔╝
// ██║███╗██║██╔══██║██║   ██║    ██║╚════██║    ╚════██║██╔══██║██║╚██╔╝██║██║   ██║   ██║         ▀▀══╝
// ╚███╔███╔╝██║  ██║╚██████╔╝    ██║███████║    ███████║██║  ██║██║ ╚═╝ ██║╚██████╔╝   ██║         ██╗
//  ╚══╝╚══╝ ╚═╝  ╚═╝ ╚═════╝     ╚═╝╚══════╝    ╚═▀▀▀══╝╚═╝  ╚═╝╚═╝     ╚═╝ ╚═════╝    ╚═╝         ╚═╝

/**
 * @title SamotGoldenCoin
 * WhoIsSamot - a contract for Samot Golden Coin
 */

abstract contract SamotStaking{

    function stakeOf(address _stakeholder)
        public
        view
        virtual
        returns (uint256[] memory);    
}

contract GoldenToken is ERC1155Tradable {

    using SafeMath for uint256;
    //Addresses
    address constant WALLET1 = 0xffe5CBCDdF2bd1b4Dc3c00455d4cdCcf20F77587;
    address constant WALLET2 = 0xD9CC8af4E8ac5Cb5e7DdFffD138A58Bac49dAEd5;

    // Uint256
    uint256 public maxSupply = 1000;
    uint256 public maxToMint = 1;
    uint256 public maxPerWallet = 1;
    uint256 public constant goldenCoinID = 0;
    uint256 public coinPrice = 1000000000000000000;

    // Booleans
    bool public saleIsActive = false;

    // Contracts
    SamotStaking staked;

    constructor(
        string memory _name,
        string memory _symbol,
        string memory _uri,
        address _proxyRegistryAddress
    ) ERC1155Tradable(_name, _symbol,_uri,_proxyRegistryAddress) {
        create(0x399Db9b924bC348BfC3bD777817631eb5A79b152, goldenCoinID, 1, "https://samotclub.mypinata.cloud/ipfs/QmTSjZpbh6cX9ZhWp3w21R6ZMdPeBzFda8CdhtrgRxPJtS", "");
    }

    function setStakingContract(address _contract) external onlyOwner {
        staked = SamotStaking(_contract);
    }

    function stakeOf(address _stakeholder)
        public
        view
        returns (uint256[] memory)
    {
        return staked.stakeOf(_stakeholder);
    }


    function setMaxToMint(uint256 _maxToMint) external onlyOwner {
        maxToMint = _maxToMint;
    }

    function setMaxPerWallet(uint256 _maxPerWallet) external onlyOwner {
        maxPerWallet = _maxPerWallet;
    }

    function setCoinPrice(uint256 _coinPrice) external onlyOwner {
        coinPrice = _coinPrice;
    }

    function flipSaleState() public onlyOwner {
        saleIsActive = !saleIsActive;
    }

    function reserve(address account, uint256 _id, uint256 _quantity) public onlyOwner{
        _mint(account,_id,_quantity,"");
        tokenSupply[_id] = tokenSupply[_id].add(_quantity);
    }
    
    function mintGoldenCoin(uint256 numberOfTokens) public payable {
        require(saleIsActive, "Sale is not active.");
        require(
            totalSupply(goldenCoinID).add(numberOfTokens) <= maxSupply,
            "Sale has already ended."
        );
        require(numberOfTokens > 0, "numberOfTokens cannot be 0.");
        require(
                coinPrice.mul(numberOfTokens) <= msg.value,
                "ETH sent is incorrect."
            );
        require(
                balanceOf(msg.sender,goldenCoinID).add(numberOfTokens) <= maxPerWallet,
                "Exceeds limit."
            );
        require(
                coinPrice.mul(numberOfTokens) <= msg.value,
                "ETH sent is incorrect."
            );
        require(
                numberOfTokens <= maxToMint,
                "Exceeds per transaction limit."
            );

        for (uint256 i = 0; i < numberOfTokens; i++) {
            _mint(msg.sender,goldenCoinID,numberOfTokens,"");
            tokenSupply[goldenCoinID] = tokenSupply[goldenCoinID].add(numberOfTokens);
        }
    }

    function withdraw() external onlyOwner {
        uint256 balance = address(this).balance;
        uint256 wallet1Balance = balance.mul(10).div(100);
        uint256 wallet2Balance = balance.mul(85).div(100);
        payable(WALLET1).transfer(wallet1Balance);
        payable(WALLET2).transfer(wallet2Balance);
        payable(msg.sender).transfer(
            balance.sub(wallet1Balance.add(wallet2Balance))
        );
    }
}

File 2 of 17 : NativeMetaTransaction.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import {SafeMath} from "openzeppelin-solidity/contracts/utils/math/SafeMath.sol";
import {EIP712Base} from "./EIP712Base.sol";

contract NativeMetaTransaction is EIP712Base {
    using SafeMath for uint256;
    bytes32 private constant META_TRANSACTION_TYPEHASH =
        keccak256(
            bytes(
                "MetaTransaction(uint256 nonce,address from,bytes functionSignature)"
            )
        );
    event MetaTransactionExecuted(
        address userAddress,
        address payable relayerAddress,
        bytes functionSignature
    );
    mapping(address => uint256) nonces;

    /*
     * Meta transaction structure.
     * No point of including value field here as if user is doing value transfer then he has the funds to pay for gas
     * He should call the desired function directly in that case.
     */
    struct MetaTransaction {
        uint256 nonce;
        address from;
        bytes functionSignature;
    }

    function executeMetaTransaction(
        address userAddress,
        bytes memory functionSignature,
        bytes32 sigR,
        bytes32 sigS,
        uint8 sigV
    ) public payable returns (bytes memory) {
        MetaTransaction memory metaTx = MetaTransaction({
            nonce: nonces[userAddress],
            from: userAddress,
            functionSignature: functionSignature
        });

        require(
            verify(userAddress, metaTx, sigR, sigS, sigV),
            "Signer and signature do not match"
        );

        // increase nonce for user (to avoid re-use)
        nonces[userAddress] = nonces[userAddress].add(1);

        emit MetaTransactionExecuted(
            userAddress,
            payable(msg.sender),
            functionSignature
        );

        // Append userAddress and relayer address at the end to extract it from calling context
        (bool success, bytes memory returnData) = address(this).call(
            abi.encodePacked(functionSignature, userAddress)
        );
        require(success, "Function call not successful");

        return returnData;
    }

    function hashMetaTransaction(MetaTransaction memory metaTx)
        internal
        pure
        returns (bytes32)
    {
        return
            keccak256(
                abi.encode(
                    META_TRANSACTION_TYPEHASH,
                    metaTx.nonce,
                    metaTx.from,
                    keccak256(metaTx.functionSignature)
                )
            );
    }

    function getNonce(address user) public view returns (uint256 nonce) {
        nonce = nonces[user];
    }

    function verify(
        address signer,
        MetaTransaction memory metaTx,
        bytes32 sigR,
        bytes32 sigS,
        uint8 sigV
    ) internal view returns (bool) {
        require(signer != address(0), "NativeMetaTransaction: INVALID_SIGNER");
        return
            signer ==
            ecrecover(
                toTypedMessageHash(hashMetaTransaction(metaTx)),
                sigV,
                sigR,
                sigS
            );
    }
}

File 3 of 17 : Initializable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

contract Initializable {
    bool inited = false;

    modifier initializer() {
        require(!inited, "already inited");
        _;
        inited = true;
    }
}

File 4 of 17 : EIP712Base.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import {Initializable} from "./Initializable.sol";

contract EIP712Base is Initializable {
    struct EIP712Domain {
        string name;
        string version;
        address verifyingContract;
        bytes32 salt;
    }

    string public constant ERC712_VERSION = "1";

    bytes32 internal constant EIP712_DOMAIN_TYPEHASH =
        keccak256(
            bytes(
                "EIP712Domain(string name,string version,address verifyingContract,bytes32 salt)"
            )
        );
    bytes32 internal domainSeperator;

    // supposed to be called once while initializing.
    // one of the contracts that inherits this contract follows proxy pattern
    // so it is not possible to do this in a constructor
    function _initializeEIP712(string memory name) internal initializer {
        _setDomainSeperator(name);
    }

    function _setDomainSeperator(string memory name) internal {
        domainSeperator = keccak256(
            abi.encode(
                EIP712_DOMAIN_TYPEHASH,
                keccak256(bytes(name)),
                keccak256(bytes(ERC712_VERSION)),
                address(this),
                bytes32(getChainId())
            )
        );
    }

    function getDomainSeperator() public view returns (bytes32) {
        return domainSeperator;
    }

    function getChainId() public view returns (uint256) {
        uint256 id;
        assembly {
            id := chainid()
        }
        return id;
    }

    /**
     * Accept message hash and returns hash message in EIP712 compatible form
     * So that it can be used to recover signer from signature signed using EIP712 formatted data
     * https://eips.ethereum.org/EIPS/eip-712
     * "\\x19" makes the encoding deterministic
     * "\\x01" is the version byte to make it compatible to EIP-191
     */
    function toTypedMessageHash(bytes32 messageHash)
        internal
        view
        returns (bytes32)
    {
        return
            keccak256(
                abi.encodePacked("\x19\x01", getDomainSeperator(), messageHash)
            );
    }
}

File 5 of 17 : ContentMixin.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

abstract contract ContextMixin {
    function msgSender() internal view returns (address payable sender) {
        if (msg.sender == address(this)) {
            bytes memory array = msg.data;
            uint256 index = msg.data.length;
            assembly {
                // Load the 32 bytes word from memory with the address on the lower 20 bytes, and mask those.
                sender := and(
                    mload(add(array, index)),
                    0xffffffffffffffffffffffffffffffffffffffff
                )
            }
        } else {
            sender = payable(msg.sender);
        }
        return sender;
    }
}

File 6 of 17 : ERC1155Tradable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "openzeppelin-solidity/contracts/access/Ownable.sol";
import "openzeppelin-solidity/contracts/token/ERC1155/ERC1155.sol";
import "openzeppelin-solidity/contracts/utils/math/SafeMath.sol";
import "openzeppelin-solidity/contracts/utils/Strings.sol";

import "./common/meta-transactions/ContentMixin.sol";
import "./common/meta-transactions/NativeMetaTransaction.sol";

contract OwnableDelegateProxy { }

contract ProxyRegistry {
  mapping(address => OwnableDelegateProxy) public proxies;
}

/**
 * @title ERC1155Tradable
 * ERC1155Tradable - ERC1155 contract that whitelists an operator address, has create and mint functionality, and supports useful standards from OpenZeppelin,
  like _exists(), name(), symbol(), and totalSupply()
 */
contract ERC1155Tradable is ContextMixin, ERC1155, NativeMetaTransaction, Ownable {
  using Strings for string;
  using SafeMath for uint256;

  address proxyRegistryAddress;
  mapping (uint256 => address) public creators;
  mapping (uint256 => uint256) public tokenSupply;
  mapping (uint256 => string) customUri;
  // Contract name
  string public name;
  // Contract symbol
  string public symbol;

  /**
   * @dev Require _msgSender() to be the creator of the token id
   */
  modifier creatorOnly(uint256 _id) {
    require(creators[_id] == _msgSender(), "ERC1155Tradable#creatorOnly: ONLY_CREATOR_ALLOWED");
    _;
  }

  /**
   * @dev Require _msgSender() to own more than 0 of the token id
   */
  modifier ownersOnly(uint256 _id) {
    require(balanceOf(_msgSender(), _id) > 0, "ERC1155Tradable#ownersOnly: ONLY_OWNERS_ALLOWED");
    _;
  }

  constructor(
    string memory _name,
    string memory _symbol,
    string memory _uri,
    address _proxyRegistryAddress
  ) ERC1155(_uri) {
    name = _name;
    symbol = _symbol;
    proxyRegistryAddress = _proxyRegistryAddress;
    _initializeEIP712(name);
  }

  function uri(
    uint256 _id
  ) override public view returns (string memory) {
    require(_exists(_id), "ERC1155Tradable#uri: NONEXISTENT_TOKEN");
    // We have to convert string to bytes to check for existence
    bytes memory customUriBytes = bytes(customUri[_id]);
    if (customUriBytes.length > 0) {
        return customUri[_id];
    } else {
        return super.uri(_id);
    }
  }

  /**
    * @dev Returns the total quantity for a token ID
    * @param _id uint256 ID of the token to query
    * @return amount of token in existence
    */
  function totalSupply(
    uint256 _id
  ) public view returns (uint256) {
    return tokenSupply[_id];
  }

  /**
   * @dev Sets a new URI for all token types, by relying on the token type ID
    * substitution mechanism
    * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].
   * @param _newURI New URI for all tokens
   */
  function setURI(
    string memory _newURI
  ) public onlyOwner {
    _setURI(_newURI);
  }

  /**
   * @dev Will update the base URI for the token
   * @param _tokenId The token to update. _msgSender() must be its creator.
   * @param _newURI New URI for the token.
   */
  function setCustomURI(
    uint256 _tokenId,
    string memory _newURI
  ) public creatorOnly(_tokenId) {
    customUri[_tokenId] = _newURI;
    emit URI(_newURI, _tokenId);
  }

  /**
    * @dev Creates a new token type and assigns _initialSupply to an address
    * NOTE: remove onlyOwner if you want third parties to create new tokens on
    *       your contract (which may change your IDs)
    * NOTE: The token id must be passed. This allows lazy creation of tokens or
    *       creating NFTs by setting the id's high bits with the method
    *       described in ERC1155 or to use ids representing values other than
    *       successive small integers. If you wish to create ids as successive
    *       small integers you can either subclass this class to count onchain
    *       or maintain the offchain cache of identifiers recommended in
    *       ERC1155 and calculate successive ids from that.
    * @param _initialOwner address of the first owner of the token
    * @param _id The id of the token to create (must not currenty exist).
    * @param _initialSupply amount to supply the first owner
    * @param _uri Optional URI for this token type
    * @param _data Data to pass if receiver is contract
    * @return The newly created token ID
    */
  function create(
    address _initialOwner,
    uint256 _id,
    uint256 _initialSupply,
    string memory _uri,
    bytes memory _data
  ) public onlyOwner returns (uint256) {
    require(!_exists(_id), "token _id already exists");
    creators[_id] = _msgSender();

    if (bytes(_uri).length > 0) {
      customUri[_id] = _uri;
      emit URI(_uri, _id);
    }

    _mint(_initialOwner, _id, _initialSupply, _data);

    tokenSupply[_id] = _initialSupply;
    return _id;
  }

  /**
    * @dev Mints some amount of tokens to an address
    * @param _to          Address of the future owner of the token
    * @param _id          Token ID to mint
    * @param _quantity    Amount of tokens to mint
    * @param _data        Data to pass if receiver is contract
    */
  function mint(
    address _to,
    uint256 _id,
    uint256 _quantity,
    bytes memory _data
  ) virtual public creatorOnly(_id) {
    _mint(_to, _id, _quantity, _data);
    tokenSupply[_id] = tokenSupply[_id].add(_quantity);
  }

  /**
    * @dev Mint tokens for each id in _ids
    * @param _to          The address to mint tokens to
    * @param _ids         Array of ids to mint
    * @param _quantities  Array of amounts of tokens to mint per id
    * @param _data        Data to pass if receiver is contract
    */
  function batchMint(
    address _to,
    uint256[] memory _ids,
    uint256[] memory _quantities,
    bytes memory _data
  ) public {
    for (uint256 i = 0; i < _ids.length; i++) {
      uint256 _id = _ids[i];
      require(creators[_id] == _msgSender(), "ERC1155Tradable#batchMint: ONLY_CREATOR_ALLOWED");
      uint256 quantity = _quantities[i];
      tokenSupply[_id] = tokenSupply[_id].add(quantity);
    }
    _mintBatch(_to, _ids, _quantities, _data);
  }

  /**
    * @dev Change the creator address for given tokens
    * @param _to   Address of the new creator
    * @param _ids  Array of Token IDs to change creator
    */
  function setCreator(
    address _to,
    uint256[] memory _ids
  ) public {
    require(_to != address(0), "ERC1155Tradable#setCreator: INVALID_ADDRESS.");
    for (uint256 i = 0; i < _ids.length; i++) {
      uint256 id = _ids[i];
      _setCreator(_to, id);
    }
  }

  /**
   * Override isApprovedForAll to whitelist user's OpenSea proxy accounts to enable gas-free listings.
   */
  function isApprovedForAll(
    address _owner,
    address _operator
  ) override public view returns (bool isOperator) {
    // Whitelist OpenSea proxy contract for easy trading.
    ProxyRegistry proxyRegistry = ProxyRegistry(proxyRegistryAddress);
    if (address(proxyRegistry.proxies(_owner)) == _operator) {
      return true;
    }

    return ERC1155.isApprovedForAll(_owner, _operator);
  }

  /**
    * @dev Change the creator address for given token
    * @param _to   Address of the new creator
    * @param _id  Token IDs to change creator of
    */
  function _setCreator(address _to, uint256 _id) internal creatorOnly(_id)
  {
      creators[_id] = _to;
  }

  /**
    * @dev Returns whether the specified token exists by checking to see if it has a creator
    * @param _id uint256 ID of the token to query the existence of
    * @return bool whether the token exists
    */
  function _exists(
    uint256 _id
  ) internal view returns (bool) {
    return creators[_id] != address(0);
  }

  function exists(
    uint256 _id
  ) external view returns (bool) {
    return _exists(_id);
  }

    /**
     * This is used instead of msg.sender as transactions won't be sent by the original token owner, but by OpenSea.
     */
    function _msgSender()
        internal
        override
        view
        returns (address sender)
    {
        return ContextMixin.msgSender();
    }
}

File 7 of 17 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
            // benefit is lost if 'b' is also tested.
            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        return a + b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        return a * b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        unchecked {
            require(b <= a, errorMessage);
            return a - b;
        }
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a / b;
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

File 8 of 17 : IERC165.sol
// SPDX-License-Identifier: MIT

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 9 of 17 : ERC165.sol
// SPDX-License-Identifier: MIT

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 10 of 17 : Strings.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant alphabet = "0123456789abcdef";

    /**
     * @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] = alphabet[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }

}

File 11 of 17 : Context.sol
// SPDX-License-Identifier: MIT

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) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

File 12 of 17 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (bool success, ) = recipient.call{ value: amount }("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain`call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
      return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: value }(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.staticcall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 13 of 17 : IERC1155MetadataURI.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC1155.sol";

/**
 * @dev Interface of the optional ERC1155MetadataExtension interface, as defined
 * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155MetadataURI is IERC1155 {
    /**
     * @dev Returns the URI for token type `id`.
     *
     * If the `\{id\}` substring is present in the URI, it must be replaced by
     * clients with the actual token type ID.
     */
    function uri(uint256 id) external view returns (string memory);
}

File 14 of 17 : IERC1155Receiver.sol
// SPDX-License-Identifier: MIT

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.
        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. 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 15 of 17 : IERC1155.sol
// SPDX-License-Identifier: MIT

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 be 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 16 of 17 : ERC1155.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC1155.sol";
import "./IERC1155Receiver.sol";
import "./extensions/IERC1155MetadataURI.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/introspection/ERC165.sol";

/**
 * @dev Implementation of the basic standard multi-token.
 * See https://eips.ethereum.org/EIPS/eip-1155
 * Originally based on code by Enjin: https://github.com/enjin/erc-1155
 *
 * _Available since v3.1._
 */
contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {
    using Address for address;

    // Mapping from token ID to account balances
    mapping (uint256 => mapping(address => uint256)) private _balances;

    // Mapping from account to operator approvals
    mapping (address => mapping(address => bool)) private _operatorApprovals;

    // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json
    string private _uri;

    /**
     * @dev See {_setURI}.
     */
    constructor (string memory uri_) {
        _setURI(uri_);
    }

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

    /**
     * @dev See {IERC1155MetadataURI-uri}.
     *
     * This implementation returns the same URI for *all* token types. It relies
     * on the token type ID substitution mechanism
     * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].
     *
     * Clients calling this function must replace the `\{id\}` substring with the
     * actual token type ID.
     */
    function uri(uint256) public view virtual override returns (string memory) {
        return _uri;
    }

    /**
     * @dev See {IERC1155-balanceOf}.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {
        require(account != address(0), "ERC1155: balance query for the zero address");
        return _balances[id][account];
    }

    /**
     * @dev See {IERC1155-balanceOfBatch}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(
        address[] memory accounts,
        uint256[] memory ids
    )
        public
        view
        virtual
        override
        returns (uint256[] memory)
    {
        require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch");

        uint256[] memory batchBalances = new uint256[](accounts.length);

        for (uint256 i = 0; i < accounts.length; ++i) {
            batchBalances[i] = balanceOf(accounts[i], ids[i]);
        }

        return batchBalances;
    }

    /**
     * @dev See {IERC1155-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        require(_msgSender() != operator, "ERC1155: setting approval status for self");

        _operatorApprovals[_msgSender()][operator] = approved;
        emit ApprovalForAll(_msgSender(), operator, approved);
    }

    /**
     * @dev See {IERC1155-isApprovedForAll}.
     */
    function isApprovedForAll(address account, address operator) public view virtual override returns (bool) {
        return _operatorApprovals[account][operator];
    }

    /**
     * @dev See {IERC1155-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    )
        public
        virtual
        override
    {
        require(to != address(0), "ERC1155: transfer to the zero address");
        require(
            from == _msgSender() || isApprovedForAll(from, _msgSender()),
            "ERC1155: caller is not owner nor approved"
        );

        address operator = _msgSender();

        _beforeTokenTransfer(operator, from, to, _asSingletonArray(id), _asSingletonArray(amount), data);

        uint256 fromBalance = _balances[id][from];
        require(fromBalance >= amount, "ERC1155: insufficient balance for transfer");
        _balances[id][from] = fromBalance - amount;
        _balances[id][to] += amount;

        emit TransferSingle(operator, from, to, id, amount);

        _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);
    }

    /**
     * @dev See {IERC1155-safeBatchTransferFrom}.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    )
        public
        virtual
        override
    {
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");
        require(to != address(0), "ERC1155: transfer to the zero address");
        require(
            from == _msgSender() || isApprovedForAll(from, _msgSender()),
            "ERC1155: transfer caller is not owner nor approved"
        );

        address operator = _msgSender();

        _beforeTokenTransfer(operator, from, to, ids, amounts, data);

        for (uint256 i = 0; i < ids.length; ++i) {
            uint256 id = ids[i];
            uint256 amount = amounts[i];

            uint256 fromBalance = _balances[id][from];
            require(fromBalance >= amount, "ERC1155: insufficient balance for transfer");
            _balances[id][from] = fromBalance - amount;
            _balances[id][to] += amount;
        }

        emit TransferBatch(operator, from, to, ids, amounts);

        _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);
    }

    /**
     * @dev Sets a new URI for all token types, by relying on the token type ID
     * substitution mechanism
     * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].
     *
     * By this mechanism, any occurrence of the `\{id\}` substring in either the
     * URI or any of the amounts in the JSON file at said URI will be replaced by
     * clients with the token type ID.
     *
     * For example, the `https://token-cdn-domain/\{id\}.json` URI would be
     * interpreted by clients as
     * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`
     * for token type ID 0x4cce0.
     *
     * See {uri}.
     *
     * Because these URIs cannot be meaningfully represented by the {URI} event,
     * this function emits no events.
     */
    function _setURI(string memory newuri) internal virtual {
        _uri = newuri;
    }

    /**
     * @dev Creates `amount` tokens of token type `id`, and assigns them to `account`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - If `account` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function _mint(address account, uint256 id, uint256 amount, bytes memory data) internal virtual {
        require(account != address(0), "ERC1155: mint to the zero address");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, address(0), account, _asSingletonArray(id), _asSingletonArray(amount), data);

        _balances[id][account] += amount;
        emit TransferSingle(operator, address(0), account, id, amount);

        _doSafeTransferAcceptanceCheck(operator, address(0), account, id, amount, data);
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.
     *
     * 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 _mintBatch(address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) internal virtual {
        require(to != address(0), "ERC1155: mint to the zero address");
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);

        for (uint i = 0; i < ids.length; i++) {
            _balances[ids[i]][to] += amounts[i];
        }

        emit TransferBatch(operator, address(0), to, ids, amounts);

        _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);
    }

    /**
     * @dev Destroys `amount` tokens of token type `id` from `account`
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens of token type `id`.
     */
    function _burn(address account, uint256 id, uint256 amount) internal virtual {
        require(account != address(0), "ERC1155: burn from the zero address");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, account, address(0), _asSingletonArray(id), _asSingletonArray(amount), "");

        uint256 accountBalance = _balances[id][account];
        require(accountBalance >= amount, "ERC1155: burn amount exceeds balance");
        _balances[id][account] = accountBalance - amount;

        emit TransferSingle(operator, account, address(0), id, amount);
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     */
    function _burnBatch(address account, uint256[] memory ids, uint256[] memory amounts) internal virtual {
        require(account != address(0), "ERC1155: burn from the zero address");
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, account, address(0), ids, amounts, "");

        for (uint i = 0; i < ids.length; i++) {
            uint256 id = ids[i];
            uint256 amount = amounts[i];

            uint256 accountBalance = _balances[id][account];
            require(accountBalance >= amount, "ERC1155: burn amount exceeds balance");
            _balances[id][account] = accountBalance - amount;
        }

        emit TransferBatch(operator, account, address(0), ids, amounts);
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning, as well as batched variants.
     *
     * The same hook is called on both single and batched variants. For single
     * transfers, the length of the `id` and `amount` arrays will be 1.
     *
     * Calling conditions (for each `id` and `amount` pair):
     *
     * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * of token type `id` will be  transferred to `to`.
     * - When `from` is zero, `amount` tokens of token type `id` will be minted
     * for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`
     * will be burned.
     * - `from` and `to` are never both zero.
     * - `ids` and `amounts` have the same, non-zero length.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    )
        internal
        virtual
    { }

    function _doSafeTransferAcceptanceCheck(
        address operator,
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    )
        private
    {
        if (to.isContract()) {
            try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {
                if (response != IERC1155Receiver(to).onERC1155Received.selector) {
                    revert("ERC1155: ERC1155Receiver rejected tokens");
                }
            } catch Error(string memory reason) {
                revert(reason);
            } catch {
                revert("ERC1155: transfer to non ERC1155Receiver implementer");
            }
        }
    }

    function _doSafeBatchTransferAcceptanceCheck(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    )
        private
    {
        if (to.isContract()) {
            try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (bytes4 response) {
                if (response != IERC1155Receiver(to).onERC1155BatchReceived.selector) {
                    revert("ERC1155: ERC1155Receiver rejected tokens");
                }
            } catch Error(string memory reason) {
                revert(reason);
            } catch {
                revert("ERC1155: transfer to non ERC1155Receiver implementer");
            }
        }
    }

    function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {
        uint256[] memory array = new uint256[](1);
        array[0] = element;

        return array;
    }
}

File 17 of 17 : Ownable.sol
// SPDX-License-Identifier: MIT

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 () {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

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

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

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = 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");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"string","name":"_uri","type":"string"},{"internalType":"address","name":"_proxyRegistryAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"userAddress","type":"address"},{"indexed":false,"internalType":"address payable","name":"relayerAddress","type":"address"},{"indexed":false,"internalType":"bytes","name":"functionSignature","type":"bytes"}],"name":"MetaTransactionExecuted","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":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"inputs":[],"name":"ERC712_VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256[]","name":"_ids","type":"uint256[]"},{"internalType":"uint256[]","name":"_quantities","type":"uint256[]"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"batchMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"coinPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_initialOwner","type":"address"},{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"uint256","name":"_initialSupply","type":"uint256"},{"internalType":"string","name":"_uri","type":"string"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"create","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"creators","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"userAddress","type":"address"},{"internalType":"bytes","name":"functionSignature","type":"bytes"},{"internalType":"bytes32","name":"sigR","type":"bytes32"},{"internalType":"bytes32","name":"sigS","type":"bytes32"},{"internalType":"uint8","name":"sigV","type":"uint8"}],"name":"executeMetaTransaction","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"flipSaleState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getChainId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDomainSeperator","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getNonce","outputs":[{"internalType":"uint256","name":"nonce","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"goldenCoinID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"isOperator","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxPerWallet","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxToMint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"uint256","name":"_quantity","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"numberOfTokens","type":"uint256"}],"name":"mintGoldenCoin","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"uint256","name":"_quantity","type":"uint256"}],"name":"reserve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"saleIsActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_coinPrice","type":"uint256"}],"name":"setCoinPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256[]","name":"_ids","type":"uint256[]"}],"name":"setCreator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"string","name":"_newURI","type":"string"}],"name":"setCustomURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxPerWallet","type":"uint256"}],"name":"setMaxPerWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxToMint","type":"uint256"}],"name":"setMaxToMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_contract","type":"address"}],"name":"setStakingContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newURI","type":"string"}],"name":"setURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_stakeholder","type":"address"}],"name":"stakeOf","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040526003805460ff199081169091556103e8600d556001600e819055600f55670de0b6b3a76400006010556011805490911690553480156200004357600080fd5b506040516200447638038062004476833981016040819052620000669162000a46565b8383838381620000768162000213565b506000620000836200022c565b600680546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3508351620000e690600b906020870190620008b0565b508251620000fc90600c906020860190620008b0565b50600780546001600160a01b0319166001600160a01b038316179055600b8054620001b891906200012d9062000af9565b80601f01602080910402602001604051908101604052809291908181526020018280546200015b9062000af9565b8015620001ac5780601f106200018057610100808354040283529160200191620001ac565b820191906000526020600020905b8154815290600101906020018083116200018e57829003601f168201915b50506200024892505050565b505050506200020873399db9b924bc348bfc3bd777817631eb5a79b152600060016040518060800160405280605481526020016200442260549139604080516020810190915260008152620002ad565b505050505062000cdb565b805162000228906002906020840190620008b0565b5050565b6000620002436200045460201b6200204c1760201c565b905090565b60035460ff1615620002925760405162461bcd60e51b815260206004820152600e60248201526d185b1c9958591e481a5b9a5d195960921b60448201526064015b60405180910390fd5b6200029d81620004b3565b506003805460ff19166001179055565b6000620002b96200022c565b6001600160a01b0316620002d56006546001600160a01b031690565b6001600160a01b0316146200032d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640162000289565b6000858152600860205260409020546001600160a01b031615620003945760405162461bcd60e51b815260206004820152601860248201527f746f6b656e205f696420616c7265616479206578697374730000000000000000604482015260640162000289565b6200039e6200022c565b600086815260086020526040902080546001600160a01b0319166001600160a01b03929092169190911790558251156200042f576000858152600a602090815260409091208451620003f392860190620008b0565b50847f6bb7ff708619ba0610cba295a58592e0451dee2622938c8755667688daf3529b8460405162000426919062000b64565b60405180910390a25b6200043d8686868562000555565b505050600082815260096020526040902055919050565b600033301415620004ad57600080368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050503601516001600160a01b03169150620004b09050565b50335b90565b6040518060800160405280604f8152602001620043d3604f9139805160209182012082519282019290922060408051808201825260018152603160f81b90840152805180840194909452838101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608401523060808401524660a0808501919091528151808503909101815260c090930190528151910120600455565b6001600160a01b038416620005b75760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b606482015260840162000289565b6000620005c36200022c565b9050620005ea81600087620005d8886200067e565b620005e3886200067e565b5050505050565b6000848152602081815260408083206001600160a01b0389168452909152812080548592906200061c90849062000b80565b909155505060408051858152602081018590526001600160a01b0380881692600092918516917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4620005e381600087878787620006d4565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110620006bb57620006bb62000ba7565b602090810291909101015292915050565b505050505050565b620006f3846001600160a01b0316620008aa60201b620020a91760201c565b15620006cc5760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906200072f908990899088908890889060040162000bbd565b6020604051808303816000875af19250505080156200076d575060408051601f3d908101601f191682019092526200076a9181019062000c04565b60015b6200082e576200077c62000c30565b806308c379a01415620007bd57506200079462000c4c565b80620007a15750620007bf565b8060405162461bcd60e51b815260040162000289919062000b64565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e204552433131353560448201527f526563656976657220696d706c656d656e746572000000000000000000000000606482015260840162000289565b6001600160e01b0319811663f23a6e6160e01b14620008a15760405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a656374656044820152676420746f6b656e7360c01b606482015260840162000289565b50505050505050565b3b151590565b828054620008be9062000af9565b90600052602060002090601f016020900481019282620008e257600085556200092d565b82601f10620008fd57805160ff19168380011785556200092d565b828001600101855582156200092d579182015b828111156200092d57825182559160200191906001019062000910565b506200093b9291506200093f565b5090565b5b808211156200093b576000815560010162000940565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b038111828210171562000994576200099462000956565b6040525050565b60005b83811015620009b85781810151838201526020016200099e565b83811115620009c8576000848401525b50505050565b600082601f830112620009e057600080fd5b81516001600160401b03811115620009fc57620009fc62000956565b60405162000a15601f8301601f1916602001826200096c565b81815284602083860101111562000a2b57600080fd5b62000a3e8260208301602087016200099b565b949350505050565b6000806000806080858703121562000a5d57600080fd5b84516001600160401b038082111562000a7557600080fd5b62000a8388838901620009ce565b9550602087015191508082111562000a9a57600080fd5b62000aa888838901620009ce565b9450604087015191508082111562000abf57600080fd5b5062000ace87828801620009ce565b606087015190935090506001600160a01b038116811462000aee57600080fd5b939692955090935050565b600181811c9082168062000b0e57607f821691505b6020821081141562000b3057634e487b7160e01b600052602260045260246000fd5b50919050565b6000815180845262000b508160208601602086016200099b565b601f01601f19169290920160200192915050565b60208152600062000b79602083018462000b36565b9392505050565b6000821982111562000ba257634e487b7160e01b600052601160045260246000fd5b500190565b634e487b7160e01b600052603260045260246000fd5b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009062000bf99083018462000b36565b979650505050505050565b60006020828403121562000c1757600080fd5b81516001600160e01b03198116811462000b7957600080fd5b600060033d1115620004b05760046000803e5060005160e01c90565b600060443d101562000c5b5790565b6040516003193d81016004833e81513d6001600160401b03808311602484018310171562000c8b57505050505090565b828501915081518181111562000ca45750505050505090565b843d870101602082850101111562000cbf5750505050505090565b62000cd0602082860101876200096c565b509095945050505050565b6136e88062000ceb6000396000f3fe6080604052600436106101fb5760003560e01c80634f558e79116101145780634f558e79146104a8578063550b47b8146104c85780637084b2b7146104e8578063715018a614610508578063731133e91461051d5780638da5cb5b1461053d57806395d89b411461055f5780639dd373b9146105745780639e29dd3614610594578063a22cb465146105b4578063ad0f2916146105d4578063b48ab8b6146105ea578063bd85b0391461060a578063c2a2ffec14610637578063cd53d08e1461064c578063d2a6b51a14610682578063d5abeb01146106a2578063e268e4d3146106b8578063e985e9c5146106d8578063eb8d2444146106f8578063f242432a14610712578063f2fde38b1461073257600080fd5b8062fdd58e1461020057806301ffc9a71461023357806302fe53051461026357806306fdde03146102855780630ba133c5146102a75780630c53c51c146102bd5780630e89341c146102d05780630f7e5970146102f05780631bb959911461031d57806320379ee5146103305780632693ebf2146103455780632d0335ab146103725780632eb2c2d6146103a85780633408e470146103c857806334918dfd146103db57806336a100d5146103f05780633adf80b4146104105780633ccfd60b146104305780634262336014610445578063453c2310146104725780634e1273f414610488575b600080fd5b34801561020c57600080fd5b5061022061021b3660046128f8565b610752565b6040519081526020015b60405180910390f35b34801561023f57600080fd5b5061025361024e36600461293a565b6107ec565b604051901515815260200161022a565b34801561026f57600080fd5b5061028361027e366004612a0c565b61083c565b005b34801561029157600080fd5b5061029a610887565b60405161022a9190612a98565b3480156102b357600080fd5b50610220600e5481565b61029a6102cb366004612aab565b610915565b3480156102dc57600080fd5b5061029a6102eb366004612b28565b610afe565b3480156102fc57600080fd5b5061029a604051806040016040528060018152602001603160f81b81525081565b61028361032b366004612b28565b610cbc565b34801561033c57600080fd5b50600454610220565b34801561035157600080fd5b50610220610360366004612b28565b60096020526000908152604090205481565b34801561037e57600080fd5b5061022061038d366004612b41565b6001600160a01b031660009081526005602052604090205490565b3480156103b457600080fd5b506102836103c3366004612bf2565b610f39565b3480156103d457600080fd5b5046610220565b3480156103e757600080fd5b506102836111c0565b3480156103fc57600080fd5b5061022061040b366004612c9f565b611213565b34801561041c57600080fd5b5061028361042b366004612cf8565b61135c565b34801561043c57600080fd5b506102836113fb565b34801561045157600080fd5b50610465610460366004612b41565b611534565b60405161022a9190612d79565b34801561047e57600080fd5b50610220600f5481565b34801561049457600080fd5b506104656104a3366004612d8c565b6115af565b3480156104b457600080fd5b506102536104c3366004612b28565b6116d8565b3480156104d457600080fd5b506102836104e3366004612b28565b6116e3565b3480156104f457600080fd5b50610283610503366004612b28565b611727565b34801561051457600080fd5b5061028361176b565b34801561052957600080fd5b50610283610538366004612e4e565b6117f4565b34801561054957600080fd5b50610552611874565b60405161022a9190612eb0565b34801561056b57600080fd5b5061029a611883565b34801561058057600080fd5b5061028361058f366004612b41565b611890565b3480156105a057600080fd5b506102836105af366004612ec4565b6118f7565b3480156105c057600080fd5b506102836105cf366004612ef9565b611981565b3480156105e057600080fd5b5061022060105481565b3480156105f657600080fd5b50610283610605366004612f37565b611a95565b34801561061657600080fd5b50610220610625366004612b28565b60009081526009602052604090205490565b34801561064357600080fd5b50610220600081565b34801561065857600080fd5b50610552610667366004612b28565b6008602052600090815260409020546001600160a01b031681565b34801561068e57600080fd5b5061028361069d366004612fc5565b611bbf565b3480156106ae57600080fd5b50610220600d5481565b3480156106c457600080fd5b506102836106d3366004612b28565b611c76565b3480156106e457600080fd5b506102536106f336600461300a565b611cba565b34801561070457600080fd5b506011546102539060ff1681565b34801561071e57600080fd5b5061028361072d366004613038565b611d7f565b34801561073e57600080fd5b5061028361074d366004612b41565b611f4c565b60006001600160a01b0383166107c35760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084015b60405180910390fd5b506000818152602081815260408083206001600160a01b03861684529091529020545b92915050565b60006001600160e01b03198216636cdb3d1360e11b148061081d57506001600160e01b031982166303a24d0760e21b145b806107e657506301ffc9a760e01b6001600160e01b03198316146107e6565b6108446120af565b6001600160a01b0316610855611874565b6001600160a01b03161461087b5760405162461bcd60e51b81526004016107ba906130a0565b610884816120be565b50565b600b8054610894906130d5565b80601f01602080910402602001604051908101604052809291908181526020018280546108c0906130d5565b801561090d5780601f106108e25761010080835404028352916020019161090d565b820191906000526020600020905b8154815290600101906020018083116108f057829003601f168201915b505050505081565b60408051606081810183526001600160a01b0388166000818152600560209081529085902054845283015291810186905261095387828787876120d1565b6109a95760405162461bcd60e51b815260206004820152602160248201527f5369676e657220616e64207369676e617475726520646f206e6f74206d6174636044820152600d60fb1b60648201526084016107ba565b6001600160a01b0387166000908152600560205260409020546109cd9060016121c1565b6001600160a01b0388166000908152600560205260409081902091909155517f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b90610a1d90899033908a9061310a565b60405180910390a1600080306001600160a01b0316888a604051602001610a4592919061313f565b60408051601f1981840301815290829052610a5f91613171565b6000604051808303816000865af19150503d8060008114610a9c576040519150601f19603f3d011682016040523d82523d6000602084013e610aa1565b606091505b509150915081610af25760405162461bcd60e51b815260206004820152601c60248201527b119d5b98dd1a5bdb8818d85b1b081b9bdd081cdd58d8d95cdcd99d5b60221b60448201526064016107ba565b98975050505050505050565b6060610b09826121cd565b610b645760405162461bcd60e51b815260206004820152602660248201527f455243313135355472616461626c65237572693a204e4f4e4558495354454e546044820152652faa27a5a2a760d11b60648201526084016107ba565b6000828152600a602052604081208054610b7d906130d5565b80601f0160208091040260200160405190810160405280929190818152602001828054610ba9906130d5565b8015610bf65780601f10610bcb57610100808354040283529160200191610bf6565b820191906000526020600020905b815481529060010190602001808311610bd957829003601f168201915b50505050509050600081511115610ca6576000838152600a602052604090208054610c20906130d5565b80601f0160208091040260200160405190810160405280929190818152602001828054610c4c906130d5565b8015610c995780601f10610c6e57610100808354040283529160200191610c99565b820191906000526020600020905b815481529060010190602001808311610c7c57829003601f168201915b5050505050915050919050565b610caf836121ea565b9392505050565b50919050565b60115460ff16610d045760405162461bcd60e51b815260206004820152601360248201527229b0b6329034b9903737ba1030b1ba34bb329760691b60448201526064016107ba565b600d5460008052600960205260008051602061365083398151915254610d2d9083905b906121c1565b1115610d755760405162461bcd60e51b815260206004820152601760248201527629b0b632903430b99030b63932b0b23c9032b73232b21760491b60448201526064016107ba565b60008111610dc35760405162461bcd60e51b815260206004820152601b60248201527a373ab6b132b927b32a37b5b2b7399031b0b73737ba10313290181760291b60448201526064016107ba565b6010543490610dd2908361227e565b1115610df05760405162461bcd60e51b81526004016107ba9061318d565b600f54610e0282610d27336000610752565b1115610e415760405162461bcd60e51b815260206004820152600e60248201526d22bc31b2b2b239903634b6b4ba1760911b60448201526064016107ba565b6010543490610e50908361227e565b1115610e6e5760405162461bcd60e51b81526004016107ba9061318d565b600e54811115610ec05760405162461bcd60e51b815260206004820152601e60248201527f4578636565647320706572207472616e73616374696f6e206c696d69742e000060448201526064016107ba565b60005b81811015610f3557610ee7336000846040518060200160405280600081525061228a565b60008052600960205260008051602061365083398151915254610f0a90836121c1565b6000805260096020526000805160206136508339815191525580610f2d816131d3565b915050610ec3565b5050565b8151835114610f5a5760405162461bcd60e51b81526004016107ba906131ee565b6001600160a01b038416610f805760405162461bcd60e51b81526004016107ba90613236565b610f886120af565b6001600160a01b0316856001600160a01b03161480610fae5750610fae856106f36120af565b6110155760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b60648201526084016107ba565b600061101f6120af565b905060005b84518110156111525760008582815181106110415761104161327b565b60200260200101519050600085838151811061105f5761105f61327b565b602090810291909101810151600084815280835260408082206001600160a01b038e1683529093529190912054909150818110156110af5760405162461bcd60e51b81526004016107ba90613291565b6110b982826132db565b60008085815260200190815260200160002060008c6001600160a01b03166001600160a01b03168152602001908152602001600020819055508160008085815260200190815260200160002060008b6001600160a01b03166001600160a01b03168152602001908152602001600020600082825461113791906132f2565b925050819055505050508061114b906131d3565b9050611024565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516111a292919061330a565b60405180910390a46111b881878787878761235c565b505050505050565b6111c86120af565b6001600160a01b03166111d9611874565b6001600160a01b0316146111ff5760405162461bcd60e51b81526004016107ba906130a0565b6011805460ff19811660ff90911615179055565b600061121d6120af565b6001600160a01b031661122e611874565b6001600160a01b0316146112545760405162461bcd60e51b81526004016107ba906130a0565b61125d856121cd565b156112a55760405162461bcd60e51b8152602060048201526018602482015277746f6b656e205f696420616c72656164792065786973747360401b60448201526064016107ba565b6112ad6120af565b600086815260086020526040902080546001600160a01b0319166001600160a01b0392909216919091179055825115611339576000858152600a6020908152604090912084516112ff9286019061284a565b50847f6bb7ff708619ba0610cba295a58592e0451dee2622938c8755667688daf3529b846040516113309190612a98565b60405180910390a25b6113458686868561228a565b505050600082815260096020526040902055919050565b816113656120af565b6000828152600860205260409020546001600160a01b0390811691161461139e5760405162461bcd60e51b81526004016107ba9061332f565b6000838152600a6020908152604090912083516113bd9285019061284a565b50827f6bb7ff708619ba0610cba295a58592e0451dee2622938c8755667688daf3529b836040516113ee9190612a98565b60405180910390a2505050565b6114036120af565b6001600160a01b0316611414611874565b6001600160a01b03161461143a5760405162461bcd60e51b81526004016107ba906130a0565b476000611453606461144d84600a61227e565b906124b8565b90506000611467606461144d85605561227e565b60405190915073ffe5cbcddf2bd1b4dc3c00455d4cdccf20f775879083156108fc029084906000818181858888f193505050501580156114ab573d6000803e3d6000fd5b5060405173d9cc8af4e8ac5cb5e7ddfffd138a58bac49daed59082156108fc029083906000818181858888f193505050501580156114ed573d6000803e3d6000fd5b50336108fc6115066114ff85856121c1565b86906124c4565b6040518115909202916000818181858888f1935050505015801561152e573d6000803e3d6000fd5b50505050565b601154604051630213119b60e51b815260609161010090046001600160a01b03169063426233609061156a908590600401612eb0565b600060405180830381865afa158015611587573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107e69190810190613380565b606081518351146116145760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b60648201526084016107ba565b600083516001600160401b0381111561162f5761162f612957565b604051908082528060200260200182016040528015611658578160200160208202803683370190505b50905060005b84518110156116d0576116a385828151811061167c5761167c61327b565b60200260200101518583815181106116965761169661327b565b6020026020010151610752565b8282815181106116b5576116b561327b565b60209081029190910101526116c9816131d3565b905061165e565b509392505050565b60006107e6826121cd565b6116eb6120af565b6001600160a01b03166116fc611874565b6001600160a01b0316146117225760405162461bcd60e51b81526004016107ba906130a0565b601055565b61172f6120af565b6001600160a01b0316611740611874565b6001600160a01b0316146117665760405162461bcd60e51b81526004016107ba906130a0565b600e55565b6117736120af565b6001600160a01b0316611784611874565b6001600160a01b0316146117aa5760405162461bcd60e51b81526004016107ba906130a0565b6006546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600680546001600160a01b0319169055565b826117fd6120af565b6000828152600860205260409020546001600160a01b039081169116146118365760405162461bcd60e51b81526004016107ba9061332f565b6118428585858561228a565b60008481526009602052604090205461185b90846121c1565b6000948552600960205260409094209390935550505050565b6006546001600160a01b031690565b600c8054610894906130d5565b6118986120af565b6001600160a01b03166118a9611874565b6001600160a01b0316146118cf5760405162461bcd60e51b81526004016107ba906130a0565b601180546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b6118ff6120af565b6001600160a01b0316611910611874565b6001600160a01b0316146119365760405162461bcd60e51b81526004016107ba906130a0565b6119518383836040518060200160405280600081525061228a565b60008281526009602052604090205461196a90826121c1565b600092835260096020526040909220919091555050565b816001600160a01b03166119936120af565b6001600160a01b031614156119fc5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b60648201526084016107ba565b8060016000611a096120af565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff191692151592909217909155611a4d6120af565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051611a89911515815260200190565b60405180910390a35050565b60005b8351811015611bb2576000848281518110611ab557611ab561327b565b60200260200101519050611ac76120af565b6000828152600860205260409020546001600160a01b03908116911614611b485760405162461bcd60e51b815260206004820152602f60248201527f455243313135355472616461626c652362617463684d696e743a204f4e4c595f60448201526e10d491505513d497d0531313d5d151608a1b60648201526084016107ba565b6000848381518110611b5c57611b5c61327b565b60200260200101519050611b8c8160096000858152602001908152602001600020546121c190919063ffffffff16565b600092835260096020526040909220919091555080611baa816131d3565b915050611a98565b5061152e848484846124d0565b6001600160a01b038216611c2a5760405162461bcd60e51b815260206004820152602c60248201527f455243313135355472616461626c652373657443726561746f723a20494e564160448201526b2624a22fa0a2222922a9a99760a11b60648201526084016107ba565b60005b8151811015611c71576000828281518110611c4a57611c4a61327b565b60200260200101519050611c5e8482612626565b5080611c69816131d3565b915050611c2d565b505050565b611c7e6120af565b6001600160a01b0316611c8f611874565b6001600160a01b031614611cb55760405162461bcd60e51b81526004016107ba906130a0565b600f55565b60075460405163c455279160e01b81526000916001600160a01b039081169190841690829063c455279190611cf3908890600401612eb0565b602060405180830381865afa158015611d10573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d34919061341b565b6001600160a01b03161415611d4d5760019150506107e6565b6001600160a01b0380851660009081526001602090815260408083209387168352929052205460ff165b949350505050565b6001600160a01b038416611da55760405162461bcd60e51b81526004016107ba90613236565b611dad6120af565b6001600160a01b0316856001600160a01b03161480611dd35750611dd3856106f36120af565b611e315760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b60648201526084016107ba565b6000611e3b6120af565b9050611e5c818787611e4c88612697565b611e5588612697565b5050505050565b6000848152602081815260408083206001600160a01b038a16845290915290205483811015611e9d5760405162461bcd60e51b81526004016107ba90613291565b611ea784826132db565b6000868152602081815260408083206001600160a01b038c81168552925280832093909355881681529081208054869290611ee39084906132f2565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4611f438288888888886126e2565b50505050505050565b611f546120af565b6001600160a01b0316611f65611874565b6001600160a01b031614611f8b5760405162461bcd60e51b81526004016107ba906130a0565b6001600160a01b038116611ff05760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016107ba565b6006546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600680546001600160a01b0319166001600160a01b0392909216919091179055565b6000333014156120a357600080368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050503601516001600160a01b031691506120a69050565b50335b90565b3b151590565b60006120b961204c565b905090565b8051610f3590600290602084019061284a565b60006001600160a01b0386166121375760405162461bcd60e51b815260206004820152602560248201527f4e61746976654d6574615472616e73616374696f6e3a20494e56414c49445f5360448201526424a3a722a960d91b60648201526084016107ba565b600161214a6121458761279d565b61281a565b6040805160008152602081018083529290925260ff851690820152606081018690526080810185905260a0016020604051602081039080840390855afa158015612198573d6000803e3d6000fd5b505050602060405103516001600160a01b0316866001600160a01b031614905095945050505050565b6000610caf82846132f2565b6000908152600860205260409020546001600160a01b0316151590565b6060600280546121f9906130d5565b80601f0160208091040260200160405190810160405280929190818152602001828054612225906130d5565b80156122725780601f1061224757610100808354040283529160200191612272565b820191906000526020600020905b81548152906001019060200180831161225557829003601f168201915b50505050509050919050565b6000610caf8284613438565b6001600160a01b0384166122b05760405162461bcd60e51b81526004016107ba90613457565b60006122ba6120af565b90506122cc81600087611e4c88612697565b6000848152602081815260408083206001600160a01b0389168452909152812080548592906122fc9084906132f2565b909155505060408051858152602081018590526001600160a01b0380881692600092918516917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4611e55816000878787876126e2565b6001600160a01b0384163b156111b85760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906123a09089908990889088908890600401613498565b6020604051808303816000875af19250505080156123db575060408051601f3d908101601f191682019092526123d8918101906134ea565b60015b612488576123e7613507565b806308c379a0141561242157506123fc613522565b806124075750612423565b8060405162461bcd60e51b81526004016107ba9190612a98565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b60648201526084016107ba565b6001600160e01b0319811663bc197c8160e01b14611f435760405162461bcd60e51b81526004016107ba906135ab565b6000610caf82846135f3565b6000610caf82846132db565b6001600160a01b0384166124f65760405162461bcd60e51b81526004016107ba90613457565b81518351146125175760405162461bcd60e51b81526004016107ba906131ee565b60006125216120af565b905060005b84518110156125be578381815181106125415761254161327b565b602002602001015160008087848151811061255e5761255e61327b565b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b0316815260200190815260200160002060008282546125a691906132f2565b909155508190506125b6816131d3565b915050612526565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb878760405161260f92919061330a565b60405180910390a4611e558160008787878761235c565b8061262f6120af565b6000828152600860205260409020546001600160a01b039081169116146126685760405162461bcd60e51b81526004016107ba9061332f565b50600090815260086020526040902080546001600160a01b0319166001600160a01b0392909216919091179055565b604080516001808252818301909252606091600091906020808301908036833701905050905082816000815181106126d1576126d161327b565b602090810291909101015292915050565b6001600160a01b0384163b156111b85760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906127269089908990889088908890600401613615565b6020604051808303816000875af1925050508015612761575060408051601f3d908101601f1916820190925261275e918101906134ea565b60015b61276d576123e7613507565b6001600160e01b0319811663f23a6e6160e01b14611f435760405162461bcd60e51b81526004016107ba906135ab565b600060405180608001604052806043815260200161367060439139805160209182012083518483015160408087015180519086012090516127fd950193845260208401929092526001600160a01b03166040830152606082015260800190565b604051602081830303815290604052805190602001209050919050565b600061282560045490565b60405161190160f01b60208201526022810191909152604281018390526062016127fd565b828054612856906130d5565b90600052602060002090601f01602090048101928261287857600085556128be565b82601f1061289157805160ff19168380011785556128be565b828001600101855582156128be579182015b828111156128be5782518255916020019190600101906128a3565b506128ca9291506128ce565b5090565b5b808211156128ca57600081556001016128cf565b6001600160a01b038116811461088457600080fd5b6000806040838503121561290b57600080fd5b8235612916816128e3565b946020939093013593505050565b6001600160e01b03198116811461088457600080fd5b60006020828403121561294c57600080fd5b8135610caf81612924565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b038111828210171561299257612992612957565b6040525050565b600082601f8301126129aa57600080fd5b81356001600160401b038111156129c3576129c3612957565b6040516129da601f8301601f19166020018261296d565b8181528460208386010111156129ef57600080fd5b816020850160208301376000918101602001919091529392505050565b600060208284031215612a1e57600080fd5b81356001600160401b03811115612a3457600080fd5b611d7784828501612999565b60005b83811015612a5b578181015183820152602001612a43565b8381111561152e5750506000910152565b60008151808452612a84816020860160208601612a40565b601f01601f19169290920160200192915050565b602081526000610caf6020830184612a6c565b600080600080600060a08688031215612ac357600080fd5b8535612ace816128e3565b945060208601356001600160401b03811115612ae957600080fd5b612af588828901612999565b9450506040860135925060608601359150608086013560ff81168114612b1a57600080fd5b809150509295509295909350565b600060208284031215612b3a57600080fd5b5035919050565b600060208284031215612b5357600080fd5b8135610caf816128e3565b60006001600160401b03821115612b7757612b77612957565b5060051b60200190565b600082601f830112612b9257600080fd5b81356020612b9f82612b5e565b604051612bac828261296d565b83815260059390931b8501820192828101915086841115612bcc57600080fd5b8286015b84811015612be75780358352918301918301612bd0565b509695505050505050565b600080600080600060a08688031215612c0a57600080fd5b8535612c15816128e3565b94506020860135612c25816128e3565b935060408601356001600160401b0380821115612c4157600080fd5b612c4d89838a01612b81565b94506060880135915080821115612c6357600080fd5b612c6f89838a01612b81565b93506080880135915080821115612c8557600080fd5b50612c9288828901612999565b9150509295509295909350565b600080600080600060a08688031215612cb757600080fd5b8535612cc2816128e3565b9450602086013593506040860135925060608601356001600160401b0380821115612cec57600080fd5b612c6f89838a01612999565b60008060408385031215612d0b57600080fd5b8235915060208301356001600160401b03811115612d2857600080fd5b612d3485828601612999565b9150509250929050565b600081518084526020808501945080840160005b83811015612d6e57815187529582019590820190600101612d52565b509495945050505050565b602081526000610caf6020830184612d3e565b60008060408385031215612d9f57600080fd5b82356001600160401b0380821115612db657600080fd5b818501915085601f830112612dca57600080fd5b81356020612dd782612b5e565b604051612de4828261296d565b83815260059390931b8501820192828101915089841115612e0457600080fd5b948201945b83861015612e2b578535612e1c816128e3565b82529482019490820190612e09565b96505086013592505080821115612e4157600080fd5b50612d3485828601612b81565b60008060008060808587031215612e6457600080fd5b8435612e6f816128e3565b9350602085013592506040850135915060608501356001600160401b03811115612e9857600080fd5b612ea487828801612999565b91505092959194509250565b6001600160a01b0391909116815260200190565b600080600060608486031215612ed957600080fd5b8335612ee4816128e3565b95602085013595506040909401359392505050565b60008060408385031215612f0c57600080fd5b8235612f17816128e3565b915060208301358015158114612f2c57600080fd5b809150509250929050565b60008060008060808587031215612f4d57600080fd5b8435612f58816128e3565b935060208501356001600160401b0380821115612f7457600080fd5b612f8088838901612b81565b94506040870135915080821115612f9657600080fd5b612fa288838901612b81565b93506060870135915080821115612fb857600080fd5b50612ea487828801612999565b60008060408385031215612fd857600080fd5b8235612fe3816128e3565b915060208301356001600160401b03811115612ffe57600080fd5b612d3485828601612b81565b6000806040838503121561301d57600080fd5b8235613028816128e3565b91506020830135612f2c816128e3565b600080600080600060a0868803121561305057600080fd5b853561305b816128e3565b9450602086013561306b816128e3565b9350604086013592506060860135915060808601356001600160401b0381111561309457600080fd5b612c9288828901612999565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600181811c908216806130e957607f821691505b60208210811415610cb657634e487b7160e01b600052602260045260246000fd5b6001600160a01b0384811682528316602082015260606040820181905260009061313690830184612a6c565b95945050505050565b60008351613151818460208801612a40565b60609390931b6001600160601b0319169190920190815260140192915050565b60008251613183818460208701612a40565b9190910192915050565b60208082526016908201527522aa241039b2b73a1034b99034b731b7b93932b1ba1760511b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b60006000198214156131e7576131e76131bd565b5060010190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6000828210156132ed576132ed6131bd565b500390565b60008219821115613305576133056131bd565b500190565b60408152600061331d6040830185612d3e565b82810360208401526131368185612d3e565b60208082526031908201527f455243313135355472616461626c652363726561746f724f6e6c793a204f4e4c6040820152701657d0d491505513d497d0531313d5d151607a1b606082015260800190565b6000602080838503121561339357600080fd5b82516001600160401b038111156133a957600080fd5b8301601f810185136133ba57600080fd5b80516133c581612b5e565b6040516133d2828261296d565b82815260059290921b83018401918481019150878311156133f257600080fd5b928401925b82841015613410578351825292840192908401906133f7565b979650505050505050565b60006020828403121561342d57600080fd5b8151610caf816128e3565b6000816000190483118215151615613452576134526131bd565b500290565b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b6001600160a01b0386811682528516602082015260a0604082018190526000906134c490830186612d3e565b82810360608401526134d68186612d3e565b90508281036080840152610af28185612a6c565b6000602082840312156134fc57600080fd5b8151610caf81612924565b600060033d11156120a65760046000803e5060005160e01c90565b600060443d10156135305790565b6040516003193d81016004833e81513d6001600160401b03816024840111818411171561355f57505050505090565b82850191508151818111156135775750505050505090565b843d87010160208285010111156135915750505050505090565b6135a06020828601018761296d565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b60008261361057634e487b7160e01b600052601260045260246000fd5b500490565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061341090830184612a6c56feec8156718a8372b1db44bb411437d0870f3e3790d4a08526d024ce1b0b668f6b4d6574615472616e73616374696f6e2875696e74323536206e6f6e63652c616464726573732066726f6d2c62797465732066756e6374696f6e5369676e617475726529a26469706673582212209c6c93402d4581b2e6e9fac1cec0ea20653e85ca8e5cc2be71b1ace819e388ba64736f6c634300080a0033454950373132446f6d61696e28737472696e67206e616d652c737472696e672076657273696f6e2c6164647265737320766572696679696e67436f6e74726163742c627974657333322073616c742968747470733a2f2f73616d6f74636c75622e6d7970696e6174612e636c6f75642f697066732f516d54536a5a706268366358395a6857703377323152365a4d645065427a466461384364687472675278504a7453000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c1000000000000000000000000000000000000000000000000000000000000001153616d6f7420476f6c64656e20436f696e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000035347430000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005468747470733a2f2f73616d6f74636c75622e6d7970696e6174612e636c6f75642f697066732f516d54536a5a706268366358395a6857703377323152365a4d645065427a466461384364687472675278504a7453000000000000000000000000

Deployed Bytecode

0x6080604052600436106101fb5760003560e01c80634f558e79116101145780634f558e79146104a8578063550b47b8146104c85780637084b2b7146104e8578063715018a614610508578063731133e91461051d5780638da5cb5b1461053d57806395d89b411461055f5780639dd373b9146105745780639e29dd3614610594578063a22cb465146105b4578063ad0f2916146105d4578063b48ab8b6146105ea578063bd85b0391461060a578063c2a2ffec14610637578063cd53d08e1461064c578063d2a6b51a14610682578063d5abeb01146106a2578063e268e4d3146106b8578063e985e9c5146106d8578063eb8d2444146106f8578063f242432a14610712578063f2fde38b1461073257600080fd5b8062fdd58e1461020057806301ffc9a71461023357806302fe53051461026357806306fdde03146102855780630ba133c5146102a75780630c53c51c146102bd5780630e89341c146102d05780630f7e5970146102f05780631bb959911461031d57806320379ee5146103305780632693ebf2146103455780632d0335ab146103725780632eb2c2d6146103a85780633408e470146103c857806334918dfd146103db57806336a100d5146103f05780633adf80b4146104105780633ccfd60b146104305780634262336014610445578063453c2310146104725780634e1273f414610488575b600080fd5b34801561020c57600080fd5b5061022061021b3660046128f8565b610752565b6040519081526020015b60405180910390f35b34801561023f57600080fd5b5061025361024e36600461293a565b6107ec565b604051901515815260200161022a565b34801561026f57600080fd5b5061028361027e366004612a0c565b61083c565b005b34801561029157600080fd5b5061029a610887565b60405161022a9190612a98565b3480156102b357600080fd5b50610220600e5481565b61029a6102cb366004612aab565b610915565b3480156102dc57600080fd5b5061029a6102eb366004612b28565b610afe565b3480156102fc57600080fd5b5061029a604051806040016040528060018152602001603160f81b81525081565b61028361032b366004612b28565b610cbc565b34801561033c57600080fd5b50600454610220565b34801561035157600080fd5b50610220610360366004612b28565b60096020526000908152604090205481565b34801561037e57600080fd5b5061022061038d366004612b41565b6001600160a01b031660009081526005602052604090205490565b3480156103b457600080fd5b506102836103c3366004612bf2565b610f39565b3480156103d457600080fd5b5046610220565b3480156103e757600080fd5b506102836111c0565b3480156103fc57600080fd5b5061022061040b366004612c9f565b611213565b34801561041c57600080fd5b5061028361042b366004612cf8565b61135c565b34801561043c57600080fd5b506102836113fb565b34801561045157600080fd5b50610465610460366004612b41565b611534565b60405161022a9190612d79565b34801561047e57600080fd5b50610220600f5481565b34801561049457600080fd5b506104656104a3366004612d8c565b6115af565b3480156104b457600080fd5b506102536104c3366004612b28565b6116d8565b3480156104d457600080fd5b506102836104e3366004612b28565b6116e3565b3480156104f457600080fd5b50610283610503366004612b28565b611727565b34801561051457600080fd5b5061028361176b565b34801561052957600080fd5b50610283610538366004612e4e565b6117f4565b34801561054957600080fd5b50610552611874565b60405161022a9190612eb0565b34801561056b57600080fd5b5061029a611883565b34801561058057600080fd5b5061028361058f366004612b41565b611890565b3480156105a057600080fd5b506102836105af366004612ec4565b6118f7565b3480156105c057600080fd5b506102836105cf366004612ef9565b611981565b3480156105e057600080fd5b5061022060105481565b3480156105f657600080fd5b50610283610605366004612f37565b611a95565b34801561061657600080fd5b50610220610625366004612b28565b60009081526009602052604090205490565b34801561064357600080fd5b50610220600081565b34801561065857600080fd5b50610552610667366004612b28565b6008602052600090815260409020546001600160a01b031681565b34801561068e57600080fd5b5061028361069d366004612fc5565b611bbf565b3480156106ae57600080fd5b50610220600d5481565b3480156106c457600080fd5b506102836106d3366004612b28565b611c76565b3480156106e457600080fd5b506102536106f336600461300a565b611cba565b34801561070457600080fd5b506011546102539060ff1681565b34801561071e57600080fd5b5061028361072d366004613038565b611d7f565b34801561073e57600080fd5b5061028361074d366004612b41565b611f4c565b60006001600160a01b0383166107c35760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084015b60405180910390fd5b506000818152602081815260408083206001600160a01b03861684529091529020545b92915050565b60006001600160e01b03198216636cdb3d1360e11b148061081d57506001600160e01b031982166303a24d0760e21b145b806107e657506301ffc9a760e01b6001600160e01b03198316146107e6565b6108446120af565b6001600160a01b0316610855611874565b6001600160a01b03161461087b5760405162461bcd60e51b81526004016107ba906130a0565b610884816120be565b50565b600b8054610894906130d5565b80601f01602080910402602001604051908101604052809291908181526020018280546108c0906130d5565b801561090d5780601f106108e25761010080835404028352916020019161090d565b820191906000526020600020905b8154815290600101906020018083116108f057829003601f168201915b505050505081565b60408051606081810183526001600160a01b0388166000818152600560209081529085902054845283015291810186905261095387828787876120d1565b6109a95760405162461bcd60e51b815260206004820152602160248201527f5369676e657220616e64207369676e617475726520646f206e6f74206d6174636044820152600d60fb1b60648201526084016107ba565b6001600160a01b0387166000908152600560205260409020546109cd9060016121c1565b6001600160a01b0388166000908152600560205260409081902091909155517f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b90610a1d90899033908a9061310a565b60405180910390a1600080306001600160a01b0316888a604051602001610a4592919061313f565b60408051601f1981840301815290829052610a5f91613171565b6000604051808303816000865af19150503d8060008114610a9c576040519150601f19603f3d011682016040523d82523d6000602084013e610aa1565b606091505b509150915081610af25760405162461bcd60e51b815260206004820152601c60248201527b119d5b98dd1a5bdb8818d85b1b081b9bdd081cdd58d8d95cdcd99d5b60221b60448201526064016107ba565b98975050505050505050565b6060610b09826121cd565b610b645760405162461bcd60e51b815260206004820152602660248201527f455243313135355472616461626c65237572693a204e4f4e4558495354454e546044820152652faa27a5a2a760d11b60648201526084016107ba565b6000828152600a602052604081208054610b7d906130d5565b80601f0160208091040260200160405190810160405280929190818152602001828054610ba9906130d5565b8015610bf65780601f10610bcb57610100808354040283529160200191610bf6565b820191906000526020600020905b815481529060010190602001808311610bd957829003601f168201915b50505050509050600081511115610ca6576000838152600a602052604090208054610c20906130d5565b80601f0160208091040260200160405190810160405280929190818152602001828054610c4c906130d5565b8015610c995780601f10610c6e57610100808354040283529160200191610c99565b820191906000526020600020905b815481529060010190602001808311610c7c57829003601f168201915b5050505050915050919050565b610caf836121ea565b9392505050565b50919050565b60115460ff16610d045760405162461bcd60e51b815260206004820152601360248201527229b0b6329034b9903737ba1030b1ba34bb329760691b60448201526064016107ba565b600d5460008052600960205260008051602061365083398151915254610d2d9083905b906121c1565b1115610d755760405162461bcd60e51b815260206004820152601760248201527629b0b632903430b99030b63932b0b23c9032b73232b21760491b60448201526064016107ba565b60008111610dc35760405162461bcd60e51b815260206004820152601b60248201527a373ab6b132b927b32a37b5b2b7399031b0b73737ba10313290181760291b60448201526064016107ba565b6010543490610dd2908361227e565b1115610df05760405162461bcd60e51b81526004016107ba9061318d565b600f54610e0282610d27336000610752565b1115610e415760405162461bcd60e51b815260206004820152600e60248201526d22bc31b2b2b239903634b6b4ba1760911b60448201526064016107ba565b6010543490610e50908361227e565b1115610e6e5760405162461bcd60e51b81526004016107ba9061318d565b600e54811115610ec05760405162461bcd60e51b815260206004820152601e60248201527f4578636565647320706572207472616e73616374696f6e206c696d69742e000060448201526064016107ba565b60005b81811015610f3557610ee7336000846040518060200160405280600081525061228a565b60008052600960205260008051602061365083398151915254610f0a90836121c1565b6000805260096020526000805160206136508339815191525580610f2d816131d3565b915050610ec3565b5050565b8151835114610f5a5760405162461bcd60e51b81526004016107ba906131ee565b6001600160a01b038416610f805760405162461bcd60e51b81526004016107ba90613236565b610f886120af565b6001600160a01b0316856001600160a01b03161480610fae5750610fae856106f36120af565b6110155760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b60648201526084016107ba565b600061101f6120af565b905060005b84518110156111525760008582815181106110415761104161327b565b60200260200101519050600085838151811061105f5761105f61327b565b602090810291909101810151600084815280835260408082206001600160a01b038e1683529093529190912054909150818110156110af5760405162461bcd60e51b81526004016107ba90613291565b6110b982826132db565b60008085815260200190815260200160002060008c6001600160a01b03166001600160a01b03168152602001908152602001600020819055508160008085815260200190815260200160002060008b6001600160a01b03166001600160a01b03168152602001908152602001600020600082825461113791906132f2565b925050819055505050508061114b906131d3565b9050611024565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516111a292919061330a565b60405180910390a46111b881878787878761235c565b505050505050565b6111c86120af565b6001600160a01b03166111d9611874565b6001600160a01b0316146111ff5760405162461bcd60e51b81526004016107ba906130a0565b6011805460ff19811660ff90911615179055565b600061121d6120af565b6001600160a01b031661122e611874565b6001600160a01b0316146112545760405162461bcd60e51b81526004016107ba906130a0565b61125d856121cd565b156112a55760405162461bcd60e51b8152602060048201526018602482015277746f6b656e205f696420616c72656164792065786973747360401b60448201526064016107ba565b6112ad6120af565b600086815260086020526040902080546001600160a01b0319166001600160a01b0392909216919091179055825115611339576000858152600a6020908152604090912084516112ff9286019061284a565b50847f6bb7ff708619ba0610cba295a58592e0451dee2622938c8755667688daf3529b846040516113309190612a98565b60405180910390a25b6113458686868561228a565b505050600082815260096020526040902055919050565b816113656120af565b6000828152600860205260409020546001600160a01b0390811691161461139e5760405162461bcd60e51b81526004016107ba9061332f565b6000838152600a6020908152604090912083516113bd9285019061284a565b50827f6bb7ff708619ba0610cba295a58592e0451dee2622938c8755667688daf3529b836040516113ee9190612a98565b60405180910390a2505050565b6114036120af565b6001600160a01b0316611414611874565b6001600160a01b03161461143a5760405162461bcd60e51b81526004016107ba906130a0565b476000611453606461144d84600a61227e565b906124b8565b90506000611467606461144d85605561227e565b60405190915073ffe5cbcddf2bd1b4dc3c00455d4cdccf20f775879083156108fc029084906000818181858888f193505050501580156114ab573d6000803e3d6000fd5b5060405173d9cc8af4e8ac5cb5e7ddfffd138a58bac49daed59082156108fc029083906000818181858888f193505050501580156114ed573d6000803e3d6000fd5b50336108fc6115066114ff85856121c1565b86906124c4565b6040518115909202916000818181858888f1935050505015801561152e573d6000803e3d6000fd5b50505050565b601154604051630213119b60e51b815260609161010090046001600160a01b03169063426233609061156a908590600401612eb0565b600060405180830381865afa158015611587573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107e69190810190613380565b606081518351146116145760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b60648201526084016107ba565b600083516001600160401b0381111561162f5761162f612957565b604051908082528060200260200182016040528015611658578160200160208202803683370190505b50905060005b84518110156116d0576116a385828151811061167c5761167c61327b565b60200260200101518583815181106116965761169661327b565b6020026020010151610752565b8282815181106116b5576116b561327b565b60209081029190910101526116c9816131d3565b905061165e565b509392505050565b60006107e6826121cd565b6116eb6120af565b6001600160a01b03166116fc611874565b6001600160a01b0316146117225760405162461bcd60e51b81526004016107ba906130a0565b601055565b61172f6120af565b6001600160a01b0316611740611874565b6001600160a01b0316146117665760405162461bcd60e51b81526004016107ba906130a0565b600e55565b6117736120af565b6001600160a01b0316611784611874565b6001600160a01b0316146117aa5760405162461bcd60e51b81526004016107ba906130a0565b6006546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600680546001600160a01b0319169055565b826117fd6120af565b6000828152600860205260409020546001600160a01b039081169116146118365760405162461bcd60e51b81526004016107ba9061332f565b6118428585858561228a565b60008481526009602052604090205461185b90846121c1565b6000948552600960205260409094209390935550505050565b6006546001600160a01b031690565b600c8054610894906130d5565b6118986120af565b6001600160a01b03166118a9611874565b6001600160a01b0316146118cf5760405162461bcd60e51b81526004016107ba906130a0565b601180546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b6118ff6120af565b6001600160a01b0316611910611874565b6001600160a01b0316146119365760405162461bcd60e51b81526004016107ba906130a0565b6119518383836040518060200160405280600081525061228a565b60008281526009602052604090205461196a90826121c1565b600092835260096020526040909220919091555050565b816001600160a01b03166119936120af565b6001600160a01b031614156119fc5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b60648201526084016107ba565b8060016000611a096120af565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff191692151592909217909155611a4d6120af565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051611a89911515815260200190565b60405180910390a35050565b60005b8351811015611bb2576000848281518110611ab557611ab561327b565b60200260200101519050611ac76120af565b6000828152600860205260409020546001600160a01b03908116911614611b485760405162461bcd60e51b815260206004820152602f60248201527f455243313135355472616461626c652362617463684d696e743a204f4e4c595f60448201526e10d491505513d497d0531313d5d151608a1b60648201526084016107ba565b6000848381518110611b5c57611b5c61327b565b60200260200101519050611b8c8160096000858152602001908152602001600020546121c190919063ffffffff16565b600092835260096020526040909220919091555080611baa816131d3565b915050611a98565b5061152e848484846124d0565b6001600160a01b038216611c2a5760405162461bcd60e51b815260206004820152602c60248201527f455243313135355472616461626c652373657443726561746f723a20494e564160448201526b2624a22fa0a2222922a9a99760a11b60648201526084016107ba565b60005b8151811015611c71576000828281518110611c4a57611c4a61327b565b60200260200101519050611c5e8482612626565b5080611c69816131d3565b915050611c2d565b505050565b611c7e6120af565b6001600160a01b0316611c8f611874565b6001600160a01b031614611cb55760405162461bcd60e51b81526004016107ba906130a0565b600f55565b60075460405163c455279160e01b81526000916001600160a01b039081169190841690829063c455279190611cf3908890600401612eb0565b602060405180830381865afa158015611d10573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d34919061341b565b6001600160a01b03161415611d4d5760019150506107e6565b6001600160a01b0380851660009081526001602090815260408083209387168352929052205460ff165b949350505050565b6001600160a01b038416611da55760405162461bcd60e51b81526004016107ba90613236565b611dad6120af565b6001600160a01b0316856001600160a01b03161480611dd35750611dd3856106f36120af565b611e315760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b60648201526084016107ba565b6000611e3b6120af565b9050611e5c818787611e4c88612697565b611e5588612697565b5050505050565b6000848152602081815260408083206001600160a01b038a16845290915290205483811015611e9d5760405162461bcd60e51b81526004016107ba90613291565b611ea784826132db565b6000868152602081815260408083206001600160a01b038c81168552925280832093909355881681529081208054869290611ee39084906132f2565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4611f438288888888886126e2565b50505050505050565b611f546120af565b6001600160a01b0316611f65611874565b6001600160a01b031614611f8b5760405162461bcd60e51b81526004016107ba906130a0565b6001600160a01b038116611ff05760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016107ba565b6006546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600680546001600160a01b0319166001600160a01b0392909216919091179055565b6000333014156120a357600080368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050503601516001600160a01b031691506120a69050565b50335b90565b3b151590565b60006120b961204c565b905090565b8051610f3590600290602084019061284a565b60006001600160a01b0386166121375760405162461bcd60e51b815260206004820152602560248201527f4e61746976654d6574615472616e73616374696f6e3a20494e56414c49445f5360448201526424a3a722a960d91b60648201526084016107ba565b600161214a6121458761279d565b61281a565b6040805160008152602081018083529290925260ff851690820152606081018690526080810185905260a0016020604051602081039080840390855afa158015612198573d6000803e3d6000fd5b505050602060405103516001600160a01b0316866001600160a01b031614905095945050505050565b6000610caf82846132f2565b6000908152600860205260409020546001600160a01b0316151590565b6060600280546121f9906130d5565b80601f0160208091040260200160405190810160405280929190818152602001828054612225906130d5565b80156122725780601f1061224757610100808354040283529160200191612272565b820191906000526020600020905b81548152906001019060200180831161225557829003601f168201915b50505050509050919050565b6000610caf8284613438565b6001600160a01b0384166122b05760405162461bcd60e51b81526004016107ba90613457565b60006122ba6120af565b90506122cc81600087611e4c88612697565b6000848152602081815260408083206001600160a01b0389168452909152812080548592906122fc9084906132f2565b909155505060408051858152602081018590526001600160a01b0380881692600092918516917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4611e55816000878787876126e2565b6001600160a01b0384163b156111b85760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906123a09089908990889088908890600401613498565b6020604051808303816000875af19250505080156123db575060408051601f3d908101601f191682019092526123d8918101906134ea565b60015b612488576123e7613507565b806308c379a0141561242157506123fc613522565b806124075750612423565b8060405162461bcd60e51b81526004016107ba9190612a98565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b60648201526084016107ba565b6001600160e01b0319811663bc197c8160e01b14611f435760405162461bcd60e51b81526004016107ba906135ab565b6000610caf82846135f3565b6000610caf82846132db565b6001600160a01b0384166124f65760405162461bcd60e51b81526004016107ba90613457565b81518351146125175760405162461bcd60e51b81526004016107ba906131ee565b60006125216120af565b905060005b84518110156125be578381815181106125415761254161327b565b602002602001015160008087848151811061255e5761255e61327b565b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b0316815260200190815260200160002060008282546125a691906132f2565b909155508190506125b6816131d3565b915050612526565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb878760405161260f92919061330a565b60405180910390a4611e558160008787878761235c565b8061262f6120af565b6000828152600860205260409020546001600160a01b039081169116146126685760405162461bcd60e51b81526004016107ba9061332f565b50600090815260086020526040902080546001600160a01b0319166001600160a01b0392909216919091179055565b604080516001808252818301909252606091600091906020808301908036833701905050905082816000815181106126d1576126d161327b565b602090810291909101015292915050565b6001600160a01b0384163b156111b85760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906127269089908990889088908890600401613615565b6020604051808303816000875af1925050508015612761575060408051601f3d908101601f1916820190925261275e918101906134ea565b60015b61276d576123e7613507565b6001600160e01b0319811663f23a6e6160e01b14611f435760405162461bcd60e51b81526004016107ba906135ab565b600060405180608001604052806043815260200161367060439139805160209182012083518483015160408087015180519086012090516127fd950193845260208401929092526001600160a01b03166040830152606082015260800190565b604051602081830303815290604052805190602001209050919050565b600061282560045490565b60405161190160f01b60208201526022810191909152604281018390526062016127fd565b828054612856906130d5565b90600052602060002090601f01602090048101928261287857600085556128be565b82601f1061289157805160ff19168380011785556128be565b828001600101855582156128be579182015b828111156128be5782518255916020019190600101906128a3565b506128ca9291506128ce565b5090565b5b808211156128ca57600081556001016128cf565b6001600160a01b038116811461088457600080fd5b6000806040838503121561290b57600080fd5b8235612916816128e3565b946020939093013593505050565b6001600160e01b03198116811461088457600080fd5b60006020828403121561294c57600080fd5b8135610caf81612924565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b038111828210171561299257612992612957565b6040525050565b600082601f8301126129aa57600080fd5b81356001600160401b038111156129c3576129c3612957565b6040516129da601f8301601f19166020018261296d565b8181528460208386010111156129ef57600080fd5b816020850160208301376000918101602001919091529392505050565b600060208284031215612a1e57600080fd5b81356001600160401b03811115612a3457600080fd5b611d7784828501612999565b60005b83811015612a5b578181015183820152602001612a43565b8381111561152e5750506000910152565b60008151808452612a84816020860160208601612a40565b601f01601f19169290920160200192915050565b602081526000610caf6020830184612a6c565b600080600080600060a08688031215612ac357600080fd5b8535612ace816128e3565b945060208601356001600160401b03811115612ae957600080fd5b612af588828901612999565b9450506040860135925060608601359150608086013560ff81168114612b1a57600080fd5b809150509295509295909350565b600060208284031215612b3a57600080fd5b5035919050565b600060208284031215612b5357600080fd5b8135610caf816128e3565b60006001600160401b03821115612b7757612b77612957565b5060051b60200190565b600082601f830112612b9257600080fd5b81356020612b9f82612b5e565b604051612bac828261296d565b83815260059390931b8501820192828101915086841115612bcc57600080fd5b8286015b84811015612be75780358352918301918301612bd0565b509695505050505050565b600080600080600060a08688031215612c0a57600080fd5b8535612c15816128e3565b94506020860135612c25816128e3565b935060408601356001600160401b0380821115612c4157600080fd5b612c4d89838a01612b81565b94506060880135915080821115612c6357600080fd5b612c6f89838a01612b81565b93506080880135915080821115612c8557600080fd5b50612c9288828901612999565b9150509295509295909350565b600080600080600060a08688031215612cb757600080fd5b8535612cc2816128e3565b9450602086013593506040860135925060608601356001600160401b0380821115612cec57600080fd5b612c6f89838a01612999565b60008060408385031215612d0b57600080fd5b8235915060208301356001600160401b03811115612d2857600080fd5b612d3485828601612999565b9150509250929050565b600081518084526020808501945080840160005b83811015612d6e57815187529582019590820190600101612d52565b509495945050505050565b602081526000610caf6020830184612d3e565b60008060408385031215612d9f57600080fd5b82356001600160401b0380821115612db657600080fd5b818501915085601f830112612dca57600080fd5b81356020612dd782612b5e565b604051612de4828261296d565b83815260059390931b8501820192828101915089841115612e0457600080fd5b948201945b83861015612e2b578535612e1c816128e3565b82529482019490820190612e09565b96505086013592505080821115612e4157600080fd5b50612d3485828601612b81565b60008060008060808587031215612e6457600080fd5b8435612e6f816128e3565b9350602085013592506040850135915060608501356001600160401b03811115612e9857600080fd5b612ea487828801612999565b91505092959194509250565b6001600160a01b0391909116815260200190565b600080600060608486031215612ed957600080fd5b8335612ee4816128e3565b95602085013595506040909401359392505050565b60008060408385031215612f0c57600080fd5b8235612f17816128e3565b915060208301358015158114612f2c57600080fd5b809150509250929050565b60008060008060808587031215612f4d57600080fd5b8435612f58816128e3565b935060208501356001600160401b0380821115612f7457600080fd5b612f8088838901612b81565b94506040870135915080821115612f9657600080fd5b612fa288838901612b81565b93506060870135915080821115612fb857600080fd5b50612ea487828801612999565b60008060408385031215612fd857600080fd5b8235612fe3816128e3565b915060208301356001600160401b03811115612ffe57600080fd5b612d3485828601612b81565b6000806040838503121561301d57600080fd5b8235613028816128e3565b91506020830135612f2c816128e3565b600080600080600060a0868803121561305057600080fd5b853561305b816128e3565b9450602086013561306b816128e3565b9350604086013592506060860135915060808601356001600160401b0381111561309457600080fd5b612c9288828901612999565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600181811c908216806130e957607f821691505b60208210811415610cb657634e487b7160e01b600052602260045260246000fd5b6001600160a01b0384811682528316602082015260606040820181905260009061313690830184612a6c565b95945050505050565b60008351613151818460208801612a40565b60609390931b6001600160601b0319169190920190815260140192915050565b60008251613183818460208701612a40565b9190910192915050565b60208082526016908201527522aa241039b2b73a1034b99034b731b7b93932b1ba1760511b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b60006000198214156131e7576131e76131bd565b5060010190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6000828210156132ed576132ed6131bd565b500390565b60008219821115613305576133056131bd565b500190565b60408152600061331d6040830185612d3e565b82810360208401526131368185612d3e565b60208082526031908201527f455243313135355472616461626c652363726561746f724f6e6c793a204f4e4c6040820152701657d0d491505513d497d0531313d5d151607a1b606082015260800190565b6000602080838503121561339357600080fd5b82516001600160401b038111156133a957600080fd5b8301601f810185136133ba57600080fd5b80516133c581612b5e565b6040516133d2828261296d565b82815260059290921b83018401918481019150878311156133f257600080fd5b928401925b82841015613410578351825292840192908401906133f7565b979650505050505050565b60006020828403121561342d57600080fd5b8151610caf816128e3565b6000816000190483118215151615613452576134526131bd565b500290565b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b6001600160a01b0386811682528516602082015260a0604082018190526000906134c490830186612d3e565b82810360608401526134d68186612d3e565b90508281036080840152610af28185612a6c565b6000602082840312156134fc57600080fd5b8151610caf81612924565b600060033d11156120a65760046000803e5060005160e01c90565b600060443d10156135305790565b6040516003193d81016004833e81513d6001600160401b03816024840111818411171561355f57505050505090565b82850191508151818111156135775750505050505090565b843d87010160208285010111156135915750505050505090565b6135a06020828601018761296d565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b60008261361057634e487b7160e01b600052601260045260246000fd5b500490565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061341090830184612a6c56feec8156718a8372b1db44bb411437d0870f3e3790d4a08526d024ce1b0b668f6b4d6574615472616e73616374696f6e2875696e74323536206e6f6e63652c616464726573732066726f6d2c62797465732066756e6374696f6e5369676e617475726529a26469706673582212209c6c93402d4581b2e6e9fac1cec0ea20653e85ca8e5cc2be71b1ace819e388ba64736f6c634300080a0033

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

000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c1000000000000000000000000000000000000000000000000000000000000001153616d6f7420476f6c64656e20436f696e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000035347430000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005468747470733a2f2f73616d6f74636c75622e6d7970696e6174612e636c6f75642f697066732f516d54536a5a706268366358395a6857703377323152365a4d645065427a466461384364687472675278504a7453000000000000000000000000

-----Decoded View---------------
Arg [0] : _name (string): Samot Golden Coin
Arg [1] : _symbol (string): SGC
Arg [2] : _uri (string): https://samotclub.mypinata.cloud/ipfs/QmTSjZpbh6cX9ZhWp3w21R6ZMdPeBzFda8CdhtrgRxPJtS
Arg [3] : _proxyRegistryAddress (address): 0xa5409ec958C83C3f309868babACA7c86DCB077c1

-----Encoded View---------------
12 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [3] : 000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c1
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000011
Arg [5] : 53616d6f7420476f6c64656e20436f696e000000000000000000000000000000
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [7] : 5347430000000000000000000000000000000000000000000000000000000000
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000054
Arg [9] : 68747470733a2f2f73616d6f74636c75622e6d7970696e6174612e636c6f7564
Arg [10] : 2f697066732f516d54536a5a706268366358395a6857703377323152365a4d64
Arg [11] : 5065427a466461384364687472675278504a7453000000000000000000000000


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.