ETH Price: $3,144.48 (+1.02%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Auction NFT211867382024-11-14 15:10:1176 days ago1731597011IN
0x9c5E802F...6c79A34b6
0 ETH0.0084954661.74926092
Buy NFT Normal211140152024-11-04 11:34:1186 days ago1730720051IN
0x9c5E802F...6c79A34b6
0 ETH0.000899445.42126615
Buy NFT Normal211134502024-11-04 9:40:3586 days ago1730713235IN
0x9c5E802F...6c79A34b6
0 ETH0.000857755.17033815
Accept Offer NFT210856522024-10-31 12:35:1190 days ago1730378111IN
0x9c5E802F...6c79A34b6
0 ETH0.001599479.86085947
Auction NFT210856022024-10-31 12:25:1190 days ago1730377511IN
0x9c5E802F...6c79A34b6
0 ETH0.0016412612.14665619
Accept Offer NFT210855292024-10-31 12:10:3590 days ago1730376635IN
0x9c5E802F...6c79A34b6
0 ETH0.001501778.605386
Buy NFT Normal210854982024-10-31 12:04:1190 days ago1730376251IN
0x9c5E802F...6c79A34b6
0 ETH0.001481058.67234793
Buy NFT Normal210854842024-10-31 12:01:2390 days ago1730376083IN
0x9c5E802F...6c79A34b6
0 ETH0.001644069.07978344
Buy NFT Normal210854452024-10-31 11:53:3590 days ago1730375615IN
0x9c5E802F...6c79A34b6
0 ETH0.001252888.43918626
Buy NFT Normal210854352024-10-31 11:51:3590 days ago1730375495IN
0x9c5E802F...6c79A34b6
0 ETH0.001554918.26457335
Buy NFTETH198434162024-05-11 1:08:35264 days ago1715389715IN
0x9c5E802F...6c79A34b6
0.075 ETH0.000668414.97041119
Buy NFTETH198305122024-05-09 5:51:35265 days ago1715233895IN
0x9c5E802F...6c79A34b6
0.064 ETH0.000627744.15425178
Accept Offer NFT191433292024-02-02 21:16:11362 days ago1706908571IN
0x9c5E802F...6c79A34b6
0 ETH0.0037049720.77585316
Accept Offer NFT191432862024-02-02 21:07:23362 days ago1706908043IN
0x9c5E802F...6c79A34b6
0 ETH0.0032563619.5743309
Buy NFT Normal191432302024-02-02 20:56:11362 days ago1706907371IN
0x9c5E802F...6c79A34b6
0 ETH0.0036475321.13089513
Auction NFT191432252024-02-02 20:55:11362 days ago1706907311IN
0x9c5E802F...6c79A34b6
0 ETH0.0035747829.9
Buy NFTETH191431872024-02-02 20:47:35362 days ago1706906855IN
0x9c5E802F...6c79A34b6
0.001 ETH0.0026522518.0687335
Buy NFT Normal191431352024-02-02 20:37:11362 days ago1706906231IN
0x9c5E802F...6c79A34b6
0 ETH0.0031423920.35031822
Buy NFTETH191431132024-02-02 20:32:47362 days ago1706905967IN
0x9c5E802F...6c79A34b6
0.001 ETH0.0028048120.20646088
Buy NFTETH190445762024-01-20 0:45:47376 days ago1705711547IN
0x9c5E802F...6c79A34b6
0.111 ETH0.0026523517.55501559
Auction NFT181335872023-09-14 9:20:11503 days ago1694683211IN
0x9c5E802F...6c79A34b6
0 ETH0.0020785514
Auction NFT181335372023-09-14 9:10:11503 days ago1694682611IN
0x9c5E802F...6c79A34b6
0 ETH0.0017141513
Accept Offer NFT181334382023-09-14 8:50:23503 days ago1694681423IN
0x9c5E802F...6c79A34b6
0 ETH0.0019904311.5969712
Accept Offer NFT181333672023-09-14 8:36:11503 days ago1694680571IN
0x9c5E802F...6c79A34b6
0 ETH0.0017359810.44951531
Buy NFT Normal181333102023-09-14 8:24:35503 days ago1694679875IN
0x9c5E802F...6c79A34b6
0 ETH0.001723879.87250528
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block
From
To
198434162024-05-11 1:08:35264 days ago1715389715
0x9c5E802F...6c79A34b6
0.0735 ETH
198434162024-05-11 1:08:35264 days ago1715389715
0x9c5E802F...6c79A34b6
0.0015 ETH
198305122024-05-09 5:51:35265 days ago1715233895
0x9c5E802F...6c79A34b6
0.064 ETH
191431872024-02-02 20:47:35362 days ago1706906855
0x9c5E802F...6c79A34b6
0.00096 ETH
191431872024-02-02 20:47:35362 days ago1706906855
0x9c5E802F...6c79A34b6
0.00004 ETH
191431132024-02-02 20:32:47362 days ago1706905967
0x9c5E802F...6c79A34b6
0.001 ETH
190445762024-01-20 0:45:47376 days ago1705711547
0x9c5E802F...6c79A34b6
0.111 ETH
181332422023-09-14 8:10:59503 days ago1694679059
0x9c5E802F...6c79A34b6
0.001 ETH
180393542023-09-01 4:35:47516 days ago1693542947
0x9c5E802F...6c79A34b6
0.297 ETH
180393542023-09-01 4:35:47516 days ago1693542947
0x9c5E802F...6c79A34b6
0.003 ETH
180326072023-08-31 5:56:35517 days ago1693461395
0x9c5E802F...6c79A34b6
0.099 ETH
180326072023-08-31 5:56:35517 days ago1693461395
0x9c5E802F...6c79A34b6
0.001 ETH
179676622023-08-22 3:46:59526 days ago1692676019
0x9c5E802F...6c79A34b6
0.12375 ETH
179676622023-08-22 3:46:59526 days ago1692676019
0x9c5E802F...6c79A34b6
0.00125 ETH
176916872023-07-14 12:25:35565 days ago1689337535
0x9c5E802F...6c79A34b6
0.088 ETH
176549852023-07-09 8:32:11570 days ago1688891531
0x9c5E802F...6c79A34b6
0.495 ETH
176549852023-07-09 8:32:11570 days ago1688891531
0x9c5E802F...6c79A34b6
0.005 ETH
176520432023-07-08 22:35:11571 days ago1688855711
0x9c5E802F...6c79A34b6
0.79002 ETH
176520432023-07-08 22:35:11571 days ago1688855711
0x9c5E802F...6c79A34b6
0.00798 ETH
171084052023-04-23 10:25:35647 days ago1682245535
0x9c5E802F...6c79A34b6
0.004 ETH
170916212023-04-21 1:50:35650 days ago1682041835
0x9c5E802F...6c79A34b6
0.198 ETH
170916212023-04-21 1:50:35650 days ago1682041835
0x9c5E802F...6c79A34b6
0.002 ETH
170813792023-04-19 14:57:11651 days ago1681916231
0x9c5E802F...6c79A34b6
100 wei
170813792023-04-19 14:57:11651 days ago1681916231
0x9c5E802F...6c79A34b6
1.087881 ETH
170787072023-04-19 5:52:59651 days ago1681883579
0x9c5E802F...6c79A34b6
500 wei
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ExchangeNFT

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license
File 1 of 13 : ExchangeNFT.sol
//SPDX-License-Identifier: MIT
pragma solidity 0.6.12;

import "./interfaces/IERC721.sol";
import "./interfaces/IStableToken.sol";
import "./libraries/ECDSA.sol";
import "./libraries/TransferHelper.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";

contract ExchangeNFT is Ownable {
    using ECDSA for bytes32;
    using SafeERC20 for ERC20;
    using SafeMath for uint256;

    address public ERC721;

    // Address is owner of ERC721
    address public admin;

    // Mitigating Replay Attacks
    mapping(address => mapping(uint256 => bool)) seenNonces;

    // Addresses running auction NFT
    mapping(address => bool) public whitelistAddress;

    struct Data {
        address[5] tradeAddress;
        uint256[4] attributes;
    }

    // Events
    // addrs: from, to, token
    event BuyNFTNormal(address[3] addrs, uint256 tokenId, uint256 amount);
    event BuyNFTETH(address[3] addrs, uint256 tokenId, uint256 amount);
    event AuctionNFT(address[3] addrs, uint256 tokenId, uint256 amount);
    event AcceptOfferNFT(address[3] addrs, uint256 tokenId, uint256 amount);

    constructor(address _erc721) public {
        ERC721 = _erc721;
        whitelistAddress[msg.sender] = true;
        admin = msg.sender;
    }

    function setNFTAddress(address _nft) public onlyOwner {
        ERC721 = _nft;
    }

    function setWhitelistAddress(address _address, bool approved)
        public
        onlyOwner
    {
        whitelistAddress[_address] = approved;
    }

    function setAdminAddress(address _admin) public onlyOwner {
        admin = _admin;
    }

    modifier verifySignature(
        uint256 nonce,
        address[5] memory _tradeAddress,
        uint256[4] memory _attributes,
        bytes memory signature
    ) {
        // This recreates the message hash that was signed on the client.
        bytes32 hash = keccak256(
            abi.encodePacked(
                msg.sender,
                nonce,
                _tradeAddress,
                _attributes
            )
        );
        bytes32 messageHash = hash.toEthSignedMessageHash();
        // Verify that the message's signer is the owner of the order
        require(messageHash.recover(signature) == owner(), "Invalid signature");
        require(!seenNonces[msg.sender][nonce], "Used nonce");
        seenNonces[msg.sender][nonce] = true;
        _;
    }

    function checkFeeProductExits(
        address[5] memory _tradeAddress,
        uint256[4] memory _attributes
    ) private returns (uint256 amount, uint256 feeOwner, uint256 feeAdmin) {
        uint256 totalFeeTrade;
        // Check fee for owner
        if (_tradeAddress[3] != address(0)) {
            feeOwner = _attributes[0].mul(_attributes[2]).div(1000);
            totalFeeTrade += feeOwner;
        }
        // Check fee for admin
        if (_tradeAddress[4] != address(0)) {
            feeAdmin = _attributes[0].mul(_attributes[3]).div(1000);
            totalFeeTrade += feeAdmin;
        }
        amount = _attributes[0].sub(totalFeeTrade);
    }

    // Buy NFT normal by token ERC-20
    // address[5]: buyer, seller, token, fee, feeAdmin
    // uint256[4]: amount, tokenId, feePercent, feePercentAdmin
    function buyNFTNormal(
        address[5] memory _tradeAddress,
        uint256[4] memory _attributes,
        uint256 nonce,
        bytes memory signature
    ) external verifySignature(nonce, _tradeAddress, _attributes, signature) {
        Data memory tradeInfo = Data({
            tradeAddress: _tradeAddress,
            attributes: _attributes
        });
        // check allowance of buyer
        require(
            IERC20(tradeInfo.tradeAddress[2]).allowance(msg.sender, address(this)) >=
                tradeInfo.attributes[0],
            "token allowance too low"
        );
        (uint256 amount, uint256 feeOwner, uint256 feeAdmin) = checkFeeProductExits(
            tradeInfo.tradeAddress,
            tradeInfo.attributes
        );

        if (feeOwner != 0) {
            // transfer token to fee address
            ERC20(tradeInfo.tradeAddress[2]).safeTransferFrom(
                tradeInfo.tradeAddress[0],
                tradeInfo.tradeAddress[3],
                feeOwner
            );
        }

        if (feeAdmin != 0) {
            // transfer token to fee address
            ERC20(tradeInfo.tradeAddress[2]).safeTransferFrom(
                tradeInfo.tradeAddress[0],
                tradeInfo.tradeAddress[4],
                feeAdmin
            );
        }

        // transfer token from buyer to seller
        ERC20(tradeInfo.tradeAddress[2]).safeTransferFrom(
            msg.sender,
            tradeInfo.tradeAddress[1],
            amount
        );
        IERC721(ERC721).safeTransferFrom(
            tradeInfo.tradeAddress[1],
            msg.sender,
            tradeInfo.attributes[1]
        );
        emit BuyNFTNormal(
            [msg.sender, tradeInfo.tradeAddress[1], tradeInfo.tradeAddress[2]],
            tradeInfo.attributes[1],
            tradeInfo.attributes[0]
        );
    }

    // Buy NFT normal by ETH
    // address[5]: buyer, seller, token, fee, feeAdmin
    // uint256[4]: amount, tokenId, feePercent, feePercentAdmin
    function buyNFTETH(
        address[5] memory _tradeAddress,
        uint256[4] memory _attributes,
        uint256 nonce,
        bytes memory signature
    )
        external
        payable
        verifySignature(nonce, _tradeAddress, _attributes, signature)
    {
        Data memory tradeInfo = Data({
            tradeAddress: _tradeAddress,
            attributes: _attributes
        });
        (uint256 amount, uint256 feeOwner, uint256 feeAdmin) = checkFeeProductExits(
            tradeInfo.tradeAddress,
            tradeInfo.attributes
        );
        // transfer eth to fee address
        if (feeOwner != 0) {
            TransferHelper.safeTransferETH(tradeInfo.tradeAddress[3], feeOwner);
        }

        // transfer eth to admin address
        if (feeAdmin != 0) {
            TransferHelper.safeTransferETH(tradeInfo.tradeAddress[4], feeAdmin);
        }

        TransferHelper.safeTransferETH(tradeInfo.tradeAddress[1], amount);

        IERC721(ERC721).safeTransferFrom(
            tradeInfo.tradeAddress[1],
            msg.sender,
            tradeInfo.attributes[1]
        );
        // refund dust eth, if any
        if (msg.value > tradeInfo.attributes[0])
            TransferHelper.safeTransferETH(
                msg.sender,
                msg.value - tradeInfo.attributes[0]
            );
        emit BuyNFTETH(
            [msg.sender, tradeInfo.tradeAddress[1], tradeInfo.tradeAddress[2]],
            tradeInfo.attributes[1],
            tradeInfo.attributes[0]
        );
    }

    // Auction NFT
    // address[5]: buyer, seller, token, fee, feeAdmin
    // uint256[4]: amount, tokenId, feePercent, feePercentAdmin
    function auctionNFT(
        address[5] memory _tradeAddress,
        uint256[4] memory _attributes
    ) external {
        Data memory tradeInfo = Data({
            tradeAddress: _tradeAddress,
            attributes: _attributes
        });
        // Check address execute auction
        require(
            whitelistAddress[msg.sender] == true,
            "Address is not in whitelist"
        );
        // check allowance of buyer
        require(
            IERC20(tradeInfo.tradeAddress[2]).allowance(
                tradeInfo.tradeAddress[0],
                address(this)
            ) >= tradeInfo.attributes[0],
            "token allowance too low"
        );
        if (tradeInfo.tradeAddress[1] == admin) {
            require(
                IERC721(ERC721).isApprovedForAll(admin, address(this)),
                "tokenId do not approve for contract"
            );
        } else {
            require(
                IERC721(ERC721).getApproved(tradeInfo.attributes[1]) == address(this),
                "tokenId do not approve for contract"
            );
        }

        (uint256 amount, uint256 feeOwner, uint256 feeAdmin) = checkFeeProductExits(
            tradeInfo.tradeAddress,
            tradeInfo.attributes
        );
        if (feeOwner != 0) {
            // transfer token to fee address
            ERC20(tradeInfo.tradeAddress[2]).safeTransferFrom(
                tradeInfo.tradeAddress[0],
                tradeInfo.tradeAddress[3],
                feeOwner
            );
        }

        if (feeAdmin != 0) {
            // transfer token to fee address
            ERC20(tradeInfo.tradeAddress[2]).safeTransferFrom(
                tradeInfo.tradeAddress[0],
                tradeInfo.tradeAddress[4],
                feeAdmin
            );
        }

        // transfer token from buyer to seller
        ERC20(tradeInfo.tradeAddress[2]).safeTransferFrom(
            tradeInfo.tradeAddress[0],
            tradeInfo.tradeAddress[1],
            amount
        );
        IERC721(ERC721).safeTransferFrom(
            tradeInfo.tradeAddress[1],
            tradeInfo.tradeAddress[0],
            tradeInfo.attributes[1]
        );
        emit AuctionNFT(
            [msg.sender, tradeInfo.tradeAddress[1], tradeInfo.tradeAddress[2]],
            tradeInfo.attributes[1],
            tradeInfo.attributes[0]
        );
    }

    // Accept offer from buyer
    // address[5]: buyer, seller, token, fee, feeAdmin
    // uint256[4]: amount, tokenId, feePercent, feePercentAdmin
    function acceptOfferNFT(
        address[5] memory _tradeAddress,
        uint256[4] memory _attributes,
        uint256 nonce,
        bytes memory signature
    ) external verifySignature(nonce, _tradeAddress, _attributes, signature) {
        Data memory tradeInfo = Data({
            tradeAddress: _tradeAddress,
            attributes: _attributes
        });

        require(
            IERC721(ERC721).getApproved(tradeInfo.attributes[1]) == address(this),
            "tokenId do not approve for contract"
        );
        // check allowance of buyer
        require(
            IERC20(tradeInfo.tradeAddress[2]).allowance(
                tradeInfo.tradeAddress[0],
                address(this)
            ) >= tradeInfo.attributes[0],
            "token allowance too low"
        );

        (uint256 amount, uint256 feeOwner, uint256 feeAdmin) = checkFeeProductExits(
            tradeInfo.tradeAddress,
            tradeInfo.attributes
        );
        if (feeOwner != 0) {
            // transfer token to fee address
            ERC20(tradeInfo.tradeAddress[2]).safeTransferFrom(
                tradeInfo.tradeAddress[0],
                tradeInfo.tradeAddress[3],
                feeOwner
            );
        }

        if (feeAdmin != 0) {
            // transfer token to fee address
            ERC20(tradeInfo.tradeAddress[2]).safeTransferFrom(
                tradeInfo.tradeAddress[0],
                tradeInfo.tradeAddress[4],
                feeAdmin
            );
        }

        // transfer token from buyer to seller
        ERC20(tradeInfo.tradeAddress[2]).safeTransferFrom(
            tradeInfo.tradeAddress[0],
            msg.sender,
            amount
        );

        IERC721(ERC721).safeTransferFrom(
            tradeInfo.tradeAddress[1],
            tradeInfo.tradeAddress[0],
            tradeInfo.attributes[1]
        );
        emit AcceptOfferNFT(
            [msg.sender, tradeInfo.tradeAddress[1], tradeInfo.tradeAddress[2]],
            tradeInfo.attributes[1],
            tradeInfo.attributes[0]
        );
    }
}

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

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

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

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

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

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

File 3 of 13 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        uint256 c = a + b;
        if (c < a) return (false, 0);
        return (true, c);
    }

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

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

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

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

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

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

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

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

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

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

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

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

