ETH Price: $3,153.28 (+1.99%)

Contract

0x1f92207b4B7357Cd497496bFD4D4cA9fdD2029f3
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
0x60806040147657542022-05-13 6:24:23918 days ago1652423063IN
 Create: MintableERC721New
0 ETH0.2182684485.71833294

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MintableERC721New

Compiler Version
v0.5.2+commit.1df8f40c

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 1 : MintableERC721New.sol
pragma solidity ^0.5.0;
pragma experimental ABIEncoderV2;


/*
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with GSN meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
contract Context {
    // Empty internal constructor, to prevent people from mistakenly deploying
    // an instance of this contract, which should be used via inheritance.
    constructor () internal {}
    // solhint-disable-previous-line no-empty-blocks

    function _msgSender() internal view returns (address payable) {
        return msg.sender;
    }

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

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor () internal {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

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

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

    /**
     * @dev Returns true if the caller is the current owner.
     */
    function isOwner() public view returns (bool) {
        return _msgSender() == _owner;
    }

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

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public onlyOwner {
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     */
    function _transferOwnership(address newOwner) internal {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

/**
 * @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);
}

interface IERC2981  {
    /**
     * @dev Called with the sale price to determine how much royalty is owed and to whom.
     * @param tokenId - the NFT asset queried for royalty information
     * @param salePrice - the sale price of the NFT asset specified by `tokenId`
     * @return receiver - address of who should be sent the royalty payment
     * @return royaltyAmount - the royalty payment amount for `salePrice`
     */
    function royaltyInfo(uint256 tokenId, uint256 salePrice)
    external
    view
    returns (address receiver, uint256 royaltyAmount);
}

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
contract IERC721 is IERC165 {
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

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

    /**
     * @dev Returns the owner of the NFT specified by `tokenId`.
     */
    function ownerOf(uint256 tokenId) public view returns (address owner);

    /**
     * @dev Transfers a specific NFT (`tokenId`) from one account (`from`) to
     * another (`to`).
     *
     *
     *
     * Requirements:
     * - `from`, `to` cannot be zero.
     * - `tokenId` must be owned by `from`.
     * - If the caller is not `from`, it must be have been allowed to move this
     * NFT by either {approve} or {setApprovalForAll}.
     */
    function safeTransferFrom(address from, address to, uint256 tokenId) public;
    /**
     * @dev Transfers a specific NFT (`tokenId`) from one account (`from`) to
     * another (`to`).
     *
     * Requirements:
     * - If the caller is not `from`, it must be approved to move this NFT by
     * either {approve} or {setApprovalForAll}.
     */
    function transferFrom(address from, address to, uint256 tokenId) public;

    function approve(address to, uint256 tokenId) public;

    function getApproved(uint256 tokenId) public view returns (address operator);

    function setApprovalForAll(address operator, bool _approved) public;

    function isApprovedForAll(address owner, address operator) public view returns (bool);


    function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public;
}

/**
 * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
contract IERC721Metadata is IERC721 {
    function name() external view returns (string memory);

    function symbol() external view returns (string memory);

    function tokenURI(uint256 tokenId) external view returns (string memory);
}

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
contract IERC721Receiver {
    /**
     * @notice Handle the receipt of an NFT
     * @dev The ERC721 smart contract calls this function on the recipient
     * after a {IERC721-safeTransferFrom}. This function MUST return the function selector,
     * otherwise the caller will revert the transaction. The selector to be
     * returned can be obtained as `this.onERC721Received.selector`. This
     * function MAY throw to revert and reject the transfer.
     * Note: the ERC721 contract address is always the message sender.
     * @param operator The address which called `safeTransferFrom` function
     * @param from The address which previously owned the token
     * @param tokenId The NFT identifier which is being transferred
     * @param data Additional data with no specified format
     * @return bytes4 `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
     */
    function onERC721Received(address operator, address from, uint256 tokenId, bytes memory data)
    public returns (bytes4);
}

/**
 * @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, 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) {
        return sub(a, b, "SafeMath: subtraction overflow");
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     * - Subtraction cannot overflow.
     *
     * _Available since v2.4.0._
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

    /**
     * @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) {
        // 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 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts 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) {
        return div(a, b, "SafeMath: division by zero");
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts with custom message 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.
     *
     * _Available since v2.4.0._
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        // Solidity only automatically asserts when dividing by 0
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

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

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message 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.
     *
     * _Available since v2.4.0._
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // According to EIP-1052, 0x0 is the value returned for not-yet created accounts
        // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
        // for accounts without code, i.e. `keccak256('')`
        bytes32 codehash;
        bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
        // solhint-disable-next-line no-inline-assembly
        assembly {codehash := extcodehash(account)}
        return (codehash != accountHash && codehash != 0x0);
    }

    /**
     * @dev Converts an `address` into `address payable`. Note that this is
     * simply a type cast: the actual underlying value is not changed.
     *
     * _Available since v2.4.0._
     */
    function toPayable(address account) internal pure returns (address payable) {
        return address(uint160(account));
    }

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

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

/**
 * @title Counters
 * @author Matt Condon (@shrugs)
 * @dev Provides counters that can only be incremented or decremented by one. This can be used e.g. to track the number
 * of elements in a mapping, issuing ERC721 ids, or counting request ids.
 *
 * Include with `using Counters for Counters.Counter;`
 * Since it is not possible to overflow a 256 bit integer with increments of one, `increment` can skip the {SafeMath}
 * overflow check, thereby saving gas. This does assume however correct usage, in that the underlying `_value` is never
 * directly accessed.
 */
library Counters {
    using SafeMath for uint256;

    struct Counter {
        // This variable should never be directly accessed by users of the library: interactions must be restricted to
        // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
        // this feature: see https://github.com/ethereum/solidity/issues/4637
        uint256 _value; // default: 0
    }

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

    function increment(Counter storage counter) internal {
        // The {SafeMath} overflow check can be skipped here, see the comment at the top
        counter._value += 1;
    }

    function decrement(Counter storage counter) internal {
        counter._value = counter._value.sub(1);
    }
}

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts may inherit from this and call {_registerInterface} to declare
 * their support of an interface.
 */
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;

    function _initRegisterInterfaceForErc165() 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) external view 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 {
        require(interfaceId != 0xffffffff, "ERC165: invalid interface id");
        _supportedInterfaces[interfaceId] = true;
    }
}

/**
 * @title ERC721 Non-Fungible Token Standard basic implementation
 * @dev see https://eips.ethereum.org/EIPS/eip-721
 */
