Contract 0x04445d9c3e71c5aeeb4835b5e2ed07ae01979b2f

Contract Overview

Balance:
0 xDAI

xDAI Value:
$0.00

Token:
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xcaaf60d72f419b6a58af47e72f9302ac5e455bde4918a14632e2d82d03be67a5Safe Transfer Fr...283229242023-06-06 19:21:452 days 19 hrs ago0x58315fb2b6e94371679ffb4b3322ab32f3dc7311 IN  0x04445d9c3e71c5aeeb4835b5e2ed07ae01979b2f0 xDAI0.000170616
0x5302eebc99dbc905afd7ef6341dd9e16b01f80d3402ed427bbbb1c5a11333beaSafe Transfer Fr...283229122023-06-06 19:20:452 days 19 hrs ago0x58315fb2b6e94371679ffb4b3322ab32f3dc7311 IN  0x04445d9c3e71c5aeeb4835b5e2ed07ae01979b2f0 xDAI0.000170652
0x6f955b83d413e4a7d587594de6cbd05d2659080b52f949d3c506ba974d074a76Safe Transfer Fr...283229012023-06-06 19:19:502 days 19 hrs ago0x58315fb2b6e94371679ffb4b3322ab32f3dc7311 IN  0x04445d9c3e71c5aeeb4835b5e2ed07ae01979b2f0 xDAI0.000170619
0xcd79c5858b305d5f701763ae26433674ab44c5199f132914980ffc0a3aade242Safe Transfer Fr...283228892023-06-06 19:18:502 days 19 hrs ago0x58315fb2b6e94371679ffb4b3322ab32f3dc7311 IN  0x04445d9c3e71c5aeeb4835b5e2ed07ae01979b2f0 xDAI0.000170616
0x575e6c6c866e32782e04d034a23011a2ff32ef35148c392e7dfdd259f1b5b946Safe Transfer Fr...283228772023-06-06 19:17:452 days 19 hrs ago0x58315fb2b6e94371679ffb4b3322ab32f3dc7311 IN  0x04445d9c3e71c5aeeb4835b5e2ed07ae01979b2f0 xDAI0.000170652
0x4330157297299bb85572056d7e48a9af6cf648800d52fd169d64aea5cc8b8103Safe Transfer Fr...283228592023-06-06 19:16:052 days 20 hrs ago0x58315fb2b6e94371679ffb4b3322ab32f3dc7311 IN  0x04445d9c3e71c5aeeb4835b5e2ed07ae01979b2f0 xDAI0.000170619
0xd3752ec35e5e1edcc6da66b8bf9a2dd6c20873e8aed7c4b307f148bd1d5ed380Safe Transfer Fr...283228442023-06-06 19:14:452 days 20 hrs ago0x58315fb2b6e94371679ffb4b3322ab32f3dc7311 IN  0x04445d9c3e71c5aeeb4835b5e2ed07ae01979b2f0 xDAI0.000152289844
0xe00942e553d1f758adc8ea752df5f225c76d603ca3aab22020535c31eec97f22Safe Transfer Fr...283228322023-06-06 19:13:452 days 20 hrs ago0x58315fb2b6e94371679ffb4b3322ab32f3dc7311 IN  0x04445d9c3e71c5aeeb4835b5e2ed07ae01979b2f0 xDAI0.000152289844
0xf9938d16b201dd93b4b7f6e6e2b59c97e8bb933a864a4829a09c46cec30528c2Safe Transfer Fr...283228172023-06-06 19:12:302 days 20 hrs ago0x58315fb2b6e94371679ffb4b3322ab32f3dc7311 IN  0x04445d9c3e71c5aeeb4835b5e2ed07ae01979b2f0 xDAI0.000152289844
0xdab7ad5112fd6c2cb3f957b60fbc508e11f56e027b07d09c6cb75cd02e7ea0cbSafe Transfer Fr...283228052023-06-06 19:11:252 days 20 hrs ago0x58315fb2b6e94371679ffb4b3322ab32f3dc7311 IN  0x04445d9c3e71c5aeeb4835b5e2ed07ae01979b2f0 xDAI0.000152257718
0x5a96464874768947e3610f470a64260f238e948cf1b0714e448900ecbe7b8033Safe Transfer Fr...283227922023-06-06 19:10:152 days 20 hrs ago0x58315fb2b6e94371679ffb4b3322ab32f3dc7311 IN  0x04445d9c3e71c5aeeb4835b5e2ed07ae01979b2f0 xDAI0.0000915032
0x198b01236b8f36627f38d2a94a0d11d7570e81610b1d038c1773bec937d2cb7eSafe Transfer Fr...283227792023-06-06 19:09:102 days 20 hrs ago0x58315fb2b6e94371679ffb4b3322ab32f3dc7311 IN  0x04445d9c3e71c5aeeb4835b5e2ed07ae01979b2f0 xDAI0.0001308332
0xc509dd339486547b34881ae9c19ce6d26383b716e56cdf9a6e4e261577176108Safe Transfer Fr...283227672023-06-06 19:08:052 days 20 hrs ago0x58315fb2b6e94371679ffb4b3322ab32f3dc7311 IN  0x04445d9c3e71c5aeeb4835b5e2ed07ae01979b2f0 xDAI0.0001308332
0x600dd23aaaad66e09ee3c9e7d29205f279ce00bbef266efaf35266b388de49b0Safe Transfer Fr...283227552023-06-06 19:07:002 days 20 hrs ago0x58315fb2b6e94371679ffb4b3322ab32f3dc7311 IN  0x04445d9c3e71c5aeeb4835b5e2ed07ae01979b2f0 xDAI0.00015131144
0x0220271bc5f861722571f8bc73433971fee5c261a9960a232893b0b3c90a1eacSafe Transfer Fr...283227432023-06-06 19:06:002 days 20 hrs ago0x58315fb2b6e94371679ffb4b3322ab32f3dc7311 IN  0x04445d9c3e71c5aeeb4835b5e2ed07ae01979b2f0 xDAI0.000170652
0xabc21b6ee714ecd8e436000159b54d3198ea3fe2b374755c7efb599144ccc2adSafe Transfer Fr...283227322023-06-06 19:05:002 days 20 hrs ago0x58315fb2b6e94371679ffb4b3322ab32f3dc7311 IN  0x04445d9c3e71c5aeeb4835b5e2ed07ae01979b2f0 xDAI0.00016549752
0x16bb3aa2c9d2e64753def8416f71772e6277a6bd26b527d7f8810a9cf45319f2Safe Transfer Fr...283227182023-06-06 19:03:502 days 20 hrs ago0x58315fb2b6e94371679ffb4b3322ab32f3dc7311 IN  0x04445d9c3e71c5aeeb4835b5e2ed07ae01979b2f0 xDAI0.000160529128
0x171b7789334bcdf5c68648d619859ba539891b25700a40db436815cc3d292789Safe Transfer Fr...283227062023-06-06 19:02:502 days 20 hrs ago0x58315fb2b6e94371679ffb4b3322ab32f3dc7311 IN  0x04445d9c3e71c5aeeb4835b5e2ed07ae01979b2f0 xDAI0.000160529128
0x01978177fd0ebb5f6d569a409402fb6db5c8bc62ebd753cf17d2e5d093e453f9Safe Transfer Fr...283226932023-06-06 19:01:452 days 20 hrs ago0x58315fb2b6e94371679ffb4b3322ab32f3dc7311 IN  0x04445d9c3e71c5aeeb4835b5e2ed07ae01979b2f0 xDAI0.000165461944
0x6f62a3a181d66bb5ad048e2c7e097e75b283a07b84c71eed858c954751ffdfa2Safe Transfer Fr...283226822023-06-06 19:00:452 days 20 hrs ago0x58315fb2b6e94371679ffb4b3322ab32f3dc7311 IN  0x04445d9c3e71c5aeeb4835b5e2ed07ae01979b2f0 xDAI0.000154952016
0xb98fe07928309eaa574db69b5e970b7b97f6caeacde9e9f1e661e52dc0b30481Safe Transfer Fr...283226702023-06-06 18:59:402 days 20 hrs ago0x58315fb2b6e94371679ffb4b3322ab32f3dc7311 IN  0x04445d9c3e71c5aeeb4835b5e2ed07ae01979b2f0 xDAI0.000146248817
0x276305913c8cc4a1414a61d0661b35f43596f4ea2d145095e52e73d8e9da451cSafe Transfer Fr...283226592023-06-06 18:58:452 days 20 hrs ago0x58315fb2b6e94371679ffb4b3322ab32f3dc7311 IN  0x04445d9c3e71c5aeeb4835b5e2ed07ae01979b2f0 xDAI0.00012912668
0x8cceb15d9ee99e79f10b9c67e9fa539308f88bc484c6b79b722c213176cd9e27Safe Transfer Fr...283226462023-06-06 18:57:402 days 20 hrs ago0x58315fb2b6e94371679ffb4b3322ab32f3dc7311 IN  0x04445d9c3e71c5aeeb4835b5e2ed07ae01979b2f0 xDAI0.00012533617
0x22361e41c30f9827d8f077ed1198064072b85a5a0e7555bc6fe5f8191b699cdeSafe Transfer Fr...283226332023-06-06 18:56:352 days 20 hrs ago0x58315fb2b6e94371679ffb4b3322ab32f3dc7311 IN  0x04445d9c3e71c5aeeb4835b5e2ed07ae01979b2f0 xDAI0.000150403404
0xa05fd542bd294483cbb0b15fe3aa335d23b60aaa7dd28aa72da8c9558a987d26Safe Transfer Fr...283226242023-06-06 18:55:352 days 20 hrs ago0x58315fb2b6e94371679ffb4b3322ab32f3dc7311 IN  0x04445d9c3e71c5aeeb4835b5e2ed07ae01979b2f0 xDAI0.000150403404
[ Download CSV Export 
View more zero value Internal Transactions in Advanced View mode
Loading

Similar Match Source Code
Note: This contract matches the deployed ByteCode of the Source Code for Contract 0xed1efc6efceaab9f6d609fec89c9e675bf1efb0a

Contract Name:
RarestUserToken

Compiler Version
v0.5.17+commit.d19bba13

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity)

