ETH Price: $3,897.91 (-0.58%)
Gas: 7.72 Gwei

Contract

0x3ce0BAFFD8Edf2053dbeCDC68755911C8fBA2723
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Withdraw Fees192925632024-02-23 20:05:59295 days ago1708718759IN
0x3ce0BAFF...C8fBA2723
0 ETH0.0013708844.69367164
Buy Public175320632023-06-22 2:01:23542 days ago1687399283IN
0x3ce0BAFF...C8fBA2723
0.15 ETH0.0013253816.0927463
Buy Public175300752023-06-21 19:19:23542 days ago1687375163IN
0x3ce0BAFF...C8fBA2723
0.15 ETH0.0026488632.16236921
Buy Public171806542023-05-03 14:00:59591 days ago1683122459IN
0x3ce0BAFF...C8fBA2723
0.15 ETH0.0059582672.34504335
Buy Public170155132023-04-10 4:43:23615 days ago1681101803IN
0x3ce0BAFF...C8fBA2723
0.08 ETH0.0015069418.29727578
Buy Public170145932023-04-10 1:36:23615 days ago1681090583IN
0x3ce0BAFF...C8fBA2723
0.15 ETH0.0026042131.62023416
Buy Public170138452023-04-09 23:03:59615 days ago1681081439IN
0x3ce0BAFF...C8fBA2723
0.08 ETH0.0012718119.48871908
Buy Public170138322023-04-09 23:01:23615 days ago1681081283IN
0x3ce0BAFF...C8fBA2723
0.08 ETH0.0016395419.90734915
Buy Public170126392023-04-09 18:56:11615 days ago1681066571IN
0x3ce0BAFF...C8fBA2723
0.15 ETH0.0017468121.20971191
Buy Public170120282023-04-09 16:52:35615 days ago1681059155IN
0x3ce0BAFF...C8fBA2723
0.08 ETH0.0017822121.63964731
Buy Public170119042023-04-09 16:27:11615 days ago1681057631IN
0x3ce0BAFF...C8fBA2723
0.15 ETH0.0016702820.28059418
Buy Public170118492023-04-09 16:15:59615 days ago1681056959IN
0x3ce0BAFF...C8fBA2723
0.15 ETH0.0018669922.66896473
Buy Public170118442023-04-09 16:14:59615 days ago1681056899IN
0x3ce0BAFF...C8fBA2723
0.1 ETH0.00199324.19898054
Buy Public170118402023-04-09 16:14:11615 days ago1681056851IN
0x3ce0BAFF...C8fBA2723
0.15 ETH0.0017716921.5119112
Buy Public170116712023-04-09 15:38:59615 days ago1681054739IN
0x3ce0BAFF...C8fBA2723
0.08 ETH0.0016021219.45298532
Buy Public170116692023-04-09 15:38:35615 days ago1681054715IN
0x3ce0BAFF...C8fBA2723
0.05 ETH0.0016055719.49477346
Buy Public170115332023-04-09 15:10:47615 days ago1681053047IN
0x3ce0BAFF...C8fBA2723
0.15 ETH0.0018215822.1175706
Buy Public170115332023-04-09 15:10:47615 days ago1681053047IN
0x3ce0BAFF...C8fBA2723
0.05 ETH0.0018215822.1175706
Buy Public170114882023-04-09 15:01:47615 days ago1681052507IN
0x3ce0BAFF...C8fBA2723
0.15 ETH0.0016412419.92798026
Buy Public170114882023-04-09 15:01:47615 days ago1681052507IN
0x3ce0BAFF...C8fBA2723
0.08 ETH0.0016412419.92798026
Set Public Sale ...170114812023-04-09 15:00:23615 days ago1681052423IN
0x3ce0BAFF...C8fBA2723
0 ETH0.0033104470.25112093
Buy Presale170113512023-04-09 14:32:35615 days ago1681050755IN
0x3ce0BAFF...C8fBA2723
0.08 ETH0.0031842830.87136378
Buy Presale170113492023-04-09 14:32:11615 days ago1681050731IN
0x3ce0BAFF...C8fBA2723
0.15 ETH0.0021579120.92073395
Buy Presale170113462023-04-09 14:31:35615 days ago1681050695IN
0x3ce0BAFF...C8fBA2723
0.08 ETH0.0022955422.25765029
Buy Presale170113432023-04-09 14:30:59615 days ago1681050659IN
0x3ce0BAFF...C8fBA2723
0.15 ETH0.0027265722.67481427
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block
From
To
192925632024-02-23 20:05:59295 days ago1708718759
0x3ce0BAFF...C8fBA2723
1.214 ETH
175320632023-06-22 2:01:23542 days ago1687399283
0x3ce0BAFF...C8fBA2723
0.135 ETH
175300752023-06-21 19:19:23542 days ago1687375163
0x3ce0BAFF...C8fBA2723
0.135 ETH
171806542023-05-03 14:00:59591 days ago1683122459
0x3ce0BAFF...C8fBA2723
0.135 ETH
170155132023-04-10 4:43:23615 days ago1681101803
0x3ce0BAFF...C8fBA2723
0.072 ETH
170145932023-04-10 1:36:23615 days ago1681090583
0x3ce0BAFF...C8fBA2723
0.135 ETH
170138452023-04-09 23:03:59615 days ago1681081439
0x3ce0BAFF...C8fBA2723
0.072 ETH
170138322023-04-09 23:01:23615 days ago1681081283
0x3ce0BAFF...C8fBA2723
0.072 ETH
170126392023-04-09 18:56:11615 days ago1681066571
0x3ce0BAFF...C8fBA2723
0.135 ETH
170120282023-04-09 16:52:35615 days ago1681059155
0x3ce0BAFF...C8fBA2723
0.072 ETH
170119042023-04-09 16:27:11615 days ago1681057631
0x3ce0BAFF...C8fBA2723
0.135 ETH
170118492023-04-09 16:15:59615 days ago1681056959
0x3ce0BAFF...C8fBA2723
0.135 ETH
170118442023-04-09 16:14:59615 days ago1681056899
0x3ce0BAFF...C8fBA2723
0.09 ETH
170118402023-04-09 16:14:11615 days ago1681056851
0x3ce0BAFF...C8fBA2723
0.135 ETH
170116712023-04-09 15:38:59615 days ago1681054739
0x3ce0BAFF...C8fBA2723
0.072 ETH
170116692023-04-09 15:38:35615 days ago1681054715
0x3ce0BAFF...C8fBA2723
0.045 ETH
170115332023-04-09 15:10:47615 days ago1681053047
0x3ce0BAFF...C8fBA2723
0.135 ETH
170115332023-04-09 15:10:47615 days ago1681053047
0x3ce0BAFF...C8fBA2723
0.045 ETH
170114882023-04-09 15:01:47615 days ago1681052507
0x3ce0BAFF...C8fBA2723
0.135 ETH
170114882023-04-09 15:01:47615 days ago1681052507
0x3ce0BAFF...C8fBA2723
0.072 ETH
170113512023-04-09 14:32:35615 days ago1681050755
0x3ce0BAFF...C8fBA2723
0.072 ETH
170113492023-04-09 14:32:11615 days ago1681050731
0x3ce0BAFF...C8fBA2723
0.135 ETH
170113462023-04-09 14:31:35615 days ago1681050695
0x3ce0BAFF...C8fBA2723
0.072 ETH
170113432023-04-09 14:30:59615 days ago1681050659
0x3ce0BAFF...C8fBA2723
0.135 ETH
170113272023-04-09 14:27:35615 days ago1681050455
0x3ce0BAFF...C8fBA2723
0.072 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
StampuStore

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
No with 200 runs

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

import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";
import "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/Context.sol";
import "./Stampu.sol";

