Polygon Sponsored slots available. Book your slot here!
Contract Overview
Balance:
0 MATIC
MATIC Value:
$0.00
My Name Tag:
Not Available, login to update
[ Download CSV Export ]
Latest 3 internal transactions
Parent Txn Hash | Block | From | To | Value | |||
---|---|---|---|---|---|---|---|
0x6ea8a00039224185b5efd698774a1eabbd78534e1afa791a1faca05e3065f443 | 29597875 | 279 days 2 hrs ago | 0xd43e7042a541cef06e769815cecd399cbc8ddca0 | Contract Creation | 0 MATIC | ||
0x0c10ca873d0a34c63693960510a1482c81a53422772f79e83882dab4c76f522d | 29355281 | 285 days 2 hrs ago | 0xd43e7042a541cef06e769815cecd399cbc8ddca0 | Contract Creation | 0 MATIC | ||
0xa8e48cc933e178a50821e551403a6173eb979b4dcfc6b5f13d7ae75400c72346 | 28666582 | 302 days 4 hrs ago | 0xd43e7042a541cef06e769815cecd399cbc8ddca0 | Contract Creation | 0 MATIC |
[ Download CSV Export ]
Contract Name:
CollectionManager
Compiler Version
v0.8.10+commit.fc410830
Contract Source Code (Solidity)
/** *Submitted for verification at polygonscan.com on 2022-05-24 */ // File: ICollectionManager.sol //SPDX-License-Identifier: Unlicense pragma solidity 0.8.10; interface ICollectionManager { event CollectionInitialized( address, address, string, string, string, uint256, uint256, uint256, uint256, address[], uint256[] ); function initializeCollection( string memory _uri, string memory _name, string memory _symbol, uint256 _startingAt, uint256 _maxSupply, uint256 _initialPrice, address[] memory _payees, uint256[] memory _shares ) external; function getCollections() external view returns (address[] memory); function getCollectionForArtist(address _artist) external view returns (address[] memory); function getArtistOfCollection(address _collectionAddress) external view returns (address); } // File: @openzeppelin/contracts/token/ERC20/IERC20.sol // OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } // File: @openzeppelin/contracts/utils/Strings.sol // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { 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); } } // File: @openzeppelin/contracts/utils/cryptography/ECDSA.sol // OpenZeppelin Contracts v4.4.1 (utils/cryptography/ECDSA.sol) 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 ECDSA { 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 Message, created from `s`. 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(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @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)); } } // File: @openzeppelin/contracts/utils/cryptography/draft-EIP712.sol // OpenZeppelin Contracts v4.4.1 (utils/cryptography/draft-EIP712.sol) pragma solidity ^0.8.0; /** * @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 EIP712 { /* solhint-disable var-name-mixedcase */ // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to // invalidate the cached domain separator if the chain id changes. bytes32 private immutable _CACHED_DOMAIN_SEPARATOR; uint256 private immutable _CACHED_CHAIN_ID; address private immutable _CACHED_THIS; bytes32 private immutable _HASHED_NAME; bytes32 private immutable _HASHED_VERSION; bytes32 private immutable _TYPE_HASH; /* 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]. */ constructor(string memory name, string memory version) { bytes32 hashedName = keccak256(bytes(name)); bytes32 hashedVersion = keccak256(bytes(version)); bytes32 typeHash = keccak256( "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)" ); _HASHED_NAME = hashedName; _HASHED_VERSION = hashedVersion; _CACHED_CHAIN_ID = block.chainid; _CACHED_DOMAIN_SEPARATOR = _buildDomainSeparator(typeHash, hashedName, hashedVersion); _CACHED_THIS = address(this); _TYPE_HASH = typeHash; } /** * @dev Returns the domain separator for the current chain. */ function _domainSeparatorV4() internal view returns (bytes32) { if (address(this) == _CACHED_THIS && block.chainid == _CACHED_CHAIN_ID) { return _CACHED_DOMAIN_SEPARATOR; } else { return _buildDomainSeparator(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION); } } 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 ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash); } } // File: @openzeppelin/contracts/utils/Address.sol // OpenZeppelin Contracts v4.4.1 (utils/Address.sol) pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // 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 Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(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); } } } } // File: @openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol // OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } } // File: @openzeppelin/contracts/utils/introspection/IERC165.sol // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) 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 IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); } // File: @openzeppelin/contracts/utils/introspection/ERC165.sol // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; /** * @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 ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } } // File: @openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol // OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155Receiver.sol) pragma solidity ^0.8.0; /** * @dev _Available since v3.1._ */ interface IERC1155Receiver is IERC165 { /** @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); } // File: @openzeppelin/contracts/token/ERC1155/IERC1155.sol // OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155.sol) pragma solidity ^0.8.0; /** * @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 IERC1155 is IERC165 { /** * @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; } // File: @openzeppelin/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol // OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol) pragma solidity ^0.8.0; /** * @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 IERC1155MetadataURI is IERC1155 { /** * @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); } // File: @openzeppelin/contracts/utils/Context.sol // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with 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 Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } } // File: @openzeppelin/contracts/finance/PaymentSplitter.sol // OpenZeppelin Contracts v4.4.1 (finance/PaymentSplitter.sol) pragma solidity ^0.8.0; /** * @title PaymentSplitter * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware * that the Ether will be split in this way, since it is handled transparently by the contract. * * The split can be in equal parts or in any other arbitrary proportion. The way this is specified is by assigning each * account to a number of shares. Of all the Ether that this contract receives, each account will then be able to claim * an amount proportional to the percentage of total shares they were assigned. * * `PaymentSplitter` follows a _pull payment_ model. This means that payments are not automatically forwarded to the * accounts but kept in this contract, and the actual transfer is triggered as a separate step by calling the {release} * function. * * NOTE: This contract assumes that ERC20 tokens will behave similarly to native tokens (Ether). Rebasing tokens, and * tokens that apply fees during transfers, are likely to not be supported as expected. If in doubt, we encourage you * to run tests before sending real value to this contract. */ contract PaymentSplitter is Context { event PayeeAdded(address account, uint256 shares); event PaymentReleased(address to, uint256 amount); event ERC20PaymentReleased(IERC20 indexed token, address to, uint256 amount); event PaymentReceived(address from, uint256 amount); uint256 private _totalShares; uint256 private _totalReleased; mapping(address => uint256) private _shares; mapping(address => uint256) private _released; address[] private _payees; mapping(IERC20 => uint256) private _erc20TotalReleased; mapping(IERC20 => mapping(address => uint256)) private _erc20Released; /** * @dev Creates an instance of `PaymentSplitter` where each account in `payees` is assigned the number of shares at * the matching position in the `shares` array. * * All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no * duplicates in `payees`. */ constructor(address[] memory payees, uint256[] memory shares_) payable { require(payees.length == shares_.length, "PaymentSplitter: payees and shares length mismatch"); require(payees.length > 0, "PaymentSplitter: no payees"); for (uint256 i = 0; i < payees.length; i++) { _addPayee(payees[i], shares_[i]); } } /** * @dev The Ether received will be logged with {PaymentReceived} events. Note that these events are not fully * reliable: it's possible for a contract to receive Ether without triggering this function. This only affects the * reliability of the events, and not the actual splitting of Ether. * * To learn more about this see the Solidity documentation for * https://solidity.readthedocs.io/en/latest/contracts.html#fallback-function[fallback * functions]. */ receive() external payable virtual { emit PaymentReceived(_msgSender(), msg.value); } /** * @dev Getter for the total shares held by payees. */ function totalShares() public view returns (uint256) { return _totalShares; } /** * @dev Getter for the total amount of Ether already released. */ function totalReleased() public view returns (uint256) { return _totalReleased; } /** * @dev Getter for the total amount of `token` already released. `token` should be the address of an IERC20 * contract. */ function totalReleased(IERC20 token) public view returns (uint256) { return _erc20TotalReleased[token]; } /** * @dev Getter for the amount of shares held by an account. */ function shares(address account) public view returns (uint256) { return _shares[account]; } /** * @dev Getter for the amount of Ether already released to a payee. */ function released(address account) public view returns (uint256) { return _released[account]; } /** * @dev Getter for the amount of `token` tokens already released to a payee. `token` should be the address of an * IERC20 contract. */ function released(IERC20 token, address account) public view returns (uint256) { return _erc20Released[token][account]; } /** * @dev Getter for the address of the payee number `index`. */ function payee(uint256 index) public view returns (address) { return _payees[index]; } /** * @dev Triggers a transfer to `account` of the amount of Ether they are owed, according to their percentage of the * total shares and their previous withdrawals. */ function release(address payable account) public virtual { require(_shares[account] > 0, "PaymentSplitter: account has no shares"); uint256 totalReceived = address(this).balance + totalReleased(); uint256 payment = _pendingPayment(account, totalReceived, released(account)); require(payment != 0, "PaymentSplitter: account is not due payment"); _released[account] += payment; _totalReleased += payment; Address.sendValue(account, payment); emit PaymentReleased(account, payment); } /** * @dev Triggers a transfer to `account` of the amount of `token` tokens they are owed, according to their * percentage of the total shares and their previous withdrawals. `token` must be the address of an IERC20 * contract. */ function release(IERC20 token, address account) public virtual { require(_shares[account] > 0, "PaymentSplitter: account has no shares"); uint256 totalReceived = token.balanceOf(address(this)) + totalReleased(token); uint256 payment = _pendingPayment(account, totalReceived, released(token, account)); require(payment != 0, "PaymentSplitter: account is not due payment"); _erc20Released[token][account] += payment; _erc20TotalReleased[token] += payment; SafeERC20.safeTransfer(token, account, payment); emit ERC20PaymentReleased(token, account, payment); } /** * @dev internal logic for computing the pending payment of an `account` given the token historical balances and * already released amounts. */ function _pendingPayment( address account, uint256 totalReceived, uint256 alreadyReleased ) private view returns (uint256) { return (totalReceived * _shares[account]) / _totalShares - alreadyReleased; } /** * @dev Add a new payee to the contract. * @param account The address of the payee to add. * @param shares_ The number of shares owned by the payee. */ function _addPayee(address account, uint256 shares_) private { require(account != address(0), "PaymentSplitter: account is the zero address"); require(shares_ > 0, "PaymentSplitter: shares are 0"); require(_shares[account] == 0, "PaymentSplitter: account already has shares"); _payees.push(account); _shares[account] = shares_; _totalShares = _totalShares + shares_; emit PayeeAdded(account, shares_); } } // File: @openzeppelin/contracts/token/ERC1155/ERC1155.sol // OpenZeppelin Contracts v4.4.1 (token/ERC1155/ERC1155.sol) pragma solidity ^0.8.0; /** * @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 ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI { using Address 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)) private _operatorApprovals; // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json string private _uri; /** * @dev See {_setURI}. */ constructor(string memory uri_) { _setURI(uri_); } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC1155).interfaceId || interfaceId == type(IERC1155MetadataURI).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 { _setApprovalForAll(_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( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: caller is not owner nor approved" ); _safeTransferFrom(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( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: transfer caller is not owner nor approved" ); _safeBatchTransferFrom(from, to, ids, amounts, data); } /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - `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 memory data ) internal virtual { require(to != address(0), "ERC1155: transfer to the zero address"); 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"); unchecked { _balances[id][from] = fromBalance - amount; } _balances[id][to] += amount; emit TransferSingle(operator, from, to, id, amount); _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - 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[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); require(to != address(0), "ERC1155: transfer to the zero address"); 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"); unchecked { _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 `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mint( address to, uint256 id, uint256 amount, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: mint to the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, address(0), to, _asSingletonArray(id), _asSingletonArray(amount), data); _balances[id][to] += amount; emit TransferSingle(operator, address(0), to, id, amount); _doSafeTransferAcceptanceCheck(operator, address(0), to, 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 (uint256 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 `from` * * Requirements: * * - `from` cannot be the zero address. * - `from` must have at least `amount` tokens of token type `id`. */ function _burn( address from, uint256 id, uint256 amount ) internal virtual { require(from != address(0), "ERC1155: burn from the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, address(0), _asSingletonArray(id), _asSingletonArray(amount), ""); uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: burn amount exceeds balance"); unchecked { _balances[id][from] = fromBalance - amount; } emit TransferSingle(operator, from, 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 from, uint256[] memory ids, uint256[] memory amounts ) internal virtual { require(from != address(0), "ERC1155: burn from the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, address(0), ids, amounts, ""); 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: burn amount exceeds balance"); unchecked { _balances[id][from] = fromBalance - amount; } } emit TransferBatch(operator, from, address(0), ids, amounts); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC1155: setting approval status for self"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @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 IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) { if (response != IERC1155Receiver.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 IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns ( bytes4 response ) { if (response != IERC1155Receiver.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; } } // File: @openzeppelin/contracts/access/Ownable.sol // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } } // File: Collection.sol contract Collection is ERC1155, Ownable, PaymentSplitter, EIP712 { string private constant SIGNING_DOMAIN = "LazyNFT-Voucher"; string private constant SIGNATURE_VERSION = "1"; string public name; string public symbol; uint256 public maxSupply; uint256 public totalSupply; uint256 private startingAt; uint256 private initialPrice; // Mapping from token ID to copies mapping(uint256 => uint256) private copiesOf; // Mapping from token ID to initial price mapping(uint256 => uint256) private price; struct NFTVoucher { uint256 tokenId; uint256 maxSupply; string uri; bytes signature; } event NFTMinted(address, address, uint256, string); event NFTTransfered(address, address, uint256); constructor( uint256 _startingAt, uint256 _maxSupply, uint256 _initialPrice, string memory _uri, string memory _name, string memory _symbol, address _artist, address[] memory _payees, uint256[] memory _shares ) payable ERC1155(_uri) PaymentSplitter(_payees, _shares) EIP712(SIGNING_DOMAIN, SIGNATURE_VERSION) { name = _name; symbol = _symbol; maxSupply = _maxSupply; startingAt = _startingAt; initialPrice = _initialPrice; transferOwnership(_artist); } function mint(address _redeemer, NFTVoucher calldata _voucher) public payable { require(startingAt < block.timestamp, "Not started"); require(copiesOf[_voucher.tokenId] < 1, "Already minted"); // make sure signature is valid and get the address of the signer address signer = _verify(_voucher); // make sure that the signer is authorized to mint NFTs require(signer == owner(), "Signature invalid or unauthorized"); // make sure that the redeemer is paying enough to cover the buyer's cost require(msg.value >= initialPrice, "Insufficient funds to mint"); copiesOf[_voucher.tokenId] = 1; totalSupply = totalSupply + 1; // first assign the token to the signer, to establish provenance on-chain _mint(signer, _voucher.tokenId, 0, ""); // transfer the token to the redeemer _mint(_redeemer, _voucher.tokenId, 1, ""); emit NFTMinted(signer, _redeemer, _voucher.tokenId, _voucher.uri); } function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) public override { _safeTransferFrom(from, to, id, amount, data); emit NFTTransfered(from, to, id); } function _verify(NFTVoucher calldata voucher) private view returns (address) { bytes32 digest = _hash(voucher); return ECDSA.recover(digest, voucher.signature); } function _hash(NFTVoucher calldata voucher) private view returns (bytes32) { return _hashTypedDataV4( keccak256( abi.encode( keccak256("NFTVoucher(uint256 tokenId,uint256 maxSupply,string uri)"), voucher.tokenId, voucher.maxSupply, keccak256(bytes(voucher.uri)) ) ) ); } } // File: CollectionManager.sol contract CollectionManager is ICollectionManager, Ownable { address[] private collections; // Mapping from artist to collection addresses mapping(address => address[]) private collectionsOf; // Mapping from collection address to artist mapping(address => address) private collectionArtist; mapping(address => bool) private isArtist; constructor() { isArtist[msg.sender] = true; } function initializeCollection( string memory _uri, string memory _name, string memory _symbol, uint256 _maxSupply, uint256 _startingAt, uint256 _initialPrice, address[] memory _payees, uint256[] memory _shares ) public { require(_startingAt > block.timestamp, "Invalid timestamp"); address _artist = msg.sender; require(isArtist[_artist], "Invalid artist"); Collection collection = new Collection( _startingAt, _maxSupply, _initialPrice, _uri, _name, _symbol, _artist, _payees, _shares ); address collectionAddr = address(collection); collections.push(collectionAddr); collectionsOf[_artist].push(collectionAddr); collectionArtist[collectionAddr] = _artist; emit CollectionInitialized( _artist, collectionAddr, _uri, _name, _symbol, block.timestamp, _startingAt, _maxSupply, _initialPrice, _payees, _shares ); } function getCollections() external view returns (address[] memory) { return collections; } function getCollectionForArtist(address _artist) external view returns (address[] memory) { return collectionsOf[_artist]; } function getArtistOfCollection(address _collectionAddress) external view returns (address) { return collectionArtist[_collectionAddress]; } function setArtist(address artist) external onlyOwner { isArtist[artist] = true; } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"","type":"address"},{"indexed":false,"internalType":"address","name":"","type":"address"},{"indexed":false,"internalType":"string","name":"","type":"string"},{"indexed":false,"internalType":"string","name":"","type":"string"},{"indexed":false,"internalType":"string","name":"","type":"string"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"},{"indexed":false,"internalType":"address[]","name":"","type":"address[]"},{"indexed":false,"internalType":"uint256[]","name":"","type":"uint256[]"}],"name":"CollectionInitialized","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"},{"inputs":[{"internalType":"address","name":"_collectionAddress","type":"address"}],"name":"getArtistOfCollection","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_artist","type":"address"}],"name":"getCollectionForArtist","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCollections","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_uri","type":"string"},{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"uint256","name":"_maxSupply","type":"uint256"},{"internalType":"uint256","name":"_startingAt","type":"uint256"},{"internalType":"uint256","name":"_initialPrice","type":"uint256"},{"internalType":"address[]","name":"_payees","type":"address[]"},{"internalType":"uint256[]","name":"_shares","type":"uint256[]"}],"name":"initializeCollection","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"artist","type":"address"}],"name":"setArtist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b5061001a33610039565b336000908152600460205260409020805460ff19166001179055610089565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b61453d806100986000396000f3fe60806040523480156200001157600080fd5b5060043610620000935760003560e01c80638da5cb5b11620000625780638da5cb5b14620000f4578063b72dd0a8146200011a578063d4c975331462000149578063f2fde38b146200016057600080fd5b806346e63586146200009857806348302f4214620000ba578063715018a614620000d15780638c792c6d14620000dd575b600080fd5b620000a262000177565b604051620000b1919062000742565b60405180910390f35b620000a2620000cb3660046200077b565b620001db565b620000db62000253565b005b620000db620000ee3660046200095f565b620002c1565b6000546001600160a01b03165b6040516001600160a01b039091168152602001620000b1565b620001016200012b3660046200077b565b6001600160a01b039081166000908152600360205260409020541690565b620000db6200015a3660046200077b565b6200051e565b620000db620001713660046200077b565b6200059e565b60606001805480602002602001604051908101604052809291908181526020018280548015620001d157602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311620001b2575b5050505050905090565b6001600160a01b0381166000908152600260209081526040918290208054835181840281018401909452808452606093928301828280156200024757602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831162000228575b50505050509050919050565b6000546001600160a01b03163314620002b35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b620002bf600062000686565b565b428411620003125760405162461bcd60e51b815260206004820152601160248201527f496e76616c69642074696d657374616d700000000000000000000000000000006044820152606401620002aa565b3360008181526004602052604090205460ff16620003735760405162461bcd60e51b815260206004820152600e60248201527f496e76616c6964206172746973740000000000000000000000000000000000006044820152606401620002aa565b60008587868c8c8c878a8a6040516200038c90620006ee565b620003a09998979695949392919062000ae0565b604051809103906000f080158015620003bd573d6000803e3d6000fd5b50905060008190506001819080600181540180825580915050600190039060005260206000200160009091909190916101000a8154816001600160a01b0302191690836001600160a01b0316021790555060026000846001600160a01b03166001600160a01b03168152602001908152602001600020819080600181540180825580915050600190039060005260206000200160009091909190916101000a8154816001600160a01b0302191690836001600160a01b031602179055508260036000836001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b031602179055507f406106353696db45b76b441d8dbd9cd15490c5922389eaff1e9f653097c6f09e83828d8d8d428d8f8e8e8e604051620005099b9a9998979695949392919062000b80565b60405180910390a15050505050505050505050565b6000546001600160a01b031633146200057a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401620002aa565b6001600160a01b03166000908152600460205260409020805460ff19166001179055565b6000546001600160a01b03163314620005fa5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401620002aa565b6001600160a01b038116620006785760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401620002aa565b620006838162000686565b50565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6138d38062000c3583390190565b600081518084526020808501945080840160005b83811015620007375781516001600160a01b03168752958201959082019060010162000710565b509495945050505050565b602081526000620007576020830184620006fc565b9392505050565b80356001600160a01b03811681146200077657600080fd5b919050565b6000602082840312156200078e57600080fd5b62000757826200075e565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715620007db57620007db62000799565b604052919050565b600082601f830112620007f557600080fd5b813567ffffffffffffffff81111562000812576200081262000799565b62000827601f8201601f1916602001620007af565b8181528460208386010111156200083d57600080fd5b816020850160208301376000918101602001919091529392505050565b600067ffffffffffffffff82111562000877576200087762000799565b5060051b60200190565b600082601f8301126200089357600080fd5b81356020620008ac620008a6836200085a565b620007af565b82815260059290921b84018101918181019086841115620008cc57600080fd5b8286015b84811015620008f257620008e4816200075e565b8352918301918301620008d0565b509695505050505050565b600082601f8301126200090f57600080fd5b8135602062000922620008a6836200085a565b82815260059290921b840181019181810190868411156200094257600080fd5b8286015b84811015620008f2578035835291830191830162000946565b600080600080600080600080610100898b0312156200097d57600080fd5b883567ffffffffffffffff808211156200099657600080fd5b620009a48c838d01620007e3565b995060208b0135915080821115620009bb57600080fd5b620009c98c838d01620007e3565b985060408b0135915080821115620009e057600080fd5b620009ee8c838d01620007e3565b975060608b0135965060808b0135955060a08b0135945060c08b013591508082111562000a1a57600080fd5b62000a288c838d0162000881565b935060e08b013591508082111562000a3f57600080fd5b5062000a4e8b828c01620008fd565b9150509295985092959890939650565b6000815180845260005b8181101562000a865760208185018101518683018201520162000a68565b8181111562000a99576000602083870101525b50601f01601f19169290920160200192915050565b600081518084526020808501945080840160005b83811015620007375781518752958201959082019060010162000ac2565b60006101208b83528a602084015289604084015280606084015262000b088184018a62000a5e565b9050828103608084015262000b1e818962000a5e565b905082810360a084015262000b34818862000a5e565b90506001600160a01b03861660c084015282810360e084015262000b598186620006fc565b905082810361010084015262000b70818562000aae565b9c9b505050505050505050505050565b60006101606001600160a01b03808f168452808e1660208501525080604084015262000baf8184018d62000a5e565b9050828103606084015262000bc5818c62000a5e565b9050828103608084015262000bdb818b62000a5e565b90508860a08401528760c08401528660e08401528561010084015282810361012084015262000c0b8186620006fc565b905082810361014084015262000c22818562000aae565b9e9d505050505050505050505050505056fe610140604052604051620038d3380380620038d3833981016040819052620000279162000872565b6040518060400160405280600f81526020016e2630bd3ca7232a16ab37bab1b432b960891b815250604051806040016040528060018152602001603160f81b8152508383896200007d81620002a360201b60201c565b506200008933620002bc565b8051825114620000fb5760405162461bcd60e51b815260206004820152603260248201527f5061796d656e7453706c69747465723a2070617965657320616e6420736861726044820152710cae640d8cadccee8d040dad2e6dac2e8c6d60731b60648201526084015b60405180910390fd5b60008251116200014e5760405162461bcd60e51b815260206004820152601a60248201527f5061796d656e7453706c69747465723a206e6f207061796565730000000000006044820152606401620000f2565b60005b8251811015620001ba57620001a583828151811062000174576200017462000985565b602002602001015183838151811062000191576200019162000985565b60200260200101516200030e60201b60201c565b80620001b181620009b1565b91505062000151565b5050825160208085019190912083518483012060e08290526101008190524660a0818152604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81880181905281830187905260608201869052608082019490945230818401528151808203909301835260c0019052805194019390932091935091906080523060c0526101205250508651620002639250600b91506020880190620005cd565b5083516200027990600c906020870190620005cd565b50600d889055600f89905560108790556200029483620004fc565b50505050505050505062000a27565b8051620002b8906002906020840190620005cd565b5050565b600380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b0382166200037b5760405162461bcd60e51b815260206004820152602c60248201527f5061796d656e7453706c69747465723a206163636f756e74206973207468652060448201526b7a65726f206164647265737360a01b6064820152608401620000f2565b60008111620003cd5760405162461bcd60e51b815260206004820152601d60248201527f5061796d656e7453706c69747465723a207368617265732061726520300000006044820152606401620000f2565b6001600160a01b03821660009081526006602052604090205415620004495760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e7420616c726561647960448201526a206861732073686172657360a81b6064820152608401620000f2565b60088054600181019091557ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30180546001600160a01b0319166001600160a01b0384169081179091556000908152600660205260409020819055600454620004b3908290620009cf565b600455604080516001600160a01b0384168152602081018390527f40c340f65e17194d14ddddb073d3c9f888e3cb52b5aae0c6c7706b4fbc905fac910160405180910390a15050565b6003546001600160a01b03163314620005585760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401620000f2565b6001600160a01b038116620005bf5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401620000f2565b620005ca81620002bc565b50565b828054620005db90620009ea565b90600052602060002090601f016020900481019282620005ff57600085556200064a565b82601f106200061a57805160ff19168380011785556200064a565b828001600101855582156200064a579182015b828111156200064a5782518255916020019190600101906200062d565b50620006589291506200065c565b5090565b5b808211156200065857600081556001016200065d565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715620006b457620006b462000673565b604052919050565b600082601f830112620006ce57600080fd5b81516001600160401b03811115620006ea57620006ea62000673565b602062000700601f8301601f1916820162000689565b82815285828487010111156200071557600080fd5b60005b838110156200073557858101830151828201840152820162000718565b83811115620007475760008385840101525b5095945050505050565b80516001600160a01b03811681146200076957600080fd5b919050565b60006001600160401b038211156200078a576200078a62000673565b5060051b60200190565b600082601f830112620007a657600080fd5b81516020620007bf620007b9836200076e565b62000689565b82815260059290921b84018101918181019086841115620007df57600080fd5b8286015b848110156200080557620007f78162000751565b8352918301918301620007e3565b509695505050505050565b600082601f8301126200082257600080fd5b8151602062000835620007b9836200076e565b82815260059290921b840181019181810190868411156200085557600080fd5b8286015b8481101562000805578051835291830191830162000859565b60008060008060008060008060006101208a8c0312156200089257600080fd5b895160208b015160408c015160608d0151929b5090995097506001600160401b0380821115620008c157600080fd5b620008cf8d838e01620006bc565b975060808c0151915080821115620008e657600080fd5b620008f48d838e01620006bc565b965060a08c01519150808211156200090b57600080fd5b620009198d838e01620006bc565b95506200092960c08d0162000751565b945060e08c01519150808211156200094057600080fd5b6200094e8d838e0162000794565b93506101008c01519150808211156200096657600080fd5b50620009758c828d0162000810565b9150509295985092959850929598565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415620009c857620009c86200099b565b5060010190565b60008219821115620009e557620009e56200099b565b500190565b600181811c90821680620009ff57607f821691505b6020821081141562000a2157634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a05160c05160e0516101005161012051612e5c62000a776000396000612335015260006123840152600061235f015260006122b8015260006122e20152600061230c0152612e5c6000f3fe6080604052600436106101995760003560e01c80638b83209b116100e1578063ce7c2ac21161008a578063e33b7de311610064578063e33b7de3146104f7578063e985e9c51461050c578063f242432a14610555578063f2fde38b1461057557600080fd5b8063ce7c2ac214610475578063d5abeb01146104ab578063d79779b2146104c157600080fd5b80639852595c116100bb5780639852595c1461040c5780639c49365814610442578063a22cb4651461045557600080fd5b80638b83209b146103a15780638da5cb5b146103d957806395d89b41146103f757600080fd5b80632eb2c2d61161014357806348b750441161011d57806348b750441461033f5780634e1273f41461035f578063715018a61461038c57600080fd5b80632eb2c2d6146102c45780633a98ef39146102e4578063406072a9146102f957600080fd5b80630e89341c116101745780630e89341c1461026c57806318160ddd1461028c57806319165587146102a257600080fd5b8062fdd58e146101e757806301ffc9a71461021a57806306fdde031461024a57600080fd5b366101e2577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be77033604080516001600160a01b0390921682523460208301520160405180910390a1005b600080fd5b3480156101f357600080fd5b50610207610202366004612558565b610595565b6040519081526020015b60405180910390f35b34801561022657600080fd5b5061023a61023536600461259a565b61063e565b6040519015158152602001610211565b34801561025657600080fd5b5061025f610690565b6040516102119190612613565b34801561027857600080fd5b5061025f610287366004612626565b61071e565b34801561029857600080fd5b50610207600e5481565b3480156102ae57600080fd5b506102c26102bd36600461263f565b6107b2565b005b3480156102d057600080fd5b506102c26102df3660046127a8565b610964565b3480156102f057600080fd5b50600454610207565b34801561030557600080fd5b50610207610314366004612856565b6001600160a01b039182166000908152600a6020908152604080832093909416825291909152205490565b34801561034b57600080fd5b506102c261035a366004612856565b610a06565b34801561036b57600080fd5b5061037f61037a36600461288f565b610c62565b6040516102119190612997565b34801561039857600080fd5b506102c2610da0565b3480156103ad57600080fd5b506103c16103bc366004612626565b610e06565b6040516001600160a01b039091168152602001610211565b3480156103e557600080fd5b506003546001600160a01b03166103c1565b34801561040357600080fd5b5061025f610e36565b34801561041857600080fd5b5061020761042736600461263f565b6001600160a01b031660009081526007602052604090205490565b6102c26104503660046129aa565b610e43565b34801561046157600080fd5b506102c2610470366004612a04565b611075565b34801561048157600080fd5b5061020761049036600461263f565b6001600160a01b031660009081526006602052604090205490565b3480156104b757600080fd5b50610207600d5481565b3480156104cd57600080fd5b506102076104dc36600461263f565b6001600160a01b031660009081526009602052604090205490565b34801561050357600080fd5b50600554610207565b34801561051857600080fd5b5061023a610527366004612856565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b34801561056157600080fd5b506102c2610570366004612a32565b611084565b34801561058157600080fd5b506102c261059036600461263f565b6110e3565b60006001600160a01b0383166106185760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201527f65726f206164647265737300000000000000000000000000000000000000000060648201526084015b60405180910390fd5b506000908152602081815260408083206001600160a01b03949094168352929052205490565b60006001600160e01b03198216636cdb3d1360e11b148061066f57506001600160e01b031982166303a24d0760e21b145b8061068a57506301ffc9a760e01b6001600160e01b03198316145b92915050565b600b805461069d90612a9b565b80601f01602080910402602001604051908101604052809291908181526020018280546106c990612a9b565b80156107165780601f106106eb57610100808354040283529160200191610716565b820191906000526020600020905b8154815290600101906020018083116106f957829003601f168201915b505050505081565b60606002805461072d90612a9b565b80601f016020809104026020016040519081016040528092919081815260200182805461075990612a9b565b80156107a65780601f1061077b576101008083540402835291602001916107a6565b820191906000526020600020905b81548152906001019060200180831161078957829003601f168201915b50505050509050919050565b6001600160a01b0381166000908152600660205260409020546108265760405162461bcd60e51b815260206004820152602660248201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060448201526573686172657360d01b606482015260840161060f565b600061083160055490565b61083b9047612aec565b905060006108688383610863866001600160a01b031660009081526007602052604090205490565b6111c5565b9050806108cb5760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060448201526a191d59481c185e5b595b9d60aa1b606482015260840161060f565b6001600160a01b038316600090815260076020526040812080548392906108f3908490612aec565b92505081905550806005600082825461090c9190612aec565b9091555061091c9050838261120d565b604080516001600160a01b0385168152602081018390527fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b05691015b60405180910390a1505050565b6001600160a01b03851633148061098057506109808533610527565b6109f25760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f742060448201527f6f776e6572206e6f7220617070726f7665640000000000000000000000000000606482015260840161060f565b6109ff858585858561132b565b5050505050565b6001600160a01b038116600090815260066020526040902054610a7a5760405162461bcd60e51b815260206004820152602660248201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060448201526573686172657360d01b606482015260840161060f565b6001600160a01b0382166000908152600960205260408120546040516370a0823160e01b81523060048201526001600160a01b038516906370a0823190602401602060405180830381865afa158015610ad7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610afb9190612b04565b610b059190612aec565b90506000610b3e838361086387876001600160a01b039182166000908152600a6020908152604080832093909416825291909152205490565b905080610ba15760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060448201526a191d59481c185e5b595b9d60aa1b606482015260840161060f565b6001600160a01b038085166000908152600a6020908152604080832093871683529290529081208054839290610bd8908490612aec565b90915550506001600160a01b03841660009081526009602052604081208054839290610c05908490612aec565b90915550610c16905084848361159e565b604080516001600160a01b038581168252602082018490528616917f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a910160405180910390a250505050565b60608151835114610cdb5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e67746860448201527f206d69736d617463680000000000000000000000000000000000000000000000606482015260840161060f565b6000835167ffffffffffffffff811115610cf757610cf761265c565b604051908082528060200260200182016040528015610d20578160200160208202803683370190505b50905060005b8451811015610d9857610d6b858281518110610d4457610d44612b1d565b6020026020010151858381518110610d5e57610d5e612b1d565b6020026020010151610595565b828281518110610d7d57610d7d612b1d565b6020908102919091010152610d9181612b33565b9050610d26565b509392505050565b6003546001600160a01b03163314610dfa5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161060f565b610e046000611605565b565b600060088281548110610e1b57610e1b612b1d565b6000918252602090912001546001600160a01b031692915050565b600c805461069d90612a9b565b42600f5410610e945760405162461bcd60e51b815260206004820152600b60248201527f4e6f742073746172746564000000000000000000000000000000000000000000604482015260640161060f565b8035600090815260116020526040902054600111610ef45760405162461bcd60e51b815260206004820152600e60248201527f416c7265616479206d696e746564000000000000000000000000000000000000604482015260640161060f565b6000610eff8261166f565b9050610f136003546001600160a01b031690565b6001600160a01b0316816001600160a01b031614610f7d5760405162461bcd60e51b815260206004820152602160248201527f5369676e617475726520696e76616c6964206f7220756e617574686f72697a656044820152601960fa1b606482015260840161060f565b601054341015610fcf5760405162461bcd60e51b815260206004820152601a60248201527f496e73756666696369656e742066756e647320746f206d696e74000000000000604482015260640161060f565b81356000908152601160205260409020600190819055600e54610ff191612aec565b600e55604080516020810190915260008082526110129183918535916116c8565b6110328383600001356001604051806020016040528060008152506116c8565b7f62e892e3122007df811ddcdf33dc70fd7c6c1d0301fba644e97cbbcdb71c88a9818484356110646040870187612b4e565b604051610957959493929190612b95565b6110803383836117d2565b5050565b61109185858585856118c7565b604080516001600160a01b038088168252861660208201529081018490527fe803da0b7e6c523ad7e47d8266044be56d50f0ca83a550c0605ccbbc6d4168a09060600160405180910390a15050505050565b6003546001600160a01b0316331461113d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161060f565b6001600160a01b0381166111b95760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161060f565b6111c281611605565b50565b6004546001600160a01b038416600090815260066020526040812054909183916111ef9086612be9565b6111f99190612c08565b6112039190612c2a565b90505b9392505050565b8047101561125d5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e6365000000604482015260640161060f565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146112aa576040519150601f19603f3d011682016040523d82523d6000602084013e6112af565b606091505b50509050806113265760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d61792068617665207265766572746564000000000000606482015260840161060f565b505050565b81518351146113a25760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e6774682060448201527f6d69736d61746368000000000000000000000000000000000000000000000000606482015260840161060f565b6001600160a01b0384166114065760405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b606482015260840161060f565b3360005b845181101561153057600085828151811061142757611427612b1d565b60200260200101519050600085838151811061144557611445612b1d565b602090810291909101810151600084815280835260408082206001600160a01b038e1683529093529190912054909150818110156114d85760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201526939103a3930b739b332b960b11b606482015260840161060f565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290611515908490612aec565b925050819055505050508061152990612b33565b905061140a565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051611580929190612c41565b60405180910390a4611596818787878787611a65565b505050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1663a9059cbb60e01b179052611326908490611c0b565b600380546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60008061167b83611cf0565b90506112068161168e6060860186612b4e565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611d8192505050565b6001600160a01b0384166117285760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b606482015260840161060f565b336117428160008761173988611d9d565b6109ff88611d9d565b6000848152602081815260408083206001600160a01b038916845290915281208054859290611772908490612aec565b909155505060408051858152602081018590526001600160a01b0380881692600092918516917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46109ff81600087878787611de8565b816001600160a01b0316836001600160a01b0316141561185a5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c2073746174757360448201527f20666f722073656c660000000000000000000000000000000000000000000000606482015260840161060f565b6001600160a01b03838116600081815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b03841661192b5760405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b606482015260840161060f565b3361193b81878761173988611d9d565b6000848152602081815260408083206001600160a01b038a168452909152902054838110156119bf5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201526939103a3930b739b332b960b11b606482015260840161060f565b6000858152602081815260408083206001600160a01b038b81168552925280832087850390559088168252812080548692906119fc908490612aec565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4611a5c828888888888611de8565b50505050505050565b6001600160a01b0384163b156115965760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190611aa99089908990889088908890600401612c6f565b6020604051808303816000875af1925050508015611ae4575060408051601f3d908101601f19168201909252611ae191810190612ccd565b60015b611b9a57611af0612cea565b806308c379a01415611b2a5750611b05612d05565b80611b105750611b2c565b8060405162461bcd60e51b815260040161060f9190612613565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e204552433131353560448201527f526563656976657220696d706c656d656e746572000000000000000000000000606482015260840161060f565b6001600160e01b0319811663bc197c8160e01b14611a5c5760405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a656374656044820152676420746f6b656e7360c01b606482015260840161060f565b6000611c60826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611ee49092919063ffffffff16565b8051909150156113265780806020019051810190611c7e9190612d8f565b6113265760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f74207375636365656400000000000000000000000000000000000000000000606482015260840161060f565b600061068a7f489a4f9a9e1d28d4c3fc6c2da36171eb868361a1a7fdb3abb1030d7894c0a37b83356020850135611d2a6040870187612b4e565b604051611d38929190612dac565b604051908190038120611d669493929160200193845260208401929092526040830152606082015260800190565b60405160208183030381529060405280519060200120611ef3565b6000806000611d908585611f41565b91509150610d9881611fb1565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110611dd757611dd7612b1d565b602090810291909101015292915050565b6001600160a01b0384163b156115965760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e6190611e2c9089908990889088908890600401612dbc565b6020604051808303816000875af1925050508015611e67575060408051601f3d908101601f19168201909252611e6491810190612ccd565b60015b611e7357611af0612cea565b6001600160e01b0319811663f23a6e6160e01b14611a5c5760405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a656374656044820152676420746f6b656e7360c01b606482015260840161060f565b6060611203848460008561216c565b600061068a611f006122ab565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b600080825160411415611f785760208301516040840151606085015160001a611f6c878285856123d5565b94509450505050611faa565b825160401415611fa25760208301516040840151611f978683836124c2565b935093505050611faa565b506000905060025b9250929050565b6000816004811115611fc557611fc5612df4565b1415611fce5750565b6001816004811115611fe257611fe2612df4565b14156120305760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015260640161060f565b600281600481111561204457612044612df4565b14156120925760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161060f565b60038160048111156120a6576120a6612df4565b14156120ff5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b606482015260840161060f565b600481600481111561211357612113612df4565b14156111c25760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b606482015260840161060f565b6060824710156121e45760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c0000000000000000000000000000000000000000000000000000606482015260840161060f565b843b6122325760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161060f565b600080866001600160a01b0316858760405161224e9190612e0a565b60006040518083038185875af1925050503d806000811461228b576040519150601f19603f3d011682016040523d82523d6000602084013e612290565b606091505b50915091506122a082828661250a565b979650505050505050565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614801561230457507f000000000000000000000000000000000000000000000000000000000000000046145b1561232e57507f000000000000000000000000000000000000000000000000000000000000000090565b50604080517f00000000000000000000000000000000000000000000000000000000000000006020808301919091527f0000000000000000000000000000000000000000000000000000000000000000828401527f000000000000000000000000000000000000000000000000000000000000000060608301524660808301523060a0808401919091528351808403909101815260c0909201909252805191012090565b90565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561240c57506000905060036124b9565b8460ff16601b1415801561242457508460ff16601c14155b1561243557506000905060046124b9565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612489573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166124b2576000600192509250506124b9565b9150600090505b94509492505050565b6000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831660ff84901c601b016124fc878288856123d5565b935093505050935093915050565b60608315612519575081611206565b8251156125295782518084602001fd5b8160405162461bcd60e51b815260040161060f9190612613565b6001600160a01b03811681146111c257600080fd5b6000806040838503121561256b57600080fd5b823561257681612543565b946020939093013593505050565b6001600160e01b0319811681146111c257600080fd5b6000602082840312156125ac57600080fd5b813561120681612584565b60005b838110156125d25781810151838201526020016125ba565b838111156125e1576000848401525b50505050565b600081518084526125ff8160208601602086016125b7565b601f01601f19169290920160200192915050565b60208152600061120660208301846125e7565b60006020828403121561263857600080fd5b5035919050565b60006020828403121561265157600080fd5b813561120681612543565b634e487b7160e01b600052604160045260246000fd5b601f8201601f1916810167ffffffffffffffff811182821017156126985761269861265c565b6040525050565b600067ffffffffffffffff8211156126b9576126b961265c565b5060051b60200190565b600082601f8301126126d457600080fd5b813560206126e18261269f565b6040516126ee8282612672565b83815260059390931b850182019282810191508684111561270e57600080fd5b8286015b848110156127295780358352918301918301612712565b509695505050505050565b600082601f83011261274557600080fd5b813567ffffffffffffffff81111561275f5761275f61265c565b604051612776601f8301601f191660200182612672565b81815284602083860101111561278b57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a086880312156127c057600080fd5b85356127cb81612543565b945060208601356127db81612543565b9350604086013567ffffffffffffffff808211156127f857600080fd5b61280489838a016126c3565b9450606088013591508082111561281a57600080fd5b61282689838a016126c3565b9350608088013591508082111561283c57600080fd5b5061284988828901612734565b9150509295509295909350565b6000806040838503121561286957600080fd5b823561287481612543565b9150602083013561288481612543565b809150509250929050565b600080604083850312156128a257600080fd5b823567ffffffffffffffff808211156128ba57600080fd5b818501915085601f8301126128ce57600080fd5b813560206128db8261269f565b6040516128e88282612672565b83815260059390931b850182019282810191508984111561290857600080fd5b948201945b8386101561292f57853561292081612543565b8252948201949082019061290d565b9650508601359250508082111561294557600080fd5b50612952858286016126c3565b9150509250929050565b600081518084526020808501945080840160005b8381101561298c57815187529582019590820190600101612970565b509495945050505050565b602081526000611206602083018461295c565b600080604083850312156129bd57600080fd5b82356129c881612543565b9150602083013567ffffffffffffffff8111156129e457600080fd5b83016080818603121561288457600080fd5b80151581146111c257600080fd5b60008060408385031215612a1757600080fd5b8235612a2281612543565b91506020830135612884816129f6565b600080600080600060a08688031215612a4a57600080fd5b8535612a5581612543565b94506020860135612a6581612543565b93506040860135925060608601359150608086013567ffffffffffffffff811115612a8f57600080fd5b61284988828901612734565b600181811c90821680612aaf57607f821691505b60208210811415612ad057634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60008219821115612aff57612aff612ad6565b500190565b600060208284031215612b1657600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b6000600019821415612b4757612b47612ad6565b5060010190565b6000808335601e19843603018112612b6557600080fd5b83018035915067ffffffffffffffff821115612b8057600080fd5b602001915036819003821315611faa57600080fd5b60006001600160a01b03808816835280871660208401525084604083015260806060830152826080830152828460a0840137600060a0848401015260a0601f19601f85011683010190509695505050505050565b6000816000190483118215151615612c0357612c03612ad6565b500290565b600082612c2557634e487b7160e01b600052601260045260246000fd5b500490565b600082821015612c3c57612c3c612ad6565b500390565b604081526000612c54604083018561295c565b8281036020840152612c66818561295c565b95945050505050565b60006001600160a01b03808816835280871660208401525060a06040830152612c9b60a083018661295c565b8281036060840152612cad818661295c565b90508281036080840152612cc181856125e7565b98975050505050505050565b600060208284031215612cdf57600080fd5b815161120681612584565b600060033d11156123d25760046000803e5060005160e01c90565b600060443d1015612d135790565b6040516003193d81016004833e81513d67ffffffffffffffff8160248401118184111715612d4357505050505090565b8285019150815181811115612d5b5750505050505090565b843d8701016020828501011115612d755750505050505090565b612d8460208286010187612672565b509095945050505050565b600060208284031215612da157600080fd5b8151611206816129f6565b8183823760009101908152919050565b60006001600160a01b03808816835280871660208401525084604083015283606083015260a060808301526122a060a08301846125e7565b634e487b7160e01b600052602160045260246000fd5b60008251612e1c8184602087016125b7565b919091019291505056fea26469706673582212203a2aa8e8d1d29d83dd5d237fbda66573b7cd301df1a7df7afa2c8cee6062efaa64736f6c634300080a0033a26469706673582212203491604e0676813f2f52bfbfff6dbc43e51695d7b7909ab53832652fb40a828f64736f6c634300080a0033
Deployed ByteCode Sourcemap
71765:2234:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;73481:104;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;73593:138;;;;;;:::i;:::-;;:::i;67430:103::-;;;:::i;:::-;;72209:1264;;;;;;:::i;:::-;;:::i;66779:87::-;66825:7;66852:6;-1:-1:-1;;;;;66852:6:0;66779:87;;;-1:-1:-1;;;;;5210:55:1;;;5192:74;;5180:2;5165:18;66779:87:0;5046:226:1;73739:153:0;;;;;;:::i;:::-;-1:-1:-1;;;;;73848:36:0;;;73821:7;73848:36;;;:16;:36;;;;;;;;73739:153;73900:96;;;;;;:::i;:::-;;:::i;67688:201::-;;;;;;:::i;:::-;;:::i;73481:104::-;73530:16;73566:11;73559:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;73559:18:0;;;;;;;;;;;;;;;;;;;;;;;73481:104;:::o;73593:138::-;-1:-1:-1;;;;;73701:22:0;;;;;;:13;:22;;;;;;;;;73694:29;;;;;;;;;;;;;;;;;73665:16;;73694:29;;;73701:22;73694:29;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;73694:29:0;;;;;;;;;;;;;;;;;;;;;;;73593:138;;;:::o;67430:103::-;66825:7;66852:6;-1:-1:-1;;;;;66852:6:0;42423:10;66999:23;66991:68;;;;-1:-1:-1;;;66991:68:0;;5479:2:1;66991:68:0;;;5461:21:1;;;5498:18;;;5491:30;5557:34;5537:18;;;5530:62;5609:18;;66991:68:0;;;;;;;;;67495:30:::1;67522:1;67495:18;:30::i;:::-;67430:103::o:0;72209:1264::-;72538:15;72524:11;:29;72516:59;;;;-1:-1:-1;;;72516:59:0;;5840:2:1;72516:59:0;;;5822:21:1;5879:2;5859:18;;;5852:30;5918:19;5898:18;;;5891:47;5955:18;;72516:59:0;5638:341:1;72516:59:0;72606:10;72588:15;72637:17;;;:8;:17;;;;;;;;72629:44;;;;-1:-1:-1;;;72629:44:0;;6186:2:1;72629:44:0;;;6168:21:1;6225:2;6205:18;;;6198:30;6264:16;6244:18;;;6237:44;6298:18;;72629:44:0;5984:338:1;72629:44:0;72686:21;72739:11;72765:10;72790:13;72818:4;72837:5;72857:7;72879;72901;72923;72710:231;;;;;:::i;:::-;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;72686:255;;72954:22;72987:10;72954:44;;73011:11;73028:14;73011:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;73011:32:0;;;;;-1:-1:-1;;;;;73011:32:0;;;;;;73054:13;:22;73068:7;-1:-1:-1;;;;;73054:22:0;-1:-1:-1;;;;;73054:22:0;;;;;;;;;;;;73082:14;73054:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;73054:43:0;;;;;-1:-1:-1;;;;;73054:43:0;;;;;;73143:7;73108:16;:32;73125:14;-1:-1:-1;;;;;73108:32:0;-1:-1:-1;;;;;73108:32:0;;;;;;;;;;;;;:42;;;;;-1:-1:-1;;;;;73108:42:0;;;;;-1:-1:-1;;;;;73108:42:0;;;;;;73168:297;73204:7;73226:14;73255:4;73274:5;73294:7;73316:15;73346:11;73372:10;73397:13;73425:7;73447;73168:297;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;72505:968;;;72209:1264;;;;;;;;:::o;73900:96::-;66825:7;66852:6;-1:-1:-1;;;;;66852:6:0;42423:10;66999:23;66991:68;;;;-1:-1:-1;;;66991:68:0;;5479:2:1;66991:68:0;;;5461:21:1;;;5498:18;;;5491:30;5557:34;5537:18;;;5530:62;5609:18;;66991:68:0;5277:356:1;66991:68:0;-1:-1:-1;;;;;73965:16:0::1;;::::0;;;:8:::1;:16;::::0;;;;:23;;-1:-1:-1;;73965:23:0::1;73984:4;73965:23;::::0;;73900:96::o;67688:201::-;66825:7;66852:6;-1:-1:-1;;;;;66852:6:0;42423:10;66999:23;66991:68;;;;-1:-1:-1;;;66991:68:0;;5479:2:1;66991:68:0;;;5461:21:1;;;5498:18;;;5491:30;5557:34;5537:18;;;5530:62;5609:18;;66991:68:0;5277:356:1;66991:68:0;-1:-1:-1;;;;;67777:22:0;::::1;67769:73;;;::::0;-1:-1:-1;;;67769:73:0;;10260:2:1;67769:73:0::1;::::0;::::1;10242:21:1::0;10299:2;10279:18;;;10272:30;10338:34;10318:18;;;10311:62;10409:8;10389:18;;;10382:36;10435:19;;67769:73:0::1;10058:402:1::0;67769:73:0::1;67853:28;67872:8;67853:18;:28::i;:::-;67688:201:::0;:::o;68049:191::-;68123:16;68142:6;;-1:-1:-1;;;;;68159:17:0;;;;;;;;;;68192:40;;68142:6;;;;;;;68192:40;;68123:16;68192:40;68112:128;68049:191;:::o;-1:-1:-1:-;;;;;;;;:::o;14:484:1:-;67:3;105:5;99:12;132:6;127:3;120:19;158:4;187:2;182:3;178:12;171:19;;224:2;217:5;213:14;245:1;255:218;269:6;266:1;263:13;255:218;;;334:13;;-1:-1:-1;;;;;330:62:1;318:75;;413:12;;;;448:15;;;;291:1;284:9;255:218;;;-1:-1:-1;489:3:1;;14:484;-1:-1:-1;;;;;14:484:1:o;503:261::-;682:2;671:9;664:21;645:4;702:56;754:2;743:9;739:18;731:6;702:56;:::i;:::-;694:64;503:261;-1:-1:-1;;;503:261:1:o;769:196::-;837:20;;-1:-1:-1;;;;;886:54:1;;876:65;;866:93;;955:1;952;945:12;866:93;769:196;;;:::o;970:186::-;1029:6;1082:2;1070:9;1061:7;1057:23;1053:32;1050:52;;;1098:1;1095;1088:12;1050:52;1121:29;1140:9;1121:29;:::i;1161:127::-;1222:10;1217:3;1213:20;1210:1;1203:31;1253:4;1250:1;1243:15;1277:4;1274:1;1267:15;1293:275;1364:2;1358:9;1429:2;1410:13;;-1:-1:-1;;1406:27:1;1394:40;;1464:18;1449:34;;1485:22;;;1446:62;1443:88;;;1511:18;;:::i;:::-;1547:2;1540:22;1293:275;;-1:-1:-1;1293:275:1:o;1573:531::-;1616:5;1669:3;1662:4;1654:6;1650:17;1646:27;1636:55;;1687:1;1684;1677:12;1636:55;1723:6;1710:20;1749:18;1745:2;1742:26;1739:52;;;1771:18;;:::i;:::-;1815:55;1858:2;1839:13;;-1:-1:-1;;1835:27:1;1864:4;1831:38;1815:55;:::i;:::-;1895:2;1886:7;1879:19;1941:3;1934:4;1929:2;1921:6;1917:15;1913:26;1910:35;1907:55;;;1958:1;1955;1948:12;1907:55;2023:2;2016:4;2008:6;2004:17;1997:4;1988:7;1984:18;1971:55;2071:1;2046:16;;;2064:4;2042:27;2035:38;;;;2050:7;1573:531;-1:-1:-1;;;1573:531:1:o;2109:183::-;2169:4;2202:18;2194:6;2191:30;2188:56;;;2224:18;;:::i;:::-;-1:-1:-1;2269:1:1;2265:14;2281:4;2261:25;;2109:183::o;2297:668::-;2351:5;2404:3;2397:4;2389:6;2385:17;2381:27;2371:55;;2422:1;2419;2412:12;2371:55;2458:6;2445:20;2484:4;2508:60;2524:43;2564:2;2524:43;:::i;:::-;2508:60;:::i;:::-;2602:15;;;2688:1;2684:10;;;;2672:23;;2668:32;;;2633:12;;;;2712:15;;;2709:35;;;2740:1;2737;2730:12;2709:35;2776:2;2768:6;2764:15;2788:148;2804:6;2799:3;2796:15;2788:148;;;2870:23;2889:3;2870:23;:::i;:::-;2858:36;;2914:12;;;;2821;;2788:148;;;-1:-1:-1;2954:5:1;2297:668;-1:-1:-1;;;;;;2297:668:1:o;2970:662::-;3024:5;3077:3;3070:4;3062:6;3058:17;3054:27;3044:55;;3095:1;3092;3085:12;3044:55;3131:6;3118:20;3157:4;3181:60;3197:43;3237:2;3197:43;:::i;3181:60::-;3275:15;;;3361:1;3357:10;;;;3345:23;;3341:32;;;3306:12;;;;3385:15;;;3382:35;;;3413:1;3410;3403:12;3382:35;3449:2;3441:6;3437:15;3461:142;3477:6;3472:3;3469:15;3461:142;;;3543:17;;3531:30;;3581:12;;;;3494;;3461:142;;3637:1404;3839:6;3847;3855;3863;3871;3879;3887;3895;3948:3;3936:9;3927:7;3923:23;3919:33;3916:53;;;3965:1;3962;3955:12;3916:53;4005:9;3992:23;4034:18;4075:2;4067:6;4064:14;4061:34;;;4091:1;4088;4081:12;4061:34;4114:50;4156:7;4147:6;4136:9;4132:22;4114:50;:::i;:::-;4104:60;;4217:2;4206:9;4202:18;4189:32;4173:48;;4246:2;4236:8;4233:16;4230:36;;;4262:1;4259;4252:12;4230:36;4285:52;4329:7;4318:8;4307:9;4303:24;4285:52;:::i;:::-;4275:62;;4390:2;4379:9;4375:18;4362:32;4346:48;;4419:2;4409:8;4406:16;4403:36;;;4435:1;4432;4425:12;4403:36;4458:52;4502:7;4491:8;4480:9;4476:24;4458:52;:::i;:::-;4448:62;;4557:2;4546:9;4542:18;4529:32;4519:42;;4608:3;4597:9;4593:19;4580:33;4570:43;;4660:3;4649:9;4645:19;4632:33;4622:43;;4718:3;4707:9;4703:19;4690:33;4674:49;;4748:2;4738:8;4735:16;4732:36;;;4764:1;4761;4754:12;4732:36;4787:63;4842:7;4831:8;4820:9;4816:24;4787:63;:::i;:::-;4777:73;;4903:3;4892:9;4888:19;4875:33;4859:49;;4933:2;4923:8;4920:16;4917:36;;;4949:1;4946;4939:12;4917:36;;4972:63;5027:7;5016:8;5005:9;5001:24;4972:63;:::i;:::-;4962:73;;;3637:1404;;;;;;;;;;;:::o;6327:472::-;6369:3;6407:5;6401:12;6434:6;6429:3;6422:19;6459:1;6469:162;6483:6;6480:1;6477:13;6469:162;;;6545:4;6601:13;;;6597:22;;6591:29;6573:11;;;6569:20;;6562:59;6498:12;6469:162;;;6649:6;6646:1;6643:13;6640:87;;;6715:1;6708:4;6699:6;6694:3;6690:16;6686:27;6679:38;6640:87;-1:-1:-1;6781:2:1;6760:15;-1:-1:-1;;6756:29:1;6747:39;;;;6788:4;6743:50;;6327:472;-1:-1:-1;;6327:472:1:o;6804:435::-;6857:3;6895:5;6889:12;6922:6;6917:3;6910:19;6948:4;6977:2;6972:3;6968:12;6961:19;;7014:2;7007:5;7003:14;7035:1;7045:169;7059:6;7056:1;7053:13;7045:169;;;7120:13;;7108:26;;7154:12;;;;7189:15;;;;7081:1;7074:9;7045:169;;7244:1314;7720:4;7749:3;7779:6;7768:9;7761:25;7822:6;7817:2;7806:9;7802:18;7795:34;7865:6;7860:2;7849:9;7845:18;7838:34;7908:2;7903;7892:9;7888:18;7881:30;7934:45;7975:2;7964:9;7960:18;7952:6;7934:45;:::i;:::-;7920:59;;8028:9;8020:6;8016:22;8010:3;7999:9;7995:19;7988:51;8062:33;8088:6;8080;8062:33;:::i;:::-;8048:47;;8144:9;8136:6;8132:22;8126:3;8115:9;8111:19;8104:51;8178:33;8204:6;8196;8178:33;:::i;:::-;8164:47;;-1:-1:-1;;;;;8252:6:1;8248:55;8242:3;8231:9;8227:19;8220:84;8353:9;8345:6;8341:22;8335:3;8324:9;8320:19;8313:51;8387:44;8424:6;8416;8387:44;:::i;:::-;8373:58;;8480:9;8472:6;8468:22;8462:3;8451:9;8447:19;8440:51;8508:44;8545:6;8537;8508:44;:::i;:::-;8500:52;7244:1314;-1:-1:-1;;;;;;;;;;;;7244:1314:1:o;8563:1490::-;9096:4;9125:3;-1:-1:-1;;;;;9228:2:1;9220:6;9216:15;9205:9;9198:34;9280:2;9272:6;9268:15;9263:2;9252:9;9248:18;9241:43;;9320:2;9315;9304:9;9300:18;9293:30;9346:45;9387:2;9376:9;9372:18;9364:6;9346:45;:::i;:::-;9332:59;;9439:9;9431:6;9427:22;9422:2;9411:9;9407:18;9400:50;9473:33;9499:6;9491;9473:33;:::i;:::-;9459:47;;9555:9;9547:6;9543:22;9537:3;9526:9;9522:19;9515:51;9589:33;9615:6;9607;9589:33;:::i;:::-;9575:47;;9659:6;9653:3;9642:9;9638:19;9631:35;9703:6;9697:3;9686:9;9682:19;9675:35;9747:6;9741:3;9730:9;9726:19;9719:35;9791:6;9785:3;9774:9;9770:19;9763:35;9847:9;9839:6;9835:22;9829:3;9818:9;9814:19;9807:51;9881:44;9918:6;9910;9881:44;:::i;:::-;9867:58;;9974:9;9966:6;9962:22;9956:3;9945:9;9941:19;9934:51;10002:45;10040:6;10031:7;10002:45;:::i;:::-;9994:53;8563:1490;-1:-1:-1;;;;;;;;;;;;;;8563:1490:1:o
Swarm Source
ipfs://3491604e0676813f2f52bfbfff6dbc43e51695d7b7909ab53832652fb40a828f
Age | Block | Fee Address | BC Fee Address | Voting Power | Jailed | Incoming |
---|
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.