/**
 *Submitted for verification at gnosisscan.io on 2022-08-04
*/

/**
 *Submitted for verification at Etherscan.io on 2021-02-01
*/

pragma solidity ^0.5.0;
pragma experimental ABIEncoderV2;


/**
 * @title SafeMath
 * @dev Math operations with safety checks that throw on error
 */
library SafeMath {

    /**
    * @dev Multiplies two numbers, throws on overflow.
    */
    function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
        // Gas optimization: this is cheaper than asserting 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
        if (a == 0) {
            return 0;
        }

        c = a * b;
        assert(c / a == b);
        return c;
    }

    /**
    * @dev Integer division of two numbers, truncating the quotient.
    */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        // assert(b > 0); // Solidity automatically throws when dividing by 0
        // uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold
        return a / b;
    }

    /**
    * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
    */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        assert(b <= a);
        return a - b;
    }

    /**
    * @dev Adds two numbers, throws on overflow.
    */
    function add(uint256 a, uint256 b) internal pure returns (uint256 c) {
        c = a + b;
        assert(c >= a);
        return c;
    }
}

/**
    Note: Simple contract to use as base for const vals
*/
contract CommonConstants {

    bytes4 constant internal ERC1155_ACCEPTED = 0xf23a6e61; // bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))
    bytes4 constant internal ERC1155_BATCH_ACCEPTED = 0xbc197c81; // bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))
}

/**
    Note: The ERC-165 identifier for this interface is 0x4e2312e0.
*/
interface ERC1155TokenReceiver {
    /**
        @notice Handle the receipt of a single ERC1155 token type.
        @dev An ERC1155-compliant smart contract MUST call this function on the token recipient contract, at the end of a `safeTransferFrom` after the balance has been updated.
        This function MUST return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` (i.e. 0xf23a6e61) if it accepts the transfer.
        This function MUST revert if it rejects the transfer.
        Return of any other value than the prescribed keccak256 generated value MUST result in the transaction being reverted by the caller.
        @param _operator  The address which initiated the transfer (i.e. msg.sender)
        @param _from      The address which previously owned the token
        @param _id        The ID of the token being transferred
        @param _value     The amount of tokens being transferred
        @param _data      Additional data with no specified format
        @return           `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`
    */
    function onERC1155Received(address _operator, address _from, uint256 _id, uint256 _value, bytes calldata _data) external returns(bytes4);

    /**
        @notice Handle the receipt of multiple ERC1155 token types.
        @dev An ERC1155-compliant smart contract MUST call this function on the token recipient contract, at the end of a `safeBatchTransferFrom` after the balances have been updated.
        This function MUST return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` (i.e. 0xbc197c81) if it accepts the transfer(s).
        This function MUST revert if it rejects the transfer(s).
        Return of any other value than the prescribed keccak256 generated value MUST result in the transaction being reverted by the caller.
        @param _operator  The address which initiated the batch transfer (i.e. msg.sender)
        @param _from      The address which previously owned the token
        @param _ids       An array containing ids of each token being transferred (order and length must match _values array)
        @param _values    An array containing amounts of each token being transferred (order and length must match _ids array)
        @param _data      Additional data with no specified format
        @return           `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`
    */
    function onERC1155BatchReceived(address _operator, address _from, uint256[] calldata _ids, uint256[] calldata _values, bytes calldata _data) external returns(bytes4);
}

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

/**
    @title ERC-1155 Multi Token Standard
    @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1155.md
    Note: The ERC-165 identifier for this interface is 0xd9b67a26.
 */
contract IERC1155 is IERC165 {
    /**
        @dev Either `TransferSingle` or `TransferBatch` MUST emit when tokens are transferred, including zero value transfers as well as minting or burning (see "Safe Transfer Rules" section of the standard).
        The `_operator` argument MUST be msg.sender.
        The `_from` argument MUST be the address of the holder whose balance is decreased.
        The `_to` argument MUST be the address of the recipient whose balance is increased.
        The `_id` argument MUST be the token type being transferred.
        The `_value` argument MUST be the number of tokens the holder balance is decreased by and match what the recipient balance is increased by.
        When minting/creating tokens, the `_from` argument MUST be set to `0x0` (i.e. zero address).
        When burning/destroying tokens, the `_to` argument MUST be set to `0x0` (i.e. zero address).
    */
    event TransferSingle(address indexed _operator, address indexed _from, address indexed _to, uint256 _id, uint256 _value);

    /**
        @dev Either `TransferSingle` or `TransferBatch` MUST emit when tokens are transferred, including zero value transfers as well as minting or burning (see "Safe Transfer Rules" section of the standard).
        The `_operator` argument MUST be msg.sender.
        The `_from` argument MUST be the address of the holder whose balance is decreased.
        The `_to` argument MUST be the address of the recipient whose balance is increased.
        The `_ids` argument MUST be the list of tokens being transferred.
        The `_values` argument MUST be the list of number of tokens (matching the list and order of tokens specified in _ids) the holder balance is decreased by and match what the recipient balance is increased by.
        When minting/creating tokens, the `_from` argument MUST be set to `0x0` (i.e. zero address).
        When burning/destroying tokens, the `_to` argument MUST be set to `0x0` (i.e. zero address).
    */
    event TransferBatch(address indexed _operator, address indexed _from, address indexed _to, uint256[] _ids, uint256[] _values);

    /**
        @dev MUST emit when approval for a second party/operator address to manage all tokens for an owner address is enabled or disabled (absense of an event assumes disabled).
    */
    event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved);

    /**
        @dev MUST emit when the URI is updated for a token ID.
        URIs are defined in RFC 3986.
        The URI MUST point a JSON file that conforms to the "ERC-1155 Metadata URI JSON Schema".
    */
    event URI(string _value, uint256 indexed _id);

    /**
        @notice Transfers `_value` amount of an `_id` from the `_from` address to the `_to` address specified (with safety call).
        @dev Caller must be approved to manage the tokens being transferred out of the `_from` account (see "Approval" section of the standard).
        MUST revert if `_to` is the zero address.
        MUST revert if balance of holder for token `_id` is lower than the `_value` sent.
        MUST revert on any other error.
        MUST emit the `TransferSingle` event to reflect the balance change (see "Safe Transfer Rules" section of the standard).
        After the above conditions are met, this function MUST check if `_to` is a smart contract (e.g. code size > 0). If so, it MUST call `onERC1155Received` on `_to` and act appropriately (see "Safe Transfer Rules" section of the standard).
        @param _from    Source address
        @param _to      Target address
        @param _id      ID of the token type
        @param _value   Transfer amount
        @param _data    Additional data with no specified format, MUST be sent unaltered in call to `onERC1155Received` on `_to`
    */
    function safeTransferFrom(address _from, address _to, uint256 _id, uint256 _value, bytes calldata _data) external;

    /**
        @notice Transfers `_values` amount(s) of `_ids` from the `_from` address to the `_to` address specified (with safety call).
        @dev Caller must be approved to manage the tokens being transferred out of the `_from` account (see "Approval" section of the standard).
        MUST revert if `_to` is the zero address.
        MUST revert if length of `_ids` is not the same as length of `_values`.
        MUST revert if any of the balance(s) of the holder(s) for token(s) in `_ids` is lower than the respective amount(s) in `_values` sent to the recipient.
        MUST revert on any other error.
        MUST emit `TransferSingle` or `TransferBatch` event(s) such that all the balance changes are reflected (see "Safe Transfer Rules" section of the standard).
        Balance changes and events MUST follow the ordering of the arrays (_ids[0]/_values[0] before _ids[1]/_values[1], etc).
        After the above conditions for the transfer(s) in the batch are met, this function MUST check if `_to` is a smart contract (e.g. code size > 0). If so, it MUST call the relevant `ERC1155TokenReceiver` hook(s) on `_to` and act appropriately (see "Safe Transfer Rules" section of the standard).
        @param _from    Source address
        @param _to      Target address
        @param _ids     IDs of each token type (order and length must match _values array)
        @param _values  Transfer amounts per token type (order and length must match _ids array)
        @param _data    Additional data with no specified format, MUST be sent unaltered in call to the `ERC1155TokenReceiver` hook(s) on `_to`
    */
    function safeBatchTransferFrom(address _from, address _to, uint256[] calldata _ids, uint256[] calldata _values, bytes calldata _data) external;

    /**
        @notice Get the balance of an account's Tokens.
        @param _owner  The address of the token holder
        @param _id     ID of the Token
        @return        The _owner's balance of the Token type requested
     */
    function balanceOf(address _owner, uint256 _id) external view returns (uint256);

    /**
        @notice Get the balance of multiple account/token pairs
        @param _owners The addresses of the token holders
        @param _ids    ID of the Tokens
        @return        The _owner's balance of the Token types requested (i.e. balance for each (owner, id) pair)
     */
    function balanceOfBatch(address[] calldata _owners, uint256[] calldata _ids) external view returns (uint256[] memory);

    /**
        @notice Enable or disable approval for a third party ("operator") to manage all of the caller's tokens.
        @dev MUST emit the ApprovalForAll event on success.
        @param _operator  Address to add to the set of authorized operators
        @param _approved  True if the operator is approved, false to revoke approval
    */
    function setApprovalForAll(address _operator, bool _approved) external;

    /**
        @notice Queries the approval status of an operator for a given owner.
        @param _owner     The owner of the Tokens
        @param _operator  Address of authorized operator
        @return           True if the operator is approved, false if not
    */
    function isApprovedForAll(address _owner, address _operator) external view returns (bool);
}

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

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

    /**
     * @dev See {IERC165-supportsInterface}.
     *
     * Time complexity O(1), guaranteed to always use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) 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;
    }
}

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

// A sample implementation of core ERC1155 function.
contract ERC1155 is IERC1155, ERC165, CommonConstants
{
    using SafeMath for uint256;
    using Address for address;

    // id => (owner => balance)
    mapping (uint256 => mapping(address => uint256)) internal balances;

    // owner => (operator => approved)
    mapping (address => mapping(address => bool)) internal operatorApproval;

/////////////////////////////////////////// ERC165 //////////////////////////////////////////////

    /*
        bytes4(keccak256("safeTransferFrom(address,address,uint256,uint256,bytes)")) ^
        bytes4(keccak256("safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)")) ^
        bytes4(keccak256("balanceOf(address,uint256)")) ^
        bytes4(keccak256("balanceOfBatch(address[],uint256[])")) ^
        bytes4(keccak256("setApprovalForAll(address,bool)")) ^
        bytes4(keccak256("isApprovedForAll(address,address)"));
    */
    bytes4 constant private INTERFACE_SIGNATURE_ERC1155 = 0xd9b67a26;