////////////////////////////////////////////////////////////////////
//  ____  _                              ____  _                  //
// / ___|| |_ __ _ _ __ ___  _ __  _   _/ ___|| |_ ___  _ __ ___  //
// \___ \| __/ _` | '_ ` _ \| '_ \| | | \___ \| __/ _ \| '__/ _ \ //
//  ___) | || (_| | | | | | | |_) | |_| |___) | || (_) | | |  __/ //
// |____/ \__\__,_|_| |_| |_| .__/ \__,_|____/ \__\___/|_|  \___| //
//                          |_|                                   //
////////////////////////////////////////////////////////////////////
contract StampuStore is Context, ERC1155Holder, Ownable {
  using ECDSA for bytes32;

  struct StampuInfo {
    uint256 price;
    address payable artist;
    uint16 tokenType;
    uint16 buyLimit; // per transaction buy limit
    uint16 presaleBalance; // balance left for presale
    uint8 platformFee; // out of 100
  }

  Stampu public stampu;
  address public whitelistAdmin;
  mapping(uint256 => StampuInfo) public tokenIdToStampuInfo;
  // Presale purchase history (address => token type => amount)
  mapping(address => mapping(uint256 => uint256)) public presaleTokenTypeHistory;
  mapping(uint256 => bool) public presaleActive;
  mapping(uint256 => bool) public publicSaleActive;

  constructor(address _stampuAddress, address _whitelistAdmin) {
    stampu = Stampu(_stampuAddress);
    whitelistAdmin = _whitelistAdmin;
  }

  function setStampuAddress(address _stampuAddress) public onlyOwner {
    stampu = Stampu(_stampuAddress);
  }

  function setWhitelistAdmin(address _whitelistAdmin) public onlyOwner {
    whitelistAdmin = _whitelistAdmin;
  }

  function addStampuInfo(uint256[] calldata tokenIds, StampuInfo[] calldata stampuInfoList) public onlyOwner {
    require(tokenIds.length == stampuInfoList.length, "StampuStore: input lengths do not match");

    for (uint256 i = 0; i < stampuInfoList.length; i++) {
      StampuInfo memory stampuInfo = stampuInfoList[i];
      require(stampuInfo.platformFee <= 100, "StampuStore: invalid platform fee");
      tokenIdToStampuInfo[tokenIds[i]] = stampuInfoList[i];
    }
  }

  function setPresaleActive(uint256[] calldata _tokenTypes, bool _active) public onlyOwner {
    for (uint256 i = 0; i < _tokenTypes.length; i++) {
      presaleActive[_tokenTypes[i]] = _active;
    }
  }

  function setPublicSaleActive(uint256[] calldata _tokenTypes, bool _active) public onlyOwner {
    for (uint256 i = 0; i < _tokenTypes.length; i++) {
      publicSaleActive[_tokenTypes[i]] = _active;
    }
  }

  function buyPresale(
    uint256 _id,
    uint256 _amount,
    uint256 _tokenTypeLimit,
    bytes memory _sig
  ) public payable {
    StampuInfo storage stampuInfo = tokenIdToStampuInfo[_id];
    uint256 tokenType = stampuInfo.tokenType;
    require(presaleActive[stampuInfo.tokenType], "StampuStore: presale is not active");
    checkWhitelisted(_id, tokenType, _tokenTypeLimit, _sig);

    require(_amount <= stampuInfo.presaleBalance, "StampuStore: insufficient balance left for presale");
    stampuInfo.presaleBalance -= uint16(_amount);

    uint256 prevAmount = presaleTokenTypeHistory[_msgSender()][stampuInfo.tokenType];
    require(prevAmount + _amount <= _tokenTypeLimit, "StampuStore: exceeds the maximum allowed amount for type");
    presaleTokenTypeHistory[_msgSender()][stampuInfo.tokenType] += _amount;

    _buy(_id, _amount);
  }

  function buyPublic(uint256 _id, uint256 _amount) public payable {
    StampuInfo storage stampuInfo = tokenIdToStampuInfo[_id];
    require(publicSaleActive[stampuInfo.tokenType], "StampuStore: public sale is not active");
    _buy(_id, _amount);
  }

  function _buy(uint256 _id, uint256 _amount) private {
    require(_amount <= tokenIdToStampuInfo[_id].buyLimit, "StampuStore: exceeds allowed buy limit");

    StampuInfo memory stampuInfo = tokenIdToStampuInfo[_id];
    require(_amount <= stampu.balanceOf(address(this), _id), "StampuStore: insufficient store balance");
    require(msg.value >= stampuInfo.price * _amount, "StampuStore: insufficient eth amount");

    uint256 artistAmount = _getArtistAmount(stampuInfo.price, _amount, stampuInfo.platformFee);
    (bool success, ) = stampuInfo.artist.call{value: artistAmount}("");
    require(success, "StampuStore: artist payment failed");
    stampu.safeTransferFrom(address(this), _msgSender(), _id, _amount, "");
  }

  function safeTransferFrom(
    address to,
    uint256 id,
    uint256 amount
  ) public onlyOwner {
    stampu.safeTransferFrom(address(this), to, id, amount, "");
  }

  function safeBatchTransferFrom(
    address to,
    uint256[] memory ids,
    uint256[] memory amounts
  ) public onlyOwner {
    stampu.safeBatchTransferFrom(address(this), to, ids, amounts, "");
  }

  function withdrawFees() public onlyOwner {
    (bool sent, ) = msg.sender.call{value: address(this).balance}("");
    require(sent, "StampuStore: failed to send collected fees");
  }

  function _getArtistAmount(
    uint256 price,
    uint256 amount,
    uint8 platformFee
  ) internal pure returns (uint256) {
    return ((price * (100 - platformFee)) / 100) * amount;
  }

  function _isWhitelisted(bytes32 _rawHash, bytes memory _sig) internal view returns (bool) {
    bytes32 msgHash = _rawHash.toEthSignedMessageHash();
    return msgHash.recover(_sig) == whitelistAdmin;
  }

  function checkWhitelisted(
    uint256 _id,
    uint256 _tokenType,
    uint256 _tokenTypeLimit,
    bytes memory _sig
  ) internal view {
    bytes32 rawHash = keccak256(abi.encodePacked(_msgSender(), _id, _tokenType, _tokenTypeLimit));
    require(_isWhitelisted(rawHash, _sig), "StampuStore: not whitelisted or invalid signature");
  }
}

File 2 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 3 of 17 : ERC1155Holder.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./ERC1155Receiver.sol";

/**
 * @dev _Available since v3.1._
 */
contract ERC1155Holder is ERC1155Receiver {
    function onERC1155Received(
        address,
        address,
        uint256,
        uint256,
        bytes memory
    ) public virtual override returns (bytes4) {
        return this.onERC1155Received.selector;
    }

    function onERC1155BatchReceived(
        address,
        address,
        uint256[] memory,
        uint256[] memory,
        bytes memory
    ) public virtual override returns (bytes4) {
        return this.onERC1155BatchReceived.selector;
    }
}

File 4 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() {
        _setOwner(_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 {
        _setOwner(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");
        _setOwner(newOwner);
    }

    function _setOwner(address newOwner) private {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

        return (signer, RecoverError.NoError);
    }

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

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

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

File 6 of 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) {
        return msg.data;
    }
}

File 7 of 17 : Stampu.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "./IERC2981.sol";

/////////////////////////////////////////////////////////////////////
//  ______     ______   ______     __    __     ______   __  __    //
// /\  ___\   /\__  _\ /\  __ \   /\ "-./  \   /\  == \ /\ \/\ \   //
// \ \___  \  \/_/\ \/ \ \  __ \  \ \ \-./\ \  \ \  _-/ \ \ \_\ \  //
//  \/\_____\    \ \_\  \ \_\ \_\  \ \_\ \ \_\  \ \_\    \ \_____\ //
//   \/_____/     \/_/   \/_/\/_/   \/_/  \/_/   \/_/     \/_____/ //
//                                                                 //
/////////////////////////////////////////////////////////////////////
contract Stampu is IERC2981, ERC1155, Ownable {
  bytes4 private constant _INTERFACE_ID_ERC2981 = 0x2a55205a;

  struct StampInfo {
    address payable artist;
    uint256 maxSupply;
    uint256 currentSupply;
    uint256 mintPrice;
    uint256 mintLimit; // mint limit per tx. 0 works as pause.
  }

  event SendPostcard(
    uint256 indexed postcardId,
    address indexed from,
    address indexed to,
    uint256 tokenId,
    string fromText,
    string toText,
    string message,
    uint256 value
  );

  using Strings for uint256;
  using Counters for Counters.Counter;
  Counters.Counter private _tokenIdCounter;
  Counters.Counter private _postcardIdCounter;
  string internal _baseURI;
  address internal _royaltyRecipient;
  uint8 internal _royaltyFee; // out of 1000

  // Contract name
  string public name;
  // Contract symbol
  string public symbol;
  mapping(uint256 => StampInfo) public tokenIdToStampInfo;

  constructor(
    string memory _name,
    string memory _symbol,
    string memory _uri,
    address royaltyRecipient,
    uint8 royaltyFee
  ) ERC1155("") {
    name = _name;
    symbol = _symbol;
    _baseURI = _uri;
    setRoyaltyRecipient(royaltyRecipient);
    setRoyaltyFee(royaltyFee);
  }

  function setURI(string memory newuri) public onlyOwner {
    _baseURI = newuri;
  }

  function uri(uint256 _id) public view override returns (string memory) {
    require(_id < _tokenIdCounter.current(), "nonexistent token");
    return string(abi.encodePacked(_baseURI, _id.toString()));
  }

  /**
   * @dev Adds new Stampus (mint is paused by default).
   */
  function addStampus(
    address payable[] calldata artists,
    uint256[] calldata maxSupplies,
    uint256[] calldata mintPrices
  ) public onlyOwner {
    require(artists.length == maxSupplies.length && artists.length == mintPrices.length, "input lengths do not match");

    for (uint256 i = 0; i < artists.length; i++) {
      uint256 tokenId = _tokenIdCounter.current();
      _tokenIdCounter.increment();
      tokenIdToStampInfo[tokenId] = StampInfo({
        artist: artists[i],
        maxSupply: maxSupplies[i],
        currentSupply: 0,
        mintPrice: mintPrices[i],
        mintLimit: 0 // paused by default. Can be unpaused through `setMintLimit`.
      });
    }
  }

  /**
   * @dev Updates artist address (in case of theft or lost wallet).
   */
  function updateArtistAddress(uint256 id, address payable artist) public onlyOwner {
    require(id < _tokenIdCounter.current(), "nonexistent token");
    require(artist != address(0), "Invalid artist address");
    StampInfo storage stampInfo = tokenIdToStampInfo[id];
    stampInfo.artist = artist;
  }

  /**
   * @dev Mints ignoring the mint limit and price (onlyOwner).
   */
  function preMint(
    address account,
    uint256 id,
    uint256 amount
  ) public onlyOwner {
    require(id < _tokenIdCounter.current(), "nonexistent token");
    StampInfo storage stampInfo = tokenIdToStampInfo[id];
    uint256 newSupply = stampInfo.currentSupply + amount;
    require(newSupply <= stampInfo.maxSupply, "exceeds max supply");
    stampInfo.currentSupply = newSupply;
    _mint(account, id, amount, "");
  }

  /**
   * @dev Mints Stampu(s).
   */
  function mint(
    address account,
    uint256 id,
    uint256 amount
  ) public payable {
    require(id < _tokenIdCounter.current(), "nonexistent token");

    StampInfo storage stampInfo = tokenIdToStampInfo[id];
    // Owner is allowed to mint even when minting is paused.
    if (owner() != _msgSender()) {
      require(amount <= stampInfo.mintLimit, "exceeds the allowed mint limit");
    }

    require(msg.value >= stampInfo.mintPrice * amount, "insufficient mint price");
    uint256 newSupply = stampInfo.currentSupply + amount;
    require(newSupply <= stampInfo.maxSupply, "exceeds max supply");
    stampInfo.currentSupply = newSupply;

    uint256 artistCut = _getArtistCut(stampInfo.mintPrice * amount);
    (bool success, ) = stampInfo.artist.call{value: artistCut}("");
    require(success, "arist payment failed");

    _mint(account, id, amount, "");
  }

  /**
   * @dev Sets `mintLimit` of `tokenIds`.
   *
   * Setting `mintLimit` from 0 is equivalent to unpausing mint.
   */
  function setMintLimit(uint256[] calldata tokenIds, uint256[] calldata mintLimits) public onlyOwner {
    require(tokenIds.length == mintLimits.length, "input array lengths must be the same");
    for (uint256 i = 0; i < tokenIds.length; i++) {
      uint256 tokenId = tokenIds[i];
      require(tokenId < _tokenIdCounter.current(), "nonexistent token");
      tokenIdToStampInfo[tokenId].mintLimit = mintLimits[i];
    }
  }

  /**
   * @dev Sends a postcard along with a Stampu and optionally with ETH.
   */
  function sendPostcard(
    address payable to,
    uint256 id,
    string calldata fromText,
    string calldata toText,
    string calldata message
  ) public payable {
    _sendPostcard(to, id, fromText, toText, message, msg.value);
  }

  function _sendPostcard(
    address payable to,
    uint256 id,
    string calldata fromText,
    string calldata toText,
    string calldata message,
    uint256 value
  ) private {
    if (value > 0) {
      (bool success, ) = to.call{value: value}("");
      require(success, "payment failed");
    }

    safeTransferFrom(_msgSender(), to, id, 1, "");
    emit SendPostcard(_postcardIdCounter.current(), _msgSender(), to, id, fromText, toText, message, value);
    _postcardIdCounter.increment();
  }

  /**
   * @dev Sends multiple postcards in a single transaction.
   */
  function batchSendPostcards(
    address payable[] calldata toAddresses,
    uint256 id,
    string calldata fromText,
    string calldata toText,
    string calldata message
  ) public payable {
    // Value should be a multiple of the number of receipents.
    // The contract will keep the remainder if any.
    uint256 valuePerPostCard = msg.value / toAddresses.length;
    for (uint256 i = 0; i < toAddresses.length; i++) {
      _sendPostcard(toAddresses[i], id, fromText, toText, message, valuePerPostCard);
    }
  }

  /**
   * @dev Withdraws fees accumulated in the contract (onlyOwner).
   */
  function withdrawFees() public onlyOwner {
    (bool sent, ) = msg.sender.call{value: address(this).balance}("");
    require(sent, "failed to send collected fees");
  }

  /**
   * @dev Mints and sends a postcard in a single transaction.
   */
  function mintAndSendPostcard(
    address payable to,
    uint256 id,
    string calldata fromText,
    string calldata toText,
    string calldata message
  ) public payable {
    mint(_msgSender(), id, 1);
    uint256 valueLeft = msg.value - tokenIdToStampInfo[id].mintPrice;
    _sendPostcard(to, id, fromText, toText, message, valueLeft);
  }

  // Royalty functions:
  function setRoyaltyRecipient(address royaltyRecipient) public onlyOwner {
    require(royaltyRecipient != address(0), "Invalid royalty recipient address");
    _royaltyRecipient = royaltyRecipient;
  }

  function setRoyaltyFee(uint8 royaltyFee) public onlyOwner {
    require(royaltyFee <= 1000, "Invalid royalty fee");
    _royaltyFee = royaltyFee;
  }

  function royaltyInfo(uint256, uint256 _salePrice) external view override returns (address, uint256) {
    return (_royaltyRecipient, (_salePrice * _royaltyFee) / 1000);
  }

  function supportsInterface(bytes4 interfaceId) public view override(IERC2981, ERC1155) returns (bool) {
    return interfaceId == _INTERFACE_ID_ERC2981 || super.supportsInterface(interfaceId);
  }

  // Utility functions:
  function _getArtistCut(uint256 mintPrice) internal pure returns (uint256) {
    return (mintPrice * 9) / 10;
  }
}

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 : ERC1155Receiver.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC1155Receiver.sol";
import "../../../utils/introspection/ERC165.sol";

/**
 * @dev _Available since v3.1._
 */
abstract contract ERC1155Receiver is ERC165, IERC1155Receiver {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
        return interfaceId == type(IERC1155Receiver).interfaceId || super.supportsInterface(interfaceId);
    }
}

