Token
Overview ERC-1155
Total Supply:
0 N/A
Holders:
3 addresses
Transfers:
-
Profile Summary
Contract:
[ Download CSV Export ]
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Similar Match Source Code
Note: This contract matches the deployed ByteCode of the Source Code for Contract 0xa78131D3c41C7459ac9366b6f962Fb09DC2Eaa5D
Contract Name:
ShopifyNftCollection
Compiler Version
v0.5.16+commit.9c3226ce
Optimization Enabled:
Yes with 5000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
pragma solidity ^0.5.0; import "./ERC1155.sol"; import "@openzeppelin/contracts/ownership/Ownable.sol"; import "./IERC1155Metadata.sol"; import "./IERC2981Royalties.sol"; /** @dev Mintable form of ERC1155 Shows how easy it is to mint new items. */ contract ShopifyNftCollection is ERC1155, ERC2981, Ownable, ERC1155Metadata_URI { bytes4 private constant INTERFACE_SIGNATURE_URI = 0x0e89341c; string _contractUri; string _baseUri; address private _manager; string _metadataSrc; constructor( string memory contractUri, string memory baseUri, address manager, address royaltyRecipient, uint256 royaltyValue, string memory metadataSrcIn ) public { _metadataSrc = metadataSrcIn; _contractUri = contractUri; _baseUri = baseUri; _manager = manager; if (royaltyValue > 0) { _setRoyalties(royaltyRecipient, royaltyValue); } } mapping(uint256 => address) public creators; mapping(uint256 => string) private _tokenURIs; uint256 public nonce; function setMetadataSrc(string calldata _uri) external ownerOrManager { _metadataSrc = _uri; } function metadataSrc() public view returns (string memory) { return _metadataSrc; } modifier creatorOnly(uint256 _id) { require(creators[_id] == msg.sender); _; } modifier ownerOrManager() { require( isOwner() || (msg.sender == _manager && _manager != address(0)) ); _; } function supportsInterface(bytes4 _interfaceId) public view returns (bool) { if (_interfaceId == INTERFACE_SIGNATURE_URI) { return true; } else { return super.supportsInterface(_interfaceId); } } function airdrop( address _from, uint256 id, address[] calldata _to ) external { require( _from == msg.sender || operatorApproval[_from][msg.sender] == true, "Need operator approval for 3rd party transfers." ); for (uint256 i = 0; i < _to.length; ++i) { address to = _to[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(1); balances[id][to] = balances[id][to].add(1); emit TransferSingle(msg.sender, _from, to, id, 1); } } function airdropMultiple( address _from, uint256[] calldata _ids, address[] calldata _to ) external { require( _from == msg.sender || operatorApproval[_from][msg.sender] == true, "Need operator approval for 3rd party transfers." ); for (uint256 i = 0; i < _to.length; ++i) { address to = _to[i]; uint256 id = _ids[i]; balances[id][_from] = balances[id][_from].sub(1); balances[id][to] = balances[id][to].add(1); emit TransferSingle(msg.sender, _from, to, id, 1); } } // Creates a new token type and assings _initialSupply to minter function create(uint256 _initialSupply, string calldata _uri) external ownerOrManager returns (uint256 _id) { _id = ++nonce; creators[_id] = msg.sender; balances[_id][msg.sender] = _initialSupply; emit TransferSingle( msg.sender, address(0x0), msg.sender, _id, _initialSupply ); if (bytes(_uri).length > 0) { _tokenURIs[_id] = _uri; emit URI(_uri, _id); } } function createBulk(uint256 _tokensCount) external ownerOrManager returns (uint256 firstTokenId) { firstTokenId = nonce + 1; uint256[] memory _ids = new uint256[](_tokensCount); uint256[] memory _values = new uint256[](_tokensCount); for (uint256 i = 0; i < _tokensCount; ++i) { uint256 _id = ++nonce; creators[_id] = msg.sender; balances[_id][msg.sender] = 1; _ids[i] = _id; _values[i] = 1; } emit TransferBatch(msg.sender, address(0x0), msg.sender, _ids, _values); } function mint( uint256 _id, address[] calldata _to, uint256[] calldata _quantities ) external creatorOnly(_id) { for (uint256 i = 0; i < _to.length; ++i) { address to = _to[i]; uint256 quantity = _quantities[i]; balances[_id][to] = quantity.add(balances[_id][to]); emit TransferSingle(msg.sender, address(0x0), to, _id, quantity); if (to.isContract()) { _doSafeTransferAcceptanceCheck( msg.sender, msg.sender, to, _id, quantity, "" ); } } } function contractURI() public view returns (string memory) { return _contractUri; } function baseURI() public view returns (string memory) { return _baseUri; } function uri(uint256 _id) external view returns (string memory) { if (bytes(_tokenURIs[_id]).length > 0) { return _tokenURIs[_id]; } else { return string(abi.encodePacked(_baseUri, toString(_id))); } } function setURI(string calldata _uri, uint256 _id) external creatorOnly(_id) { _tokenURIs[_id] = _uri; emit URI(_uri, _id); } function setContractURI(string calldata _uri) external ownerOrManager { _contractUri = _uri; } function setBaseURI(string calldata _uri) external ownerOrManager { _baseUri = _uri; } function toString(uint256 value) private pure returns (string memory) { if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } function setManager(address manager) external onlyOwner { _manager = manager; } }
pragma solidity ^0.5.0; import "./SafeMath.sol"; import "./Address.sol"; import "./Common.sol"; import "./IERC1155TokenReceiver.sol"; import "./IERC1155.sol"; // 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('supportsInterface(bytes4)')); */ bytes4 constant private INTERFACE_SIGNATURE_ERC165 = 0x01ffc9a7; /* 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; function supportsInterface(bytes4 _interfaceId) public view returns (bool) { if (_interfaceId == INTERFACE_SIGNATURE_ERC165 || _interfaceId == INTERFACE_SIGNATURE_ERC1155) { return true; } return false; } /////////////////////////////////////////// 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 length 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"); } }
pragma solidity ^0.5.0; import "../GSN/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * 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; } }
pragma solidity ^0.5.0; /** Note: The ERC-165 identifier for this interface is 0x0e89341c. */ interface ERC1155Metadata_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); }
// SPDX-License-Identifier: MIT pragma solidity ^0.5.0; import "./ERC165.sol"; interface IERC2981Royalties { function royaltyInfo(uint256 _tokenId, uint256 _value) external view returns (address _receiver, uint256 _royaltyAmount); } contract ERC2981 is ERC165, IERC2981Royalties { struct RoyaltyInfo { address recipient; uint24 amount; } RoyaltyInfo private _royalties; function _setRoyalties(address recipient, uint256 value) internal { require(value <= 10000, 'ERC2981Royalties: Too high'); _royalties = RoyaltyInfo(recipient, uint24(value)); } function royaltyInfo(uint256, uint256 value) external view returns (address receiver, uint256 royaltyAmount) { RoyaltyInfo memory royalties = _royalties; receiver = royalties.recipient; royaltyAmount = (value * royalties.amount) / 10000; } }
pragma solidity ^0.5.0; /** * @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; } }
pragma solidity ^0.5.0; /** * Utility library of inline functions on addresses */ library Address { /** * Returns whether the target address is a contract * @dev This function will return false if invoked during the constructor of a contract, * as the code is not actually created until after the constructor finishes. * @param account address of the account to check * @return whether the target address is a contract */ function isContract(address account) internal view returns (bool) { uint256 size; // XXX Currently there is no better way to check if there is a contract in an address // than to check the size of the code at that address. // See https://ethereum.stackexchange.com/a/14016/36603 // for more details about how this works. // TODO Check this again before the Serenity release, because all addresses will be // contracts then. // solium-disable-next-line security/no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } }
pragma solidity ^0.5.0; /** 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)")) }
pragma solidity ^0.5.0; /** 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); }
pragma solidity ^0.5.0; import "./ERC165.sol"; /** @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. */ interface IERC1155 /* is ERC165 */ { /** @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); }
pragma solidity ^0.5.0; /** * @title ERC165 * @dev https://github.com/ethereum/EIPs/blob/master/EIPS/eip-165.md */ interface ERC165 { /** * @notice Query if a contract implements an interface * @param _interfaceId The interface identifier, as specified in ERC-165 * @dev Interface identification is specified in ERC-165. This function * uses less than 30,000 gas. */ function supportsInterface(bytes4 _interfaceId) external view returns (bool); }
pragma solidity ^0.5.0; /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with GSN meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ 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; } }
{ "optimizer": { "enabled": true, "runs": 5000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
[{"inputs":[{"internalType":"string","name":"contractUri","type":"string"},{"internalType":"string","name":"baseUri","type":"string"},{"internalType":"address","name":"manager","type":"address"},{"internalType":"address","name":"royaltyRecipient","type":"address"},{"internalType":"uint256","name":"royaltyValue","type":"uint256"},{"internalType":"string","name":"metadataSrcIn","type":"string"}],"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":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","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":"_from","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"address[]","name":"_to","type":"address[]"}],"name":"airdrop","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"uint256[]","name":"_ids","type":"uint256[]"},{"internalType":"address[]","name":"_to","type":"address[]"}],"name":"airdropMultiple","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":true,"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_initialSupply","type":"uint256"},{"internalType":"string","name":"_uri","type":"string"}],"name":"create","outputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_tokensCount","type":"uint256"}],"name":"createBulk","outputs":[{"internalType":"uint256","name":"firstTokenId","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","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":"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":[],"name":"metadataSrc","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"address[]","name":"_to","type":"address[]"},{"internalType":"uint256[]","name":"_quantities","type":"uint256[]"}],"name":"mint","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"nonce","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"payable":false,"stateMutability":"view","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":"_uri","type":"string"}],"name":"setBaseURI","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"string","name":"_uri","type":"string"}],"name":"setContractURI","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"manager","type":"address"}],"name":"setManager","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"string","name":"_uri","type":"string"}],"name":"setMetadataSrc","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"string","name":"_uri","type":"string"},{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"setURI","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":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"}]
Contract Creation Code
60806040523480156200001157600080fd5b5060405162002ef938038062002ef9833981810160405260c08110156200003757600080fd5b81019080805160405193929190846401000000008211156200005857600080fd5b9083019060208201858111156200006e57600080fd5b82516401000000008111828201881017156200008957600080fd5b82525081516020918201929091019080838360005b83811015620000b85781810151838201526020016200009e565b50505050905090810190601f168015620000e65780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200010a57600080fd5b9083019060208201858111156200012057600080fd5b82516401000000008111828201881017156200013b57600080fd5b82525081516020918201929091019080838360005b838110156200016a57818101518382015260200162000150565b50505050905090810190601f168015620001985780820380516001836020036101000a031916815260200191505b50604081815260208301519083015160608401516080909401805192969195919284640100000000821115620001cd57600080fd5b908301906020820185811115620001e357600080fd5b8251640100000000811182820188101715620001fe57600080fd5b82525081516020918201929091019080838360005b838110156200022d57818101518382015260200162000213565b50505050905090810190601f1680156200025b5780820380516001836020036101000a031916815260200191505b506040525050506000620002746200034760201b60201c565b600380546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3508051620002d7906007906020840190620003f7565b508551620002ed906004906020890190620003f7565b50845162000303906005906020880190620003f7565b50600680546001600160a01b0319166001600160a01b03861617905581156200033b576200033b83836001600160e01b036200034c16565b50505050505062000499565b335b90565b612710811115620003a4576040805162461bcd60e51b815260206004820152601a60248201527f45524332393831526f79616c746965733a20546f6f2068696768000000000000604482015290519081900360640190fd5b604080518082019091526001600160a01b0390921680835262ffffff909116602090920182905260028054600160a01b90930262ffffff60a01b196001600160a01b031990941690921792909216179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200043a57805160ff19168380011785556200046a565b828001600101855582156200046a579182015b828111156200046a5782518255916020019190600101906200044d565b50620004789291506200047c565b5090565b6200034991905b8082111562000478576000815560010162000483565b612a5080620004a96000396000f3fe608060405234801561001057600080fd5b50600436106101c35760003560e01c8063793f3f60116100f9578063cfa84fc111610097578063e985e9c511610071578063e985e9c514610aa3578063ed0dca4514610ad1578063f242432a14610ad9578063f2fde38b14610b6e576101c3565b8063cfa84fc1146109ac578063d0ebdbe714610a75578063e8a3d48514610a9b576101c3565b8063938e3d7b116100d3578063938e3d7b146108e9578063a22cb46514610959578063affed0e014610987578063cd53d08e1461098f576101c3565b8063793f3f60146108385780638da5cb5b146108bd5780638f32d59b146108e1576101c3565b80634d81cb3011610166578063610fe5dd11610140578063610fe5dd1461074857806367db3b8f146107b85780636c0360eb14610828578063715018a614610830576101c3565b80634d81cb30146104f45780634e1273f4146105c657806355f804b3146106d8576101c3565b80630e89341c116101a25780630e89341c146102d05780631b8ba44d146103625780632a55205a1461037f5780632eb2c2d6146103c5576101c3565b8062fdd58e146101c85780630118fa491461020657806301ffc9a71461027d575b600080fd5b6101f4600480360360408110156101de57600080fd5b506001600160a01b038135169060200135610b94565b60408051918252519081900360200190f35b6101f46004803603604081101561021c57600080fd5b8135919081019060408101602082013564010000000081111561023e57600080fd5b82018360208201111561025057600080fd5b8035906020019184600183028401116401000000008311171561027257600080fd5b509092509050610bb9565b6102bc6004803603602081101561029357600080fd5b50357fffffffff0000000000000000000000000000000000000000000000000000000016610d13565b604080519115158252519081900360200190f35b6102ed600480360360208110156102e657600080fd5b5035610d78565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561032757818101518382015260200161030f565b50505050905090810190601f1680156103545780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101f46004803603602081101561037857600080fd5b5035610f12565b6103a26004803603604081101561039557600080fd5b5080359060200135611138565b604080516001600160a01b03909316835260208301919091528051918290030190f35b6104f2600480360360a08110156103db57600080fd5b6001600160a01b03823581169260208101359091169181019060608101604082013564010000000081111561040f57600080fd5b82018360208201111561042157600080fd5b8035906020019184602083028401116401000000008311171561044357600080fd5b91939092909160208101903564010000000081111561046157600080fd5b82018360208201111561047357600080fd5b8035906020019184602083028401116401000000008311171561049557600080fd5b9193909290916020810190356401000000008111156104b357600080fd5b8201836020820111156104c557600080fd5b803590602001918460018302840111640100000000831117156104e757600080fd5b509092509050611197565b005b6104f26004803603606081101561050a57600080fd5b6001600160a01b03823516919081019060408101602082013564010000000081111561053557600080fd5b82018360208201111561054757600080fd5b8035906020019184602083028401116401000000008311171561056957600080fd5b91939092909160208101903564010000000081111561058757600080fd5b82018360208201111561059957600080fd5b803590602001918460208302840111640100000000831117156105bb57600080fd5b50909250905061153a565b610688600480360360408110156105dc57600080fd5b8101906020810181356401000000008111156105f757600080fd5b82018360208201111561060957600080fd5b8035906020019184602083028401116401000000008311171561062b57600080fd5b91939092909160208101903564010000000081111561064957600080fd5b82018360208201111561065b57600080fd5b8035906020019184602083028401116401000000008311171561067d57600080fd5b5090925090506116dc565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156106c45781810151838201526020016106ac565b505050509050019250505060405180910390f35b6104f2600480360360208110156106ee57600080fd5b81019060208101813564010000000081111561070957600080fd5b82018360208201111561071b57600080fd5b8035906020019184600183028401116401000000008311171561073d57600080fd5b5090925090506117b0565b6104f26004803603602081101561075e57600080fd5b81019060208101813564010000000081111561077957600080fd5b82018360208201111561078b57600080fd5b803590602001918460018302840111640100000000831117156107ad57600080fd5b5090925090506117fc565b6104f2600480360360408110156107ce57600080fd5b8101906020810181356401000000008111156107e957600080fd5b8201836020820111156107fb57600080fd5b8035906020019184600183028401116401000000008311171561081d57600080fd5b919350915035611843565b6102ed6118e9565b6104f2611980565b6104f26004803603606081101561084e57600080fd5b6001600160a01b038235169160208101359181019060608101604082013564010000000081111561087e57600080fd5b82018360208201111561089057600080fd5b803590602001918460208302840111640100000000831117156108b257600080fd5b509092509050611a3b565b6108c5611bb5565b604080516001600160a01b039092168252519081900360200190f35b6102bc611bc4565b6104f2600480360360208110156108ff57600080fd5b81019060208101813564010000000081111561091a57600080fd5b82018360208201111561092c57600080fd5b8035906020019184600183028401116401000000008311171561094e57600080fd5b509092509050611bea565b6104f26004803603604081101561096f57600080fd5b506001600160a01b0381351690602001351515611c31565b6101f4611cbd565b6108c5600480360360208110156109a557600080fd5b5035611cc3565b6104f2600480360360608110156109c257600080fd5b813591908101906040810160208201356401000000008111156109e457600080fd5b8201836020820111156109f657600080fd5b80359060200191846020830284011164010000000083111715610a1857600080fd5b919390929091602081019035640100000000811115610a3657600080fd5b820183602082011115610a4857600080fd5b80359060200191846020830284011164010000000083111715610a6a57600080fd5b509092509050611cde565b6104f260048036036020811015610a8b57600080fd5b50356001600160a01b0316611e1d565b6102ed611eb0565b6102bc60048036036040811015610ab957600080fd5b506001600160a01b0381358116916020013516611f11565b6102ed611f3f565b6104f2600480360360a0811015610aef57600080fd5b6001600160a01b03823581169260208101359091169160408201359160608101359181019060a081016080820135640100000000811115610b2f57600080fd5b820183602082011115610b4157600080fd5b80359060200191846001830284011164010000000083111715610b6357600080fd5b509092509050611fa0565b6104f260048036036020811015610b8457600080fd5b50356001600160a01b031661219a565b6000908152602081815260408083206001600160a01b03949094168352929052205490565b6000610bc3611bc4565b80610bed57506006546001600160a01b031633148015610bed57506006546001600160a01b031615155b610bf657600080fd5b50600a805460010190819055600081815260086020908152604080832080547fffffffffffffffffffffffff0000000000000000000000000000000000000000163390811790915583835281842081855283528184208890558151858152928301889052815190939284927fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6292918290030190a48115610d0c576000818152600960205260409020610ca9908484612834565b50807f6bb7ff708619ba0610cba295a58592e0451dee2622938c8755667688daf3529b848460405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a25b9392505050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f0e89341c000000000000000000000000000000000000000000000000000000001415610d6757506001610d73565b610d70826121ff565b90505b919050565b6000818152600960205260409020546060906002600019610100600184161502019091160415610e415760008281526009602090815260409182902080548351601f600260001961010060018616150201909316929092049182018490048402810184019094528084529091830182828015610e355780601f10610e0a57610100808354040283529160200191610e35565b820191906000526020600020905b815481529060010190602001808311610e1857829003601f168201915b50505050509050610d73565b6005610e4c836122a7565b6040516020018083805460018160011615610100020316600290048015610eaa5780601f10610e88576101008083540402835291820191610eaa565b820191906000526020600020905b815481529060010190602001808311610e96575b5050825160208401908083835b60208310610ed65780518252601f199092019160209182019101610eb7565b6001836020036101000a038019825116818451168082178552505050505050905001925050506040516020818303038152906040529050610d73565b6000610f1c611bc4565b80610f4657506006546001600160a01b031633148015610f4657506006546001600160a01b031615155b610f4f57600080fd5b600a546001019050606082604051908082528060200260200182016040528015610f83578160200160208202803883390190505b509050606083604051908082528060200260200182016040528015610fb2578160200160208202803883390190505b50905060005b8481101561105657600a8054600190810191829055600082815260086020908152604080832080547fffffffffffffffffffffffff000000000000000000000000000000000000000016339081179091558383528184209084529091529020558351819085908490811061102857fe5b602002602001018181525050600183838151811061104257fe5b602090810291909101015250600101610fb8565b50336001600160a01b031660006001600160a01b0316336001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8585604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b838110156110dd5781810151838201526020016110c5565b50505050905001838103825284818151815260200191508051906020019060200280838360005b8381101561111c578181015183820152602001611104565b5050505090500194505050505060405180910390a45050919050565b6000806111436128d0565b50604080518082019091526002546001600160a01b0381168083527401000000000000000000000000000000000000000090910462ffffff1660208301819052909350612710908502049150509250929050565b6001600160a01b0387166111dc5760405162461bcd60e51b81526004018080602001828103825260258152602001806129286025913960400191505060405180910390fd5b84831461121a5760405162461bcd60e51b81526004018080602001828103825260298152602001806129ba6029913960400191505060405180910390fd5b6001600160a01b03881633148061125857506001600160a01b03881660009081526001602081815260408084203385529091529091205460ff161515145b6112935760405162461bcd60e51b815260040180806020018281038252602f81526020018061294d602f913960400191505060405180910390fd5b60005b858110156113c35760008787838181106112ac57fe5b90506020020135905060008686848181106112c357fe5b9050602002013590506113148160008085815260200190815260200160002060008e6001600160a01b03166001600160a01b031681526020019081526020016000205461239690919063ffffffff16565b60008084815260200190815260200160002060008d6001600160a01b03166001600160a01b031681526020019081526020016000208190555061139560008084815260200190815260200160002060008c6001600160a01b03166001600160a01b0316815260200190815260200160002054826123a890919063ffffffff16565b6000928352602083815260408085206001600160a01b038e1686529091529092209190915550600101611296565b50866001600160a01b0316886001600160a01b0316336001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb898989896040518080602001806020018381038352878782818152602001925060200280828437600083820152601f01601f19169091018481038352858152602090810191508690860280828437600083820152604051601f909101601f19169092018290039850909650505050505050a4611487876001600160a01b03166123bb565b156115305761153033898989898080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808d0282810182019093528c82529093508c92508b91829185019084908082843760009201919091525050604080516020601f8c018190048102820181019092528a815292508a91508990819084018382808284376000920191909152506123c192505050565b5050505050505050565b6001600160a01b03851633148061157857506001600160a01b03851660009081526001602081815260408084203385529091529091205460ff161515145b6115b35760405162461bcd60e51b815260040180806020018281038252602f81526020018061294d602f913960400191505060405180910390fd5b60005b818110156116d45760008383838181106115cc57fe5b905060200201356001600160a01b0316905060008686848181106115ec57fe5b60209081029290920135600081815280845260408082206001600160a01b038e168352909452929092205491925061162d919050600163ffffffff61239616565b6000828152602081815260408083206001600160a01b038d811685529252808320939093558416815220546116639060016123a8565b6000828152602081815260408083206001600160a01b03808816808652918452938290209490945580518581526001928101929092528051928c169233927fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6292908290030190a450506001016115b6565b505050505050565b60608382146116ea57600080fd5b604080518581526020808702820101909152606090858015611716578160200160208202803883390190505b50905060005b858110156117a65760008086868481811061173357fe5b905060200201358152602001908152602001600020600088888481811061175657fe5b905060200201356001600160a01b03166001600160a01b03166001600160a01b031681526020019081526020016000205482828151811061179357fe5b602090810291909101015260010161171c565b5095945050505050565b6117b8611bc4565b806117e257506006546001600160a01b0316331480156117e257506006546001600160a01b031615155b6117eb57600080fd5b6117f760058383612834565b505050565b611804611bc4565b8061182e57506006546001600160a01b03163314801561182e57506006546001600160a01b031615155b61183757600080fd5b6117f760078383612834565b60008181526008602052604090205481906001600160a01b0316331461186857600080fd5b6000828152600960205260409020611881908585612834565b50817f6bb7ff708619ba0610cba295a58592e0451dee2622938c8755667688daf3529b858560405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a250505050565b60058054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156119755780601f1061194a57610100808354040283529160200191611975565b820191906000526020600020905b81548152906001019060200180831161195857829003601f168201915b505050505090505b90565b611988611bc4565b6119d9576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6003546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600380547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b6001600160a01b038416331480611a7957506001600160a01b03841660009081526001602081815260408084203385529091529091205460ff161515145b611ab45760405162461bcd60e51b815260040180806020018281038252602f81526020018061294d602f913960400191505060405180910390fd5b60005b81811015611bae576000838383818110611acd57fe5b6000888152602081815260408083206001600160a01b038d81168552908352922054920293909301359092169250611b089190506001612396565b6000868152602081815260408083206001600160a01b038b81168552925280832093909355831681522054611b3e9060016123a8565b6000868152602081815260408083206001600160a01b03808716808652918452938290209490945580518981526001928101929092528051928a169233927fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6292908290030190a450600101611ab7565b5050505050565b6003546001600160a01b031690565b6003546000906001600160a01b0316611bdb6125da565b6001600160a01b031614905090565b611bf2611bc4565b80611c1c57506006546001600160a01b031633148015611c1c57506006546001600160a01b031615155b611c2557600080fd5b6117f760048383612834565b3360008181526001602090815260408083206001600160a01b0387168085529083529281902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016861515908117909155815190815290519293927f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31929181900390910190a35050565b600a5481565b6008602052600090815260409020546001600160a01b031681565b60008581526008602052604090205485906001600160a01b03163314611d0357600080fd5b60005b84811015611e14576000868683818110611d1c57fe5b905060200201356001600160a01b031690506000858584818110611d3c57fe5b60008c8152602081815260408083206001600160a01b0389168452825290912054910292909201359250611d789183915063ffffffff6123a816565b60008a8152602081815260408083206001600160a01b0387168085529083528184209490945580518d8152918201859052805133927fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6292908290030190a4611de8826001600160a01b03166123bb565b15611e0a57611e0a3333848c85604051806020016040528060008152506125de565b5050600101611d06565b50505050505050565b611e25611bc4565b611e76576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600680547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156119755780601f1061194a57610100808354040283529160200191611975565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b60078054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156119755780601f1061194a57610100808354040283529160200191611975565b6001600160a01b038516611ffb576040805162461bcd60e51b815260206004820152601560248201527f5f746f206d757374206265206e6f6e2d7a65726f2e0000000000000000000000604482015290519081900360640190fd5b6001600160a01b03861633148061203957506001600160a01b03861660009081526001602081815260408084203385529091529091205460ff161515145b6120745760405162461bcd60e51b815260040180806020018281038252602f81526020018061294d602f913960400191505060405180910390fd5b6000848152602081815260408083206001600160a01b038a1684529091529020546120a5908463ffffffff61239616565b6000858152602081815260408083206001600160a01b038b811685529252808320939093558716815220546120db9084906123a8565b6000858152602081815260408083206001600160a01b03808b16808652918452938290209490945580518881529182018790528051928a169233927fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6292908290030190a4612151856001600160a01b03166123bb565b156116d4576116d4338787878787878080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506125de92505050565b6121a2611bc4565b6121f3576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6121fc8161277b565b50565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f01ffc9a700000000000000000000000000000000000000000000000000000000148061229257507fffffffff0000000000000000000000000000000000000000000000000000000082167fd9b67a2600000000000000000000000000000000000000000000000000000000145b1561229f57506001610d73565b506000919050565b6060816122e8575060408051808201909152600181527f30000000000000000000000000000000000000000000000000000000000000006020820152610d73565b8160005b811561230057600101600a820491506122ec565b6060816040519080825280601f01601f19166020018201604052801561232d576020820181803883390190505b5090505b841561238e5760001990910190600a850660300160f81b81838151811061235457fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a85049450612331565b949350505050565b6000828211156123a257fe5b50900390565b818101828110156123b557fe5b92915050565b3b151590565b63bc197c8160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916846001600160a01b031663bc197c8188888787876040518663ffffffff1660e01b815260040180866001600160a01b03166001600160a01b03168152602001856001600160a01b03166001600160a01b03168152602001806020018060200180602001848103845287818151815260200191508051906020019060200280838360005b8381101561248357818101518382015260200161246b565b50505050905001848103835286818151815260200191508051906020019060200280838360005b838110156124c25781810151838201526020016124aa565b50505050905001848103825285818151815260200191508051906020019080838360005b838110156124fe5781810151838201526020016124e6565b50505050905090810190601f16801561252b5780820380516001836020036101000a031916815260200191505b5098505050505050505050602060405180830381600087803b15801561255057600080fd5b505af1158015612564573d6000803e3d6000fd5b505050506040513d602081101561257a57600080fd5b50517fffffffff0000000000000000000000000000000000000000000000000000000016146116d45760405162461bcd60e51b815260040180806020018281038252603e81526020018061297c603e913960400191505060405180910390fd5b3390565b63f23a6e6160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916846001600160a01b031663f23a6e6188888787876040518663ffffffff1660e01b815260040180866001600160a01b03166001600160a01b03168152602001856001600160a01b03166001600160a01b0316815260200184815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156126a1578181015183820152602001612689565b50505050905090810190601f1680156126ce5780820380516001836020036101000a031916815260200191505b509650505050505050602060405180830381600087803b1580156126f157600080fd5b505af1158015612705573d6000803e3d6000fd5b505050506040513d602081101561271b57600080fd5b50517fffffffff0000000000000000000000000000000000000000000000000000000016146116d45760405162461bcd60e51b81526004018080602001828103825260398152602001806129e36039913960400191505060405180910390fd5b6001600160a01b0381166127c05760405162461bcd60e51b81526004018080602001828103825260268152602001806129026026913960400191505060405180910390fd5b6003546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600380547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10612893578280017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008235161785556128c0565b828001600101855582156128c0579182015b828111156128c05782358255916020019190600101906128a5565b506128cc9291506128e7565b5090565b604080518082019091526000808252602082015290565b61197d91905b808211156128cc57600081556001016128ed56fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737364657374696e6174696f6e2061646472657373206d757374206265206e6f6e2d7a65726f2e4e656564206f70657261746f7220617070726f76616c20666f7220337264207061727479207472616e73666572732e636f6e74726163742072657475726e656420616e20756e6b6e6f776e2076616c75652066726f6d206f6e45524331313535426174636852656365697665645f69647320616e64205f76616c756573206172726179206c656e677468206d757374206d617463682e636f6e74726163742072657475726e656420616e20756e6b6e6f776e2076616c75652066726f6d206f6e455243313135355265636569766564a265627a7a72315820c9bd97da3681a77d3d04397f49dd55fc42558a8a4bf19b728a043ccfb59c787864736f6c6343000510003200000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000a4099f9c2ed8cb2678dd3d60cda97cd9c62620af000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000000