contract ERC721 is Context, ERC165, IERC721 {
    using SafeMath for uint256;
    using Address for address;
    using Counters for Counters.Counter;

    // Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
    // which can be also obtained as `IERC721Receiver(0).onERC721Received.selector`
    bytes4 private constant _ERC721_RECEIVED = 0x150b7a02;

    // Mapping from token ID to owner
    mapping(uint256 => address) private _tokenOwner;

    // Mapping from token ID to approved address
    mapping(uint256 => address) private _tokenApprovals;

    // Mapping from owner to number of owned token
    mapping(address => Counters.Counter) private _ownedTokensCount;

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

    /*
     *     bytes4(keccak256('balanceOf(address)')) == 0x70a08231
     *     bytes4(keccak256('ownerOf(uint256)')) == 0x6352211e
     *     bytes4(keccak256('approve(address,uint256)')) == 0x095ea7b3
     *     bytes4(keccak256('getApproved(uint256)')) == 0x081812fc
     *     bytes4(keccak256('setApprovalForAll(address,bool)')) == 0xa22cb465
     *     bytes4(keccak256('isApprovedForAll(address,address)')) == 0xe985e9c5
     *     bytes4(keccak256('transferFrom(address,address,uint256)')) == 0x23b872dd
     *     bytes4(keccak256('safeTransferFrom(address,address,uint256)')) == 0x42842e0e
     *     bytes4(keccak256('safeTransferFrom(address,address,uint256,bytes)')) == 0xb88d4fde
     *
     *     => 0x70a08231 ^ 0x6352211e ^ 0x095ea7b3 ^ 0x081812fc ^
     *        0xa22cb465 ^ 0xe985e9c ^ 0x23b872dd ^ 0x42842e0e ^ 0xb88d4fde == 0x80ac58cd
     */
    bytes4 private constant _INTERFACE_ID_ERC721 = 0x80ac58cd;

    function _initRegisterInterfaceForErc721() internal {
        // register the supported interfaces to conform to ERC721 via ERC165
        _registerInterface(_INTERFACE_ID_ERC721);
    }

    /**
     * @dev Gets the balance of the specified address.
     * @param owner address to query the balance of
     * @return uint256 representing the amount owned by the passed address
     */
    function balanceOf(address owner) public view returns (uint256) {
        require(owner != address(0), "ERC721: balance query for the zero address");

        return _ownedTokensCount[owner].current();
    }

    /**
     * @dev Gets the owner of the specified token ID.
     * @param tokenId uint256 ID of the token to query the owner of
     * @return address currently marked as the owner of the given token ID
     */
    function ownerOf(uint256 tokenId) public view returns (address) {
        address owner = _tokenOwner[tokenId];
        require(owner != address(0), "ERC721: owner query for nonexistent token");

        return owner;
    }

    /**
     * @dev Approves another address to transfer the given token ID
     * The zero address indicates there is no approved address.
     * There can only be one approved address per token at a given time.
     * Can only be called by the token owner or an approved operator.
     * @param to address to be approved for the given token ID
     * @param tokenId uint256 ID of the token to be approved
     */
    function approve(address to, uint256 tokenId) public {
        address owner = ownerOf(tokenId);
        require(to != owner, "ERC721: approval to current owner");

        require(_msgSender() == owner || isApprovedForAll(owner, _msgSender()),
            "ERC721: approve caller is not owner nor approved for all"
        );

        _tokenApprovals[tokenId] = to;
        emit Approval(owner, to, tokenId);
    }

    /**
     * @dev Gets the approved address for a token ID, or zero if no address set
     * Reverts if the token ID does not exist.
     * @param tokenId uint256 ID of the token to query the approval of
     * @return address currently approved for the given token ID
     */
    function getApproved(uint256 tokenId) public view returns (address) {
        require(_exists(tokenId), "ERC721: approved query for nonexistent token");

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev Sets or unsets the approval of a given operator
     * An operator is allowed to transfer all tokens of the sender on their behalf.
     * @param to operator address to set the approval
     * @param approved representing the status of the approval to be set
     */
    function setApprovalForAll(address to, bool approved) public {
        require(to != _msgSender(), "ERC721: approve to caller");

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

    /**
     * @dev Tells whether an operator is approved by a given owner.
     * @param owner owner address which you want to query the approval of
     * @param operator operator address which you want to query the approval of
     * @return bool whether the given operator is approved by the given owner
     */
    function isApprovedForAll(address owner, address operator) public view returns (bool) {
        return _operatorApprovals[owner][operator];
    }

    /**
     * @dev Transfers the ownership of a given token ID to another address.
     * Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     * Requires the msg.sender to be the owner, approved, or operator.
     * @param from current owner of the token
     * @param to address to receive the ownership of the given token ID
     * @param tokenId uint256 ID of the token to be transferred
     */
    function transferFrom(address from, address to, uint256 tokenId) public {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");

        _transferFrom(from, to, tokenId);
    }

    /**
     * @dev Safely transfers the ownership of a given token ID to another address
     * If the target address is a contract, it must implement {IERC721Receiver-onERC721Received},
     * which is called upon a safe transfer, and return the magic value
     * `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`; otherwise,
     * the transfer is reverted.
     * Requires the msg.sender to be the owner, approved, or operator
     * @param from current owner of the token
     * @param to address to receive the ownership of the given token ID
     * @param tokenId uint256 ID of the token to be transferred
     */
    function safeTransferFrom(address from, address to, uint256 tokenId) public {
        safeTransferFrom(from, to, tokenId, "");
    }

    /**
     * @dev Safely transfers the ownership of a given token ID to another address
     * If the target address is a contract, it must implement {IERC721Receiver-onERC721Received},
     * which is called upon a safe transfer, and return the magic value
     * `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`; otherwise,
     * the transfer is reverted.
     * Requires the _msgSender() to be the owner, approved, or operator
     * @param from current owner of the token
     * @param to address to receive the ownership of the given token ID
     * @param tokenId uint256 ID of the token to be transferred
     * @param _data bytes data to send along with a safe transfer check
     */
    function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) public {
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
        _safeTransferFrom(from, to, tokenId, _data);
    }

    /**
     * @dev Safely transfers the ownership of a given token ID to another address
     * If the target address is a contract, it must implement `onERC721Received`,
     * which is called upon a safe transfer, and return the magic value
     * `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`; otherwise,
     * the transfer is reverted.
     * Requires the msg.sender to be the owner, approved, or operator
     * @param from current owner of the token
     * @param to address to receive the ownership of the given token ID
     * @param tokenId uint256 ID of the token to be transferred
     * @param _data bytes data to send along with a safe transfer check
     */
    function _safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) internal {
        _transferFrom(from, to, tokenId);
        require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
    }

    /**
     * @dev Returns whether the specified token exists.
     * @param tokenId uint256 ID of the token to query the existence of
     * @return bool whether the token exists
     */
    function _exists(uint256 tokenId) internal view returns (bool) {
        address owner = _tokenOwner[tokenId];
        return owner != address(0);
    }

    /**
     * @dev Returns whether the given spender can transfer a given token ID.
     * @param spender address of the spender to query
     * @param tokenId uint256 ID of the token to be transferred
     * @return bool whether the msg.sender is approved for the given token ID,
     * is an operator of the owner, or is the owner of the token
     */
    function _isApprovedOrOwner(address spender, uint256 tokenId) internal view returns (bool) {
        require(_exists(tokenId), "ERC721: operator query for nonexistent token");
        address owner = ownerOf(tokenId);
        return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));
    }

    /**
     * @dev Internal function to safely mint a new token.
     * Reverts if the given token ID already exists.
     * If the target address is a contract, it must implement `onERC721Received`,
     * which is called upon a safe transfer, and return the magic value
     * `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`; otherwise,
     * the transfer is reverted.
     * @param to The address that will own the minted token
     * @param tokenId uint256 ID of the token to be minted
     */
    function _safeMint(address to, uint256 tokenId) internal {
        _safeMint(to, tokenId, "");
    }

    /**
     * @dev Internal function to safely mint a new token.
     * Reverts if the given token ID already exists.
     * If the target address is a contract, it must implement `onERC721Received`,
     * which is called upon a safe transfer, and return the magic value
     * `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`; otherwise,
     * the transfer is reverted.
     * @param to The address that will own the minted token
     * @param tokenId uint256 ID of the token to be minted
     * @param _data bytes data to send along with a safe transfer check
     */
    function _safeMint(address to, uint256 tokenId, bytes memory _data) internal {
        _mint(to, tokenId);
        require(_checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
    }

    /**
     * @dev Internal function to mint a new token.
     * Reverts if the given token ID already exists.
     * @param to The address that will own the minted token
     * @param tokenId uint256 ID of the token to be minted
     */
    function _mint(address to, uint256 tokenId) internal {
        require(to != address(0), "ERC721: mint to the zero address");
        require(!_exists(tokenId), "ERC721: token already minted");

        _tokenOwner[tokenId] = to;
        _ownedTokensCount[to].increment();

        emit Transfer(address(0), to, tokenId);
    }

    /**
     * @dev Internal function to burn a specific token.
     * Reverts if the token does not exist.
     * Deprecated, use {_burn} instead.
     * @param owner owner of the token to burn
     * @param tokenId uint256 ID of the token being burned
     */
    function _burn(address owner, uint256 tokenId) internal {
        require(ownerOf(tokenId) == owner, "ERC721: burn of token that is not own");

        _clearApproval(tokenId);

        _ownedTokensCount[owner].decrement();
        _tokenOwner[tokenId] = address(0);

        emit Transfer(owner, address(0), tokenId);
    }

    /**
     * @dev Internal function to burn a specific token.
     * Reverts if the token does not exist.
     * @param tokenId uint256 ID of the token being burned
     */
    function _burn(uint256 tokenId) internal {
        _burn(ownerOf(tokenId), tokenId);
    }

    /**
     * @dev Internal function to transfer ownership of a given token ID to another address.
     * As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
     * @param from current owner of the token
     * @param to address to receive the ownership of the given token ID
     * @param tokenId uint256 ID of the token to be transferred
     */
    function _transferFrom(address from, address to, uint256 tokenId) internal {
        require(ownerOf(tokenId) == from, "ERC721: transfer of token that is not own");
        require(to != address(0), "ERC721: transfer to the zero address");

        _clearApproval(tokenId);

        _ownedTokensCount[from].decrement();
        _ownedTokensCount[to].increment();

        _tokenOwner[tokenId] = to;

        emit Transfer(from, to, tokenId);
    }

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
     * The call is not executed if the target address is not a contract.
     *
     * This is an internal detail of the `ERC721` contract and its use is deprecated.
     * @param from address representing the previous owner of the given token ID
     * @param to target address that will receive the tokens
     * @param tokenId uint256 ID of the token to be transferred
     * @param _data bytes optional data to send along with the call
     * @return bool whether the call correctly returned the expected magic value
     */
    function _checkOnERC721Received(address from, address to, uint256 tokenId, bytes memory _data)
    internal returns (bool)
    {
        if (!to.isContract()) {
            return true;
        }
        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = to.call(abi.encodeWithSelector(
                IERC721Receiver(to).onERC721Received.selector,
                _msgSender(),
                from,
                tokenId,
                _data
            ));
        if (!success) {
            if (returndata.length > 0) {
                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert("ERC721: transfer to non ERC721Receiver implementer");
            }
        } else {
            bytes4 retval = abi.decode(returndata, (bytes4));
            return (retval == _ERC721_RECEIVED);
        }
    }

    /**
     * @dev Private function to clear current approval of a given token ID.
     * @param tokenId uint256 ID of the token to be transferred
     */
    function _clearApproval(uint256 tokenId) private {
        if (_tokenApprovals[tokenId] != address(0)) {
            _tokenApprovals[tokenId] = address(0);
        }
    }
}

/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
contract IERC721Enumerable is IERC721 {
    function totalSupply() public view returns (uint256);

    function tokenOfOwnerByIndex(address owner, uint256 index) public view returns (uint256 tokenId);

    function tokenByIndex(uint256 index) public view returns (uint256);
}

