ETH Price: $2,335.32 (-0.38%)

Contract

0xC53d0a52358FF0f0E4Dfe93a1F0C84d2B17e68DF
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
0x60806040121034902021-03-24 19:31:531266 days ago1616614313IN
 Create: NFT20Pair
0 ETH0.451404150

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
NFT20Pair

Compiler Version
v0.6.6+commit.6c089d02

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 12 : NFT20Pair.sol
pragma solidity ^0.6.0;

// ERC721
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";

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

import "./ERC20.sol";

import "@openzeppelin/contracts/utils/EnumerableSet.sol";

interface IFactory {
    function fee() external view returns (uint256);

    function flashLoansEnabled() external view returns (bool);
}

interface IFlashLoanReceiver {
    function executeOperation(
        uint256[] calldata _ids,
        uint256[] calldata _amounts,
        address initiator,
        bytes calldata params
    ) external returns (bool);
}

contract NFT20Pair is ERC20, IERC721Receiver, ERC1155Receiver {
    address public factory;
    address public nftAddress;
    uint256 public nftType;
    uint256 public nftValue;

    mapping(uint256 => uint256) public track1155;

    using EnumerableSet for EnumerableSet.UintSet;
    EnumerableSet.UintSet lockedNfts;

    event Withdraw(uint256[] indexed _tokenIds, uint256[] indexed amounts);

    // create new token
    constructor() public {}

    function init(
        string memory _name,
        string memory _symbol,
        address _nftAddress,
        uint256 _nftType
    ) public payable {
        require(factory == address(0)); //Watch out TEST this is so we can init several time
        factory = msg.sender;
        nftType = _nftType;
        name = _name;
        symbol = _symbol;
        decimals = 18;
        nftAddress = _nftAddress;
        nftValue = 100 * 10**18;
    }

    modifier flashloansEnabled() {
        require(
            IFactory(factory).flashLoansEnabled(),
            "flashloans not allowed"
        );
        _;
    }

    function getInfos()
        public
        view
        returns (
            uint256 _type,
            string memory _name,
            string memory _symbol,
            uint256 _supply
        )
    {
        _type = nftType;
        _name = name;
        _symbol = symbol;
        _supply = totalSupply.div(nftValue);
    }

    // withdraw nft and burn tokens
    function withdraw(
        uint256[] calldata _tokenIds,
        uint256[] calldata amounts,
        address recipient
    ) external {
        if (nftType == 1155) {
            if (_tokenIds.length == 1) {
                _burn(msg.sender, nftValue.mul(amounts[0]));
                _withdraw1155(
                    address(this),
                    recipient,
                    _tokenIds[0],
                    amounts[0]
                );
            } else {
                _batchWithdraw1155(
                    address(this),
                    recipient,
                    _tokenIds,
                    amounts
                );
            }
        } else if (nftType == 721) {
            _burn(msg.sender, nftValue.mul(_tokenIds.length));
            for (uint256 i = 0; i < _tokenIds.length; i++) {
                _withdraw721(address(this), recipient, _tokenIds[i]);
            }
        }

        emit Withdraw(_tokenIds, amounts);
    }

    function _withdraw1155(
        address _from,
        address _to,
        uint256 _tokenId,
        uint256 value
    ) internal {
        IERC1155(nftAddress).safeTransferFrom(_from, _to, _tokenId, value, "");
    }

    function _batchWithdraw1155(
        address _from,
        address _to,
        uint256[] memory ids,
        uint256[] memory amounts
    ) internal {
        uint256 qty = 0;
        for (uint256 i = 0; i < ids.length; i++) {
            qty = qty + amounts[i];
        }
        // burn tokens
        _burn(msg.sender, nftValue.mul(qty));

        IERC1155(nftAddress).safeBatchTransferFrom(
            _from,
            _to,
            ids,
            amounts,
            "0x0"
        );
    }

    function multi721Deposit(uint256[] memory _ids, address _referral) public {
        uint256 fee = IFactory(factory).fee();

        for (uint256 i = 0; i < _ids.length; i++) {
            IERC721(nftAddress).transferFrom(
                msg.sender,
                address(this),
                _ids[i]
            );
        }

        address referral = _referral == address(0x0) ? factory : _referral;

        _mint(
            msg.sender,
            (nftValue.mul(_ids.length)).mul(uint256(100).sub(fee)).div(100)
        );
        _mint(referral, (nftValue.mul(_ids.length)).mul(fee).div(100));
    }

    function swap721(uint256 _in, uint256 _out) external {
        IERC721(nftAddress).transferFrom(msg.sender, address(this), _in);
        IERC721(nftAddress).safeTransferFrom(address(this), msg.sender, _out);
    }

    function swap1155(
        uint256[] calldata in_ids,
        uint256[] calldata in_amounts,
        uint256[] calldata out_ids,
        uint256[] calldata out_amounts
    ) external {
        uint256 ins;
        uint256 outs;

        for (uint256 i = 0; i < out_ids.length; i++) {
            ins = ins.add(in_amounts[i]);
            outs = outs.add(out_amounts[i]);
        }

        require(ins == outs, "Need to swap same amount of NFTs");

        IERC1155(nftAddress).safeBatchTransferFrom(
            address(this),
            msg.sender,
            out_ids,
            out_amounts,
            "0x0"
        );
        IERC1155(nftAddress).safeBatchTransferFrom(
            msg.sender,
            address(this),
            in_ids,
            in_amounts,
            "INTERNAL"
        );
    }

    function _withdraw721(
        address _from,
        address _to,
        uint256 _tokenId
    ) internal {
        // lockedNfts.remove(_tokenId);
        IERC721(nftAddress).safeTransferFrom(_from, _to, _tokenId);
    }

    function onERC721Received(
        address operator,
        address,
        uint256,
        bytes memory data
    ) public virtual override returns (bytes4) {
        require(nftAddress == msg.sender, "forbidden");
        uint256 fee = IFactory(factory).fee();

        address referral =
            bytesToAddress(data) == address(0x0)
                ? factory
                : bytesToAddress(data);

        _mint(referral, nftValue.mul(fee).div(100));
        _mint(operator, nftValue.mul(uint256(100).sub(fee)).div(100));
        return this.onERC721Received.selector;
    }

    function onERC1155Received(
        address operator,
        address,
        uint256,
        uint256 value,
        bytes memory data
    ) public virtual override returns (bytes4) {
        require(nftAddress == msg.sender, "forbidden");
        if (keccak256(data) != keccak256("INTERNAL")) {
            uint256 fee = IFactory(factory).fee();

            address referral =
                bytesToAddress(data) == address(0x0)
                    ? factory
                    : bytesToAddress(data);

            _mint(referral, (nftValue.mul(value)).mul(fee).div(100));
            _mint(
                operator,
                (nftValue.mul(value)).mul(uint256(100).sub(fee)).div(100)
            );
        }
        return this.onERC1155Received.selector;
    }

    function onERC1155BatchReceived(
        address operator,
        address,
        uint256[] memory ids,
        uint256[] memory values,
        bytes memory data
    ) public virtual override returns (bytes4) {
        require(nftAddress == msg.sender, "forbidden");
        if (keccak256(data) != keccak256("INTERNAL")) {
            uint256 qty = 0;

            for (uint256 i = 0; i < ids.length; i++) {
                qty = qty + values[i];
            }
            uint256 fee = IFactory(factory).fee();

            address referral =
                bytesToAddress(data) == address(0x0)
                    ? factory
                    : bytesToAddress(data);

            _mint(
                operator,
                (nftValue.mul(qty)).mul(uint256(100).sub(fee)).div(100)
            );
            _mint(referral, (nftValue.mul(qty)).mul(fee).div(100));
        }
        return this.onERC1155BatchReceived.selector;
    }

    // set new params
    function setParams(
        uint256 _nftType,
        string calldata _name,
        string calldata _symbol,
        uint256 _nftValue
    ) external {
        require(msg.sender == factory, "!authorized");
        nftType = _nftType;
        name = _name;
        symbol = _symbol;
        nftValue = _nftValue;
    }

    function bytesToAddress(bytes memory b) public view returns (address) {
        uint256 result = 0;
        for (uint256 i = b.length - 1; i + 1 > 0; i--) {
            uint256 c = uint256(uint8(b[i]));

            uint256 to_inc = c * (16**((b.length - i - 1) * 2));
            result += to_inc;
        }
        return address(result);
    }

    function flashLoan(
        uint256[] calldata _ids,
        uint256[] calldata _amounts,
        address _operator,
        bytes calldata _params
    ) external flashloansEnabled() {
        require(_ids.length < 80, "To many NFTs");

        if (nftType == 1155) {
            IERC1155(nftAddress).safeBatchTransferFrom(
                address(this),
                _operator,
                _ids,
                _amounts,
                "0x0"
            );
        } else {
            for (uint8 index; index < _ids.length; index++) {
                IERC721(nftAddress).safeTransferFrom(
                    address(this),
                    _operator,
                    _ids[index]
                );
            }
        }
        require(
            IFlashLoanReceiver(_operator).executeOperation(
                _ids,
                _amounts,
                msg.sender,
                _params
            ),
            "Execution Failed"
        );

        if (nftType == 1155) {
            IERC1155(nftAddress).safeBatchTransferFrom(
                _operator,
                address(this),
                _ids,
                _amounts,
                "INTERNAL"
            );
        } else {
            for (uint8 index; index < _ids.length; index++) {
                IERC721(nftAddress).transferFrom(
                    _operator,
                    address(this),
                    _ids[index]
                );
            }
        }
    }
}

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

