upgrades
Version:
Proxy upgadable contracts based on openzeppelin-sdk
10 lines • 1.18 MB
JSON
{
"fileName": "MockStandaloneERC721.sol",
"contractName": "MockERC721Enumerable",
"source": "pragma solidity ^0.6.0;\n// SPDX-License-Identifier: MIT\n\nimport \"../Initializable.sol\";\n\n// File: contracts/introspection/IERC165.sol\n\n/**\n * @title IERC165\n * @dev https://github.com/ethereum/EIPs/blob/master/EIPS/eip-165.md\n */\ninterface IERC165 {\n /**\n * @notice Query if a contract implements an interface\n * @param interfaceId The interface identifier, as specified in ERC-165\n * @dev Interface identification is specified in ERC-165. This function\n * uses less than 30,000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n\n// File: contracts/token/MockERC721/IMockERC721.sol\n\n\n\n/**\n * @title MockERC721 Non-Fungible Token Standard basic interface\n * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md\n */\nabstract contract IMockERC721 is Initializable, IERC165 {\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\n\n // function balanceOf(address owner) public view virtual returns (uint256 balance);\n // function ownerOf(uint256 tokenId) public view virtual returns (address owner);\n //\n // function approve(address to, uint256 tokenId) public virtual;\n // function getApproved(uint256 tokenId) public view virtual returns (address operator);\n //\n // function setApprovalForAll(address operator, bool _approved) public virtual;\n // function isApprovedForAll(address owner, address operator) public view virtual returns (bool) ;\n //\n // function transferFrom(address from, address to, uint256 tokenId) public virtual;\n // function safeTransferFrom(address from, address to, uint256 tokenId) public virtual;\n //\n // function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public virtual;\n}\n\n// File: contracts/token/MockERC721/IMockERC721Receiver.sol\n\n/**\n * @title MockERC721 token receiver interface\n * @dev Interface for any contract that wants to support safeTransfers\n * from MockERC721 asset contracts.\n */\nabstract contract IMockERC721Receiver {\n /**\n * @notice Handle the receipt of an NFT\n * @dev The MockERC721 smart contract calls this function on the recipient\n * after a `safeTransfer`. This function MUST return the function selector,\n * otherwise the caller will revert the transaction. The selector to be\n * returned can be obtained as `this.onMockERC721Received.selector`. This\n * function MAY throw to revert and reject the transfer.\n * Note: the MockERC721 contract address is always the message sender.\n * @param operator The address which called `safeTransferFrom` function\n * @param from The address which previously owned the token\n * @param tokenId The NFT identifier which is being transferred\n * @param data Additional data with no specified format\n * @return `bytes4(keccak256(\"onMockERC721Received(address,address,uint256,bytes)\"))`\n */\n function onMockERC721Received(address operator, address from, uint256 tokenId, bytes memory data)\n public virtual returns (bytes4);\n}\n\n// File: contracts/math/SafeMath.sol\n\n/**\n * @title SafeMath\n * @dev Unsigned math operations with safety checks that revert on error\n */\nlibrary SafeMath {\n /**\n * @dev Multiplies two unsigned integers, reverts on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522\n if (a == 0) {\n return 0;\n }\n\n uint256 c = a * b;\n require(c / a == b);\n\n return c;\n }\n\n /**\n * @dev Integer division of two unsigned integers truncating the quotient, reverts on division by zero.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // Solidity only automatically asserts when dividing by 0\n require(b > 0);\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n\n return c;\n }\n\n /**\n * @dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n require(b <= a);\n uint256 c = a - b;\n\n return c;\n }\n\n /**\n * @dev Adds two unsigned integers, reverts on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n require(c >= a);\n\n return c;\n }\n\n /**\n * @dev Divides two unsigned integers and returns the remainder (unsigned integer modulo),\n * reverts when dividing by zero.\n */\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n require(b != 0);\n return a % b;\n }\n}\n\n// File: contracts/utils/Address.sol\n\n/**\n * Utility library of inline functions on addresses\n */\nlibrary Address {\n /**\n * Returns whether the target address is a contract\n * @dev This function will return false if invoked during the constructor of a contract,\n * as the code is not actually created until after the constructor finishes.\n * @param account address of the account to check\n * @return whether the target address is a contract\n */\n function isContract(address account) internal view returns (bool) {\n uint256 size;\n // XXX Currently there is no better way to check if there is a contract in an address\n // than to check the size of the code at that address.\n // See https://ethereum.stackexchange.com/a/14016/36603\n // for more details about how this works.\n // TODO Check this again before the Serenity release, because all addresses will be\n // contracts then.\n // solhint-disable-next-line no-inline-assembly\n assembly { size := extcodesize(account) }\n return size > 0;\n }\n}\n\n// File: contracts/introspection/ERC165.sol\n\n\n\n/**\n * @title ERC165\n * @author Matt Condon (@shrugs)\n * @dev Implements ERC165 using a lookup table.\n */\ncontract ERC165 is Initializable, IERC165 {\n bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7;\n /**\n * 0x01ffc9a7 ===\n * bytes4(keccak256('supportsInterface(bytes4)'))\n */\n\n /**\n * @dev a mapping of interface id to whether or not it's supported\n */\n mapping(bytes4 => bool) private _supportedInterfaces;\n\n /**\n * @dev A contract implementing SupportsInterfaceWithLookup\n * implement ERC165 itself\n */\n function initializeERC165() public initializer {\n _registerInterface(_INTERFACE_ID_ERC165);\n }\n\n /**\n * @dev implement supportsInterface(bytes4) using a lookup table\n */\n function supportsInterface(bytes4 interfaceId) public view override returns (bool) {\n return _supportedInterfaces[interfaceId];\n }\n\n /**\n * @dev internal method for registering an interface\n */\n function _registerInterface(bytes4 interfaceId) internal {\n require(interfaceId != 0xffffffff);\n _supportedInterfaces[interfaceId] = true;\n }\n\n uint256[50] private ______gap;\n}\n\n// File: contracts/token/MockERC721/MockERC721.sol\n\n/**\n * @title MockERC721 Non-Fungible Token Standard basic implementation\n * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md\n */\ncontract MockERC721 is Initializable, ERC165, IMockERC721 {\n using SafeMath for uint256;\n using Address for address;\n\n // Equals to `bytes4(keccak256(\"onMockERC721Received(address,address,uint256,bytes)\"))`\n // which can be also obtained as `IMockERC721Receiver(0).onMockERC721Received.selector`\n bytes4 private constant _MockERC721_RECEIVED = 0x150b7a02;\n\n // Mapping from token ID to owner\n mapping (uint256 => address) private _tokenOwner;\n\n // Mapping from token ID to approved address\n mapping (uint256 => address) private _tokenApprovals;\n\n // Mapping from owner to number of owned token\n mapping (address => uint256) private _ownedTokensCount;\n\n // Mapping from owner to operator approvals\n mapping (address => mapping (address => bool)) private _operatorApprovals;\n\n bytes4 private constant _INTERFACE_ID_MockERC721 = 0x80ac58cd;\n /*\n * 0x80ac58cd ===\n * bytes4(keccak256('balanceOf(address)')) ^\n * bytes4(keccak256('ownerOf(uint256)')) ^\n * bytes4(keccak256('approve(address,uint256)')) ^\n * bytes4(keccak256('getApproved(uint256)')) ^\n * bytes4(keccak256('setApprovalForAll(address,bool)')) ^\n * bytes4(keccak256('isApprovedForAll(address,address)')) ^\n * bytes4(keccak256('transferFrom(address,address,uint256)')) ^\n * bytes4(keccak256('safeTransferFrom(address,address,uint256)')) ^\n * bytes4(keccak256('safeTransferFrom(address,address,uint256,bytes)'))\n */\n\n function initialize() public initializer virtual {\n ERC165.initializeERC165();\n\n // register the supported interfaces to conform to MockERC721 via ERC165\n _registerInterface(_INTERFACE_ID_MockERC721);\n }\n\n function _hasBeenInitializedMockERC721() internal view virtual returns (bool) {\n return supportsInterface(_INTERFACE_ID_MockERC721);\n }\n\n /**\n * @dev Gets the balance of the specified address\n * @param owner address to query the balance of\n * @return uint256 representing the amount owned by the passed address\n */\n function balanceOf(address owner) public view returns (uint256) {\n require(owner != address(0));\n return _ownedTokensCount[owner];\n }\n\n /**\n * @dev Gets the owner of the specified token ID\n * @param tokenId uint256 ID of the token to query the owner of\n * @return owner address currently marked as the owner of the given token ID\n */\n function ownerOf(uint256 tokenId) public view returns (address) {\n address owner = _tokenOwner[tokenId];\n require(owner != address(0));\n return owner;\n }\n\n /**\n * @dev Approves another address to transfer the given token ID\n * The zero address indicates there is no approved address.\n * There can only be one approved address per token at a given time.\n * Can only be called by the token owner or an approved operator.\n * @param to address to be approved for the given token ID\n * @param tokenId uint256 ID of the token to be approved\n */\n function approveMockERC721(address to, uint256 tokenId) public {\n address owner = ownerOf(tokenId);\n require(to != owner);\n require(msg.sender == owner || isApprovedForAll(owner, msg.sender));\n\n _tokenApprovals[tokenId] = to;\n emit Approval(owner, to, tokenId);\n }\n\n /**\n * @dev Gets the approved address for a token ID, or zero if no address set\n * Reverts if the token ID does not exist.\n * @param tokenId uint256 ID of the token to query the approval of\n * @return address currently approved for the given token ID\n */\n function getApproved(uint256 tokenId) public view returns (address) {\n require(_exists(tokenId));\n return _tokenApprovals[tokenId];\n }\n\n /**\n * @dev Sets or unsets the approval of a given operator\n * An operator is allowed to transfer all tokens of the sender on their behalf\n * @param to operator address to set the approval\n * @param approved representing the status of the approval to be set\n */\n function setApprovalForAllMockERC721(address to, bool approved) public {\n require(to != msg.sender);\n _operatorApprovals[msg.sender][to] = approved;\n emit ApprovalForAll(msg.sender, to, approved);\n }\n\n /**\n * @dev Tells whether an operator is approved by a given owner\n * @param owner owner address which you want to query the approval of\n * @param operator operator address which you want to query the approval of\n * @return bool whether the given operator is approved by the given owner\n */\n function isApprovedForAll(address owner, address operator) public view returns (bool) {\n return _operatorApprovals[owner][operator];\n }\n\n /**\n * @dev Transfers the ownership of a given token ID to another address\n * Usage of this method is discouraged, use `safeTransferFrom` whenever possible\n * Requires the msg sender to be the owner, approved, or operator\n * @param from current owner of the token\n * @param to address to receive the ownership of the given token ID\n * @param tokenId uint256 ID of the token to be transferred\n */\n function transferFromMockERC721(address from, address to, uint256 tokenId) public virtual {\n require(_isApprovedOrOwner(msg.sender, tokenId));\n\n _transferFromMockERC721(from, to, tokenId);\n }\n\n /**\n * @dev Safely transfers the ownership of a given token ID to another address\n * If the target address is a contract, it must implement `onMockERC721Received`,\n * which is called upon a safe transfer, and return the magic value\n * `bytes4(keccak256(\"onMockERC721Received(address,address,uint256,bytes)\"))`; otherwise,\n * the transfer is reverted.\n *\n * Requires the msg sender to be the owner, approved, or operator\n * @param from current owner of the token\n * @param to address to receive the ownership of the given token ID\n * @param tokenId uint256 ID of the token to be transferred\n */\n function safeTransferFrom(address from, address to, uint256 tokenId) public {\n safeTransferFrom(from, to, tokenId, \"\");\n }\n\n /**\n * @dev Safely transfers the ownership of a given token ID to another address\n * If the target address is a contract, it must implement `onMockERC721Received`,\n * which is called upon a safe transfer, and return the magic value\n * `bytes4(keccak256(\"onMockERC721Received(address,address,uint256,bytes)\"))`; otherwise,\n * the transfer is reverted.\n * Requires the msg sender to be the owner, approved, or operator\n * @param from current owner of the token\n * @param to address to receive the ownership of the given token ID\n * @param tokenId uint256 ID of the token to be transferred\n * @param _data bytes data to send along with a safe transfer check\n */\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) public {\n transferFromMockERC721(from, to, tokenId);\n require(_checkOnMockERC721Received(from, to, tokenId, _data));\n }\n\n /**\n * @dev Returns whether the specified token exists\n * @param tokenId uint256 ID of the token to query the existence of\n * @return whether the token exists\n */\n function _exists(uint256 tokenId) internal view returns (bool) {\n address owner = _tokenOwner[tokenId];\n return owner != address(0);\n }\n\n /**\n * @dev Returns whether the given spender can transfer a given token ID\n * @param spender address of the spender to query\n * @param tokenId uint256 ID of the token to be transferred\n * @return bool whether the msg.sender is approved for the given token ID,\n * is an operator of the owner, or is the owner of the token\n */\n function _isApprovedOrOwner(address spender, uint256 tokenId) internal view returns (bool) {\n address owner = ownerOf(tokenId);\n return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));\n }\n\n /**\n * @dev Internal function to mint a new token\n * Reverts if the given token ID already exists\n * @param to The address that will own the minted token\n * @param tokenId uint256 ID of the token to be minted\n */\n function _mintMockERC721(address to, uint256 tokenId) internal {\n require(to != address(0));\n require(!_exists(tokenId));\n\n _tokenOwner[tokenId] = to;\n _ownedTokensCount[to] = _ownedTokensCount[to].add(1);\n\n emit Transfer(address(0), to, tokenId);\n }\n\n /**\n * @dev Internal function to burn a specific token\n * Reverts if the token does not exist\n * Deprecated, use _burn(uint256) instead.\n * @param owner owner of the token to burn\n * @param tokenId uint256 ID of the token being burned\n */\n function _burnMockERC721(address owner, uint256 tokenId) internal {\n require(ownerOf(tokenId) == owner);\n\n _clearApproval(tokenId);\n\n _ownedTokensCount[owner] = _ownedTokensCount[owner].sub(1);\n _tokenOwner[tokenId] = address(0);\n\n emit Transfer(owner, address(0), tokenId);\n }\n\n /**\n * @dev Internal function to burn a specific token\n * Reverts if the token does not exist\n * @param tokenId uint256 ID of the token being burned\n */\n function _burn(uint256 tokenId) internal {\n _burnMockERC721(ownerOf(tokenId), tokenId);\n }\n\n /**\n * @dev Internal function to transfer ownership of a given token ID to another address.\n * As opposed to transferFrom, this imposes no restrictions on msg.sender.\n * @param from current owner of the token\n * @param to address to receive the ownership of the given token ID\n * @param tokenId uint256 ID of the token to be transferred\n */\n function _transferFromMockERC721(address from, address to, uint256 tokenId) internal {\n require(ownerOf(tokenId) == from);\n require(to != address(0));\n\n _clearApproval(tokenId);\n\n _ownedTokensCount[from] = _ownedTokensCount[from].sub(1);\n _ownedTokensCount[to] = _ownedTokensCount[to].add(1);\n\n _tokenOwner[tokenId] = to;\n\n emit Transfer(from, to, tokenId);\n }\n\n /**\n * @dev Internal function to invoke `onMockERC721Received` on a target address\n * The call is not executed if the target address is not a contract\n * @param from address representing the previous owner of the given token ID\n * @param to target address that will receive the tokens\n * @param tokenId uint256 ID of the token to be transferred\n * @param _data bytes optional data to send along with the call\n * @return whether the call correctly returned the expected magic value\n */\n function _checkOnMockERC721Received(address from, address to, uint256 tokenId, bytes memory _data)\n internal returns (bool)\n {\n if (!to.isContract()) {\n return true;\n }\n\n bytes4 retval = IMockERC721Receiver(to).onMockERC721Received(msg.sender, from, tokenId, _data);\n return (retval == _MockERC721_RECEIVED);\n }\n\n /**\n * @dev Private function to clear current approval of a given token ID\n * @param tokenId uint256 ID of the token to be transferred\n */\n function _clearApproval(uint256 tokenId) private {\n if (_tokenApprovals[tokenId] != address(0)) {\n _tokenApprovals[tokenId] = address(0);\n }\n }\n\n uint256[50] private ______gap;\n}\n\n// File: contracts/token/MockERC721/IMockERC721Enumerable.sol\n\n\n\n/**\n * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension\n * @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md\n */\nabstract contract IMockERC721Enumerable is Initializable, IMockERC721 {\n function totalSupply() public view virtual returns (uint256);\n function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual returns (uint256 tokenId);\n\n function tokenByIndex(uint256 index) public view virtual returns (uint256);\n}\n\n// File: contracts/token/MockERC721/MockERC721Enumerable.sol\n\n\n\n\n\n/**\n * @title ERC-721 Non-Fungible Token with optional enumeration extension logic\n * @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md\n */\ncontract MockERC721Enumerable is Initializable, ERC165, MockERC721, IMockERC721Enumerable {\n // Mapping from owner to list of owned token IDs\n mapping(address => uint256[]) private _ownedTokens;\n\n // Mapping from token ID to index of the owner tokens list\n mapping(uint256 => uint256) private _ownedTokensIndex;\n\n // Array with all token ids, used for enumeration\n uint256[] private _allTokens;\n\n // Mapping from token id to position in the allTokens array\n mapping(uint256 => uint256) private _allTokensIndex;\n\n bytes4 private constant _INTERFACE_ID_MockERC721_ENUMERABLE = 0x780e9d63;\n /**\n * 0x780e9d63 ===\n * bytes4(keccak256('totalSupply()')) ^\n * bytes4(keccak256('tokenOfOwnerByIndex(address,uint256)')) ^\n * bytes4(keccak256('tokenByIndex(uint256)'))\n */\n\n /**\n * @dev Constructor function\n */\n function initializeMockERC721Enumerable() public initializer {\n require(MockERC721._hasBeenInitializedMockERC721());\n\n // register the supported interface to conform to MockERC721 via ERC165\n _registerInterface(_INTERFACE_ID_MockERC721_ENUMERABLE);\n }\n\n function _hasBeenInitialized() internal view virtual returns (bool) {\n return supportsInterface(_INTERFACE_ID_MockERC721_ENUMERABLE);\n }\n\n /**\n * @dev Gets the token ID at a given index of the tokens list of the requested owner\n * @param owner address owning the tokens list to be accessed\n * @param index uint256 representing the index to be accessed of the requested tokens list\n * @return uint256 token ID at the given index of the tokens list owned by the requested address\n */\n function tokenOfOwnerByIndex(address owner, uint256 index) public view override returns (uint256) {\n require(index < balanceOf(owner));\n return _ownedTokens[owner][index];\n }\n\n /**\n * @dev Gets the total amount of tokens stored by the contract\n * @return uint256 representing the total amount of tokens\n */\n function totalSupply() public view override returns (uint256) {\n return _allTokens.length;\n }\n\n /**\n * @dev Gets the token ID at a given index of all the tokens in this contract\n * Reverts if the index is greater or equal to the total number of tokens\n * @param index uint256 representing the index to be accessed of the tokens list\n * @return uint256 token ID at the given index of the tokens list\n */\n function tokenByIndex(uint256 index) public view override returns (uint256) {\n require(index < totalSupply());\n return _allTokens[index];\n }\n\n /**\n * @dev Internal function to transfer ownership of a given token ID to another address.\n * As opposed to transferFrom, this imposes no restrictions on msg.sender.\n * @param from current owner of the token\n * @param to address to receive the ownership of the given token ID\n * @param tokenId uint256 ID of the token to be transferred\n */\n function _transferFrom(address from, address to, uint256 tokenId) internal {\n super._transferFromMockERC721(from, to, tokenId);\n\n _removeTokenFromOwnerEnumeration(from, tokenId);\n\n _addTokenToOwnerEnumeration(to, tokenId);\n }\n\n /**\n * @dev Internal function to mint a new token\n * Reverts if the given token ID already exists\n * @param to address the beneficiary that will own the minted token\n * @param tokenId uint256 ID of the token to be minted\n */\n function _mint(address to, uint256 tokenId) internal virtual {\n super._mintMockERC721(to, tokenId);\n\n _addTokenToOwnerEnumeration(to, tokenId);\n\n _addTokenToAllTokensEnumeration(tokenId);\n }\n\n /**\n * @dev Internal function to burn a specific token\n * Reverts if the token does not exist\n * Deprecated, use _burn(uint256) instead\n * @param owner owner of the token to burn\n * @param tokenId uint256 ID of the token being burned\n */\n function _burn(address owner, uint256 tokenId) internal virtual {\n super._burnMockERC721(owner, tokenId);\n\n _removeTokenFromOwnerEnumeration(owner, tokenId);\n // Since tokenId will be deleted, we can clear its slot in _ownedTokensIndex to trigger a gas refund\n _ownedTokensIndex[tokenId] = 0;\n\n _removeTokenFromAllTokensEnumeration(tokenId);\n }\n\n /**\n * @dev Gets the list of token IDs of the requested owner\n * @param owner address owning the tokens\n * @return uint256[] List of token IDs owned by the requested address\n */\n function _tokensOfOwner(address owner) internal view returns (uint256[] storage) {\n return _ownedTokens[owner];\n }\n\n /**\n * @dev Private function to add a token to this extension's ownership-tracking data structures.\n * @param to address representing the new owner of the given token ID\n * @param tokenId uint256 ID of the token to be added to the tokens list of the given address\n */\n function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {\n _ownedTokensIndex[tokenId] = _ownedTokens[to].length;\n _ownedTokens[to].push(tokenId);\n }\n\n /**\n * @dev Private function to add a token to this extension's token tracking data structures.\n * @param tokenId uint256 ID of the token to be added to the tokens list\n */\n function _addTokenToAllTokensEnumeration(uint256 tokenId) private {\n _allTokensIndex[tokenId] = _allTokens.length;\n _allTokens.push(tokenId);\n }\n\n /**\n * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that\n * while the token is not assigned a new owner, the _ownedTokensIndex mapping is _not_ updated: this allows for\n * gas optimizations e.g. when performing a transfer operation (avoiding double writes).\n * This has O(1) time complexity, but alters the order of the _ownedTokens array.\n * @param from address representing the previous owner of the given token ID\n * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address\n */\n function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {\n // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and\n // then delete the last slot (swap and pop).\n\n uint256 lastTokenIndex = _ownedTokens[from].length.sub(1);\n uint256 tokenIndex = _ownedTokensIndex[tokenId];\n\n // When the token to delete is the last token, the swap operation is unnecessary\n if (tokenIndex != lastTokenIndex) {\n uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];\n\n _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token\n _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index\n }\n\n // This also deletes the contents at the last position of the array\n //_ownedTokens[from].length--;\n _ownedTokens[from].pop();\n // Note that _ownedTokensIndex[tokenId] hasn't been cleared: it still points to the old slot (now occcupied by\n // lasTokenId, or just over the end of the array if the token was the last one).\n }\n\n /**\n * @dev Private function to remove a token from this extension's token tracking data structures.\n * This has O(1) time complexity, but alters the order of the _allTokens array.\n * @param tokenId uint256 ID of the token to be removed from the tokens list\n */\n function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {\n // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and\n // then delete the last slot (swap and pop).\n\n uint256 lastTokenIndex = _allTokens.length.sub(1);\n uint256 tokenIndex = _allTokensIndex[tokenId];\n\n // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so\n // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding\n // an 'if' statement (like in _removeTokenFromOwnerEnumeration)\n uint256 lastTokenId = _allTokens[lastTokenIndex];\n\n _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token\n _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index\n\n // This also deletes the contents at the last position of the array\n _allTokens.pop();\n //_allTokensIndex[tokenId] = 0;\n }\n\n uint256[50] private ______gap;\n}\n\n// File: contracts/token/MockERC721/IMockERC721Metadata.sol\n\n\n\n/**\n * @title ERC-721 Non-Fungible Token Standard, optional metadata extension\n * @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md\n */\nabstract contract IMockERC721Metadata is Initializable, IMockERC721 {\n function name() external view virtual returns (string memory);\n function symbol() external view virtual returns (string memory);\n function tokenURI(uint256 tokenId) external view virtual returns (string memory);\n}\n\n// File: contracts/token/MockERC721/MockERC721Metadata.sol\n\n\n\n\n\ncontract MockERC721Metadata is Initializable, ERC165, MockERC721, IMockERC721Metadata {\n // Token name\n string private _name;\n\n // Token symbol\n string private _symbol;\n\n // Optional mapping for token URIs\n mapping(uint256 => string) private _tokenURIs;\n\n bytes4 private constant _INTERFACE_ID_MockERC721_METADATA = 0x5b5e139f;\n /**\n * 0x5b5e139f ===\n * bytes4(keccak256('name()')) ^\n * bytes4(keccak256('symbol()')) ^\n * bytes4(keccak256('tokenURI(uint256)'))\n */\n\n /**\n * @dev Constructor function\n */\n function initialize(string memory name, string memory symbol) public initializer {\n require(MockERC721._hasBeenInitializedMockERC721());\n\n _name = name;\n _symbol = symbol;\n\n // register the supported interfaces to conform to MockERC721 via ERC165\n _registerInterface(_INTERFACE_ID_MockERC721_METADATA);\n }\n\n function _hasBeenInitialized() internal view virtual returns (bool) {\n return supportsInterface(_INTERFACE_ID_MockERC721_METADATA);\n }\n\n /**\n * @dev Gets the token name\n * @return string representing the token name\n */\n function name() external view override returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Gets the token symbol\n * @return string representing the token symbol\n */\n function symbol() external view override returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns an URI for a given token ID\n * Throws if the token ID does not exist. May return an empty string.\n * @param tokenId uint256 ID of the token to query\n */\n function tokenURI(uint256 tokenId) external view override returns (string memory) {\n require(_exists(tokenId));\n return _tokenURIs[tokenId];\n }\n\n /**\n * @dev Internal function to set the token URI for a given token\n * Reverts if the token ID does not exist\n * @param tokenId uint256 ID of the token to set its URI\n * @param uri string URI to assign\n */\n function _setTokenURI(uint256 tokenId, string memory uri) internal {\n require(_exists(tokenId));\n _tokenURIs[tokenId] = uri;\n }\n\n /**\n * @dev Internal function to burn a specific token\n * Reverts if the token does not exist\n * Deprecated, use _burn(uint256) instead\n * @param owner owner of the token to burn\n * @param tokenId uint256 ID of the token being burned by the msg.sender\n */\n function _burn(address owner, uint256 tokenId) internal virtual {\n super._burnMockERC721(owner, tokenId);\n\n // Clear metadata (if any)\n if (bytes(_tokenURIs[tokenId]).length != 0) {\n delete _tokenURIs[tokenId];\n }\n }\n\n uint256[50] private ______gap;\n}\n\n// File: contracts/access/Roles.sol\n\n/**\n * @title Roles\n * @dev Library for managing addresses assigned to a Role.\n */\nlibrary Roles {\n struct Role {\n mapping (address => bool) bearer;\n }\n\n /**\n * @dev give an account access to this role\n */\n function add(Role storage role, address account) internal {\n require(account != address(0));\n require(!has(role, account));\n\n role.bearer[account] = true;\n }\n\n /**\n * @dev remove an account's access to this role\n */\n function remove(Role storage role, address account) internal {\n require(account != address(0));\n require(has(role, account));\n\n role.bearer[account] = false;\n }\n\n /**\n * @dev check if an account has this role\n * @return bool\n */\n function has(Role storage role, address account) internal view returns (bool) {\n require(account != address(0));\n return role.bearer[account];\n }\n}\n\n// File: contracts/access/roles/MinterRole.sol\n\n\n\n\ncontract MinterRole is Initializable {\n using Roles for Roles.Role;\n\n event MinterAdded(address indexed account);\n event MinterRemoved(address indexed account);\n\n Roles.Role private _minters;\n\n function initializeMinterRole(address sender) public initializer {\n if (!isMinter(sender)) {\n _addMinter(sender);\n }\n }\n\n modifier onlyMinter() {\n require(isMinter(msg.sender));\n _;\n }\n\n function isMinter(address account) public view returns (bool) {\n return _minters.has(account);\n }\n\n function addMinter(address account) public onlyMinter {\n _addMinter(account);\n }\n\n function renounceMinter() public {\n _removeMinter(msg.sender);\n }\n\n function _addMinter(address account) internal {\n _minters.add(account);\n emit MinterAdded(account);\n }\n\n function _removeMinter(address account) internal {\n _minters.remove(account);\n emit MinterRemoved(account);\n }\n\n uint256[50] private ______gap;\n}\n\n// File: contracts/token/MockERC721/MockERC721MetadataMintable.sol\n\n\n\n\n\n/**\n * @title MockERC721MetadataMintable\n * @dev MockERC721 minting logic with metadata\n */\ncontract MockERC721MetadataMintable is Initializable, MockERC721, MockERC721Metadata, MinterRole {\n function initializeMockERC721MetadataMintable(address sender) public initializer {\n require(MockERC721._hasBeenInitializedMockERC721());\n require(MockERC721Metadata._hasBeenInitialized());\n MinterRole.initializeMinterRole(sender);\n }\n\n // function _burn(address owner, uint256 tokenId) internal override(MockERC721Metadata) {\n // MockERC721Metadata._burn(owner, tokenId);\n // }\n\n /**\n * @dev Function to mint tokens\n * @param to The address that will receive the minted tokens.\n * @param tokenId The token id to mint.\n * @param tokenURI The token URI of the minted token.\n * @return A boolean that indicates if the operation was successful.\n */\n function mintWithTokenURI(address to, uint256 tokenId, string memory tokenURI) public onlyMinter returns (bool) {\n _mintMockERC721(to, tokenId);\n _setTokenURI(tokenId, tokenURI);\n return true;\n }\n\n uint256[50] private ______gap;\n}\n\n// File: contracts/access/roles/PauserRole.sol\n\n\n\n\ncontract PauserRole is Initializable {\n using Roles for Roles.Role;\n\n event PauserAdded(address indexed account);\n event PauserRemoved(address indexed account);\n\n Roles.Role private _pausers;\n\n function initializePauserRole(address sender) public initializer {\n if (!isPauser(sender)) {\n _addPauser(sender);\n }\n }\n\n modifier onlyPauser() {\n require(isPauser(msg.sender));\n _;\n }\n\n function isPauser(address account) public view returns (bool) {\n return _pausers.has(account);\n }\n\n function addPauser(address account) public onlyPauser {\n _addPauser(account);\n }\n\n function renouncePauser() public {\n _removePauser(msg.sender);\n }\n\n function _addPauser(address account) internal {\n _pausers.add(account);\n emit PauserAdded(account);\n }\n\n function _removePauser(address account) internal {\n _pausers.remove(account);\n emit PauserRemoved(account);\n }\n\n uint256[50] private ______gap;\n}\n\n// File: contracts/lifecycle/Pausable.sol\n\n\n\n/**\n * @title Pausable\n * @dev Base contract which allows children to implement an emergency stop mechanism.\n */\ncontract Pausable is Initializable, PauserRole {\n event Paused(address account);\n event Unpaused(address account);\n\n bool private _paused;\n\n function initializePausable(address sender) public initializer {\n PauserRole.initializePauserRole(sender);\n\n _paused = false;\n }\n\n /**\n * @return true if the contract is paused, false otherwise.\n */\n function paused() public view returns (bool) {\n return _paused;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is not paused.\n */\n modifier whenNotPaused() {\n require(!_paused);\n _;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is paused.\n */\n modifier whenPaused() {\n require(_paused);\n _;\n }\n\n /**\n * @dev called by the owner to pause, triggers stopped state\n */\n function pause() public onlyPauser whenNotPaused {\n _paused = true;\n emit Paused(msg.sender);\n }\n\n /**\n * @dev called by the owner to unpause, returns to normal state\n */\n function unpause() public onlyPauser whenPaused {\n _paused = false;\n emit Unpaused(msg.sender);\n }\n\n uint256[50] private ______gap;\n}\n\n// File: contracts/token/MockERC721/MockERC721Pausable.sol\n\n\n\n\n/**\n * @title MockERC721 Non-Fungible Pausable token\n * @dev MockERC721 modified with pausable transfers.\n **/\ncontract MockERC721Pausable is Initializable, MockERC721, Pausable {\n function initialize(address sender) public initializer {\n require(MockERC721._hasBeenInitializedMockERC721());\n Pausable.initializePausable(sender);\n }\n\n function approve(address to, uint256 tokenId) public whenNotPaused {\n super.approveMockERC721(to, tokenId);\n }\n\n function setApprovalForAll(address to, bool approved) public whenNotPaused {\n super.setApprovalForAllMockERC721(to, approved);\n }\n\n function transferFrom(address from, address to, uint256 tokenId) public whenNotPaused {\n super.transferFromMockERC721(from, to, tokenId);\n }\n\n uint256[50] private ______gap;\n}\n\n// File: contracts/token/MockERC721/StandaloneMockERC721.sol\n\n\n\n\n\n\n\n\n/**\n * @title Standard MockERC721 token, with minting and pause functionality.\n *\n */\ncontract MockStandaloneERC721\n is Initializable, MockERC721, MockERC721Enumerable, MockERC721Metadata, MockERC721MetadataMintable, MockERC721Pausable\n{\n function initialize(string memory name, string memory symbol, address[] memory minters, address[] memory pausers) public initializer {\n MockERC721.initialize();\n MockERC721Enumerable.initializeMockERC721Enumerable();\n MockERC721Metadata.initialize(name, symbol);\n\n // Initialize the minter and pauser roles, and renounce them\n MockERC721MetadataMintable.initializeMockERC721MetadataMintable(address(this));\n _removeMinter(address(this));\n\n MockERC721Pausable.initialize(address(this));\n _removePauser(address(this));\n\n // Add the requested minters and pausers (this can be done after renouncing since\n // these are the internal calls)\n for (uint256 i = 0; i < minters.length; ++i) {\n _addMinter(minters[i]);\n }\n\n for (uint256 i = 0; i < pausers.length; ++i) {\n _addPauser(pausers[i]);\n }\n }\n\n // function transferFrom(address from, address to, uint256 tokenId) public override {\n // require(_isApprovedOrOwner(msg.sender, tokenId));\n //\n // _transferFrom(from, to, tokenId);\n // }\n\n // function setApprovalForAll(address to, bool approved) public override {\n // MockERC721.setApprovalForAll(to, approved);\n // }\n\n // function initialize(address sender) public initializer override {\n // require(MockERC721._hasBeenInitializedMockERC721());\n // require(MockERC721Metadata._hasBeenInitialized());\n // MinterRole.initialize(sender);\n // }\n\n // function initialize() public initializer override(ERC165) {\n // ERC165.initializeERC165();\n // }\n function _burn(address owner, uint256 tokenId) internal override(MockERC721Enumerable,MockERC721Metadata) {\n MockERC721Enumerable._burn(owner, tokenId);\n MockERC721Metadata._burn(owner, tokenId);\n\n }\n function _hasBeenInitialized() internal view override(MockERC721Enumerable, MockERC721Metadata) returns (bool) {\n MockERC721Enumerable._hasBeenInitialized();\n MockERC721Metadata._hasBeenInitialized();\n\n }\n\n function _mint(address to, uint256 tokenId) internal override(MockERC721Enumerable) {\n MockERC721Enumerable._mint(to,tokenId);\n }\n}\n",
"sourcePath": "contracts/mocks/MockStandaloneERC721.sol",
"sourceMap": "19954:8694:13:-:0;;;;;;;;;;;;;;;;;;;;;;",
"deployedSourceMap": "19954:8694:13:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7018:140;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;11280:152;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;21976:103;;;:::i;:::-;;;;;;;;;;;;;;;;;;;21633:191;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;6822:105;;;:::i;:::-;;13702:133;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;22416:157;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;12847:208;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;10095:177;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;9721:150;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;9140:227;;;:::i;:::-;;10693:302;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;14548:226;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;20833:275;;;:::i;:::-;;11724:223;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;12268:146;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;7018:140;7095:4;7118:20;;;:33;7139:11;7118:33;;;;;;;;;;;;;;;;;;;;;;;;;;;7111:40;;;;7018:140;;;;:::o;11280:152::-;11340:7;11367:16;11375:7;11367;:16;;:::i;:::-;11359:25;;;;;;;;11401:15;;;:24;11417:7;11401:24;;;;;;;;;;;;;;;;;;;;;11394:31;;;;11280:152;;;;:::o;21976:103::-;22029:7;22055:10;;;:17;;;;22048:24;;;;21976:103;;:::o;21633:191::-;21722:7;21757:16;21767:5;21757:9;:16;;:::i;:::-;21749:5;:24;21741:33;;;;;;;;21791:12;;;:19;21804:5;21791:19;;;;;;;;;;;;;;;;;21811:5;21791:26;;;;;;;;;;;;;;;;;;;;;;21784:33;;;;21633:191;;;;;:::o;6822:105::-;1056:12:0;;;;;;;;;;;:31;;;;1072:15;:13;:15;;:::i;:::-;1056:31;:47;;;;1092:11;;;;;;;;;;;1091:12;1056:47;1048:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1161:19;1184:12;;;;;;;;;;;1183:13;1161:35;;1206:14;1202:80;;;1245:4;1230:12;;:19;;;;;;;;;;;;;;;;;;1271:4;1257:11;;:18;;;;;;;;;;;;;;;;;;1202:80;6880:40:13::1;6452:10;6899:20;;6880:18;:40;;:::i;:::-;1288:1:0;1300:14:::0;1296:55;;;1339:5;1324:12;;:20;;;;;;;;;;;;;;;;;;1296:55;6822:105:13;;:::o;13702:133::-;13789:39;13806:4;13812:2;13816:7;13789:39;;;;;;;;;;;;;;:16;:39;;:::i;:::-;13702:133;;;;:::o;22416:157::-;22483:7;22518:13;:11;:13;;:::i;:::-;22510:5;:21;22502:30;;;;;;;;22549:10;;;22560:5;22549:17;;;;;;;;;;;;;;;;;;;;;;22542:24;;;;22416:157;;;;:::o;12847:208::-;12955:39;12974:10;12986:7;12955:18;:39;;:::i;:::-;12947:48;;;;;;;;13006:42;13030:4;13036:2;13040:7;13006:23;:42;;:::i;:::-;12847:208;;;;:::o;10095:177::-;10150:7;10169:13;10185:11;;;:20;10197:7;10185:20;;;;;;;;;;;;;;;;;;;;;10169:36;;10240:1;10223:19;;:5;:19;;;;10215:28;;;;;;;;10260:5;10253:12;;;;;10095:177;;;;;:::o;9721:150::-;9776:7;9820:1;9803:19;;:5;:19;;;;9795:28;;;;;;;;9840:17;;;:24;9858:5;9840:24;;;;;;;;;;;;;;;;;;9833:31;;;;9721:150;;;;:::o;9140:227::-;1056:12:0;;;;;;;;;;;:31;;;;1072:15;:13;:15;;:::i;:::-;1056:31;:47;;;;1092:11;;;;;;;;;;;1091:12;1056:47;1048:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1161:19;1184:12;;;;;;;;;;;1183:13;1161:35;;1206:14;1202:80;;;1245:4;1230:12;;:19;;;;;;;;;;;;;;;;;;1271:4;1257:11;;:18;;;;;;;;;;;;;;;;;;1202:80;9199:25:13::1;:23;:25;;:::i;:::-;9316:44;8506:10;9335:24;;9316:18;:44;;:::i;:::-;1288:1:0;1300:14:::0;1296:55;;;1339:5;1324:12;;:20;;;;;;;;;;;;;;;;;;1296:55;9140:227:13;;:::o;10693:302::-;10766:13;10782:16;10790:7;10782;:16;;:::i;:::-;10766:32;;10822:5;10816:11;;:2;:11;;;;10808:20;;;;;;;;10860:5;10846:19;;:10;:19;;;:58;;;;10869:35;10886:5;10893:10;10869:16;:35;;:::i;:::-;10846:58;10838:67;;;;;;;;10943:2;10916:15;;;:24;10932:7;10916:24;;;;;;;;;;;;:29;;;;;;;;;;;;;;;;;;10980:7;10976:2;10960:28;;10969:5;10960:28;;;;;;;;;;;;10693:302;;;;:::o;14548:226::-;14655:41;14678:4;14684:2;14688:7;14655:22;:41;;:::i;:::-;14714:52;14741:4;14747:2;14751:7;14760:5;14714:26;:52;;:::i;:::-;14706:61;;;;;;;;14548:226;;;;;:::o;20833:275::-;1056:12:0;;;;;;;;;;;:31;;;;1072:15;:13;:15;;:::i;:::-;1056:31;:47;;;;1092:11;;;;;;;;;;;1091:12;1056:47;1048:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1161:19;1184:12;;;;;;;;;;;1183:13;1161:35;;1206:14;1202:80;;;1245:4;1230:12;;:19;;;;;;;;;;;;;;;;;;1271:4;1257:11;;:18;;;;;;;;;;;;;;;;;;1202:80;20912:42:13::1;:40;:42;;:::i;:::-;20904:51;;;;;;;;21046:55;20556:10;21065:35;;21046:18;:55;;:::i;:::-;1288:1:0;1300:14:::0;1296:55;;;1339:5;1324:12;;:20;;;;;;;;;;;;;;;;;;1296:55;20833:275:13;;:::o;11724:223::-;11819:10;11813:16;;:2;:16;;;;11805:25;;;;;;;;11877:8;11840:18;;;:30;11859:10;11840:30;;;;;;;;;;;;;;;;;:34;11871:2;11840:34;;;;;;;;;;;;;;;;:45;;;;;;;;;;;;;;;;;;11927:2;11900:40;;11915:10;11900:40;;;11931:8;11900:40;;;;;;;;;;;;;;;;;;;;;;11724:223;;;:::o;12268:146::-;12349:4;12372:18;;;:25;12391:5;12372:25;;;;;;;;;;;;;;;;;:35;12398:8;12372:35;;;;;;;;;;;;;;;;;;;;;;;;;12365:42;;;;12268:146;;;;;:::o;14963:152::-;15020:4;15036:13;15052:11;;;:20;15064:7;15052:20;;;;;;;;;;;;;;;;;;;;;15036:36;;15106:1;15089:19;;:5;:19;;;;15082:26;;;;;14963:152;;;;;:::o;1441:498:0:-;1488:4;1829:12;1852:4;1829:28;;1863:10;1908:4;1896:17;1890:23;;1933:1;1927:2;:7;1920:14;;;;;;1441:498;;;;:::o;7237:158:13:-;7327:10;7312:25;;:11;:25;;;;;7304:34;;;;;;;;7384:4;7348:20;;;:33;7369:11;7348:33;;;;;;;;;;;;;;;;;;:40;;;;;;;;;;;;;;;;;;7237:158;;:::o;15478:246::-;15563:4;15579:13;15595:16;15603:7;15595;:16;;:::i;:::-;15579:32;;15640:5;15629:16;;:7;:16;;;:51;;;;15673:7;15649:31;;:20;15661:7;15649:11;:20;;:::i;:::-;:31;;;15629:51;:87;;;;15684:32;15701:5;15708:7;15684:16;:32;;:::i;:::-;15629:87;15621:96;;;;;15478:246;;;;;;:::o;17497:413::-;17621:4;17601:24;;:16;17609:7;17601;:16;;:::i;:::-;:24;;;17593:33;;;;;;;;17658:1;17644:16;;:2;:16;;;;17636:25;;;;;;;;17672:23;17687:7;17672:14;:23;;:::i;:::-;17732:30;17760:1;17732:17;;;:23;17750:4;17732:23;;;;;;;;;;;;;;;;;;:27;;:30;;;;:::i;:::-;17706:17;;;:23;17724:4;17706:23;;;;;;;;;;;;;;;;:56;;;;;;;17796:28;17822:1;17796:17;;;:21;17814:2;17796:21;;;;;;;;;;;;;;;;;;:25;;:28;;;;:::i;:::-;17772:17;;;:21;17790:2;17772:21;;;;;;;;;;;;;;;;:52;;;;;;;17858:2;17835:11;;;:20;17847:7;17835:20;;;;;;;;;;;;:25;;;;;;;;;;;;;;;;;;17895:7;17891:2;17876:27;;17885:4;17876:27;;;;;;;;;;;;17497:413;;;;:::o;18437:363::-;18562:4;18587:15;:2;:13;;;;:15;;;:::i;:::-;18586:16;18582:58;;;18625:4;18618:11;;;;18582:58;18650:13;18686:2;18666:44;;;18711:10;18723:4;18729:7;18738:5;18666:78;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;18650:94;;7997:10;18772:20;;18762:30;;;:6;:30;;;;18754:39;;;;;18437:363;;;;;;;;:::o;9373:145::-;9445:4;9468:43;8506:10;9486:24;;9468:17;:43;;:::i;:::-;9461:50;;;;9373:145;;:::o;18961:171::-;19060:1;19024:38;;:15;;;:24;19040:7;19024:24;;;;;;;;;;;;;;;;;;;;;:38;;;;19020:106;;;19113:1;19078:15;;;:24;19094:7;19078:24;;;;;;;;;;;;:37;;;;;;;;;;;;;;;;;;19020:106;18961:171;;:::o;4460:145::-;4518:7;4550:1;4545;:6;;4537:15;;;;;;;;4562:9;4578:1;4574;:5;4562:17;;4597:1;4590:8;;;;;4460:145;;;;;;:::o;4686:::-;4744:7;4763:9;4779:1;4775;:5;4763:17;;4803:1;4798;:6;;4790:15;;;;;;;;4823:1;4816:8;;;;;4686:145;;;;;;:::o;5584:616::-;5644:4;5660:12;6159:7;6147:20;6139:28;;6192:1;6185:4;:8;6178:15;;;;;5584:616;;;;;:::o",
"abi": [
{
"anonymous": fals