/////////////////////////////////////////// CONSTRUCTOR //////////////////////////////////////////

    constructor() public {
        _registerInterface(INTERFACE_SIGNATURE_ERC1155);
    }

/////////////////////////////////////////// ERC1155 //////////////////////////////////////////////

    /**
        @notice Transfers `_value` amount of an `_id` from the `_from` address to the `_to` address specified (with safety call).
        @dev Caller must be approved to manage the tokens being transferred out of the `_from` account (see "Approval" section of the standard).
        MUST revert if `_to` is the zero address.
        MUST revert if balance of holder for token `_id` is lower than the `_value` sent.
        MUST revert on any other error.
        MUST emit the `TransferSingle` event to reflect the balance change (see "Safe Transfer Rules" section of the standard).
        After the above conditions are met, this function MUST check if `_to` is a smart contract (e.g. code size > 0). If so, it MUST call `onERC1155Received` on `_to` and act appropriately (see "Safe Transfer Rules" section of the standard).
        @param _from    Source address
        @param _to      Target address
        @param _id      ID of the token type
        @param _value   Transfer amount
        @param _data    Additional data with no specified format, MUST be sent unaltered in call to `onERC1155Received` on `_to`
    */
    function safeTransferFrom(address _from, address _to, uint256 _id, uint256 _value, bytes calldata _data) external {

        require(_to != address(0x0), "_to must be non-zero.");
        require(_from == msg.sender || operatorApproval[_from][msg.sender] == true, "Need operator approval for 3rd party transfers.");

        // SafeMath will throw with insuficient funds _from
        // or if _id is not valid (balance will be 0)
        balances[_id][_from] = balances[_id][_from].sub(_value);
        balances[_id][_to]   = _value.add(balances[_id][_to]);

        // MUST emit event
        emit TransferSingle(msg.sender, _from, _to, _id, _value);

        // Now that the balance is updated and the event was emitted,
        // call onERC1155Received if the destination is a contract.
        if (_to.isContract()) {
            _doSafeTransferAcceptanceCheck(msg.sender, _from, _to, _id, _value, _data);
        }
    }

    /**
        @notice Transfers `_values` amount(s) of `_ids` from the `_from` address to the `_to` address specified (with safety call).
        @dev Caller must be approved to manage the tokens being transferred out of the `_from` account (see "Approval" section of the standard).
        MUST revert if `_to` is the zero address.
        MUST revert if length of `_ids` is not the same as length of `_values`.
        MUST revert if any of the balance(s) of the holder(s) for token(s) in `_ids` is lower than the respective amount(s) in `_values` sent to the recipient.
        MUST revert on any other error.
        MUST emit `TransferSingle` or `TransferBatch` event(s) such that all the balance changes are reflected (see "Safe Transfer Rules" section of the standard).
        Balance changes and events MUST follow the ordering of the arrays (_ids[0]/_values[0] before _ids[1]/_values[1], etc).
        After the above conditions for the transfer(s) in the batch are met, this function MUST check if `_to` is a smart contract (e.g. code size > 0). If so, it MUST call the relevant `ERC1155TokenReceiver` hook(s) on `_to` and act appropriately (see "Safe Transfer Rules" section of the standard).
        @param _from    Source address
        @param _to      Target address
        @param _ids     IDs of each token type (order and length must match _values array)
        @param _values  Transfer amounts per token type (order and length must match _ids array)
        @param _data    Additional data with no specified format, MUST be sent unaltered in call to the `ERC1155TokenReceiver` hook(s) on `_to`
    */
    function safeBatchTransferFrom(address _from, address _to, uint256[] calldata _ids, uint256[] calldata _values, bytes calldata _data) external {

        // MUST Throw on errors
        require(_to != address(0x0), "destination address must be non-zero.");
        require(_ids.length == _values.length, "_ids and _values array lenght must match.");
        require(_from == msg.sender || operatorApproval[_from][msg.sender] == true, "Need operator approval for 3rd party transfers.");

        for (uint256 i = 0; i < _ids.length; ++i) {
            uint256 id = _ids[i];
            uint256 value = _values[i];

            // SafeMath will throw with insuficient funds _from
            // or if _id is not valid (balance will be 0)
            balances[id][_from] = balances[id][_from].sub(value);
            balances[id][_to]   = value.add(balances[id][_to]);
        }

        // Note: instead of the below batch versions of event and acceptance check you MAY have emitted a TransferSingle
        // event and a subsequent call to _doSafeTransferAcceptanceCheck in above loop for each balance change instead.
        // Or emitted a TransferSingle event for each in the loop and then the single _doSafeBatchTransferAcceptanceCheck below.
        // However it is implemented the balance changes and events MUST match when a check (i.e. calling an external contract) is done.

        // MUST emit event
        emit TransferBatch(msg.sender, _from, _to, _ids, _values);

        // Now that the balances are updated and the events are emitted,
        // call onERC1155BatchReceived if the destination is a contract.
        if (_to.isContract()) {
            _doSafeBatchTransferAcceptanceCheck(msg.sender, _from, _to, _ids, _values, _data);
        }
    }

    /**
        @notice Get the balance of an account's Tokens.
        @param _owner  The address of the token holder
        @param _id     ID of the Token
        @return        The _owner's balance of the Token type requested
     */
    function balanceOf(address _owner, uint256 _id) external view returns (uint256) {
        // The balance of any account can be calculated from the Transfer events history.
        // However, since we need to keep the balances to validate transfer request,
        // there is no extra cost to also privide a querry function.
        return balances[_id][_owner];
    }


    /**
        @notice Get the balance of multiple account/token pairs
        @param _owners The addresses of the token holders
        @param _ids    ID of the Tokens
        @return        The _owner's balance of the Token types requested (i.e. balance for each (owner, id) pair)
     */
    function balanceOfBatch(address[] calldata _owners, uint256[] calldata _ids) external view returns (uint256[] memory) {

        require(_owners.length == _ids.length);

        uint256[] memory balances_ = new uint256[](_owners.length);

        for (uint256 i = 0; i < _owners.length; ++i) {
            balances_[i] = balances[_ids[i]][_owners[i]];
        }

        return balances_;
    }

    /**
        @notice Enable or disable approval for a third party ("operator") to manage all of the caller's tokens.
        @dev MUST emit the ApprovalForAll event on success.
        @param _operator  Address to add to the set of authorized operators
        @param _approved  True if the operator is approved, false to revoke approval
    */
    function setApprovalForAll(address _operator, bool _approved) external {
        operatorApproval[msg.sender][_operator] = _approved;
        emit ApprovalForAll(msg.sender, _operator, _approved);
    }

    /**
        @notice Queries the approval status of an operator for a given owner.
        @param _owner     The owner of the Tokens
        @param _operator  Address of authorized operator
        @return           True if the operator is approved, false if not
    */
    function isApprovedForAll(address _owner, address _operator) external view returns (bool) {
        return operatorApproval[_owner][_operator];
    }