File 10 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 11 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 12 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(
            from == _msgSender() || isApprovedForAll(from, _msgSender()),
            "ERC1155: caller is not owner nor approved"
        );
        _safeTransferFrom(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(
            from == _msgSender() || isApprovedForAll(from, _msgSender()),
            "ERC1155: transfer caller is not owner nor approved"
        );
        _safeBatchTransferFrom(from, to, ids, amounts, data);
    }

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `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 memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: transfer to the zero address");

        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");
        unchecked {
            _balances[id][from] = fromBalance - amount;
        }
        _balances[id][to] += amount;

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

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

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

        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");
            unchecked {
                _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 (uint256 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");
        unchecked {
            _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 (uint256 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");
            unchecked {
                _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.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.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 13 of 17 : Strings.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "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] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }
}

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

pragma solidity ^0.8.0;

/**
 * @title Counters
 * @author Matt Condon (@shrugs)
 * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number
 * of elements in a mapping, issuing ERC721 ids, or counting request ids.
 *
 * Include with `using Counters for Counters.Counter;`
 */
library Counters {
    struct Counter {
        // This variable should never be directly accessed by users of the library: interactions must be restricted to
        // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
        // this feature: see https://github.com/ethereum/solidity/issues/4637
        uint256 _value; // default: 0
    }

    function current(Counter storage counter) internal view returns (uint256) {
        return counter._value;
    }

    function increment(Counter storage counter) internal {
        unchecked {
            counter._value += 1;
        }
    }

    function decrement(Counter storage counter) internal {
        uint256 value = counter._value;
        require(value > 0, "Counter: decrement overflow");
        unchecked {
            counter._value = value - 1;
        }
    }

    function reset(Counter storage counter) internal {
        counter._value = 0;
    }
}

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

pragma solidity ^0.8.4;

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

/**
 * @dev Interface for the NFT Royalty Standard.
 * See https://eips.ethereum.org/EIPS/eip-2981
 */
interface IERC2981 is IERC165 {
  function royaltyInfo(uint256 _tokenId, uint256 _salePrice)
    external
    view
    returns (address receiver, uint256 royaltyAmount);

  function supportsInterface(bytes4 interfaceID) external view override(IERC165) returns (bool);
}

File 16 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 17 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;
        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");

        (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");

        (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");

        (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");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal 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

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_stampuAddress","type":"address"},{"internalType":"address","name":"_whitelistAdmin","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"components":[{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"address payable","name":"artist","type":"address"},{"internalType":"uint16","name":"tokenType","type":"uint16"},{"internalType":"uint16","name":"buyLimit","type":"uint16"},{"internalType":"uint16","name":"presaleBalance","type":"uint16"},{"internalType":"uint8","name":"platformFee","type":"uint8"}],"internalType":"struct StampuStore.StampuInfo[]","name":"stampuInfoList","type":"tuple[]"}],"name":"addStampuInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"_tokenTypeLimit","type":"uint256"},{"internalType":"bytes","name":"_sig","type":"bytes"}],"name":"buyPresale","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"buyPublic","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155BatchReceived","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"presaleActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"presaleTokenTypeHistory","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"publicSaleActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_tokenTypes","type":"uint256[]"},{"internalType":"bool","name":"_active","type":"bool"}],"name":"setPresaleActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_tokenTypes","type":"uint256[]"},{"internalType":"bool","name":"_active","type":"bool"}],"name":"setPublicSaleActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_stampuAddress","type":"address"}],"name":"setStampuAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_whitelistAdmin","type":"address"}],"name":"setWhitelistAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stampu","outputs":[{"internalType":"contract Stampu","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenIdToStampuInfo","outputs":[{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"address payable","name":"artist","type":"address"},{"internalType":"uint16","name":"tokenType","type":"uint16"},{"internalType":"uint16","name":"buyLimit","type":"uint16"},{"internalType":"uint16","name":"presaleBalance","type":"uint16"},{"internalType":"uint8","name":"platformFee","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"whitelistAdmin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawFees","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b50604051620042c9380380620042c98339818101604052810190620000379190620001c4565b620000576200004b620000e160201b60201c565b620000e960201b60201c565b81600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505062000253565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600081519050620001be8162000239565b92915050565b60008060408385031215620001d857600080fd5b6000620001e885828601620001ad565b9250506020620001fb85828601620001ad565b9150509250929050565b6000620002128262000219565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b620002448162000205565b81146200025057600080fd5b50565b61406680620002636000396000f3fe6080604052600436106101355760003560e01c80639f6a5355116100ab578063c25296b61161006f578063c25296b6146103fb578063e85219da14610424578063f009bd231461044d578063f23a6e6114610476578063f2fde38b146104b3578063f324e661146104dc57610135565b80639f6a5355146102ff578063a8d49e641461032a578063b2686f3814610353578063b2715b081461037c578063bc197c81146103be57610135565b80634a5bd2fd116100fd5780634a5bd2fd146102105780634adbe5511461024d5780634cc3df6014610278578063704969e514610294578063715018a6146102bd5780638da5cb5b146102d457610135565b806301ffc9a71461013a5780630b0975fa1461017757806323c05b17146101b4578063307be9c7146101dd578063476343ee146101f9575b600080fd5b34801561014657600080fd5b50610161600480360381019061015c919061272e565b610519565b60405161016e9190612e44565b60405180910390f35b34801561018357600080fd5b5061019e600480360381019061019991906125d6565b610593565b6040516101ab919061311a565b60405180910390f35b3480156101c057600080fd5b506101db60048036038101906101d69190612557565b6105b8565b005b6101f760048036038101906101f291906127d2565b6106cc565b005b34801561020557600080fd5b5061020e610768565b005b34801561021c57600080fd5b5061023760048036038101906102329190612780565b610893565b6040516102449190612e44565b60405180910390f35b34801561025957600080fd5b506102626108b3565b60405161026f9190612d42565b60405180910390f35b610292600480360381019061028d919061280e565b6108d9565b005b3480156102a057600080fd5b506102bb60048036038101906102b691906126d6565b610b78565b005b3480156102c957600080fd5b506102d2610c85565b005b3480156102e057600080fd5b506102e9610d0d565b6040516102f69190612d42565b60405180910390f35b34801561030b57600080fd5b50610314610d36565b6040516103219190612ebf565b60405180910390f35b34801561033657600080fd5b50610351600480360381019061034c91906123e0565b610d5c565b005b34801561035f57600080fd5b5061037a600480360381019061037591906126d6565b610e1c565b005b34801561038857600080fd5b506103a3600480360381019061039e9190612780565b610f29565b6040516103b596959493929190613135565b60405180910390f35b3480156103ca57600080fd5b506103e560048036038101906103e09190612409565b610fbc565b6040516103f29190612ea4565b60405180910390f35b34801561040757600080fd5b50610422600480360381019061041d91906123e0565b610fd1565b005b34801561043057600080fd5b5061044b60048036038101906104469190612661565b611091565b005b34801561045957600080fd5b50610474600480360381019061046f9190612612565b6112bc565b005b34801561048257600080fd5b5061049d600480360381019061049891906124c8565b6113d0565b6040516104aa9190612ea4565b60405180910390f35b3480156104bf57600080fd5b506104da60048036038101906104d591906123e0565b6113e5565b005b3480156104e857600080fd5b5061050360048036038101906104fe9190612780565b6114dd565b6040516105109190612e44565b60405180910390f35b60007f4e2312e0000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061058c575061058b826114fd565b5b9050919050565b6004602052816000526040600020602052806000526040600020600091509150505481565b6105c0611567565b73ffffffffffffffffffffffffffffffffffffffff166105de610d0d565b73ffffffffffffffffffffffffffffffffffffffff1614610634576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061309a565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632eb2c2d6308585856040518563ffffffff1660e01b81526004016106959493929190612d5d565b600060405180830381600087803b1580156106af57600080fd5b505af11580156106c3573d6000803e3d6000fd5b50505050505050565b6000600360008481526020019081526020016000209050600660008260010160149054906101000a900461ffff1661ffff16815260200190815260200160002060009054906101000a900460ff16610759576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161075090612f9a565b60405180910390fd5b610763838361156f565b505050565b610770611567565b73ffffffffffffffffffffffffffffffffffffffff1661078e610d0d565b73ffffffffffffffffffffffffffffffffffffffff16146107e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107db9061309a565b60405180910390fd5b60003373ffffffffffffffffffffffffffffffffffffffff164760405161080a90612d2d565b60006040518083038185875af1925050503d8060008114610847576040519150601f19603f3d011682016040523d82523d6000602084013e61084c565b606091505b5050905080610890576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108879061301a565b60405180910390fd5b50565b60056020528060005260406000206000915054906101000a900460ff1681565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060036000868152602001908152602001600020905060008160010160149054906101000a900461ffff1661ffff169050600560008360010160149054906101000a900461ffff1661ffff16815260200190815260200160002060009054906101000a900460ff16610981576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109789061307a565b60405180910390fd5b61098d86828686611981565b8160010160189054906101000a900461ffff1661ffff168511156109e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109dd90612f7a565b60405180910390fd5b848260010160188282829054906101000a900461ffff16610a07919061336a565b92506101000a81548161ffff021916908361ffff160217905550600060046000610a2f611567565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008460010160149054906101000a900461ffff1661ffff168152602001908152602001600020549050848682610aa09190613289565b1115610ae1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ad890612efa565b60405180910390fd5b8560046000610aee611567565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008560010160149054906101000a900461ffff1661ffff1681526020019081526020016000206000828254610b5e9190613289565b92505081905550610b6f878761156f565b50505050505050565b610b80611567565b73ffffffffffffffffffffffffffffffffffffffff16610b9e610d0d565b73ffffffffffffffffffffffffffffffffffffffff1614610bf4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610beb9061309a565b60405180910390fd5b60005b83839050811015610c7f578160066000868685818110610c40577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90506020020135815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610c7790613617565b915050610bf7565b50505050565b610c8d611567565b73ffffffffffffffffffffffffffffffffffffffff16610cab610d0d565b73ffffffffffffffffffffffffffffffffffffffff1614610d01576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cf89061309a565b60405180910390fd5b610d0b6000611a09565b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610d64611567565b73ffffffffffffffffffffffffffffffffffffffff16610d82610d0d565b73ffffffffffffffffffffffffffffffffffffffff1614610dd8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dcf9061309a565b60405180910390fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b610e24611567565b73ffffffffffffffffffffffffffffffffffffffff16610e42610d0d565b73ffffffffffffffffffffffffffffffffffffffff1614610e98576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e8f9061309a565b60405180910390fd5b60005b83839050811015610f23578160056000868685818110610ee4577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90506020020135815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610f1b90613617565b915050610e9b565b50505050565b60036020528060005260406000206000915090508060000154908060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010160149054906101000a900461ffff16908060010160169054906101000a900461ffff16908060010160189054906101000a900461ffff169080600101601a9054906101000a900460ff16905086565b600063bc197c8160e01b905095945050505050565b610fd9611567565b73ffffffffffffffffffffffffffffffffffffffff16610ff7610d0d565b73ffffffffffffffffffffffffffffffffffffffff161461104d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110449061309a565b60405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b611099611567565b73ffffffffffffffffffffffffffffffffffffffff166110b7610d0d565b73ffffffffffffffffffffffffffffffffffffffff161461110d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111049061309a565b60405180910390fd5b818190508484905014611155576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161114c906130fa565b60405180910390fd5b60005b828290508110156112b557600083838381811061119e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b905060c002018036038101906111b49190612757565b905060648160a0015160ff161115611201576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111f89061305a565b60405180910390fd5b83838381811061123a577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b905060c002016003600088888681811061127d577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b905060200201358152602001908152602001600020818161129e9190613ed2565b9050505080806112ad90613617565b915050611158565b5050505050565b6112c4611567565b73ffffffffffffffffffffffffffffffffffffffff166112e2610d0d565b73ffffffffffffffffffffffffffffffffffffffff1614611338576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161132f9061309a565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f242432a308585856040518563ffffffff1660e01b81526004016113999493929190612dc3565b600060405180830381600087803b1580156113b357600080fd5b505af11580156113c7573d6000803e3d6000fd5b50505050505050565b600063f23a6e6160e01b905095945050505050565b6113ed611567565b73ffffffffffffffffffffffffffffffffffffffff1661140b610d0d565b73ffffffffffffffffffffffffffffffffffffffff1614611461576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114589061309a565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156114d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114c890612f5a565b60405180910390fd5b6114da81611a09565b50565b60066020528060005260406000206000915054906101000a900460ff1681565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b600033905090565b6003600083815260200190815260200160002060010160169054906101000a900461ffff1661ffff168111156115da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115d1906130ba565b60405180910390fd5b6000600360008481526020019081526020016000206040518060c0016040529081600082015481526020016001820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016001820160149054906101000a900461ffff1661ffff1661ffff1681526020016001820160169054906101000a900461ffff1661ffff1661ffff1681526020016001820160189054906101000a900461ffff1661ffff1661ffff16815260200160018201601a9054906101000a900460ff1660ff1660ff16815250509050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1662fdd58e30856040518363ffffffff1660e01b8152600401611735929190612e1b565b60206040518083038186803b15801561174d57600080fd5b505afa158015611761573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061178591906127a9565b8211156117c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117be906130da565b60405180910390fd5b8181600001516117d79190613310565b341015611819576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161181090612fda565b60405180910390fd5b600061182e8260000151848460a00151611acd565b90506000826020015173ffffffffffffffffffffffffffffffffffffffff168260405161185a90612d2d565b60006040518083038185875af1925050503d8060008114611897576040519150601f19603f3d011682016040523d82523d6000602084013e61189c565b606091505b50509050806118e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118d790612f3a565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f242432a30611927611567565b88886040518563ffffffff1660e01b81526004016119489493929190612dc3565b600060405180830381600087803b15801561196257600080fd5b505af1158015611976573d6000803e3d6000fd5b505050505050505050565b600061198b611567565b8585856040516020016119a19493929190612cb9565b6040516020818303038152906040528051906020012090506119c38183611b0a565b611a02576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119f990612ffa565b60405180910390fd5b5050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000826064836064611adf919061339e565b60ff1686611aed9190613310565b611af791906132df565b611b019190613310565b90509392505050565b600080611b1684611b84565b9050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611b648483611bb490919063ffffffff16565b73ffffffffffffffffffffffffffffffffffffffff161491505092915050565b600081604051602001611b979190612d07565b604051602081830303815290604052805190602001209050919050565b6000806000611bc38585611bdb565b91509150611bd081611c5e565b819250505092915050565b600080604183511415611c1d5760008060006020860151925060408601519150606086015160001a9050611c1187828585611faf565b94509450505050611c57565b604083511415611c4e576000806020850151915060408501519050611c438683836120bc565b935093505050611c57565b60006002915091505b9250929050565b60006004811115611c98577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b816004811115611cd1577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b1415611cdc57611fac565b60016004811115611d16577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b816004811115611d4f577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b1415611d90576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d8790612eda565b60405180910390fd5b60026004811115611dca577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b816004811115611e03577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b1415611e44576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e3b90612f1a565b60405180910390fd5b60036004811115611e7e577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b816004811115611eb7577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b1415611ef8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611eef90612fba565b60405180910390fd5b600480811115611f31577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b816004811115611f6a577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b1415611fab576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fa29061303a565b60405180910390fd5b5b50565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08360001c1115611fea5760006003915091506120b3565b601b8560ff16141580156120025750601c8560ff1614155b156120145760006004915091506120b3565b6000600187878787604051600081526020016040526040516120399493929190612e5f565b6020604051602081039080840390855afa15801561205b573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156120aa576000600192509250506120b3565b80600092509250505b94509492505050565b6000806000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff85169150601b8560ff1c0190506120fc87828885611faf565b935093505050935093915050565b600061211d612118846131bb565b613196565b9050808382526020820190508285602086028201111561213c57600080fd5b60005b8581101561216c578161215288826123a1565b84526020840193506020830192505060018101905061213f565b5050509392505050565b6000612189612184846131e7565b613196565b9050828152602081018484840111156121a157600080fd5b6121ac84828561350d565b509392505050565b6000813590506121c381613f8f565b92915050565b6000813590506121d881613fa6565b92915050565b60008083601f8401126121f057600080fd5b8235905067ffffffffffffffff81111561220957600080fd5b6020830191508360c082028301111561222157600080fd5b9250929050565b60008083601f84011261223a57600080fd5b8235905067ffffffffffffffff81111561225357600080fd5b60208301915083602082028301111561226b57600080fd5b9250929050565b600082601f83011261228357600080fd5b813561229384826020860161210a565b91505092915050565b6000813590506122ab81613fbd565b92915050565b6000813590506122c081613fd4565b92915050565b600082601f8301126122d757600080fd5b81356122e7848260208601612176565b91505092915050565b600060c0828403121561230257600080fd5b61230c60c0613196565b9050600061231c848285016123a1565b6000830152506020612330848285016121c9565b60208301525060406123448482850161238c565b60408301525060606123588482850161238c565b606083015250608061236c8482850161238c565b60808301525060a0612380848285016123cb565b60a08301525092915050565b60008135905061239b81613feb565b92915050565b6000813590506123b081614002565b92915050565b6000815190506123c581614002565b92915050565b6000813590506123da81614019565b92915050565b6000602082840312156123f257600080fd5b6000612400848285016121b4565b91505092915050565b600080600080600060a0868803121561242157600080fd5b600061242f888289016121b4565b9550506020612440888289016121b4565b945050604086013567ffffffffffffffff81111561245d57600080fd5b61246988828901612272565b935050606086013567ffffffffffffffff81111561248657600080fd5b61249288828901612272565b925050608086013567ffffffffffffffff8111156124af57600080fd5b6124bb888289016122c6565b9150509295509295909350565b600080600080600060a086880312156124e057600080fd5b60006124ee888289016121b4565b95505060206124ff888289016121b4565b9450506040612510888289016123a1565b9350506060612521888289016123a1565b925050608086013567ffffffffffffffff81111561253e57600080fd5b61254a888289016122c6565b9150509295509295909350565b60008060006060848603121561256c57600080fd5b600061257a868287016121b4565b935050602084013567ffffffffffffffff81111561259757600080fd5b6125a386828701612272565b925050604084013567ffffffffffffffff8111156125c057600080fd5b6125cc86828701612272565b9150509250925092565b600080604083850312156125e957600080fd5b60006125f7858286016121b4565b9250506020612608858286016123a1565b9150509250929050565b60008060006060848603121561262757600080fd5b6000612635868287016121b4565b9350506020612646868287016123a1565b9250506040612657868287016123a1565b9150509250925092565b6000806000806040858703121561267757600080fd5b600085013567ffffffffffffffff81111561269157600080fd5b61269d87828801612228565b9450945050602085013567ffffffffffffffff8111156126bc57600080fd5b6126c8878288016121de565b925092505092959194509250565b6000806000604084860312156126eb57600080fd5b600084013567ffffffffffffffff81111561270557600080fd5b61271186828701612228565b935093505060206127248682870161229c565b9150509250925092565b60006020828403121561274057600080fd5b600061274e848285016122b1565b91505092915050565b600060c0828403121561276957600080fd5b6000612777848285016122f0565b91505092915050565b60006020828403121561279257600080fd5b60006127a0848285016123a1565b91505092915050565b6000602082840312156127bb57600080fd5b60006127c9848285016123b6565b91505092915050565b600080604083850312156127e557600080fd5b60006127f3858286016123a1565b9250506020612804858286016123a1565b9150509250929050565b6000806000806080858703121561282457600080fd5b6000612832878288016123a1565b9450506020612843878288016123a1565b9350506040612854878288016123a1565b925050606085013567ffffffffffffffff81111561287157600080fd5b61287d878288016122c6565b91505092959194509250565b60006128958383612c75565b60208301905092915050565b6128aa816133e4565b82525050565b6128b9816133d2565b82525050565b6128d06128cb826133d2565b613660565b82525050565b60006128e182613228565b6128eb8185613240565b93506128f683613218565b8060005b8381101561292757815161290e8882612889565b975061291983613233565b9250506001810190506128fa565b5085935050505092915050565b61293d816133f6565b82525050565b61294c81613402565b82525050565b61296361295e82613402565b613672565b82525050565b6129728161340c565b82525050565b6129818161348f565b82525050565b600061299460188361326d565b915061299f82613804565b602082019050919050565b60006129b760388361326d565b91506129c28261382d565b604082019050919050565b60006129da601f8361326d565b91506129e58261387c565b602082019050919050565b60006129fd601c8361327e565b9150612a08826138a5565b601c82019050919050565b6000612a2060228361326d565b9150612a2b826138ce565b604082019050919050565b6000612a4360268361326d565b9150612a4e8261391d565b604082019050919050565b6000612a6660328361326d565b9150612a718261396c565b604082019050919050565b6000612a8960268361326d565b9150612a94826139bb565b604082019050919050565b6000612aac60228361326d565b9150612ab782613a0a565b604082019050919050565b6000612acf60248361326d565b9150612ada82613a59565b604082019050919050565b6000612af260318361326d565b9150612afd82613aa8565b604082019050919050565b6000612b15602a8361326d565b9150612b2082613af7565b604082019050919050565b6000612b3860228361326d565b9150612b4382613b46565b604082019050919050565b6000612b5b60218361326d565b9150612b6682613b95565b604082019050919050565b6000612b7e60228361326d565b9150612b8982613be4565b604082019050919050565b6000612ba160208361326d565b9150612bac82613c33565b602082019050919050565b6000612bc460268361326d565b9150612bcf82613c5c565b604082019050919050565b6000612be760278361326d565b9150612bf282613cab565b604082019050919050565b6000612c0a600083613251565b9150612c1582613cfa565b600082019050919050565b6000612c2d600083613262565b9150612c3882613cfa565b600082019050919050565b6000612c5060278361326d565b9150612c5b82613cfd565b604082019050919050565b612c6f81613438565b82525050565b612c7e81613466565b82525050565b612c8d81613466565b82525050565b612ca4612c9f82613466565b61368e565b82525050565b612cb381613470565b82525050565b6000612cc582876128bf565b601482019150612cd58286612c93565b602082019150612ce58285612c93565b602082019150612cf58284612c93565b60208201915081905095945050505050565b6000612d12826129f0565b9150612d1e8284612952565b60208201915081905092915050565b6000612d3882612c20565b9150819050919050565b6000602082019050612d5760008301846128b0565b92915050565b600060a082019050612d7260008301876128b0565b612d7f60208301866128b0565b8181036040830152612d9181856128d6565b90508181036060830152612da581846128d6565b90508181036080830152612db881612bfd565b905095945050505050565b600060a082019050612dd860008301876128b0565b612de560208301866128b0565b612df26040830185612c84565b612dff6060830184612c84565b8181036080830152612e1081612bfd565b905095945050505050565b6000604082019050612e3060008301856128b0565b612e3d6020830184612c84565b9392505050565b6000602082019050612e596000830184612934565b92915050565b6000608082019050612e746000830187612943565b612e816020830186612caa565b612e8e6040830185612943565b612e9b6060830184612943565b95945050505050565b6000602082019050612eb96000830184612969565b92915050565b6000602082019050612ed46000830184612978565b92915050565b60006020820190508181036000830152612ef381612987565b9050919050565b60006020820190508181036000830152612f13816129aa565b9050919050565b60006020820190508181036000830152612f33816129cd565b9050919050565b60006020820190508181036000830152612f5381612a13565b9050919050565b60006020820190508181036000830152612f7381612a36565b9050919050565b60006020820190508181036000830152612f9381612a59565b9050919050565b60006020820190508181036000830152612fb381612a7c565b9050919050565b60006020820190508181036000830152612fd381612a9f565b9050919050565b60006020820190508181036000830152612ff381612ac2565b9050919050565b6000602082019050818103600083015261301381612ae5565b9050919050565b6000602082019050818103600083015261303381612b08565b9050919050565b6000602082019050818103600083015261305381612b2b565b9050919050565b6000602082019050818103600083015261307381612b4e565b9050919050565b6000602082019050818103600083015261309381612b71565b9050919050565b600060208201905081810360008301526130b381612b94565b9050919050565b600060208201905081810360008301526130d381612bb7565b9050919050565b600060208201905081810360008301526130f381612bda565b9050919050565b6000602082019050818103600083015261311381612c43565b9050919050565b600060208201905061312f6000830184612c84565b92915050565b600060c08201905061314a6000830189612c84565b61315760208301886128a1565b6131646040830187612c66565b6131716060830186612c66565b61317e6080830185612c66565b61318b60a0830184612caa565b979650505050505050565b60006131a06131b1565b90506131ac82826135e6565b919050565b6000604051905090565b600067ffffffffffffffff8211156131d6576131d56136f6565b5b602082029050602081019050919050565b600067ffffffffffffffff821115613202576132016136f6565b5b61320b826137a5565b9050602081019050919050565b6000819050602082019050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b600061329482613466565b915061329f83613466565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156132d4576132d3613698565b5b828201905092915050565b60006132ea82613466565b91506132f583613466565b925082613305576133046136c7565b5b828204905092915050565b600061331b82613466565b915061332683613466565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561335f5761335e613698565b5b828202905092915050565b600061337582613438565b915061338083613438565b92508282101561339357613392613698565b5b828203905092915050565b60006133a982613470565b91506133b483613470565b9250828210156133c7576133c6613698565b5b828203905092915050565b60006133dd82613446565b9050919050565b60006133ef82613446565b9050919050565b60008115159050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600061ffff82169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000613488826134b3565b9050919050565b600061349a826134a1565b9050919050565b60006134ac82613446565b9050919050565b60006134be826134c5565b9050919050565b60006134d082613446565b9050919050565b60006134e282613438565b9050919050565b60006134f482613466565b9050919050565b600061350682613470565b9050919050565b82818337600083830152505050565b60008101600083018061352e81613779565b905061353a8184613ee0565b50505060018101602083018061354f8161374d565b905061355b8184613eaf565b50505060018101604083018061357081613763565b905061357c8184613f03565b50505060018101606083018061359181613763565b905061359d8184613f26565b5050506001810160808301806135b281613763565b90506135be8184613f49565b5050506001810160a08301806135d38161378f565b90506135df8184613f6c565b5050505050565b6135ef826137a5565b810181811067ffffffffffffffff8211171561360e5761360d6136f6565b5b80604052505050565b600061362282613466565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561365557613654613698565b5b600182019050919050565b600061366b8261367c565b9050919050565b6000819050919050565b6000613687826137f7565b9050919050565b6000819050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000819050919050565b6000819050919050565b6000819050919050565b6000819050919050565b6000813561375a81613fa6565b80915050919050565b6000813561377081613feb565b80915050919050565b6000813561378681614002565b80915050919050565b6000813561379c81614019565b80915050919050565b6000601f19601f8301169050919050565b60008160001b9050919050565b60008160a01b9050919050565b60008160b01b9050919050565b60008160c01b9050919050565b60008160d01b9050919050565b60008160601b9050919050565b7f45434453413a20696e76616c6964207369676e61747572650000000000000000600082015250565b7f5374616d707553746f72653a206578636565647320746865206d6178696d756d60008201527f20616c6c6f77656420616d6f756e7420666f7220747970650000000000000000602082015250565b7f45434453413a20696e76616c6964207369676e6174757265206c656e67746800600082015250565b7f19457468657265756d205369676e6564204d6573736167653a0a333200000000600082015250565b7f5374616d707553746f72653a20617274697374207061796d656e74206661696c60008201527f6564000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f5374616d707553746f72653a20696e73756666696369656e742062616c616e6360008201527f65206c65667420666f722070726573616c650000000000000000000000000000602082015250565b7f5374616d707553746f72653a207075626c69632073616c65206973206e6f742060008201527f6163746976650000000000000000000000000000000000000000000000000000602082015250565b7f45434453413a20696e76616c6964207369676e6174757265202773272076616c60008201527f7565000000000000000000000000000000000000000000000000000000000000602082015250565b7f5374616d707553746f72653a20696e73756666696369656e742065746820616d60008201527f6f756e7400000000000000000000000000000000000000000000000000000000602082015250565b7f5374616d707553746f72653a206e6f742077686974656c6973746564206f722060008201527f696e76616c6964207369676e6174757265000000000000000000000000000000602082015250565b7f5374616d707553746f72653a206661696c656420746f2073656e6420636f6c6c60008201527f6563746564206665657300000000000000000000000000000000000000000000602082015250565b7f45434453413a20696e76616c6964207369676e6174757265202776272076616c60008201527f7565000000000000000000000000000000000000000000000000000000000000602082015250565b7f5374616d707553746f72653a20696e76616c696420706c6174666f726d20666560008201527f6500000000000000000000000000000000000000000000000000000000000000602082015250565b7f5374616d707553746f72653a2070726573616c65206973206e6f74206163746960008201527f7665000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5374616d707553746f72653a206578636565647320616c6c6f7765642062757960008201527f206c696d69740000000000000000000000000000000000000000000000000000602082015250565b7f5374616d707553746f72653a20696e73756666696369656e742073746f72652060008201527f62616c616e636500000000000000000000000000000000000000000000000000602082015250565b50565b7f5374616d707553746f72653a20696e707574206c656e6774687320646f206e6f60008201527f74206d6174636800000000000000000000000000000000000000000000000000602082015250565b60007aff0000000000000000000000000000000000000000000000000000613d73846137ea565b9350801983169250808416831791505092915050565b600073ffffffffffffffffffffffffffffffffffffffff613da9846137b6565b9350801983169250808416831791505092915050565b600075ffff0000000000000000000000000000000000000000613de1846137c3565b9350801983169250808416831791505092915050565b600077ffff00000000000000000000000000000000000000000000613e1b846137d0565b9350801983169250808416831791505092915050565b600079ffff000000000000000000000000000000000000000000000000613e57846137dd565b9350801983169250808416831791505092915050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff613e99846137b6565b9350801983169250808416831791505092915050565b613eb88261347d565b613ecb613ec482613725565b8354613d89565b8255505050565b613edc828261351c565b5050565b613ee9826134e9565b613efc613ef582613739565b8354613e6d565b8255505050565b613f0c826134d7565b613f1f613f188261372f565b8354613dbf565b8255505050565b613f2f826134d7565b613f42613f3b8261372f565b8354613df7565b8255505050565b613f52826134d7565b613f65613f5e8261372f565b8354613e31565b8255505050565b613f75826134fb565b613f88613f8182613743565b8354613d4c565b8255505050565b613f98816133d2565b8114613fa357600080fd5b50565b613faf816133e4565b8114613fba57600080fd5b50565b613fc6816133f6565b8114613fd157600080fd5b50565b613fdd8161340c565b8114613fe857600080fd5b50565b613ff481613438565b8114613fff57600080fd5b50565b61400b81613466565b811461401657600080fd5b50565b61402281613470565b811461402d57600080fd5b5056fea264697066735822122081a3cf2f59c3171c411ddfc8cca0cdda0f29658cf20eae8acecd4dfba09bdcf664736f6c63430008040033000000000000000000000000aa9ae09510462cebcfdce50cb900fa83f38a23c00000000000000000000000003adb234de37849b00fdf68fc9b335123a2bc2a29

Deployed Bytecode

0x6080604052600436106101355760003560e01c80639f6a5355116100ab578063c25296b61161006f578063c25296b6146103fb578063e85219da14610424578063f009bd231461044d578063f23a6e6114610476578063f2fde38b146104b3578063f324e661146104dc57610135565b80639f6a5355146102ff578063a8d49e641461032a578063b2686f3814610353578063b2715b081461037c578063bc197c81146103be57610135565b80634a5bd2fd116100fd5780634a5bd2fd146102105780634adbe5511461024d5780634cc3df6014610278578063704969e514610294578063715018a6146102bd5780638da5cb5b146102d457610135565b806301ffc9a71461013a5780630b0975fa1461017757806323c05b17146101b4578063307be9c7146101dd578063476343ee146101f9575b600080fd5b34801561014657600080fd5b50610161600480360381019061015c919061272e565b610519565b60405161016e9190612e44565b60405180910390f35b34801561018357600080fd5b5061019e600480360381019061019991906125d6565b610593565b6040516101ab919061311a565b60405180910390f35b3480156101c057600080fd5b506101db60048036038101906101d69190612557565b6105b8565b005b6101f760048036038101906101f291906127d2565b6106cc565b005b34801561020557600080fd5b5061020e610768565b005b34801561021c57600080fd5b5061023760048036038101906102329190612780565b610893565b6040516102449190612e44565b60405180910390f35b34801561025957600080fd5b506102626108b3565b60405161026f9190612d42565b60405180910390f35b610292600480360381019061028d919061280e565b6108d9565b005b3480156102a057600080fd5b506102bb60048036038101906102b691906126d6565b610b78565b005b3480156102c957600080fd5b506102d2610c85565b005b3480156102e057600080fd5b506102e9610d0d565b6040516102f69190612d42565b60405180910390f35b34801561030b57600080fd5b50610314610d36565b6040516103219190612ebf565b60405180910390f35b34801561033657600080fd5b50610351600480360381019061034c91906123e0565b610d5c565b005b34801561035f57600080fd5b5061037a600480360381019061037591906126d6565b610e1c565b005b34801561038857600080fd5b506103a3600480360381019061039e9190612780565b610f29565b6040516103b596959493929190613135565b60405180910390f35b3480156103ca57600080fd5b506103e560048036038101906103e09190612409565b610fbc565b6040516103f29190612ea4565b60405180910390f35b34801561040757600080fd5b50610422600480360381019061041d91906123e0565b610fd1565b005b34801561043057600080fd5b5061044b60048036038101906104469190612661565b611091565b005b34801561045957600080fd5b50610474600480360381019061046f9190612612565b6112bc565b005b34801561048257600080fd5b5061049d600480360381019061049891906124c8565b6113d0565b6040516104aa9190612ea4565b60405180910390f35b3480156104bf57600080fd5b506104da60048036038101906104d591906123e0565b6113e5565b005b3480156104e857600080fd5b5061050360048036038101906104fe9190612780565b6114dd565b6040516105109190612e44565b60405180910390f35b60007f4e2312e0000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061058c575061058b826114fd565b5b9050919050565b6004602052816000526040600020602052806000526040600020600091509150505481565b6105c0611567565b73ffffffffffffffffffffffffffffffffffffffff166105de610d0d565b73ffffffffffffffffffffffffffffffffffffffff1614610634576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061309a565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632eb2c2d6308585856040518563ffffffff1660e01b81526004016106959493929190612d5d565b600060405180830381600087803b1580156106af57600080fd5b505af11580156106c3573d6000803e3d6000fd5b50505050505050565b6000600360008481526020019081526020016000209050600660008260010160149054906101000a900461ffff1661ffff16815260200190815260200160002060009054906101000a900460ff16610759576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161075090612f9a565b60405180910390fd5b610763838361156f565b505050565b610770611567565b73ffffffffffffffffffffffffffffffffffffffff1661078e610d0d565b73ffffffffffffffffffffffffffffffffffffffff16146107e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107db9061309a565b60405180910390fd5b60003373ffffffffffffffffffffffffffffffffffffffff164760405161080a90612d2d565b60006040518083038185875af1925050503d8060008114610847576040519150601f19603f3d011682016040523d82523d6000602084013e61084c565b606091505b5050905080610890576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108879061301a565b60405180910390fd5b50565b60056020528060005260406000206000915054906101000a900460ff1681565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060036000868152602001908152602001600020905060008160010160149054906101000a900461ffff1661ffff169050600560008360010160149054906101000a900461ffff1661ffff16815260200190815260200160002060009054906101000a900460ff16610981576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109789061307a565b60405180910390fd5b61098d86828686611981565b8160010160189054906101000a900461ffff1661ffff168511156109e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109dd90612f7a565b60405180910390fd5b848260010160188282829054906101000a900461ffff16610a07919061336a565b92506101000a81548161ffff021916908361ffff160217905550600060046000610a2f611567565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008460010160149054906101000a900461ffff1661ffff168152602001908152602001600020549050848682610aa09190613289565b1115610ae1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ad890612efa565b60405180910390fd5b8560046000610aee611567565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008560010160149054906101000a900461ffff1661ffff1681526020019081526020016000206000828254610b5e9190613289565b92505081905550610b6f878761156f565b50505050505050565b610b80611567565b73ffffffffffffffffffffffffffffffffffffffff16610b9e610d0d565b73ffffffffffffffffffffffffffffffffffffffff1614610bf4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610beb9061309a565b60405180910390fd5b60005b83839050811015610c7f578160066000868685818110610c40577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90506020020135815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610c7790613617565b915050610bf7565b50505050565b610c8d611567565b73ffffffffffffffffffffffffffffffffffffffff16610cab610d0d565b73ffffffffffffffffffffffffffffffffffffffff1614610d01576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cf89061309a565b60405180910390fd5b610d0b6000611a09565b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610d64611567565b73ffffffffffffffffffffffffffffffffffffffff16610d82610d0d565b73ffffffffffffffffffffffffffffffffffffffff1614610dd8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dcf9061309a565b60405180910390fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b610e24611567565b73ffffffffffffffffffffffffffffffffffffffff16610e42610d0d565b73ffffffffffffffffffffffffffffffffffffffff1614610e98576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e8f9061309a565b60405180910390fd5b60005b83839050811015610f23578160056000868685818110610ee4577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90506020020135815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610f1b90613617565b915050610e9b565b50505050565b60036020528060005260406000206000915090508060000154908060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010160149054906101000a900461ffff16908060010160169054906101000a900461ffff16908060010160189054906101000a900461ffff169080600101601a9054906101000a900460ff16905086565b600063bc197c8160e01b905095945050505050565b610fd9611567565b73ffffffffffffffffffffffffffffffffffffffff16610ff7610d0d565b73ffffffffffffffffffffffffffffffffffffffff161461104d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110449061309a565b60405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b611099611567565b73ffffffffffffffffffffffffffffffffffffffff166110b7610d0d565b73ffffffffffffffffffffffffffffffffffffffff161461110d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111049061309a565b60405180910390fd5b818190508484905014611155576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161114c906130fa565b60405180910390fd5b60005b828290508110156112b557600083838381811061119e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b905060c002018036038101906111b49190612757565b905060648160a0015160ff161115611201576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111f89061305a565b60405180910390fd5b83838381811061123a577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b905060c002016003600088888681811061127d577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b905060200201358152602001908152602001600020818161129e9190613ed2565b9050505080806112ad90613617565b915050611158565b5050505050565b6112c4611567565b73ffffffffffffffffffffffffffffffffffffffff166112e2610d0d565b73ffffffffffffffffffffffffffffffffffffffff1614611338576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161132f9061309a565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f242432a308585856040518563ffffffff1660e01b81526004016113999493929190612dc3565b600060405180830381600087803b1580156113b357600080fd5b505af11580156113c7573d6000803e3d6000fd5b50505050505050565b600063f23a6e6160e01b905095945050505050565b6113ed611567565b73ffffffffffffffffffffffffffffffffffffffff1661140b610d0d565b73ffffffffffffffffffffffffffffffffffffffff1614611461576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114589061309a565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156114d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114c890612f5a565b60405180910390fd5b6114da81611a09565b50565b60066020528060005260406000206000915054906101000a900460ff1681565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b600033905090565b6003600083815260200190815260200160002060010160169054906101000a900461ffff1661ffff168111156115da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115d1906130ba565b60405180910390fd5b6000600360008481526020019081526020016000206040518060c0016040529081600082015481526020016001820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016001820160149054906101000a900461ffff1661ffff1661ffff1681526020016001820160169054906101000a900461ffff1661ffff1661ffff1681526020016001820160189054906101000a900461ffff1661ffff1661ffff16815260200160018201601a9054906101000a900460ff1660ff1660ff16815250509050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1662fdd58e30856040518363ffffffff1660e01b8152600401611735929190612e1b565b60206040518083038186803b15801561174d57600080fd5b505afa158015611761573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061178591906127a9565b8211156117c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117be906130da565b60405180910390fd5b8181600001516117d79190613310565b341015611819576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161181090612fda565b60405180910390fd5b600061182e8260000151848460a00151611acd565b90506000826020015173ffffffffffffffffffffffffffffffffffffffff168260405161185a90612d2d565b60006040518083038185875af1925050503d8060008114611897576040519150601f19603f3d011682016040523d82523d6000602084013e61189c565b606091505b50509050806118e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118d790612f3a565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f242432a30611927611567565b88886040518563ffffffff1660e01b81526004016119489493929190612dc3565b600060405180830381600087803b15801561196257600080fd5b505af1158015611976573d6000803e3d6000fd5b505050505050505050565b600061198b611567565b8585856040516020016119a19493929190612cb9565b6040516020818303038152906040528051906020012090506119c38183611b0a565b611a02576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119f990612ffa565b60405180910390fd5b5050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000826064836064611adf919061339e565b60ff1686611aed9190613310565b611af791906132df565b611b019190613310565b90509392505050565b600080611b1684611b84565b9050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611b648483611bb490919063ffffffff16565b73ffffffffffffffffffffffffffffffffffffffff161491505092915050565b600081604051602001611b979190612d07565b604051602081830303815290604052805190602001209050919050565b6000806000611bc38585611bdb565b91509150611bd081611c5e565b819250505092915050565b600080604183511415611c1d5760008060006020860151925060408601519150606086015160001a9050611c1187828585611faf565b94509450505050611c57565b604083511415611c4e576000806020850151915060408501519050611c438683836120bc565b935093505050611c57565b60006002915091505b9250929050565b60006004811115611c98577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b816004811115611cd1577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b1415611cdc57611fac565b60016004811115611d16577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b816004811115611d4f577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b1415611d90576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d8790612eda565b60405180910390fd5b60026004811115611dca577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b816004811115611e03577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b1415611e44576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e3b90612f1a565b60405180910390fd5b60036004811115611e7e577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b816004811115611eb7577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b1415611ef8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611eef90612fba565b60405180910390fd5b600480811115611f31577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b816004811115611f6a577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b1415611fab576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fa29061303a565b60405180910390fd5b5b50565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08360001c1115611fea5760006003915091506120b3565b601b8560ff16141580156120025750601c8560ff1614155b156120145760006004915091506120b3565b6000600187878787604051600081526020016040526040516120399493929190612e5f565b6020604051602081039080840390855afa15801561205b573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156120aa576000600192509250506120b3565b80600092509250505b94509492505050565b6000806000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff85169150601b8560ff1c0190506120fc87828885611faf565b935093505050935093915050565b600061211d612118846131bb565b613196565b9050808382526020820190508285602086028201111561213c57600080fd5b60005b8581101561216c578161215288826123a1565b84526020840193506020830192505060018101905061213f565b5050509392505050565b6000612189612184846131e7565b613196565b9050828152602081018484840111156121a157600080fd5b6121ac84828561350d565b509392505050565b6000813590506121c381613f8f565b92915050565b6000813590506121d881613fa6565b92915050565b60008083601f8401126121f057600080fd5b8235905067ffffffffffffffff81111561220957600080fd5b6020830191508360c082028301111561222157600080fd5b9250929050565b60008083601f84011261223a57600080fd5b8235905067ffffffffffffffff81111561225357600080fd5b60208301915083602082028301111561226b57600080fd5b9250929050565b600082601f83011261228357600080fd5b813561229384826020860161210a565b91505092915050565b6000813590506122ab81613fbd565b92915050565b6000813590506122c081613fd4565b92915050565b600082601f8301126122d757600080fd5b81356122e7848260208601612176565b91505092915050565b600060c0828403121561230257600080fd5b61230c60c0613196565b9050600061231c848285016123a1565b6000830152506020612330848285016121c9565b60208301525060406123448482850161238c565b60408301525060606123588482850161238c565b606083015250608061236c8482850161238c565b60808301525060a0612380848285016123cb565b60a08301525092915050565b60008135905061239b81613feb565b92915050565b6000813590506123b081614002565b92915050565b6000815190506123c581614002565b92915050565b6000813590506123da81614019565b92915050565b6000602082840312156123f257600080fd5b6000612400848285016121b4565b91505092915050565b600080600080600060a0868803121561242157600080fd5b600061242f888289016121b4565b9550506020612440888289016121b4565b945050604086013567ffffffffffffffff81111561245d57600080fd5b61246988828901612272565b935050606086013567ffffffffffffffff81111561248657600080fd5b61249288828901612272565b925050608086013567ffffffffffffffff8111156124af57600080fd5b6124bb888289016122c6565b9150509295509295909350565b600080600080600060a086880312156124e057600080fd5b60006124ee888289016121b4565b95505060206124ff888289016121b4565b9450506040612510888289016123a1565b9350506060612521888289016123a1565b925050608086013567ffffffffffffffff81111561253e57600080fd5b61254a888289016122c6565b9150509295509295909350565b60008060006060848603121561256c57600080fd5b600061257a868287016121b4565b935050602084013567ffffffffffffffff81111561259757600080fd5b6125a386828701612272565b925050604084013567ffffffffffffffff8111156125c057600080fd5b6125cc86828701612272565b9150509250925092565b600080604083850312156125e957600080fd5b60006125f7858286016121b4565b9250506020612608858286016123a1565b9150509250929050565b60008060006060848603121561262757600080fd5b6000612635868287016121b4565b9350506020612646868287016123a1565b9250506040612657868287016123a1565b9150509250925092565b6000806000806040858703121561267757600080fd5b600085013567ffffffffffffffff81111561269157600080fd5b61269d87828801612228565b9450945050602085013567ffffffffffffffff8111156126bc57600080fd5b6126c8878288016121de565b925092505092959194509250565b6000806000604084860312156126eb57600080fd5b600084013567ffffffffffffffff81111561270557600080fd5b61271186828701612228565b935093505060206127248682870161229c565b9150509250925092565b60006020828403121561274057600080fd5b600061274e848285016122b1565b91505092915050565b600060c0828403121561276957600080fd5b6000612777848285016122f0565b91505092915050565b60006020828403121561279257600080fd5b60006127a0848285016123a1565b91505092915050565b6000602082840312156127bb57600080fd5b60006127c9848285016123b6565b91505092915050565b600080604083850312156127e557600080fd5b60006127f3858286016123a1565b9250506020612804858286016123a1565b9150509250929050565b6000806000806080858703121561282457600080fd5b6000612832878288016123a1565b9450506020612843878288016123a1565b9350506040612854878288016123a1565b925050606085013567ffffffffffffffff81111561287157600080fd5b61287d878288016122c6565b91505092959194509250565b60006128958383612c75565b60208301905092915050565b6128aa816133e4565b82525050565b6128b9816133d2565b82525050565b6128d06128cb826133d2565b613660565b82525050565b60006128e182613228565b6128eb8185613240565b93506128f683613218565b8060005b8381101561292757815161290e8882612889565b975061291983613233565b9250506001810190506128fa565b5085935050505092915050565b61293d816133f6565b82525050565b61294c81613402565b82525050565b61296361295e82613402565b613672565b82525050565b6129728161340c565b82525050565b6129818161348f565b82525050565b600061299460188361326d565b915061299f82613804565b602082019050919050565b60006129b760388361326d565b91506129c28261382d565b604082019050919050565b60006129da601f8361326d565b91506129e58261387c565b602082019050919050565b60006129fd601c8361327e565b9150612a08826138a5565b601c82019050919050565b6000612a2060228361326d565b9150612a2b826138ce565b604082019050919050565b6000612a4360268361326d565b9150612a4e8261391d565b604082019050919050565b6000612a6660328361326d565b9150612a718261396c565b604082019050919050565b6000612a8960268361326d565b9150612a94826139bb565b604082019050919050565b6000612aac60228361326d565b9150612ab782613a0a565b604082019050919050565b6000612acf60248361326d565b9150612ada82613a59565b604082019050919050565b6000612af260318361326d565b9150612afd82613aa8565b604082019050919050565b6000612b15602a8361326d565b9150612b2082613af7565b604082019050919050565b6000612b3860228361326d565b9150612b4382613b46565b604082019050919050565b6000612b5b60218361326d565b9150612b6682613b95565b604082019050919050565b6000612b7e60228361326d565b9150612b8982613be4565b604082019050919050565b6000612ba160208361326d565b9150612bac82613c33565b602082019050919050565b6000612bc460268361326d565b9150612bcf82613c5c565b604082019050919050565b6000612be760278361326d565b9150612bf282613cab565b604082019050919050565b6000612c0a600083613251565b9150612c1582613cfa565b600082019050919050565b6000612c2d600083613262565b9150612c3882613cfa565b600082019050919050565b6000612c5060278361326d565b9150612c5b82613cfd565b604082019050919050565b612c6f81613438565b82525050565b612c7e81613466565b82525050565b612c8d81613466565b82525050565b612ca4612c9f82613466565b61368e565b82525050565b612cb381613470565b82525050565b6000612cc582876128bf565b601482019150612cd58286612c93565b602082019150612ce58285612c93565b602082019150612cf58284612c93565b60208201915081905095945050505050565b6000612d12826129f0565b9150612d1e8284612952565b60208201915081905092915050565b6000612d3882612c20565b9150819050919050565b6000602082019050612d5760008301846128b0565b92915050565b600060a082019050612d7260008301876128b0565b612d7f60208301866128b0565b8181036040830152612d9181856128d6565b90508181036060830152612da581846128d6565b90508181036080830152612db881612bfd565b905095945050505050565b600060a082019050612dd860008301876128b0565b612de560208301866128b0565b612df26040830185612c84565b612dff6060830184612c84565b8181036080830152612e1081612bfd565b905095945050505050565b6000604082019050612e3060008301856128b0565b612e3d6020830184612c84565b9392505050565b6000602082019050612e596000830184612934565b92915050565b6000608082019050612e746000830187612943565b612e816020830186612caa565b612e8e6040830185612943565b612e9b6060830184612943565b95945050505050565b6000602082019050612eb96000830184612969565b92915050565b6000602082019050612ed46000830184612978565b92915050565b60006020820190508181036000830152612ef381612987565b9050919050565b60006020820190508181036000830152612f13816129aa565b9050919050565b60006020820190508181036000830152612f33816129cd565b9050919050565b60006020820190508181036000830152612f5381612a13565b9050919050565b60006020820190508181036000830152612f7381612a36565b9050919050565b60006020820190508181036000830152612f9381612a59565b9050919050565b60006020820190508181036000830152612fb381612a7c565b9050919050565b60006020820190508181036000830152612fd381612a9f565b9050919050565b60006020820190508181036000830152612ff381612ac2565b9050919050565b6000602082019050818103600083015261301381612ae5565b9050919050565b6000602082019050818103600083015261303381612b08565b9050919050565b6000602082019050818103600083015261305381612b2b565b9050919050565b6000602082019050818103600083015261307381612b4e565b9050919050565b6000602082019050818103600083015261309381612b71565b9050919050565b600060208201905081810360008301526130b381612b94565b9050919050565b600060208201905081810360008301526130d381612bb7565b9050919050565b600060208201905081810360008301526130f381612bda565b9050919050565b6000602082019050818103600083015261311381612c43565b9050919050565b600060208201905061312f6000830184612c84565b92915050565b600060c08201905061314a6000830189612c84565b61315760208301886128a1565b6131646040830187612c66565b6131716060830186612c66565b61317e6080830185612c66565b61318b60a0830184612caa565b979650505050505050565b60006131a06131b1565b90506131ac82826135e6565b919050565b6000604051905090565b600067ffffffffffffffff8211156131d6576131d56136f6565b5b602082029050602081019050919050565b600067ffffffffffffffff821115613202576132016136f6565b5b61320b826137a5565b9050602081019050919050565b6000819050602082019050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b600061329482613466565b915061329f83613466565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156132d4576132d3613698565b5b828201905092915050565b60006132ea82613466565b91506132f583613466565b925082613305576133046136c7565b5b828204905092915050565b600061331b82613466565b915061332683613466565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561335f5761335e613698565b5b828202905092915050565b600061337582613438565b915061338083613438565b92508282101561339357613392613698565b5b828203905092915050565b60006133a982613470565b91506133b483613470565b9250828210156133c7576133c6613698565b5b828203905092915050565b60006133dd82613446565b9050919050565b60006133ef82613446565b9050919050565b60008115159050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600061ffff82169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000613488826134b3565b9050919050565b600061349a826134a1565b9050919050565b60006134ac82613446565b9050919050565b60006134be826134c5565b9050919050565b60006134d082613446565b9050919050565b60006134e282613438565b9050919050565b60006134f482613466565b9050919050565b600061350682613470565b9050919050565b82818337600083830152505050565b60008101600083018061352e81613779565b905061353a8184613ee0565b50505060018101602083018061354f8161374d565b905061355b8184613eaf565b50505060018101604083018061357081613763565b905061357c8184613f03565b50505060018101606083018061359181613763565b905061359d8184613f26565b5050506001810160808301806135b281613763565b90506135be8184613f49565b5050506001810160a08301806135d38161378f565b90506135df8184613f6c565b5050505050565b6135ef826137a5565b810181811067ffffffffffffffff8211171561360e5761360d6136f6565b5b80604052505050565b600061362282613466565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561365557613654613698565b5b600182019050919050565b600061366b8261367c565b9050919050565b6000819050919050565b6000613687826137f7565b9050919050565b6000819050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000819050919050565b6000819050919050565b6000819050919050565b6000819050919050565b6000813561375a81613fa6565b80915050919050565b6000813561377081613feb565b80915050919050565b6000813561378681614002565b80915050919050565b6000813561379c81614019565b80915050919050565b6000601f19601f8301169050919050565b60008160001b9050919050565b60008160a01b9050919050565b60008160b01b9050919050565b60008160c01b9050919050565b60008160d01b9050919050565b60008160601b9050919050565b7f45434453413a20696e76616c6964207369676e61747572650000000000000000600082015250565b7f5374616d707553746f72653a206578636565647320746865206d6178696d756d60008201527f20616c6c6f77656420616d6f756e7420666f7220747970650000000000000000602082015250565b7f45434453413a20696e76616c6964207369676e6174757265206c656e67746800600082015250565b7f19457468657265756d205369676e6564204d6573736167653a0a333200000000600082015250565b7f5374616d707553746f72653a20617274697374207061796d656e74206661696c60008201527f6564000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f5374616d707553746f72653a20696e73756666696369656e742062616c616e6360008201527f65206c65667420666f722070726573616c650000000000000000000000000000602082015250565b7f5374616d707553746f72653a207075626c69632073616c65206973206e6f742060008201527f6163746976650000000000000000000000000000000000000000000000000000602082015250565b7f45434453413a20696e76616c6964207369676e6174757265202773272076616c60008201527f7565000000000000000000000000000000000000000000000000000000000000602082015250565b7f5374616d707553746f72653a20696e73756666696369656e742065746820616d60008201527f6f756e7400000000000000000000000000000000000000000000000000000000602082015250565b7f5374616d707553746f72653a206e6f742077686974656c6973746564206f722060008201527f696e76616c6964207369676e6174757265000000000000000000000000000000602082015250565b7f5374616d707553746f72653a206661696c656420746f2073656e6420636f6c6c60008201527f6563746564206665657300000000000000000000000000000000000000000000602082015250565b7f45434453413a20696e76616c6964207369676e6174757265202776272076616c60008201527f7565000000000000000000000000000000000000000000000000000000000000602082015250565b7f5374616d707553746f72653a20696e76616c696420706c6174666f726d20666560008201527f6500000000000000000000000000000000000000000000000000000000000000602082015250565b7f5374616d707553746f72653a2070726573616c65206973206e6f74206163746960008201527f7665000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5374616d707553746f72653a206578636565647320616c6c6f7765642062757960008201527f206c696d69740000000000000000000000000000000000000000000000000000602082015250565b7f5374616d707553746f72653a20696e73756666696369656e742073746f72652060008201527f62616c616e636500000000000000000000000000000000000000000000000000602082015250565b50565b7f5374616d707553746f72653a20696e707574206c656e6774687320646f206e6f60008201527f74206d6174636800000000000000000000000000000000000000000000000000602082015250565b60007aff0000000000000000000000000000000000000000000000000000613d73846137ea565b9350801983169250808416831791505092915050565b600073ffffffffffffffffffffffffffffffffffffffff613da9846137b6565b9350801983169250808416831791505092915050565b600075ffff0000000000000000000000000000000000000000613de1846137c3565b9350801983169250808416831791505092915050565b600077ffff00000000000000000000000000000000000000000000613e1b846137d0565b9350801983169250808416831791505092915050565b600079ffff000000000000000000000000000000000000000000000000613e57846137dd565b9350801983169250808416831791505092915050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff613e99846137b6565b9350801983169250808416831791505092915050565b613eb88261347d565b613ecb613ec482613725565b8354613d89565b8255505050565b613edc828261351c565b5050565b613ee9826134e9565b613efc613ef582613739565b8354613e6d565b8255505050565b613f0c826134d7565b613f1f613f188261372f565b8354613dbf565b8255505050565b613f2f826134d7565b613f42613f3b8261372f565b8354613df7565b8255505050565b613f52826134d7565b613f65613f5e8261372f565b8354613e31565b8255505050565b613f75826134fb565b613f88613f8182613743565b8354613d4c565b8255505050565b613f98816133d2565b8114613fa357600080fd5b50565b613faf816133e4565b8114613fba57600080fd5b50565b613fc6816133f6565b8114613fd157600080fd5b50565b613fdd8161340c565b8114613fe857600080fd5b50565b613ff481613438565b8114613fff57600080fd5b50565b61400b81613466565b811461401657600080fd5b50565b61402281613470565b811461402d57600080fd5b5056fea264697066735822122081a3cf2f59c3171c411ddfc8cca0cdda0f29658cf20eae8acecd4dfba09bdcf664736f6c63430008040033

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

000000000000000000000000aa9ae09510462cebcfdce50cb900fa83f38a23c00000000000000000000000003adb234de37849b00fdf68fc9b335123a2bc2a29

-----Decoded View---------------
Arg [0] : _stampuAddress (address): 0xAa9ae09510462cEBcfdCE50Cb900Fa83f38A23C0
Arg [1] : _whitelistAdmin (address): 0x3ADb234De37849b00FDf68fc9b335123A2Bc2a29

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000aa9ae09510462cebcfdce50cb900fa83f38a23c0
Arg [1] : 0000000000000000000000003adb234de37849b00fdf68fc9b335123a2bc2a29


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  ]
[ 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.