pragma solidity >=0.6.0 <0.8.0;

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

File 3 of 12 : IERC721.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.2 <0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

File 4 of 12 : ERC1155Receiver.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

/**
 * @dev _Available since v3.1._
 */
abstract contract ERC1155Receiver is ERC165, IERC1155Receiver {
    constructor() internal {
        _registerInterface(
            ERC1155Receiver(address(0)).onERC1155Received.selector ^
            ERC1155Receiver(address(0)).onERC1155BatchReceived.selector
        );
    }
}

File 5 of 12 : IERC1155.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.2 <0.8.0;

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

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

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

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

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

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

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

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

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

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

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

File 6 of 12 : ERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/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  IERC20 {
    using SafeMath for uint256;

    mapping(address => uint256) private _balances;

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

    uint256 public override totalSupply;

    string public name;
    string public symbol;
    uint8 public decimals;

    /**
     * @dev Sets the values for {name} and {symbol}, initializes {decimals} with
     * a default value of 18.
     *
     * All three of these values are immutable: they can only be set once during
     * construction.
     */
    constructor() public {}


    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view 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(msg.sender, 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(msg.sender, 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,
            msg.sender,
            _allowances[sender][msg.sender].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(
            msg.sender,
            spender,
            _allowances[msg.sender][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(
            msg.sender,
            spender,
            _allowances[msg.sender][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 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 {}

    // Added from import "@openzeppelin/contracts/token/ERC20/ERC20Burnable.sol";

    function burn(uint256 amount) public virtual {
        _burn(msg.sender, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, deducting from the caller's
     * allowance.
     *
     * See {ERC20-_burn} and {ERC20-allowance}.
     *
     * Requirements:
     *
     * - the caller must have allowance for ``accounts``'s tokens of at least
     * `amount`.
     */
    function burnFrom(address account, uint256 amount) public virtual {
        uint256 decreasedAllowance =
            allowance(account, msg.sender).sub(
                amount,
                "ERC20: burn amount exceeds allowance"
            );

        _approve(account, msg.sender, decreasedAllowance);
        _burn(account, amount);
    }
}

File 7 of 12 : EnumerableSet.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;

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

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

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

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

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

            // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs
            // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.

            bytes32 lastvalue = set._values[lastIndex];

            // Move the last value to the index where the value to delete is
            set._values[toDeleteIndex] = lastvalue;
            // Update the index for the moved value
            set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based

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

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

            return true;
        } else {
            return false;
        }
    }

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

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

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

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

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

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

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

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

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

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

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

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

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

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

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


    // UintSet

    struct UintSet {
        Set _inner;
    }

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

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

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

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

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

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

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

File 9 of 12 : IERC1155Receiver.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

/**
 * _Available since v3.1._
 */
interface IERC1155Receiver is IERC165 {

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

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

File 10 of 12 : ERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts may inherit from this and call {_registerInterface} to declare
 * their support of an interface.
 */
abstract contract ERC165 is IERC165 {
    /*
     * bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7
     */
    bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7;

    /**
     * @dev Mapping of interface ids to whether or not it's supported.
     */
    mapping(bytes4 => bool) private _supportedInterfaces;

    constructor () internal {
        // Derived contracts need only register support for their own interfaces,
        // we register support for ERC165 itself here
        _registerInterface(_INTERFACE_ID_ERC165);
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     *
     * Time complexity O(1), guaranteed to always use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return _supportedInterfaces[interfaceId];
    }

    /**
     * @dev Registers the contract as an implementer of the interface defined by
     * `interfaceId`. Support of the actual ERC165 interface is automatic and
     * registering its interface id is not required.
     *
     * See {IERC165-supportsInterface}.
     *
     * Requirements:
     *
     * - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`).
     */
    function _registerInterface(bytes4 interfaceId) internal virtual {
        require(interfaceId != 0xffffffff, "ERC165: invalid interface id");
        _supportedInterfaces[interfaceId] = true;
    }
}

File 11 of 12 : 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 12 of 12 : 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;
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"},{"indexed":true,"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"Withdraw","type":"event"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burnFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"b","type":"bytes"}],"name":"bytesToAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"factory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_ids","type":"uint256[]"},{"internalType":"uint256[]","name":"_amounts","type":"uint256[]"},{"internalType":"address","name":"_operator","type":"address"},{"internalType":"bytes","name":"_params","type":"bytes"}],"name":"flashLoan","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getInfos","outputs":[{"internalType":"uint256","name":"_type","type":"uint256"},{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"uint256","name":"_supply","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"address","name":"_nftAddress","type":"address"},{"internalType":"uint256","name":"_nftType","type":"uint256"}],"name":"init","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_ids","type":"uint256[]"},{"internalType":"address","name":"_referral","type":"address"}],"name":"multi721Deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nftAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nftType","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nftValue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"onERC1155BatchReceived","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_nftType","type":"uint256"},{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"uint256","name":"_nftValue","type":"uint256"}],"name":"setParams","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"in_ids","type":"uint256[]"},{"internalType":"uint256[]","name":"in_amounts","type":"uint256[]"},{"internalType":"uint256[]","name":"out_ids","type":"uint256[]"},{"internalType":"uint256[]","name":"out_amounts","type":"uint256[]"}],"name":"swap1155","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_in","type":"uint256"},{"internalType":"uint256","name":"_out","type":"uint256"}],"name":"swap721","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"track1155","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"address","name":"recipient","type":"address"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b506200002d6301ffc9a760e01b6001600160e01b036200004e16565b62000048630271189760e51b6001600160e01b036200004e16565b620000d3565b6001600160e01b03198082161415620000ae576040805162461bcd60e51b815260206004820152601c60248201527f4552433136353a20696e76616c696420696e7465726661636520696400000000604482015290519081900360640190fd5b6001600160e01b0319166000908152600660205260409020805460ff19166001179055565b6134aa80620000e36000396000f3fe6080604052600436106101d85760003560e01c80635edc7c1911610102578063a457c2d711610095578063d65ef8ed11610064578063d65ef8ed14610fdc578063dd62ed3e1461100c578063f23a6e6114611047578063fca010d11461111d576101d8565b8063a457c2d714610d87578063a9059cbb14610dc0578063bc197c8114610df9578063c45a015514610fc7576101d8565b806370a08231116100d157806370a0823114610b9b57806379cc679014610bce57806395d89b4114610c075780639e6405a714610c1c576101d8565b80635edc7c1914610939578063643d6dc014610a7057806369a12f6414610b715780636fac889b14610b86576101d8565b8063395093511161017a5780634484b7b2116101495780634484b7b21461066f578063456a09c814610797578063517ad7f21461086b5780635bf8633a14610924576101d8565b8063395093511461046b57806340774802146104a457806342526e4e1461057857806342966c6814610645576101d8565b8063150b7a02116101b6578063150b7a02146102e857806318160ddd146103d657806323b872dd146103fd578063313ce56714610440576101d8565b806301ffc9a7146101dd57806306fdde0314610225578063095ea7b3146102af575b600080fd5b3480156101e957600080fd5b506102116004803603602081101561020057600080fd5b50356001600160e01b031916611147565b604080519115158252519081900360200190f35b34801561023157600080fd5b5061023a611166565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561027457818101518382015260200161025c565b50505050905090810190601f1680156102a15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156102bb57600080fd5b50610211600480360360408110156102d257600080fd5b506001600160a01b0381351690602001356111f4565b3480156102f457600080fd5b506103b96004803603608081101561030b57600080fd5b6001600160a01b03823581169260208101359091169160408201359190810190608081016060820135600160201b81111561034557600080fd5b82018360208201111561035757600080fd5b803590602001918460018302840111600160201b8311171561037857600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061120b945050505050565b604080516001600160e01b03199092168252519081900360200190f35b3480156103e257600080fd5b506103eb611370565b60408051918252519081900360200190f35b34801561040957600080fd5b506102116004803603606081101561042057600080fd5b506001600160a01b03813581169160208101359091169060400135611376565b34801561044c57600080fd5b506104556113e5565b6040805160ff9092168252519081900360200190f35b34801561047757600080fd5b506102116004803603604081101561048e57600080fd5b506001600160a01b0381351690602001356113ee565b3480156104b057600080fd5b50610576600480360360808110156104c757600080fd5b81359190810190604081016020820135600160201b8111156104e857600080fd5b8201836020820111156104fa57600080fd5b803590602001918460018302840111600160201b8311171561051b57600080fd5b919390929091602081019035600160201b81111561053857600080fd5b82018360208201111561054a57600080fd5b803590602001918460018302840111600160201b8311171561056b57600080fd5b91935091503561142a565b005b34801561058457600080fd5b506106296004803603602081101561059b57600080fd5b810190602081018135600160201b8111156105b557600080fd5b8201836020820111156105c757600080fd5b803590602001918460018302840111600160201b831117156105e857600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506114a0945050505050565b604080516001600160a01b039092168252519081900360200190f35b34801561065157600080fd5b506105766004803603602081101561066857600080fd5b50356114f9565b34801561067b57600080fd5b506105766004803603608081101561069257600080fd5b810190602081018135600160201b8111156106ac57600080fd5b8201836020820111156106be57600080fd5b803590602001918460208302840111600160201b831117156106df57600080fd5b919390929091602081019035600160201b8111156106fc57600080fd5b82018360208201111561070e57600080fd5b803590602001918460208302840111600160201b8311171561072f57600080fd5b919390926001600160a01b0383351692604081019060200135600160201b81111561075957600080fd5b82018360208201111561076b57600080fd5b803590602001918460018302840111600160201b8311171561078c57600080fd5b509092509050611506565b3480156107a357600080fd5b50610576600480360360608110156107ba57600080fd5b810190602081018135600160201b8111156107d457600080fd5b8201836020820111156107e657600080fd5b803590602001918460208302840111600160201b8311171561080757600080fd5b919390929091602081019035600160201b81111561082457600080fd5b82018360208201111561083657600080fd5b803590602001918460208302840111600160201b8311171561085757600080fd5b9193509150356001600160a01b0316611b19565b34801561087757600080fd5b506105766004803603604081101561088e57600080fd5b810190602081018135600160201b8111156108a857600080fd5b8201836020820111156108ba57600080fd5b803590602001918460208302840111600160201b831117156108db57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550505090356001600160a01b03169150611cca9050565b34801561093057600080fd5b50610629611e90565b6105766004803603608081101561094f57600080fd5b810190602081018135600160201b81111561096957600080fd5b82018360208201111561097b57600080fd5b803590602001918460018302840111600160201b8311171561099c57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b8111156109ee57600080fd5b820183602082011115610a0057600080fd5b803590602001918460018302840111600160201b83111715610a2157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550506001600160a01b038335169350505060200135611e9f565b348015610a7c57600080fd5b50610a85611f34565b604051808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015610ad2578181015183820152602001610aba565b50505050905090810190601f168015610aff5780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b83811015610b32578181015183820152602001610b1a565b50505050905090810190601f168015610b5f5780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390f35b348015610b7d57600080fd5b506103eb61207b565b348015610b9257600080fd5b506103eb612081565b348015610ba757600080fd5b506103eb60048036036020811015610bbe57600080fd5b50356001600160a01b0316612087565b348015610bda57600080fd5b5061057660048036036040811015610bf157600080fd5b506001600160a01b0381351690602001356120a2565b348015610c1357600080fd5b5061023a6120f4565b348015610c2857600080fd5b5061057660048036036080811015610c3f57600080fd5b810190602081018135600160201b811115610c5957600080fd5b820183602082011115610c6b57600080fd5b803590602001918460208302840111600160201b83111715610c8c57600080fd5b919390929091602081019035600160201b811115610ca957600080fd5b820183602082011115610cbb57600080fd5b803590602001918460208302840111600160201b83111715610cdc57600080fd5b919390929091602081019035600160201b811115610cf957600080fd5b820183602082011115610d0b57600080fd5b803590602001918460208302840111600160201b83111715610d2c57600080fd5b919390929091602081019035600160201b811115610d4957600080fd5b820183602082011115610d5b57600080fd5b803590602001918460208302840111600160201b83111715610d7c57600080fd5b50909250905061214f565b348015610d9357600080fd5b5061021160048036036040811015610daa57600080fd5b506001600160a01b038135169060200135612437565b348015610dcc57600080fd5b5061021160048036036040811015610de357600080fd5b506001600160a01b03813516906020013561248c565b348015610e0557600080fd5b506103b9600480360360a0811015610e1c57600080fd5b6001600160a01b038235811692602081013590911691810190606081016040820135600160201b811115610e4f57600080fd5b820183602082011115610e6157600080fd5b803590602001918460208302840111600160201b83111715610e8257600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b811115610ed157600080fd5b820183602082011115610ee357600080fd5b803590602001918460208302840111600160201b83111715610f0457600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b811115610f5357600080fd5b820183602082011115610f6557600080fd5b803590602001918460018302840111600160201b83111715610f8657600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550612499945050505050565b348015610fd357600080fd5b50610629612654565b348015610fe857600080fd5b5061057660048036036040811015610fff57600080fd5b5080359060200135612663565b34801561101857600080fd5b506103eb6004803603604081101561102f57600080fd5b506001600160a01b0381358116916020013516612749565b34801561105357600080fd5b506103b9600480360360a081101561106a57600080fd5b6001600160a01b03823581169260208101359091169160408201359160608101359181019060a081016080820135600160201b8111156110a957600080fd5b8201836020820111156110bb57600080fd5b803590602001918460018302840111600160201b831117156110dc57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550612774945050505050565b34801561112957600080fd5b506103eb6004803603602081101561114057600080fd5b50356128fb565b6001600160e01b03191660009081526006602052604090205460ff1690565b6003805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156111ec5780601f106111c1576101008083540402835291602001916111ec565b820191906000526020600020905b8154815290600101906020018083116111cf57829003601f168201915b505050505081565b600061120133848461290d565b5060015b92915050565b6008546000906001600160a01b03163314611259576040805162461bcd60e51b81526020600482015260096024820152683337b93134b23232b760b91b604482015290519081900360640190fd5b6007546040805163ddca3f4360e01b815290516000926001600160a01b03169163ddca3f43916004808301926020929190829003018186803b15801561129e57600080fd5b505afa1580156112b2573d6000803e3d6000fd5b505050506040513d60208110156112c857600080fd5b505190506000806112d8856114a0565b6001600160a01b0316146112f4576112ef846114a0565b611301565b6007546001600160a01b03165b90506113328161132d606461132186600a546129f990919063ffffffff16565b9063ffffffff612a5916565b612ac0565b61135d8761132d606461132161134e828863ffffffff612bbc16565b600a549063ffffffff6129f916565b50630a85bd0160e11b9695505050505050565b60025481565b6000611383848484612c19565b6113db84336113d68560405180606001604052806028815260200161339a602891396001600160a01b038a166000908152600160209081526040808320338452909152902054919063ffffffff612d8016565b61290d565b5060019392505050565b60055460ff1681565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916112019185906113d6908663ffffffff612e1716565b6007546001600160a01b03163314611477576040805162461bcd60e51b815260206004820152600b60248201526a08585d5d1a1bdc9a5e995960aa1b604482015290519081900360640190fd5b6009869055611488600386866131e2565b50611495600484846131e2565b50600a555050505050565b80516000908190600019015b60018101156114f25760008482815181106114c357fe5b0160200151855160026000199185900382010260100a60f89290921c91909102939093019290910190506114ac565b5092915050565b6115033382612e71565b50565b600760009054906101000a90046001600160a01b03166001600160a01b031663f67979e26040518163ffffffff1660e01b815260040160206040518083038186803b15801561155457600080fd5b505afa158015611568573d6000803e3d6000fd5b505050506040513d602081101561157e57600080fd5b50516115ca576040805162461bcd60e51b8152602060048201526016602482015275199b185cda1b1bd85b9cc81b9bdd08185b1b1bddd95960521b604482015290519081900360640190fd5b6050861061160e576040805162461bcd60e51b815260206004820152600c60248201526b546f206d616e79204e46547360a01b604482015290519081900360640190fd5b600954610483141561171757600854604051631759616b60e11b815230600482018181526001600160a01b03878116602485015260a06044850190815260a485018c9052941693632eb2c2d69388928d928d928d928d9290916064810190608481019060c401886020890280828437600083820152601f01601f19169091018581038452868152602090810191508790870280828437600081840152601f19601f820116905080830192505050848103825260038152602001806203078360ec1b8152506020019950505050505050505050600060405180830381600087803b1580156116fa57600080fd5b505af115801561170e573d6000803e3d6000fd5b505050506117dc565b60005b60ff81168711156117da576008546001600160a01b03166342842e0e30868b8b60ff871681811061174757fe5b905060200201356040518463ffffffff1660e01b815260040180846001600160a01b03166001600160a01b03168152602001836001600160a01b03166001600160a01b031681526020018281526020019350505050600060405180830381600087803b1580156117b657600080fd5b505af11580156117ca573d6000803e3d6000fd5b50506001909201915061171a9050565b505b826001600160a01b03166328cc781c888888883388886040518863ffffffff1660e01b8152600401808060200180602001866001600160a01b03166001600160a01b031681526020018060200184810384528b8b82818152602001925060200280828437600083820152601f01601f19169091018581038452898152602090810191508a908a0280828437600083820152601f01601f191690910185810383528681526020019050868680828437600081840152601f19601f8201169050808301925050509a5050505050505050505050602060405180830381600087803b1580156118c757600080fd5b505af11580156118db573d6000803e3d6000fd5b505050506040513d60208110156118f157600080fd5b5051611937576040805162461bcd60e51b815260206004820152601060248201526f115e1958dd5d1a5bdb8811985a5b195960821b604482015290519081900360640190fd5b6009546104831415611a4b57600854604051631759616b60e11b81526001600160a01b0385811660048301908152306024840181905260a06044850190815260a485018c90529290941693632eb2c2d693889391928d928d928d928d9290916064810190608481019060c401886020890280828437600083820152601f01601f19169091018581038452868152602090810191508790870280828437600081840152601f19601f8201169050808301925050508481038252600881526020018067125395115493905360c21b8152506020019950505050505050505050600060405180830381600087803b158015611a2e57600080fd5b505af1158015611a42573d6000803e3d6000fd5b50505050611b10565b60005b60ff8116871115611b0e576008546001600160a01b03166323b872dd85308b8b60ff8716818110611a7b57fe5b905060200201356040518463ffffffff1660e01b815260040180846001600160a01b03166001600160a01b03168152602001836001600160a01b03166001600160a01b031681526020018281526020019350505050600060405180830381600087803b158015611aea57600080fd5b505af1158015611afe573d6000803e3d6000fd5b505060019092019150611a4e9050565b505b50505050505050565b6009546104831415611c0a576001841415611b9657611b5f33611b5a85856000818110611b4257fe5b90506020020135600a546129f990919063ffffffff16565b612e71565b611b91308287876000818110611b7157fe5b9050602002013586866000818110611b8557fe5b90506020020135612f79565b611c05565b611c05308287878080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808b0282810182019093528a82529093508a925089918291850190849080828437600092019190915250612ffd92505050565b611c61565b6009546102d11415611c6157600a54611c2f903390611b5a908763ffffffff6129f916565b60005b84811015611c5f57611c573083888885818110611c4b57fe5b90506020020135613171565b600101611c32565b505b8282604051808383602002808284376040519201829003822094508993508892508190508360208402808284376040519201829003822094507f4b24ec11eaffb918f4ecb6e20f72842b4d6fc3d7fc18165b9000158982c2c9c993506000925050a35050505050565b6007546040805163ddca3f4360e01b815290516000926001600160a01b03169163ddca3f43916004808301926020929190829003018186803b158015611d0f57600080fd5b505afa158015611d23573d6000803e3d6000fd5b505050506040513d6020811015611d3957600080fd5b5051905060005b8351811015611e045760085484516001600160a01b03909116906323b872dd9033903090889086908110611d7057fe5b60200260200101516040518463ffffffff1660e01b815260040180846001600160a01b03166001600160a01b03168152602001836001600160a01b03166001600160a01b031681526020018281526020019350505050600060405180830381600087803b158015611de057600080fd5b505af1158015611df4573d6000803e3d6000fd5b505060019092019150611d409050565b5060006001600160a01b03831615611e1c5782611e29565b6007546001600160a01b03165b9050611e673361132d6064611321611e47828863ffffffff612bbc16565b8951600a54611e5b9163ffffffff6129f916565b9063ffffffff6129f916565b611e8a8161132d606461132186611e5b8a51600a546129f990919063ffffffff16565b50505050565b6008546001600160a01b031681565b6007546001600160a01b031615611eb557600080fd5b600780546001600160a01b0319163317905560098190558351611edf906003906020870190613260565b508251611ef3906004906020860190613260565b50506005805460ff19166012179055600880546001600160a01b039092166001600160a01b0319909216919091179055505068056bc75e2d63100000600a55565b60095460038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060938493600093830182828015611fc45780601f10611f9957610100808354040283529160200191611fc4565b820191906000526020600020905b815481529060010190602001808311611fa757829003601f168201915b505060048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152969950919450925084019050828280156120555780601f1061202a57610100808354040283529160200191612055565b820191906000526020600020905b81548152906001019060200180831161203857829003601f168201915b50505050509150612073600a54600254612a5990919063ffffffff16565b905090919293565b600a5481565b60095481565b6001600160a01b031660009081526020819052604090205490565b60006120d8826040518060600160405280602481526020016133c2602491396120cb8633612749565b919063ffffffff612d8016565b90506120e583338361290d565b6120ef8383612e71565b505050565b6004805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156111ec5780601f106111c1576101008083540402835291602001916111ec565b600080805b858110156121b25761218189898381811061216b57fe5b9050602002013584612e1790919063ffffffff16565b92506121a885858381811061219257fe5b9050602002013583612e1790919063ffffffff16565b9150600101612154565b50808214612207576040805162461bcd60e51b815260206004820181905260248201527f4e65656420746f20737761702073616d6520616d6f756e74206f66204e465473604482015290519081900360640190fd5b600854604051631759616b60e11b81523060048201818152336024840181905260a06044850190815260a485018b90526001600160a01b0390951694632eb2c2d69491928c928c928c928c929091906064810190608481019060c401886020890280828437600083820152601f01601f19169091018581038452868152602090810191508790870280828437600081840152601f19601f820116905080830192505050848103825260038152602001806203078360ec1b8152506020019950505050505050505050600060405180830381600087803b1580156122e957600080fd5b505af11580156122fd573d6000803e3d6000fd5b50505050600860009054906101000a90046001600160a01b03166001600160a01b0316632eb2c2d633308d8d8d8d6040518763ffffffff1660e01b815260040180876001600160a01b03166001600160a01b03168152602001866001600160a01b03166001600160a01b031681526020018060200180602001806020018481038452888882818152602001925060200280828437600083820152601f01601f19169091018581038452868152602090810191508790870280828437600081840152601f19601f8201169050808301925050508481038252600881526020018067125395115493905360c21b8152506020019950505050505050505050600060405180830381600087803b15801561241357600080fd5b505af1158015612427573d6000803e3d6000fd5b5050505050505050505050505050565b600061120133846113d685604051806060016040528060258152602001613450602591393360009081526001602090815260408083206001600160a01b038d168452909152902054919063ffffffff612d8016565b6000611201338484612c19565b6008546000906001600160a01b031633146124e7576040805162461bcd60e51b81526020600482015260096024820152683337b93134b23232b760b91b604482015290519081900360640190fd5b6040805167125395115493905360c21b815290519081900360080190208251602084012014612642576000805b85518110156125425784818151811061252957fe5b6020026020010151820191508080600101915050612514565b506007546040805163ddca3f4360e01b815290516000926001600160a01b03169163ddca3f43916004808301926020929190829003018186803b15801561258857600080fd5b505afa15801561259c573d6000803e3d6000fd5b505050506040513d60208110156125b257600080fd5b505190506000806125c2866114a0565b6001600160a01b0316146125de576125d9856114a0565b6125eb565b6007546001600160a01b03165b905061261c8961132d6064611321612609828863ffffffff612bbc16565b600a54611e5b908a63ffffffff6129f916565b61263e8161132d606461132186611e5b89600a546129f990919063ffffffff16565b5050505b5063bc197c8160e01b95945050505050565b6007546001600160a01b031681565b600854604080516323b872dd60e01b81523360048201523060248201526044810185905290516001600160a01b03909216916323b872dd9160648082019260009290919082900301818387803b1580156126bc57600080fd5b505af11580156126d0573d6000803e3d6000fd5b505060085460408051632142170760e11b81523060048201523360248201526044810186905290516001600160a01b0390921693506342842e0e925060648082019260009290919082900301818387803b15801561272d57600080fd5b505af1158015612741573d6000803e3d6000fd5b505050505050565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6008546000906001600160a01b031633146127c2576040805162461bcd60e51b81526020600482015260096024820152683337b93134b23232b760b91b604482015290519081900360640190fd5b6040805167125395115493905360c21b8152905190819003600801902082516020840120146128e9576007546040805163ddca3f4360e01b815290516000926001600160a01b03169163ddca3f43916004808301926020929190829003018186803b15801561283057600080fd5b505afa158015612844573d6000803e3d6000fd5b505050506040513d602081101561285a57600080fd5b5051905060008061286a856114a0565b6001600160a01b03161461288657612881846114a0565b612893565b6007546001600160a01b03165b90506128b78161132d606461132186611e5b8b600a546129f990919063ffffffff16565b6128e68861132d60646113216128d3828863ffffffff612bbc16565b600a54611e5b908c63ffffffff6129f916565b50505b5063f23a6e6160e01b95945050505050565b600b6020526000908152604090205481565b6001600160a01b0383166129525760405162461bcd60e51b815260040180806020018281038252602481526020018061342c6024913960400191505060405180910390fd5b6001600160a01b0382166129975760405162461bcd60e51b81526004018080602001828103825260228152602001806133316022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b600082612a0857506000611205565b82820282848281612a1557fe5b0414612a525760405162461bcd60e51b81526004018080602001828103825260218152602001806133796021913960400191505060405180910390fd5b9392505050565b6000808211612aaf576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381612ab857fe5b049392505050565b6001600160a01b038216612b1b576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b612b27600083836120ef565b600254612b3a908263ffffffff612e1716565b6002556001600160a01b038216600090815260208190526040902054612b66908263ffffffff612e1716565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b600082821115612c13576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6001600160a01b038316612c5e5760405162461bcd60e51b81526004018080602001828103825260258152602001806134076025913960400191505060405180910390fd5b6001600160a01b038216612ca35760405162461bcd60e51b81526004018080602001828103825260238152602001806132ec6023913960400191505060405180910390fd5b612cae8383836120ef565b612cf181604051806060016040528060268152602001613353602691396001600160a01b038616600090815260208190526040902054919063ffffffff612d8016565b6001600160a01b038085166000908152602081905260408082209390935590841681522054612d26908263ffffffff612e1716565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008184841115612e0f5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612dd4578181015183820152602001612dbc565b50505050905090810190601f168015612e015780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015612a52576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6001600160a01b038216612eb65760405162461bcd60e51b81526004018080602001828103825260218152602001806133e66021913960400191505060405180910390fd5b612ec2826000836120ef565b612f058160405180606001604052806022815260200161330f602291396001600160a01b038516600090815260208190526040902054919063ffffffff612d8016565b6001600160a01b038316600090815260208190526040902055600254612f31908263ffffffff612bbc16565b6002556040805182815290516000916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b60085460408051637921219560e11b81526001600160a01b0387811660048301528681166024830152604482018690526064820185905260a06084830152600060a48301819052925193169263f242432a9260e48084019391929182900301818387803b158015612fe957600080fd5b505af1158015611b0e573d6000803e3d6000fd5b6000805b835181101561302f5782818151811061301657fe5b6020026020010151820191508080600101915050613001565b5061304933611b5a83600a546129f990919063ffffffff16565b600854604051631759616b60e11b81526001600160a01b0387811660048301908152878216602484015260a060448401908152875160a485015287519290941693632eb2c2d6938a938a938a938a93919290916064810191608482019160c401906020808901910280838360005b838110156130cf5781810151838201526020016130b7565b50505050905001848103835285818151815260200191508051906020019060200280838360005b8381101561310e5781810151838201526020016130f6565b50505050905001848103825260038152602001806203078360ec1b815250602001975050505050505050600060405180830381600087803b15801561315257600080fd5b505af1158015613166573d6000803e3d6000fd5b505050505050505050565b60085460408051632142170760e11b81526001600160a01b038681166004830152858116602483015260448201859052915191909216916342842e0e91606480830192600092919082900301818387803b1580156131ce57600080fd5b505af1158015611b10573d6000803e3d6000fd5b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106132235782800160ff19823516178555613250565b82800160010185558215613250579182015b82811115613250578235825591602001919060010190613235565b5061325c9291506132ce565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106132a157805160ff1916838001178555613250565b82800160010185558215613250579182015b828111156132505782518255916020019190600101906132b3565b6132e891905b8082111561325c57600081556001016132d4565b9056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e20616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220f4b2367a0de8bf6f267ff8a269d31885107d537f8494377208d87ef41cde0b7d64736f6c63430006060033