/**
 * @title ERC-721 Non-Fungible Token with optional enumeration extension logic
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
contract ERC721Enumerable is Context, ERC165, ERC721, IERC721Enumerable {
    // Mapping from owner to list of owned token IDs
    mapping(address => uint256[]) private _ownedTokens;

    // Mapping from token ID to index of the owner tokens list
    mapping(uint256 => uint256) private _ownedTokensIndex;

    // Array with all token ids, used for enumeration
    uint256[] private _allTokens;

    // Mapping from token id to position in the allTokens array
    mapping(uint256 => uint256) private _allTokensIndex;

    /*
     *     bytes4(keccak256('totalSupply()')) == 0x18160ddd
     *     bytes4(keccak256('tokenOfOwnerByIndex(address,uint256)')) == 0x2f745c59
     *     bytes4(keccak256('tokenByIndex(uint256)')) == 0x4f6ccce7
     *
     *     => 0x18160ddd ^ 0x2f745c59 ^ 0x4f6ccce7 == 0x780e9d63
     */
    bytes4 private constant _INTERFACE_ID_ERC721_ENUMERABLE = 0x780e9d63;

    function _initRegisterInterfaceForErc721Enumerable() internal {
        // register the supported interface to conform to ERC721Enumerable via ERC165
        _registerInterface(_INTERFACE_ID_ERC721_ENUMERABLE);
    }

    /**
     * @dev Gets the token ID at a given index of the tokens list of the requested owner.
     * @param owner address owning the tokens list to be accessed
     * @param index uint256 representing the index to be accessed of the requested tokens list
     * @return uint256 token ID at the given index of the tokens list owned by the requested address
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) public view returns (uint256) {
        require(index < balanceOf(owner), "ERC721Enumerable: owner index out of bounds");
        return _ownedTokens[owner][index];
    }

    /**
     * @dev Gets the total amount of tokens stored by the contract.
     * @return uint256 representing the total amount of tokens
     */
    function totalSupply() public view returns (uint256) {
        return _allTokens.length;
    }

    /**
     * @dev Gets the token ID at a given index of all the tokens in this contract
     * Reverts if the index is greater or equal to the total number of tokens.
     * @param index uint256 representing the index to be accessed of the tokens list
     * @return uint256 token ID at the given index of the tokens list
     */
    function tokenByIndex(uint256 index) public view returns (uint256) {
        require(index < totalSupply(), "ERC721Enumerable: global index out of bounds");
        return _allTokens[index];
    }

    /**
     * @dev Internal function to transfer ownership of a given token ID to another address.
     * As opposed to transferFrom, this imposes no restrictions on msg.sender.
     * @param from current owner of the token
     * @param to address to receive the ownership of the given token ID
     * @param tokenId uint256 ID of the token to be transferred
     */
    function _transferFrom(address from, address to, uint256 tokenId) internal {
        super._transferFrom(from, to, tokenId);

        _removeTokenFromOwnerEnumeration(from, tokenId);

        _addTokenToOwnerEnumeration(to, tokenId);
    }

    /**
     * @dev Internal function to mint a new token.
     * Reverts if the given token ID already exists.
     * @param to address the beneficiary that will own the minted token
     * @param tokenId uint256 ID of the token to be minted
     */
    function _mint(address to, uint256 tokenId) internal {
        super._mint(to, tokenId);

        _addTokenToOwnerEnumeration(to, tokenId);

        _addTokenToAllTokensEnumeration(tokenId);
    }

    /**
     * @dev Internal function to burn a specific token.
     * Reverts if the token does not exist.
     * Deprecated, use {ERC721-_burn} instead.
     * @param owner owner of the token to burn
     * @param tokenId uint256 ID of the token being burned
     */
    function _burn(address owner, uint256 tokenId) internal {
        super._burn(owner, tokenId);

        _removeTokenFromOwnerEnumeration(owner, tokenId);
        // Since tokenId will be deleted, we can clear its slot in _ownedTokensIndex to trigger a gas refund
        _ownedTokensIndex[tokenId] = 0;

        _removeTokenFromAllTokensEnumeration(tokenId);
    }

    /**
     * @dev Gets the list of token IDs of the requested owner.
     * @param owner address owning the tokens
     * @return uint256[] List of token IDs owned by the requested address
     */
    function _tokensOfOwner(address owner) internal view returns (uint256[] storage) {
        return _ownedTokens[owner];
    }

    /**
     * @dev Private function to add a token to this extension's ownership-tracking data structures.
     * @param to address representing the new owner of the given token ID
     * @param tokenId uint256 ID of the token to be added to the tokens list of the given address
     */
    function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
        _ownedTokensIndex[tokenId] = _ownedTokens[to].length;
        _ownedTokens[to].push(tokenId);
    }

    /**
     * @dev Private function to add a token to this extension's token tracking data structures.
     * @param tokenId uint256 ID of the token to be added to the tokens list
     */
    function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
        _allTokensIndex[tokenId] = _allTokens.length;
        _allTokens.push(tokenId);
    }

    /**
     * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that
     * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for
     * gas optimizations e.g. when performing a transfer operation (avoiding double writes).
     * This has O(1) time complexity, but alters the order of the _ownedTokens array.
     * @param from address representing the previous owner of the given token ID
     * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address
     */
    function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {
        // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = _ownedTokens[from].length.sub(1);
        uint256 tokenIndex = _ownedTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary
        if (tokenIndex != lastTokenIndex) {
            uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];

            _ownedTokens[from][tokenIndex] = lastTokenId;
            // Move the last token to the slot of the to-delete token
            _ownedTokensIndex[lastTokenId] = tokenIndex;
            // Update the moved token's index
        }

        // This also deletes the contents at the last position of the array
        _ownedTokens[from].length--;

        // Note that _ownedTokensIndex[tokenId] hasn't been cleared: it still points to the old slot (now occupied by
        // lastTokenId, or just over the end of the array if the token was the last one).
    }

    /**
     * @dev Private function to remove a token from this extension's token tracking data structures.
     * This has O(1) time complexity, but alters the order of the _allTokens array.
     * @param tokenId uint256 ID of the token to be removed from the tokens list
     */
    function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {
        // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = _allTokens.length.sub(1);
        uint256 tokenIndex = _allTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so
        // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding
        // an 'if' statement (like in _removeTokenFromOwnerEnumeration)
        uint256 lastTokenId = _allTokens[lastTokenIndex];

        _allTokens[tokenIndex] = lastTokenId;
        // Move the last token to the slot of the to-delete token
        _allTokensIndex[lastTokenId] = tokenIndex;
        // Update the moved token's index

        // This also deletes the contents at the last position of the array
        _allTokens.length--;
        _allTokensIndex[tokenId] = 0;
    }
}

library UintLibrary {
    function toString(uint256 _i) internal pure returns (string memory) {
        if (_i == 0) {
            return "0";
        }
        uint j = _i;
        uint len;
        while (j != 0) {
            len++;
            j /= 10;
        }
        bytes memory bstr = new bytes(len);
        uint k = len - 1;
        while (_i != 0) {
            bstr[k--] = byte(uint8(48 + _i % 10));
            _i /= 10;
        }
        return string(bstr);
    }
}

