Contract 0x86232f68b5bf2a3a03851d98556352512a3b12b9 9

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x1f7ace2bf7932532f83d6ec5c59aed984db56aa70ba7c9e95a5d34bfc5b324770xafd76a0b444797422022-08-08 14:05:3747 secs ago0xdfb3ea4a2f0e62ea1b9ab85004d01542e360b060 IN  tofuNFT: Marketplace0 FTM0.006786762605
0x5f742dccf828a65d85b4bf9a473f55b97bb7f929ec74e5fd7055d8cd17d0bf1e0xafd76a0b444780822022-08-08 13:29:5036 mins ago0xda42548f7b938c21c437e96d283a1c0031602ace IN  tofuNFT: Marketplace0 FTM0.001355807449
0xaa14b54b3fc73eca64978cf8173287731e5111d4913816d5f56d9a4fe3fdffe10xba847759444779892022-08-08 13:27:4938 mins ago0xa7bdd1e97491a997112a07af6adce00e09e12540 IN  tofuNFT: Marketplace7 FTM0.01931517
0xb1943c0de4f43b0ad5f039cdd518e154224a15c28943b5ca7c676b8498d493ce0xba847759444778302022-08-08 13:24:4141 mins ago0xa7bdd1e97491a997112a07af6adce00e09e12540 IN  tofuNFT: Marketplace6 FTM0.012128346
0x2cb4d00ba28a81b73ca1775d54e4c9234dcae0c8194532f396379d1d1643eaa60xba847759444778222022-08-08 13:24:3241 mins ago0xa7bdd1e97491a997112a07af6adce00e09e12540 IN  tofuNFT: Marketplace5 FTM0.012128697
0x118a432c7d7b3817721fa630dfdd3748325c0f948e5896cfa87449b7a6bd2d460xba847759444778112022-08-08 13:24:1742 mins ago0xa7bdd1e97491a997112a07af6adce00e09e12540 IN  tofuNFT: Marketplace5 FTM0.010332129
0xb7dd1062331cac7ec80429e4dc267606018c894eb29836acc6dd9419ed0e12150xba847759444778022022-08-08 13:24:0642 mins ago0xa7bdd1e97491a997112a07af6adce00e09e12540 IN  tofuNFT: Marketplace5 FTM0.010332037
0x4f731cbb0fee332814b4f1ac09280805bae69e36bf5987f895a7db387d052e420xba847759444777912022-08-08 13:23:5442 mins ago0xa7bdd1e97491a997112a07af6adce00e09e12540 IN  tofuNFT: Marketplace5 FTM0.01033137
0x36540fed6842dd8308471449f66ee0e35f1f1f49cf65583aa1e2a50e4ad45a610xba847759444777812022-08-08 13:23:4142 mins ago0xa7bdd1e97491a997112a07af6adce00e09e12540 IN  tofuNFT: Marketplace5 FTM0.010792175
0x58226353e19d6f060e9c7206f35ab42966d4a022f5f7d2b56ef1c9c0b4dac23f0xba847759444777692022-08-08 13:23:2742 mins ago0xa7bdd1e97491a997112a07af6adce00e09e12540 IN  tofuNFT: Marketplace5 FTM0.009752295
0xb788d10a264b9f89b903cf6b23bc8d949acd0d7846cf497558bc2bd31c32f7cf0xba847759444777592022-08-08 13:23:1743 mins ago0xa7bdd1e97491a997112a07af6adce00e09e12540 IN  tofuNFT: Marketplace5 FTM0.009853452
0x372c684489049c8aa98efc25f6a0b543c36b77c6f769dad22d627263433b02f50xba847759444777512022-08-08 13:23:0743 mins ago0xa7bdd1e97491a997112a07af6adce00e09e12540 IN  tofuNFT: Marketplace5 FTM0.009853011
0x2ec3697e1ab9baba4d98c3a302f7fe3910784011dd90ec4b6674effe634ed33d0xba847759444777402022-08-08 13:22:5443 mins ago0xa7bdd1e97491a997112a07af6adce00e09e12540 IN  tofuNFT: Marketplace4.5 FTM0.009853536
0x416e186c7a480e2ddcd79c72752ce3d3beb46dd999f99c962ea52923ce3e4c100xba847759444777302022-08-08 13:22:4243 mins ago0xa7bdd1e97491a997112a07af6adce00e09e12540 IN  tofuNFT: Marketplace4.25 FTM0.009433683
0xca7b334ab3fba97c981c2614a4916f653004c0717d833ab93a9acd490bb4a1cc0xba847759444777182022-08-08 13:22:3043 mins ago0xa7bdd1e97491a997112a07af6adce00e09e12540 IN  tofuNFT: Marketplace4 FTM0.009751938
0x5d3419bd66d6cc0bdae78242c7cfb95d04823c23b24db8d4e850b427305c93500xba847759444777082022-08-08 13:22:1844 mins ago0xa7bdd1e97491a997112a07af6adce00e09e12540 IN  tofuNFT: Marketplace4 FTM0.00985257
0x6308ef05634cd1665708ff2daf82ace32689f910f3ffbe0a0824bdc2c8be40440xba847759444776722022-08-08 13:21:2944 mins ago0xa7bdd1e97491a997112a07af6adce00e09e12540 IN  tofuNFT: Marketplace4 FTM0.00703755
0xa5b342cd4ffdc248fc004004671d8cf6cef15adcfed801c659810bc1a9adb5ea0xba847759444776612022-08-08 13:21:1745 mins ago0xa7bdd1e97491a997112a07af6adce00e09e12540 IN  tofuNFT: Marketplace4 FTM0.00703824
0xff4e91e264c35d74970dbd39054638b757fca2c7f1e3117a4bf1cbb7bc13c4870xba847759444776162022-08-08 13:20:2945 mins ago0xa7bdd1e97491a997112a07af6adce00e09e12540 IN  tofuNFT: Marketplace4 FTM0.007507456
0xde76f26679178dcabc996ff8705903d5f3ec8b3e03e201361c52c6561cc8835a0xba847759444776052022-08-08 13:20:1746 mins ago0xa7bdd1e97491a997112a07af6adce00e09e12540 IN  tofuNFT: Marketplace3.99 FTM0.006568674
0xbcf2329d9e419d7b71b95ed08b67a35aa511a58198ec7bf94da6ac4468151cb00xba847759444775932022-08-08 13:20:0346 mins ago0xa7bdd1e97491a997112a07af6adce00e09e12540 IN  tofuNFT: Marketplace3.5 FTM0.006222216
0x0697bcf6b0eebae44f8927288e573ea6bc29a9d2558757faf40a5e1de61cdd3c0xba847759444775832022-08-08 13:19:5246 mins ago0xa7bdd1e97491a997112a07af6adce00e09e12540 IN  tofuNFT: Marketplace3.45 FTM0.006289248
0x216270347bffae55f3d81e415c4d53d87519940d0f24baae70c3b014fd1859160xba847759444775602022-08-08 13:19:2746 mins ago0xa7bdd1e97491a997112a07af6adce00e09e12540 IN  tofuNFT: Marketplace3 FTM0.010781064
0xd07c19fa108bace58bc162979cdbb4602c02a320004d041d5ffe2f864759d25b0xba847759444771132022-08-08 13:08:1158 mins ago0xc4b08bd23dd53f14323ab9d3caccfd2607eb064e IN  tofuNFT: Marketplace0 FTM0.00105964798
0x6c5fa033a00561ee416c6d04a1462f9849761c84da5a62cf03785ce116cf37950xba847759444770732022-08-08 13:07:2359 mins ago0xc4b08bd23dd53f14323ab9d3caccfd2607eb064e IN  tofuNFT: Marketplace0 FTM0.001071913401
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0xaa14b54b3fc73eca64978cf8173287731e5111d4913816d5f56d9a4fe3fdffe1444779892022-08-08 13:27:4938 mins ago tofuNFT: Marketplace0xd3cca77cd6dc2794f431ae435323dbe6f9bd82c30.175 FTM
0xaa14b54b3fc73eca64978cf8173287731e5111d4913816d5f56d9a4fe3fdffe1444779892022-08-08 13:27:4938 mins ago Fantom Finance: Wrapped Fantom Token tofuNFT: Marketplace0.175 FTM
0xaa14b54b3fc73eca64978cf8173287731e5111d4913816d5f56d9a4fe3fdffe1444779892022-08-08 13:27:4938 mins ago tofuNFT: Marketplace0x30a26c2837e9ad41ea5955949f00402dbf86f1246.825 FTM
0xaa14b54b3fc73eca64978cf8173287731e5111d4913816d5f56d9a4fe3fdffe1444779892022-08-08 13:27:4938 mins ago Fantom Finance: Wrapped Fantom Token tofuNFT: Marketplace6.825 FTM
0xaa14b54b3fc73eca64978cf8173287731e5111d4913816d5f56d9a4fe3fdffe1444779892022-08-08 13:27:4938 mins ago tofuNFT: Marketplace Fantom Finance: Wrapped Fantom Token7 FTM
0xb1943c0de4f43b0ad5f039cdd518e154224a15c28943b5ca7c676b8498d493ce444778302022-08-08 13:24:4141 mins ago tofuNFT: Marketplace0xd3cca77cd6dc2794f431ae435323dbe6f9bd82c30.15 FTM
0xb1943c0de4f43b0ad5f039cdd518e154224a15c28943b5ca7c676b8498d493ce444778302022-08-08 13:24:4141 mins ago Fantom Finance: Wrapped Fantom Token tofuNFT: Marketplace0.15 FTM
0xb1943c0de4f43b0ad5f039cdd518e154224a15c28943b5ca7c676b8498d493ce444778302022-08-08 13:24:4141 mins ago tofuNFT: Marketplace0x4b35a52e0ae2aed2f87d242088edaefb2c4304ae5.85 FTM
0xb1943c0de4f43b0ad5f039cdd518e154224a15c28943b5ca7c676b8498d493ce444778302022-08-08 13:24:4141 mins ago Fantom Finance: Wrapped Fantom Token tofuNFT: Marketplace5.85 FTM
0xb1943c0de4f43b0ad5f039cdd518e154224a15c28943b5ca7c676b8498d493ce444778302022-08-08 13:24:4141 mins ago tofuNFT: Marketplace Fantom Finance: Wrapped Fantom Token6 FTM
0x2cb4d00ba28a81b73ca1775d54e4c9234dcae0c8194532f396379d1d1643eaa6444778222022-08-08 13:24:3241 mins ago tofuNFT: Marketplace0xd3cca77cd6dc2794f431ae435323dbe6f9bd82c30.125 FTM
0x2cb4d00ba28a81b73ca1775d54e4c9234dcae0c8194532f396379d1d1643eaa6444778222022-08-08 13:24:3241 mins ago Fantom Finance: Wrapped Fantom Token tofuNFT: Marketplace0.125 FTM
0x2cb4d00ba28a81b73ca1775d54e4c9234dcae0c8194532f396379d1d1643eaa6444778222022-08-08 13:24:3241 mins ago tofuNFT: Marketplace0x0bdea74fa7a7b8f03986c2933c7461fd0e4bb0c04.875 FTM
0x2cb4d00ba28a81b73ca1775d54e4c9234dcae0c8194532f396379d1d1643eaa6444778222022-08-08 13:24:3241 mins ago Fantom Finance: Wrapped Fantom Token tofuNFT: Marketplace4.875 FTM
0x2cb4d00ba28a81b73ca1775d54e4c9234dcae0c8194532f396379d1d1643eaa6444778222022-08-08 13:24:3241 mins ago tofuNFT: Marketplace Fantom Finance: Wrapped Fantom Token5 FTM
0x118a432c7d7b3817721fa630dfdd3748325c0f948e5896cfa87449b7a6bd2d46444778112022-08-08 13:24:1742 mins ago tofuNFT: Marketplace0xd3cca77cd6dc2794f431ae435323dbe6f9bd82c30.125 FTM
0x118a432c7d7b3817721fa630dfdd3748325c0f948e5896cfa87449b7a6bd2d46444778112022-08-08 13:24:1742 mins ago Fantom Finance: Wrapped Fantom Token tofuNFT: Marketplace0.125 FTM
0x118a432c7d7b3817721fa630dfdd3748325c0f948e5896cfa87449b7a6bd2d46444778112022-08-08 13:24:1742 mins ago tofuNFT: Marketplace0x0bdea74fa7a7b8f03986c2933c7461fd0e4bb0c04.875 FTM
0x118a432c7d7b3817721fa630dfdd3748325c0f948e5896cfa87449b7a6bd2d46444778112022-08-08 13:24:1742 mins ago Fantom Finance: Wrapped Fantom Token tofuNFT: Marketplace4.875 FTM
0x118a432c7d7b3817721fa630dfdd3748325c0f948e5896cfa87449b7a6bd2d46444778112022-08-08 13:24:1742 mins ago tofuNFT: Marketplace Fantom Finance: Wrapped Fantom Token5 FTM
0xb7dd1062331cac7ec80429e4dc267606018c894eb29836acc6dd9419ed0e1215444778022022-08-08 13:24:0642 mins ago tofuNFT: Marketplace0xd3cca77cd6dc2794f431ae435323dbe6f9bd82c30.125 FTM
0xb7dd1062331cac7ec80429e4dc267606018c894eb29836acc6dd9419ed0e1215444778022022-08-08 13:24:0642 mins ago Fantom Finance: Wrapped Fantom Token tofuNFT: Marketplace0.125 FTM
0xb7dd1062331cac7ec80429e4dc267606018c894eb29836acc6dd9419ed0e1215444778022022-08-08 13:24:0642 mins ago tofuNFT: Marketplace0x0bdea74fa7a7b8f03986c2933c7461fd0e4bb0c04.875 FTM
0xb7dd1062331cac7ec80429e4dc267606018c894eb29836acc6dd9419ed0e1215444778022022-08-08 13:24:0642 mins ago Fantom Finance: Wrapped Fantom Token tofuNFT: Marketplace4.875 FTM
0xb7dd1062331cac7ec80429e4dc267606018c894eb29836acc6dd9419ed0e1215444778022022-08-08 13:24:0642 mins ago tofuNFT: Marketplace Fantom Finance: Wrapped Fantom Token5 FTM
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MarketNG

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 100 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 16 : MarketNG.sol
// SPDX-License-Identifier: Unlicensed