Deployed Bytecode

0x6080604052600436106101d85760003560e01c80635edc7c1911610102578063a457c2d711610095578063d65ef8ed11610064578063d65ef8ed14610fdc578063dd62ed3e1461100c578063f23a6e6114611047578063fca010d11461111d576101d8565b8063a457c2d714610d87578063a9059cbb14610dc0578063bc197c8114610df9578063c45a015514610fc7576101d8565b806370a08231116100d157806370a0823114610b9b57806379cc679014610bce57806395d89b4114610c075780639e6405a714610c1c576101d8565b80635edc7c1914610939578063643d6dc014610a7057806369a12f6414610b715780636fac889b14610b86576101d8565b8063395093511161017a5780634484b7b2116101495780634484b7b21461066f578063456a09c814610797578063517ad7f21461086b5780635bf8633a14610924576101d8565b8063395093511461046b57806340774802146104a457806342526e4e1461057857806342966c6814610645576101d8565b8063150b7a02116101b6578063150b7a02146102e857806318160ddd146103d657806323b872dd146103fd578063313ce56714610440576101d8565b806301ffc9a7146101dd57806306fdde0314610225578063095ea7b3146102af575b600080fd5b3480156101e957600080fd5b506102116004803603602081101561020057600080fd5b50356001600160e01b031916611147565b604080519115158252519081900360200190f35b34801561023157600080fd5b5061023a611166565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561027457818101518382015260200161025c565b50505050905090810190601f1680156102a15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156102bb57600080fd5b50610211600480360360408110156102d257600080fd5b506001600160a01b0381351690602001356111f4565b3480156102f457600080fd5b506103b96004803603608081101561030b57600080fd5b6001600160a01b03823581169260208101359091169160408201359190810190608081016060820135600160201b81111561034557600080fd5b82018360208201111561035757600080fd5b803590602001918460018302840111600160201b8311171561037857600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061120b945050505050565b604080516001600160e01b03199092168252519081900360200190f35b3480156103e257600080fd5b506103eb611370565b60408051918252519081900360200190f35b34801561040957600080fd5b506102116004803603606081101561042057600080fd5b506001600160a01b03813581169160208101359091169060400135611376565b34801561044c57600080fd5b506104556113e5565b6040805160ff9092168252519081900360200190f35b34801561047757600080fd5b506102116004803603604081101561048e57600080fd5b506001600160a01b0381351690602001356113ee565b3480156104b057600080fd5b50610576600480360360808110156104c757600080fd5b81359190810190604081016020820135600160201b8111156104e857600080fd5b8201836020820111156104fa57600080fd5b803590602001918460018302840111600160201b8311171561051b57600080fd5b919390929091602081019035600160201b81111561053857600080fd5b82018360208201111561054a57600080fd5b803590602001918460018302840111600160201b8311171561056b57600080fd5b91935091503561142a565b005b34801561058457600080fd5b506106296004803603602081101561059b57600080fd5b810190602081018135600160201b8111156105b557600080fd5b8201836020820111156105c757600080fd5b803590602001918460018302840111600160201b831117156105e857600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506114a0945050505050565b604080516001600160a01b039092168252519081900360200190f35b34801561065157600080fd5b506105766004803603602081101561066857600080fd5b50356114f9565b34801561067b57600080fd5b506105766004803603608081101561069257600080fd5b810190602081018135600160201b8111156106ac57600080fd5b8201836020820111156106be57600080fd5b803590602001918460208302840111600160201b831117156106df57600080fd5b919390929091602081019035600160201b8111156106fc57600080fd5b82018360208201111561070e57600080fd5b803590602001918460208302840111600160201b8311171561072f57600080fd5b919390926001600160a01b0383351692604081019060200135600160201b81111561075957600080fd5b82018360208201111561076b57600080fd5b803590602001918460018302840111600160201b8311171561078c57600080fd5b509092509050611506565b3480156107a357600080fd5b50610576600480360360608110156107ba57600080fd5b810190602081018135600160201b8111156107d457600080fd5b8201836020820111156107e657600080fd5b803590602001918460208302840111600160201b8311171561080757600080fd5b919390929091602081019035600160201b81111561082457600080fd5b82018360208201111561083657600080fd5b803590602001918460208302840111600160201b8311171561085757600080fd5b9193509150356001600160a01b0316611b19565b34801561087757600080fd5b506105766004803603604081101561088e57600080fd5b810190602081018135600160201b8111156108a857600080fd5b8201836020820111156108ba57600080fd5b803590602001918460208302840111600160201b831117156108db57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550505090356001600160a01b03169150611cca9050565b34801561093057600080fd5b50610629611e90565b6105766004803603608081101561094f57600080fd5b810190602081018135600160201b81111561096957600080fd5b82018360208201111561097b57600080fd5b803590602001918460018302840111600160201b8311171561099c57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b8111156109ee57600080fd5b820183602082011115610a0057600080fd5b803590602001918460018302840111600160201b83111715610a2157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550506001600160a01b038335169350505060200135611e9f565b348015610a7c57600080fd5b50610a85611f34565b604051808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015610ad2578181015183820152602001610aba565b50505050905090810190601f168015610aff5780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b83811015610b32578181015183820152602001610b1a565b50505050905090810190601f168015610b5f5780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390f35b348015610b7d57600080fd5b506103eb61207b565b348015610b9257600080fd5b506103eb612081565b348015610ba757600080fd5b506103eb60048036036020811015610bbe57600080fd5b50356001600160a01b0316612087565b348015610bda57600080fd5b5061057660048036036040811015610bf157600080fd5b506001600160a01b0381351690602001356120a2565b348015610c1357600080fd5b5061023a6120f4565b348015610c2857600080fd5b5061057660048036036080811015610c3f57600080fd5b810190602081018135600160201b811115610c5957600080fd5b820183602082011115610c6b57600080fd5b803590602001918460208302840111600160201b83111715610c8c57600080fd5b919390929091602081019035600160201b811115610ca957600080fd5b820183602082011115610cbb57600080fd5b803590602001918460208302840111600160201b83111715610cdc57600080fd5b919390929091602081019035600160201b811115610cf957600080fd5b820183602082011115610d0b57600080fd5b803590602001918460208302840111600160201b83111715610d2c57600080fd5b919390929091602081019035600160201b811115610d4957600080fd5b820183602082011115610d5b57600080fd5b803590602001918460208302840111600160201b83111715610d7c57600080fd5b50909250905061214f565b348015610d9357600080fd5b5061021160048036036040811015610daa57600080fd5b506001600160a01b038135169060200135612437565b348015610dcc57600080fd5b5061021160048036036040811015610de357600080fd5b506001600160a01b03813516906020013561248c565b348015610e0557600080fd5b506103b9600480360360a0811015610e1c57600080fd5b6001600160a01b038235811692602081013590911691810190606081016040820135600160201b811115610e4f57600080fd5b820183602082011115610e6157600080fd5b803590602001918460208302840111600160201b83111715610e8257600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b811115610ed157600080fd5b820183602082011115610ee357600080fd5b803590602001918460208302840111600160201b83111715610f0457600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b811115610f5357600080fd5b820183602082011115610f6557600080fd5b803590602001918460018302840111600160201b83111715610f8657600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550612499945050505050565b348015610fd357600080fd5b50610629612654565b348015610fe857600080fd5b5061057660048036036040811015610fff57600080fd5b5080359060200135612663565b34801561101857600080fd5b506103eb6004803603604081101561102f57600080fd5b506001600160a01b0381358116916020013516612749565b34801561105357600080fd5b506103b9600480360360a081101561106a57600080fd5b6001600160a01b03823581169260208101359091169160408201359160608101359181019060a081016080820135600160201b8111156110a957600080fd5b8201836020820111156110bb57600080fd5b803590602001918460018302840111600160201b831117156110dc57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550612774945050505050565b34801561112957600080fd5b506103eb6004803603602081101561114057600080fd5b50356128fb565b6001600160e01b03191660009081526006602052604090205460ff1690565b6003805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156111ec5780601f106111c1576101008083540402835291602001916111ec565b820191906000526020600020905b8154815290600101906020018083116111cf57829003601f168201915b505050505081565b600061120133848461290d565b5060015b92915050565b6008546000906001600160a01b03163314611259576040805162461bcd60e51b81526020600482015260096024820152683337b93134b23232b760b91b604482015290519081900360640190fd5b6007546040805163ddca3f4360e01b815290516000926001600160a01b03169163ddca3f43916004808301926020929190829003018186803b15801561129e57600080fd5b505afa1580156112b2573d6000803e3d6000fd5b505050506040513d60208110156112c857600080fd5b505190506000806112d8856114a0565b6001600160a01b0316146112f4576112ef846114a0565b611301565b6007546001600160a01b03165b90506113328161132d606461132186600a546129f990919063ffffffff16565b9063ffffffff612a5916565b612ac0565b61135d8761132d606461132161134e828863ffffffff612bbc16565b600a549063ffffffff6129f916565b50630a85bd0160e11b9695505050505050565b60025481565b6000611383848484612c19565b6113db84336113d68560405180606001604052806028815260200161339a602891396001600160a01b038a166000908152600160209081526040808320338452909152902054919063ffffffff612d8016565b61290d565b5060019392505050565b60055460ff1681565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916112019185906113d6908663ffffffff612e1716565b6007546001600160a01b03163314611477576040805162461bcd60e51b815260206004820152600b60248201526a08585d5d1a1bdc9a5e995960aa1b604482015290519081900360640190fd5b6009869055611488600386866131e2565b50611495600484846131e2565b50600a555050505050565b80516000908190600019015b60018101156114f25760008482815181106114c357fe5b0160200151855160026000199185900382010260100a60f89290921c91909102939093019290910190506114ac565b5092915050565b6115033382612e71565b50565b600760009054906101000a90046001600160a01b03166001600160a01b031663f67979e26040518163ffffffff1660e01b815260040160206040518083038186803b15801561155457600080fd5b505afa158015611568573d6000803e3d6000fd5b505050506040513d602081101561157e57600080fd5b50516115ca576040805162461bcd60e51b8152602060048201526016602482015275199b185cda1b1bd85b9cc81b9bdd08185b1b1bddd95960521b604482015290519081900360640190fd5b6050861061160e576040805162461bcd60e51b815260206004820152600c60248201526b546f206d616e79204e46547360a01b604482015290519081900360640190fd5b600954610483141561171757600854604051631759616b60e11b815230600482018181526001600160a01b03878116602485015260a06044850190815260a485018c9052941693632eb2c2d69388928d928d928d928d9290916064810190608481019060c401886020890280828437600083820152601f01601f19169091018581038452868152602090810191508790870280828437600081840152601f19601f820116905080830192505050848103825260038152602001806203078360ec1b8152506020019950505050505050505050600060405180830381600087803b1580156116fa57600080fd5b505af115801561170e573d6000803e3d6000fd5b505050506117dc565b60005b60ff81168711156117da576008546001600160a01b03166342842e0e30868b8b60ff871681811061174757fe5b905060200201356040518463ffffffff1660e01b815260040180846001600160a01b03166001600160a01b03168152602001836001600160a01b03166001600160a01b031681526020018281526020019350505050600060405180830381600087803b1580156117b657600080fd5b505af11580156117ca573d6000803e3d6000fd5b50506001909201915061171a9050565b505b826001600160a01b03166328cc781c888888883388886040518863ffffffff1660e01b8152600401808060200180602001866001600160a01b03166001600160a01b031681526020018060200184810384528b8b82818152602001925060200280828437600083820152601f01601f19169091018581038452898152602090810191508a908a0280828437600083820152601f01601f191690910185810383528681526020019050868680828437600081840152601f19601f8201169050808301925050509a5050505050505050505050602060405180830381600087803b1580156118c757600080fd5b505af11580156118db573d6000803e3d6000fd5b505050506040513d60208110156118f157600080fd5b5051611937576040805162461bcd60e51b815260206004820152601060248201526f115e1958dd5d1a5bdb8811985a5b195960821b604482015290519081900360640190fd5b6009546104831415611a4b57600854604051631759616b60e11b81526001600160a01b0385811660048301908152306024840181905260a06044850190815260a485018c90529290941693632eb2c2d693889391928d928d928d928d9290916064810190608481019060c401886020890280828437600083820152601f01601f19169091018581038452868152602090810191508790870280828437600081840152601f19601f8201169050808301925050508481038252600881526020018067125395115493905360c21b8152506020019950505050505050505050600060405180830381600087803b158015611a2e57600080fd5b505af1158015611a42573d6000803e3d6000fd5b50505050611b10565b60005b60ff8116871115611b0e576008546001600160a01b03166323b872dd85308b8b60ff8716818110611a7b57fe5b905060200201356040518463ffffffff1660e01b815260040180846001600160a01b03166001600160a01b03168152602001836001600160a01b03166001600160a01b031681526020018281526020019350505050600060405180830381600087803b158015611aea57600080fd5b505af1158015611afe573d6000803e3d6000fd5b505060019092019150611a4e9050565b505b50505050505050565b6009546104831415611c0a576001841415611b9657611b5f33611b5a85856000818110611b4257fe5b90506020020135600a546129f990919063ffffffff16565b612e71565b611b91308287876000818110611b7157fe5b9050602002013586866000818110611b8557fe5b90506020020135612f79565b611c05565b611c05308287878080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808b0282810182019093528a82529093508a925089918291850190849080828437600092019190915250612ffd92505050565b611c61565b6009546102d11415611c6157600a54611c2f903390611b5a908763ffffffff6129f916565b60005b84811015611c5f57611c573083888885818110611c4b57fe5b90506020020135613171565b600101611c32565b505b8282604051808383602002808284376040519201829003822094508993508892508190508360208402808284376040519201829003822094507f4b24ec11eaffb918f4ecb6e20f72842b4d6fc3d7fc18165b9000158982c2c9c993506000925050a35050505050565b6007546040805163ddca3f4360e01b815290516000926001600160a01b03169163ddca3f43916004808301926020929190829003018186803b158015611d0f57600080fd5b505afa158015611d23573d6000803e3d6000fd5b505050506040513d6020811015611d3957600080fd5b5051905060005b8351811015611e045760085484516001600160a01b03909116906323b872dd9033903090889086908110611d7057fe5b60200260200101516040518463ffffffff1660e01b815260040180846001600160a01b03166001600160a01b03168152602001836001600160a01b03166001600160a01b031681526020018281526020019350505050600060405180830381600087803b158015611de057600080fd5b505af1158015611df4573d6000803e3d6000fd5b505060019092019150611d409050565b5060006001600160a01b03831615611e1c5782611e29565b6007546001600160a01b03165b9050611e673361132d6064611321611e47828863ffffffff612bbc16565b8951600a54611e5b9163ffffffff6129f916565b9063ffffffff6129f916565b611e8a8161132d606461132186611e5b8a51600a546129f990919063ffffffff16565b50505050565b6008546001600160a01b031681565b6007546001600160a01b031615611eb557600080fd5b600780546001600160a01b0319163317905560098190558351611edf906003906020870190613260565b508251611ef3906004906020860190613260565b50506005805460ff19166012179055600880546001600160a01b039092166001600160a01b0319909216919091179055505068056bc75e2d63100000600a55565b60095460038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060938493600093830182828015611fc45780601f10611f9957610100808354040283529160200191611fc4565b820191906000526020600020905b815481529060010190602001808311611fa757829003601f168201915b505060048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152969950919450925084019050828280156120555780601f1061202a57610100808354040283529160200191612055565b820191906000526020600020905b81548152906001019060200180831161203857829003601f168201915b50505050509150612073600a54600254612a5990919063ffffffff16565b905090919293565b600a5481565b60095481565b6001600160a01b031660009081526020819052604090205490565b60006120d8826040518060600160405280602481526020016133c2602491396120cb8633612749565b919063ffffffff612d8016565b90506120e583338361290d565b6120ef8383612e71565b505050565b6004805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156111ec5780601f106111c1576101008083540402835291602001916111ec565b600080805b858110156121b25761218189898381811061216b57fe5b9050602002013584612e1790919063ffffffff16565b92506121a885858381811061219257fe5b9050602002013583612e1790919063ffffffff16565b9150600101612154565b50808214612207576040805162461bcd60e51b815260206004820181905260248201527f4e65656420746f20737761702073616d6520616d6f756e74206f66204e465473604482015290519081900360640190fd5b600854604051631759616b60e11b81523060048201818152336024840181905260a06044850190815260a485018b90526001600160a01b0390951694632eb2c2d69491928c928c928c928c929091906064810190608481019060c401886020890280828437600083820152601f01601f19169091018581038452868152602090810191508790870280828437600081840152601f19601f820116905080830192505050848103825260038152602001806203078360ec1b8152506020019950505050505050505050600060405180830381600087803b1580156122e957600080fd5b505af11580156122fd573d6000803e3d6000fd5b50505050600860009054906101000a90046001600160a01b03166001600160a01b0316632eb2c2d633308d8d8d8d6040518763ffffffff1660e01b815260040180876001600160a01b03166001600160a01b03168152602001866001600160a01b03166001600160a01b031681526020018060200180602001806020018481038452888882818152602001925060200280828437600083820152601f01601f19169091018581038452868152602090810191508790870280828437600081840152601f19601f8201169050808301925050508481038252600881526020018067125395115493905360c21b8152506020019950505050505050505050600060405180830381600087803b15801561241357600080fd5b505af1158015612427573d6000803e3d6000fd5b5050505050505050505050505050565b600061120133846113d685604051806060016040528060258152602001613450602591393360009081526001602090815260408083206001600160a01b038d168452909152902054919063ffffffff612d8016565b6000611201338484612c19565b6008546000906001600160a01b031633146124e7576040805162461bcd60e51b81526020600482015260096024820152683337b93134b23232b760b91b604482015290519081900360640190fd5b6040805167125395115493905360c21b815290519081900360080190208251602084012014612642576000805b85518110156125425784818151811061252957fe5b6020026020010151820191508080600101915050612514565b506007546040805163ddca3f4360e01b815290516000926001600160a01b03169163ddca3f43916004808301926020929190829003018186803b15801561258857600080fd5b505afa15801561259c573d6000803e3d6000fd5b505050506040513d60208110156125b257600080fd5b505190506000806125c2866114a0565b6001600160a01b0316146125de576125d9856114a0565b6125eb565b6007546001600160a01b03165b905061261c8961132d6064611321612609828863ffffffff612bbc16565b600a54611e5b908a63ffffffff6129f916565b61263e8161132d606461132186611e5b89600a546129f990919063ffffffff16565b5050505b5063bc197c8160e01b95945050505050565b6007546001600160a01b031681565b600854604080516323b872dd60e01b81523360048201523060248201526044810185905290516001600160a01b03909216916323b872dd9160648082019260009290919082900301818387803b1580156126bc57600080fd5b505af11580156126d0573d6000803e3d6000fd5b505060085460408051632142170760e11b81523060048201523360248201526044810186905290516001600160a01b0390921693506342842e0e925060648082019260009290919082900301818387803b15801561272d57600080fd5b505af1158015612741573d6000803e3d6000fd5b505050505050565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6008546000906001600160a01b031633146127c2576040805162461bcd60e51b81526020600482015260096024820152683337b93134b23232b760b91b604482015290519081900360640190fd5b6040805167125395115493905360c21b8152905190819003600801902082516020840120146128e9576007546040805163ddca3f4360e01b815290516000926001600160a01b03169163ddca3f43916004808301926020929190829003018186803b15801561283057600080fd5b505afa158015612844573d6000803e3d6000fd5b505050506040513d602081101561285a57600080fd5b5051905060008061286a856114a0565b6001600160a01b03161461288657612881846114a0565b612893565b6007546001600160a01b03165b90506128b78161132d606461132186611e5b8b600a546129f990919063ffffffff16565b6128e68861132d60646113216128d3828863ffffffff612bbc16565b600a54611e5b908c63ffffffff6129f916565b50505b5063f23a6e6160e01b95945050505050565b600b6020526000908152604090205481565b6001600160a01b0383166129525760405162461bcd60e51b815260040180806020018281038252602481526020018061342c6024913960400191505060405180910390fd5b6001600160a01b0382166129975760405162461bcd60e51b81526004018080602001828103825260228152602001806133316022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b600082612a0857506000611205565b82820282848281612a1557fe5b0414612a525760405162461bcd60e51b81526004018080602001828103825260218152602001806133796021913960400191505060405180910390fd5b9392505050565b6000808211612aaf576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381612ab857fe5b049392505050565b6001600160a01b038216612b1b576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b612b27600083836120ef565b600254612b3a908263ffffffff612e1716565b6002556001600160a01b038216600090815260208190526040902054612b66908263ffffffff612e1716565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b600082821115612c13576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6001600160a01b038316612c5e5760405162461bcd60e51b81526004018080602001828103825260258152602001806134076025913960400191505060405180910390fd5b6001600160a01b038216612ca35760405162461bcd60e51b81526004018080602001828103825260238152602001806132ec6023913960400191505060405180910390fd5b612cae8383836120ef565b612cf181604051806060016040528060268152602001613353602691396001600160a01b038616600090815260208190526040902054919063ffffffff612d8016565b6001600160a01b038085166000908152602081905260408082209390935590841681522054612d26908263ffffffff612e1716565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008184841115612e0f5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612dd4578181015183820152602001612dbc565b50505050905090810190601f168015612e015780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015612a52576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6001600160a01b038216612eb65760405162461bcd60e51b81526004018080602001828103825260218152602001806133e66021913960400191505060405180910390fd5b612ec2826000836120ef565b612f058160405180606001604052806022815260200161330f602291396001600160a01b038516600090815260208190526040902054919063ffffffff612d8016565b6001600160a01b038316600090815260208190526040902055600254612f31908263ffffffff612bbc16565b6002556040805182815290516000916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b60085460408051637921219560e11b81526001600160a01b0387811660048301528681166024830152604482018690526064820185905260a06084830152600060a48301819052925193169263f242432a9260e48084019391929182900301818387803b158015612fe957600080fd5b505af1158015611b0e573d6000803e3d6000fd5b6000805b835181101561302f5782818151811061301657fe5b6020026020010151820191508080600101915050613001565b5061304933611b5a83600a546129f990919063ffffffff16565b600854604051631759616b60e11b81526001600160a01b0387811660048301908152878216602484015260a060448401908152875160a485015287519290941693632eb2c2d6938a938a938a938a93919290916064810191608482019160c401906020808901910280838360005b838110156130cf5781810151838201526020016130b7565b50505050905001848103835285818151815260200191508051906020019060200280838360005b8381101561310e5781810151838201526020016130f6565b50505050905001848103825260038152602001806203078360ec1b815250602001975050505050505050600060405180830381600087803b15801561315257600080fd5b505af1158015613166573d6000803e3d6000fd5b505050505050505050565b60085460408051632142170760e11b81526001600160a01b038681166004830152858116602483015260448201859052915191909216916342842e0e91606480830192600092919082900301818387803b1580156131ce57600080fd5b505af1158015611b10573d6000803e3d6000fd5b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106132235782800160ff19823516178555613250565b82800160010185558215613250579182015b82811115613250578235825591602001919060010190613235565b5061325c9291506132ce565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106132a157805160ff1916838001178555613250565b82800160010185558215613250579182015b828111156132505782518255916020019190600101906132b3565b6132e891905b8082111561325c57600081556001016132d4565b9056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e20616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220f4b2367a0de8bf6f267ff8a269d31885107d537f8494377208d87ef41cde0b7d64736f6c63430006060033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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