Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
0x60806040 | 14310276 | 947 days ago | IN | 0 ETH | 0.30196172 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
MossLandNFT
Compiler Version
v0.8.8+commit.dddeac2f
Optimization Enabled:
Yes with 1000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
//SPDX-License-Identifier: MIT pragma solidity ^0.8.8; import "./LandNFT_Authorization.sol"; contract MossLandNFT is LandNFT_Authorization { enum ProjectType { GOVERNANCE, PROPERTY } struct Project { uint256 id; uint256 totalHectares; uint256 totalSupply; uint256 inflationCooldownPeriod; uint256 nextInflationAt; ProjectType projectType; bool created; } uint256 public constant HECTARE_TOKEN_INFLATION_RATE_FACTOR = 10000; string public name; string public symbol; string public description; address public owner; // for opensea uint256[] public tokenIds; // list of token ids - order is not important mapping(uint256 => Project) public projects; mapping(uint256 => string) private _tokenURIs; mapping(uint256 => string[]) public tokenResources; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); event ProjectAdded(address sender, Project project); event ResourceAdded(address sender, uint256 indexed projectId, string uri); event TokenInflation(uint256 tokenId, uint256 ratio, address sender); function initialize( string calldata __uri, string calldata _name, string calldata _symbol, string calldata _description, address operator, address _owner ) public initializer { __ERC1155_init(__uri); __EIP712_init("LandNFT", "1"); _setupRole(DEFAULT_ADMIN_ROLE, operator); _setupRole(MINTER_ROLE, operator); _setupRole(BURNER_ROLE, operator); _setupRole(OPERATOR_ROLE, operator); _setupRole(ADMIN_ROLE, operator); name = _name; symbol = _symbol; description = _description; owner = _owner; emit OwnershipTransferred(address(0), msg.sender); } /************************************** ROLE-RESTRICTED WRITE FUNCTIONS ***************************************/ function addProject( uint256 id, string calldata cid, uint256 hectares, uint256 cooldown, ProjectType projectType ) external onlyMinter { require(hectares > 0, "LandNFT: invalid hectares"); require(cooldown > 0, "LandNFT: invalid cooldown period"); require(bytes(cid).length > 0, "LandNFT: empty cid"); require(!projects[id].created, "LandNFT: project already added"); tokenIds.push(id); projects[id] = Project({ id: id, totalHectares: hectares, totalSupply: hectares, inflationCooldownPeriod: cooldown, nextInflationAt: block.timestamp + cooldown, created: true, projectType: projectType }); _mint(msg.sender, id, hectares, new bytes(0)); _setTokenURI(id, cid); emit ProjectAdded(msg.sender, projects[id]); } function addResource( uint256 id, string calldata resource ) external onlyOperator { require(isRegistered(id), "MossLandNFT: Project not registered"); tokenResources[id].push(resource); emit ResourceAdded(msg.sender, id, resource); } function inflate( uint256 projectId, uint256 increase ) public onlyMinter { Project storage project = projects[projectId]; require(project.created, "LandNFT: project not registered"); require(increase != 0, "LandNFT: increase ratio cannot be zero"); require(block.timestamp > project.nextInflationAt, "LandNFT: project is in cooldown period"); uint256 additionalAmount = project.totalSupply * increase/ HECTARE_TOKEN_INFLATION_RATE_FACTOR; project.totalSupply += additionalAmount; project.nextInflationAt += project.nextInflationAt + project.inflationCooldownPeriod; _mint(msg.sender, projectId, additionalAmount, new bytes(0)); emit TokenInflation(projectId, additionalAmount, msg.sender); } function burn( address account, uint256 id, uint256 value ) public override onlyBurner { _burn(account, id, value); projects[id].totalSupply -= value; } function burnBatch( address account, uint256[] calldata ids, uint256[] calldata values ) public override onlyBurner { _burnBatch(account, ids, values); for (uint256 i = 0; i < ids.length; i++) { projects[ids[i]].totalSupply -= values[i]; } } function updateTokenURI( uint256 id, string memory cid ) external onlyAdmin { require(projects[id].created, "LandNFT: token not registered"); _setTokenURI(id, cid); } /** * @dev Internal function to set the token cid for a given token. * @param tokenId uint256 ID of the token to set its URI * @param cid string ipfs cid to assign */ function _setTokenURI(uint256 tokenId, string memory cid) internal { _tokenURIs[tokenId] = string(abi.encodePacked(_uri, cid)); emit URI(_tokenURIs[tokenId], tokenId); } /** * @dev Updates owner * @param _newOwner new owner's address */ function setOwner(address _newOwner) external onlyAdmin { require(_newOwner != address(0), "LandNFT: invalid owner address"); emit OwnershipTransferred(owner, _newOwner); owner = _newOwner; } /** * @dev Updates owner * @param _newName new name * @param _newSymbol new symbol * @param _newDescription new description */ function updateParams( string calldata _newName, string calldata _newSymbol, string calldata _newDescription ) external onlyAdmin { name = _newName; symbol = _newSymbol; description = _newDescription; } /************************************** READ FUNCTIONS ***************************************/ function isRegistered( uint256 id ) public view returns (bool) { return projects[id].created; } function getRegisteredTokens() external view returns (uint256[] memory) { return tokenIds; } function hectaresBalanceOf(address account, uint256 id) public view returns (uint256 balance, uint256 totalSupply, uint256 totalHectares) { balance = super.balanceOf(account, id); totalSupply = projects[id].totalSupply; totalHectares = projects[id].totalHectares; } function balancesOf( address wallet ) external view returns (uint256[] memory tokens, uint256[] memory balances) { tokens = tokenIds; balances = new uint256[](tokens.length); for (uint256 i = 0; i < tokens.length; ++i) { balances[i] = balanceOf(wallet, tokens[i]); } } function uri(uint256 _id) public view override returns (string memory) { return _tokenURI(_id); } /** * @dev Returns an URI for a given token ID. If tokenId is 0, returns _uri * @param tokenId uint256 ID of the token to query */ function _tokenURI(uint256 tokenId) internal view returns (string memory) { if (tokenId == 0) return _uri; return _tokenURIs[tokenId]; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.8; import "@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol"; import "./LandNFT_Roles.sol"; /** * @dev Adaptation of OpenZeppelin's ERC20Permit */ contract LandNFT_Authorization is LandNFT_Roles, EIP712Upgradeable { mapping(address => mapping(bytes32 => bool)) internal _authorizationStates; event AuthorizationUsed(address indexed authorizer, bytes32 indexed nonce); // solhint-disable-next-line var-name-mixedcase bytes32 private constant _AUTHORIZATION_TYPEHASH = keccak256("Authorization(address owner,address operator,bool approved,bytes32 nonce,uint256 deadline)"); /** * @dev See {IERC20Permit-permit}. */ function authorize( address owner, address operator, bool approved, bytes32 nonce, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) public onlyOperator { // solhint-disable-next-line not-rely-on-time require(block.timestamp <= deadline, "LandNFT_Authorization: expired deadline"); require( !_authorizationStates[owner][nonce], "LandNFT_Authorization: authorization is used" ); bytes32 structHash = keccak256( abi.encode( _AUTHORIZATION_TYPEHASH, owner, operator, approved, nonce, deadline ) ); bytes32 hash = _hashTypedDataV4(structHash); address signer = ECDSAUpgradeable.recover(hash, v, r, s); require(signer == owner, "LandNFT_Authorization: invalid signature"); _authorizationStates[owner][nonce] = true; _setApprovalForAll(owner, operator, approved); emit AuthorizationUsed(owner, nonce); } function _setApprovalForAll(address owner, address operator, bool approved) internal { require(owner != operator, "ERC1155: setting approval status for self"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } function authorizationState(address authorizer, bytes32 nonce) external view returns (bool) { return _authorizationStates[authorizer][nonce]; } /** * @dev See {IERC20Permit-DOMAIN_SEPARATOR}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32) { return _domainSeparatorV4(); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./ECDSAUpgradeable.sol"; import "../../proxy/utils/Initializable.sol"; /** * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data. * * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible, * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding * they need in their contracts using a combination of `abi.encode` and `keccak256`. * * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA * ({_hashTypedDataV4}). * * The implementation of the domain separator was designed to be as efficient as possible while still properly updating * the chain id to protect against replay attacks on an eventual fork of the chain. * * NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask]. * * _Available since v3.4._ */ abstract contract EIP712Upgradeable is Initializable { /* solhint-disable var-name-mixedcase */ bytes32 private _HASHED_NAME; bytes32 private _HASHED_VERSION; bytes32 private constant _TYPE_HASH = keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"); /* solhint-enable var-name-mixedcase */ /** * @dev Initializes the domain separator and parameter caches. * * The meaning of `name` and `version` is specified in * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]: * * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol. * - `version`: the current major version of the signing domain. * * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart * contract upgrade]. */ function __EIP712_init(string memory name, string memory version) internal initializer { __EIP712_init_unchained(name, version); } function __EIP712_init_unchained(string memory name, string memory version) internal initializer { bytes32 hashedName = keccak256(bytes(name)); bytes32 hashedVersion = keccak256(bytes(version)); _HASHED_NAME = hashedName; _HASHED_VERSION = hashedVersion; } /** * @dev Returns the domain separator for the current chain. */ function _domainSeparatorV4() internal view returns (bytes32) { return _buildDomainSeparator(_TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash()); } function _buildDomainSeparator( bytes32 typeHash, bytes32 nameHash, bytes32 versionHash ) private view returns (bytes32) { return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this))); } /** * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this * function returns the hash of the fully encoded EIP712 message for this domain. * * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example: * * ```solidity * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode( * keccak256("Mail(address to,string contents)"), * mailTo, * keccak256(bytes(mailContents)) * ))); * address signer = ECDSA.recover(digest, signature); * ``` */ function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) { return ECDSAUpgradeable.toTypedDataHash(_domainSeparatorV4(), structHash); } /** * @dev The hash of the name parameter for the EIP712 domain. * * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs * are a concern. */ function _EIP712NameHash() internal virtual view returns (bytes32) { return _HASHED_NAME; } /** * @dev The hash of the version parameter for the EIP712 domain. * * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs * are a concern. */ function _EIP712VersionHash() internal virtual view returns (bytes32) { return _HASHED_VERSION; } uint256[50] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSAUpgradeable { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } else if (error == RecoverError.InvalidSignatureV) { revert("ECDSA: invalid signature 'v' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { // Check the signature length // - case 65: r,s,v signature (standard) // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._ if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else if (signature.length == 64) { bytes32 r; bytes32 vs; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) vs := mload(add(signature, 0x40)) } return tryRecover(hash, r, vs); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s; uint8 v; assembly { s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) v := add(shr(255, vs), 27) } return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } if (v != 27 && v != 28) { return (address(0), RecoverError.InvalidSignatureV); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
//SPDX-License-Identifier: none pragma solidity ^0.8.8; import "@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol"; import "./ERC1155/extensions/ERC1155BurnableUpgradeable.sol"; import "./ERC1155/extensions/ERC1155PausableUpgradeable.sol"; import "./ERC1155/ERC1155Upgradeable.sol"; contract LandNFT_Roles is ERC1155Upgradeable, AccessControlEnumerableUpgradeable, ERC1155BurnableUpgradeable, ERC1155PausableUpgradeable { bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); bytes32 public constant BURNER_ROLE = keccak256("BURNER_ROLE"); bytes32 public constant OPERATOR_ROLE = keccak256("OPERATOR_ROLE"); bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); modifier onlyMinter() { require(hasRole(MINTER_ROLE, _msgSender()), "LandNFT: caller is not a MINTER"); _; } modifier onlyOperator() { require(hasRole(OPERATOR_ROLE, _msgSender()), "LandNFT: caller is not an OPERATOR"); _; } modifier onlyBurner() { require(hasRole(BURNER_ROLE, _msgSender()), "LandNFT: caller is not a BURNER"); _; } modifier onlyAdmin() { require(hasRole(ADMIN_ROLE, _msgSender()), "LandNFT: caller is not an ADMIN"); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(AccessControlEnumerableUpgradeable, ERC1155Upgradeable) returns (bool) { return super.supportsInterface(interfaceId); } function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual override(ERC1155Upgradeable, ERC1155PausableUpgradeable) { super._beforeTokenTransfer(operator, from, to, ids, amounts, data); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Modifier to protect an initializer function from being invoked twice. */ modifier initializer() { require(_initializing || !_initialized, "Initializable: contract is already initialized"); bool isTopLevelCall = !_initializing; if (isTopLevelCall) { _initializing = true; _initialized = true; } _; if (isTopLevelCall) { _initializing = false; } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IAccessControlEnumerableUpgradeable.sol"; import "./AccessControlUpgradeable.sol"; import "../utils/structs/EnumerableSetUpgradeable.sol"; import "../proxy/utils/Initializable.sol"; /** * @dev Extension of {AccessControl} that allows enumerating the members of each role. */ abstract contract AccessControlEnumerableUpgradeable is Initializable, IAccessControlEnumerableUpgradeable, AccessControlUpgradeable { function __AccessControlEnumerable_init() internal initializer { __Context_init_unchained(); __ERC165_init_unchained(); __AccessControl_init_unchained(); __AccessControlEnumerable_init_unchained(); } function __AccessControlEnumerable_init_unchained() internal initializer { } using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet; mapping(bytes32 => EnumerableSetUpgradeable.AddressSet) private _roleMembers; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControlEnumerableUpgradeable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns one of the accounts that have `role`. `index` must be a * value between 0 and {getRoleMemberCount}, non-inclusive. * * Role bearers are not sorted in any particular way, and their ordering may * change at any point. * * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure * you perform all queries on the same block. See the following * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] * for more information. */ function getRoleMember(bytes32 role, uint256 index) public view override returns (address) { return _roleMembers[role].at(index); } /** * @dev Returns the number of accounts that have `role`. Can be used * together with {getRoleMember} to enumerate all bearers of a role. */ function getRoleMemberCount(bytes32 role) public view override returns (uint256) { return _roleMembers[role].length(); } /** * @dev Overload {grantRole} to track enumerable memberships */ function grantRole(bytes32 role, address account) public virtual override(AccessControlUpgradeable, IAccessControlUpgradeable) { super.grantRole(role, account); _roleMembers[role].add(account); } /** * @dev Overload {revokeRole} to track enumerable memberships */ function revokeRole(bytes32 role, address account) public virtual override(AccessControlUpgradeable, IAccessControlUpgradeable) { super.revokeRole(role, account); _roleMembers[role].remove(account); } /** * @dev Overload {renounceRole} to track enumerable memberships */ function renounceRole(bytes32 role, address account) public virtual override(AccessControlUpgradeable, IAccessControlUpgradeable) { super.renounceRole(role, account); _roleMembers[role].remove(account); } /** * @dev Overload {_setupRole} to track enumerable memberships */ function _setupRole(bytes32 role, address account) internal virtual override { super._setupRole(role, account); _roleMembers[role].add(account); } uint256[49] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../ERC1155Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; /** * @dev Extension of {ERC1155} that allows token holders to destroy both their * own tokens and those that they have been approved to use. * * _Available since v3.1._ */ abstract contract ERC1155BurnableUpgradeable is Initializable, ERC1155Upgradeable { function __ERC1155Burnable_init() internal initializer { __Context_init_unchained(); __ERC165_init_unchained(); __ERC1155Burnable_init_unchained(); } function __ERC1155Burnable_init_unchained() internal initializer { } function burn(address account, uint256 id, uint256 value) public virtual { require( account == _msgSender() || isApprovedForAll(account, _msgSender()), "ERC1155: caller is not owner nor approved" ); _burn(account, id, value); } function burnBatch(address account, uint256[] memory ids, uint256[] memory values) public virtual { require( account == _msgSender() || isApprovedForAll(account, _msgSender()), "ERC1155: caller is not owner nor approved" ); _burnBatch(account, ids, values); } uint256[50] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../ERC1155Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; /** * @dev ERC1155 token with pausable token transfers, minting and burning. * * Useful for scenarios such as preventing trades until the end of an evaluation * period, or having an emergency switch for freezing all token transfers in the * event of a large bug. * * _Available since v3.1._ */ abstract contract ERC1155PausableUpgradeable is Initializable, ERC1155Upgradeable, PausableUpgradeable { function __ERC1155Pausable_init() internal initializer { __Context_init_unchained(); __ERC165_init_unchained(); __Pausable_init_unchained(); __ERC1155Pausable_init_unchained(); } function __ERC1155Pausable_init_unchained() internal initializer { } /** * @dev See {ERC1155-_beforeTokenTransfer}. * * Requirements: * * - the contract must not be paused. */ function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual override { super._beforeTokenTransfer(operator, from, to, ids, amounts, data); require(!paused(), "ERC1155Pausable: token transfer while paused"); } uint256[50] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC1155Upgradeable.sol"; import "./IERC1155ReceiverUpgradeable.sol"; import "./extensions/IERC1155MetadataURIUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; /** * @dev Implementation of the basic standard multi-token. * See https://eips.ethereum.org/EIPS/eip-1155 * Originally based on code by Enjin: https://github.com/enjin/erc-1155 * * _Available since v3.1._ */ contract ERC1155Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC1155Upgradeable, IERC1155MetadataURIUpgradeable { using AddressUpgradeable for address; // Mapping from token ID to account balances mapping (uint256 => mapping(address => uint256)) private _balances; // Mapping from account to operator approvals mapping (address => mapping(address => bool)) internal _operatorApprovals; // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json string internal _uri; /** * @dev See {_setURI}. */ function __ERC1155_init(string memory uri_) internal initializer { __Context_init_unchained(); __ERC165_init_unchained(); __ERC1155_init_unchained(uri_); } function __ERC1155_init_unchained(string memory uri_) internal initializer { _setURI(uri_); } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165Upgradeable) returns (bool) { return interfaceId == type(IERC1155Upgradeable).interfaceId || interfaceId == type(IERC1155MetadataURIUpgradeable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC1155MetadataURI-uri}. * * This implementation returns the same URI for *all* token types. It relies * on the token type ID substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * Clients calling this function must replace the `\{id\}` substring with the * actual token type ID. */ function uri(uint256) public view virtual override returns (string memory) { return _uri; } /** * @dev See {IERC1155-balanceOf}. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) public view virtual override returns (uint256) { require(account != address(0), "ERC1155: balance query for the zero address"); return _balances[id][account]; } /** * @dev See {IERC1155-balanceOfBatch}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch( address[] memory accounts, uint256[] memory ids ) public view virtual override returns (uint256[] memory) { require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch"); uint256[] memory batchBalances = new uint256[](accounts.length); for (uint256 i = 0; i < accounts.length; ++i) { batchBalances[i] = balanceOf(accounts[i], ids[i]); } return batchBalances; } /** * @dev See {IERC1155-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { require(_msgSender() != operator, "ERC1155: setting approval status for self"); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC1155-isApprovedForAll}. */ function isApprovedForAll(address account, address operator) public view virtual override returns (bool) { return _operatorApprovals[account][operator]; } /** * @dev See {IERC1155-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) public virtual override { require(to != address(0), "ERC1155: transfer to the zero address"); require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: caller is not owner nor approved" ); address operator = _msgSender(); _beforeTokenTransfer(operator, from, to, _asSingletonArray(id), _asSingletonArray(amount), data); uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); _balances[id][from] = fromBalance - amount; _balances[id][to] += amount; emit TransferSingle(operator, from, to, id, amount); _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data); } /** * @dev See {IERC1155-safeBatchTransferFrom}. */ function safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) public virtual override { require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); require(to != address(0), "ERC1155: transfer to the zero address"); require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: transfer caller is not owner nor approved" ); address operator = _msgSender(); _beforeTokenTransfer(operator, from, to, ids, amounts, data); for (uint256 i = 0; i < ids.length; ++i) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); _balances[id][from] = fromBalance - amount; _balances[id][to] += amount; } emit TransferBatch(operator, from, to, ids, amounts); _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data); } /** * @dev Sets a new URI for all token types, by relying on the token type ID * substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * By this mechanism, any occurrence of the `\{id\}` substring in either the * URI or any of the amounts in the JSON file at said URI will be replaced by * clients with the token type ID. * * For example, the `https://token-cdn-domain/\{id\}.json` URI would be * interpreted by clients as * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json` * for token type ID 0x4cce0. * * See {uri}. * * Because these URIs cannot be meaningfully represented by the {URI} event, * this function emits no events. */ function _setURI(string memory newuri) internal virtual { _uri = newuri; } /** * @dev Creates `amount` tokens of token type `id`, and assigns them to `account`. * * Emits a {TransferSingle} event. * * Requirements: * * - `account` cannot be the zero address. * - If `account` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mint(address account, uint256 id, uint256 amount, bytes memory data) internal virtual { require(account != address(0), "ERC1155: mint to the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, address(0), account, _asSingletonArray(id), _asSingletonArray(amount), data); _balances[id][account] += amount; emit TransferSingle(operator, address(0), account, id, amount); _doSafeTransferAcceptanceCheck(operator, address(0), account, id, amount, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _mintBatch(address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) internal virtual { require(to != address(0), "ERC1155: mint to the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, address(0), to, ids, amounts, data); for (uint i = 0; i < ids.length; i++) { _balances[ids[i]][to] += amounts[i]; } emit TransferBatch(operator, address(0), to, ids, amounts); _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data); } /** * @dev Destroys `amount` tokens of token type `id` from `account` * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens of token type `id`. */ function _burn(address account, uint256 id, uint256 amount) internal virtual { require(account != address(0), "ERC1155: burn from the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, account, address(0), _asSingletonArray(id), _asSingletonArray(amount), ""); uint256 accountBalance = _balances[id][account]; require(accountBalance >= amount, "ERC1155: burn amount exceeds balance"); _balances[id][account] = accountBalance - amount; emit TransferSingle(operator, account, address(0), id, amount); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}. * * Requirements: * * - `ids` and `amounts` must have the same length. */ function _burnBatch(address account, uint256[] memory ids, uint256[] memory amounts) internal virtual { require(account != address(0), "ERC1155: burn from the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, account, address(0), ids, amounts, ""); for (uint i = 0; i < ids.length; i++) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 accountBalance = _balances[id][account]; require(accountBalance >= amount, "ERC1155: burn amount exceeds balance"); _balances[id][account] = accountBalance - amount; } emit TransferBatch(operator, account, address(0), ids, amounts); } /** * @dev Hook that is called before any token transfer. This includes minting * and burning, as well as batched variants. * * The same hook is called on both single and batched variants. For single * transfers, the length of the `id` and `amount` arrays will be 1. * * Calling conditions (for each `id` and `amount` pair): * * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens * of token type `id` will be transferred to `to`. * - When `from` is zero, `amount` tokens of token type `id` will be minted * for `to`. * - when `to` is zero, `amount` of ``from``'s tokens of token type `id` * will be burned. * - `from` and `to` are never both zero. * - `ids` and `amounts` have the same, non-zero length. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { } function _doSafeTransferAcceptanceCheck( address operator, address from, address to, uint256 id, uint256 amount, bytes memory data ) private { if (to.isContract()) { try IERC1155ReceiverUpgradeable(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) { if (response != IERC1155ReceiverUpgradeable(to).onERC1155Received.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non ERC1155Receiver implementer"); } } } function _doSafeBatchTransferAcceptanceCheck( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) private { if (to.isContract()) { try IERC1155ReceiverUpgradeable(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (bytes4 response) { if (response != IERC1155ReceiverUpgradeable(to).onERC1155BatchReceived.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non ERC1155Receiver implementer"); } } } function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) { uint256[] memory array = new uint256[](1); array[0] = element; return array; } uint256[47] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IAccessControlUpgradeable.sol"; /** * @dev External interface of AccessControlEnumerable declared to support ERC165 detection. */ interface IAccessControlEnumerableUpgradeable is IAccessControlUpgradeable { /** * @dev Returns one of the accounts that have `role`. `index` must be a * value between 0 and {getRoleMemberCount}, non-inclusive. * * Role bearers are not sorted in any particular way, and their ordering may * change at any point. * * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure * you perform all queries on the same block. See the following * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] * for more information. */ function getRoleMember(bytes32 role, uint256 index) external view returns (address); /** * @dev Returns the number of accounts that have `role`. Can be used * together with {getRoleMember} to enumerate all bearers of a role. */ function getRoleMemberCount(bytes32 role) external view returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IAccessControlUpgradeable.sol"; import "../utils/ContextUpgradeable.sol"; import "../utils/StringsUpgradeable.sol"; import "../utils/introspection/ERC165Upgradeable.sol"; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ``` * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. */ abstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable { function __AccessControl_init() internal initializer { __Context_init_unchained(); __ERC165_init_unchained(); __AccessControl_init_unchained(); } function __AccessControl_init_unchained() internal initializer { } struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role, _msgSender()); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControlUpgradeable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function _checkRole(bytes32 role, address account) internal view { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", StringsUpgradeable.toHexString(uint160(account), 20), " is missing role ", StringsUpgradeable.toHexString(uint256(role), 32) ) ) ); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view override returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } function _grantRole(bytes32 role, address account) private { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } function _revokeRole(bytes32 role, address account) private { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } uint256[49] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. */ library EnumerableSetUpgradeable { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastvalue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastvalue; // Update the index for the moved value set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { return _values(set._inner); } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; assembly { result := store } return result; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControlUpgradeable { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../proxy/utils/Initializable.sol"; /** * @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 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. */ abstract contract ContextUpgradeable is Initializable { function __Context_init() internal initializer { __Context_init_unchained(); } function __Context_init_unchained() internal initializer { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } uint256[50] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev String operations. */ library StringsUpgradeable { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol 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); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC165Upgradeable.sol"; import "../../proxy/utils/Initializable.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable { function __ERC165_init() internal initializer { __ERC165_init_unchained(); } function __ERC165_init_unchained() internal initializer { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165Upgradeable).interfaceId; } uint256[50] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165Upgradeable { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol"; /** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. * * _Available since v3.1._ */ interface IERC1155Upgradeable is IERC165Upgradeable { /** * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); /** * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all * transfers. */ event TransferBatch(address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values); /** * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to * `approved`. */ event ApprovalForAll(address indexed account, address indexed operator, bool approved); /** * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. * * If an {URI} event was emitted for `id`, the standard * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value * returned by {IERC1155MetadataURI-uri}. */ event URI(string value, uint256 indexed id); /** * @dev Returns the amount of tokens of token type `id` owned by `account`. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) external view returns (uint256); /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory); /** * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, * * Emits an {ApprovalForAll} event. * * Requirements: * * - `operator` cannot be the caller. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns true if `operator` is approved to transfer ``account``'s tokens. * * See {setApprovalForAll}. */ function isApprovedForAll(address account, address operator) external view returns (bool); /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external; /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function safeBatchTransferFrom(address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol"; /** * @dev _Available since v3.1._ */ interface IERC1155ReceiverUpgradeable is IERC165Upgradeable { /** @dev Handles the receipt of a single ERC1155 token type. This function is called at the end of a `safeTransferFrom` after the balance has been updated. To accept the transfer, this must return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` (i.e. 0xf23a6e61, or its own function selector). @param operator The address which initiated the transfer (i.e. msg.sender) @param from The address which previously owned the token @param id The ID of the token being transferred @param value The amount of tokens being transferred @param data Additional data with no specified format @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed */ function onERC1155Received( address operator, address from, uint256 id, uint256 value, bytes calldata data ) external returns(bytes4); /** @dev Handles the receipt of a multiple ERC1155 token types. This function is called at the end of a `safeBatchTransferFrom` after the balances have been updated. To accept the transfer(s), this must return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` (i.e. 0xbc197c81, or its own function selector). @param operator The address which initiated the batch transfer (i.e. msg.sender) @param from The address which previously owned the token @param ids An array containing ids of each token being transferred (order and length must match values array) @param values An array containing amounts of each token being transferred (order and length must match ids array) @param data Additional data with no specified format @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed */ function onERC1155BatchReceived( address operator, address from, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external returns(bytes4); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC1155Upgradeable.sol"; /** * @dev Interface of the optional ERC1155MetadataExtension interface, as defined * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP]. * * _Available since v3.1._ */ interface IERC1155MetadataURIUpgradeable is IERC1155Upgradeable { /** * @dev Returns the URI for token type `id`. * * If the `\{id\}` substring is present in the URI, it must be replaced by * clients with the actual token type ID. */ function uri(uint256 id) external view returns (string memory); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract PausableUpgradeable is Initializable, ContextUpgradeable { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ function __Pausable_init() internal initializer { __Context_init_unchained(); __Pausable_init_unchained(); } function __Pausable_init_unchained() internal initializer { _paused = false; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { require(paused(), "Pausable: not paused"); _; } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } uint256[49] private __gap; }
{ "optimizer": { "enabled": true, "runs": 1000, "details": { "yul": false } }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","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":"authorizer","type":"address"},{"indexed":true,"internalType":"bytes32","name":"nonce","type":"bytes32"}],"name":"AuthorizationUsed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"sender","type":"address"},{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"totalHectares","type":"uint256"},{"internalType":"uint256","name":"totalSupply","type":"uint256"},{"internalType":"uint256","name":"inflationCooldownPeriod","type":"uint256"},{"internalType":"uint256","name":"nextInflationAt","type":"uint256"},{"internalType":"enum MossLandNFT.ProjectType","name":"projectType","type":"uint8"},{"internalType":"bool","name":"created","type":"bool"}],"indexed":false,"internalType":"struct MossLandNFT.Project","name":"project","type":"tuple"}],"name":"ProjectAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"uint256","name":"projectId","type":"uint256"},{"indexed":false,"internalType":"string","name":"uri","type":"string"}],"name":"ResourceAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"ratio","type":"uint256"},{"indexed":false,"internalType":"address","name":"sender","type":"address"}],"name":"TokenInflation","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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BURNER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"HECTARE_TOKEN_INFLATION_RATE_FACTOR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OPERATOR_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"string","name":"cid","type":"string"},{"internalType":"uint256","name":"hectares","type":"uint256"},{"internalType":"uint256","name":"cooldown","type":"uint256"},{"internalType":"enum MossLandNFT.ProjectType","name":"projectType","type":"uint8"}],"name":"addProject","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"string","name":"resource","type":"string"}],"name":"addResource","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"authorizer","type":"address"},{"internalType":"bytes32","name":"nonce","type":"bytes32"}],"name":"authorizationState","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"},{"internalType":"bytes32","name":"nonce","type":"bytes32"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"authorize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"wallet","type":"address"}],"name":"balancesOf","outputs":[{"internalType":"uint256[]","name":"tokens","type":"uint256[]"},{"internalType":"uint256[]","name":"balances","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"burnBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"description","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRegisteredTokens","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"hectaresBalanceOf","outputs":[{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"totalSupply","type":"uint256"},{"internalType":"uint256","name":"totalHectares","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"projectId","type":"uint256"},{"internalType":"uint256","name":"increase","type":"uint256"}],"name":"inflate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"__uri","type":"string"},{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"string","name":"_description","type":"string"},{"internalType":"address","name":"operator","type":"address"},{"internalType":"address","name":"_owner","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"isRegistered","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"projects","outputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"totalHectares","type":"uint256"},{"internalType":"uint256","name":"totalSupply","type":"uint256"},{"internalType":"uint256","name":"inflationCooldownPeriod","type":"uint256"},{"internalType":"uint256","name":"nextInflationAt","type":"uint256"},{"internalType":"enum MossLandNFT.ProjectType","name":"projectType","type":"uint8"},{"internalType":"bool","name":"created","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newOwner","type":"address"}],"name":"setOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenIds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenResources","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_newName","type":"string"},{"internalType":"string","name":"_newSymbol","type":"string"},{"internalType":"string","name":"_newDescription","type":"string"}],"name":"updateParams","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"string","name":"cid","type":"string"}],"name":"updateTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50615342806100206000396000f3fe608060405234801561001057600080fd5b50600436106102fe5760003560e01c80637284e4161161019c578063bc706774116100ee578063e583e13211610097578063f242432a11610071578063f242432a14610763578063f5298aca14610776578063f5b541a61461078957600080fd5b8063e583e132146106da578063e94a0102146106ed578063e985e9c51461072757600080fd5b8063d5391393116100c8578063d53913931461068d578063d547741f146106b4578063d58778d6146106c757600080fd5b8063bc70677414610645578063ca15c87314610658578063d2f331101461066b57600080fd5b8063934343de11610150578063a217fddf1161012a578063a217fddf14610617578063a22cb4651461061f578063baea00631461063257600080fd5b8063934343de146105e957806395d89b41146105fc578063979518921461060457600080fd5b80638da5cb5b116101815780638da5cb5b1461057c5780639010d07c1461059d57806391d14854146105b057600080fd5b80637284e4161461054d57806375b238fc1461055557600080fd5b80632eb2c2d611610255578063579a6988116102095780636392a51f116101e35780636392a51f1461050657806366862768146105275780636b20c4541461053a57600080fd5b8063579a6988146104c55780635add6537146104f15780635c975abb146104fa57600080fd5b80633644e5151161023a5780633644e5151461049757806336568abe1461049f5780634e1273f4146104b257600080fd5b80632eb2c2d6146104715780632f2ff15d1461048457600080fd5b806313af4035116102b7578063248a9ca311610291578063248a9ca314610414578063282c51f3146104375780632a9383421461045e57600080fd5b806313af4035146103d757806314cbd993146103ec57806318e97fd11461040157600080fd5b806306fdde03116102e857806306fdde031461034c5780630e89341c14610361578063107046bd1461037457600080fd5b8062fdd58e1461030357806301ffc9a71461032c575b600080fd5b610316610311366004613203565b6107b0565b6040516103239190613248565b60405180910390f35b61033f61033a366004613271565b61080c565b604051610323919061329a565b610354610817565b604051610323919061330c565b61035461036f36600461331d565b6108a6565b6103c461038236600461331d565b6101cb60205260009081526040902080546001820154600283015460038401546004850154600590950154939492939192909160ff8082169161010090041687565b6040516103239796959493929190613387565b6103ea6103e53660046133ef565b6108b1565b005b6103f4610988565b604051610323919061346d565b6103ea61040f36600461356c565b6109e1565b61031661042236600461331d565b60009081526065602052604090206001015490565b6103167f3c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a84881565b6103ea61046c3660046135ba565b610a6c565b6103ea61047f36600461367f565b610c0b565b6103ea610492366004613748565b610e3b565b610316610e62565b6103ea6104ad366004613748565b610e71565b6103f46104c03660046137f0565b610e93565b61033f6104d336600461331d565b60009081526101cb6020526040902060050154610100900460ff1690565b61031661271081565b61012d5460ff1661033f565b6105196105143660046133ef565b610f7b565b604051610323929190613858565b6103546105353660046135ba565b61106d565b6103ea6105483660046138cf565b6110a6565b6103546111d4565b6103167fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b6101c954610590906001600160a01b031681565b6040516103239190613968565b6105906105ab3660046135ba565b6111e2565b61033f6105be366004613748565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6103ea6105f73660046139c1565b611201565b6103546112ea565b6103ea610612366004613a35565b6112f8565b610316600081565b6103ea61062d366004613ade565b61157d565b6103ea610640366004613b11565b611615565b6103ea610653366004613c2d565b611871565b61031661066636600461331d565b611a3c565b61067e610679366004613203565b611a53565b60405161032393929190613ce0565b6103167f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b6103ea6106c2366004613748565b611a88565b6103166106d536600461331d565b611a92565b6103ea6106e8366004613d08565b611ab4565b61033f6106fb366004613203565b6001600160a01b039190911660009081526101c560209081526040808320938352929052205460ff1690565b61033f610735366004613db5565b6001600160a01b03918216600090815260986020908152604080832093909416825291909152205460ff1690565b6103ea610771366004613dd7565b611b2c565b6103ea610784366004613e31565b611ca0565b6103167f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b92981565b60006001600160a01b0383166107e15760405162461bcd60e51b81526004016107d890613ede565b60405180910390fd5b5060008181526097602090815260408083206001600160a01b03861684529091529020545b92915050565b600061080682611d1d565b6101c6805461082590613f04565b80601f016020809104026020016040519081016040528092919081815260200182805461085190613f04565b801561089e5780601f106108735761010080835404028352916020019161089e565b820191906000526020600020905b81548152906001019060200180831161088157829003601f168201915b505050505081565b606061080682611d5b565b6108db7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775336105be565b6108f75760405162461bcd60e51b81526004016107d890613f68565b6001600160a01b03811661091d5760405162461bcd60e51b81526004016107d890613fac565b6101c9546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36101c9805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b60606101ca8054806020026020016040519081016040528092919081815260200182805480156109d757602002820191906000526020600020905b8154815260200190600101908083116109c3575b5050505050905090565b610a0b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775336105be565b610a275760405162461bcd60e51b81526004016107d890613f68565b60008281526101cb6020526040902060050154610100900460ff16610a5e5760405162461bcd60e51b81526004016107d890613ff0565b610a688282611e0e565b5050565b610a967f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6336105be565b610ab25760405162461bcd60e51b81526004016107d890614034565b60008281526101cb602052604090206005810154610100900460ff16610aea5760405162461bcd60e51b81526004016107d890614078565b81610b075760405162461bcd60e51b81526004016107d8906140e2565b80600401544211610b2a5760405162461bcd60e51b81526004016107d89061414c565b6000612710838360020154610b3f9190614172565b610b4991906141a7565b905080826002016000828254610b5f91906141bb565b909155505060038201546004830154610b7891906141bb565b826004016000828254610b8b91906141bb565b90915550610bca905033858360005b6040519080825280601f01601f191660200182016040528015610bc4576020820181803683370190505b50611ea3565b7fadf79fc7a670e099524b7ec65630a87db4c692ea399a4cc07d5b3c0fff3e3086848233604051610bfd939291906141d3565b60405180910390a150505050565b8151835114610c2c5760405162461bcd60e51b81526004016107d890614255565b6001600160a01b038416610c525760405162461bcd60e51b81526004016107d8906142bf565b6001600160a01b038516331480610c6e5750610c6e8533610735565b610c8a5760405162461bcd60e51b81526004016107d890614329565b33610c99818787878787611f81565b60005b8451811015610dcd576000858281518110610cb957610cb9614339565b602002602001015190506000858381518110610cd757610cd7614339565b60209081029190910181015160008481526097835260408082206001600160a01b038e168352909352919091205490915081811015610d285760405162461bcd60e51b81526004016107d8906143a9565b610d3282826143b9565b6097600085815260200190815260200160002060008c6001600160a01b03166001600160a01b0316815260200190815260200160002081905550816097600085815260200190815260200160002060008b6001600160a01b03166001600160a01b031681526020019081526020016000206000828254610db291906141bb565b9250508190555050505080610dc6906143d0565b9050610c9c565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051610e1d929190613858565b60405180910390a4610e33818787878787611f8f565b505050505050565b610e4582826120ad565b600082815260c960205260409020610e5d90826120d3565b505050565b6000610e6c6120e8565b905090565b610e7b8282612121565b600082815260c960205260409020610e5d9082612153565b60608151835114610eb65760405162461bcd60e51b81526004016107d890614445565b6000835167ffffffffffffffff811115610ed257610ed261347e565b604051908082528060200260200182016040528015610efb578160200160208202803683370190505b50905060005b8451811015610f7357610f46858281518110610f1f57610f1f614339565b6020026020010151858381518110610f3957610f39614339565b60200260200101516107b0565b828281518110610f5857610f58614339565b6020908102919091010152610f6c816143d0565b9050610f01565b509392505050565b6060806101ca805480602002602001604051908101604052809291908181526020018280548015610fcb57602002820191906000526020600020905b815481526020019060010190808311610fb7575b50505050509150815167ffffffffffffffff811115610fec57610fec61347e565b604051908082528060200260200182016040528015611015578160200160208202803683370190505b50905060005b82518110156110675761103a84848381518110610f3957610f39614339565b82828151811061104c5761104c614339565b6020908102919091010152611060816143d0565b905061101b565b50915091565b6101cd602052816000526040600020818154811061108a57600080fd5b9060005260206000200160009150915050805461082590613f04565b6110d07f3c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a848336105be565b6110ec5760405162461bcd60e51b81526004016107d890614489565b61115a858585808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505060408051602080890282810182019093528882529093508892508791829185019084908082843760009201919091525061216892505050565b60005b83811015610e335782828281811061117757611177614339565b905060200201356101cb600087878581811061119557611195614339565b90506020020135815260200190815260200160002060020160008282546111bc91906143b9565b909155508190506111cc816143d0565b91505061115d565b6101c8805461082590613f04565b600082815260c9602052604081206111fa9083612306565b9392505050565b61122b7f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b929336105be565b6112475760405162461bcd60e51b81526004016107d8906144f3565b60008381526101cb6020526040902060050154610100900460ff1661127e5760405162461bcd60e51b81526004016107d89061455d565b60008381526101cd602090815260408220805460018101825590835291206112a8910183836130b5565b50827fdfd458a7487af5c9f2b6375168ef2ca45e21f5940cadeca48f97a505bfadcae43384846040516112dd93929190614590565b60405180910390a2505050565b6101c7805461082590613f04565b6113227f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6336105be565b61133e5760405162461bcd60e51b81526004016107d890614034565b6000831161135e5760405162461bcd60e51b81526004016107d8906145ee565b6000821161137e5760405162461bcd60e51b81526004016107d890614630565b8361139b5760405162461bcd60e51b81526004016107d890614674565b60008681526101cb6020526040902060050154610100900460ff16156113d35760405162461bcd60e51b81526004016107d8906146b8565b6101ca80546001810182556000919091527f0faeda9012b7f59bd2a84ac2a33ead5fc9f720c38d8bbf90db1ac3c1518386eb018690556040805160e08101825287815260208101859052908101849052606081018390526080810161143884426141bb565b815260200182600181111561144f5761144f61333e565b81526001602091820181905260008981526101cb83526040908190208451815592840151838301558301516002830155606083015160038301556080830151600483015560a08301516005830180549192909160ff19169083818111156114b8576114b861333e565b021790555060c09190910151600590910180549115156101000261ff00199092169190911790556114ec3387856000610b9a565b61152c8686868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611e0e92505050565b60008681526101cb60205260409081902090517fca8ddcb55f768e292deb4557a3c1f262532d0c7d84e281b47b74614957059c589161156d913391906147b1565b60405180910390a1505050505050565b336001600160a01b03831614156115a65760405162461bcd60e51b81526004016107d890614827565b3360008181526098602090815260408083206001600160a01b038716808552925291829020805460ff191685151517905590519091907f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c319061160990859061329a565b60405180910390a35050565b600054610100900460ff168061162e575060005460ff16155b61164a5760405162461bcd60e51b81526004016107d890614891565b600054610100900460ff1615801561166c576000805461ffff19166101011790555b6116ab8b8b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061231292505050565b61171f6040518060400160405280600781526020017f4c616e644e4654000000000000000000000000000000000000000000000000008152506040518060400160405280600181526020017f3100000000000000000000000000000000000000000000000000000000000000815250612397565b61172a60008461240e565b6117547f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a68461240e565b61177e7f3c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a8488461240e565b6117a87f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b9298461240e565b6117d27fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217758461240e565b6117df6101c68a8a6130b5565b506117ed6101c788886130b5565b506117fb6101c886866130b5565b506101c9805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03841617905560405133906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a38015611864576000805461ff00191690555b5050505050505050505050565b61189b7f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b929336105be565b6118b75760405162461bcd60e51b81526004016107d8906144f3565b834211156118d75760405162461bcd60e51b81526004016107d8906148fb565b6001600160a01b03881660009081526101c56020908152604080832088845290915290205460ff161561191c5760405162461bcd60e51b81526004016107d890614965565b60007f91aaffcde7eb6e14c35a5d629a51978795daafb7f3caeeaad4d913ed8d322c56898989898960405160200161195996959493929190614975565b604051602081830303815290604052805190602001209050600061197c82612418565b9050600061198c8287878761242b565b90508a6001600160a01b0316816001600160a01b0316146119bf5760405162461bcd60e51b81526004016107d890614a29565b6001600160a01b038b1660009081526101c5602090815260408083208b84529091529020805460ff191660011790556119f98b8b8b612455565b60405188906001600160a01b038d16907f98de503528ee59b575ef0c0a2576a82497bfc029a5685b209e9ec333479b10a590600090a35050505050505050505050565b600081815260c960205260408120610806906124f8565b6000806000611a6285856107b0565b60009485526101cb60205260409094206002810154600190910154949690955092505050565b610e7b8282612502565b6101ca8181548110611aa357600080fd5b600091825260209091200154905081565b611ade7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775336105be565b611afa5760405162461bcd60e51b81526004016107d890613f68565b611b076101c687876130b5565b50611b156101c785856130b5565b50611b236101c883836130b5565b50505050505050565b6001600160a01b038416611b525760405162461bcd60e51b81526004016107d8906142bf565b6001600160a01b038516331480611b6e5750611b6e8533610735565b611b8a5760405162461bcd60e51b81526004016107d890614a93565b33611ba9818787611b9a88612528565b611ba388612528565b87611f81565b60008481526097602090815260408083206001600160a01b038a16845290915290205483811015611bec5760405162461bcd60e51b81526004016107d8906143a9565b611bf684826143b9565b60008681526097602090815260408083206001600160a01b038c81168552925280832093909355881681529081208054869290611c349084906141bb565b92505081905550856001600160a01b0316876001600160a01b0316836001600160a01b03167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628888604051611c8a929190614aa3565b60405180910390a4611b23828888888888612573565b611cca7f3c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a848336105be565b611ce65760405162461bcd60e51b81526004016107d890614489565b611cf183838361263d565b60008281526101cb602052604081206002018054839290611d139084906143b9565b9091555050505050565b60006001600160e01b031982167f5a05180f00000000000000000000000000000000000000000000000000000000148061080657506108068261274f565b606081611df45760998054611d6f90613f04565b80601f0160208091040260200160405190810160405280929190818152602001828054611d9b90613f04565b8015611de85780601f10611dbd57610100808354040283529160200191611de8565b820191906000526020600020905b815481529060010190602001808311611dcb57829003601f168201915b50505050509050919050565b60008281526101cc602052604090208054611d6f90613f04565b609981604051602001611e22929190614b4e565b60408051601f1981840301815291815260008481526101cc60209081529190208251611e5393919290910190613139565b50817f6bb7ff708619ba0610cba295a58592e0451dee2622938c8755667688daf3529b6101cc6000858152602001908152602001600020604051611e979190614bda565b60405180910390a25050565b6001600160a01b038416611ec95760405162461bcd60e51b81526004016107d890614c45565b33611eda81600087611b9a88612528565b60008481526097602090815260408083206001600160a01b038916845290915281208054859290611f0c9084906141bb565b92505081905550846001600160a01b031660006001600160a01b0316826001600160a01b03167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628787604051611f63929190614aa3565b60405180910390a4611f7a81600087878787612573565b5050505050565b610e338686868686866127c1565b6001600160a01b0384163b15610e335760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190611fd39089908990889088908890600401614c55565b602060405180830381600087803b158015611fed57600080fd5b505af192505050801561201d575060408051601f3d908101601f1916820190925261201a91810190614cb5565b60015b61207d57612029614cd6565b806308c379a01415612063575061203e614cf1565b806120495750612065565b8060405162461bcd60e51b81526004016107d8919061330c565b505b60405162461bcd60e51b81526004016107d890614dd2565b6001600160e01b0319811663bc197c8160e01b14611b235760405162461bcd60e51b81526004016107d890614e3c565b6000828152606560205260409020600101546120c981336127e5565b610e5d8383612865565b60006111fa836001600160a01b038416612907565b6000610e6c7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6121186101915490565b61019254612956565b6001600160a01b03811633146121495760405162461bcd60e51b81526004016107d890614ea6565b610a688282612990565b60006111fa836001600160a01b038416612a13565b6001600160a01b03831661218e5760405162461bcd60e51b81526004016107d890614f10565b80518251146121af5760405162461bcd60e51b81526004016107d890614255565b60003390506121d281856000868660405180602001604052806000815250611f81565b60005b83518110156122a75760008482815181106121f2576121f2614339565b60200260200101519050600084838151811061221057612210614339565b60209081029190910181015160008481526097835260408082206001600160a01b038c1683529093529190912054909150818110156122615760405162461bcd60e51b81526004016107d890614f7a565b61226b82826143b9565b60009384526097602090815260408086206001600160a01b038c168752909152909320929092555081905061229f816143d0565b9150506121d5565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb86866040516122f8929190613858565b60405180910390a450505050565b60006111fa8383612b06565b600054610100900460ff168061232b575060005460ff16155b6123475760405162461bcd60e51b81526004016107d890614891565b600054610100900460ff16158015612369576000805461ffff19166101011790555b612371612b30565b612379612b30565b61238282612b9c565b8015610a68576000805461ff00191690555050565b600054610100900460ff16806123b0575060005460ff16155b6123cc5760405162461bcd60e51b81526004016107d890614891565b600054610100900460ff161580156123ee576000805461ffff19166101011790555b6123f88383612bfc565b8015610e5d576000805461ff0019169055505050565b610e458282612c88565b60006108066124256120e8565b83612c92565b600080600061243c87878787612cc5565b9150915061244981612da5565b5090505b949350505050565b816001600160a01b0316836001600160a01b031614156124875760405162461bcd60e51b81526004016107d890614827565b6001600160a01b0383811660008181526098602090815260408083209487168084529490915290819020805460ff1916851515179055517f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31906124eb90859061329a565b60405180910390a3505050565b6000610806825490565b60008281526065602052604090206001015461251e81336127e5565b610e5d8383612990565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061256257612562614339565b602090810291909101015292915050565b6001600160a01b0384163b15610e335760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906125b79089908990889088908890600401614f8a565b602060405180830381600087803b1580156125d157600080fd5b505af1925050508015612601575060408051601f3d908101601f191682019092526125fe91810190614cb5565b60015b61260d57612029614cd6565b6001600160e01b0319811663f23a6e6160e01b14611b235760405162461bcd60e51b81526004016107d890614e3c565b6001600160a01b0383166126635760405162461bcd60e51b81526004016107d890614f10565b336126928185600061267487612528565b61267d87612528565b60405180602001604052806000815250611f81565b60008381526097602090815260408083206001600160a01b0388168452909152902054828110156126d55760405162461bcd60e51b81526004016107d890614f7a565b6126df83826143b9565b60008581526097602090815260408083206001600160a01b03808b16808652919093528184209490945551919291908516907fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62906127409089908990614aa3565b60405180910390a45050505050565b60006001600160e01b031982167fd9b67a260000000000000000000000000000000000000000000000000000000014806127b257506001600160e01b031982167f0e89341c00000000000000000000000000000000000000000000000000000000145b80610806575061080682612e8a565b61012d5460ff1615610e335760405162461bcd60e51b81526004016107d89061502b565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610a6857612823816001600160a01b03166014612ef1565b61282e836020612ef1565b60405160200161283f92919061503b565b60408051601f198184030181529082905262461bcd60e51b82526107d89160040161330c565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610a685760008281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556128c33390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600081815260018301602052604081205461294e57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610806565b506000610806565b6000838383463060405160200161297195949392919061509b565b6040516020818303038152906040528051906020012090509392505050565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff1615610a685760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60008181526001830160205260408120548015612afc576000612a376001836143b9565b8554909150600090612a4b906001906143b9565b9050818114612ab0576000866000018281548110612a6b57612a6b614339565b9060005260206000200154905080876000018481548110612a8e57612a8e614339565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080612ac157612ac16150e7565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610806565b6000915050610806565b6000826000018281548110612b1d57612b1d614339565b9060005260206000200154905092915050565b600054610100900460ff1680612b49575060005460ff16155b612b655760405162461bcd60e51b81526004016107d890614891565b600054610100900460ff16158015612b87576000805461ffff19166101011790555b8015612b99576000805461ff00191690555b50565b600054610100900460ff1680612bb5575060005460ff16155b612bd15760405162461bcd60e51b81526004016107d890614891565b600054610100900460ff16158015612bf3576000805461ffff19166101011790555b612382826130a2565b600054610100900460ff1680612c15575060005460ff16155b612c315760405162461bcd60e51b81526004016107d890614891565b600054610100900460ff16158015612c53576000805461ffff19166101011790555b825160208085019190912083519184019190912061019191909155610192558015610e5d576000805461ff0019169055505050565b610a688282612865565b60008282604051602001612ca7929190615103565b60405160208183030381529060405280519060200120905092915050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115612cfc5750600090506003612d9c565b8460ff16601b14158015612d1457508460ff16601c14155b15612d255750600090506004612d9c565b600060018787878760405160008152602001604052604051612d4a9493929190615158565b6020604051602081039080840390855afa158015612d6c573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116612d9557600060019250925050612d9c565b9150600090505b94509492505050565b6000816004811115612db957612db961333e565b1415612dc25750565b6001816004811115612dd657612dd661333e565b1415612df45760405162461bcd60e51b81526004016107d8906151c1565b6002816004811115612e0857612e0861333e565b1415612e265760405162461bcd60e51b81526004016107d890615205565b6003816004811115612e3a57612e3a61333e565b1415612e585760405162461bcd60e51b81526004016107d890615254565b6004816004811115612e6c57612e6c61333e565b1415612b995760405162461bcd60e51b81526004016107d8906152a3565b60006001600160e01b031982167f7965db0b00000000000000000000000000000000000000000000000000000000148061080657507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b0319831614610806565b60606000612f00836002614172565b612f0b9060026141bb565b67ffffffffffffffff811115612f2357612f2361347e565b6040519080825280601f01601f191660200182016040528015612f4d576020820181803683370190505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110612f8457612f84614339565b60200101906001600160f81b031916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110612fcf57612fcf614339565b60200101906001600160f81b031916908160001a9053506000612ff3846002614172565b612ffe9060016141bb565b90505b6001811115613083577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061303f5761303f614339565b1a60f81b82828151811061305557613055614339565b60200101906001600160f81b031916908160001a90535060049490941c9361307c816152b3565b9050613001565b5083156111fa5760405162461bcd60e51b81526004016107d8906152fc565b8051610a68906099906020840190613139565b8280546130c190613f04565b90600052602060002090601f0160209004810192826130e35760008555613129565b82601f106130fc5782800160ff19823516178555613129565b82800160010185558215613129579182015b8281111561312957823582559160200191906001019061310e565b506131359291506131ad565b5090565b82805461314590613f04565b90600052602060002090601f0160209004810192826131675760008555613129565b82601f1061318057805160ff1916838001178555613129565b82800160010185558215613129579182015b82811115613129578251825591602001919060010190613192565b5b8082111561313557600081556001016131ae565b60006001600160a01b038216610806565b6131dc816131c2565b8114612b9957600080fd5b8035610806816131d3565b806131dc565b8035610806816131f2565b6000806040838503121561321957613219600080fd5b600061322585856131e7565b9250506020613236858286016131f8565b9150509250929050565b805b82525050565b602081016108068284613240565b6001600160e01b031981166131dc565b803561080681613256565b60006020828403121561328657613286600080fd5b600061244d8484613266565b801515613242565b602081016108068284613292565b60005b838110156132c35781810151838201526020016132ab565b838111156132d2576000848401525b50505050565b60006132e2825190565b8084526020840193506132f98185602086016132a8565b601f19601f8201165b9093019392505050565b602080825281016111fa81846132d8565b60006020828403121561333257613332600080fd5b600061244d84846131f8565b634e487b7160e01b600052602160045260246000fd5b60028110612b9957612b9961333e565b8061336e81613354565b919050565b600061080682613364565b61324281613373565b60e08101613395828a613240565b6133a26020830189613240565b6133af6040830188613240565b6133bc6060830187613240565b6133c96080830186613240565b6133d660a083018561337e565b6133e360c0830184613292565b98975050505050505050565b60006020828403121561340457613404600080fd5b600061244d84846131e7565b600061341c8383613240565b505060200190565b600061342e825190565b80845260209384019383018060005b838110156134625781516134518882613410565b97506020830192505060010161343d565b509495945050505050565b602080825281016111fa8184613424565b634e487b7160e01b600052604160045260246000fd5b601f19601f830116810181811067ffffffffffffffff821117156134ba576134ba61347e565b6040525050565b60006134cc60405190565b905061336e8282613494565b600067ffffffffffffffff8211156134f2576134f261347e565b601f19601f83011660200192915050565b82818337506000910152565b600061352261351d846134d8565b6134c1565b90508281526020810184848401111561353d5761353d600080fd5b610f73848285613503565b600082601f83011261355c5761355c600080fd5b813561244d84826020860161350f565b6000806040838503121561358257613582600080fd5b600061358e85856131f8565b925050602083013567ffffffffffffffff8111156135ae576135ae600080fd5b61323685828601613548565b600080604083850312156135d0576135d0600080fd5b600061322585856131f8565b600067ffffffffffffffff8211156135f6576135f661347e565b5060209081020190565b600061360e61351d846135dc565b8381529050602080820190840283018581111561362d5761362d600080fd5b835b81811015613651578061364288826131f8565b8452506020928301920161362f565b5050509392505050565b600082601f83011261366f5761366f600080fd5b813561244d848260208601613600565b600080600080600060a0868803121561369a5761369a600080fd5b60006136a688886131e7565b95505060206136b7888289016131e7565b945050604086013567ffffffffffffffff8111156136d7576136d7600080fd5b6136e38882890161365b565b935050606086013567ffffffffffffffff81111561370357613703600080fd5b61370f8882890161365b565b925050608086013567ffffffffffffffff81111561372f5761372f600080fd5b61373b88828901613548565b9150509295509295909350565b6000806040838503121561375e5761375e600080fd5b600061376a85856131f8565b9250506020613236858286016131e7565b600061378961351d846135dc565b838152905060208082019084028301858111156137a8576137a8600080fd5b835b8181101561365157806137bd88826131e7565b845250602092830192016137aa565b600082601f8301126137e0576137e0600080fd5b813561244d84826020860161377b565b6000806040838503121561380657613806600080fd5b823567ffffffffffffffff81111561382057613820600080fd5b61382c858286016137cc565b925050602083013567ffffffffffffffff81111561384c5761384c600080fd5b6132368582860161365b565b604080825281016138698185613424565b9050818103602083015261244d8184613424565b60008083601f84011261389257613892600080fd5b50813567ffffffffffffffff8111156138ad576138ad600080fd5b6020830191508360208202830111156138c8576138c8600080fd5b9250929050565b6000806000806000606086880312156138ea576138ea600080fd5b60006138f688886131e7565b955050602086013567ffffffffffffffff81111561391657613916600080fd5b6139228882890161387d565b9450945050604086013567ffffffffffffffff81111561394457613944600080fd5b6139508882890161387d565b92509250509295509295909350565b613242816131c2565b60208101610806828461395f565b60008083601f84011261398b5761398b600080fd5b50813567ffffffffffffffff8111156139a6576139a6600080fd5b6020830191508360018202830111156138c8576138c8600080fd5b6000806000604084860312156139d9576139d9600080fd5b60006139e586866131f8565b935050602084013567ffffffffffffffff811115613a0557613a05600080fd5b613a1186828701613976565b92509250509250925092565b60028110612b9957600080fd5b803561080681613a1d565b60008060008060008060a08789031215613a5157613a51600080fd5b6000613a5d89896131f8565b965050602087013567ffffffffffffffff811115613a7d57613a7d600080fd5b613a8989828a01613976565b95509550506040613a9c89828a016131f8565b9350506060613aad89828a016131f8565b9250506080613abe89828a01613a2a565b9150509295509295509295565b8015156131dc565b803561080681613acb565b60008060408385031215613af457613af4600080fd5b6000613b0085856131e7565b925050602061323685828601613ad3565b60008060008060008060008060008060c08b8d031215613b3357613b33600080fd5b8a3567ffffffffffffffff811115613b4d57613b4d600080fd5b613b598d828e01613976565b9a509a505060208b013567ffffffffffffffff811115613b7b57613b7b600080fd5b613b878d828e01613976565b985098505060408b013567ffffffffffffffff811115613ba957613ba9600080fd5b613bb58d828e01613976565b965096505060608b013567ffffffffffffffff811115613bd757613bd7600080fd5b613be38d828e01613976565b94509450506080613bf68d828e016131e7565b92505060a0613c078d828e016131e7565b9150509295989b9194979a5092959850565b60ff81166131dc565b803561080681613c19565b600080600080600080600080610100898b031215613c4d57613c4d600080fd5b6000613c598b8b6131e7565b9850506020613c6a8b828c016131e7565b9750506040613c7b8b828c01613ad3565b9650506060613c8c8b828c016131f8565b9550506080613c9d8b828c016131f8565b94505060a0613cae8b828c01613c22565b93505060c0613cbf8b828c016131f8565b92505060e0613cd08b828c016131f8565b9150509295985092959890939650565b60608101613cee8286613240565b613cfb6020830185613240565b61244d6040830184613240565b60008060008060008060608789031215613d2457613d24600080fd5b863567ffffffffffffffff811115613d3e57613d3e600080fd5b613d4a89828a01613976565b9650965050602087013567ffffffffffffffff811115613d6c57613d6c600080fd5b613d7889828a01613976565b9450945050604087013567ffffffffffffffff811115613d9a57613d9a600080fd5b613da689828a01613976565b92509250509295509295509295565b60008060408385031215613dcb57613dcb600080fd5b600061376a85856131e7565b600080600080600060a08688031215613df257613df2600080fd5b6000613dfe88886131e7565b9550506020613e0f888289016131e7565b9450506040613e20888289016131f8565b935050606061370f888289016131f8565b600080600060608486031215613e4957613e49600080fd5b6000613e5586866131e7565b9350506020613e66868287016131f8565b9250506040613e77868287016131f8565b9150509250925092565b602b81526000602082017f455243313135353a2062616c616e636520717565727920666f7220746865207a81527f65726f2061646472657373000000000000000000000000000000000000000000602082015291505b5060400190565b6020808252810161080681613e81565b634e487b7160e01b600052602260045260246000fd5b600281046001821680613f1857607f821691505b60208210811415613f2b57613f2b613eee565b50919050565b601f81526000602082017f4c616e644e46543a2063616c6c6572206973206e6f7420616e2041444d494e00815291505b5060200190565b6020808252810161080681613f31565b601e81526000602082017f4c616e644e46543a20696e76616c6964206f776e65722061646472657373000081529150613f61565b6020808252810161080681613f78565b601d81526000602082017f4c616e644e46543a20746f6b656e206e6f74207265676973746572656400000081529150613f61565b6020808252810161080681613fbc565b601f81526000602082017f4c616e644e46543a2063616c6c6572206973206e6f742061204d494e5445520081529150613f61565b6020808252810161080681614000565b601f81526000602082017f4c616e644e46543a2070726f6a656374206e6f7420726567697374657265640081529150613f61565b6020808252810161080681614044565b602681526000602082017f4c616e644e46543a20696e63726561736520726174696f2063616e6e6f74206281527f65207a65726f000000000000000000000000000000000000000000000000000060208201529150613ed7565b6020808252810161080681614088565b602681526000602082017f4c616e644e46543a2070726f6a65637420697320696e20636f6f6c646f776e2081527f706572696f64000000000000000000000000000000000000000000000000000060208201529150613ed7565b60208082528101610806816140f2565b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561418c5761418c61415c565b500290565b634e487b7160e01b600052601260045260246000fd5b6000826141b6576141b6614191565b500490565b600082198211156141ce576141ce61415c565b500190565b606081016141e18286613240565b6141ee6020830185613240565b61244d604083018461395f565b602881526000602082017f455243313135353a2069647320616e6420616d6f756e7473206c656e6774682081527f6d69736d6174636800000000000000000000000000000000000000000000000060208201529150613ed7565b60208082528101610806816141fb565b602581526000602082017f455243313135353a207472616e7366657220746f20746865207a65726f20616481527f647265737300000000000000000000000000000000000000000000000000000060208201529150613ed7565b6020808252810161080681614265565b603281526000602082017f455243313135353a207472616e736665722063616c6c6572206973206e6f742081527f6f776e6572206e6f7220617070726f766564000000000000000000000000000060208201529150613ed7565b60208082528101610806816142cf565b634e487b7160e01b600052603260045260246000fd5b602a81526000602082017f455243313135353a20696e73756666696369656e742062616c616e636520666f81527f72207472616e736665720000000000000000000000000000000000000000000060208201529150613ed7565b602080825281016108068161434f565b6000828210156143cb576143cb61415c565b500390565b60006000198214156143e4576143e461415c565b5060010190565b602981526000602082017f455243313135353a206163636f756e747320616e6420696473206c656e67746881527f206d69736d61746368000000000000000000000000000000000000000000000060208201529150613ed7565b60208082528101610806816143eb565b601f81526000602082017f4c616e644e46543a2063616c6c6572206973206e6f742061204255524e45520081529150613f61565b6020808252810161080681614455565b602281526000602082017f4c616e644e46543a2063616c6c6572206973206e6f7420616e204f504552415481527f4f5200000000000000000000000000000000000000000000000000000000000060208201529150613ed7565b6020808252810161080681614499565b602381526000602082017f4d6f73734c616e644e46543a2050726f6a656374206e6f74207265676973746581527f726564000000000000000000000000000000000000000000000000000000000060208201529150613ed7565b6020808252810161080681614503565b8183526000602084019350614583838584613503565b601f19601f840116613302565b6040810161459e828661395f565b81810360208301526145b181848661456d565b95945050505050565b601981526000602082017f4c616e644e46543a20696e76616c69642068656374617265730000000000000081529150613f61565b60208082528101610806816145ba565b60208082527f4c616e644e46543a20696e76616c696420636f6f6c646f776e20706572696f6491019081526000613f61565b60208082528101610806816145fe565b601281526000602082017f4c616e644e46543a20656d70747920636964000000000000000000000000000081529150613f61565b6020808252810161080681614640565b601e81526000602082017f4c616e644e46543a2070726f6a65637420616c7265616479206164646564000081529150613f61565b6020808252810161080681614684565b600081610806565b90565b6000610806825b60ff1690565b60006108066146da8360081c90565b805460e08301906146ff816146c8565b6147098582613240565b50506001820154614719816146c8565b6147266020860182613240565b50506002820154614736816146c8565b6147436040860182613240565b50506003820154614753816146c8565b6147606060860182613240565b50506004820154614770816146c8565b61477d6080860182613240565b5050600582015461478d816146d3565b61479a60a086018261337e565b506147a4816146e0565b611f7a60c0860182613292565b61010081016147c0828561395f565b6111fa60208301846146ef565b602981526000602082017f455243313135353a2073657474696e6720617070726f76616c2073746174757381527f20666f722073656c66000000000000000000000000000000000000000000000060208201529150613ed7565b60208082528101610806816147cd565b602e81526000602082017f496e697469616c697a61626c653a20636f6e747261637420697320616c72656181527f647920696e697469616c697a656400000000000000000000000000000000000060208201529150613ed7565b6020808252810161080681614837565b602781526000602082017f4c616e644e46545f417574686f72697a6174696f6e3a2065787069726564206481527f6561646c696e650000000000000000000000000000000000000000000000000060208201529150613ed7565b60208082528101610806816148a1565b602c81526000602082017f4c616e644e46545f417574686f72697a6174696f6e3a20617574686f72697a6181527f74696f6e2069732075736564000000000000000000000000000000000000000060208201529150613ed7565b602080825281016108068161490b565b60c081016149838289613240565b614990602083018861395f565b61499d604083018761395f565b6149aa6060830186613292565b6149b76080830185613240565b6149c460a0830184613240565b979650505050505050565b602881526000602082017f4c616e644e46545f417574686f72697a6174696f6e3a20696e76616c6964207381527f69676e617475726500000000000000000000000000000000000000000000000060208201529150613ed7565b60208082528101610806816149cf565b602981526000602082017f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7281527f20617070726f766564000000000000000000000000000000000000000000000060208201529150613ed7565b6020808252810161080681614a39565b60408101614ab18285613240565b6111fa6020830184613240565b60008154614acb81613f04565b600182168015614ae25760018114614af357614b23565b60ff19831686528186019350614b23565b60008581526020902060005b83811015614b1b57815488820152600190910190602001614aff565b838801955050505b50505092915050565b6000614b36825190565b614b448185602086016132a8565b9290920192915050565b6000614b5a8285614abe565b915061244d8284614b2c565b60008154614b7381613f04565b808552602085019450600182168015614b935760018114614ba557614b23565b60ff1983168652602086019350614b23565b60008581526020902060005b83811015614bcd57815488820152600190910190602001614bb1565b9096019695505050505050565b602080825281016111fa8184614b66565b602181526000602082017f455243313135353a206d696e7420746f20746865207a65726f2061646472657381527f730000000000000000000000000000000000000000000000000000000000000060208201529150613ed7565b6020808252810161080681614beb565b60a08101614c63828861395f565b614c70602083018761395f565b8181036040830152614c828186613424565b90508181036060830152614c968185613424565b905081810360808301526149c481846132d8565b805161080681613256565b600060208284031215614cca57614cca600080fd5b600061244d8484614caa565b600060033d11156146d05760046000803e5060005160e01c90565b600060443d1015614cff5790565b60405160043d036004823e80513d602482011167ffffffffffffffff82111715614d2857505090565b808201805167ffffffffffffffff811115614d44575050505090565b80602083010160043d038501811115614d5f57505050505090565b614d6e82602001850186613494565b5090949350505050565b603481526000602082017f455243313135353a207472616e7366657220746f206e6f6e204552433131353581527f526563656976657220696d706c656d656e74657200000000000000000000000060208201529150613ed7565b6020808252810161080681614d78565b602881526000602082017f455243313135353a204552433131353552656365697665722072656a6563746581527f6420746f6b656e7300000000000000000000000000000000000000000000000060208201529150613ed7565b6020808252810161080681614de2565b602f81526000602082017f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636581527f20726f6c657320666f722073656c66000000000000000000000000000000000060208201529150613ed7565b6020808252810161080681614e4c565b602381526000602082017f455243313135353a206275726e2066726f6d20746865207a65726f206164647281527f657373000000000000000000000000000000000000000000000000000000000060208201529150613ed7565b6020808252810161080681614eb6565b602481526000602082017f455243313135353a206275726e20616d6f756e7420657863656564732062616c81527f616e63650000000000000000000000000000000000000000000000000000000060208201529150613ed7565b6020808252810161080681614f20565b60a08101614f98828861395f565b614fa5602083018761395f565b614fb26040830186613240565b614fbf6060830185613240565b81810360808301526149c481846132d8565b602c81526000602082017f455243313135355061757361626c653a20746f6b656e207472616e736665722081527f7768696c6520706175736564000000000000000000000000000000000000000060208201529150613ed7565b6020808252810161080681614fd1565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152601701600061506d8285614b2c565b7f206973206d697373696e6720726f6c65200000000000000000000000000000008152915060118201614b5a565b60a081016150a98288613240565b6150b66020830187613240565b6150c36040830186613240565b6150d06060830185613240565b6150dd608083018461395f565b9695505050505050565b634e487b7160e01b600052603160045260246000fd5b80613242565b7f19010000000000000000000000000000000000000000000000000000000000008152600201600061513582856150fd565b60208201915061514582846150fd565b5060200192915050565b60ff8116613242565b608081016151668287613240565b615173602083018661514f565b6151806040830185613240565b6145b16060830184613240565b601881526000602082017f45434453413a20696e76616c6964207369676e6174757265000000000000000081529150613f61565b602080825281016108068161518d565b601f81526000602082017f45434453413a20696e76616c6964207369676e6174757265206c656e6774680081529150613f61565b60208082528101610806816151d1565b602281526000602082017f45434453413a20696e76616c6964207369676e6174757265202773272076616c815261756560f01b60208201529150613ed7565b6020808252810161080681615215565b602281526000602082017f45434453413a20696e76616c6964207369676e6174757265202776272076616c815261756560f01b60208201529150613ed7565b6020808252810161080681615264565b6000816152c2576152c261415c565b506000190190565b60208082527f537472696e67733a20686578206c656e67746820696e73756666696369656e7491019081526000613f61565b60208082528101610806816152ca56fea2646970667358221220cd89dbceba43eb4ce52bd498df47abd9b0e2f7025d602eb53c482a3ca96884e864736f6c63430008080033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106102fe5760003560e01c80637284e4161161019c578063bc706774116100ee578063e583e13211610097578063f242432a11610071578063f242432a14610763578063f5298aca14610776578063f5b541a61461078957600080fd5b8063e583e132146106da578063e94a0102146106ed578063e985e9c51461072757600080fd5b8063d5391393116100c8578063d53913931461068d578063d547741f146106b4578063d58778d6146106c757600080fd5b8063bc70677414610645578063ca15c87314610658578063d2f331101461066b57600080fd5b8063934343de11610150578063a217fddf1161012a578063a217fddf14610617578063a22cb4651461061f578063baea00631461063257600080fd5b8063934343de146105e957806395d89b41146105fc578063979518921461060457600080fd5b80638da5cb5b116101815780638da5cb5b1461057c5780639010d07c1461059d57806391d14854146105b057600080fd5b80637284e4161461054d57806375b238fc1461055557600080fd5b80632eb2c2d611610255578063579a6988116102095780636392a51f116101e35780636392a51f1461050657806366862768146105275780636b20c4541461053a57600080fd5b8063579a6988146104c55780635add6537146104f15780635c975abb146104fa57600080fd5b80633644e5151161023a5780633644e5151461049757806336568abe1461049f5780634e1273f4146104b257600080fd5b80632eb2c2d6146104715780632f2ff15d1461048457600080fd5b806313af4035116102b7578063248a9ca311610291578063248a9ca314610414578063282c51f3146104375780632a9383421461045e57600080fd5b806313af4035146103d757806314cbd993146103ec57806318e97fd11461040157600080fd5b806306fdde03116102e857806306fdde031461034c5780630e89341c14610361578063107046bd1461037457600080fd5b8062fdd58e1461030357806301ffc9a71461032c575b600080fd5b610316610311366004613203565b6107b0565b6040516103239190613248565b60405180910390f35b61033f61033a366004613271565b61080c565b604051610323919061329a565b610354610817565b604051610323919061330c565b61035461036f36600461331d565b6108a6565b6103c461038236600461331d565b6101cb60205260009081526040902080546001820154600283015460038401546004850154600590950154939492939192909160ff8082169161010090041687565b6040516103239796959493929190613387565b6103ea6103e53660046133ef565b6108b1565b005b6103f4610988565b604051610323919061346d565b6103ea61040f36600461356c565b6109e1565b61031661042236600461331d565b60009081526065602052604090206001015490565b6103167f3c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a84881565b6103ea61046c3660046135ba565b610a6c565b6103ea61047f36600461367f565b610c0b565b6103ea610492366004613748565b610e3b565b610316610e62565b6103ea6104ad366004613748565b610e71565b6103f46104c03660046137f0565b610e93565b61033f6104d336600461331d565b60009081526101cb6020526040902060050154610100900460ff1690565b61031661271081565b61012d5460ff1661033f565b6105196105143660046133ef565b610f7b565b604051610323929190613858565b6103546105353660046135ba565b61106d565b6103ea6105483660046138cf565b6110a6565b6103546111d4565b6103167fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b6101c954610590906001600160a01b031681565b6040516103239190613968565b6105906105ab3660046135ba565b6111e2565b61033f6105be366004613748565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6103ea6105f73660046139c1565b611201565b6103546112ea565b6103ea610612366004613a35565b6112f8565b610316600081565b6103ea61062d366004613ade565b61157d565b6103ea610640366004613b11565b611615565b6103ea610653366004613c2d565b611871565b61031661066636600461331d565b611a3c565b61067e610679366004613203565b611a53565b60405161032393929190613ce0565b6103167f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b6103ea6106c2366004613748565b611a88565b6103166106d536600461331d565b611a92565b6103ea6106e8366004613d08565b611ab4565b61033f6106fb366004613203565b6001600160a01b039190911660009081526101c560209081526040808320938352929052205460ff1690565b61033f610735366004613db5565b6001600160a01b03918216600090815260986020908152604080832093909416825291909152205460ff1690565b6103ea610771366004613dd7565b611b2c565b6103ea610784366004613e31565b611ca0565b6103167f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b92981565b60006001600160a01b0383166107e15760405162461bcd60e51b81526004016107d890613ede565b60405180910390fd5b5060008181526097602090815260408083206001600160a01b03861684529091529020545b92915050565b600061080682611d1d565b6101c6805461082590613f04565b80601f016020809104026020016040519081016040528092919081815260200182805461085190613f04565b801561089e5780601f106108735761010080835404028352916020019161089e565b820191906000526020600020905b81548152906001019060200180831161088157829003601f168201915b505050505081565b606061080682611d5b565b6108db7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775336105be565b6108f75760405162461bcd60e51b81526004016107d890613f68565b6001600160a01b03811661091d5760405162461bcd60e51b81526004016107d890613fac565b6101c9546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36101c9805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b60606101ca8054806020026020016040519081016040528092919081815260200182805480156109d757602002820191906000526020600020905b8154815260200190600101908083116109c3575b5050505050905090565b610a0b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775336105be565b610a275760405162461bcd60e51b81526004016107d890613f68565b60008281526101cb6020526040902060050154610100900460ff16610a5e5760405162461bcd60e51b81526004016107d890613ff0565b610a688282611e0e565b5050565b610a967f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6336105be565b610ab25760405162461bcd60e51b81526004016107d890614034565b60008281526101cb602052604090206005810154610100900460ff16610aea5760405162461bcd60e51b81526004016107d890614078565b81610b075760405162461bcd60e51b81526004016107d8906140e2565b80600401544211610b2a5760405162461bcd60e51b81526004016107d89061414c565b6000612710838360020154610b3f9190614172565b610b4991906141a7565b905080826002016000828254610b5f91906141bb565b909155505060038201546004830154610b7891906141bb565b826004016000828254610b8b91906141bb565b90915550610bca905033858360005b6040519080825280601f01601f191660200182016040528015610bc4576020820181803683370190505b50611ea3565b7fadf79fc7a670e099524b7ec65630a87db4c692ea399a4cc07d5b3c0fff3e3086848233604051610bfd939291906141d3565b60405180910390a150505050565b8151835114610c2c5760405162461bcd60e51b81526004016107d890614255565b6001600160a01b038416610c525760405162461bcd60e51b81526004016107d8906142bf565b6001600160a01b038516331480610c6e5750610c6e8533610735565b610c8a5760405162461bcd60e51b81526004016107d890614329565b33610c99818787878787611f81565b60005b8451811015610dcd576000858281518110610cb957610cb9614339565b602002602001015190506000858381518110610cd757610cd7614339565b60209081029190910181015160008481526097835260408082206001600160a01b038e168352909352919091205490915081811015610d285760405162461bcd60e51b81526004016107d8906143a9565b610d3282826143b9565b6097600085815260200190815260200160002060008c6001600160a01b03166001600160a01b0316815260200190815260200160002081905550816097600085815260200190815260200160002060008b6001600160a01b03166001600160a01b031681526020019081526020016000206000828254610db291906141bb565b9250508190555050505080610dc6906143d0565b9050610c9c565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051610e1d929190613858565b60405180910390a4610e33818787878787611f8f565b505050505050565b610e4582826120ad565b600082815260c960205260409020610e5d90826120d3565b505050565b6000610e6c6120e8565b905090565b610e7b8282612121565b600082815260c960205260409020610e5d9082612153565b60608151835114610eb65760405162461bcd60e51b81526004016107d890614445565b6000835167ffffffffffffffff811115610ed257610ed261347e565b604051908082528060200260200182016040528015610efb578160200160208202803683370190505b50905060005b8451811015610f7357610f46858281518110610f1f57610f1f614339565b6020026020010151858381518110610f3957610f39614339565b60200260200101516107b0565b828281518110610f5857610f58614339565b6020908102919091010152610f6c816143d0565b9050610f01565b509392505050565b6060806101ca805480602002602001604051908101604052809291908181526020018280548015610fcb57602002820191906000526020600020905b815481526020019060010190808311610fb7575b50505050509150815167ffffffffffffffff811115610fec57610fec61347e565b604051908082528060200260200182016040528015611015578160200160208202803683370190505b50905060005b82518110156110675761103a84848381518110610f3957610f39614339565b82828151811061104c5761104c614339565b6020908102919091010152611060816143d0565b905061101b565b50915091565b6101cd602052816000526040600020818154811061108a57600080fd5b9060005260206000200160009150915050805461082590613f04565b6110d07f3c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a848336105be565b6110ec5760405162461bcd60e51b81526004016107d890614489565b61115a858585808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505060408051602080890282810182019093528882529093508892508791829185019084908082843760009201919091525061216892505050565b60005b83811015610e335782828281811061117757611177614339565b905060200201356101cb600087878581811061119557611195614339565b90506020020135815260200190815260200160002060020160008282546111bc91906143b9565b909155508190506111cc816143d0565b91505061115d565b6101c8805461082590613f04565b600082815260c9602052604081206111fa9083612306565b9392505050565b61122b7f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b929336105be565b6112475760405162461bcd60e51b81526004016107d8906144f3565b60008381526101cb6020526040902060050154610100900460ff1661127e5760405162461bcd60e51b81526004016107d89061455d565b60008381526101cd602090815260408220805460018101825590835291206112a8910183836130b5565b50827fdfd458a7487af5c9f2b6375168ef2ca45e21f5940cadeca48f97a505bfadcae43384846040516112dd93929190614590565b60405180910390a2505050565b6101c7805461082590613f04565b6113227f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6336105be565b61133e5760405162461bcd60e51b81526004016107d890614034565b6000831161135e5760405162461bcd60e51b81526004016107d8906145ee565b6000821161137e5760405162461bcd60e51b81526004016107d890614630565b8361139b5760405162461bcd60e51b81526004016107d890614674565b60008681526101cb6020526040902060050154610100900460ff16156113d35760405162461bcd60e51b81526004016107d8906146b8565b6101ca80546001810182556000919091527f0faeda9012b7f59bd2a84ac2a33ead5fc9f720c38d8bbf90db1ac3c1518386eb018690556040805160e08101825287815260208101859052908101849052606081018390526080810161143884426141bb565b815260200182600181111561144f5761144f61333e565b81526001602091820181905260008981526101cb83526040908190208451815592840151838301558301516002830155606083015160038301556080830151600483015560a08301516005830180549192909160ff19169083818111156114b8576114b861333e565b021790555060c09190910151600590910180549115156101000261ff00199092169190911790556114ec3387856000610b9a565b61152c8686868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611e0e92505050565b60008681526101cb60205260409081902090517fca8ddcb55f768e292deb4557a3c1f262532d0c7d84e281b47b74614957059c589161156d913391906147b1565b60405180910390a1505050505050565b336001600160a01b03831614156115a65760405162461bcd60e51b81526004016107d890614827565b3360008181526098602090815260408083206001600160a01b038716808552925291829020805460ff191685151517905590519091907f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c319061160990859061329a565b60405180910390a35050565b600054610100900460ff168061162e575060005460ff16155b61164a5760405162461bcd60e51b81526004016107d890614891565b600054610100900460ff1615801561166c576000805461ffff19166101011790555b6116ab8b8b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061231292505050565b61171f6040518060400160405280600781526020017f4c616e644e4654000000000000000000000000000000000000000000000000008152506040518060400160405280600181526020017f3100000000000000000000000000000000000000000000000000000000000000815250612397565b61172a60008461240e565b6117547f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a68461240e565b61177e7f3c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a8488461240e565b6117a87f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b9298461240e565b6117d27fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217758461240e565b6117df6101c68a8a6130b5565b506117ed6101c788886130b5565b506117fb6101c886866130b5565b506101c9805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03841617905560405133906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a38015611864576000805461ff00191690555b5050505050505050505050565b61189b7f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b929336105be565b6118b75760405162461bcd60e51b81526004016107d8906144f3565b834211156118d75760405162461bcd60e51b81526004016107d8906148fb565b6001600160a01b03881660009081526101c56020908152604080832088845290915290205460ff161561191c5760405162461bcd60e51b81526004016107d890614965565b60007f91aaffcde7eb6e14c35a5d629a51978795daafb7f3caeeaad4d913ed8d322c56898989898960405160200161195996959493929190614975565b604051602081830303815290604052805190602001209050600061197c82612418565b9050600061198c8287878761242b565b90508a6001600160a01b0316816001600160a01b0316146119bf5760405162461bcd60e51b81526004016107d890614a29565b6001600160a01b038b1660009081526101c5602090815260408083208b84529091529020805460ff191660011790556119f98b8b8b612455565b60405188906001600160a01b038d16907f98de503528ee59b575ef0c0a2576a82497bfc029a5685b209e9ec333479b10a590600090a35050505050505050505050565b600081815260c960205260408120610806906124f8565b6000806000611a6285856107b0565b60009485526101cb60205260409094206002810154600190910154949690955092505050565b610e7b8282612502565b6101ca8181548110611aa357600080fd5b600091825260209091200154905081565b611ade7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775336105be565b611afa5760405162461bcd60e51b81526004016107d890613f68565b611b076101c687876130b5565b50611b156101c785856130b5565b50611b236101c883836130b5565b50505050505050565b6001600160a01b038416611b525760405162461bcd60e51b81526004016107d8906142bf565b6001600160a01b038516331480611b6e5750611b6e8533610735565b611b8a5760405162461bcd60e51b81526004016107d890614a93565b33611ba9818787611b9a88612528565b611ba388612528565b87611f81565b60008481526097602090815260408083206001600160a01b038a16845290915290205483811015611bec5760405162461bcd60e51b81526004016107d8906143a9565b611bf684826143b9565b60008681526097602090815260408083206001600160a01b038c81168552925280832093909355881681529081208054869290611c349084906141bb565b92505081905550856001600160a01b0316876001600160a01b0316836001600160a01b03167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628888604051611c8a929190614aa3565b60405180910390a4611b23828888888888612573565b611cca7f3c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a848336105be565b611ce65760405162461bcd60e51b81526004016107d890614489565b611cf183838361263d565b60008281526101cb602052604081206002018054839290611d139084906143b9565b9091555050505050565b60006001600160e01b031982167f5a05180f00000000000000000000000000000000000000000000000000000000148061080657506108068261274f565b606081611df45760998054611d6f90613f04565b80601f0160208091040260200160405190810160405280929190818152602001828054611d9b90613f04565b8015611de85780601f10611dbd57610100808354040283529160200191611de8565b820191906000526020600020905b815481529060010190602001808311611dcb57829003601f168201915b50505050509050919050565b60008281526101cc602052604090208054611d6f90613f04565b609981604051602001611e22929190614b4e565b60408051601f1981840301815291815260008481526101cc60209081529190208251611e5393919290910190613139565b50817f6bb7ff708619ba0610cba295a58592e0451dee2622938c8755667688daf3529b6101cc6000858152602001908152602001600020604051611e979190614bda565b60405180910390a25050565b6001600160a01b038416611ec95760405162461bcd60e51b81526004016107d890614c45565b33611eda81600087611b9a88612528565b60008481526097602090815260408083206001600160a01b038916845290915281208054859290611f0c9084906141bb565b92505081905550846001600160a01b031660006001600160a01b0316826001600160a01b03167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628787604051611f63929190614aa3565b60405180910390a4611f7a81600087878787612573565b5050505050565b610e338686868686866127c1565b6001600160a01b0384163b15610e335760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190611fd39089908990889088908890600401614c55565b602060405180830381600087803b158015611fed57600080fd5b505af192505050801561201d575060408051601f3d908101601f1916820190925261201a91810190614cb5565b60015b61207d57612029614cd6565b806308c379a01415612063575061203e614cf1565b806120495750612065565b8060405162461bcd60e51b81526004016107d8919061330c565b505b60405162461bcd60e51b81526004016107d890614dd2565b6001600160e01b0319811663bc197c8160e01b14611b235760405162461bcd60e51b81526004016107d890614e3c565b6000828152606560205260409020600101546120c981336127e5565b610e5d8383612865565b60006111fa836001600160a01b038416612907565b6000610e6c7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6121186101915490565b61019254612956565b6001600160a01b03811633146121495760405162461bcd60e51b81526004016107d890614ea6565b610a688282612990565b60006111fa836001600160a01b038416612a13565b6001600160a01b03831661218e5760405162461bcd60e51b81526004016107d890614f10565b80518251146121af5760405162461bcd60e51b81526004016107d890614255565b60003390506121d281856000868660405180602001604052806000815250611f81565b60005b83518110156122a75760008482815181106121f2576121f2614339565b60200260200101519050600084838151811061221057612210614339565b60209081029190910181015160008481526097835260408082206001600160a01b038c1683529093529190912054909150818110156122615760405162461bcd60e51b81526004016107d890614f7a565b61226b82826143b9565b60009384526097602090815260408086206001600160a01b038c168752909152909320929092555081905061229f816143d0565b9150506121d5565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb86866040516122f8929190613858565b60405180910390a450505050565b60006111fa8383612b06565b600054610100900460ff168061232b575060005460ff16155b6123475760405162461bcd60e51b81526004016107d890614891565b600054610100900460ff16158015612369576000805461ffff19166101011790555b612371612b30565b612379612b30565b61238282612b9c565b8015610a68576000805461ff00191690555050565b600054610100900460ff16806123b0575060005460ff16155b6123cc5760405162461bcd60e51b81526004016107d890614891565b600054610100900460ff161580156123ee576000805461ffff19166101011790555b6123f88383612bfc565b8015610e5d576000805461ff0019169055505050565b610e458282612c88565b60006108066124256120e8565b83612c92565b600080600061243c87878787612cc5565b9150915061244981612da5565b5090505b949350505050565b816001600160a01b0316836001600160a01b031614156124875760405162461bcd60e51b81526004016107d890614827565b6001600160a01b0383811660008181526098602090815260408083209487168084529490915290819020805460ff1916851515179055517f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31906124eb90859061329a565b60405180910390a3505050565b6000610806825490565b60008281526065602052604090206001015461251e81336127e5565b610e5d8383612990565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061256257612562614339565b602090810291909101015292915050565b6001600160a01b0384163b15610e335760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906125b79089908990889088908890600401614f8a565b602060405180830381600087803b1580156125d157600080fd5b505af1925050508015612601575060408051601f3d908101601f191682019092526125fe91810190614cb5565b60015b61260d57612029614cd6565b6001600160e01b0319811663f23a6e6160e01b14611b235760405162461bcd60e51b81526004016107d890614e3c565b6001600160a01b0383166126635760405162461bcd60e51b81526004016107d890614f10565b336126928185600061267487612528565b61267d87612528565b60405180602001604052806000815250611f81565b60008381526097602090815260408083206001600160a01b0388168452909152902054828110156126d55760405162461bcd60e51b81526004016107d890614f7a565b6126df83826143b9565b60008581526097602090815260408083206001600160a01b03808b16808652919093528184209490945551919291908516907fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62906127409089908990614aa3565b60405180910390a45050505050565b60006001600160e01b031982167fd9b67a260000000000000000000000000000000000000000000000000000000014806127b257506001600160e01b031982167f0e89341c00000000000000000000000000000000000000000000000000000000145b80610806575061080682612e8a565b61012d5460ff1615610e335760405162461bcd60e51b81526004016107d89061502b565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610a6857612823816001600160a01b03166014612ef1565b61282e836020612ef1565b60405160200161283f92919061503b565b60408051601f198184030181529082905262461bcd60e51b82526107d89160040161330c565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610a685760008281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556128c33390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600081815260018301602052604081205461294e57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610806565b506000610806565b6000838383463060405160200161297195949392919061509b565b6040516020818303038152906040528051906020012090509392505050565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff1615610a685760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60008181526001830160205260408120548015612afc576000612a376001836143b9565b8554909150600090612a4b906001906143b9565b9050818114612ab0576000866000018281548110612a6b57612a6b614339565b9060005260206000200154905080876000018481548110612a8e57612a8e614339565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080612ac157612ac16150e7565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610806565b6000915050610806565b6000826000018281548110612b1d57612b1d614339565b9060005260206000200154905092915050565b600054610100900460ff1680612b49575060005460ff16155b612b655760405162461bcd60e51b81526004016107d890614891565b600054610100900460ff16158015612b87576000805461ffff19166101011790555b8015612b99576000805461ff00191690555b50565b600054610100900460ff1680612bb5575060005460ff16155b612bd15760405162461bcd60e51b81526004016107d890614891565b600054610100900460ff16158015612bf3576000805461ffff19166101011790555b612382826130a2565b600054610100900460ff1680612c15575060005460ff16155b612c315760405162461bcd60e51b81526004016107d890614891565b600054610100900460ff16158015612c53576000805461ffff19166101011790555b825160208085019190912083519184019190912061019191909155610192558015610e5d576000805461ff0019169055505050565b610a688282612865565b60008282604051602001612ca7929190615103565b60405160208183030381529060405280519060200120905092915050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115612cfc5750600090506003612d9c565b8460ff16601b14158015612d1457508460ff16601c14155b15612d255750600090506004612d9c565b600060018787878760405160008152602001604052604051612d4a9493929190615158565b6020604051602081039080840390855afa158015612d6c573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116612d9557600060019250925050612d9c565b9150600090505b94509492505050565b6000816004811115612db957612db961333e565b1415612dc25750565b6001816004811115612dd657612dd661333e565b1415612df45760405162461bcd60e51b81526004016107d8906151c1565b6002816004811115612e0857612e0861333e565b1415612e265760405162461bcd60e51b81526004016107d890615205565b6003816004811115612e3a57612e3a61333e565b1415612e585760405162461bcd60e51b81526004016107d890615254565b6004816004811115612e6c57612e6c61333e565b1415612b995760405162461bcd60e51b81526004016107d8906152a3565b60006001600160e01b031982167f7965db0b00000000000000000000000000000000000000000000000000000000148061080657507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b0319831614610806565b60606000612f00836002614172565b612f0b9060026141bb565b67ffffffffffffffff811115612f2357612f2361347e565b6040519080825280601f01601f191660200182016040528015612f4d576020820181803683370190505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110612f8457612f84614339565b60200101906001600160f81b031916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110612fcf57612fcf614339565b60200101906001600160f81b031916908160001a9053506000612ff3846002614172565b612ffe9060016141bb565b90505b6001811115613083577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061303f5761303f614339565b1a60f81b82828151811061305557613055614339565b60200101906001600160f81b031916908160001a90535060049490941c9361307c816152b3565b9050613001565b5083156111fa5760405162461bcd60e51b81526004016107d8906152fc565b8051610a68906099906020840190613139565b8280546130c190613f04565b90600052602060002090601f0160209004810192826130e35760008555613129565b82601f106130fc5782800160ff19823516178555613129565b82800160010185558215613129579182015b8281111561312957823582559160200191906001019061310e565b506131359291506131ad565b5090565b82805461314590613f04565b90600052602060002090601f0160209004810192826131675760008555613129565b82601f1061318057805160ff1916838001178555613129565b82800160010185558215613129579182015b82811115613129578251825591602001919060010190613192565b5b8082111561313557600081556001016131ae565b60006001600160a01b038216610806565b6131dc816131c2565b8114612b9957600080fd5b8035610806816131d3565b806131dc565b8035610806816131f2565b6000806040838503121561321957613219600080fd5b600061322585856131e7565b9250506020613236858286016131f8565b9150509250929050565b805b82525050565b602081016108068284613240565b6001600160e01b031981166131dc565b803561080681613256565b60006020828403121561328657613286600080fd5b600061244d8484613266565b801515613242565b602081016108068284613292565b60005b838110156132c35781810151838201526020016132ab565b838111156132d2576000848401525b50505050565b60006132e2825190565b8084526020840193506132f98185602086016132a8565b601f19601f8201165b9093019392505050565b602080825281016111fa81846132d8565b60006020828403121561333257613332600080fd5b600061244d84846131f8565b634e487b7160e01b600052602160045260246000fd5b60028110612b9957612b9961333e565b8061336e81613354565b919050565b600061080682613364565b61324281613373565b60e08101613395828a613240565b6133a26020830189613240565b6133af6040830188613240565b6133bc6060830187613240565b6133c96080830186613240565b6133d660a083018561337e565b6133e360c0830184613292565b98975050505050505050565b60006020828403121561340457613404600080fd5b600061244d84846131e7565b600061341c8383613240565b505060200190565b600061342e825190565b80845260209384019383018060005b838110156134625781516134518882613410565b97506020830192505060010161343d565b509495945050505050565b602080825281016111fa8184613424565b634e487b7160e01b600052604160045260246000fd5b601f19601f830116810181811067ffffffffffffffff821117156134ba576134ba61347e565b6040525050565b60006134cc60405190565b905061336e8282613494565b600067ffffffffffffffff8211156134f2576134f261347e565b601f19601f83011660200192915050565b82818337506000910152565b600061352261351d846134d8565b6134c1565b90508281526020810184848401111561353d5761353d600080fd5b610f73848285613503565b600082601f83011261355c5761355c600080fd5b813561244d84826020860161350f565b6000806040838503121561358257613582600080fd5b600061358e85856131f8565b925050602083013567ffffffffffffffff8111156135ae576135ae600080fd5b61323685828601613548565b600080604083850312156135d0576135d0600080fd5b600061322585856131f8565b600067ffffffffffffffff8211156135f6576135f661347e565b5060209081020190565b600061360e61351d846135dc565b8381529050602080820190840283018581111561362d5761362d600080fd5b835b81811015613651578061364288826131f8565b8452506020928301920161362f565b5050509392505050565b600082601f83011261366f5761366f600080fd5b813561244d848260208601613600565b600080600080600060a0868803121561369a5761369a600080fd5b60006136a688886131e7565b95505060206136b7888289016131e7565b945050604086013567ffffffffffffffff8111156136d7576136d7600080fd5b6136e38882890161365b565b935050606086013567ffffffffffffffff81111561370357613703600080fd5b61370f8882890161365b565b925050608086013567ffffffffffffffff81111561372f5761372f600080fd5b61373b88828901613548565b9150509295509295909350565b6000806040838503121561375e5761375e600080fd5b600061376a85856131f8565b9250506020613236858286016131e7565b600061378961351d846135dc565b838152905060208082019084028301858111156137a8576137a8600080fd5b835b8181101561365157806137bd88826131e7565b845250602092830192016137aa565b600082601f8301126137e0576137e0600080fd5b813561244d84826020860161377b565b6000806040838503121561380657613806600080fd5b823567ffffffffffffffff81111561382057613820600080fd5b61382c858286016137cc565b925050602083013567ffffffffffffffff81111561384c5761384c600080fd5b6132368582860161365b565b604080825281016138698185613424565b9050818103602083015261244d8184613424565b60008083601f84011261389257613892600080fd5b50813567ffffffffffffffff8111156138ad576138ad600080fd5b6020830191508360208202830111156138c8576138c8600080fd5b9250929050565b6000806000806000606086880312156138ea576138ea600080fd5b60006138f688886131e7565b955050602086013567ffffffffffffffff81111561391657613916600080fd5b6139228882890161387d565b9450945050604086013567ffffffffffffffff81111561394457613944600080fd5b6139508882890161387d565b92509250509295509295909350565b613242816131c2565b60208101610806828461395f565b60008083601f84011261398b5761398b600080fd5b50813567ffffffffffffffff8111156139a6576139a6600080fd5b6020830191508360018202830111156138c8576138c8600080fd5b6000806000604084860312156139d9576139d9600080fd5b60006139e586866131f8565b935050602084013567ffffffffffffffff811115613a0557613a05600080fd5b613a1186828701613976565b92509250509250925092565b60028110612b9957600080fd5b803561080681613a1d565b60008060008060008060a08789031215613a5157613a51600080fd5b6000613a5d89896131f8565b965050602087013567ffffffffffffffff811115613a7d57613a7d600080fd5b613a8989828a01613976565b95509550506040613a9c89828a016131f8565b9350506060613aad89828a016131f8565b9250506080613abe89828a01613a2a565b9150509295509295509295565b8015156131dc565b803561080681613acb565b60008060408385031215613af457613af4600080fd5b6000613b0085856131e7565b925050602061323685828601613ad3565b60008060008060008060008060008060c08b8d031215613b3357613b33600080fd5b8a3567ffffffffffffffff811115613b4d57613b4d600080fd5b613b598d828e01613976565b9a509a505060208b013567ffffffffffffffff811115613b7b57613b7b600080fd5b613b878d828e01613976565b985098505060408b013567ffffffffffffffff811115613ba957613ba9600080fd5b613bb58d828e01613976565b965096505060608b013567ffffffffffffffff811115613bd757613bd7600080fd5b613be38d828e01613976565b94509450506080613bf68d828e016131e7565b92505060a0613c078d828e016131e7565b9150509295989b9194979a5092959850565b60ff81166131dc565b803561080681613c19565b600080600080600080600080610100898b031215613c4d57613c4d600080fd5b6000613c598b8b6131e7565b9850506020613c6a8b828c016131e7565b9750506040613c7b8b828c01613ad3565b9650506060613c8c8b828c016131f8565b9550506080613c9d8b828c016131f8565b94505060a0613cae8b828c01613c22565b93505060c0613cbf8b828c016131f8565b92505060e0613cd08b828c016131f8565b9150509295985092959890939650565b60608101613cee8286613240565b613cfb6020830185613240565b61244d6040830184613240565b60008060008060008060608789031215613d2457613d24600080fd5b863567ffffffffffffffff811115613d3e57613d3e600080fd5b613d4a89828a01613976565b9650965050602087013567ffffffffffffffff811115613d6c57613d6c600080fd5b613d7889828a01613976565b9450945050604087013567ffffffffffffffff811115613d9a57613d9a600080fd5b613da689828a01613976565b92509250509295509295509295565b60008060408385031215613dcb57613dcb600080fd5b600061376a85856131e7565b600080600080600060a08688031215613df257613df2600080fd5b6000613dfe88886131e7565b9550506020613e0f888289016131e7565b9450506040613e20888289016131f8565b935050606061370f888289016131f8565b600080600060608486031215613e4957613e49600080fd5b6000613e5586866131e7565b9350506020613e66868287016131f8565b9250506040613e77868287016131f8565b9150509250925092565b602b81526000602082017f455243313135353a2062616c616e636520717565727920666f7220746865207a81527f65726f2061646472657373000000000000000000000000000000000000000000602082015291505b5060400190565b6020808252810161080681613e81565b634e487b7160e01b600052602260045260246000fd5b600281046001821680613f1857607f821691505b60208210811415613f2b57613f2b613eee565b50919050565b601f81526000602082017f4c616e644e46543a2063616c6c6572206973206e6f7420616e2041444d494e00815291505b5060200190565b6020808252810161080681613f31565b601e81526000602082017f4c616e644e46543a20696e76616c6964206f776e65722061646472657373000081529150613f61565b6020808252810161080681613f78565b601d81526000602082017f4c616e644e46543a20746f6b656e206e6f74207265676973746572656400000081529150613f61565b6020808252810161080681613fbc565b601f81526000602082017f4c616e644e46543a2063616c6c6572206973206e6f742061204d494e5445520081529150613f61565b6020808252810161080681614000565b601f81526000602082017f4c616e644e46543a2070726f6a656374206e6f7420726567697374657265640081529150613f61565b6020808252810161080681614044565b602681526000602082017f4c616e644e46543a20696e63726561736520726174696f2063616e6e6f74206281527f65207a65726f000000000000000000000000000000000000000000000000000060208201529150613ed7565b6020808252810161080681614088565b602681526000602082017f4c616e644e46543a2070726f6a65637420697320696e20636f6f6c646f776e2081527f706572696f64000000000000000000000000000000000000000000000000000060208201529150613ed7565b60208082528101610806816140f2565b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561418c5761418c61415c565b500290565b634e487b7160e01b600052601260045260246000fd5b6000826141b6576141b6614191565b500490565b600082198211156141ce576141ce61415c565b500190565b606081016141e18286613240565b6141ee6020830185613240565b61244d604083018461395f565b602881526000602082017f455243313135353a2069647320616e6420616d6f756e7473206c656e6774682081527f6d69736d6174636800000000000000000000000000000000000000000000000060208201529150613ed7565b60208082528101610806816141fb565b602581526000602082017f455243313135353a207472616e7366657220746f20746865207a65726f20616481527f647265737300000000000000000000000000000000000000000000000000000060208201529150613ed7565b6020808252810161080681614265565b603281526000602082017f455243313135353a207472616e736665722063616c6c6572206973206e6f742081527f6f776e6572206e6f7220617070726f766564000000000000000000000000000060208201529150613ed7565b60208082528101610806816142cf565b634e487b7160e01b600052603260045260246000fd5b602a81526000602082017f455243313135353a20696e73756666696369656e742062616c616e636520666f81527f72207472616e736665720000000000000000000000000000000000000000000060208201529150613ed7565b602080825281016108068161434f565b6000828210156143cb576143cb61415c565b500390565b60006000198214156143e4576143e461415c565b5060010190565b602981526000602082017f455243313135353a206163636f756e747320616e6420696473206c656e67746881527f206d69736d61746368000000000000000000000000000000000000000000000060208201529150613ed7565b60208082528101610806816143eb565b601f81526000602082017f4c616e644e46543a2063616c6c6572206973206e6f742061204255524e45520081529150613f61565b6020808252810161080681614455565b602281526000602082017f4c616e644e46543a2063616c6c6572206973206e6f7420616e204f504552415481527f4f5200000000000000000000000000000000000000000000000000000000000060208201529150613ed7565b6020808252810161080681614499565b602381526000602082017f4d6f73734c616e644e46543a2050726f6a656374206e6f74207265676973746581527f726564000000000000000000000000000000000000000000000000000000000060208201529150613ed7565b6020808252810161080681614503565b8183526000602084019350614583838584613503565b601f19601f840116613302565b6040810161459e828661395f565b81810360208301526145b181848661456d565b95945050505050565b601981526000602082017f4c616e644e46543a20696e76616c69642068656374617265730000000000000081529150613f61565b60208082528101610806816145ba565b60208082527f4c616e644e46543a20696e76616c696420636f6f6c646f776e20706572696f6491019081526000613f61565b60208082528101610806816145fe565b601281526000602082017f4c616e644e46543a20656d70747920636964000000000000000000000000000081529150613f61565b6020808252810161080681614640565b601e81526000602082017f4c616e644e46543a2070726f6a65637420616c7265616479206164646564000081529150613f61565b6020808252810161080681614684565b600081610806565b90565b6000610806825b60ff1690565b60006108066146da8360081c90565b805460e08301906146ff816146c8565b6147098582613240565b50506001820154614719816146c8565b6147266020860182613240565b50506002820154614736816146c8565b6147436040860182613240565b50506003820154614753816146c8565b6147606060860182613240565b50506004820154614770816146c8565b61477d6080860182613240565b5050600582015461478d816146d3565b61479a60a086018261337e565b506147a4816146e0565b611f7a60c0860182613292565b61010081016147c0828561395f565b6111fa60208301846146ef565b602981526000602082017f455243313135353a2073657474696e6720617070726f76616c2073746174757381527f20666f722073656c66000000000000000000000000000000000000000000000060208201529150613ed7565b60208082528101610806816147cd565b602e81526000602082017f496e697469616c697a61626c653a20636f6e747261637420697320616c72656181527f647920696e697469616c697a656400000000000000000000000000000000000060208201529150613ed7565b6020808252810161080681614837565b602781526000602082017f4c616e644e46545f417574686f72697a6174696f6e3a2065787069726564206481527f6561646c696e650000000000000000000000000000000000000000000000000060208201529150613ed7565b60208082528101610806816148a1565b602c81526000602082017f4c616e644e46545f417574686f72697a6174696f6e3a20617574686f72697a6181527f74696f6e2069732075736564000000000000000000000000000000000000000060208201529150613ed7565b602080825281016108068161490b565b60c081016149838289613240565b614990602083018861395f565b61499d604083018761395f565b6149aa6060830186613292565b6149b76080830185613240565b6149c460a0830184613240565b979650505050505050565b602881526000602082017f4c616e644e46545f417574686f72697a6174696f6e3a20696e76616c6964207381527f69676e617475726500000000000000000000000000000000000000000000000060208201529150613ed7565b60208082528101610806816149cf565b602981526000602082017f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7281527f20617070726f766564000000000000000000000000000000000000000000000060208201529150613ed7565b6020808252810161080681614a39565b60408101614ab18285613240565b6111fa6020830184613240565b60008154614acb81613f04565b600182168015614ae25760018114614af357614b23565b60ff19831686528186019350614b23565b60008581526020902060005b83811015614b1b57815488820152600190910190602001614aff565b838801955050505b50505092915050565b6000614b36825190565b614b448185602086016132a8565b9290920192915050565b6000614b5a8285614abe565b915061244d8284614b2c565b60008154614b7381613f04565b808552602085019450600182168015614b935760018114614ba557614b23565b60ff1983168652602086019350614b23565b60008581526020902060005b83811015614bcd57815488820152600190910190602001614bb1565b9096019695505050505050565b602080825281016111fa8184614b66565b602181526000602082017f455243313135353a206d696e7420746f20746865207a65726f2061646472657381527f730000000000000000000000000000000000000000000000000000000000000060208201529150613ed7565b6020808252810161080681614beb565b60a08101614c63828861395f565b614c70602083018761395f565b8181036040830152614c828186613424565b90508181036060830152614c968185613424565b905081810360808301526149c481846132d8565b805161080681613256565b600060208284031215614cca57614cca600080fd5b600061244d8484614caa565b600060033d11156146d05760046000803e5060005160e01c90565b600060443d1015614cff5790565b60405160043d036004823e80513d602482011167ffffffffffffffff82111715614d2857505090565b808201805167ffffffffffffffff811115614d44575050505090565b80602083010160043d038501811115614d5f57505050505090565b614d6e82602001850186613494565b5090949350505050565b603481526000602082017f455243313135353a207472616e7366657220746f206e6f6e204552433131353581527f526563656976657220696d706c656d656e74657200000000000000000000000060208201529150613ed7565b6020808252810161080681614d78565b602881526000602082017f455243313135353a204552433131353552656365697665722072656a6563746581527f6420746f6b656e7300000000000000000000000000000000000000000000000060208201529150613ed7565b6020808252810161080681614de2565b602f81526000602082017f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636581527f20726f6c657320666f722073656c66000000000000000000000000000000000060208201529150613ed7565b6020808252810161080681614e4c565b602381526000602082017f455243313135353a206275726e2066726f6d20746865207a65726f206164647281527f657373000000000000000000000000000000000000000000000000000000000060208201529150613ed7565b6020808252810161080681614eb6565b602481526000602082017f455243313135353a206275726e20616d6f756e7420657863656564732062616c81527f616e63650000000000000000000000000000000000000000000000000000000060208201529150613ed7565b6020808252810161080681614f20565b60a08101614f98828861395f565b614fa5602083018761395f565b614fb26040830186613240565b614fbf6060830185613240565b81810360808301526149c481846132d8565b602c81526000602082017f455243313135355061757361626c653a20746f6b656e207472616e736665722081527f7768696c6520706175736564000000000000000000000000000000000000000060208201529150613ed7565b6020808252810161080681614fd1565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152601701600061506d8285614b2c565b7f206973206d697373696e6720726f6c65200000000000000000000000000000008152915060118201614b5a565b60a081016150a98288613240565b6150b66020830187613240565b6150c36040830186613240565b6150d06060830185613240565b6150dd608083018461395f565b9695505050505050565b634e487b7160e01b600052603160045260246000fd5b80613242565b7f19010000000000000000000000000000000000000000000000000000000000008152600201600061513582856150fd565b60208201915061514582846150fd565b5060200192915050565b60ff8116613242565b608081016151668287613240565b615173602083018661514f565b6151806040830185613240565b6145b16060830184613240565b601881526000602082017f45434453413a20696e76616c6964207369676e6174757265000000000000000081529150613f61565b602080825281016108068161518d565b601f81526000602082017f45434453413a20696e76616c6964207369676e6174757265206c656e6774680081529150613f61565b60208082528101610806816151d1565b602281526000602082017f45434453413a20696e76616c6964207369676e6174757265202773272076616c815261756560f01b60208201529150613ed7565b6020808252810161080681615215565b602281526000602082017f45434453413a20696e76616c6964207369676e6174757265202776272076616c815261756560f01b60208201529150613ed7565b6020808252810161080681615264565b6000816152c2576152c261415c565b506000190190565b60208082527f537472696e67733a20686578206c656e67746820696e73756666696369656e7491019081526000613f61565b60208082528101610806816152ca56fea2646970667358221220cd89dbceba43eb4ce52bd498df47abd9b0e2f7025d602eb53c482a3ca96884e864736f6c63430008080033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 27 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.