pragma solidity ^0.8.0;
pragma abicoder v2;

import './IWETH.sol';
import './IMintable.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/security/Pausable.sol';
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
import '@openzeppelin/contracts/token/ERC1155/IERC1155.sol';
import '@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol';
import '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';
import '@openzeppelin/contracts/token/ERC721/IERC721.sol';
import '@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol';
import '@openzeppelin/contracts/utils/Address.sol';
import '@openzeppelin/contracts/utils/cryptography/ECDSA.sol';
import '@openzeppelin/contracts/utils/introspection/IERC165.sol';

contract MarketNG is IERC721Receiver, IERC1155Receiver, ReentrancyGuard, Ownable, Pausable {
    using SafeERC20 for IERC20;

    uint8 public constant KIND_SELL = 1;
    uint8 public constant KIND_BUY = 2;
    uint8 public constant KIND_AUCTION = 3;

    uint8 public constant STATUS_OPEN = 0;
    uint8 public constant STATUS_DONE = 1;
    uint8 public constant STATUS_CANCELLED = 2;

    uint8 public constant OP_MIN = 0; // invalid, for checks only
    uint8 public constant OP_COMPLETE_SELL = 1; // complete sell (off-chain)
    uint8 public constant OP_COMPLETE_BUY = 2; // complete buy (off-chain)
    uint8 public constant OP_BUY = 3; // create KIND_BUY
    uint8 public constant OP_ACCEPT_BUY = 4; // complete KIND_BUY
    uint8 public constant OP_CANCEL_BUY = 5; // cancel KIND_BUY
    uint8 public constant OP_REJECT_BUY = 6; // reject KIND_BUY
    uint8 public constant OP_BID = 7; // bid (create or update KIND_AUCTION)
    uint8 public constant OP_COMPLETE_AUCTION = 8; // complete auction (by anyone)
    uint8 public constant OP_ACCEPT_AUCTION = 9; // accept auction in an early stage (by seller)
    uint8 public constant OP_MAX = 10;

    uint8 public constant TOKEN_MINT = 0; // mint token (do anything)
    uint8 public constant TOKEN_721 = 1; // 721 token
    uint8 public constant TOKEN_1155 = 2; // 1155 token

    uint256 public constant RATE_BASE = 1e6;

    struct Pair721 {
        // swap only
        IERC721 token;
        uint256 tokenId;
    }

    struct TokenPair {
        address token; // token contract address
        uint256 tokenId; // token id (if applicable)
        uint256 amount; // token amount (if applicable)
        uint8 kind; // token kind (721/1151/mint)
        bytes mintData; // mint data (if applicable)
    }

    struct Inventory {
        address seller;
        address buyer;
        IERC20 currency;
        uint256 price; // display price
        uint256 netPrice; // actual price (auction: minus incentive)
        uint256 deadline; // deadline for the inventory
        uint8 kind;
        uint8 status;
    }

    struct Intention {
        address user;
        TokenPair[] bundle;
        IERC20 currency;
        uint256 price;
        uint256 deadline;
        bytes32 salt;
        uint8 kind;
    }

    struct Detail {
        bytes32 intentionHash;
        address signer;
        uint256 txDeadline; // deadline for the transaction
        bytes32 salt;
        uint256 id; // inventory id
        uint8 opcode; // OP_*
        address caller;
        IERC20 currency;
        uint256 price;
        uint256 incentiveRate;
        Settlement settlement;
        TokenPair[] bundle;
        uint256 deadline; // deadline for buy offer
    }

    struct Settlement {
        uint256[] coupons;
        uint256 feeRate;
        uint256 royaltyRate;
        uint256 buyerCashbackRate;
        address feeAddress;
        address royaltyAddress;
    }

    struct Swap {
        bytes32 salt;
        address creator;
        uint256 deadline;
        Pair721[] has;
        Pair721[] wants;
    }

    // events

    event EvCouponSpent(uint256 indexed id, uint256 indexed couponId);
    event EvInventoryUpdate(uint256 indexed id, Inventory inventory);
    event EvAuctionRefund(uint256 indexed id, address bidder, uint256 refund);
    event EvSettingsUpdated();
    event EvMarketSignerUpdate(address addr, bool isRemoval);
    event EvSwapped(Swap req, bytes signature, address swapper);

    // vars

    IWETH public immutable weth;

    mapping(uint256 => Inventory) public inventories;
    mapping(uint256 => bool) public couponSpent;
    mapping(uint256 => mapping(uint256 => TokenPair)) public inventoryTokens;
    mapping(uint256 => uint256) public inventoryTokenCounts;
    mapping(address => bool) public marketSigners;

    // initialized with default value
    uint256 public minAuctionIncrement = (5 * RATE_BASE) / 100;
    uint256 public minAuctionDuration = 10 * 60;

    // internal vars
    bool internal _canReceive = false;

    // constructor

    constructor(IWETH weth_) {
        weth = weth_;
    }

    function updateSettings(uint256 minAuctionIncrement_, uint256 minAuctionDuration_)
        public
        onlyOwner
    {
        minAuctionDuration = minAuctionDuration_;
        minAuctionIncrement = minAuctionIncrement_;
        emit EvSettingsUpdated();
    }

    function updateSigner(address addr, bool remove) public onlyOwner {
        if (remove) {
            delete marketSigners[addr];
        } else {
            marketSigners[addr] = true;
        }
        emit EvMarketSignerUpdate(addr, remove);
    }

    // impls

    receive() external payable {}

    function pause() public onlyOwner {
        _pause();
    }

    function unpause() public onlyOwner {
        _unpause();
    }

    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external view override _onTransferOnly returns (bytes4) {
        (operator);
        (from);
        (tokenId);
        (data);
        return this.onERC721Received.selector;
    }

    function onERC1155Received(
        address operator,
        address from,
        uint256 id,
        uint256 value,
        bytes calldata data
    ) external view override _onTransferOnly returns (bytes4) {
        (operator);
        (from);
        (id);
        (value);
        (data);
        return this.onERC1155Received.selector;
    }

    function onERC1155BatchReceived(
        address operator,
        address from,
        uint256[] calldata ids,
        uint256[] calldata values,
        bytes calldata data
    ) external view override _onTransferOnly returns (bytes4) {
        (operator);
        (from);
        (ids);
        (values);
        (data);
        return this.onERC1155BatchReceived.selector;
    }

    modifier _onTransferOnly() {
        require(_canReceive, 'can not transfer token directly');
        _;
    }

    modifier _allowTransfer() {
        _canReceive = true;
        _;
        _canReceive = false;
    }

    // public

    function supportsInterface(bytes4 interfaceId) external pure override returns (bool) {
        return
            (interfaceId == type(IERC721Receiver).interfaceId) ||
            (interfaceId == type(IERC1155Receiver).interfaceId);
    }

    function run(
        Intention calldata intent,
        Detail calldata detail,
        bytes calldata sigIntent,
        bytes calldata sigDetail
    ) public payable nonReentrant whenNotPaused {
        require(detail.txDeadline > block.timestamp, 'transaction deadline reached');
        require(marketSigners[detail.signer], 'unknown market signer');

        _validateOpCode(detail.opcode);
        require(
            isSignatureValid(sigDetail, keccak256(abi.encode(detail)), detail.signer),
            'offer signature error'
        );

        if (hasSignedIntention(detail.opcode)) {
            bytes memory encodedInt = abi.encode(intent);
            require(keccak256(encodedInt) == detail.intentionHash, 'intention hash does not match');
            require(
                isSignatureValid(sigIntent, keccak256(encodedInt), intent.user),
                'intention signature error'
            );
        }

        if (detail.opcode == OP_COMPLETE_SELL) {
            _assertSender(detail.caller);
            require(intent.kind == KIND_SELL, 'intent.kind should be KIND_SELL');
            _newSellDeal(
                detail.id,
                intent.user,
                intent.bundle,
                intent.currency,
                intent.price,
                intent.deadline,
                detail.caller,
                detail.settlement
            );
        } else if (detail.opcode == OP_COMPLETE_BUY) {
            _assertSender(detail.caller);
            require(intent.kind == KIND_BUY, 'intent.kind should be KIND_BUY');
            _newBuyDeal(
                detail.id,
                intent.user, // buyer
                detail.caller, // seller
                intent.bundle,
                intent.currency,
                intent.price,
                intent.deadline,
                detail.settlement
            );
        } else if (detail.opcode == OP_BUY) {
            _assertSender(detail.caller);
            _newBuy(
                detail.id,
                detail.caller,
                detail.currency,
                detail.price,
                detail.bundle,
                detail.deadline
            );
        } else if (detail.opcode == OP_ACCEPT_BUY) {
            _assertSender(detail.caller);
            _acceptBuy(detail.id, detail.caller, detail.settlement);
        } else if (detail.opcode == OP_CANCEL_BUY) {
            _cancelBuyAnyway(detail.id);
        } else if (detail.opcode == OP_REJECT_BUY) {
            _rejectBuy(detail.id);
        } else if (detail.opcode == OP_BID) {
            _assertSender(detail.caller);
            require(intent.kind == KIND_AUCTION, 'intent.kind should be KIND_AUCTION');
            _bid(
                detail.id,
                intent.user,
                intent.bundle,
                intent.currency,
                intent.price,
                intent.deadline,
                detail.caller,
                detail.price,
                detail.incentiveRate
            );
        } else if (detail.opcode == OP_COMPLETE_AUCTION) {
            _completeAuction(detail.id, detail.settlement);
        } else if (detail.opcode == OP_ACCEPT_AUCTION) {
            _assertSender(detail.caller);
            require(detail.caller == intent.user, 'only seller can call');
            _acceptAuction(detail.id, detail.settlement);
        } else {
            revert('impossible');
        }
    }

    function cancelBuys(uint256[] calldata ids) public nonReentrant whenNotPaused {
        for (uint256 i = 0; i < ids.length; i++) {
            _cancelBuy(ids[i]);
        }
    }

    function inCaseMoneyGetsStuck(address to, IERC20 currency, uint256 amount) public onlyOwner {
        _transfer(currency, to, amount);
    }

    // emergency method for flaky contracts
    function emergencyCancelAuction(uint256 id, bool noBundle) public onlyOwner {
        require(isAuction(id), 'not auction');
        require(isStatusOpen(id), 'not open');
        Inventory storage inv = inventories[id];

        if (!noBundle) {
            _transferBundle(id, address(this), inv.seller, false);
        }
        _transfer(inv.currency, inv.buyer, inv.netPrice);

        inv.status = STATUS_CANCELLED;
        emit EvInventoryUpdate(id, inv);
    }

    function swap(Swap memory req, bytes memory signature) public nonReentrant whenNotPaused {
        require(req.deadline > block.timestamp, 'deadline reached');
        require(
            isSignatureValid(signature, keccak256(abi.encode(req)), req.creator),
            'signature error'
        );

        for (uint256 i = 0; i < req.wants.length; i++) {
            req.wants[i].token.safeTransferFrom(msg.sender, req.creator, req.wants[i].tokenId);
        }

        for (uint256 i = 0; i < req.has.length; i++) {
            req.has[i].token.safeTransferFrom(req.creator, msg.sender, req.has[i].tokenId);
        }

        emit EvSwapped(req, signature, msg.sender);
    }

    function send(address to, Pair721[] memory tokens) public nonReentrant whenNotPaused {
        for (uint256 i = 0; i < tokens.length; i++) {
            Pair721 memory p = tokens[i];
            p.token.safeTransferFrom(msg.sender, to, p.tokenId);
        }
    }

    // internal

    function _assertSender(address sender) internal view {
        require(sender == msg.sender, 'wrong sender');
    }

    function _validateOpCode(uint8 opCode) internal pure {
        require(opCode > OP_MIN && opCode < OP_MAX, 'invalid opcode');
    }

    function _saveBundle(uint256 invId, TokenPair[] calldata bundle) internal {
        require(bundle.length > 0, 'empty bundle');
        inventoryTokenCounts[invId] = bundle.length;
        for (uint256 i = 0; i < bundle.length; i++) {
            inventoryTokens[invId][i] = bundle[i];
        }
    }

    // buyer create
    function _newBuy(
        uint256 id,
        address buyer,
        IERC20 currency,
        uint256 price,
        TokenPair[] calldata bundle,
        uint256 deadline
    ) internal {
        require(!hasInv(id), 'inventoryId already exists');
        require(deadline > block.timestamp, 'deadline must be greater than now');
        _saveBundle(id, bundle);

        if (_isNative(currency)) {
            require(price == msg.value, 'price == msg.value');
            weth.deposit{value: price}(); // convert to erc20 (weth)
        } else {
            currency.safeTransferFrom(buyer, address(this), price);
        }

        inventories[id] = Inventory({
            seller: address(0),
            buyer: buyer,
            currency: currency,
            price: price,
            netPrice: price,
            kind: KIND_BUY,
            status: STATUS_OPEN,
            deadline: deadline
        });
        emit EvInventoryUpdate(id, inventories[id]);
    }

    // buyer cancel/expired
    function _cancelBuy(uint256 id) internal {
        Inventory storage inv = inventories[id];
        require(inv.buyer == msg.sender || isExpired(id), 'caller is not buyer');
        _cancelBuyAnyway(id);
    }

    // cancel without checking caller
    function _cancelBuyAnyway(uint256 id) internal {
        require(isBuy(id) && isStatusOpen(id), 'not open buy');
        Inventory storage inv = inventories[id];

        inv.status = STATUS_CANCELLED;
        _transfer(inv.currency, inv.buyer, inv.netPrice);

        emit EvInventoryUpdate(id, inventories[id]);
    }

    function _rejectBuy(uint256 id) internal {
        address caller = msg.sender;
        require(isBuy(id) && isStatusOpen(id), 'not open buy');

        for (uint256 i = 0; i < inventoryTokenCounts[id]; i++) {
            TokenPair storage p = inventoryTokens[id][i];
            if (p.kind == TOKEN_721) {
                IERC721 t = IERC721(p.token);
                require(t.ownerOf(p.tokenId) == caller, 'caller does not own token');
            } else {
                revert('cannot reject non-721 token');
            }
        }

        _cancelBuyAnyway(id);
    }

    // seller call
    function _acceptBuy(
        uint256 id,
        address seller,
        Settlement calldata settlement
    ) internal {
        require(isBuy(id), 'id does not exist');
        Inventory storage inv = inventories[id];
        require(isStatusOpen(id), 'not open');
        require(isBundleApproved(id, seller), 'bundle not approved');
        require(!isExpired(id), 'buy offer expired');

        inv.status = STATUS_DONE;
        inv.seller = seller;
        _transferBundle(id, seller, inv.buyer, true);

        emit EvInventoryUpdate(id, inventories[id]);
        _completeTransaction(id, settlement);
    }

    function _newBuyDeal(
        uint256 id,
        address buyer,
        address seller,
        TokenPair[] calldata bundle,
        IERC20 currency,
        uint256 price,
        uint256 deadline,
        Settlement calldata settlement
    ) internal {
        require(!hasInv(id), 'inventory already exists');
        require(deadline > block.timestamp, 'buy has already ended');
        require(!_isNative(currency), 'cannot use native token');

        _saveBundle(id, bundle);
        _transferBundle(id, seller, buyer, true);
        currency.safeTransferFrom(buyer, address(this), price);

        inventories[id] = Inventory({
            seller: seller,
            buyer: buyer,
            currency: currency,
            price: price,
            netPrice: price,
            kind: KIND_BUY,
            status: STATUS_DONE,
            deadline: deadline
        });
        emit EvInventoryUpdate(id, inventories[id]);

        _completeTransaction(id, settlement);
    }

    // new sell deal / new auction direct buy
    function _newSellDeal(
        uint256 id,
        address seller,
        TokenPair[] calldata bundle,
        IERC20 currency,
        uint256 price,
        uint256 deadline,
        address buyer,
        Settlement calldata settlement
    ) internal {
        require(!hasInv(id), 'duplicate id');
        require(deadline > block.timestamp, 'sell has already ended');

        _saveBundle(id, bundle);
        _transferBundle(id, seller, buyer, true);

        if (_isNative(currency)) {
            require(price == msg.value, 'price == msg.value');
            weth.deposit{value: price}(); // convert to erc20 (weth)
        } else {
            currency.safeTransferFrom(buyer, address(this), price);
        }

        inventories[id] = Inventory({
            seller: seller,
            buyer: buyer,
            currency: currency,
            price: price,
            netPrice: price,
            kind: KIND_SELL,
            status: STATUS_DONE,
            deadline: deadline
        });
        emit EvInventoryUpdate(id, inventories[id]);

        _completeTransaction(id, settlement);
    }

    function _bid(
        uint256 id,
        address seller,
        TokenPair[] calldata bundle,
        IERC20 currency,
        uint256 startPrice,
        uint256 deadline,
        address buyer,
        uint256 price,
        uint256 incentiveRate
    ) internal _allowTransfer {
        require(incentiveRate < RATE_BASE, 'incentiveRate too large');

        if (_isNative(currency)) {
            require(price == msg.value, 'price == msg.value');
            weth.deposit{value: price}(); // convert to erc20 (weth)
        } else {
            currency.safeTransferFrom(buyer, address(this), price);
        }

        if (isAuction(id)) {
            Inventory storage auc = inventories[id];
            require(auc.seller == seller, 'seller does not match'); // TODO check more
            require(auc.status == STATUS_OPEN, 'auction not open');
            require(auc.deadline > block.timestamp, 'auction ended');

            require(
                price >= auc.price + ((auc.price * minAuctionIncrement) / RATE_BASE),
                'bid price too low'
            );

            uint256 incentive = (price * incentiveRate) / RATE_BASE;
            _transfer(currency, auc.buyer, auc.netPrice + incentive);
            emit EvAuctionRefund(id, auc.buyer, auc.netPrice + incentive);

            auc.buyer = buyer;
            auc.price = price;
            auc.netPrice = price - incentive;

            if (block.timestamp + minAuctionDuration >= auc.deadline) {
                auc.deadline += minAuctionDuration;
            }
        } else {
            require(!hasInv(id), 'inventory is not auction');
            require(price >= startPrice, 'bid lower than start price');
            require(deadline > block.timestamp, 'auction ended');

            uint256 deadline0 = deadline;
            if (block.timestamp + minAuctionDuration >= deadline) {
                deadline0 += minAuctionDuration;
            }

            inventories[id] = Inventory({
                seller: seller,
                buyer: buyer,
                currency: currency,
                price: price,
                netPrice: price,
                deadline: deadline0,
                status: STATUS_OPEN,
                kind: KIND_AUCTION
            });
            _saveBundle(id, bundle);
            _transferBundle(id, seller, address(this), false);
        }
        emit EvInventoryUpdate(id, inventories[id]);
    }

    function _completeAuction(uint256 id, Settlement calldata settlement) internal {
        require(inventories[id].deadline < block.timestamp, 'auction still going');
        _acceptAuction(id, settlement);
    }

    function _acceptAuction(uint256 id, Settlement calldata settlement) internal {
        require(isAuction(id), 'auction does not exist');
        require(isStatusOpen(id), 'auction not open');
        Inventory storage auc = inventories[id];

        auc.status = STATUS_DONE;
        emit EvInventoryUpdate(id, inventories[id]);
        _transferBundle(id, address(this), auc.buyer, true);
        _completeTransaction(id, settlement);
    }

    function _completeTransaction(uint256 id, Settlement calldata settlement) internal {
        Inventory storage inv = inventories[id];
        require(hasInv(id) && inv.status == STATUS_DONE, 'no inventory or state error'); // sanity

        _markCoupon(id, settlement.coupons);

        uint256 price = inv.price;
        uint256 fee = (price * settlement.feeRate) / RATE_BASE;
        uint256 royalty = (price * settlement.royaltyRate) / RATE_BASE;
        uint256 buyerAmount = (price * settlement.buyerCashbackRate) / RATE_BASE;
        uint256 sellerAmount = inv.netPrice - fee - royalty - buyerAmount;

        _transfer(inv.currency, inv.seller, sellerAmount);
        _transfer(inv.currency, inv.buyer, buyerAmount);
        _transfer(inv.currency, settlement.feeAddress, fee);
        _transfer(inv.currency, settlement.royaltyAddress, royalty);
    }

    function _markCoupon(uint256 invId, uint256[] calldata coupons) internal {
        for (uint256 i = 0; i < coupons.length; i++) {
            uint256 id = coupons[i];
            require(!couponSpent[id], 'coupon already spent');
            couponSpent[id] = true;
            emit EvCouponSpent(invId, id);
        }
    }

    function _isNative(IERC20 currency) internal pure returns (bool) {
        return address(currency) == address(0);
    }

    function _transfer(
        IERC20 currency,
        address to,
        uint256 amount
    ) internal {
        if (amount == 0) {
            return;
        }
        require(to != address(0), 'cannot transfer to address(0)');
        if (_isNative(currency)) {
            weth.withdraw(amount);
            payable(to).transfer(amount);
        } else {
            currency.safeTransfer(to, amount);
        }
    }

    function _transferBundle(
        uint256 invId,
        address from,
        address to,
        bool doMint
    ) internal {
        uint256 tokenCount = inventoryTokenCounts[invId];
        for (uint256 i = 0; i < tokenCount; i++) {
            TokenPair storage p = inventoryTokens[invId][i];
            if (p.kind == TOKEN_MINT) {
                if (doMint) {
                    // sanity check
                    require(
                        to != address(0) && to != address(this),
                        'mint target cannot be zero or market'
                    );
                    IMintable(p.token).mint(to, p.mintData);
                }
            } else if (p.kind == TOKEN_721) {
                IERC721(p.token).safeTransferFrom(from, to, p.tokenId);
            } else if (p.kind == TOKEN_1155) {
                IERC1155(p.token).safeTransferFrom(from, to, p.tokenId, p.amount, '');
            } else {
                revert('unsupported token');
            }
        }
    }

    // public helpers

    // also checks the right owner
    function isBundleApproved(uint256 invId, address owner) public view returns (bool) {
        require(hasInv(invId), 'no inventory');

        for (uint256 i = 0; i < inventoryTokenCounts[invId]; i++) {
            TokenPair storage p = inventoryTokens[invId][i];
            if (p.kind == TOKEN_MINT) {
                // pass
            } else if (p.kind == TOKEN_721) {
                IERC721 t = IERC721(p.token);
                if (
                    t.ownerOf(p.tokenId) == owner &&
                    (t.getApproved(p.tokenId) == address(this) ||
                        t.isApprovedForAll(owner, address(this)))
                ) {
                    // pass
                } else {
                    return false;
                }
            } else if (p.kind == TOKEN_1155) {
                IERC1155 t = IERC1155(p.token);
                if (
                    t.balanceOf(owner, p.tokenId) >= p.amount &&
                    t.isApprovedForAll(owner, address(this))
                ) {
                    // pass
                } else {
                    return false;
                }
            } else {
                revert('unsupported token');
            }
        }
        return true;
    }

    function isAuctionOpen(uint256 id) public view returns (bool) {
        return
            isAuction(id) &&
            inventories[id].status == STATUS_OPEN &&
            inventories[id].deadline > block.timestamp;
    }

    function isBuyOpen(uint256 id) public view returns (bool) {
        return
            isBuy(id) &&
            inventories[id].status == STATUS_OPEN &&
            inventories[id].deadline > block.timestamp;
    }

    function isAuction(uint256 id) public view returns (bool) {
        return inventories[id].kind == KIND_AUCTION;
    }

    function isBuy(uint256 id) public view returns (bool) {
        return inventories[id].kind == KIND_BUY;
    }

    function isSell(uint256 id) public view returns (bool) {
        return inventories[id].kind == KIND_SELL;
    }

    function hasInv(uint256 id) public view returns (bool) {
        return inventories[id].kind != 0;
    }

    function isStatusOpen(uint256 id) public view returns (bool) {
        return inventories[id].status == STATUS_OPEN;
    }

    function isExpired(uint256 id) public view returns (bool) {
        return block.timestamp >= inventories[id].deadline;
    }

    function isSignatureValid(
        bytes memory signature,
        bytes32 hash,
        address signer
    ) public pure returns (bool) {
        // verify hash signed via `personal_sign`
        return ECDSA.recover(ECDSA.toEthSignedMessageHash(hash), signature) == signer;
    }

    function hasSignedIntention(uint8 op) public pure returns (bool) {
        return op != OP_BUY && op != OP_CANCEL_BUY && op != OP_ACCEPT_BUY && op != OP_REJECT_BUY;
    }
}