File 4 of 13 : ERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "../../utils/Context.sol";
import "./IERC20.sol";
import "../../math/SafeMath.sol";

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin guidelines: functions revert instead
 * of returning `false` on failure. This behavior is nonetheless conventional
 * and does not conflict with the expectations of ERC20 applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20 {
    using SafeMath for uint256;

    mapping (address => uint256) private _balances;

    mapping (address => mapping (address => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;
    uint8 private _decimals;

    /**
     * @dev Sets the values for {name} and {symbol}, initializes {decimals} with
     * a default value of 18.
     *
     * To select a different value for {decimals}, use {_setupDecimals}.
     *
     * All three of these values are immutable: they can only be set once during
     * construction.
     */
    constructor (string memory name_, string memory symbol_) public {
        _name = name_;
        _symbol = symbol_;
        _decimals = 18;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5,05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is
     * called.
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual returns (uint8) {
        return _decimals;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual override returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `recipient` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * Requirements:
     *
     * - `sender` and `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     * - the caller must have allowance for ``sender``'s tokens of at least
     * `amount`.
     */
    function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(sender, recipient, amount);
        _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
        return true;
    }

    /**
     * @dev Moves tokens `amount` from `sender` to `recipient`.
     *
     * This is internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `sender` cannot be the zero address.
     * - `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     */
    function _transfer(address sender, address recipient, uint256 amount) internal virtual {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(sender, recipient, amount);

        _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance");
        _balances[recipient] = _balances[recipient].add(amount);
        emit Transfer(sender, recipient, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply = _totalSupply.add(amount);
        _balances[account] = _balances[account].add(amount);
        emit Transfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
        _totalSupply = _totalSupply.sub(amount);
        emit Transfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(address owner, address spender, uint256 amount) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Sets {decimals} to a value other than the default one of 18.
     *
     * WARNING: This function should only be called from the constructor. Most
     * applications that interact with token contracts will not expect
     * {decimals} to ever change, and may work incorrectly if it does.
     */
    function _setupDecimals(uint8 decimals_) internal virtual {
        _decimals = decimals_;
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be to transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
}

File 5 of 13 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <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 6 of 13 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "./IERC20.sol";
import "../../math/SafeMath.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 SafeMath for uint256;
    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'
        // solhint-disable-next-line max-line-length
        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).add(value);
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero");
        _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
            // solhint-disable-next-line max-line-length
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 7 of 13 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.2 <0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 8 of 13 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <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 GSN 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 payable) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

File 9 of 13 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.3.2 (utils/introspection/IERC165.sol)

pragma solidity 0.6.12;

/**
 * @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 10 of 13 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.3.2 (token/ERC721/IERC721.sol)

pragma solidity 0.6.12;

import "./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 11 of 13 : IStableToken.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.6.12;

interface IStableToken {
    function allowance(address owner, address spender) external returns (uint);
    function transferFrom(address sender, address recipient, uint256 amount) external;
}

File 12 of 13 : ECDSA.sol
//SPDX-License-Identifier: MIT
pragma solidity 0.6.12;

library ECDSA {

  /**
   * @dev Recover signer address from a message by using their signature
   * @param hash bytes32 message, the hash is the signed message. What is recovered is the signer address.
   * @param signature bytes signature, the signature is generated using web3.eth.sign()
   */
  function recover(bytes32 hash, bytes memory signature)
    internal
    pure
    returns (address)
  {
    bytes32 r;
    bytes32 s;
    uint8 v;

    // Check the signature length
    if (signature.length != 65) {
      return (address(0));
    }

    // Divide the signature in r, s and v variables with inline assembly.
    assembly {
      r := mload(add(signature, 0x20))
      s := mload(add(signature, 0x40))
      v := byte(0, mload(add(signature, 0x60)))
    }

    // Version of signature should be 27 or 28, but 0 and 1 are also possible versions
    if (v < 27) {
      v += 27;
    }

    // If the version is correct return the signer address
    if (v != 27 && v != 28) {
      return (address(0));
    } else {
      // solium-disable-next-line arg-overflow
      return ecrecover(hash, v, r, s);
    }
  }

  /**
    * toEthSignedMessageHash
    * @dev prefix a bytes32 value with "\x19Ethereum Signed Message:"
    * and hash the result
    */
  function toEthSignedMessageHash(bytes32 hash)
    internal
    pure
    returns (bytes32)
  {
    return keccak256(
      abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)
    );
  }
}

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

pragma solidity 0.6.12;

// helper methods for interacting with ERC20 tokens and sending ETH that do not consistently return true/false
library TransferHelper {
    function safeApprove(address token, address to, uint value) internal {
        // bytes4(keccak256(bytes('approve(address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x095ea7b3, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), "TransferHelper: APPROVE_FAILED");
    }

    function safeTransfer(address token, address to, uint value) internal {
        // bytes4(keccak256(bytes('transfer(address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0xa9059cbb, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), "TransferHelper: TRANSFER_FAILED");
    }

    function safeTransferFrom(address token, address from, address to, uint value) internal {
        // bytes4(keccak256(bytes('transferFrom(address,address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x23b872dd, from, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), "TransferHelper: TRANSFER_FROM_FAILED");
    }

    function safeTransferETH(address to, uint value) internal {
        (bool success,) = to.call{value:value}(new bytes(0));
        require(success, "TransferHelper: ETH_TRANSFER_FAILED");
    }
}

Settings
{
  "evmVersion": "istanbul",
  "libraries": {},
  "metadata": {
    "bytecodeHash": "ipfs",
    "useLiteralContent": true
  },
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "remappings": [],
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_erc721","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address[3]","name":"addrs","type":"address[3]"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"AcceptOfferNFT","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address[3]","name":"addrs","type":"address[3]"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"AuctionNFT","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address[3]","name":"addrs","type":"address[3]"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"BuyNFTETH","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address[3]","name":"addrs","type":"address[3]"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"BuyNFTNormal","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"ERC721","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[5]","name":"_tradeAddress","type":"address[5]"},{"internalType":"uint256[4]","name":"_attributes","type":"uint256[4]"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"acceptOfferNFT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[5]","name":"_tradeAddress","type":"address[5]"},{"internalType":"uint256[4]","name":"_attributes","type":"uint256[4]"}],"name":"auctionNFT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[5]","name":"_tradeAddress","type":"address[5]"},{"internalType":"uint256[4]","name":"_attributes","type":"uint256[4]"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"buyNFTETH","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address[5]","name":"_tradeAddress","type":"address[5]"},{"internalType":"uint256[4]","name":"_attributes","type":"uint256[4]"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"buyNFTNormal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_admin","type":"address"}],"name":"setAdminAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_nft","type":"address"}],"name":"setNFTAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setWhitelistAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whitelistAddress","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b506040516123393803806123398339818101604052602081101561003357600080fd5b5051600061003f6100d1565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600180546001600160a01b039092166001600160a01b0319928316178155336000818152600460205260409020805460ff1916909217909155600280549092161790556100d5565b3390565b612255806100e46000396000f3fe6080604052600436106100c15760003560e01c8063715018a61161007f578063e412304711610059578063e412304714610432578063f2fde38b146104be578063f851a440146104f1578063fb3f058414610506576100c1565b8063715018a6146103d75780638425abff146103ec5780638da5cb5b1461041d576100c1565b80625900c4146100c6578063285d5d49146101e25780632c1e816d146102ef5780633f914aef14610322578063415665851461035d57806369d03738146103a4575b600080fd5b3480156100d257600080fd5b506101e060048036036101608110156100ea57600080fd5b810190808060a0019060058060200260405190810160405280929190826005602002808284376000920191909152505060408051608081810190925292959493818101939250906004908390839080828437600092019190915250919483359490939092506040810191506020013564010000000081111561016b57600080fd5b82018360208201111561017d57600080fd5b8035906020019184600183028401116401000000008311171561019f57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610620945050505050565b005b6101e060048036036101608110156101f957600080fd5b810190808060a0019060058060200260405190810160405280929190826005602002808284376000920191909152505060408051608081810190925292959493818101939250906004908390839080828437600092019190915250919483359490939092506040810191506020013564010000000081111561027a57600080fd5b82018360208201111561028c57600080fd5b803590602001918460018302840111640100000000831117156102ae57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610b40945050505050565b3480156102fb57600080fd5b506101e06004803603602081101561031257600080fd5b50356001600160a01b0316610e27565b34801561032e57600080fd5b506101e06004803603604081101561034557600080fd5b506001600160a01b0381351690602001351515610eab565b34801561036957600080fd5b506103906004803603602081101561038057600080fd5b50356001600160a01b0316610f38565b604080519115158252519081900360200190f35b3480156103b057600080fd5b506101e0600480360360208110156103c757600080fd5b50356001600160a01b0316610f4d565b3480156103e357600080fd5b506101e0610fd1565b3480156103f857600080fd5b5061040161107d565b604080516001600160a01b039092168252519081900360200190f35b34801561042957600080fd5b5061040161108c565b34801561043e57600080fd5b506101e0600480360361012081101561045657600080fd5b810190808060a001906005806020026040519081016040528092919082600560200280828437600092019190915250506040805160808181019092529295949381810193925090600490839083908082843760009201919091525091945061109b9350505050565b3480156104ca57600080fd5b506101e0600480360360208110156104e157600080fd5b50356001600160a01b0316611527565b3480156104fd57600080fd5b50610401611629565b34801561051257600080fd5b506101e0600480360361016081101561052a57600080fd5b810190808060a001906005806020026040519081016040528092919082600560200280828437600092019190915250506040805160808181019092529295949381810193925090600490839083908082843760009201919091525091948335949093909250604081019150602001356401000000008111156105ab57600080fd5b8201836020820111156105bd57600080fd5b803590602001918460018302840111640100000000831117156105df57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611638945050505050565b8184848360003385858560405160200180856001600160a01b031660601b815260140184815260200183600560200280838360005b8381101561066d578181015183820152602001610655565b5050505090500182600460200280838360005b83811015610698578181015183820152602001610680565b5050505090500194505050505060405160208183030381529060405280519060200120905060006106c8826119cc565b90506106d261108c565b6001600160a01b03166106e58285611a1d565b6001600160a01b031614610734576040805162461bcd60e51b8152602060048201526011602482015270496e76616c6964207369676e617475726560781b604482015290519081900360640190fd5b33600090815260036020908152604080832089845290915290205460ff1615610791576040805162461bcd60e51b815260206004820152600a60248201526955736564206e6f6e636560b01b604482015290519081900360640190fd5b3360009081526003602090815260408083208984529091529020805460ff191660011790556107be6120c1565b506040805180820182528b815260208082018c90526001548c820151845163020604bf60e21b815260048101919091529351929330936001600160a01b039092169263081812fc92602480840193829003018186803b15801561082057600080fd5b505afa158015610834573d6000803e3d6000fd5b505050506040513d602081101561084a57600080fd5b50516001600160a01b0316146108915760405162461bcd60e51b81526004018080602001828103825260238152602001806121b06023913960400191505060405180910390fd5b60208181015151825160408082015191518151636eb1769f60e11b81526001600160a01b0391821660048201523060248201529151939492169263dd62ed3e92604480840193919291829003018186803b1580156108ee57600080fd5b505afa158015610902573d6000803e3d6000fd5b505050506040513d602081101561091857600080fd5b50511015610967576040805162461bcd60e51b8152602060048201526017602482015276746f6b656e20616c6c6f77616e636520746f6f206c6f7760481b604482015290519081900360640190fd5b600080600061097e84600001518560200151611af3565b925092509250816000146109bd5783516109bd9060005b60200201518551606081015190859060025b60200201516001600160a01b0316929190611b73565b80156109e25783516109e29060005b60200201518551608081015190849060026109a7565b835180516109f5913390869060026109a7565b60015484516020808201519151818801519091015160408051632142170760e11b81526001600160a01b039485166004820152928416602484015260448301919091525191909216916342842e0e91606480830192600092919082900301818387803b158015610a6457600080fd5b505af1158015610a78573d6000803e3d6000fd5b5050604080516060810190915233815286517f4085991e69330815d98dbc345ed9f93b3977fd35f64ef268b72d7248cc4d431d9350909150602082019060015b602090810291909101516001600160a01b0390811683528851604001511691810191909152868101519081015190600060200201516040518084606080838360005b83811015610b12578181015183820152602001610afa565b5050505091909101938452505060208201526040805191829003019150a15050505050505050505050505050565b8184848360003385858560405160200180856001600160a01b031660601b815260140184815260200183600560200280838360005b83811015610b8d578181015183820152602001610b75565b5050505090500182600460200280838360005b83811015610bb8578181015183820152602001610ba0565b505050509050019450505050506040516020818303038152906040528051906020012090506000610be8826119cc565b9050610bf261108c565b6001600160a01b0316610c058285611a1d565b6001600160a01b031614610c54576040805162461bcd60e51b8152602060048201526011602482015270496e76616c6964207369676e617475726560781b604482015290519081900360640190fd5b33600090815260036020908152604080832089845290915290205460ff1615610cb1576040805162461bcd60e51b815260206004820152600a60248201526955736564206e6f6e636560b01b604482015290519081900360640190fd5b3360009081526003602090815260408083208984529091529020805460ff19166001179055610cde6120c1565b50604080518082019091528a8152602081018a905260008080610d018e8e611af3565b92509250925081600014610d1f57835160600151610d1f9083611bd3565b8015610d3557835160800151610d359082611bd3565b835160200151610d459084611bd3565b6001548451602090810151818701519091015160408051632142170760e11b81526001600160a01b03938416600482015233602482015260448101929092525191909216916342842e0e91606480830192600092919082900301818387803b158015610db057600080fd5b505af1158015610dc4573d6000803e3d6000fd5b50505050602084015151341115610de857602084015151610de89033903403611bd3565b604080516060810190915233815284517f0e4cb43501fcdb341a36642903dbed4ff417d75ff624446c17e261aac89f8bb7919060208201906001610ab8565b610e2f611ccb565b6001600160a01b0316610e4061108c565b6001600160a01b031614610e89576040805162461bcd60e51b81526020600482018190526024820152600080516020612190833981519152604482015290519081900360640190fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b610eb3611ccb565b6001600160a01b0316610ec461108c565b6001600160a01b031614610f0d576040805162461bcd60e51b81526020600482018190526024820152600080516020612190833981519152604482015290519081900360640190fd5b6001600160a01b03919091166000908152600460205260409020805460ff1916911515919091179055565b60046020526000908152604090205460ff1681565b610f55611ccb565b6001600160a01b0316610f6661108c565b6001600160a01b031614610faf576040805162461bcd60e51b81526020600482018190526024820152600080516020612190833981519152604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b610fd9611ccb565b6001600160a01b0316610fea61108c565b6001600160a01b031614611033576040805162461bcd60e51b81526020600482018190526024820152600080516020612190833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6001546001600160a01b031681565b6000546001600160a01b031690565b6110a36120c1565b5060408051808201825283815260208082018490523360009081526004909152919091205460ff161515600114611121576040805162461bcd60e51b815260206004820152601b60248201527f41646472657373206973206e6f7420696e2077686974656c6973740000000000604482015290519081900360640190fd5b60208181015151825160408082015191518151636eb1769f60e11b81526001600160a01b0391821660048201523060248201529151939492169263dd62ed3e92604480840193919291829003018186803b15801561117e57600080fd5b505afa158015611192573d6000803e3d6000fd5b505050506040513d60208110156111a857600080fd5b505110156111f7576040805162461bcd60e51b8152602060048201526017602482015276746f6b656e20616c6c6f77616e636520746f6f206c6f7760481b604482015290519081900360640190fd5b6002548151602001516001600160a01b03908116911614156112d5576001546002546040805163e985e9c560e01b81526001600160a01b0392831660048201523060248201529051919092169163e985e9c5916044808301926020929190829003018186803b15801561126957600080fd5b505afa15801561127d573d6000803e3d6000fd5b505050506040513d602081101561129357600080fd5b50516112d05760405162461bcd60e51b81526004018080602001828103825260238152602001806121b06023913960400191505060405180910390fd5b611396565b6001546020828101518101516040805163020604bf60e21b815260048101929092525130936001600160a01b03169263081812fc9260248082019391829003018186803b15801561132557600080fd5b505afa158015611339573d6000803e3d6000fd5b505050506040513d602081101561134f57600080fd5b50516001600160a01b0316146113965760405162461bcd60e51b81526004018080602001828103825260238152602001806121b06023913960400191505060405180910390fd5b60008060006113ad84600001518560200151611af3565b925092509250816000146113c85783516113c8906000610995565b80156113db5783516113db9060006109cc565b835180516113f69160015b60200201518651869060026109a7565b60015484516020808201519151818801519091015160408051632142170760e11b81526001600160a01b039485166004820152928416602484015260448301919091525191909216916342842e0e91606480830192600092919082900301818387803b15801561146557600080fd5b505af1158015611479573d6000803e3d6000fd5b5050604080516060808201835233825288516020908101516001600160a01b03908116828501528a518501511683850152808a015190810151905193517fcd8f7eef42f2560ef5550d3bacc1d672e5d9d1fc3744b1b10e4153105140739296509294509291908190859080838360005b838110156115015781810151838201526020016114e9565b5050505091909101938452505060208201526040805191829003019150a1505050505050565b61152f611ccb565b6001600160a01b031661154061108c565b6001600160a01b031614611589576040805162461bcd60e51b81526020600482018190526024820152600080516020612190833981519152604482015290519081900360640190fd5b6001600160a01b0381166115ce5760405162461bcd60e51b81526004018080602001828103825260268152602001806121236026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6002546001600160a01b031681565b8184848360003385858560405160200180856001600160a01b031660601b815260140184815260200183600560200280838360005b8381101561168557818101518382015260200161166d565b5050505090500182600460200280838360005b838110156116b0578181015183820152602001611698565b5050505090500194505050505060405160208183030381529060405280519060200120905060006116e0826119cc565b90506116ea61108c565b6001600160a01b03166116fd8285611a1d565b6001600160a01b03161461174c576040805162461bcd60e51b8152602060048201526011602482015270496e76616c6964207369676e617475726560781b604482015290519081900360640190fd5b33600090815260036020908152604080832089845290915290205460ff16156117a9576040805162461bcd60e51b815260206004820152600a60248201526955736564206e6f6e636560b01b604482015290519081900360640190fd5b3360009081526003602090815260408083208984529091529020805460ff191660011790556117d66120c1565b506040805180820182528b815260208082018c90528b518d8401518451636eb1769f60e11b81523360048201523060248201529451939491936001600160a01b039091169263dd62ed3e9260448082019391829003018186803b15801561183c57600080fd5b505afa158015611850573d6000803e3d6000fd5b505050506040513d602081101561186657600080fd5b505110156118b5576040805162461bcd60e51b8152602060048201526017602482015276746f6b656e20616c6c6f77616e636520746f6f206c6f7760481b604482015290519081900360640190fd5b60008060006118cc84600001518560200151611af3565b925092509250816000146118e75783516118e7906000610995565b80156118fa5783516118fa9060006109cc565b835161190990339060016113e6565b6001548451602090810151818701519091015160408051632142170760e11b81526001600160a01b03938416600482015233602482015260448101929092525191909216916342842e0e91606480830192600092919082900301818387803b15801561197457600080fd5b505af1158015611988573d6000803e3d6000fd5b5050604080516060810190915233815286517f47525166a98ecafd898e3fe0e0babcece7be6bf0737681ee59a30f64c49ab58f935090915060208201906001610ab8565b604080517f19457468657265756d205369676e6564204d6573736167653a0a333200000000602080830191909152603c8083019490945282518083039094018452605c909101909152815191012090565b6000806000808451604114611a385760009350505050611aed565b50505060208201516040830151606084015160001a601b811015611a5a57601b015b8060ff16601b14158015611a7257508060ff16601c14155b15611a835760009350505050611aed565b60018682858560405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015611add573d6000803e3d6000fd5b5050506020604051035193505050505b92915050565b60008080808086600360200201516001600160a01b031614611b3457611b2f6103e8611b298760025b6020020151885190611ccf565b90611d2f565b925082015b60808601516001600160a01b031615611b5d57611b586103e8611b29876003611b1c565b915081015b8451611b699082611d96565b9350509250925092565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052611bcd908590611df3565b50505050565b604080516000808252602082019092526001600160a01b0384169083906040518082805190602001908083835b60208310611c1f5780518252601f199092019160209182019101611c00565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611c81576040519150601f19603f3d011682016040523d82523d6000602084013e611c86565b606091505b5050905080611cc65760405162461bcd60e51b81526004018080602001828103825260238152602001806121d36023913960400191505060405180910390fd5b505050565b3390565b600082611cde57506000611aed565b82820282848281611ceb57fe5b0414611d285760405162461bcd60e51b815260040180806020018281038252602181526020018061216f6021913960400191505060405180910390fd5b9392505050565b6000808211611d85576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381611d8e57fe5b049392505050565b600082821115611ded576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6060611e48826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611ea49092919063ffffffff16565b805190915015611cc657808060200190516020811015611e6757600080fd5b5051611cc65760405162461bcd60e51b815260040180806020018281038252602a8152602001806121f6602a913960400191505060405180910390fd5b6060611eb38484600085611ebb565b949350505050565b606082471015611efc5760405162461bcd60e51b81526004018080602001828103825260268152602001806121496026913960400191505060405180910390fd5b611f0585612017565b611f56576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310611f955780518252601f199092019160209182019101611f76565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611ff7576040519150601f19603f3d011682016040523d82523d6000602084013e611ffc565b606091505b509150915061200c82828661201d565b979650505050505050565b3b151590565b6060831561202c575081611d28565b82511561203c5782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561208657818101518382015260200161206e565b50505050905090810190601f1680156120b35780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b60405180604001604052806120d46120e6565b81526020016120e1612104565b905290565b6040518060a001604052806005906020820280368337509192915050565b6040518060800160405280600490602082028036833750919291505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572746f6b656e496420646f206e6f7420617070726f766520666f7220636f6e74726163745472616e7366657248656c7065723a204554485f5452414e534645525f4641494c45445361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212201a2b2b267f91eaf034fa7e0a75780350d567dd6cb4b8ac467b84e010f078b8b064736f6c634300060c0033000000000000000000000000e7623b874531eb96e049f9d5a47ad14bd25ce28d