/////////////////////////////////////////// Internal //////////////////////////////////////////////

    function _doSafeTransferAcceptanceCheck(address _operator, address _from, address _to, uint256 _id, uint256 _value, bytes memory _data) internal {

        // If this was a hybrid standards solution you would have to check ERC165(_to).supportsInterface(0x4e2312e0) here but as this is a pure implementation of an ERC-1155 token set as recommended by
        // the standard, it is not necessary. The below should revert in all failure cases i.e. _to isn't a receiver, or it is and either returns an unknown value or it reverts in the call to indicate non-acceptance.


        // Note: if the below reverts in the onERC1155Received function of the _to address you will have an undefined revert reason returned rather than the one in the require test.
        // If you want predictable revert reasons consider using low level _to.call() style instead so the revert does not bubble up and you can revert yourself on the ERC1155_ACCEPTED test.
        require(ERC1155TokenReceiver(_to).onERC1155Received(_operator, _from, _id, _value, _data) == ERC1155_ACCEPTED, "contract returned an unknown value from onERC1155Received");
    }

    function _doSafeBatchTransferAcceptanceCheck(address _operator, address _from, address _to, uint256[] memory _ids, uint256[] memory _values, bytes memory _data) internal {

        // If this was a hybrid standards solution you would have to check ERC165(_to).supportsInterface(0x4e2312e0) here but as this is a pure implementation of an ERC-1155 token set as recommended by
        // the standard, it is not necessary. The below should revert in all failure cases i.e. _to isn't a receiver, or it is and either returns an unknown value or it reverts in the call to indicate non-acceptance.

        // Note: if the below reverts in the onERC1155BatchReceived function of the _to address you will have an undefined revert reason returned rather than the one in the require test.
        // If you want predictable revert reasons consider using low level _to.call() style instead so the revert does not bubble up and you can revert yourself on the ERC1155_BATCH_ACCEPTED test.
        require(ERC1155TokenReceiver(_to).onERC1155BatchReceived(_operator, _from, _ids, _values, _data) == ERC1155_BATCH_ACCEPTED, "contract returned an unknown value from onERC1155BatchReceived");
    }
}

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;
    }

    function getAddress(bytes memory generatedBytes, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {
        bytes memory msgBytes = generatedBytes;
        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);
    }
}