library StringLibrary {
    using UintLibrary for uint256;

    function append(string memory _a, string memory _b) internal pure returns (string memory) {
        bytes memory _ba = bytes(_a);
        bytes memory _bb = bytes(_b);
        bytes memory bab = new bytes(_ba.length + _bb.length);
        uint k = 0;
        for (uint i = 0; i < _ba.length; i++) bab[k++] = _ba[i];
        for (uint i = 0; i < _bb.length; i++) bab[k++] = _bb[i];
        return string(bab);
    }

    function append(string memory _a, string memory _b, string memory _c) internal pure returns (string memory) {
        bytes memory _ba = bytes(_a);
        bytes memory _bb = bytes(_b);
        bytes memory _bc = bytes(_c);
        bytes memory bbb = new bytes(_ba.length + _bb.length + _bc.length);
        uint k = 0;
        for (uint i = 0; i < _ba.length; i++) bbb[k++] = _ba[i];
        for (uint i = 0; i < _bb.length; i++) bbb[k++] = _bb[i];
        for (uint i = 0; i < _bc.length; i++) bbb[k++] = _bc[i];
        return string(bbb);
    }

    function recover(string memory message, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {
        bytes memory msgBytes = bytes(message);
        bytes memory fullMessage = concat(
            bytes("\x19Ethereum Signed Message:\n"),
            bytes(msgBytes.length.toString()),
            msgBytes,
            new bytes(0), new bytes(0), new bytes(0), new bytes(0)
        );
        return ecrecover(keccak256(fullMessage), v, r, s);
    }

    function concat(bytes memory _ba, bytes memory _bb, bytes memory _bc, bytes memory _bd, bytes memory _be, bytes memory _bf, bytes memory _bg) internal pure returns (bytes memory) {
        bytes memory resultBytes = new bytes(_ba.length + _bb.length + _bc.length + _bd.length + _be.length + _bf.length + _bg.length);
        uint k = 0;
        for (uint i = 0; i < _ba.length; i++) resultBytes[k++] = _ba[i];
        for (uint i = 0; i < _bb.length; i++) resultBytes[k++] = _bb[i];
        for (uint i = 0; i < _bc.length; i++) resultBytes[k++] = _bc[i];
        for (uint i = 0; i < _bd.length; i++) resultBytes[k++] = _bd[i];
        for (uint i = 0; i < _be.length; i++) resultBytes[k++] = _be[i];
        for (uint i = 0; i < _bf.length; i++) resultBytes[k++] = _bf[i];
        for (uint i = 0; i < _bg.length; i++) resultBytes[k++] = _bg[i];
        return resultBytes;
    }
}

contract HasContractURI is ERC165 {

    string public contractURI;

    /*
     * bytes4(keccak256('contractURI()')) == 0xe8a3d485
     */
    bytes4 private constant _INTERFACE_ID_CONTRACT_URI = 0xe8a3d485;

    function _initRegisterInterfaceForContractURI() internal {
        _registerInterface(_INTERFACE_ID_CONTRACT_URI);
    }

    /**
     * @dev Internal function to set the contract URI
     * @param _contractURI string URI prefix to assign
     */
    function _setContractURI(string memory _contractURI) internal {
        contractURI = _contractURI;
    }
}

contract HasTokenURI {
    using StringLibrary for string;

    // Token URI prefix
    string public tokenURIPrefix;

    // Optional mapping for token URIs
    mapping(uint256 => string) private _tokenURIs;

    /**
     * @dev Returns an URI for a given token ID.
     * Throws if the token ID does not exist. May return an empty string.
     * @param tokenId uint256 ID of the token to query
     */
    function _tokenURI(uint256 tokenId) internal view returns (string memory) {
        return tokenURIPrefix.append(_tokenURIs[tokenId]);
    }

    /**
     * @dev Internal function to set the token URI for a given token.
     * Reverts if the token ID does not exist.
     * @param tokenId uint256 ID of the token to set its URI
     * @param uri string URI to assign
     */
    function _setTokenURI(uint256 tokenId, string memory uri) internal {
        _tokenURIs[tokenId] = uri;
    }

    /**
     * @dev Internal function to set the token URI prefix.
     * @param _tokenURIPrefix string URI prefix to assign
     */
    function _setTokenURIPrefix(string memory _tokenURIPrefix) internal {
        tokenURIPrefix = _tokenURIPrefix;
    }

    function _clearTokenURI(uint256 tokenId) internal {
        if (bytes(_tokenURIs[tokenId]).length != 0) {
            delete _tokenURIs[tokenId];
        }
    }
}

contract HasSecondarySaleFees is ERC165 {

    struct Copyright {
        address author;
        uint256 feeRateNumerator;
    }

    uint public constant feeRateDenominator = 10000;

    event SetCopyright(uint256 _tokenId, address _creator, address _author, uint256 _feeRateNumerator, uint256 _feeRateDenominator);

    /*
     * bytes4(keccak256('getCopyright(uint256)')) == 0x6f4eaff1
     */
    bytes4 private constant _INTERFACE_ID_COPYRIGHT = 0x6f4eaff1;

    function _initRegisterInterfaceForCopyright() internal {
        _registerInterface(_INTERFACE_ID_COPYRIGHT);
    }

    function getCopyright(uint256 _tokenId) public view returns (Copyright memory);
}

/**
 * @title Full ERC721 Token with support for tokenURIPrefix
 * This implementation includes all the required and some optional functionality of the ERC721 standard
 * Moreover, it includes approve all functionality using operator terminology
 * @dev see https://eips.ethereum.org/EIPS/eip-721
 */
contract ERC721BaseNew is HasSecondarySaleFees, ERC721, HasContractURI, HasTokenURI, ERC721Enumerable,IERC2981 {
    // Token name
    string public name;

    // Token symbol
    string public symbol;

    // id => copyright
    mapping(uint256 => Copyright) public copyrights;

    /*
     *     bytes4(keccak256('name()')) == 0x06fdde03
     *     bytes4(keccak256('symbol()')) == 0x95d89b41
     *     bytes4(keccak256('tokenURI(uint256)')) == 0xc87b56dd
     *
     *     => 0x06fdde03 ^ 0x95d89b41 ^ 0xc87b56dd == 0x5b5e139f
     */
    bytes4 private constant _INTERFACE_ID_ERC721_METADATA = 0x5b5e139f;
    bytes4 private constant _INTERFACE_ID_ERC2981 = 0x2a55205a;

    function _initRegisterInterfaceForErc2981() internal {
        // register the supported interfaces to conform to ERC721 via ERC165
        _registerInterface(_INTERFACE_ID_ERC2981);
    }


    function _initRegisterInterfaceForErc721Metadata() internal {
        // register the supported interfaces to conform to ERC721 via ERC165
        _registerInterface(_INTERFACE_ID_ERC721_METADATA);
    }

    function royaltyInfo(uint256 tokenId, uint256 salePrice)
    external
    view
    returns (address receiver, uint256 royaltyAmount){

        uint256  royaltyAmount = (salePrice * copyrights[tokenId].feeRateNumerator) / 10000;

        return ( copyrights[tokenId].author,royaltyAmount);
    }



    function _mint(uint256 _tokenId, address _receiver, Copyright[] memory _copyrightInfos) internal {
        // set copyright info
        uint256 copyrightLen = _copyrightInfos.length;
        //  相当于能设置一个版税版本
        require(copyrightLen <= 1,
            "ERC721Base: the length of copyrights must be <= 1");
        if (copyrightLen == 1) {
            require(_copyrightInfos[0].author != address(0),
                "ERC721Base: the author in copyright can't be zero"
            );
            require(_copyrightInfos[0].feeRateNumerator <= feeRateDenominator,
                "ERC721Base: the feeRate in copyright must be <= 1"
            );

            copyrights[_tokenId] = _copyrightInfos[0];
            emit SetCopyright(_tokenId, msg.sender, _copyrightInfos[0].author, _copyrightInfos[0].feeRateNumerator, feeRateDenominator);
        }

        _mint(_receiver, _tokenId);
    }

    function getCopyright(uint256 _tokenId) public view returns (Copyright memory){
        return copyrights[_tokenId];
    }

    /**
     * @dev Returns an URI for a given token ID.
     * Throws if the token ID does not exist. May return an empty string.
     * @param tokenId uint256 ID of the token to query
     */
    function tokenURI(uint256 tokenId) external view returns (string memory) {
        require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");
        return super._tokenURI(tokenId);
    }

    /**
     * @dev Internal function to set the token URI for a given token.
     * Reverts if the token ID does not exist.
     * @param tokenId uint256 ID of the token to set its URI
     * @param uri string URI to assign
     */
    function _setTokenURI(uint256 tokenId, string memory uri) internal {
        require(_exists(tokenId), "ERC721Metadata: URI set of nonexistent token");
        super._setTokenURI(tokenId, uri);
    }

    /**
     * @dev Internal function to burn a specific token.
     * Reverts if the token does not exist.
     * Deprecated, use _burn(uint256) instead.
     * @param owner owner of the token to burn
     * @param tokenId uint256 ID of the token being burned by the msg.sender
     */
    function _burn(address owner, uint256 tokenId) internal {
        super._burn(owner, tokenId);
        _clearTokenURI(tokenId);
    }
}

/**
 * @title MintableToken
 * @dev anyone can mint token.
 */
contract MintableERC721New is Ownable, ERC721BaseNew {
    uint256 private tokenIdCounter;
    bool private onlyInitOnce;

    event SetTokenURI(uint256 _tokenId, string _tokenURI);

    function init(
        string memory _name,
        string memory _symbol,
        address _newOwner,
        string memory _contractURI,
        string memory _tokenURIPrefix
    )
    public
    {
        require(!onlyInitOnce, "already initialized");

        name = _name;
        symbol = _symbol;
        contractURI = _contractURI;
        tokenURIPrefix = _tokenURIPrefix;
        _initRegisterInterfaceForErc165();
        _initRegisterInterfaceForErc721();
        _initRegisterInterfaceForErc721Metadata();
        _initRegisterInterfaceForErc721Enumerable();
        _initRegisterInterfaceForContractURI();
        _initRegisterInterfaceForCopyright();
        _initRegisterInterfaceForErc2981();
        _registerInterface(bytes4(keccak256('MINT_WITH_ADDRESS')));

        _transferOwnership(_newOwner);
        onlyInitOnce = true;
    }

    function mint(address _receiver, string memory _tokenURI, Copyright[] memory _copyrightInfos) public {
        // 1. get tokenID with auto-increment
        uint256 currentTokenId = tokenIdCounter;
        tokenIdCounter++;
        // 2. mint
        _mint(currentTokenId, _receiver, _copyrightInfos);
        // 3. set tokenURI
        _setTokenURI(currentTokenId, _tokenURI);
        emit SetTokenURI(currentTokenId, _tokenURI);
    }

    function setTokenURIPrefix(string memory tokenURIPrefix) public onlyOwner {
        _setTokenURIPrefix(tokenURIPrefix);
    }

    function setContractURI(string memory contractURI) public onlyOwner {
        _setContractURI(contractURI);
    }

    address public serverAddress;

    function setServerAddress(address targetAddress) public onlyOwner{
        serverAddress = targetAddress;
    }

    /*
      var result = instanceWeb3.eth.accounts.sign(msg,privkey);
    {"message":"123","messageHash":"0x3b453794f074c43f21713fe98eaccb2728a71bd4584e5d5958e7e73546e02603",
    "v":"0x1c","r":"0x983d3f213b86e7df3204610a4b22e4c941c2e9c2c31d0e8c45bf76dd2d71b589",
    "s":"0x16156a4fc8d72f03e03a3e90c94e95c4e3cc3a4aeb5f4e30333add95abc026f4","signature":"0x983d3f213b86e7df3204610a4b22e4c941c2e9c2c31d0e8c45bf76dd2d71b58916156a4fc8d72f03e03a3e90c94e95c4e3cc3a4aeb5f4e30333add95abc026f41c"}

        对消息进行签名,然后验证messageHash
    */
    // function mintBySign(address _receiver, string memory _tokenURI, Copyright[] memory _copyrightInfos,bytes32 hash,uint8 v,
    //     bytes32 r,
    //     bytes32 s) public {
    //     require(ecrecover(hash, v, r, s) == serverAddress,"verify server sign failed") ;
    //     // 1. get tokenID with auto-increment
    //     uint256 currentTokenId = tokenIdCounter;
    //     tokenIdCounter++;
    //     // 2. mint
    //     _mint(currentTokenId, _receiver, _copyrightInfos);
    //     // 3. set tokenURI
    //     _setTokenURI(currentTokenId, _tokenURI);
    //     emit SetTokenURI(currentTokenId, _tokenURI);
    // }

    // function mintMuti(address _receiver,uint amount,Copyright[] memory _copyrightInfos) public onlyOwner{

    //     for (uint i = 0; i < amount; i++){
    //         // 1. get tokenID with auto-increment
    //         uint256 currentTokenId = tokenIdCounter;
    //         _mint(currentTokenId, _receiver, _copyrightInfos);

    //         tokenIdCounter++;
    //     }
    // }


    // function mintMutiAndTokenUri(address _receiver,uint amount,string[] memory tokenUriList,Copyright[] memory _copyrightInfos) public onlyOwner{

    //     for (uint i = 0; i < amount; i++){
    //         // 1. get tokenID with auto-increment
    //         uint256 currentTokenId = tokenIdCounter;
    //         _mint(currentTokenId, _receiver, _copyrightInfos);
    //         _setTokenURI(currentTokenId, tokenUriList[i]);
    //         tokenIdCounter++;
    //     }
    // }
}

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

Contract Security Audit

Contract ABI

[{"constant":true,"inputs":[{"name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"to","type":"address"},{"name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"from","type":"address"},{"name":"to","type":"address"},{"name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"tokenId","type":"uint256"},{"name":"salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"name":"receiver","type":"address"},{"name":"royaltyAmount","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"},{"name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"from","type":"address"},{"name":"to","type":"address"},{"name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"targetAddress","type":"address"}],"name":"setServerAddress","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"getCopyright","outputs":[{"components":[{"name":"author","type":"address"},{"name":"feeRateNumerator","type":"uint256"}],"name":"","type":"tuple"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_receiver","type":"address"},{"name":"_tokenURI","type":"string"},{"components":[{"name":"author","type":"address"},{"name":"feeRateNumerator","type":"uint256"}],"name":"_copyrightInfos","type":"tuple[]"}],"name":"mint","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"copyrights","outputs":[{"name":"author","type":"address"},{"name":"feeRateNumerator","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isOwner","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"contractURI","type":"string"}],"name":"setContractURI","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"tokenURIPrefix","type":"string"}],"name":"setTokenURIPrefix","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"to","type":"address"},{"name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_name","type":"string"},{"name":"_symbol","type":"string"},{"name":"_newOwner","type":"address"},{"name":"_contractURI","type":"string"},{"name":"_tokenURIPrefix","type":"string"}],"name":"init","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"from","type":"address"},{"name":"to","type":"address"},{"name":"tokenId","type":"uint256"},{"name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"tokenURIPrefix","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"serverAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"contractURI","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"},{"name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"feeRateDenominator","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_tokenId","type":"uint256"},{"indexed":false,"name":"_tokenURI","type":"string"}],"name":"SetTokenURI","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":true,"name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":true,"name":"approved","type":"address"},{"indexed":true,"name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":true,"name":"operator","type":"address"},{"indexed":false,"name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_tokenId","type":"uint256"},{"indexed":false,"name":"_creator","type":"address"},{"indexed":false,"name":"_author","type":"address"},{"indexed":false,"name":"_feeRateNumerator","type":"uint256"},{"indexed":false,"name":"_feeRateDenominator","type":"uint256"}],"name":"SetCopyright","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"}]

60806040526000610017640100000000610066810204565b60008054600160a060020a031916600160a060020a0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35061006a565b3390565b612cc6806100796000396000f3fe608060405234801561001057600080fd5b506004361061020d576000357c0100000000000000000000000000000000000000000000000000000000900480637ceffa581161012c578063b88d4fde116100bf578063e8a3d4851161008e578063e8a3d48514610428578063e985e9c514610430578063f0b10c3614610443578063f2fde38b1461044b5761020d565b8063b88d4fde146103f2578063c0ac998314610405578063c87b56dd1461040d578063db420fe3146104205761020d565b806395d89b41116100fb57806395d89b41146103b157806399e0dd7c146103b9578063a22cb465146103cc578063b7ec8239146103df5761020d565b80637ceffa581461037b5780638da5cb5b1461038e5780638f32d59b14610396578063938e3d7b1461039e5761020d565b806342842e0e116101a45780636f4eaff1116101735780636f4eaff11461032d57806370a082311461034d578063715018a6146103605780637a5d8d17146103685761020d565b806342842e0e146102e157806347b64eb0146102f45780634f6ccce7146103075780636352211e1461031a5761020d565b806318160ddd116101e057806318160ddd1461028557806323b872dd1461029a5780632a55205a146102ad5780632f745c59146102ce5761020d565b806301ffc9a71461021257806306fdde031461023b578063081812fc14610250578063095ea7b314610270575b600080fd5b610225610220366004611fe5565b61045e565b604051610232919061297f565b60405180910390f35b61024361047d565b604051610232919061298d565b61026361025e36600461212a565b61050b565b6040516102329190612912565b61028361027e366004611fb5565b61055c565b005b61028d610643565b6040516102329190612b2c565b6102836102a8366004611e4c565b61064a565b6102c06102bb366004612148565b61068c565b604051610232929190612964565b61028d6102dc366004611fb5565b6106b7565b6102836102ef366004611e4c565b61071b565b610283610302366004611df4565b610737565b61028d61031536600461212a565b610795565b61026361032836600461212a565b6107e0565b61034061033b36600461212a565b61081a565b6040516102329190612b1e565b61028d61035b366004611df4565b610855565b6102836108a3565b610283610376366004611f42565b610916565b6102c061038936600461212a565b610975565b61026361099a565b6102256109a9565b6102836103ac366004612021565b6109cd565b610243610a02565b6102836103c7366004612021565b610a5d565b6102836103da366004611f12565b610a8f565b6102836103ed366004612056565b610b5a565b610283610400366004611e99565b610c60565b610243610ca4565b61024361041b36600461212a565b610cff565b610263610d34565b610243610d48565b61022561043e366004611e12565b610da3565b61028d610dd1565b610283610459366004611df4565b610dd7565b600160e060020a03191660009081526001602052604090205460ff1690565b600d805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156105035780601f106104d857610100808354040283529160200191610503565b820191906000526020600020905b8154815290600101906020018083116104e657829003601f168201915b505050505081565b600061051682610e09565b15156105405760405160e560020a62461bcd02815260040161053790612a7e565b60405180910390fd5b50600090815260036020526040902054600160a060020a031690565b6000610567826107e0565b9050600160a060020a0383811690821614156105985760405160e560020a62461bcd02815260040161053790612ade565b80600160a060020a03166105aa610e26565b600160a060020a031614806105c657506105c68161043e610e26565b15156105e75760405160e560020a62461bcd02815260040161053790612a2e565b6000828152600360205260408082208054600160a060020a031916600160a060020a0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600b545b90565b61065b610655610e26565b82610e2a565b151561067c5760405160e560020a62461bcd02815260040161053790612aee565b610687838383610eb4565b505050565b6000918252600f602052604090912060018101549054600160a060020a031692612710919092020490565b60006106c283610855565b82106106e35760405160e560020a62461bcd0281526004016105379061299e565b600160a060020a038316600090815260096020526040902080548390811061070757fe5b906000526020600020015490505b92915050565b6106878383836020604051908101604052806000815250610c60565b61073f6109a9565b15156107605760405160e560020a62461bcd02815260040161053790612a9e565b60118054600160a060020a039092166101000274ffffffffffffffffffffffffffffffffffffffff0019909216919091179055565b600061079f610643565b82106107c05760405160e560020a62461bcd02815260040161053790612afe565b600b8054839081106107ce57fe5b90600052602060002001549050919050565b600081815260026020526040812054600160a060020a03168015156107155760405160e560020a62461bcd02815260040161053790612a5e565b610822611bd2565b506000908152600f602090815260409182902082518084019093528054600160a060020a03168352600101549082015290565b6000600160a060020a03821615156108825760405160e560020a62461bcd02815260040161053790612a4e565b600160a060020a038216600090815260046020526040902061071590610ed3565b6108ab6109a9565b15156108cc5760405160e560020a62461bcd02815260040161053790612a9e565b60008054604051600160a060020a03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a360008054600160a060020a0319169055565b601080546001810190915561092c818584610ed7565b610936818461105c565b7fd2d827dddfc9c9a02afc5fc68d3251684b36e213a7999ebd90a861f25df4077e8184604051610967929190612b7c565b60405180910390a150505050565b600f6020526000908152604090208054600190910154600160a060020a039091169082565b600054600160a060020a031690565b60008054600160a060020a03166109be610e26565b600160a060020a031614905090565b6109d56109a9565b15156109f65760405160e560020a62461bcd02815260040161053790612a9e565b6109ff81611094565b50565b600e805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156105035780601f106104d857610100808354040283529160200191610503565b610a656109a9565b1515610a865760405160e560020a62461bcd02815260040161053790612a9e565b6109ff816110a7565b610a97610e26565b600160a060020a0383811691161415610ac55760405160e560020a62461bcd02815260040161053790612a0e565b8060056000610ad2610e26565b600160a060020a03908116825260208083019390935260409182016000908120918716808252919093529120805460ff191692151592909217909155610b16610e26565b600160a060020a03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051610b4e919061297f565b60405180910390a35050565b60115460ff1615610b805760405160e560020a62461bcd02815260040161053790612a3e565b8451610b9390600d906020880190611be9565b508351610ba790600e906020870190611be9565b508151610bbb906006906020850190611be9565b508051610bcf906007906020840190611be9565b50610bd86110ba565b610be06110e5565b610be861110e565b610bf0611137565b610bf8611160565b610c00611189565b610c086111b2565b604080517f4d494e545f574954485f4144445245535300000000000000000000000000000081529051908190036011019020610c43906111d7565b610c4c8361122c565b50506011805460ff19166001179055505050565b610c71610c6b610e26565b83610e2a565b1515610c925760405160e560020a62461bcd02815260040161053790612aee565b610c9e848484846112b2565b50505050565b6007805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156105035780601f106104d857610100808354040283529160200191610503565b6060610d0a82610e09565b1515610d2b5760405160e560020a62461bcd02815260040161053790612abe565b610715826112ea565b6011546101009004600160a060020a031681565b6006805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156105035780601f106104d857610100808354040283529160200191610503565b600160a060020a03918216600090815260056020908152604080832093909416825291909152205460ff1690565b61271081565b610ddf6109a9565b1515610e005760405160e560020a62461bcd02815260040161053790612a9e565b6109ff8161122c565b600090815260026020526040902054600160a060020a0316151590565b3390565b6000610e3582610e09565b1515610e565760405160e560020a62461bcd02815260040161053790612a1e565b6000610e61836107e0565b905080600160a060020a031684600160a060020a03161480610e9c575083600160a060020a0316610e918461050b565b600160a060020a0316145b80610eac5750610eac8185610da3565b949350505050565b610ebf838383611425565b610ec98382611533565b610687828261162a565b5490565b80516001811115610efd5760405160e560020a62461bcd02815260040161053790612b0e565b8060011415611052578151600090839082908110610f1757fe5b6020908102909101015151600160a060020a03161415610f4c5760405160e560020a62461bcd02815260040161053790612ace565b612710826000815181101515610f5e57fe5b602090810290910181015101511115610f8c5760405160e560020a62461bcd028152600401610537906129ee565b816000815181101515610f9b57fe5b6020908102919091018101516000868152600f83526040812082518154600160a060020a031916600160a060020a03909116178155919092015160019091015582517f0744eac43f2c274aeab710e028e1557486f24427dd812cb06edb74fe166e4dfc91869133918691811061100d57fe5b602090810290910101515185518690600090811061102757fe5b9060200190602002015160200151612710604051611049959493929190612b3a565b60405180910390a15b610c9e8385611668565b61106582610e09565b15156110865760405160e560020a62461bcd02815260040161053790612a8e565b6110908282611685565b5050565b8051611090906006906020840190611be9565b8051611090906007906020840190611be9565b6110e37f01ffc9a7000000000000000000000000000000000000000000000000000000006111d7565b565b6110e37f80ac58cd000000000000000000000000000000000000000000000000000000006111d7565b6110e37f5b5e139f000000000000000000000000000000000000000000000000000000006111d7565b6110e37f780e9d63000000000000000000000000000000000000000000000000000000006111d7565b6110e37fe8a3d485000000000000000000000000000000000000000000000000000000006111d7565b6110e37f6f4eaff1000000000000000000000000000000000000000000000000000000006111d7565b6110e37f2a55205a000000000000000000000000000000000000000000000000000000005b600160e060020a031980821614156112045760405160e560020a62461bcd028152600401610537906129ce565b600160e060020a0319166000908152600160208190526040909120805460ff19169091179055565b600160a060020a03811615156112575760405160e560020a62461bcd028152600401610537906129be565b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a360008054600160a060020a031916600160a060020a0392909216919091179055565b6112bd848484610eb4565b6112c9848484846116a4565b1515610c9e5760405160e560020a62461bcd028152600401610537906129ae565b6000818152600860209081526040918290208054835160026001831615610100026000190190921691909104601f8101849004840282018401909452838152606093610715939192918301828280156113845780601f1061135957610100808354040283529160200191611384565b820191906000526020600020905b81548152906001019060200180831161136757829003601f168201915b505060078054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152955091935091508301828280156114125780601f106113e757610100808354040283529160200191611412565b820191906000526020600020905b8154815290600101906020018083116113f557829003601f168201915b505050505061187490919063ffffffff16565b82600160a060020a0316611438826107e0565b600160a060020a0316146114615760405160e560020a62461bcd02815260040161053790612aae565b600160a060020a038216151561148c5760405160e560020a62461bcd028152600401610537906129fe565b611495816119b3565b600160a060020a03831660009081526004602052604090206114b6906119ee565b600160a060020a03821660009081526004602052604090206114d790611a05565b6000818152600260205260408082208054600160a060020a031916600160a060020a0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600160a060020a03821660009081526009602052604081205461155d90600163ffffffff611a0e16565b6000838152600a60205260409020549091508082146115fa57600160a060020a038416600090815260096020526040812080548490811061159a57fe5b90600052602060002001549050806009600087600160a060020a0316600160a060020a03168152602001908152602001600020838154811015156115da57fe5b6000918252602080832090910192909255918252600a9052604090208190555b600160a060020a0384166000908152600960205260409020805490611623906000198301611c67565b5050505050565b600160a060020a0390911660009081526009602081815260408084208054868652600a84529185208290559282526001810183559183529091200155565b6116728282611a57565b61167c828261162a565b61109081611b26565b6000828152600860209081526040909120825161068792840190611be9565b60006116b884600160a060020a0316611b6a565b15156116c657506001610eac565b60006060600160a060020a0386167f150b7a02000000000000000000000000000000000000000000000000000000006116fd610e26565b8988886040516024016117139493929190612920565b60408051601f198184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16600160e060020a0319909416939093178352518151919290918291908083835b602083106117865780518252601f199092019160209182019101611767565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146117e8576040519150601f19603f3d011682016040523d82523d6000602084013e6117ed565b606091505b50915091508115156118275760008151111561180c5780518082602001fd5b60405160e560020a62461bcd028152600401610537906129ae565b60008180602001905161183d9190810190612003565b600160e060020a0319167f150b7a0200000000000000000000000000000000000000000000000000000000149350610eac92505050565b6060808390506060839050606081518351016040519080825280601f01601f1916602001820160405280156118b0576020820181803883390190505b5090506000805b845181101561192d5784818151811015156118ce57fe5b90602001015160f860020a900460f860020a0283838060010194508151811015156118f557fe5b9060200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506001016118b7565b5060005b83518110156119a757838181518110151561194857fe5b90602001015160f860020a900460f860020a02838380600101945081518110151561196f57fe5b9060200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600101611931565b50909695505050505050565b600081815260036020526040902054600160a060020a0316156109ff5760009081526003602052604090208054600160a060020a0319169055565b8054611a0190600163ffffffff611a0e16565b9055565b80546001019055565b6000611a5083836040805190810160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611ba3565b9392505050565b600160a060020a0382161515611a825760405160e560020a62461bcd02815260040161053790612a6e565b611a8b81610e09565b15611aab5760405160e560020a62461bcd028152600401610537906129de565b60008181526002602090815260408083208054600160a060020a031916600160a060020a038716908117909155835260049091529020611aea90611a05565b6040518190600160a060020a038416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600b80546000838152600c60205260408120829055600182018355919091527f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db90155565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470818114801590610eac575050151592915050565b60008184841115611bca5760405160e560020a62461bcd028152600401610537919061298d565b505050900390565b604080518082019091526000808252602082015290565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10611c2a57805160ff1916838001178555611c57565b82800160010185558215611c57579182015b82811115611c57578251825591602001919060010190611c3c565b50611c63929150611c87565b5090565b815481835581811115610687576000838152602090206106879181019083015b61064791905b80821115611c635760008155600101611c8d565b6000611a508235612c10565b6000601f82018313611cbe57600080fd5b8135611cd1611ccc82612bc3565b612b9c565b91508181835260208401935060208101905083856040840282011115611cf657600080fd5b60005b83811015611d245781611d0c8882611da1565b84525060209092019160409190910190600101611cf9565b5050505092915050565b6000611a508235612c1b565b6000611a508235612c2c565b6000611a508251612c2c565b6000601f82018313611d6357600080fd5b8135611d71611ccc82612be4565b91508082526020830160208301858383011115611d8d57600080fd5b611d98838284612c4a565b50505092915050565b600060408284031215611db357600080fd5b611dbd6040612b9c565b90506000611dcb8484611ca1565b8252506020611ddc84848301611de8565b60208301525092915050565b6000611a508235610647565b600060208284031215611e0657600080fd5b6000610eac8484611ca1565b60008060408385031215611e2557600080fd5b6000611e318585611ca1565b9250506020611e4285828601611ca1565b9150509250929050565b600080600060608486031215611e6157600080fd5b6000611e6d8686611ca1565b9350506020611e7e86828701611ca1565b9250506040611e8f86828701611de8565b9150509250925092565b60008060008060808587031215611eaf57600080fd5b6000611ebb8787611ca1565b9450506020611ecc87828801611ca1565b9350506040611edd87828801611de8565b925050606085013567ffffffffffffffff811115611efa57600080fd5b611f0687828801611d52565b91505092959194509250565b60008060408385031215611f2557600080fd5b6000611f318585611ca1565b9250506020611e4285828601611d2e565b600080600060608486031215611f5757600080fd5b6000611f638686611ca1565b935050602084013567ffffffffffffffff811115611f8057600080fd5b611f8c86828701611d52565b925050604084013567ffffffffffffffff811115611fa957600080fd5b611e8f86828701611cad565b60008060408385031215611fc857600080fd5b6000611fd48585611ca1565b9250506020611e4285828601611de8565b600060208284031215611ff757600080fd5b6000610eac8484611d3a565b60006020828403121561201557600080fd5b6000610eac8484611d46565b60006020828403121561203357600080fd5b813567ffffffffffffffff81111561204a57600080fd5b610eac84828501611d52565b600080600080600060a0868803121561206e57600080fd5b853567ffffffffffffffff81111561208557600080fd5b61209188828901611d52565b955050602086013567ffffffffffffffff8111156120ae57600080fd5b6120ba88828901611d52565b94505060406120cb88828901611ca1565b935050606086013567ffffffffffffffff8111156120e857600080fd5b6120f488828901611d52565b925050608086013567ffffffffffffffff81111561211157600080fd5b61211d88828901611d52565b9150509295509295909350565b60006020828403121561213c57600080fd5b6000610eac8484611de8565b6000806040838503121561215b57600080fd5b6000611fd48585611de8565b61217081612c39565b82525050565b61217081612c10565b61217081612c1b565b600061219382612c0c565b8084526121a7816020860160208601612c56565b6121b081612c82565b9093016020019392505050565b602b81527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560208201527f74206f6620626f756e6473000000000000000000000000000000000000000000604082015260600190565b603281527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560208201527f63656976657220696d706c656d656e7465720000000000000000000000000000604082015260600190565b602681527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160208201527f6464726573730000000000000000000000000000000000000000000000000000604082015260600190565b601c81527f4552433136353a20696e76616c696420696e7465726661636520696400000000602082015260400190565b601c81527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000602082015260400190565b603181527f455243373231426173653a20746865206665655261746520696e20636f70797260208201527f69676874206d757374206265203c3d2031000000000000000000000000000000604082015260600190565b602481527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460208201527f7265737300000000000000000000000000000000000000000000000000000000604082015260600190565b601981527f4552433732313a20617070726f766520746f2063616c6c657200000000000000602082015260400190565b602c81527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860208201527f697374656e7420746f6b656e0000000000000000000000000000000000000000604082015260600190565b603881527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760208201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000604082015260600190565b601381527f616c726561647920696e697469616c697a656400000000000000000000000000602082015260400190565b602a81527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560208201527f726f206164647265737300000000000000000000000000000000000000000000604082015260600190565b602981527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460208201527f656e7420746f6b656e0000000000000000000000000000000000000000000000604082015260600190565b60208082527f4552433732313a206d696e7420746f20746865207a65726f20616464726573739082015260400190565b602c81527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860208201527f697374656e7420746f6b656e0000000000000000000000000000000000000000604082015260600190565b602c81527f4552433732314d657461646174613a2055524920736574206f66206e6f6e657860208201527f697374656e7420746f6b656e0000000000000000000000000000000000000000604082015260600190565b60208082527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65729082015260400190565b602981527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960208201527f73206e6f74206f776e0000000000000000000000000000000000000000000000604082015260600190565b602f81527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60208201527f6e6578697374656e7420746f6b656e0000000000000000000000000000000000604082015260600190565b603181527f455243373231426173653a2074686520617574686f7220696e20636f7079726960208201527f6768742063616e2774206265207a65726f000000000000000000000000000000604082015260600190565b602181527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560208201527f7200000000000000000000000000000000000000000000000000000000000000604082015260600190565b603181527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60208201527f776e6572206e6f7220617070726f766564000000000000000000000000000000604082015260600190565b602c81527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60208201527f7574206f6620626f756e64730000000000000000000000000000000000000000604082015260600190565b603181527f455243373231426173653a20746865206c656e677468206f6620636f7079726960208201527f67687473206d757374206265203c3d2031000000000000000000000000000000604082015260600190565b805160408301906128fa8482612176565b506020820151610c9e60208501825b61217081610647565b602081016107158284612176565b6080810161292e8287612176565b61293b6020830186612176565b6129486040830185612909565b818103606083015261295a8184612188565b9695505050505050565b604081016129728285612176565b611a506020830184612909565b60208101610715828461217f565b60208082528101611a508184612188565b60208082528101610715816121bd565b6020808252810161071581612213565b6020808252810161071581612269565b60208082528101610715816122bf565b60208082528101610715816122ef565b602080825281016107158161231f565b6020808252810161071581612375565b60208082528101610715816123cb565b60208082528101610715816123fb565b6020808252810161071581612451565b60208082528101610715816124a7565b60208082528101610715816124d7565b602080825281016107158161252d565b6020808252810161071581612583565b60208082528101610715816125b3565b6020808252810161071581612609565b602080825281016107158161265f565b602080825281016107158161268f565b60208082528101610715816126e5565b602080825281016107158161273b565b6020808252810161071581612791565b60208082528101610715816127e7565b602080825281016107158161283d565b6020808252810161071581612893565b6040810161071582846128e9565b602081016107158284612909565b60a08101612b488288612909565b612b556020830187612167565b612b626040830186612176565b612b6f6060830185612909565b61295a6080830184612909565b60408101612b8a8285612909565b8181036020830152610eac8184612188565b60405181810167ffffffffffffffff81118282101715612bbb57600080fd5b604052919050565b600067ffffffffffffffff821115612bda57600080fd5b5060209081020190565b600067ffffffffffffffff821115612bfb57600080fd5b506020601f91909101601f19160190565b5190565b600061071582612c20565b151590565b600160a060020a031690565b600160e060020a03191690565b600061071582600061071582612c10565b82818337506000910152565b60005b83811015612c71578181015183820152602001612c59565b83811115610c9e5750506000910152565b601f01601f19169056fea265627a7a72305820e53fe5b9a86cd1f71d0141421114c145d9605fd81c00fed7e46eda12152753af6c6578706572696d656e74616cf50037

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061020d576000357c0100000000000000000000000000000000000000000000000000000000900480637ceffa581161012c578063b88d4fde116100bf578063e8a3d4851161008e578063e8a3d48514610428578063e985e9c514610430578063f0b10c3614610443578063f2fde38b1461044b5761020d565b8063b88d4fde146103f2578063c0ac998314610405578063c87b56dd1461040d578063db420fe3146104205761020d565b806395d89b41116100fb57806395d89b41146103b157806399e0dd7c146103b9578063a22cb465146103cc578063b7ec8239146103df5761020d565b80637ceffa581461037b5780638da5cb5b1461038e5780638f32d59b14610396578063938e3d7b1461039e5761020d565b806342842e0e116101a45780636f4eaff1116101735780636f4eaff11461032d57806370a082311461034d578063715018a6146103605780637a5d8d17146103685761020d565b806342842e0e146102e157806347b64eb0146102f45780634f6ccce7146103075780636352211e1461031a5761020d565b806318160ddd116101e057806318160ddd1461028557806323b872dd1461029a5780632a55205a146102ad5780632f745c59146102ce5761020d565b806301ffc9a71461021257806306fdde031461023b578063081812fc14610250578063095ea7b314610270575b600080fd5b610225610220366004611fe5565b61045e565b604051610232919061297f565b60405180910390f35b61024361047d565b604051610232919061298d565b61026361025e36600461212a565b61050b565b6040516102329190612912565b61028361027e366004611fb5565b61055c565b005b61028d610643565b6040516102329190612b2c565b6102836102a8366004611e4c565b61064a565b6102c06102bb366004612148565b61068c565b604051610232929190612964565b61028d6102dc366004611fb5565b6106b7565b6102836102ef366004611e4c565b61071b565b610283610302366004611df4565b610737565b61028d61031536600461212a565b610795565b61026361032836600461212a565b6107e0565b61034061033b36600461212a565b61081a565b6040516102329190612b1e565b61028d61035b366004611df4565b610855565b6102836108a3565b610283610376366004611f42565b610916565b6102c061038936600461212a565b610975565b61026361099a565b6102256109a9565b6102836103ac366004612021565b6109cd565b610243610a02565b6102836103c7366004612021565b610a5d565b6102836103da366004611f12565b610a8f565b6102836103ed366004612056565b610b5a565b610283610400366004611e99565b610c60565b610243610ca4565b61024361041b36600461212a565b610cff565b610263610d34565b610243610d48565b61022561043e366004611e12565b610da3565b61028d610dd1565b610283610459366004611df4565b610dd7565b600160e060020a03191660009081526001602052604090205460ff1690565b600d805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156105035780601f106104d857610100808354040283529160200191610503565b820191906000526020600020905b8154815290600101906020018083116104e657829003601f168201915b505050505081565b600061051682610e09565b15156105405760405160e560020a62461bcd02815260040161053790612a7e565b60405180910390fd5b50600090815260036020526040902054600160a060020a031690565b6000610567826107e0565b9050600160a060020a0383811690821614156105985760405160e560020a62461bcd02815260040161053790612ade565b80600160a060020a03166105aa610e26565b600160a060020a031614806105c657506105c68161043e610e26565b15156105e75760405160e560020a62461bcd02815260040161053790612a2e565b6000828152600360205260408082208054600160a060020a031916600160a060020a0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600b545b90565b61065b610655610e26565b82610e2a565b151561067c5760405160e560020a62461bcd02815260040161053790612aee565b610687838383610eb4565b505050565b6000918252600f602052604090912060018101549054600160a060020a031692612710919092020490565b60006106c283610855565b82106106e35760405160e560020a62461bcd0281526004016105379061299e565b600160a060020a038316600090815260096020526040902080548390811061070757fe5b906000526020600020015490505b92915050565b6106878383836020604051908101604052806000815250610c60565b61073f6109a9565b15156107605760405160e560020a62461bcd02815260040161053790612a9e565b60118054600160a060020a039092166101000274ffffffffffffffffffffffffffffffffffffffff0019909216919091179055565b600061079f610643565b82106107c05760405160e560020a62461bcd02815260040161053790612afe565b600b8054839081106107ce57fe5b90600052602060002001549050919050565b600081815260026020526040812054600160a060020a03168015156107155760405160e560020a62461bcd02815260040161053790612a5e565b610822611bd2565b506000908152600f602090815260409182902082518084019093528054600160a060020a03168352600101549082015290565b6000600160a060020a03821615156108825760405160e560020a62461bcd02815260040161053790612a4e565b600160a060020a038216600090815260046020526040902061071590610ed3565b6108ab6109a9565b15156108cc5760405160e560020a62461bcd02815260040161053790612a9e565b60008054604051600160a060020a03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a360008054600160a060020a0319169055565b601080546001810190915561092c818584610ed7565b610936818461105c565b7fd2d827dddfc9c9a02afc5fc68d3251684b36e213a7999ebd90a861f25df4077e8184604051610967929190612b7c565b60405180910390a150505050565b600f6020526000908152604090208054600190910154600160a060020a039091169082565b600054600160a060020a031690565b60008054600160a060020a03166109be610e26565b600160a060020a031614905090565b6109d56109a9565b15156109f65760405160e560020a62461bcd02815260040161053790612a9e565b6109ff81611094565b50565b600e805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156105035780601f106104d857610100808354040283529160200191610503565b610a656109a9565b1515610a865760405160e560020a62461bcd02815260040161053790612a9e565b6109ff816110a7565b610a97610e26565b600160a060020a0383811691161415610ac55760405160e560020a62461bcd02815260040161053790612a0e565b8060056000610ad2610e26565b600160a060020a03908116825260208083019390935260409182016000908120918716808252919093529120805460ff191692151592909217909155610b16610e26565b600160a060020a03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051610b4e919061297f565b60405180910390a35050565b60115460ff1615610b805760405160e560020a62461bcd02815260040161053790612a3e565b8451610b9390600d906020880190611be9565b508351610ba790600e906020870190611be9565b508151610bbb906006906020850190611be9565b508051610bcf906007906020840190611be9565b50610bd86110ba565b610be06110e5565b610be861110e565b610bf0611137565b610bf8611160565b610c00611189565b610c086111b2565b604080517f4d494e545f574954485f4144445245535300000000000000000000000000000081529051908190036011019020610c43906111d7565b610c4c8361122c565b50506011805460ff19166001179055505050565b610c71610c6b610e26565b83610e2a565b1515610c925760405160e560020a62461bcd02815260040161053790612aee565b610c9e848484846112b2565b50505050565b6007805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156105035780601f106104d857610100808354040283529160200191610503565b6060610d0a82610e09565b1515610d2b5760405160e560020a62461bcd02815260040161053790612abe565b610715826112ea565b6011546101009004600160a060020a031681565b6006805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156105035780601f106104d857610100808354040283529160200191610503565b600160a060020a03918216600090815260056020908152604080832093909416825291909152205460ff1690565b61271081565b610ddf6109a9565b1515610e005760405160e560020a62461bcd02815260040161053790612a9e565b6109ff8161122c565b600090815260026020526040902054600160a060020a0316151590565b3390565b6000610e3582610e09565b1515610e565760405160e560020a62461bcd02815260040161053790612a1e565b6000610e61836107e0565b905080600160a060020a031684600160a060020a03161480610e9c575083600160a060020a0316610e918461050b565b600160a060020a0316145b80610eac5750610eac8185610da3565b949350505050565b610ebf838383611425565b610ec98382611533565b610687828261162a565b5490565b80516001811115610efd5760405160e560020a62461bcd02815260040161053790612b0e565b8060011415611052578151600090839082908110610f1757fe5b6020908102909101015151600160a060020a03161415610f4c5760405160e560020a62461bcd02815260040161053790612ace565b612710826000815181101515610f5e57fe5b602090810290910181015101511115610f8c5760405160e560020a62461bcd028152600401610537906129ee565b816000815181101515610f9b57fe5b6020908102919091018101516000868152600f83526040812082518154600160a060020a031916600160a060020a03909116178155919092015160019091015582517f0744eac43f2c274aeab710e028e1557486f24427dd812cb06edb74fe166e4dfc91869133918691811061100d57fe5b602090810290910101515185518690600090811061102757fe5b9060200190602002015160200151612710604051611049959493929190612b3a565b60405180910390a15b610c9e8385611668565b61106582610e09565b15156110865760405160e560020a62461bcd02815260040161053790612a8e565b6110908282611685565b5050565b8051611090906006906020840190611be9565b8051611090906007906020840190611be9565b6110e37f01ffc9a7000000000000000000000000000000000000000000000000000000006111d7565b565b6110e37f80ac58cd000000000000000000000000000000000000000000000000000000006111d7565b6110e37f5b5e139f000000000000000000000000000000000000000000000000000000006111d7565b6110e37f780e9d63000000000000000000000000000000000000000000000000000000006111d7565b6110e37fe8a3d485000000000000000000000000000000000000000000000000000000006111d7565b6110e37f6f4eaff1000000000000000000000000000000000000000000000000000000006111d7565b6110e37f2a55205a000000000000000000000000000000000000000000000000000000005b600160e060020a031980821614156112045760405160e560020a62461bcd028152600401610537906129ce565b600160e060020a0319166000908152600160208190526040909120805460ff19169091179055565b600160a060020a03811615156112575760405160e560020a62461bcd028152600401610537906129be565b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a360008054600160a060020a031916600160a060020a0392909216919091179055565b6112bd848484610eb4565b6112c9848484846116a4565b1515610c9e5760405160e560020a62461bcd028152600401610537906129ae565b6000818152600860209081526040918290208054835160026001831615610100026000190190921691909104601f8101849004840282018401909452838152606093610715939192918301828280156113845780601f1061135957610100808354040283529160200191611384565b820191906000526020600020905b81548152906001019060200180831161136757829003601f168201915b505060078054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152955091935091508301828280156114125780601f106113e757610100808354040283529160200191611412565b820191906000526020600020905b8154815290600101906020018083116113f557829003601f168201915b505050505061187490919063ffffffff16565b82600160a060020a0316611438826107e0565b600160a060020a0316146114615760405160e560020a62461bcd02815260040161053790612aae565b600160a060020a038216151561148c5760405160e560020a62461bcd028152600401610537906129fe565b611495816119b3565b600160a060020a03831660009081526004602052604090206114b6906119ee565b600160a060020a03821660009081526004602052604090206114d790611a05565b6000818152600260205260408082208054600160a060020a031916600160a060020a0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600160a060020a03821660009081526009602052604081205461155d90600163ffffffff611a0e16565b6000838152600a60205260409020549091508082146115fa57600160a060020a038416600090815260096020526040812080548490811061159a57fe5b90600052602060002001549050806009600087600160a060020a0316600160a060020a03168152602001908152602001600020838154811015156115da57fe5b6000918252602080832090910192909255918252600a9052604090208190555b600160a060020a0384166000908152600960205260409020805490611623906000198301611c67565b5050505050565b600160a060020a0390911660009081526009602081815260408084208054868652600a84529185208290559282526001810183559183529091200155565b6116728282611a57565b61167c828261162a565b61109081611b26565b6000828152600860209081526040909120825161068792840190611be9565b60006116b884600160a060020a0316611b6a565b15156116c657506001610eac565b60006060600160a060020a0386167f150b7a02000000000000000000000000000000000000000000000000000000006116fd610e26565b8988886040516024016117139493929190612920565b60408051601f198184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16600160e060020a0319909416939093178352518151919290918291908083835b602083106117865780518252601f199092019160209182019101611767565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146117e8576040519150601f19603f3d011682016040523d82523d6000602084013e6117ed565b606091505b50915091508115156118275760008151111561180c5780518082602001fd5b60405160e560020a62461bcd028152600401610537906129ae565b60008180602001905161183d9190810190612003565b600160e060020a0319167f150b7a0200000000000000000000000000000000000000000000000000000000149350610eac92505050565b6060808390506060839050606081518351016040519080825280601f01601f1916602001820160405280156118b0576020820181803883390190505b5090506000805b845181101561192d5784818151811015156118ce57fe5b90602001015160f860020a900460f860020a0283838060010194508151811015156118f557fe5b9060200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506001016118b7565b5060005b83518110156119a757838181518110151561194857fe5b90602001015160f860020a900460f860020a02838380600101945081518110151561196f57fe5b9060200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600101611931565b50909695505050505050565b600081815260036020526040902054600160a060020a0316156109ff5760009081526003602052604090208054600160a060020a0319169055565b8054611a0190600163ffffffff611a0e16565b9055565b80546001019055565b6000611a5083836040805190810160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611ba3565b9392505050565b600160a060020a0382161515611a825760405160e560020a62461bcd02815260040161053790612a6e565b611a8b81610e09565b15611aab5760405160e560020a62461bcd028152600401610537906129de565b60008181526002602090815260408083208054600160a060020a031916600160a060020a038716908117909155835260049091529020611aea90611a05565b6040518190600160a060020a038416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600b80546000838152600c60205260408120829055600182018355919091527f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db90155565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470818114801590610eac575050151592915050565b60008184841115611bca5760405160e560020a62461bcd028152600401610537919061298d565b505050900390565b604080518082019091526000808252602082015290565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10611c2a57805160ff1916838001178555611c57565b82800160010185558215611c57579182015b82811115611c57578251825591602001919060010190611c3c565b50611c63929150611c87565b5090565b815481835581811115610687576000838152602090206106879181019083015b61064791905b80821115611c635760008155600101611c8d565b6000611a508235612c10565b6000601f82018313611cbe57600080fd5b8135611cd1611ccc82612bc3565b612b9c565b91508181835260208401935060208101905083856040840282011115611cf657600080fd5b60005b83811015611d245781611d0c8882611da1565b84525060209092019160409190910190600101611cf9565b5050505092915050565b6000611a508235612c1b565b6000611a508235612c2c565b6000611a508251612c2c565b6000601f82018313611d6357600080fd5b8135611d71611ccc82612be4565b91508082526020830160208301858383011115611d8d57600080fd5b611d98838284612c4a565b50505092915050565b600060408284031215611db357600080fd5b611dbd6040612b9c565b90506000611dcb8484611ca1565b8252506020611ddc84848301611de8565b60208301525092915050565b6000611a508235610647565b600060208284031215611e0657600080fd5b6000610eac8484611ca1565b60008060408385031215611e2557600080fd5b6000611e318585611ca1565b9250506020611e4285828601611ca1565b9150509250929050565b600080600060608486031215611e6157600080fd5b6000611e6d8686611ca1565b9350506020611e7e86828701611ca1565b9250506040611e8f86828701611de8565b9150509250925092565b60008060008060808587031215611eaf57600080fd5b6000611ebb8787611ca1565b9450506020611ecc87828801611ca1565b9350506040611edd87828801611de8565b925050606085013567ffffffffffffffff811115611efa57600080fd5b611f0687828801611d52565b91505092959194509250565b60008060408385031215611f2557600080fd5b6000611f318585611ca1565b9250506020611e4285828601611d2e565b600080600060608486031215611f5757600080fd5b6000611f638686611ca1565b935050602084013567ffffffffffffffff811115611f8057600080fd5b611f8c86828701611d52565b925050604084013567ffffffffffffffff811115611fa957600080fd5b611e8f86828701611cad565b60008060408385031215611fc857600080fd5b6000611fd48585611ca1565b9250506020611e4285828601611de8565b600060208284031215611ff757600080fd5b6000610eac8484611d3a565b60006020828403121561201557600080fd5b6000610eac8484611d46565b60006020828403121561203357600080fd5b813567ffffffffffffffff81111561204a57600080fd5b610eac84828501611d52565b600080600080600060a0868803121561206e57600080fd5b853567ffffffffffffffff81111561208557600080fd5b61209188828901611d52565b955050602086013567ffffffffffffffff8111156120ae57600080fd5b6120ba88828901611d52565b94505060406120cb88828901611ca1565b935050606086013567ffffffffffffffff8111156120e857600080fd5b6120f488828901611d52565b925050608086013567ffffffffffffffff81111561211157600080fd5b61211d88828901611d52565b9150509295509295909350565b60006020828403121561213c57600080fd5b6000610eac8484611de8565b6000806040838503121561215b57600080fd5b6000611fd48585611de8565b61217081612c39565b82525050565b61217081612c10565b61217081612c1b565b600061219382612c0c565b8084526121a7816020860160208601612c56565b6121b081612c82565b9093016020019392505050565b602b81527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560208201527f74206f6620626f756e6473000000000000000000000000000000000000000000604082015260600190565b603281527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560208201527f63656976657220696d706c656d656e7465720000000000000000000000000000604082015260600190565b602681527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160208201527f6464726573730000000000000000000000000000000000000000000000000000604082015260600190565b601c81527f4552433136353a20696e76616c696420696e7465726661636520696400000000602082015260400190565b601c81527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000602082015260400190565b603181527f455243373231426173653a20746865206665655261746520696e20636f70797260208201527f69676874206d757374206265203c3d2031000000000000000000000000000000604082015260600190565b602481527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460208201527f7265737300000000000000000000000000000000000000000000000000000000604082015260600190565b601981527f4552433732313a20617070726f766520746f2063616c6c657200000000000000602082015260400190565b602c81527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860208201527f697374656e7420746f6b656e0000000000000000000000000000000000000000604082015260600190565b603881527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760208201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000604082015260600190565b601381527f616c726561647920696e697469616c697a656400000000000000000000000000602082015260400190565b602a81527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560208201527f726f206164647265737300000000000000000000000000000000000000000000604082015260600190565b602981527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460208201527f656e7420746f6b656e0000000000000000000000000000000000000000000000604082015260600190565b60208082527f4552433732313a206d696e7420746f20746865207a65726f20616464726573739082015260400190565b602c81527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860208201527f697374656e7420746f6b656e0000000000000000000000000000000000000000604082015260600190565b602c81527f4552433732314d657461646174613a2055524920736574206f66206e6f6e657860208201527f697374656e7420746f6b656e0000000000000000000000000000000000000000604082015260600190565b60208082527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65729082015260400190565b602981527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960208201527f73206e6f74206f776e0000000000000000000000000000000000000000000000604082015260600190565b602f81527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60208201527f6e6578697374656e7420746f6b656e0000000000000000000000000000000000604082015260600190565b603181527f455243373231426173653a2074686520617574686f7220696e20636f7079726960208201527f6768742063616e2774206265207a65726f000000000000000000000000000000604082015260600190565b602181527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560208201527f7200000000000000000000000000000000000000000000000000000000000000604082015260600190565b603181527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60208201527f776e6572206e6f7220617070726f766564000000000000000000000000000000604082015260600190565b602c81527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60208201527f7574206f6620626f756e64730000000000000000000000000000000000000000604082015260600190565b603181527f455243373231426173653a20746865206c656e677468206f6620636f7079726960208201527f67687473206d757374206265203c3d2031000000000000000000000000000000604082015260600190565b805160408301906128fa8482612176565b506020820151610c9e60208501825b61217081610647565b602081016107158284612176565b6080810161292e8287612176565b61293b6020830186612176565b6129486040830185612909565b818103606083015261295a8184612188565b9695505050505050565b604081016129728285612176565b611a506020830184612909565b60208101610715828461217f565b60208082528101611a508184612188565b60208082528101610715816121bd565b6020808252810161071581612213565b6020808252810161071581612269565b60208082528101610715816122bf565b60208082528101610715816122ef565b602080825281016107158161231f565b6020808252810161071581612375565b60208082528101610715816123cb565b60208082528101610715816123fb565b6020808252810161071581612451565b60208082528101610715816124a7565b60208082528101610715816124d7565b602080825281016107158161252d565b6020808252810161071581612583565b60208082528101610715816125b3565b6020808252810161071581612609565b602080825281016107158161265f565b602080825281016107158161268f565b60208082528101610715816126e5565b602080825281016107158161273b565b6020808252810161071581612791565b60208082528101610715816127e7565b602080825281016107158161283d565b6020808252810161071581612893565b6040810161071582846128e9565b602081016107158284612909565b60a08101612b488288612909565b612b556020830187612167565b612b626040830186612176565b612b6f6060830185612909565b61295a6080830184612909565b60408101612b8a8285612909565b8181036020830152610eac8184612188565b60405181810167ffffffffffffffff81118282101715612bbb57600080fd5b604052919050565b600067ffffffffffffffff821115612bda57600080fd5b5060209081020190565b600067ffffffffffffffff821115612bfb57600080fd5b506020601f91909101601f19160190565b5190565b600061071582612c20565b151590565b600160a060020a031690565b600160e060020a03191690565b600061071582600061071582612c10565b82818337506000910152565b60005b83811015612c71578181015183820152602001612c59565b83811115610c9e5750506000910152565b601f01601f19169056fea265627a7a72305820e53fe5b9a86cd1f71d0141421114c145d9605fd81c00fed7e46eda12152753af6c6578706572696d656e74616cf50037

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.