File 2 of 16 : IWETH.sol
// SPDX-License-Identifier: Unlicensed

pragma solidity ^0.8.0;
pragma abicoder v2;

import '@openzeppelin/contracts/token/ERC20/IERC20.sol';

interface IWETH is IERC20 {
    function deposit() external payable;

    function withdraw(uint256 wad) external;
}

File 3 of 16 : IMintable.sol
// SPDX-License-Identifier: Unlicensed

pragma solidity ^0.8.0;
pragma abicoder v2;

interface IMintable {
    function mint(address to, bytes memory data) external;
}

File 4 of 16 : 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 16 : Pausable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor() {
        _paused = false;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        require(!paused(), "Pausable: paused");
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        require(paused(), "Pausable: not paused");
        _;
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

File 6 of 16 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

File 7 of 16 : 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 8 of 16 : 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 9 of 16 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 10 of 16 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 11 of 16 : IERC721.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

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

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool _approved) external;

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

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

File 12 of 16 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

File 13 of 16 : 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);
            }
        }
    }
}

File 14 of 16 : 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 15 of 16 : 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 16 of 16 : 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;
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IWETH","name":"weth_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"address","name":"bidder","type":"address"},{"indexed":false,"internalType":"uint256","name":"refund","type":"uint256"}],"name":"EvAuctionRefund","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"couponId","type":"uint256"}],"name":"EvCouponSpent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"components":[{"internalType":"address","name":"seller","type":"address"},{"internalType":"address","name":"buyer","type":"address"},{"internalType":"contract IERC20","name":"currency","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"netPrice","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"kind","type":"uint8"},{"internalType":"uint8","name":"status","type":"uint8"}],"indexed":false,"internalType":"struct MarketNG.Inventory","name":"inventory","type":"tuple"}],"name":"EvInventoryUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"addr","type":"address"},{"indexed":false,"internalType":"bool","name":"isRemoval","type":"bool"}],"name":"EvMarketSignerUpdate","type":"event"},{"anonymous":false,"inputs":[],"name":"EvSettingsUpdated","type":"event"},{"anonymous":false,"inputs":[{"components":[{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"address","name":"creator","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"components":[{"internalType":"contract IERC721","name":"token","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"internalType":"struct MarketNG.Pair721[]","name":"has","type":"tuple[]"},{"components":[{"internalType":"contract IERC721","name":"token","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"internalType":"struct MarketNG.Pair721[]","name":"wants","type":"tuple[]"}],"indexed":false,"internalType":"struct MarketNG.Swap","name":"req","type":"tuple"},{"indexed":false,"internalType":"bytes","name":"signature","type":"bytes"},{"indexed":false,"internalType":"address","name":"swapper","type":"address"}],"name":"EvSwapped","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"KIND_AUCTION","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"KIND_BUY","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"KIND_SELL","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OP_ACCEPT_AUCTION","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OP_ACCEPT_BUY","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OP_BID","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OP_BUY","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OP_CANCEL_BUY","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OP_COMPLETE_AUCTION","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OP_COMPLETE_BUY","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OP_COMPLETE_SELL","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OP_MAX","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OP_MIN","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OP_REJECT_BUY","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"RATE_BASE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STATUS_CANCELLED","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STATUS_DONE","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STATUS_OPEN","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TOKEN_1155","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TOKEN_721","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TOKEN_MINT","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"cancelBuys","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"couponSpent","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"bool","name":"noBundle","type":"bool"}],"name":"emergencyCancelAuction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"hasInv","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"op","type":"uint8"}],"name":"hasSignedIntention","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"contract IERC20","name":"currency","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"inCaseMoneyGetsStuck","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"inventories","outputs":[{"internalType":"address","name":"seller","type":"address"},{"internalType":"address","name":"buyer","type":"address"},{"internalType":"contract IERC20","name":"currency","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"netPrice","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"kind","type":"uint8"},{"internalType":"uint8","name":"status","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"inventoryTokenCounts","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"inventoryTokens","outputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint8","name":"kind","type":"uint8"},{"internalType":"bytes","name":"mintData","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"isAuction","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"isAuctionOpen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"invId","type":"uint256"},{"internalType":"address","name":"owner","type":"address"}],"name":"isBundleApproved","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"isBuy","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"isBuyOpen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"isExpired","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"isSell","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"bytes32","name":"hash","type":"bytes32"},{"internalType":"address","name":"signer","type":"address"}],"name":"isSignatureValid","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"isStatusOpen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"marketSigners","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minAuctionDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minAuctionIncrement","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"onERC1155BatchReceived","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"user","type":"address"},{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint8","name":"kind","type":"uint8"},{"internalType":"bytes","name":"mintData","type":"bytes"}],"internalType":"struct MarketNG.TokenPair[]","name":"bundle","type":"tuple[]"},{"internalType":"contract IERC20","name":"currency","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"uint8","name":"kind","type":"uint8"}],"internalType":"struct MarketNG.Intention","name":"intent","type":"tuple"},{"components":[{"internalType":"bytes32","name":"intentionHash","type":"bytes32"},{"internalType":"address","name":"signer","type":"address"},{"internalType":"uint256","name":"txDeadline","type":"uint256"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint8","name":"opcode","type":"uint8"},{"internalType":"address","name":"caller","type":"address"},{"internalType":"contract IERC20","name":"currency","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"incentiveRate","type":"uint256"},{"components":[{"internalType":"uint256[]","name":"coupons","type":"uint256[]"},{"internalType":"uint256","name":"feeRate","type":"uint256"},{"internalType":"uint256","name":"royaltyRate","type":"uint256"},{"internalType":"uint256","name":"buyerCashbackRate","type":"uint256"},{"internalType":"address","name":"feeAddress","type":"address"},{"internalType":"address","name":"royaltyAddress","type":"address"}],"internalType":"struct MarketNG.Settlement","name":"settlement","type":"tuple"},{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint8","name":"kind","type":"uint8"},{"internalType":"bytes","name":"mintData","type":"bytes"}],"internalType":"struct MarketNG.TokenPair[]","name":"bundle","type":"tuple[]"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"internalType":"struct MarketNG.Detail","name":"detail","type":"tuple"},{"internalType":"bytes","name":"sigIntent","type":"bytes"},{"internalType":"bytes","name":"sigDetail","type":"bytes"}],"name":"run","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"components":[{"internalType":"contract IERC721","name":"token","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"internalType":"struct MarketNG.Pair721[]","name":"tokens","type":"tuple[]"}],"name":"send","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[{"components":[{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"address","name":"creator","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"components":[{"internalType":"contract IERC721","name":"token","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"internalType":"struct MarketNG.Pair721[]","name":"has","type":"tuple[]"},{"components":[{"internalType":"contract IERC721","name":"token","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"internalType":"struct MarketNG.Pair721[]","name":"wants","type":"tuple[]"}],"internalType":"struct MarketNG.Swap","name":"req","type":"tuple"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"swap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"minAuctionIncrement_","type":"uint256"},{"internalType":"uint256","name":"minAuctionDuration_","type":"uint256"}],"name":"updateSettings","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"bool","name":"remove","type":"bool"}],"name":"updateSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"weth","outputs":[{"internalType":"contract IWETH","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

60a0604052606462000016620f42406005620000e6565b62000022919062000114565b6007556102586008556009805460ff191690553480156200004257600080fd5b5060405162005ac538038062005ac5833981016040819052620000659162000137565b6001600055620000753362000094565b6001805460ff60a01b191690556001600160a01b031660805262000169565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60008160001904831182151516156200010f57634e487b7160e01b600052601160045260246000fd5b500290565b6000826200013257634e487b7160e01b600052601260045260246000fd5b500490565b6000602082840312156200014a57600080fd5b81516001600160a01b03811681146200016257600080fd5b9392505050565b608051615924620001a160003960008181610509015281816123100152818161259101528181612b4c015261321d01526159246000f3fe6080604052600436106103055760003560e01c80638704f2a311610191578063c477be20116100e2578063ee98ce9111610090578063ee98ce911461091f578063f09541601461093f578063f0d250ba14610559578063f23a6e6114610954578063f2fde38b14610974578063f460590b14610994578063f4a33e0d146109b4578063f5116bc9146109d457600080fd5b8063c477be201461046d578063cd78ba01146107e8578063d9548e53146108ac578063e1784a0214610559578063e7d4a999146108df578063e91274f3146108ff578063eb374261146105f057600080fd5b8063afd76a0b1161013f578063afd76a0b14610724578063b4533aad14610744578063b50a2a5514610559578063ba84775914610775578063bc197c8114610788578063bdf52b45146107a8578063c1c30e80146107c857600080fd5b80638704f2a3146106845780638da5cb5b146106ba5780638f18439e1461046d57806390c2b10e146104585780639e57feb5146106cf578063a80d33fb146106e4578063ac5e2cb11461070457600080fd5b806354134876116102565780637234d8f2116102045780637234d8f2146105f0578063740db2801461046d578063781dc70a146106055780637ae1ace01461062557806380bc688f1461063a57806381787a851461065a5780638456cb591461066f578063853ca41a1461045857600080fd5b806354134876146105435780635a4e5a15146105595780635c975abb1461056e5780635fd34298146105835780636acc65db146105b0578063708d4d35146105c5578063715018a6146105db57600080fd5b80631bb03ca9116102b35780631bb03ca91461044357806324f8515b1461045857806325593ac21461046d5780632bcd27df146104825780633ed9ffb7146104b25780633f4ba83a146104e25780633fc8cef3146104f757600080fd5b8063015af8ee1461031157806301ffc9a7146103335780630873c6ec146103685780630ad486281461038d57806311f0794c146103ad578063150b7a02146103d45780631b01e72c1461040d57600080fd5b3661030c57005b600080fd5b34801561031d57600080fd5b5061033161032c3660046144b5565b6109f4565b005b34801561033f57600080fd5b5061035361034e3660046144d7565b610a63565b60405190151581526020015b60405180910390f35b34801561037457600080fd5b5061037f620f424081565b60405190815260200161035f565b34801561039957600080fd5b506103536103a8366004614501565b610a9a565b3480156103b957600080fd5b506103c2600481565b60405160ff909116815260200161035f565b3480156103e057600080fd5b506103f46103ef366004614580565b610af5565b6040516001600160e01b0319909116815260200161035f565b34801561041957600080fd5b50610353610428366004614501565b60009081526002602052604090206006015460ff1660011490565b34801561044f57600080fd5b506103c2600681565b34801561046457600080fd5b506103c2600081565b34801561047957600080fd5b506103c2600181565b34801561048e57600080fd5b5061035361049d3660046145f2565b60066020526000908152604090205460ff1681565b3480156104be57600080fd5b506103536104cd366004614501565b60036020526000908152604090205460ff1681565b3480156104ee57600080fd5b50610331610b2c565b34801561050357600080fd5b5061052b7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161035f565b34801561054f57600080fd5b5061037f60085481565b34801561056557600080fd5b506103c2600281565b34801561057a57600080fd5b50610353610b65565b34801561058f57600080fd5b5061037f61059e366004614501565b60056020526000908152604090205481565b3480156105bc57600080fd5b506103c2600881565b3480156105d157600080fd5b5061037f60075481565b3480156105e757600080fd5b50610331610b75565b3480156105fc57600080fd5b506103c2600381565b34801561061157600080fd5b5061035361062036600461471b565b610bae565b34801561063157600080fd5b506103c2600981565b34801561064657600080fd5b50610331610655366004614775565b610c2e565b34801561066657600080fd5b506103c2600781565b34801561067b57600080fd5b50610331610c6d565b34801561069057600080fd5b5061035361069f366004614501565b60009081526002602052604090206006015460ff1660031490565b3480156106c657600080fd5b5061052b610ca4565b3480156106db57600080fd5b506103c2600581565b3480156106f057600080fd5b506103536106ff366004614501565b610cb3565b34801561071057600080fd5b5061035361071f3660046147d0565b610ccf565b34801561073057600080fd5b5061033161073f366004614899565b610d0e565b34801561075057600080fd5b5061076461075f3660046144b5565b610e0d565b60405161035f959493929190614940565b61033161078336600461498f565b610ede565b34801561079457600080fd5b506103f46107a3366004614a93565b611724565b3480156107b457600080fd5b506103536107c3366004614501565b61175e565b3480156107d457600080fd5b506103316107e3366004614b51565b611769565b3480156107f457600080fd5b5061085b610803366004614501565b600260208190526000918252604090912080546001820154928201546003830154600484015460058501546006909501546001600160a01b039485169685169593909416939192909160ff8082169161010090041688565b604080516001600160a01b03998a168152978916602089015295909716948601949094526060850192909252608084015260a083015260ff90811660c083015290911660e08201526101000161035f565b3480156108b857600080fd5b506103536108c7366004614501565b60009081526002602052604090206005015442101590565b3480156108eb57600080fd5b506103316108fa366004614ba0565b6117f4565b34801561090b57600080fd5b5061033161091a366004614bd0565b611932565b34801561092b57600080fd5b5061035361093a366004614501565b611c14565b34801561094b57600080fd5b506103c2600a81565b34801561096057600080fd5b506103f461096f366004614ca2565b611c32565b34801561098057600080fd5b5061033161098f3660046145f2565b611c6a565b3480156109a057600080fd5b506103316109af366004614d0b565b611d0a565b3480156109c057600080fd5b506103536109cf366004614d39565b611dcf565b3480156109e057600080fd5b506103536109ef366004614501565b612164565b336109fd610ca4565b6001600160a01b031614610a2c5760405162461bcd60e51b8152600401610a2390614d5e565b60405180910390fd5b600881905560078290556040517f6c06ac894de6b71964f14d152b6674a4465a9b5d3f9cf9f216b8e7ea6146751990600090a15050565b60006001600160e01b03198216630a85bd0160e11b1480610a9457506001600160e01b03198216630271189760e51b145b92915050565b60008181526002602052604081206006015460ff166003145b8015610ad65750600082815260026020526040902060060154610100900460ff16155b8015610a94575050600090815260026020526040902060050154421090565b60095460009060ff16610b1a5760405162461bcd60e51b8152600401610a2390614d93565b50630a85bd0160e11b95945050505050565b33610b35610ca4565b6001600160a01b031614610b5b5760405162461bcd60e51b8152600401610a2390614d5e565b610b6361217e565b565b600154600160a01b900460ff1690565b33610b7e610ca4565b6001600160a01b031614610ba45760405162461bcd60e51b8152600401610a2390614d5e565b610b636000612216565b6000816001600160a01b0316610c1a610c14856040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b86612268565b6001600160a01b03161490505b9392505050565b33610c37610ca4565b6001600160a01b031614610c5d5760405162461bcd60e51b8152600401610a2390614d5e565b610c6882848361228c565b505050565b33610c76610ca4565b6001600160a01b031614610c9c5760405162461bcd60e51b8152600401610a2390614d5e565b610b636123c4565b6001546001600160a01b031690565b60009081526002602081905260409091206006015460ff161490565b600060ff8216600314801590610ce9575060ff8216600514155b8015610cf9575060ff8216600414155b8015610a94575060ff82166006141592915050565b60026000541415610d315760405162461bcd60e51b8152600401610a2390614dca565b6002600055610d3e610b65565b15610d5b5760405162461bcd60e51b8152600401610a2390614e01565b60005b8151811015610e03576000828281518110610d7b57610d7b614e2b565b6020026020010151905080600001516001600160a01b03166342842e0e338684602001516040518463ffffffff1660e01b8152600401610dbd93929190614e41565b600060405180830381600087803b158015610dd757600080fd5b505af1158015610deb573d6000803e3d6000fd5b50505050508080610dfb90614e7b565b915050610d5e565b5050600160005550565b60046020818152600093845260408085209091529183529120805460018201546002830154600384015494840180546001600160a01b03909416959294919360ff90931692610e5b90614e96565b80601f0160208091040260200160405190810160405280929190818152602001828054610e8790614e96565b8015610ed45780601f10610ea957610100808354040283529160200191610ed4565b820191906000526020600020905b815481529060010190602001808311610eb757829003601f168201915b5050505050905085565b60026000541415610f015760405162461bcd60e51b8152600401610a2390614dca565b6002600055610f0e610b65565b15610f2b5760405162461bcd60e51b8152600401610a2390614e01565b42856040013511610f7e5760405162461bcd60e51b815260206004820152601c60248201527f7472616e73616374696f6e20646561646c696e652072656163686564000000006044820152606401610a23565b60066000610f9260408801602089016145f2565b6001600160a01b0316815260208101919091526040016000205460ff16610ff35760405162461bcd60e51b81526020600482015260156024820152743ab735b737bbb71036b0b935b2ba1039b4b3b732b960591b6044820152606401610a23565b61100b61100660c0870160a088016147d0565b612424565b61107e82828080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505060405161105592508991506020016150e4565b6040516020818303038152906040528051906020012087602001602081019061062091906145f2565b6110c25760405162461bcd60e51b815260206004820152601560248201527437b33332b91039b4b3b730ba3ab9329032b93937b960591b6044820152606401610a23565b6110d561071f60c0870160a088016147d0565b156111f1576000866040516020016110ed91906151f2565b60408051601f19818403018152919052805160208201209091508635146111565760405162461bcd60e51b815260206004820152601d60248201527f696e74656e74696f6e206861736820646f6573206e6f74206d617463680000006044820152606401610a23565b6111a785858080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250508451602080870191909120925061062091508b018b6145f2565b6111ef5760405162461bcd60e51b815260206004820152601960248201527834b73a32b73a34b7b71039b4b3b730ba3ab9329032b93937b960391b6044820152606401610a23565b505b600161120360c0870160a088016147d0565b60ff1614156112ea5761122461121f60e0870160c088016145f2565b612476565b600161123660e0880160c089016147d0565b60ff16146112865760405162461bcd60e51b815260206004820152601f60248201527f696e74656e742e6b696e642073686f756c64206265204b494e445f53454c4c006044820152606401610a23565b6112e5608086013561129b60208901896145f2565b6112a860208a018a615291565b6112b860608c0160408d016145f2565b60608c013560808d01356112d260e08e0160c08f016145f2565b6112e06101408f018f6152da565b6124bd565b611717565b60026112fc60c0870160a088016147d0565b60ff1614156113d95761131861121f60e0870160c088016145f2565b600261132a60e0880160c089016147d0565b60ff161461137a5760405162461bcd60e51b815260206004820152601e60248201527f696e74656e742e6b696e642073686f756c64206265204b494e445f42555900006044820152606401610a23565b6112e5608086013561138f60208901896145f2565b61139f60e0890160c08a016145f2565b6113ac60208b018b615291565b6113bc60608d0160408e016145f2565b60608d013560808e01356113d46101408f018f6152da565b6127c4565b60036113eb60c0870160a088016147d0565b60ff16141561144f5761140761121f60e0870160c088016145f2565b6112e5608086013561141f60e0880160c089016145f2565b611430610100890160e08a016145f2565b6101008901356114446101608b018b615291565b8b6101800135612a63565b600461146160c0870160a088016147d0565b60ff1614156114a85761147d61121f60e0870160c088016145f2565b6112e5608086013561149560e0880160c089016145f2565b6114a36101408901896152da565b612d74565b60056114ba60c0870160a088016147d0565b60ff1614156114d0576112e58560800135612f19565b60066114e260c0870160a088016147d0565b60ff1614156114f8576112e58560800135612fd1565b600761150a60c0870160a088016147d0565b60ff1614156115f05761152661121f60e0870160c088016145f2565b600361153860e0880160c089016147d0565b60ff16146115935760405162461bcd60e51b815260206004820152602260248201527f696e74656e742e6b696e642073686f756c64206265204b494e445f415543544960448201526127a760f11b6064820152608401610a23565b6112e560808601356115a860208901896145f2565b6115b560208a018a615291565b6115c560608c0160408d016145f2565b60608c013560808d01356115df60e08e0160c08f016145f2565b8d61010001358e6101200135613195565b600861160260c0870160a088016147d0565b60ff161415611626576112e560808601356116216101408801886152da565b6137a5565b600961163860c0870160a088016147d0565b60ff1614156116e25761165461121f60e0870160c088016145f2565b61166160208701876145f2565b6001600160a01b031661167a60e0870160c088016145f2565b6001600160a01b0316146116c75760405162461bcd60e51b81526020600482015260146024820152731bdb9b1e481cd95b1b195c8818d85b8818d85b1b60621b6044820152606401610a23565b6112e560808601356116dd6101408801886152da565b613801565b60405162461bcd60e51b815260206004820152600a602482015269696d706f737369626c6560b01b6044820152606401610a23565b5050600160005550505050565b60095460009060ff166117495760405162461bcd60e51b8152600401610a2390614d93565b5063bc197c8160e01b98975050505050505050565b6000610ab382610cb3565b6002600054141561178c5760405162461bcd60e51b8152600401610a2390614dca565b6002600055611799610b65565b156117b65760405162461bcd60e51b8152600401610a2390614e01565b60005b81811015610e03576117e28383838181106117d6576117d6614e2b565b905060200201356138fb565b806117ec81614e7b565b9150506117b9565b336117fd610ca4565b6001600160a01b0316146118235760405162461bcd60e51b8152600401610a2390614d5e565b6118428260009081526002602052604090206006015460ff1660031490565b61187c5760405162461bcd60e51b815260206004820152600b60248201526a3737ba1030bab1ba34b7b760a91b6044820152606401610a23565b61188582611c14565b6118a15760405162461bcd60e51b8152600401610a23906152fa565b6000828152600260205260409020816118ce5780546118ce90849030906001600160a01b03166000613980565b6002810154600182015460048301546118f4926001600160a01b0390811692169061228c565b60068101805461ff00191661020017905560405183906000805160206158cf833981519152906119259084906153a9565b60405180910390a2505050565b600260005414156119555760405162461bcd60e51b8152600401610a2390614dca565b6002600055611962610b65565b1561197f5760405162461bcd60e51b8152600401610a2390614e01565b428260400151116119c55760405162461bcd60e51b815260206004820152601060248201526f191958591b1a5b99481c995858da195960821b6044820152606401610a23565b6119fa81836040516020016119da9190615464565b604051602081830303815290604052805190602001208460200151610bae565b611a385760405162461bcd60e51b815260206004820152600f60248201526e39b4b3b730ba3ab9329032b93937b960891b6044820152606401610a23565b60005b826080015151811015611b035782608001518181518110611a5e57611a5e614e2b565b6020026020010151600001516001600160a01b03166342842e0e33856020015186608001518581518110611a9457611a94614e2b565b6020026020010151602001516040518463ffffffff1660e01b8152600401611abe93929190614e41565b600060405180830381600087803b158015611ad857600080fd5b505af1158015611aec573d6000803e3d6000fd5b505050508080611afb90614e7b565b915050611a3b565b5060005b826060015151811015611bcf5782606001518181518110611b2a57611b2a614e2b565b6020026020010151600001516001600160a01b03166342842e0e84602001513386606001518581518110611b6057611b60614e2b565b6020026020010151602001516040518463ffffffff1660e01b8152600401611b8a93929190614e41565b600060405180830381600087803b158015611ba457600080fd5b505af1158015611bb8573d6000803e3d6000fd5b505050508080611bc790614e7b565b915050611b07565b507f92060d15ec9a14885865b744d2efb1fff3cab53411058a530f51d480288a864c828233604051611c0393929190615477565b60405180910390a150506001600055565b600090815260026020526040902060060154610100900460ff161590565b60095460009060ff16611c575760405162461bcd60e51b8152600401610a2390614d93565b5063f23a6e6160e01b9695505050505050565b33611c73610ca4565b6001600160a01b031614611c995760405162461bcd60e51b8152600401610a2390614d5e565b6001600160a01b038116611cfe5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610a23565b611d0781612216565b50565b33611d13610ca4565b6001600160a01b031614611d395760405162461bcd60e51b8152600401610a2390614d5e565b8015611d64576001600160a01b0382166000908152600660205260409020805460ff19169055611d88565b6001600160a01b0382166000908152600660205260409020805460ff191660011790555b604080516001600160a01b038416815282151560208201527f90d56af4745c314d9b45054b55dc973378c558c1ad1554bccc70d39aa63a2cc5910160405180910390a15050565b6000611dda83612164565b611e155760405162461bcd60e51b815260206004820152600c60248201526b6e6f20696e76656e746f727960a01b6044820152606401610a23565b60005b60008481526005602052604090205481101561215a5760008481526004602090815260408083208484529091529020600381015460ff16611e5857612147565b600381015460ff166001141561203557805460018201546040516331a9108f60e11b81526001600160a01b03928316928716918391636352211e91611ea39160040190815260200190565b60206040518083038186803b158015611ebb57600080fd5b505afa158015611ecf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ef391906154b5565b6001600160a01b03161480156120195750600182015460405163020604bf60e21b815230916001600160a01b0384169163081812fc91611f399160040190815260200190565b60206040518083038186803b158015611f5157600080fd5b505afa158015611f65573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f8991906154b5565b6001600160a01b03161480612019575060405163e985e9c560e01b81526001600160a01b03868116600483015230602483015282169063e985e9c5906044015b60206040518083038186803b158015611fe157600080fd5b505afa158015611ff5573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061201991906154d2565b156120235761202f565b60009350505050610a94565b50612147565b600381015460ff166002141561210b57805460028201546001830154604051627eeac760e11b81526001600160a01b0390931692839162fdd58e9161207e918a916004016154ef565b60206040518083038186803b15801561209657600080fd5b505afa1580156120aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120ce9190615508565b10158015612019575060405163e985e9c560e01b81526001600160a01b03868116600483015230602483015282169063e985e9c590604401611fc9565b60405162461bcd60e51b81526020600482015260116024820152703ab739bab83837b93a32b2103a37b5b2b760791b6044820152606401610a23565b508061215281614e7b565b915050611e18565b5060019392505050565b60009081526002602052604090206006015460ff16151590565b612186610b65565b6121c95760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610a23565b6001805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60008060006122778585613b79565b9150915061228481613be9565b509392505050565b8061229657505050565b6001600160a01b0382166122ec5760405162461bcd60e51b815260206004820152601d60248201527f63616e6e6f74207472616e7366657220746f20616464726573732830290000006044820152606401610a23565b6001600160a01b0383166123b057604051632e1a7d4d60e01b8152600481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632e1a7d4d90602401600060405180830381600087803b15801561235c57600080fd5b505af1158015612370573d6000803e3d6000fd5b50506040516001600160a01b038516925083156108fc02915083906000818181858888f193505050501580156123aa573d6000803e3d6000fd5b50505050565b610c686001600160a01b0384168383613d9f565b6123cc610b65565b156123e95760405162461bcd60e51b8152600401610a2390614e01565b6001805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586121f93390565b60ff8116158015906124395750600a60ff8216105b611d075760405162461bcd60e51b815260206004820152600e60248201526d696e76616c6964206f70636f646560901b6044820152606401610a23565b6001600160a01b0381163314611d075760405162461bcd60e51b815260206004820152600c60248201526b3bb937b7339039b2b73232b960a11b6044820152606401610a23565b6124c689612164565b156125025760405162461bcd60e51b815260206004820152600c60248201526b191d5c1b1a58d85d19481a5960a21b6044820152606401610a23565b42831161254a5760405162461bcd60e51b81526020600482015260166024820152751cd95b1b081a185cc8185b1c9958591e48195b99195960521b6044820152606401610a23565b612555898888613df5565b6125628989846001613980565b6001600160a01b0385166126085734841461258f5760405162461bcd60e51b8152600401610a2390615521565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0856040518263ffffffff1660e01b81526004016000604051808303818588803b1580156125ea57600080fd5b505af11580156125fe573d6000803e3d6000fd5b505050505061261d565b61261d6001600160a01b038616833087613ea7565b604051806101000160405280896001600160a01b03168152602001836001600160a01b03168152602001866001600160a01b03168152602001858152602001858152602001848152602001600160ff168152602001600160ff16815250600260008b815260200190815260200160002060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060208201518160010160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060408201518160020160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550606082015181600301556080820151816004015560a0820151816005015560c08201518160060160006101000a81548160ff021916908360ff16021790555060e08201518160060160016101000a81548160ff021916908360ff160217905550905050886000805160206158cf833981519152600260008c81526020019081526020016000206040516127a791906153a9565b60405180910390a26127b98982613ec8565b505050505050505050565b6127cd89612164565b156128155760405162461bcd60e51b8152602060048201526018602482015277696e76656e746f727920616c72656164792065786973747360401b6044820152606401610a23565b42821161285c5760405162461bcd60e51b8152602060048201526015602482015274189d5e481a185cc8185b1c9958591e48195b991959605a1b6044820152606401610a23565b6001600160a01b0384166128ac5760405162461bcd60e51b815260206004820152601760248201527631b0b73737ba103ab9b2903730ba34bb32903a37b5b2b760491b6044820152606401610a23565b6128b7898787613df5565b6128c489888a6001613980565b6128d96001600160a01b038516893086613ea7565b604051806101000160405280886001600160a01b03168152602001896001600160a01b03168152602001856001600160a01b03168152602001848152602001848152602001838152602001600260ff168152602001600160ff16815250600260008b815260200190815260200160002060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060208201518160010160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060408201518160020160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550606082015181600301556080820151816004015560a0820151816005015560c08201518160060160006101000a81548160ff021916908360ff16021790555060e08201518160060160016101000a81548160ff021916908360ff160217905550905050886000805160206158cf833981519152600260008c81526020019081526020016000206040516127a791906153a9565b612a6c87612164565b15612ab95760405162461bcd60e51b815260206004820152601a60248201527f696e76656e746f7279496420616c7265616479206578697374730000000000006044820152606401610a23565b428111612b125760405162461bcd60e51b815260206004820152602160248201527f646561646c696e65206d7573742062652067726561746572207468616e206e6f6044820152607760f81b6064820152608401610a23565b612b1d878484613df5565b6001600160a01b038516612bc357348414612b4a5760405162461bcd60e51b8152600401610a2390615521565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0856040518263ffffffff1660e01b81526004016000604051808303818588803b158015612ba557600080fd5b505af1158015612bb9573d6000803e3d6000fd5b5050505050612bd8565b612bd86001600160a01b038616873087613ea7565b60405180610100016040528060006001600160a01b03168152602001876001600160a01b03168152602001866001600160a01b03168152602001858152602001858152602001828152602001600260ff168152602001600060ff168152506002600089815260200190815260200160002060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060208201518160010160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060408201518160020160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550606082015181600301556080820151816004015560a0820151816005015560c08201518160060160006101000a81548160ff021916908360ff16021790555060e08201518160060160016101000a81548160ff021916908360ff160217905550905050866000805160206158cf833981519152600260008a8152602001908152602001600020604051612d6391906153a9565b60405180910390a250505050505050565b612d7d83610cb3565b612dbd5760405162461bcd60e51b81526020600482015260116024820152701a5908191bd95cc81b9bdd08195e1a5cdd607a1b6044820152606401610a23565b6000838152600260205260409020612dd484611c14565b612df05760405162461bcd60e51b8152600401610a23906152fa565b612dfa8484611dcf565b612e3c5760405162461bcd60e51b8152602060048201526013602482015272189d5b991b19481b9bdd08185c1c1c9bdd9959606a1b6044820152606401610a23565b6000848152600260205260409020600501544210612e905760405162461bcd60e51b8152602060048201526011602482015270189d5e481bd999995c88195e1c1a5c9959607a1b6044820152606401610a23565b60068101805461ff00191661010017905580546001600160a01b038085166001600160a01b0319909216919091178255600182810154612ed7928792879290911690613980565b836000805160206158cf83398151915260026000878152602001908152602001600020604051612f0791906153a9565b60405180910390a26123aa8483613ec8565b612f2281610cb3565b8015612f325750612f3281611c14565b612f4e5760405162461bcd60e51b8152600401610a239061554d565b600081815260026020819052604090912060068101805461ff0019166102001790559081015460018201546004830154612f95926001600160a01b0390811692169061228c565b816000805160206158cf83398151915260026000858152602001908152602001600020604051612fc591906153a9565b60405180910390a25050565b33612fdb82610cb3565b8015612feb5750612feb82611c14565b6130075760405162461bcd60e51b8152600401610a239061554d565b60005b6000838152600560205260409020548110156131875760008381526004602090815260408083208484529091529020600381015460ff166001141561312c57805460018201546040516331a9108f60e11b81526001600160a01b03928316928616918391636352211e916130849160040190815260200190565b60206040518083038186803b15801561309c57600080fd5b505afa1580156130b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130d491906154b5565b6001600160a01b0316146131265760405162461bcd60e51b815260206004820152601960248201527831b0b63632b9103237b2b9903737ba1037bbb7103a37b5b2b760391b6044820152606401610a23565b50613174565b60405162461bcd60e51b815260206004820152601b60248201527f63616e6e6f742072656a656374206e6f6e2d37323120746f6b656e00000000006044820152606401610a23565b508061317f81614e7b565b91505061300a565b5061319182612f19565b5050565b6009805460ff19166001179055620f424081106131ee5760405162461bcd60e51b8152602060048201526017602482015276696e63656e746976655261746520746f6f206c6172676560481b6044820152606401610a23565b6001600160a01b0386166132945734821461321b5760405162461bcd60e51b8152600401610a2390615521565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b15801561327657600080fd5b505af115801561328a573d6000803e3d6000fd5b50505050506132a9565b6132a96001600160a01b038716843085613ea7565b6132c88a60009081526002602052604090206006015460ff1660031490565b156134fd5760008a815260026020526040902080546001600160a01b038b811691161461332f5760405162461bcd60e51b81526020600482015260156024820152740e6cad8d8cae440c8decae640dcdee840dac2e8c6d605b1b6044820152606401610a23565b6006810154610100900460ff16156133595760405162461bcd60e51b8152600401610a2390615573565b4281600501541161337c5760405162461bcd60e51b8152600401610a239061559d565b620f4240600754826003015461339291906155c4565b61339c91906155e3565b81600301546133ab9190615605565b8310156133ee5760405162461bcd60e51b815260206004820152601160248201527062696420707269636520746f6f206c6f7760781b6044820152606401610a23565b6000620f42406133fe84866155c4565b61340891906155e3565b60018301546004840154919250613435918a916001600160a01b031690613430908590615605565b61228c565b600182015460048301548d917fa48bcf3362c21033397c03b92fb367d1962ba13b5bde0dfe491f9d88abb59e3f916001600160a01b039091169061347a908590615605565b6040516134889291906154ef565b60405180910390a26001820180546001600160a01b0319166001600160a01b038716179055600382018490556134be818561561d565b600483015560058201546008546134d59042615605565b106134f6576008548260050160008282546134f09190615605565b90915550505b5050613757565b6135068a612164565b1561354e5760405162461bcd60e51b815260206004820152601860248201527734b73b32b73a37b93c9034b9903737ba1030bab1ba34b7b760411b6044820152606401610a23565b8482101561359e5760405162461bcd60e51b815260206004820152601a60248201527f626964206c6f776572207468616e2073746172742070726963650000000000006044820152606401610a23565b4284116135bd5760405162461bcd60e51b8152600401610a239061559d565b600854849081906135ce9042615605565b106135e3576008546135e09082615605565b90505b6040518061010001604052808b6001600160a01b03168152602001856001600160a01b03168152602001886001600160a01b03168152602001848152602001848152602001828152602001600360ff168152602001600060ff16815250600260008d815260200190815260200160002060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060208201518160010160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060408201518160020160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550606082015181600301556080820151816004015560a0820151816005015560c08201518160060160006101000a81548160ff021916908360ff16021790555060e08201518160060160016101000a81548160ff021916908360ff1602179055509050506137488b8a8a613df5565b6137558b8b306000613980565b505b896000805160206158cf833981519152600260008d815260200190815260200160002060405161378791906153a9565b60405180910390a250506009805460ff191690555050505050505050565b60008281526002602052604090206005015442116137fb5760405162461bcd60e51b815260206004820152601360248201527261756374696f6e207374696c6c20676f696e6760681b6044820152606401610a23565b61319182825b6138208260009081526002602052604090206006015460ff1660031490565b6138655760405162461bcd60e51b8152602060048201526016602482015275185d58dd1a5bdb88191bd95cc81b9bdd08195e1a5cdd60521b6044820152606401610a23565b61386e82611c14565b61388a5760405162461bcd60e51b8152600401610a2390615573565b6000828152600260205260409081902060068101805461ff001916610100179055905183906000805160206158cf833981519152906138ca9084906153a9565b60405180910390a26001808201546138f191859130916001600160a01b0390911690613980565b610c688383613ec8565b600081815260026020526040902060018101546001600160a01b031633148061393557506000828152600260205260409020600501544210155b6139775760405162461bcd60e51b815260206004820152601360248201527231b0b63632b91034b9903737ba10313abcb2b960691b6044820152606401610a23565b61319182612f19565b600084815260056020526040812054905b81811015613b715760008681526004602090815260408083208484529091529020600381015460ff16613aa8578315613aa3576001600160a01b038516158015906139e557506001600160a01b0385163014155b613a3d5760405162461bcd60e51b8152602060048201526024808201527f6d696e74207461726765742063616e6e6f74206265207a65726f206f72206d616044820152631c9ad95d60e21b6064820152608401610a23565b805460405163b510391f60e01b81526001600160a01b039091169063b510391f90613a7090889060048087019101615634565b600060405180830381600087803b158015613a8a57600080fd5b505af1158015613a9e573d6000803e3d6000fd5b505050505b613b5e565b600381015460ff1660011415613aee5780546001820154604051632142170760e11b81526001600160a01b03909216916342842e0e91613a70918a918a91600401614e41565b600381015460ff166002141561210b57805460018201546002830154604051637921219560e11b81526001600160a01b038a8116600483015289811660248301526044820193909352606481019190915260a06084820152600060a482015291169063f242432a9060c401613a70565b5080613b6981614e7b565b915050613991565b505050505050565b600080825160411415613bb05760208301516040840151606085015160001a613ba48782858561407f565b94509450505050613be2565b825160401415613bda5760208301516040840151613bcf868383614162565b935093505050613be2565b506000905060025b9250929050565b6000816004811115613bfd57613bfd6156c9565b1415613c065750565b6001816004811115613c1a57613c1a6156c9565b1415613c635760405162461bcd60e51b815260206004820152601860248201527745434453413a20696e76616c6964207369676e617475726560401b6044820152606401610a23565b6002816004811115613c7757613c776156c9565b1415613cc55760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610a23565b6003816004811115613cd957613cd96156c9565b1415613d325760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610a23565b6004816004811115613d4657613d466156c9565b1415611d075760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610a23565b610c688363a9059cbb60e01b8484604051602401613dbe9291906154ef565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152614191565b80613e315760405162461bcd60e51b815260206004820152600c60248201526b656d7074792062756e646c6560a01b6044820152606401610a23565b60008381526005602052604081208290555b818110156123aa57828282818110613e5d57613e5d614e2b565b9050602002810190613e6f91906156df565b60008581526004602090815260408083208584529091529020613e9282826157fb565b50819050613e9f81614e7b565b915050613e43565b6123aa846323b872dd60e01b858585604051602401613dbe93929190614e41565b6000828152600260205260409020613edf83612164565b8015613ef757506006810154610100900460ff166001145b613f435760405162461bcd60e51b815260206004820152601b60248201527f6e6f20696e76656e746f7279206f72207374617465206572726f7200000000006044820152606401610a23565b613f5683613f518480615291565b614263565b60038101546000620f4240613f6f6020860135846155c4565b613f7991906155e3565b90506000620f4240613f8f6040870135856155c4565b613f9991906155e3565b90506000620f4240613faf6060880135866155c4565b613fb991906155e3565b905060008183858860040154613fcf919061561d565b613fd9919061561d565b613fe3919061561d565b60028701548754919250614004916001600160a01b0391821691168361228c565b60028601546001870154614025916001600160a01b0390811691168461228c565b600286015461404d906001600160a01b031661404760a08a0160808b016145f2565b8661228c565b6002860154614075906001600160a01b031661406f60c08a0160a08b016145f2565b8561228c565b5050505050505050565b6000806fa2a8918ca85bafe22016d0b997e4df60600160ff1b038311156140ac5750600090506003614159565b8460ff16601b141580156140c457508460ff16601c14155b156140d55750600090506004614159565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015614129573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661415257600060019250925050614159565b9150600090505b94509492505050565b6000806001600160ff1b03831660ff84901c601b016141838782888561407f565b935093505050935093915050565b60006141e6826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661433d9092919063ffffffff16565b805190915015610c68578080602001905181019061420491906154d2565b610c685760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610a23565b60005b818110156123aa57600083838381811061428257614282614e2b565b60209081029290920135600081815260039093526040909220549192505060ff16156142e75760405162461bcd60e51b815260206004820152601460248201527318dbdd5c1bdb88185b1c9958591e481cdc195b9d60621b6044820152606401610a23565b600081815260036020526040808220805460ff1916600117905551829187917f6aa71aa6b7aa6036ace4e4ceefbab7d89c4afb7fcfa1a3680499d7b37d32c82f9190a3508061433581614e7b565b915050614266565b606061434c8484600085614354565b949350505050565b6060824710156143b55760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610a23565b843b6144035760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610a23565b600080866001600160a01b0316858760405161441f91906158a9565b60006040518083038185875af1925050503d806000811461445c576040519150601f19603f3d011682016040523d82523d6000602084013e614461565b606091505b509150915061447182828661447c565b979650505050505050565b6060831561448b575081610c27565b82511561449b5782518084602001fd5b8160405162461bcd60e51b8152600401610a2391906158bb565b600080604083850312156144c857600080fd5b50508035926020909101359150565b6000602082840312156144e957600080fd5b81356001600160e01b031981168114610c2757600080fd5b60006020828403121561451357600080fd5b5035919050565b6001600160a01b0381168114611d0757600080fd5b803561453a8161451a565b919050565b60008083601f84011261455157600080fd5b5081356001600160401b0381111561456857600080fd5b602083019150836020828501011115613be257600080fd5b60008060008060006080868803121561459857600080fd5b85356145a38161451a565b945060208601356145b38161451a565b93506040860135925060608601356001600160401b038111156145d557600080fd5b6145e18882890161453f565b969995985093965092949392505050565b60006020828403121561460457600080fd5b8135610c278161451a565b6001600160a01b03169052565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b03811182821017156146545761465461461c565b60405290565b60405160a081016001600160401b03811182821017156146545761465461461c565b604051601f8201601f191681016001600160401b03811182821017156146a4576146a461461c565b604052919050565b600082601f8301126146bd57600080fd5b81356001600160401b038111156146d6576146d661461c565b6146e9601f8201601f191660200161467c565b8181528460208386010111156146fe57600080fd5b816020850160208301376000918101602001919091529392505050565b60008060006060848603121561473057600080fd5b83356001600160401b0381111561474657600080fd5b614752868287016146ac565b93505060208401359150604084013561476a8161451a565b809150509250925092565b60008060006060848603121561478a57600080fd5b83356147958161451a565b925060208401356147a58161451a565b929592945050506040919091013590565b60ff81168114611d0757600080fd5b803561453a816147b6565b6000602082840312156147e257600080fd5b8135610c27816147b6565b600082601f8301126147fe57600080fd5b813560206001600160401b038211156148195761481961461c565b614827818360051b0161467c565b82815260069290921b8401810191818101908684111561484657600080fd5b8286015b8481101561488e57604081890312156148635760008081fd5b61486b614632565b81356148768161451a565b8152818501358582015283529183019160400161484a565b509695505050505050565b600080604083850312156148ac57600080fd5b82356148b78161451a565b915060208301356001600160401b038111156148d257600080fd5b6148de858286016147ed565b9150509250929050565b60005b838110156149035781810151838201526020016148eb565b838111156123aa5750506000910152565b6000815180845261492c8160208601602086016148e8565b601f01601f19169290920160200192915050565b60018060a01b038616815284602082015283604082015260ff8316606082015260a06080820152600061447160a0830184614914565b60006101a0828403121561498957600080fd5b50919050565b600080600080600080608087890312156149a857600080fd5b86356001600160401b03808211156149bf57600080fd5b9088019060e0828b0312156149d357600080fd5b909650602088013590808211156149e957600080fd5b6149f58a838b01614976565b96506040890135915080821115614a0b57600080fd5b614a178a838b0161453f565b90965094506060890135915080821115614a3057600080fd5b50614a3d89828a0161453f565b979a9699509497509295939492505050565b60008083601f840112614a6157600080fd5b5081356001600160401b03811115614a7857600080fd5b6020830191508360208260051b8501011115613be257600080fd5b60008060008060008060008060a0898b031215614aaf57600080fd5b8835614aba8161451a565b97506020890135614aca8161451a565b965060408901356001600160401b0380821115614ae657600080fd5b614af28c838d01614a4f565b909850965060608b0135915080821115614b0b57600080fd5b614b178c838d01614a4f565b909650945060808b0135915080821115614b3057600080fd5b50614b3d8b828c0161453f565b999c989b5096995094979396929594505050565b60008060208385031215614b6457600080fd5b82356001600160401b03811115614b7a57600080fd5b614b8685828601614a4f565b90969095509350505050565b8015158114611d0757600080fd5b60008060408385031215614bb357600080fd5b823591506020830135614bc581614b92565b809150509250929050565b60008060408385031215614be357600080fd5b82356001600160401b0380821115614bfa57600080fd5b9084019060a08287031215614c0e57600080fd5b614c1661465a565b823581526020830135614c288161451a565b602082015260408381013590820152606083013582811115614c4957600080fd5b614c55888286016147ed565b606083015250608083013582811115614c6d57600080fd5b614c79888286016147ed565b60808301525093506020850135915080821115614c9557600080fd5b506148de858286016146ac565b60008060008060008060a08789031215614cbb57600080fd5b8635614cc68161451a565b95506020870135614cd68161451a565b9450604087013593506060870135925060808701356001600160401b03811115614cff57600080fd5b614a3d89828a0161453f565b60008060408385031215614d1e57600080fd5b8235614d298161451a565b91506020830135614bc581614b92565b60008060408385031215614d4c57600080fd5b823591506020830135614bc58161451a565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601f908201527f63616e206e6f74207472616e7366657220746f6b656e206469726563746c7900604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6001600160a01b039384168152919092166020820152604081019190915260600190565b634e487b7160e01b600052601160045260246000fd5b6000600019821415614e8f57614e8f614e65565b5060010190565b600181811c90821680614eaa57607f821691505b6020821081141561498957634e487b7160e01b600052602260045260246000fd5b6000823560be19833603018112614ee157600080fd5b90910192915050565b6000808335601e19843603018112614f0157600080fd5b83016020810192503590506001600160401b03811115614f2057600080fd5b8060051b3603831315613be257600080fd5b6000614f3e8283614eea565b60c080865285018190526001600160fb1b03811115614f5c57600080fd5b60051b808260e087013760e081860101915050600081526020830135602085015260408301356040850152606083013560608501526080830135614f9f8161451a565b6001600160a01b03166080850152614fb960a0840161452f565b61228460a086018261460f565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b81835260006020808501808196508560051b810191508460005b878110156150d75782840389528135609e1988360301811261502a57600080fd5b870160a081356150398161451a565b6001600160a01b03168652818701358787015260408083013590870152606080830135615065816147b6565b60ff169087015260808281013536849003601e1901811261508557600080fd5b830180356001600160401b0381111561509d57600080fd5b8036038513156150ac57600080fd5b83838a01526150c0848a01828c8501614fc6565b9d8a019d9850505093870193505050600101615009565b5091979650505050505050565b602081528135602082015260006150fd6020840161452f565b61510a604084018261460f565b506040830135606083015260608301356080830152608083013560a083015261513560a084016147c5565b60ff811660c08401525061514b60c0840161452f565b61515860e084018261460f565b5061516560e0840161452f565b6101006151748185018361460f565b6101209150808501358285015250610140818501358185015261519981860186614ecb565b9150506101a061016081818601526151b56101c0860184614f32565b92506151c381870187614eea565b9150610180601f1987860301818801526151de858484614fef565b970135959092019490945250929392505050565b60208152600082356152038161451a565b60018060a01b03808216602085015261521f6020860186614eea565b925060e0604086015261523761010086018483614fef565b92505060408501356152488161451a565b8181166060860152505060608401356080840152608084013560a084015260a084013560c084015260c084013561527e816147b6565b60ff1660e0939093019290925250919050565b6000808335601e198436030181126152a857600080fd5b8301803591506001600160401b038211156152c257600080fd5b6020019150600581901b3603821315613be257600080fd5b6000823560be198336030181126152f057600080fd5b9190910192915050565b6020808252600890820152673737ba1037b832b760c11b604082015260600190565b6153368261533183546001600160a01b031690565b61460f565b60018101546001600160a01b0316615351602084018261460f565b5060028101546001600160a01b031661536d604084018261460f565b506003810154606083015260048101546080830152600581015460a08301526006015460ff80821660c084015260089190911c1660e090910152565b6101008101610a94828461531c565b600081518084526020808501945080840160005b838110156153fc57815180516001600160a01b0316885283015183880152604090960195908201906001016153cc565b509495945050505050565b8051825260018060a01b036020820151166020830152604081015160408301526000606082015160a0606085015261544260a08501826153b8565b90506080830151848203608086015261545b82826153b8565b95945050505050565b602081526000610c276020830184615407565b60608152600061548a6060830186615407565b828103602084015261549c8186614914565b91505060018060a01b0383166040830152949350505050565b6000602082840312156154c757600080fd5b8151610c278161451a565b6000602082840312156154e457600080fd5b8151610c2781614b92565b6001600160a01b03929092168252602082015260400190565b60006020828403121561551a57600080fd5b5051919050565b6020808252601290820152717072696365203d3d206d73672e76616c756560701b604082015260600190565b6020808252600c908201526b6e6f74206f70656e2062757960a01b604082015260600190565b60208082526010908201526f30bab1ba34b7b7103737ba1037b832b760811b604082015260600190565b6020808252600d908201526c185d58dd1a5bdb88195b991959609a1b604082015260600190565b60008160001904831182151516156155de576155de614e65565b500290565b60008261560057634e487b7160e01b600052601260045260246000fd5b500490565b6000821982111561561857615618614e65565b500190565b60008282101561562f5761562f614e65565b500390565b60018060a01b0383168152600060206040818401526000845461565681614e96565b8060408701526060600180841660008114615678576001811461568c576156ba565b60ff198516898401526080890195506156ba565b896000528660002060005b858110156156b25781548b8201860152908301908801615697565b8a0184019650505b50939998505050505050505050565b634e487b7160e01b600052602160045260246000fd5b60008235609e198336030181126152f057600080fd5b601f821115610c6857600081815260208120601f850160051c8101602086101561571c5750805b601f850160051c820191505b81811015613b7157828155600101615728565b6001600160401b038311156157525761575261461c565b615766836157608354614e96565b836156f5565b6000601f84116001811461579a57600085156157825750838201355b600019600387901b1c1916600186901b1783556157f4565b600083815260209020601f19861690835b828110156157cb57868501358255602094850194600190920191016157ab565b50868210156157e85760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b81356158068161451a565b81546001600160a01b0319166001600160a01b03919091161781556020820135600182015560408201356002820155600381016060830135615847816147b6565b815460ff191660ff91909116179055608082013536839003601e1901811261586e57600080fd5b820180356001600160401b0381111561588657600080fd5b60208201915080360382131561589b57600080fd5b6123aa81836004860161573b565b600082516152f08184602087016148e8565b602081526000610c27602083018461491456fe5beea7b3b87c573953fec05007114d17712e5775d364acc106d8da9e74849033a26469706673582212209c26fc7d35cd0a3d1865419a6c9ab133294eb97348bd5dcca0a57236fbfa379f64736f6c6343000809003300000000000000000000000021be370d5312f44cb42ce377bc9b8a0cef1a4c83

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

00000000000000000000000021be370d5312f44cb42ce377bc9b8a0cef1a4c83

-----Decoded View---------------
Arg [0] : weth_ (address): 0x21be370d5312f44cb42ce377bc9b8a0cef1a4c83

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000021be370d5312f44cb42ce377bc9b8a0cef1a4c83


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Validator ID :
0 FTM

Amount Staked
0

Amount Delegated
0

Staking Total
0

Staking Start Epoch
0

Staking Start Time
0

Proof of Importance
0

Origination Score
0

Validation Score
0

Active
0

Online
0

Downtime
0 s
Address Amount claimed Rewards Created On Epoch Created On
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.