contract HasContractURI is ERC165 {

    string public contractURI;

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

    constructor(string memory _contractURI) public {
        contractURI = _contractURI;
        _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;

    constructor(string memory _tokenURIPrefix) public {
        tokenURIPrefix = _tokenURIPrefix;
    }

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

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

/**
    Note: The ERC-165 identifier for this interface is 0x0e89341c.
*/
interface IERC1155Metadata_URI {
    /**
        @notice A distinct Uniform Resource Identifier (URI) for a given token.
        @dev URIs are defined in RFC 3986.
        The URI may point to a JSON file that conforms to the "ERC-1155 Metadata URI JSON Schema".
        @return URI string
    */
    function uri(uint256 _id) external view returns (string memory);
}

/**
    Note: The ERC-165 identifier for this interface is 0x0e89341c.
*/
contract ERC1155Metadata_URI is IERC1155Metadata_URI, HasTokenURI {

    constructor(string memory _tokenURIPrefix) HasTokenURI(_tokenURIPrefix) public {

    }

    function uri(uint256 _id) external view returns (string memory) {
        return _tokenURI(_id);
    }
}

contract HasSecondarySaleFees is ERC165 {

    event SecondarySaleFees(uint256 tokenId, address[] recipients, uint[] bps);

    /*
     * bytes4(keccak256('getFeeBps(uint256)')) == 0x0ebd4c7f
     * bytes4(keccak256('getFeeRecipients(uint256)')) == 0xb9c4d9fb
     *
     * => 0x0ebd4c7f ^ 0xb9c4d9fb == 0xb7799584
     */
    bytes4 private constant _INTERFACE_ID_FEES = 0xb7799584;

    constructor() public {
        _registerInterface(_INTERFACE_ID_FEES);
    }

    function getFeeRecipients(uint256 id) public view returns (address payable[] memory);
    function getFeeBps(uint256 id) public view returns (uint[] memory);
}

contract ERC1155Base is HasSecondarySaleFees, Ownable, ERC1155Metadata_URI, HasContractURI, ERC1155 {

    struct Fee {
        address payable recipient;
        uint256 value;
    }

    // id => creator
    mapping (uint256 => address) public creators;
    // id => fees
    mapping (uint256 => Fee[]) public fees;

    constructor(string memory contractURI, string memory tokenURIPrefix) HasContractURI(contractURI) ERC1155Metadata_URI(tokenURIPrefix) public {

    }

    function getFeeRecipients(uint256 id) public view returns (address payable[] memory) {
        Fee[] memory _fees = fees[id];
        address payable[] memory result = new address payable[](_fees.length);
        for (uint i = 0; i < _fees.length; i++) {
            result[i] = _fees[i].recipient;
        }
        return result;
    }

    function getFeeBps(uint256 id) public view returns (uint[] memory) {
        Fee[] memory _fees = fees[id];
        uint[] memory result = new uint[](_fees.length);
        for (uint i = 0; i < _fees.length; i++) {
            result[i] = _fees[i].value;
        }
        return result;
    }

    // Creates a new token type and assings _initialSupply to minter
    function _mint(uint256 _id, Fee[] memory _fees, uint256 _supply, string memory _uri) internal {
        require(creators[_id] == address(0x0), "Token is already minted");
        require(_supply != 0, "Supply should be positive");
        require(bytes(_uri).length > 0, "uri should be set");

        creators[_id] = msg.sender;
        address[] memory recipients = new address[](_fees.length);
        uint[] memory bps = new uint[](_fees.length);
        for (uint i = 0; i < _fees.length; i++) {
            require(_fees[i].recipient != address(0x0), "Recipient should be present");
            require(_fees[i].value != 0, "Fee value should be positive");
            fees[_id].push(_fees[i]);
            recipients[i] = _fees[i].recipient;
            bps[i] = _fees[i].value;
        }
        if (_fees.length > 0) {
            emit SecondarySaleFees(_id, recipients, bps);
        }
        balances[_id][msg.sender] = _supply;
        _setTokenURI(_id, _uri);

        // Transfer event with mint semantic
        emit TransferSingle(msg.sender, address(0x0), msg.sender, _id, _supply);
        emit URI(_uri, _id);
    }

    function burn(address _owner, uint256 _id, uint256 _value) external {

        require(_owner == msg.sender || operatorApproval[_owner][msg.sender] == true, "Need operator approval for 3rd party burns.");

        // SafeMath will throw with insuficient funds _owner
        // or if _id is not valid (balance will be 0)
        balances[_id][_owner] = balances[_id][_owner].sub(_value);

        // MUST emit event
        emit TransferSingle(msg.sender, _owner, address(0x0), _id, _value);
    }

    /**
     * @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(creators[tokenId] != address(0x0), "_setTokenURI: Token should exist");
        super._setTokenURI(tokenId, uri);
    }

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

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

/**
 * @title Roles
 * @dev Library for managing addresses assigned to a Role.
 */
library Roles {
    struct Role {
        mapping (address => bool) bearer;
    }

    /**
     * @dev Give an account access to this role.
     */
    function add(Role storage role, address account) internal {
        require(!has(role, account), "Roles: account already has role");
        role.bearer[account] = true;
    }

    /**
     * @dev Remove an account's access to this role.
     */
    function remove(Role storage role, address account) internal {
        require(has(role, account), "Roles: account does not have role");
        role.bearer[account] = false;
    }

    /**
     * @dev Check if an account has this role.
     * @return bool
     */
    function has(Role storage role, address account) internal view returns (bool) {
        require(account != address(0), "Roles: account is the zero address");
        return role.bearer[account];
    }
}

contract SignerRole is Context {
    using Roles for Roles.Role;

    event SignerAdded(address indexed account);
    event SignerRemoved(address indexed account);

    Roles.Role private _signers;

    constructor () internal {
        _addSigner(_msgSender());
    }

    modifier onlySigner() {
        require(isSigner(_msgSender()), "SignerRole: caller does not have the Signer role");
        _;
    }

    function isSigner(address account) public view returns (bool) {
        return _signers.has(account);
    }

    function addSigner(address account) public onlySigner {
        _addSigner(account);
    }

    function renounceSigner() public {
        _removeSigner(_msgSender());
    }

    function _addSigner(address account) internal {
        _signers.add(account);
        emit SignerAdded(account);
    }

    function _removeSigner(address account) internal {
        _signers.remove(account);
        emit SignerRemoved(account);
    }
}






contract RarestToken is Ownable, SignerRole, ERC1155Base {
    string public name;
    string public symbol;

    constructor(string memory _name, string memory _symbol, address signer, string memory contractURI, string memory tokenURIPrefix) ERC1155Base(contractURI, tokenURIPrefix) public {
        name = _name;
        symbol = _symbol;

        _addSigner(signer);
        _registerInterface(bytes4(keccak256('MINT_WITH_ADDRESS')));
    }

    function addSigner(address account) public onlyOwner {
        _addSigner(account);
    }

    function removeSigner(address account) public onlyOwner {
        _removeSigner(account);
    }

    function mint(uint256 id, uint8 v, bytes32 r, bytes32 s, Fee[] memory fees, uint256 supply, string memory uri) public {
        require(isSigner(StringLibrary.getAddress(abi.encodePacked(this, id), v, r, s)), "signer should sign tokenId");
        _mint(id, fees, supply, uri);
    }
}



contract RarestUserToken is RarestToken {
    event CreateERC1155_v1(address indexed creator, string name, string symbol);

    constructor(string memory name, string memory symbol, string memory contractURI, string memory tokenURIPrefix, address signer) RarestToken(name, symbol, signer, contractURI, tokenURIPrefix) public {
        emit CreateERC1155_v1(msg.sender, name, symbol);
    }

    function mint(uint256 id, uint8 v, bytes32 r, bytes32 s, Fee[] memory fees, uint256 supply, string memory uri) onlyOwner public {
        super.mint(id, v, r, s, fees, supply, uri);
    }
}

Contract ABI

[{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"string","name":"contractURI","type":"string"},{"internalType":"string","name":"tokenURIPrefix","type":"string"},{"internalType":"address","name":"signer","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_owner","type":"address"},{"indexed":true,"internalType":"address","name":"_operator","type":"address"},{"indexed":false,"internalType":"bool","name":"_approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"creator","type":"address"},{"indexed":false,"internalType":"string","name":"name","type":"string"},{"indexed":false,"internalType":"string","name":"symbol","type":"string"}],"name":"CreateERC1155_v1","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"address[]","name":"recipients","type":"address[]"},{"indexed":false,"internalType":"uint256[]","name":"bps","type":"uint256[]"}],"name":"SecondarySaleFees","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"}],"name":"SignerAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"}],"name":"SignerRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_operator","type":"address"},{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"_ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"_values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_operator","type":"address"},{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":false,"internalType":"uint256","name":"_id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"_value","type":"string"},{"indexed":true,"internalType":"uint256","name":"_id","type":"uint256"}],"name":"URI","type":"event"},{"constant":false,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"addSigner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address[]","name":"_owners","type":"address[]"},{"internalType":"uint256[]","name":"_ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"burn","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"creators","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"fees","outputs":[{"internalType":"address payable","name":"recipient","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getFeeBps","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getFeeRecipients","outputs":[{"internalType":"address payable[]","name":"","type":"address[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isSigner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"},{"components":[{"internalType":"address payable","name":"recipient","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"internalType":"struct ERC1155Base.Fee[]","name":"fees","type":"tuple[]"},{"internalType":"uint256","name":"supply","type":"uint256"},{"internalType":"string","name":"uri","type":"string"}],"name":"mint","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"removeSigner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"renounceSigner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256[]","name":"_ids","type":"uint256[]"},{"internalType":"uint256[]","name":"_values","type":"uint256[]"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"uint256","name":"_value","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_operator","type":"address"},{"internalType":"bool","name":"_approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"string","name":"contractURI","type":"string"}],"name":"setContractURI","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"string","name":"tokenURIPrefix","type":"string"}],"name":"setTokenURIPrefix","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"tokenURIPrefix","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"}]

60806040523480156200001157600080fd5b506040516200399738038062003997833981016040819052620000349162000489565b84848285858181818180620000596301ffc9a760e01b6001600160e01b036200022316565b62000074632dde656160e21b6001600160e01b036200022316565b6000620000896001600160e01b036200027e16565b600180546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350620000fd620000ee6001600160e01b036200027e16565b6001600160e01b036200028316565b8051620001129060039060208401906200037e565b505081516200012a915060059060208401906200037e565b506200014663e8a3d48560e01b6001600160e01b036200022316565b5062000162636cdb3d1360e11b6001600160e01b036200022316565b505084516200017990600a9060208801906200037e565b5083516200018f90600b9060208701906200037e565b50620001a4836001600160e01b036200028316565b620001ce604051620001b69062000693565b6040519081900390206001600160e01b036200022316565b5050505050336001600160a01b03167f658fd9a983a35f4a0bb697abb2c6971d688010d8bc264928a164ae391b87472c868660405162000210929190620006a0565b60405180910390a25050505050620007d1565b6001600160e01b03198082161415620002595760405162461bcd60e51b81526004016200025090620006e3565b60405180910390fd5b6001600160e01b0319166000908152602081905260409020805460ff19166001179055565b335b90565b6200029e816002620002d560201b62001b781790919060201c565b6040516001600160a01b038216907f47d1c22a25bb3a5d4e481b9b1e6944c2eade3181a0a20b495ed61d35b5323f2490600090a250565b620002ea82826001600160e01b036200032f16565b156200030a5760405162461bcd60e51b81526004016200025090620006d1565b6001600160a01b0316600090815260209190915260409020805460ff19166001179055565b60006001600160a01b0382166200035a5760405162461bcd60e51b81526004016200025090620006f5565b506001600160a01b03811660009081526020839052604090205460ff165b92915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620003c157805160ff1916838001178555620003f1565b82800160010185558215620003f1579182015b82811115620003f1578251825591602001919060010190620003d4565b50620003ff92915062000403565b5090565b6200028091905b80821115620003ff57600081556001016200040a565b80516200037881620007b7565b600082601f8301126200043f57600080fd5b81516200045662000450826200072e565b62000707565b915080825260208301602083018583830111156200047357600080fd5b620004808382846200077a565b50505092915050565b600080600080600060a08688031215620004a257600080fd5b85516001600160401b03811115620004b957600080fd5b620004c7888289016200042d565b95505060208601516001600160401b03811115620004e457600080fd5b620004f2888289016200042d565b94505060408601516001600160401b038111156200050f57600080fd5b6200051d888289016200042d565b93505060608601516001600160401b038111156200053a57600080fd5b62000548888289016200042d565b92505060806200055b8882890162000420565b9150509295509295909350565b6000620005758262000756565b6200058181856200075a565b9350620005938185602086016200077a565b6200059e81620007ad565b9093019392505050565b6000620005b7601f836200075a565b7f526f6c65733a206163636f756e7420616c72656164792068617320726f6c6500815260200192915050565b6000620005f2601c836200075a565b7f4552433136353a20696e76616c696420696e7465726661636520696400000000815260200192915050565b60006200062d6022836200075a565b7f526f6c65733a206163636f756e7420697320746865207a65726f206164647265815261737360f01b602082015260400192915050565b60006200067360118362000763565b704d494e545f574954485f4144445245535360781b815260110192915050565b6000620003788262000664565b60408082528101620006b3818562000568565b90508181036020830152620006c9818462000568565b949350505050565b602080825281016200037881620005a8565b602080825281016200037881620005e3565b6020808252810162000378816200061e565b6040518181016001600160401b03811182821017156200072657600080fd5b604052919050565b60006001600160401b038211156200074557600080fd5b506020601f91909101601f19160190565b5190565b90815260200190565b919050565b60006001600160a01b03821662000378565b60005b83811015620007975781810151838201526020016200077d565b83811115620007a7576000848401525b50505050565b601f01601f191690565b620007c28162000768565b8114620007ce57600080fd5b50565b6131b680620007e16000396000f3fe608060405234801561001057600080fd5b50600436106101c35760003560e01c806395d89b41116100f9578063e5c8b03d11610097578063eb12d61e11610071578063eb12d61e1461039f578063f242432a146103b2578063f2fde38b146103c5578063f5298aca146103d8576101c3565b8063e5c8b03d1461037c578063e8a3d48514610384578063e985e9c51461038c576101c3565b8063b9c4d9fb116100d3578063b9c4d9fb1461032e578063c0ac99831461034e578063c6bf326214610356578063cd53d08e14610369576101c3565b806395d89b411461030057806399e0dd7c14610308578063a22cb4651461031b576101c3565b80634e1273f4116101665780637df73e27116101405780637df73e27146102bd5780638da5cb5b146102d05780638f32d59b146102e5578063938e3d7b146102ed576101c3565b80634e1273f4146102815780636308f1cd14610294578063715018a6146102b5576101c3565b80630e316ab7116101a25780630e316ab7146102265780630e89341c1461023b5780630ebd4c7f1461024e5780632eb2c2d61461026e576101c3565b8062fdd58e146101c857806301ffc9a7146101f157806306fdde0314610211575b600080fd5b6101db6101d63660046123e0565b6103eb565b6040516101e89190612fd4565b60405180910390f35b6102046101ff3660046124cb565b610415565b6040516101e89190612e47565b610219610438565b6040516101e89190612e93565b610239610234366004612202565b6104c6565b005b61021961024936600461253b565b6104ff565b61026161025c36600461253b565b61050a565b6040516101e89190612e36565b61023961027c36600461225a565b6105fd565b61026161028f36600461245d565b6108f3565b6102a76102a2366004612559565b6109cd565b6040516101e8929190612d2b565b610239610a10565b6102046102cb366004612202565b610a7e565b6102d8610a91565b6040516101e89190612d1d565b610204610aa1565b6102396102fb366004612507565b610ac7565b610219610af4565b610239610316366004612507565b610b4f565b6102396103293660046123b0565b610b7c565b61034161033c36600461253b565b610beb565b6040516101e89190612df4565b610219610ce3565b610239610364366004612578565b610d3e565b6102d861037736600461253b565b610d7a565b610239610d95565b610219610da7565b61020461039a366004612220565b610e02565b6102396103ad366004612202565b610e30565b6102396103c0366004612321565b610e5d565b6102396103d3366004612202565b611017565b6102396103e6366004612410565b611044565b60008181526006602090815260408083206001600160a01b03861684529091529020545b92915050565b6001600160e01b0319811660009081526020819052604090205460ff165b919050565b600a805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156104be5780601f10610493576101008083540402835291602001916104be565b820191906000526020600020905b8154815290600101906020018083116104a157829003601f168201915b505050505081565b6104ce610aa1565b6104f35760405162461bcd60e51b81526004016104ea90612f34565b60405180910390fd5b6104fc8161113c565b50565b606061040f82611184565b60008181526009602090815260408083208054825181850281018501909352808352606094859484015b8282101561057c576000848152602090819020604080518082019091526002850290910180546001600160a01b03168252600190810154828401529083529092019101610534565b505050509050606081516040519080825280602002602001820160405280156105af578160200160208202803883390190505b50905060005b82518110156105f5578281815181106105ca57fe5b6020026020010151602001518282815181106105e257fe5b60209081029190910101526001016105b5565b509392505050565b6001600160a01b0387166106235760405162461bcd60e51b81526004016104ea90612ee4565b8483146106425760405162461bcd60e51b81526004016104ea90612f74565b6001600160a01b03881633148061068157506001600160a01b038816600090815260076020908152604080832033845290915290205460ff1615156001145b61069d5760405162461bcd60e51b81526004016104ea90612f14565b60005b858110156107d25760008787838181106106b657fe5b90506020020135905060008686848181106106cd57fe5b90506020020135905061071f816006600085815260200190815260200160002060008e6001600160a01b03166001600160a01b03168152602001908152602001600020546112bf90919063ffffffff16565b6006600084815260200190815260200160002060008d6001600160a01b03166001600160a01b03168152602001908152602001600020819055506107a26006600084815260200190815260200160002060008c6001600160a01b03166001600160a01b0316815260200190815260200160002054826112d190919063ffffffff16565b60009283526006602090815260408085206001600160a01b038e16865290915290922091909155506001016106a0565b50866001600160a01b0316886001600160a01b0316336001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb898989896040516108269493929190612e05565b60405180910390a4610840876001600160a01b03166112de565b156108e9576108e933898989898080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808d0282810182019093528c82529093508c92508b91829185019084908082843760009201919091525050604080516020601f8c018190048102820181019092528a815292508a915089908190840183828082843760009201919091525061131a92505050565b5050505050505050565b606083821461090157600080fd5b60408051858152602080870282010190915260609085801561092d578160200160208202803883390190505b50905060005b858110156109c3576006600086868481811061094b57fe5b905060200201358152602001908152602001600020600088888481811061096e57fe5b90506020020160206109839190810190612202565b6001600160a01b03166001600160a01b03168152602001908152602001600020548282815181106109b057fe5b6020908102919091010152600101610933565b5095945050505050565b600960205281600052604060002081815481106109e657fe5b6000918252602090912060029091020180546001909101546001600160a01b039091169250905082565b610a18610aa1565b610a345760405162461bcd60e51b81526004016104ea90612f34565b6001546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600180546001600160a01b0319169055565b600061040f60028363ffffffff6113c916565b6001546001600160a01b03165b90565b6001546000906001600160a01b0316610ab8611411565b6001600160a01b031614905090565b610acf610aa1565b610aeb5760405162461bcd60e51b81526004016104ea90612f34565b6104fc81611415565b600b805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156104be5780601f10610493576101008083540402835291602001916104be565b610b57610aa1565b610b735760405162461bcd60e51b81526004016104ea90612f34565b6104fc8161142c565b3360008181526007602090815260408083206001600160a01b038716808552925291829020805460ff191685151517905590519091907f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3190610bdf908590612e47565b60405180910390a35050565b60008181526009602090815260408083208054825181850281018501909352808352606094859484015b82821015610c5d576000848152602090819020604080518082019091526002850290910180546001600160a01b03168252600190810154828401529083529092019101610c15565b50505050905060608151604051908082528060200260200182016040528015610c90578160200160208202803883390190505b50905060005b82518110156105f557828181518110610cab57fe5b602002602001015160000151828281518110610cc357fe5b6001600160a01b0390921660209283029190910190910152600101610c96565b6003805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156104be5780601f10610493576101008083540402835291602001916104be565b610d46610aa1565b610d625760405162461bcd60e51b81526004016104ea90612f34565b610d718787878787878761143f565b50505050505050565b6008602052600090815260409020546001600160a01b031681565b610da5610da0611411565b61113c565b565b6005805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156104be5780601f10610493576101008083540402835291602001916104be565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b610e38610aa1565b610e545760405162461bcd60e51b81526004016104ea90612f34565b6104fc81611497565b6001600160a01b038516610e835760405162461bcd60e51b81526004016104ea90612fa4565b6001600160a01b038616331480610ec257506001600160a01b038616600090815260076020908152604080832033845290915290205460ff1615156001145b610ede5760405162461bcd60e51b81526004016104ea90612f14565b60008481526006602090815260408083206001600160a01b038a168452909152902054610f11908463ffffffff6112bf16565b60008581526006602090815260408083206001600160a01b038b81168552925280832093909355871681522054610f499084906112d1565b60008581526006602090815260408083206001600160a01b03808b168086529190935292819020939093559151909188169033907fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6290610fac9089908990613016565b60405180910390a4610fc6856001600160a01b03166112de565b1561100f5761100f338787878787878080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506114df92505050565b505050505050565b61101f610aa1565b61103b5760405162461bcd60e51b81526004016104ea90612f34565b6104fc8161158e565b6001600160a01b03831633148061108357506001600160a01b038316600090815260076020908152604080832033845290915290205460ff1615156001145b61109f5760405162461bcd60e51b81526004016104ea90612f04565b60008281526006602090815260408083206001600160a01b03871684529091529020546110d2908263ffffffff6112bf16565b60008381526006602090815260408083206001600160a01b038816808552925280832093909355915190919033907fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f629061112f9087908790613016565b60405180910390a4505050565b61114d60028263ffffffff61161016565b6040516001600160a01b038216907f3525e22824a8a7df2c9a6029941c824cf95b6447f1e13d5128fd3826d35afe8b90600090a250565b6000818152600460209081526040918290208054835160026001831615610100026000190190921691909104601f810184900484028201840190945283815260609361040f9391929183018282801561121e5780601f106111f35761010080835404028352916020019161121e565b820191906000526020600020905b81548152906001019060200180831161120157829003601f168201915b505060038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152955091935091508301828280156112ac5780601f10611281576101008083540402835291602001916112ac565b820191906000526020600020905b81548152906001019060200180831161128f57829003601f168201915b505050505061165890919063ffffffff16565b6000828211156112cb57fe5b50900390565b8181018281101561040f57fe5b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081811480159061131257508115155b949350505050565b60405163bc197c8160e01b808252906001600160a01b0386169063bc197c8190611350908a908a90899089908990600401612d4d565b602060405180830381600087803b15801561136a57600080fd5b505af115801561137e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506113a291908101906124e9565b6001600160e01b0319161461100f5760405162461bcd60e51b81526004016104ea90612f24565b60006001600160a01b0382166113f15760405162461bcd60e51b81526004016104ea90612f44565b506001600160a01b03166000908152602091909152604090205460ff1690565b3390565b8051611428906005906020840190611f88565b5050565b8051611428906003906020840190611f88565b61146f6102cb3089604051602001611458929190612cf7565b60405160208183030381529060405288888861174d565b61148b5760405162461bcd60e51b81526004016104ea90612fb4565b610d718784848461182a565b6114a860028263ffffffff611b7816565b6040516001600160a01b038216907f47d1c22a25bb3a5d4e481b9b1e6944c2eade3181a0a20b495ed61d35b5323f2490600090a250565b60405163f23a6e6160e01b808252906001600160a01b0386169063f23a6e6190611515908a908a90899089908990600401612dad565b602060405180830381600087803b15801561152f57600080fd5b505af1158015611543573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061156791908101906124e9565b6001600160e01b0319161461100f5760405162461bcd60e51b81526004016104ea90612f94565b6001600160a01b0381166115b45760405162461bcd60e51b81526004016104ea90612ec4565b6001546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b61161a82826113c9565b6116365760405162461bcd60e51b81526004016104ea90612ef4565b6001600160a01b0316600090815260209190915260409020805460ff19169055565b6060808390506060839050606081518351016040519080825280601f01601f191660200182016040528015611694576020820181803883390190505b5090506000805b84518110156116ec578481815181106116b057fe5b602001015160f81c60f81b8383806001019450815181106116cd57fe5b60200101906001600160f81b031916908160001a90535060010161169b565b5060005b83518110156117415783818151811061170557fe5b602001015160f81c60f81b83838060010194508151811061172257fe5b60200101906001600160f81b031916908160001a9053506001016116f0565b50909695505050505050565b6000606085905060606117c66040518060400160405280601a81526020017f19457468657265756d205369676e6564204d6573736167653a0a0000000000008152506117998451611bc4565b60408051600080825260208201818152828401828152606084019283526080840190945288939091611c85565b905060018180519060200120878787604051600081526020016040526040516117f29493929190612e55565b6020604051602081039080840390855afa158015611814573d6000803e3d6000fd5b5050604051601f19015198975050505050505050565b6000848152600860205260409020546001600160a01b03161561185f5760405162461bcd60e51b81526004016104ea90612f54565b8161187c5760405162461bcd60e51b81526004016104ea90612f64565b600081511161189d5760405162461bcd60e51b81526004016104ea90612fc4565b60008481526008602090815260409182902080546001600160a01b0319163317905584518251818152818302810190920190925260609180156118ea578160200160208202803883390190505b5090506060845160405190808252806020026020018201604052801561191a578160200160208202803883390190505b50905060005b8551811015611a8d5760006001600160a01b031686828151811061194057fe5b6020026020010151600001516001600160a01b031614156119735760405162461bcd60e51b81526004016104ea90612f84565b85818151811061197f57fe5b602002602001015160200151600014156119ab5760405162461bcd60e51b81526004016104ea90612ea4565b600087815260096020526040902086518790839081106119c757fe5b602090810291909101810151825460018082018555600094855293839020825160029092020180546001600160a01b0319166001600160a01b039092169190911781559101519101558551869082908110611a1e57fe5b602002602001015160000151838281518110611a3657fe5b60200260200101906001600160a01b031690816001600160a01b031681525050858181518110611a6257fe5b602002602001015160200151828281518110611a7a57fe5b6020908102919091010152600101611920565b50845115611ad1577f99aba1d63749cfd5ad1afda7c4663840924d54eb5f005bbbeadedc6ec13674b2868383604051611ac893929190612fe2565b60405180910390a15b60008681526006602090815260408083203384529091529020849055611af78684611f2b565b604051339060009082907fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6290611b30908b908a90613016565b60405180910390a4857f6bb7ff708619ba0610cba295a58592e0451dee2622938c8755667688daf3529b84604051611b689190612e93565b60405180910390a2505050505050565b611b8282826113c9565b15611b9f5760405162461bcd60e51b81526004016104ea90612eb4565b6001600160a01b0316600090815260209190915260409020805460ff19166001179055565b606081611be957506040805180820190915260018152600360fc1b6020820152610433565b8160005b8115611c0157600101600a82049150611bed565b6060816040519080825280601f01601f191660200182016040528015611c2e576020820181803883390190505b50905060001982015b8515611c7c57600a860660300160f81b82828060019003935081518110611c5a57fe5b60200101906001600160f81b031916908160001a905350600a86049550611c37565b50949350505050565b60608082518451865188518a518c518e510101010101016040519080825280601f01601f191660200182016040528015611cc6576020820181803883390190505b5090506000805b8a51811015611d1e578a8181518110611ce257fe5b602001015160f81c60f81b838380600101945081518110611cff57fe5b60200101906001600160f81b031916908160001a905350600101611ccd565b5060005b8951811015611d7357898181518110611d3757fe5b602001015160f81c60f81b838380600101945081518110611d5457fe5b60200101906001600160f81b031916908160001a905350600101611d22565b5060005b8851811015611dc857888181518110611d8c57fe5b602001015160f81c60f81b838380600101945081518110611da957fe5b60200101906001600160f81b031916908160001a905350600101611d77565b5060005b8751811015611e1d57878181518110611de157fe5b602001015160f81c60f81b838380600101945081518110611dfe57fe5b60200101906001600160f81b031916908160001a905350600101611dcc565b5060005b8651811015611e7257868181518110611e3657fe5b602001015160f81c60f81b838380600101945081518110611e5357fe5b60200101906001600160f81b031916908160001a905350600101611e21565b5060005b8551811015611ec757858181518110611e8b57fe5b602001015160f81c60f81b838380600101945081518110611ea857fe5b60200101906001600160f81b031916908160001a905350600101611e76565b5060005b8451811015611f1c57848181518110611ee057fe5b602001015160f81c60f81b838380600101945081518110611efd57fe5b60200101906001600160f81b031916908160001a905350600101611ecb565b50909998505050505050505050565b6000828152600860205260409020546001600160a01b0316611f5f5760405162461bcd60e51b81526004016104ea90612ed4565b611428828260008281526004602090815260409091208251611f8392840190611f88565b505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10611fc957805160ff1916838001178555611ff6565b82800160010185558215611ff6579182015b82811115611ff6578251825591602001919060010190611fdb565b50612002929150612006565b5090565b610a9e91905b80821115612002576000815560010161200c565b803561040f8161313b565b60008083601f84011261203d57600080fd5b5081356001600160401b0381111561205457600080fd5b60208301915083602082028301111561206c57600080fd5b9250929050565b600082601f83011261208457600080fd5b81356120976120928261304a565b613024565b915081818352602084019350602081019050838560408402820111156120bc57600080fd5b60005b838110156120ea57816120d288826121b0565b845250602090920191604091909101906001016120bf565b5050505092915050565b803561040f8161314f565b803561040f81613158565b803561040f81613161565b805161040f81613161565b60008083601f84011261213257600080fd5b5081356001600160401b0381111561214957600080fd5b60208301915083600182028301111561206c57600080fd5b600082601f83011261217257600080fd5b81356121806120928261306a565b9150808252602083016020830185838301111561219c57600080fd5b6121a78382846130de565b50505092915050565b6000604082840312156121c257600080fd5b6121cc6040613024565b905060006121da8484612020565b82525060206121eb848483016120ff565b60208301525092915050565b803561040f8161316a565b60006020828403121561221457600080fd5b60006113128484612020565b6000806040838503121561223357600080fd5b600061223f8585612020565b925050602061225085828601612020565b9150509250929050565b60008060008060008060008060a0898b03121561227657600080fd5b60006122828b8b612020565b98505060206122938b828c01612020565b97505060408901356001600160401b038111156122af57600080fd5b6122bb8b828c0161202b565b965096505060608901356001600160401b038111156122d957600080fd5b6122e58b828c0161202b565b945094505060808901356001600160401b0381111561230357600080fd5b61230f8b828c01612120565b92509250509295985092959890939650565b60008060008060008060a0878903121561233a57600080fd5b60006123468989612020565b965050602061235789828a01612020565b955050604061236889828a016120ff565b945050606061237989828a016120ff565b93505060808701356001600160401b0381111561239557600080fd5b6123a189828a01612120565b92509250509295509295509295565b600080604083850312156123c357600080fd5b60006123cf8585612020565b9250506020612250858286016120f4565b600080604083850312156123f357600080fd5b60006123ff8585612020565b9250506020612250858286016120ff565b60008060006060848603121561242557600080fd5b60006124318686612020565b9350506020612442868287016120ff565b9250506040612453868287016120ff565b9150509250925092565b6000806000806040858703121561247357600080fd5b84356001600160401b0381111561248957600080fd5b6124958782880161202b565b945094505060208501356001600160401b038111156124b357600080fd5b6124bf8782880161202b565b95989497509550505050565b6000602082840312156124dd57600080fd5b6000611312848461210a565b6000602082840312156124fb57600080fd5b60006113128484612115565b60006020828403121561251957600080fd5b81356001600160401b0381111561252f57600080fd5b61131284828501612161565b60006020828403121561254d57600080fd5b600061131284846120ff565b6000806040838503121561256c57600080fd5b60006123ff85856120ff565b600080600080600080600060e0888a03121561259357600080fd5b600061259f8a8a6120ff565b97505060206125b08a828b016121f7565b96505060406125c18a828b016120ff565b95505060606125d28a828b016120ff565b94505060808801356001600160401b038111156125ee57600080fd5b6125fa8a828b01612073565b93505060a061260b8a828b016120ff565b92505060c08801356001600160401b0381111561262757600080fd5b6126338a828b01612161565b91505092959891949750929550565b600061264e8383612662565b505060200190565b600061264e83836127a8565b61266b816130a4565b82525050565b600061267c82613097565b612686818561309b565b935061269183613091565b8060005b838110156126bf5781516126a98882612642565b97506126b483613091565b925050600101612695565b509495945050505050565b60006126d582613097565b6126df818561309b565b93506126ea83613091565b8060005b838110156126bf5781516127028882612642565b975061270d83613091565b9250506001016126ee565b6000612724838561309b565b93506001600160fb1b0383111561273a57600080fd5b60208302925061274b8385846130de565b50500190565b600061275c82613097565b612766818561309b565b935061277183613091565b8060005b838110156126bf5781516127898882612656565b975061279483613091565b925050600101612775565b61266b816130af565b61266b81610a9e565b60006127bc82613097565b6127c6818561309b565b93506127d68185602086016130ea565b6127df8161312b565b9093019392505050565b61266b6127f5826130d3565b61311a565b6000612807601c8361309b565b7f4665652076616c75652073686f756c6420626520706f73697469766500000000815260200192915050565b6000612840601f8361309b565b7f526f6c65733a206163636f756e7420616c72656164792068617320726f6c6500815260200192915050565b600061287960268361309b565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206181526564647265737360d01b602082015260400192915050565b60006128c160208361309b565b7f5f736574546f6b656e5552493a20546f6b656e2073686f756c64206578697374815260200192915050565b60006128fa60258361309b565b7f64657374696e6174696f6e2061646472657373206d757374206265206e6f6e2d8152643d32b9379760d91b602082015260400192915050565b600061294160218361309b565b7f526f6c65733a206163636f756e7420646f6573206e6f74206861766520726f6c8152606560f81b602082015260400192915050565b6000612984602b8361309b565b7f4e656564206f70657261746f7220617070726f76616c20666f7220337264207081526a30b93a3c90313ab937399760a91b602082015260400192915050565b60006129d1602f8361309b565b7f4e656564206f70657261746f7220617070726f76616c20666f7220337264207081526e30b93a3c903a3930b739b332b9399760891b602082015260400192915050565b6000612a22603e8361309b565b7f636f6e74726163742072657475726e656420616e20756e6b6e6f776e2076616c81527f75652066726f6d206f6e45524331313535426174636852656365697665640000602082015260400192915050565b6000612a8160208361309b565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572815260200192915050565b6000612aba60228361309b565b7f526f6c65733a206163636f756e7420697320746865207a65726f206164647265815261737360f01b602082015260400192915050565b6000612afe60178361309b565b7f546f6b656e20697320616c7265616479206d696e746564000000000000000000815260200192915050565b6000612b3760198361309b565b7f537570706c792073686f756c6420626520706f73697469766500000000000000815260200192915050565b6000612b7060298361309b565b7f5f69647320616e64205f76616c756573206172726179206c656e676874206d7581526839ba1036b0ba31b41760b91b602082015260400192915050565b6000612bbb601b8361309b565b7f526563697069656e742073686f756c642062652070726573656e740000000000815260200192915050565b6000612bf460398361309b565b7f636f6e74726163742072657475726e656420616e20756e6b6e6f776e2076616c81527f75652066726f6d206f6e45524331313535526563656976656400000000000000602082015260400192915050565b6000612c5360158361309b565b742fba379036bab9ba103132903737b716bd32b9379760591b815260200192915050565b6000612c84601a8361309b565b7f7369676e65722073686f756c64207369676e20746f6b656e4964000000000000815260200192915050565b6000612cbd60118361309b565b701d5c9a481cda1bdd5b19081899481cd95d607a1b815260200192915050565b61266b612ce982610a9e565b610a9e565b61266b816130cd565b6000612d0382856127e9565b601482019150612d138284612cdd565b5060200192915050565b6020810161040f8284612662565b60408101612d398285612662565b612d4660208301846127a8565b9392505050565b60a08101612d5b8288612662565b612d686020830187612662565b8181036040830152612d7a8186612751565b90508181036060830152612d8e8185612751565b90508181036080830152612da281846127b1565b979650505050505050565b60a08101612dbb8288612662565b612dc86020830187612662565b612dd560408301866127a8565b612de260608301856127a8565b8181036080830152612da281846127b1565b60208082528101612d4681846126ca565b60408082528101612e17818688612718565b90508181036020830152612e2c818486612718565b9695505050505050565b60208082528101612d468184612751565b6020810161040f828461279f565b60808101612e6382876127a8565b612e706020830186612cee565b612e7d60408301856127a8565b612e8a60608301846127a8565b95945050505050565b60208082528101612d4681846127b1565b6020808252810161040f816127fa565b6020808252810161040f81612833565b6020808252810161040f8161286c565b6020808252810161040f816128b4565b6020808252810161040f816128ed565b6020808252810161040f81612934565b6020808252810161040f81612977565b6020808252810161040f816129c4565b6020808252810161040f81612a15565b6020808252810161040f81612a74565b6020808252810161040f81612aad565b6020808252810161040f81612af1565b6020808252810161040f81612b2a565b6020808252810161040f81612b63565b6020808252810161040f81612bae565b6020808252810161040f81612be7565b6020808252810161040f81612c46565b6020808252810161040f81612c77565b6020808252810161040f81612cb0565b6020810161040f82846127a8565b60608101612ff082866127a8565b81810360208301526130028185612671565b90508181036040830152612e8a8184612751565b60408101612d3982856127a8565b6040518181016001600160401b038111828210171561304257600080fd5b604052919050565b60006001600160401b0382111561306057600080fd5b5060209081020190565b60006001600160401b0382111561308057600080fd5b506020601f91909101601f19160190565b60200190565b5190565b90815260200190565b600061040f826130c1565b151590565b6001600160e01b03191690565b6001600160a01b031690565b60ff1690565b600061040f826130a4565b82818337506000910152565b60005b838110156131055781810151838201526020016130ed565b83811115613114576000848401525b50505050565b600061040f82600061040f82613135565b601f01601f191690565b60601b90565b613144816130a4565b81146104fc57600080fd5b613144816130af565b61314481610a9e565b613144816130b4565b613144816130cd56fea365627a7a723158201b135340312ee7bec69eead4564796b115983da6bc32b45c43782c365b08e8b46c6578706572696d656e74616cf564736f6c6343000511004000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000016000000000000000000000000089719871a8cb594ac43ca347d20a936dba20af9b0000000000000000000000000000000000000000000000000000000000000005534e4146550000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005534e41465500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000132f636f6e74726163742d6d657461646174612f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000001c68747470733a2f2f697066732e696e667572612e696f2f697066732f00000000

Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.