Deployed Bytecode

0x6080604052600436106100c15760003560e01c8063715018a61161007f578063e412304711610059578063e412304714610432578063f2fde38b146104be578063f851a440146104f1578063fb3f058414610506576100c1565b8063715018a6146103d75780638425abff146103ec5780638da5cb5b1461041d576100c1565b80625900c4146100c6578063285d5d49146101e25780632c1e816d146102ef5780633f914aef14610322578063415665851461035d57806369d03738146103a4575b600080fd5b3480156100d257600080fd5b506101e060048036036101608110156100ea57600080fd5b810190808060a0019060058060200260405190810160405280929190826005602002808284376000920191909152505060408051608081810190925292959493818101939250906004908390839080828437600092019190915250919483359490939092506040810191506020013564010000000081111561016b57600080fd5b82018360208201111561017d57600080fd5b8035906020019184600183028401116401000000008311171561019f57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610620945050505050565b005b6101e060048036036101608110156101f957600080fd5b810190808060a0019060058060200260405190810160405280929190826005602002808284376000920191909152505060408051608081810190925292959493818101939250906004908390839080828437600092019190915250919483359490939092506040810191506020013564010000000081111561027a57600080fd5b82018360208201111561028c57600080fd5b803590602001918460018302840111640100000000831117156102ae57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610b40945050505050565b3480156102fb57600080fd5b506101e06004803603602081101561031257600080fd5b50356001600160a01b0316610e27565b34801561032e57600080fd5b506101e06004803603604081101561034557600080fd5b506001600160a01b0381351690602001351515610eab565b34801561036957600080fd5b506103906004803603602081101561038057600080fd5b50356001600160a01b0316610f38565b604080519115158252519081900360200190f35b3480156103b057600080fd5b506101e0600480360360208110156103c757600080fd5b50356001600160a01b0316610f4d565b3480156103e357600080fd5b506101e0610fd1565b3480156103f857600080fd5b5061040161107d565b604080516001600160a01b039092168252519081900360200190f35b34801561042957600080fd5b5061040161108c565b34801561043e57600080fd5b506101e0600480360361012081101561045657600080fd5b810190808060a001906005806020026040519081016040528092919082600560200280828437600092019190915250506040805160808181019092529295949381810193925090600490839083908082843760009201919091525091945061109b9350505050565b3480156104ca57600080fd5b506101e0600480360360208110156104e157600080fd5b50356001600160a01b0316611527565b3480156104fd57600080fd5b50610401611629565b34801561051257600080fd5b506101e0600480360361016081101561052a57600080fd5b810190808060a001906005806020026040519081016040528092919082600560200280828437600092019190915250506040805160808181019092529295949381810193925090600490839083908082843760009201919091525091948335949093909250604081019150602001356401000000008111156105ab57600080fd5b8201836020820111156105bd57600080fd5b803590602001918460018302840111640100000000831117156105df57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611638945050505050565b8184848360003385858560405160200180856001600160a01b031660601b815260140184815260200183600560200280838360005b8381101561066d578181015183820152602001610655565b5050505090500182600460200280838360005b83811015610698578181015183820152602001610680565b5050505090500194505050505060405160208183030381529060405280519060200120905060006106c8826119cc565b90506106d261108c565b6001600160a01b03166106e58285611a1d565b6001600160a01b031614610734576040805162461bcd60e51b8152602060048201526011602482015270496e76616c6964207369676e617475726560781b604482015290519081900360640190fd5b33600090815260036020908152604080832089845290915290205460ff1615610791576040805162461bcd60e51b815260206004820152600a60248201526955736564206e6f6e636560b01b604482015290519081900360640190fd5b3360009081526003602090815260408083208984529091529020805460ff191660011790556107be6120c1565b506040805180820182528b815260208082018c90526001548c820151845163020604bf60e21b815260048101919091529351929330936001600160a01b039092169263081812fc92602480840193829003018186803b15801561082057600080fd5b505afa158015610834573d6000803e3d6000fd5b505050506040513d602081101561084a57600080fd5b50516001600160a01b0316146108915760405162461bcd60e51b81526004018080602001828103825260238152602001806121b06023913960400191505060405180910390fd5b60208181015151825160408082015191518151636eb1769f60e11b81526001600160a01b0391821660048201523060248201529151939492169263dd62ed3e92604480840193919291829003018186803b1580156108ee57600080fd5b505afa158015610902573d6000803e3d6000fd5b505050506040513d602081101561091857600080fd5b50511015610967576040805162461bcd60e51b8152602060048201526017602482015276746f6b656e20616c6c6f77616e636520746f6f206c6f7760481b604482015290519081900360640190fd5b600080600061097e84600001518560200151611af3565b925092509250816000146109bd5783516109bd9060005b60200201518551606081015190859060025b60200201516001600160a01b0316929190611b73565b80156109e25783516109e29060005b60200201518551608081015190849060026109a7565b835180516109f5913390869060026109a7565b60015484516020808201519151818801519091015160408051632142170760e11b81526001600160a01b039485166004820152928416602484015260448301919091525191909216916342842e0e91606480830192600092919082900301818387803b158015610a6457600080fd5b505af1158015610a78573d6000803e3d6000fd5b5050604080516060810190915233815286517f4085991e69330815d98dbc345ed9f93b3977fd35f64ef268b72d7248cc4d431d9350909150602082019060015b602090810291909101516001600160a01b0390811683528851604001511691810191909152868101519081015190600060200201516040518084606080838360005b83811015610b12578181015183820152602001610afa565b5050505091909101938452505060208201526040805191829003019150a15050505050505050505050505050565b8184848360003385858560405160200180856001600160a01b031660601b815260140184815260200183600560200280838360005b83811015610b8d578181015183820152602001610b75565b5050505090500182600460200280838360005b83811015610bb8578181015183820152602001610ba0565b505050509050019450505050506040516020818303038152906040528051906020012090506000610be8826119cc565b9050610bf261108c565b6001600160a01b0316610c058285611a1d565b6001600160a01b031614610c54576040805162461bcd60e51b8152602060048201526011602482015270496e76616c6964207369676e617475726560781b604482015290519081900360640190fd5b33600090815260036020908152604080832089845290915290205460ff1615610cb1576040805162461bcd60e51b815260206004820152600a60248201526955736564206e6f6e636560b01b604482015290519081900360640190fd5b3360009081526003602090815260408083208984529091529020805460ff19166001179055610cde6120c1565b50604080518082019091528a8152602081018a905260008080610d018e8e611af3565b92509250925081600014610d1f57835160600151610d1f9083611bd3565b8015610d3557835160800151610d359082611bd3565b835160200151610d459084611bd3565b6001548451602090810151818701519091015160408051632142170760e11b81526001600160a01b03938416600482015233602482015260448101929092525191909216916342842e0e91606480830192600092919082900301818387803b158015610db057600080fd5b505af1158015610dc4573d6000803e3d6000fd5b50505050602084015151341115610de857602084015151610de89033903403611bd3565b604080516060810190915233815284517f0e4cb43501fcdb341a36642903dbed4ff417d75ff624446c17e261aac89f8bb7919060208201906001610ab8565b610e2f611ccb565b6001600160a01b0316610e4061108c565b6001600160a01b031614610e89576040805162461bcd60e51b81526020600482018190526024820152600080516020612190833981519152604482015290519081900360640190fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b610eb3611ccb565b6001600160a01b0316610ec461108c565b6001600160a01b031614610f0d576040805162461bcd60e51b81526020600482018190526024820152600080516020612190833981519152604482015290519081900360640190fd5b6001600160a01b03919091166000908152600460205260409020805460ff1916911515919091179055565b60046020526000908152604090205460ff1681565b610f55611ccb565b6001600160a01b0316610f6661108c565b6001600160a01b031614610faf576040805162461bcd60e51b81526020600482018190526024820152600080516020612190833981519152604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b610fd9611ccb565b6001600160a01b0316610fea61108c565b6001600160a01b031614611033576040805162461bcd60e51b81526020600482018190526024820152600080516020612190833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6001546001600160a01b031681565b6000546001600160a01b031690565b6110a36120c1565b5060408051808201825283815260208082018490523360009081526004909152919091205460ff161515600114611121576040805162461bcd60e51b815260206004820152601b60248201527f41646472657373206973206e6f7420696e2077686974656c6973740000000000604482015290519081900360640190fd5b60208181015151825160408082015191518151636eb1769f60e11b81526001600160a01b0391821660048201523060248201529151939492169263dd62ed3e92604480840193919291829003018186803b15801561117e57600080fd5b505afa158015611192573d6000803e3d6000fd5b505050506040513d60208110156111a857600080fd5b505110156111f7576040805162461bcd60e51b8152602060048201526017602482015276746f6b656e20616c6c6f77616e636520746f6f206c6f7760481b604482015290519081900360640190fd5b6002548151602001516001600160a01b03908116911614156112d5576001546002546040805163e985e9c560e01b81526001600160a01b0392831660048201523060248201529051919092169163e985e9c5916044808301926020929190829003018186803b15801561126957600080fd5b505afa15801561127d573d6000803e3d6000fd5b505050506040513d602081101561129357600080fd5b50516112d05760405162461bcd60e51b81526004018080602001828103825260238152602001806121b06023913960400191505060405180910390fd5b611396565b6001546020828101518101516040805163020604bf60e21b815260048101929092525130936001600160a01b03169263081812fc9260248082019391829003018186803b15801561132557600080fd5b505afa158015611339573d6000803e3d6000fd5b505050506040513d602081101561134f57600080fd5b50516001600160a01b0316146113965760405162461bcd60e51b81526004018080602001828103825260238152602001806121b06023913960400191505060405180910390fd5b60008060006113ad84600001518560200151611af3565b925092509250816000146113c85783516113c8906000610995565b80156113db5783516113db9060006109cc565b835180516113f69160015b60200201518651869060026109a7565b60015484516020808201519151818801519091015160408051632142170760e11b81526001600160a01b039485166004820152928416602484015260448301919091525191909216916342842e0e91606480830192600092919082900301818387803b15801561146557600080fd5b505af1158015611479573d6000803e3d6000fd5b5050604080516060808201835233825288516020908101516001600160a01b03908116828501528a518501511683850152808a015190810151905193517fcd8f7eef42f2560ef5550d3bacc1d672e5d9d1fc3744b1b10e4153105140739296509294509291908190859080838360005b838110156115015781810151838201526020016114e9565b5050505091909101938452505060208201526040805191829003019150a1505050505050565b61152f611ccb565b6001600160a01b031661154061108c565b6001600160a01b031614611589576040805162461bcd60e51b81526020600482018190526024820152600080516020612190833981519152604482015290519081900360640190fd5b6001600160a01b0381166115ce5760405162461bcd60e51b81526004018080602001828103825260268152602001806121236026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6002546001600160a01b031681565b8184848360003385858560405160200180856001600160a01b031660601b815260140184815260200183600560200280838360005b8381101561168557818101518382015260200161166d565b5050505090500182600460200280838360005b838110156116b0578181015183820152602001611698565b5050505090500194505050505060405160208183030381529060405280519060200120905060006116e0826119cc565b90506116ea61108c565b6001600160a01b03166116fd8285611a1d565b6001600160a01b03161461174c576040805162461bcd60e51b8152602060048201526011602482015270496e76616c6964207369676e617475726560781b604482015290519081900360640190fd5b33600090815260036020908152604080832089845290915290205460ff16156117a9576040805162461bcd60e51b815260206004820152600a60248201526955736564206e6f6e636560b01b604482015290519081900360640190fd5b3360009081526003602090815260408083208984529091529020805460ff191660011790556117d66120c1565b506040805180820182528b815260208082018c90528b518d8401518451636eb1769f60e11b81523360048201523060248201529451939491936001600160a01b039091169263dd62ed3e9260448082019391829003018186803b15801561183c57600080fd5b505afa158015611850573d6000803e3d6000fd5b505050506040513d602081101561186657600080fd5b505110156118b5576040805162461bcd60e51b8152602060048201526017602482015276746f6b656e20616c6c6f77616e636520746f6f206c6f7760481b604482015290519081900360640190fd5b60008060006118cc84600001518560200151611af3565b925092509250816000146118e75783516118e7906000610995565b80156118fa5783516118fa9060006109cc565b835161190990339060016113e6565b6001548451602090810151818701519091015160408051632142170760e11b81526001600160a01b03938416600482015233602482015260448101929092525191909216916342842e0e91606480830192600092919082900301818387803b15801561197457600080fd5b505af1158015611988573d6000803e3d6000fd5b5050604080516060810190915233815286517f47525166a98ecafd898e3fe0e0babcece7be6bf0737681ee59a30f64c49ab58f935090915060208201906001610ab8565b604080517f19457468657265756d205369676e6564204d6573736167653a0a333200000000602080830191909152603c8083019490945282518083039094018452605c909101909152815191012090565b6000806000808451604114611a385760009350505050611aed565b50505060208201516040830151606084015160001a601b811015611a5a57601b015b8060ff16601b14158015611a7257508060ff16601c14155b15611a835760009350505050611aed565b60018682858560405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015611add573d6000803e3d6000fd5b5050506020604051035193505050505b92915050565b60008080808086600360200201516001600160a01b031614611b3457611b2f6103e8611b298760025b6020020151885190611ccf565b90611d2f565b925082015b60808601516001600160a01b031615611b5d57611b586103e8611b29876003611b1c565b915081015b8451611b699082611d96565b9350509250925092565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052611bcd908590611df3565b50505050565b604080516000808252602082019092526001600160a01b0384169083906040518082805190602001908083835b60208310611c1f5780518252601f199092019160209182019101611c00565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611c81576040519150601f19603f3d011682016040523d82523d6000602084013e611c86565b606091505b5050905080611cc65760405162461bcd60e51b81526004018080602001828103825260238152602001806121d36023913960400191505060405180910390fd5b505050565b3390565b600082611cde57506000611aed565b82820282848281611ceb57fe5b0414611d285760405162461bcd60e51b815260040180806020018281038252602181526020018061216f6021913960400191505060405180910390fd5b9392505050565b6000808211611d85576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381611d8e57fe5b049392505050565b600082821115611ded576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6060611e48826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611ea49092919063ffffffff16565b805190915015611cc657808060200190516020811015611e6757600080fd5b5051611cc65760405162461bcd60e51b815260040180806020018281038252602a8152602001806121f6602a913960400191505060405180910390fd5b6060611eb38484600085611ebb565b949350505050565b606082471015611efc5760405162461bcd60e51b81526004018080602001828103825260268152602001806121496026913960400191505060405180910390fd5b611f0585612017565b611f56576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310611f955780518252601f199092019160209182019101611f76565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611ff7576040519150601f19603f3d011682016040523d82523d6000602084013e611ffc565b606091505b509150915061200c82828661201d565b979650505050505050565b3b151590565b6060831561202c575081611d28565b82511561203c5782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561208657818101518382015260200161206e565b50505050905090810190601f1680156120b35780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b60405180604001604052806120d46120e6565b81526020016120e1612104565b905290565b6040518060a001604052806005906020820280368337509192915050565b6040518060800160405280600490602082028036833750919291505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572746f6b656e496420646f206e6f7420617070726f766520666f7220636f6e74726163745472616e7366657248656c7065723a204554485f5452414e534645525f4641494c45445361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212201a2b2b267f91eaf034fa7e0a75780350d567dd6cb4b8ac467b84e010f078b8b064736f6c634300060c0033

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

000000000000000000000000e7623b874531eb96e049f9d5a47ad14bd25ce28d

-----Decoded View---------------
Arg [0] : _erc721 (address): 0xE7623b874531EB96e049F9D5a47Ad14bD25ce28d

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


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.