Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
0x61010060 | 16379868 | 682 days ago | IN | 0 ETH | 0.10911735 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
FixedPriceToken
Compiler Version
v0.8.16+commit.07a7930e
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import {TokenBase} from "../TokenBase.sol"; import {IHTMLRenderer} from "../renderer/interfaces/IHTMLRenderer.sol"; import {IObservability} from "../observability/Observability.sol"; import {IFixedPriceToken} from "./interfaces/IFixedPriceToken.sol"; import {IHTMLRenderer} from "../renderer/interfaces/IHTMLRenderer.sol"; import {StringsUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol"; import {FixedPriceTokenStorageV1} from "./storage/FixedPriceTokenStorageV1.sol"; import {ITokenFactory} from "../interfaces/ITokenFactory.sol"; import {HTMLRendererProxy} from "../renderer/HTMLRendererProxy.sol"; import {IHTMLRenderer} from "../renderer/interfaces/IHTMLRenderer.sol"; import {IFileStore} from "ethfs/IFileStore.sol"; import {SSTORE2} from "@0xsequence/sstore2/contracts/SSTORE2.sol"; import {Base64} from "base64-sol/base64.sol"; contract FixedPriceToken is IFixedPriceToken, TokenBase, FixedPriceTokenStorageV1 { using StringsUpgradeable for uint256; //[[[[SETUP FUNCTIONS]]]] constructor(address _factory, address _o11y) TokenBase(_factory, _o11y) {} /// @notice Initializes the token function initialize( address owner, bytes calldata data ) external initializer { if (msg.sender != factory) revert FactoryMustInitilize(); ( string memory _script, string memory _previewBaseURI, address _rendererImpl, TokenInfo memory _tokenInfo, SaleInfo memory _saleInfo, IHTMLRenderer.FileType[] memory _imports ) = abi.decode( data, ( string, string, address, TokenInfo, SaleInfo, IHTMLRenderer.FileType[] ) ); if (!(ITokenFactory(factory).isValidDeployment(_rendererImpl))) revert ITokenFactory.NotDeployed(_rendererImpl); htmlRenderer = address(new HTMLRendererProxy(_rendererImpl, "")); allowedMinters[owner] = true; tokenInfo = _tokenInfo; saleInfo = _saleInfo; IHTMLRenderer(htmlRenderer).initilize(owner); __ERC721_init(_tokenInfo.name, _tokenInfo.symbol); _transferOwnership(owner); _addManyImports(_imports); _setScript(_script); _setPreviewBaseURI(_previewBaseURI); _mintArtistProofs(_saleInfo.artistProofCount); } //[[[[VIEW FUNCTIONS]]]] /// @notice a helper function for generating inital contract props function constructInitalProps( string memory _script, string memory _previewBaseURI, address _rendererImpl, TokenInfo memory _tokenInfo, SaleInfo memory _saleInfo, IHTMLRenderer.FileType[] memory _imports ) public pure returns (bytes memory) { return abi.encode( _script, _previewBaseURI, _rendererImpl, _tokenInfo, _saleInfo, _imports ); } /// @notice returns token metadata for a given token id function tokenURI( uint256 tokenId ) public view override returns (string memory) { string memory tokenIdString = tokenId.toString(); string memory fullName = string( abi.encodePacked(name(), " ", tokenIdString) ); string memory animationURL = tokenHTML(tokenId); string memory image = generatePreviewURI(tokenIdString); return genericDataURI( fullName, tokenInfo.description, animationURL, image ); } /// @notice contruct a generic data URI from token data function genericDataURI( string memory _name, string memory _description, string memory _animationURL, string memory _image ) public pure returns (string memory) { return string.concat( "data:application/json;base64,", Base64.encode( bytes( string.concat( '{"name":"', _name, '", "description":"', _description, '", "animation_url": "', _animationURL, '", "image": "', _image, '"}' ) ) ) ); } /// @notice generate a preview URI for the token function generatePreviewURI( string memory tokenId ) public view returns (string memory) { return string.concat( previewBaseURI, uint256(uint160(address(this))).toHexString(20), "/", tokenId ); } /// @notice generate the html for the token function tokenHTML(uint256 tokenId) public view returns (string memory) { return IHTMLRenderer(htmlRenderer).generateURI( imports, generateFullScript(tokenId) ); } /// @notice generate the full script for the token function generateFullScript( uint256 tokenId ) public view returns (string memory) { return string.concat( '<script>var blockHash="', uint256(tokenIdToPreviousBlockHash[tokenId]).toString(), '";var tokenId="', tokenId.toString(), '";var timestamp="', block.timestamp.toString(), '";', getScript(), "</script>" ); } /// @notice get the script for the contract function getScript() public view returns (string memory) { return string(SSTORE2.read(scriptPointer)); } //[[[[SCRIPT FUNCTIONS]]]] /// @notice set the script for the contract function setScript(string memory script) public onlyOwner { _setScript(script); } //[[[[PREVIEW FUNCTIONS]]]] /// @notice get the preview base URI for the token function setPreviewBaseURL(string memory uri) public onlyOwner { _setPreviewBaseURI(uri); } //[[[[RENDERER FUNCTIONS]]]] /// @notice set the html renderer for the token function setHTMLRenderer(address _htmlRenderer) external onlyOwner { htmlRenderer = _htmlRenderer; } /// @notice add multiple imports to the token function addManyImports( IHTMLRenderer.FileType[] calldata _imports ) external onlyOwner { _addManyImports(_imports); } /// @notice set a single import to the token for a given index function setImport( uint256 index, IHTMLRenderer.FileType calldata _import ) external onlyOwner { _setImport(index, _import); } //[[[[PURCHASE FUNCTIONS]]]] /// @notice purchase a number of tokens function purchase(uint256 amount) external payable nonReentrant { if ( block.timestamp < saleInfo.startTime || block.timestamp >= saleInfo.endTime ) revert SaleNotActive(); if (msg.value < (amount * saleInfo.price)) revert InvalidPrice(); if (totalSupply() + amount > tokenInfo.maxSupply) revert SoldOut(); IObservability(o11y).emitSale(msg.sender, saleInfo.price, amount); for (uint256 i = 0; i < amount; i++) { _seedAndMint(msg.sender); } } //[[[[PRIVATE FUNCTIONS]]]] /// @notice adds a single import function _addImport(IHTMLRenderer.FileType memory _import) private { imports.push(_import); } /// @notice adds many imports function _addManyImports(IHTMLRenderer.FileType[] memory _imports) private { uint256 numImports = _imports.length; for (uint256 i; i < numImports; i++) { _addImport(_imports[i]); } } /// @notice sets a single import for the given index function _setImport( uint256 index, IHTMLRenderer.FileType memory _import ) private { imports[index] = _import; } /// @notice store the script and ovverwrite the script pointer function _setScript(string memory script) private { scriptPointer = SSTORE2.write(bytes(script)); } /// @notice set the preview base URI function _setPreviewBaseURI(string memory _previewBaseURI) private { previewBaseURI = _previewBaseURI; } /// @notice mint the artist proofs function _mintArtistProofs(uint16 amount) private { if (proofsMinted) revert ProofsMinted(); for (uint256 i = 0; i < amount; i++) { _seedAndMint(owner()); } proofsMinted = true; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0; /// @title Base64 /// @author Brecht Devos - <[email protected]> /// @notice Provides functions for encoding/decoding base64 library Base64 { string internal constant TABLE_ENCODE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; bytes internal constant TABLE_DECODE = hex"0000000000000000000000000000000000000000000000000000000000000000" hex"00000000000000000000003e0000003f3435363738393a3b3c3d000000000000" hex"00000102030405060708090a0b0c0d0e0f101112131415161718190000000000" hex"001a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132330000000000"; function encode(bytes memory data) internal pure returns (string memory) { if (data.length == 0) return ''; // load the table into memory string memory table = TABLE_ENCODE; // multiply by 4/3 rounded up uint256 encodedLen = 4 * ((data.length + 2) / 3); // add some extra buffer at the end required for the writing string memory result = new string(encodedLen + 32); assembly { // set the actual output length mstore(result, encodedLen) // prepare the lookup table let tablePtr := add(table, 1) // input ptr let dataPtr := data let endPtr := add(dataPtr, mload(data)) // result ptr, jump over length let resultPtr := add(result, 32) // run over the input, 3 bytes at a time for {} lt(dataPtr, endPtr) {} { // read 3 bytes dataPtr := add(dataPtr, 3) let input := mload(dataPtr) // write 4 characters mstore8(resultPtr, mload(add(tablePtr, and(shr(18, input), 0x3F)))) resultPtr := add(resultPtr, 1) mstore8(resultPtr, mload(add(tablePtr, and(shr(12, input), 0x3F)))) resultPtr := add(resultPtr, 1) mstore8(resultPtr, mload(add(tablePtr, and(shr( 6, input), 0x3F)))) resultPtr := add(resultPtr, 1) mstore8(resultPtr, mload(add(tablePtr, and( input, 0x3F)))) resultPtr := add(resultPtr, 1) } // padding with '=' switch mod(mload(data), 3) case 1 { mstore(sub(resultPtr, 2), shl(240, 0x3d3d)) } case 2 { mstore(sub(resultPtr, 1), shl(248, 0x3d)) } } return result; } function decode(string memory _data) internal pure returns (bytes memory) { bytes memory data = bytes(_data); if (data.length == 0) return new bytes(0); require(data.length % 4 == 0, "invalid base64 decoder input"); // load the table into memory bytes memory table = TABLE_DECODE; // every 4 characters represent 3 bytes uint256 decodedLen = (data.length / 4) * 3; // add some extra buffer at the end required for the writing bytes memory result = new bytes(decodedLen + 32); assembly { // padding with '=' let lastBytes := mload(add(data, mload(data))) if eq(and(lastBytes, 0xFF), 0x3d) { decodedLen := sub(decodedLen, 1) if eq(and(lastBytes, 0xFFFF), 0x3d3d) { decodedLen := sub(decodedLen, 1) } } // set the actual output length mstore(result, decodedLen) // prepare the lookup table let tablePtr := add(table, 1) // input ptr let dataPtr := data let endPtr := add(dataPtr, mload(data)) // result ptr, jump over length let resultPtr := add(result, 32) // run over the input, 4 characters at a time for {} lt(dataPtr, endPtr) {} { // read 4 characters dataPtr := add(dataPtr, 4) let input := mload(dataPtr) // write 3 bytes let output := add( add( shl(18, and(mload(add(tablePtr, and(shr(24, input), 0xFF))), 0xFF)), shl(12, and(mload(add(tablePtr, and(shr(16, input), 0xFF))), 0xFF))), add( shl( 6, and(mload(add(tablePtr, and(shr( 8, input), 0xFF))), 0xFF)), and(mload(add(tablePtr, and( input , 0xFF))), 0xFF) ) ) mstore(resultPtr, shl(232, output)) resultPtr := add(resultPtr, 3) } } return result; } }
// SPDX-License-Identifier: Unlicense pragma solidity ^0.8.13; struct Content { bytes32 checksum; address pointer; } struct File { uint256 size; // content length in bytes, max 24k Content[] contents; } function read(File memory file) view returns (string memory contents) { Content[] memory chunks = file.contents; // Adapted from https://gist.github.com/xtremetom/20411eb126aaf35f98c8a8ffa00123cd assembly { let len := mload(chunks) let totalSize := 0x20 contents := mload(0x40) let size let chunk let pointer // loop through all pointer addresses // - get content // - get address // - get data size // - get code and add to contents // - update total size for { let i := 0 } lt(i, len) { i := add(i, 1) } { chunk := mload(add(chunks, add(0x20, mul(i, 0x20)))) pointer := mload(add(chunk, 0x20)) size := sub(extcodesize(pointer), 1) extcodecopy(pointer, add(contents, totalSize), 1, size) totalSize := add(totalSize, size) } // update contents size mstore(contents, sub(totalSize, 0x20)) // store contents mstore(0x40, add(contents, and(add(totalSize, 0x1f), not(0x1f)))) } } using { read } for File global;
// SPDX-License-Identifier: Unlicense pragma solidity ^0.8.13; interface IContentStore { event NewChecksum(bytes32 indexed checksum, uint256 contentSize); error ChecksumExists(bytes32 checksum); error ChecksumNotFound(bytes32 checksum); function pointers(bytes32 checksum) external view returns (address pointer); function checksumExists(bytes32 checksum) external view returns (bool); function contentLength(bytes32 checksum) external view returns (uint256 size); function addPointer(address pointer) external returns (bytes32 checksum); function addContent(bytes memory content) external returns (bytes32 checksum, address pointer); function getPointer(bytes32 checksum) external view returns (address pointer); }
// SPDX-License-Identifier: Unlicense pragma solidity ^0.8.13; import {File} from "./File.sol"; import {IContentStore} from "./IContentStore.sol"; interface IFileStore { event FileCreated( string indexed indexedFilename, bytes32 indexed checksum, string filename, uint256 size, bytes metadata ); event FileDeleted( string indexed indexedFilename, bytes32 indexed checksum, string filename ); error FileNotFound(string filename); error FilenameExists(string filename); error EmptyFile(); function contentStore() external view returns (IContentStore); function files(string memory filename) external view returns (bytes32 checksum); function fileExists(string memory filename) external view returns (bool); function getChecksum(string memory filename) external view returns (bytes32 checksum); function getFile(string memory filename) external view returns (File memory file); function createFile(string memory filename, bytes32[] memory checksums) external returns (File memory file); function createFile( string memory filename, bytes32[] memory checksums, bytes memory extraData ) external returns (File memory file); function deleteFile(string memory filename) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol) pragma solidity ^0.8.0; /** * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified * proxy whose upgrades are fully controlled by the current implementation. */ interface IERC1822Proxiable { /** * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation * address. * * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this * function revert if invoked through a proxy. */ function proxiableUUID() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol) pragma solidity ^0.8.0; /** * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to * be specified by overriding the virtual {_implementation} function. * * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a * different contract through the {_delegate} function. * * The success and return data of the delegated call will be returned back to the caller of the proxy. */ abstract contract Proxy { /** * @dev Delegates the current call to `implementation`. * * This function does not return to its internal call site, it will return directly to the external caller. */ function _delegate(address implementation) internal virtual { assembly { // Copy msg.data. We take full control of memory in this inline assembly // block because it will not return to Solidity code. We overwrite the // Solidity scratch pad at memory position 0. calldatacopy(0, 0, calldatasize()) // Call the implementation. // out and outsize are 0 because we don't know the size yet. let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0) // Copy the returned data. returndatacopy(0, 0, returndatasize()) switch result // delegatecall returns 0 on error. case 0 { revert(0, returndatasize()) } default { return(0, returndatasize()) } } } /** * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function * and {_fallback} should delegate. */ function _implementation() internal view virtual returns (address); /** * @dev Delegates the current call to the address returned by `_implementation()`. * * This function does not return to its internal call site, it will return directly to the external caller. */ function _fallback() internal virtual { _beforeFallback(); _delegate(_implementation()); } /** * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other * function in the contract matches the call data. */ fallback() external payable virtual { _fallback(); } /** * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data * is empty. */ receive() external payable virtual { _fallback(); } /** * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback` * call, or as part of the Solidity `fallback` or `receive` functions. * * If overridden should call `super._beforeFallback()`. */ function _beforeFallback() internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol) pragma solidity ^0.8.0; /** * @dev Library for reading and writing primitive types to specific storage slots. * * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts. * This library helps with reading and writing to such slots without the need for inline assembly. * * The functions in this library return Slot structs that contain a `value` member that can be used to read or write. * * Example usage to set ERC1967 implementation slot: * ``` * contract ERC1967 { * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; * * function _getImplementation() internal view returns (address) { * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; * } * * function _setImplementation(address newImplementation) internal { * require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract"); * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; * } * } * ``` * * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._ */ library StorageSlot { struct AddressSlot { address value; } struct BooleanSlot { bool value; } struct Bytes32Slot { bytes32 value; } struct Uint256Slot { uint256 value; } /** * @dev Returns an `AddressSlot` with member `value` located at `slot`. */ function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BooleanSlot` with member `value` located at `slot`. */ function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Bytes32Slot` with member `value` located at `slot`. */ function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Uint256Slot` with member `value` located at `slot`. */ function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "./OwnableUpgradeable.sol"; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module which provides 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} and {acceptOwnership}. * * This module is used through inheritance. It will make available all functions * from parent (Ownable). */ abstract contract Ownable2StepUpgradeable is Initializable, OwnableUpgradeable { function __Ownable2Step_init() internal onlyInitializing { __Ownable_init_unchained(); } function __Ownable2Step_init_unchained() internal onlyInitializing { } address private _pendingOwner; event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner); /** * @dev Returns the address of the pending owner. */ function pendingOwner() public view virtual returns (address) { return _pendingOwner; } /** * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one. * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual override onlyOwner { _pendingOwner = newOwner; emit OwnershipTransferStarted(owner(), newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner. * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual override { delete _pendingOwner; super._transferOwnership(newOwner); } /** * @dev The new owner accepts the ownership transfer. */ function acceptOwnership() external { address sender = _msgSender(); require(pendingOwner() == sender, "Ownable2Step: caller is not the new owner"); _transferOwnership(sender); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * 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 OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownable_init() internal onlyInitializing { __Ownable_init_unchained(); } function __Ownable_init_unchained() internal onlyInitializing { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { 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); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.2; import "../../utils/AddressUpgradeable.sol"; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ``` * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. * @custom:oz-retyped-from bool */ uint8 private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint8 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. * * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a * constructor. * * Emits an {Initialized} event. */ modifier initializer() { bool isTopLevelCall = !_initializing; require( (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1), "Initializable: contract is already initialized" ); _initialized = 1; if (isTopLevelCall) { _initializing = true; } _; if (isTopLevelCall) { _initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * A reinitializer may be used after the original initialization step. This is essential to configure modules that * are added through upgrades and that require initialization. * * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer` * cannot be nested. If one is invoked in the context of another, execution will revert. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. * * WARNING: setting the version to 255 will prevent any future reinitialization. * * Emits an {Initialized} event. */ modifier reinitializer(uint8 version) { require(!_initializing && _initialized < version, "Initializable: contract is already initialized"); _initialized = version; _initializing = true; _; _initializing = false; emit Initialized(version); } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. * * Emits an {Initialized} event the first time it is successfully executed. */ function _disableInitializers() internal virtual { require(!_initializing, "Initializable: contract is initializing"); if (_initialized != type(uint8).max) { _initialized = type(uint8).max; emit Initialized(type(uint8).max); } } /** * @dev Internal function that returns the initialized version. Returns `_initialized` */ function _getInitializedVersion() internal view returns (uint8) { return _initialized; } /** * @dev Internal function that returns the initialized version. Returns `_initializing` */ function _isInitializing() internal view returns (bool) { return _initializing; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuardUpgradeable is Initializable { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; function __ReentrancyGuard_init() internal onlyInitializing { __ReentrancyGuard_init_unchained(); } function __ReentrancyGuard_init_unchained() internal onlyInitializing { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } /** * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a * `nonReentrant` function in the call stack. */ function _reentrancyGuardEntered() internal view returns (bool) { return _status == _ENTERED; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721Upgradeable.sol"; import "./IERC721ReceiverUpgradeable.sol"; import "./extensions/IERC721MetadataUpgradeable.sol"; import "../../utils/AddressUpgradeable.sol"; import "../../utils/ContextUpgradeable.sol"; import "../../utils/StringsUpgradeable.sol"; import "../../utils/introspection/ERC165Upgradeable.sol"; import "../../proxy/utils/Initializable.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC721Upgradeable, IERC721MetadataUpgradeable { using AddressUpgradeable for address; using StringsUpgradeable for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ function __ERC721_init(string memory name_, string memory symbol_) internal onlyInitializing { __ERC721_init_unchained(name_, symbol_); } function __ERC721_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165Upgradeable) returns (bool) { return interfaceId == type(IERC721Upgradeable).interfaceId || interfaceId == type(IERC721MetadataUpgradeable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: address zero is not a valid owner"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _ownerOf(tokenId); require(owner != address(0), "ERC721: invalid token ID"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { _requireMinted(tokenId); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721Upgradeable.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not token owner or approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { _requireMinted(tokenId); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved"); _safeTransfer(from, to, tokenId, data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist */ function _ownerOf(uint256 tokenId) internal view virtual returns (address) { return _owners[tokenId]; } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _ownerOf(tokenId) != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { address owner = ERC721Upgradeable.ownerOf(tokenId); return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId, 1); // Check that tokenId was not minted by `_beforeTokenTransfer` hook require(!_exists(tokenId), "ERC721: token already minted"); unchecked { // Will not overflow unless all 2**256 token ids are minted to the same owner. // Given that tokens are minted one by one, it is impossible in practice that // this ever happens. Might change if we allow batch minting. // The ERC fails to describe this case. _balances[to] += 1; } _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId, 1); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * This is an internal function that does not check if the sender is authorized to operate on the token. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721Upgradeable.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId, 1); // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook owner = ERC721Upgradeable.ownerOf(tokenId); // Clear approvals delete _tokenApprovals[tokenId]; unchecked { // Cannot overflow, as that would require more tokens to be burned/transferred // out than the owner initially received through minting and transferring in. _balances[owner] -= 1; } delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId, 1); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721Upgradeable.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId, 1); // Check that tokenId was not transferred by `_beforeTokenTransfer` hook require(ERC721Upgradeable.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); // Clear approvals from the previous owner delete _tokenApprovals[tokenId]; unchecked { // `_balances[from]` cannot overflow for the same reason as described in `_burn`: // `from`'s balance is the number of token held, which is at least one before the current // transfer. // `_balances[to]` could overflow in the conditions described in `_mint`. That would require // all 2**256 token ids to be minted, which in practice is impossible. _balances[from] -= 1; _balances[to] += 1; } _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId, 1); } /** * @dev Approve `to` to operate on `tokenId` * * Emits an {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721Upgradeable.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits an {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Reverts if the `tokenId` has not been minted yet. */ function _requireMinted(uint256 tokenId) internal view virtual { require(_exists(tokenId), "ERC721: invalid token ID"); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory data ) private returns (bool) { if (to.isContract()) { try IERC721ReceiverUpgradeable(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) { return retval == IERC721ReceiverUpgradeable.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { /// @solidity memory-safe-assembly assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting and burning. If {ERC721Consecutive} is * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`. * - When `from` is zero, the tokens will be minted for `to`. * - When `to` is zero, ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * - `batchSize` is non-zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256, /* firstTokenId */ uint256 batchSize ) internal virtual { if (batchSize > 1) { if (from != address(0)) { _balances[from] -= batchSize; } if (to != address(0)) { _balances[to] += batchSize; } } } /** * @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`. * - When `from` is zero, the tokens were minted for `to`. * - When `to` is zero, ``from``'s tokens were burned. * - `from` and `to` are never both zero. * - `batchSize` is non-zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 firstTokenId, uint256 batchSize ) internal virtual {} /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[44] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721ReceiverUpgradeable { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165Upgradeable.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721Upgradeable is IERC165Upgradeable { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721 * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must * understand this adds an external call which potentially creates a reentrancy vulnerability. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721Upgradeable.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721MetadataUpgradeable is IERC721Upgradeable { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 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://consensys.net/diligence/blog/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 functionCallWithValue(target, data, 0, "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"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, 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) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or 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 { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // 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 /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; import "../proxy/utils/Initializable.sol"; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract ContextUpgradeable is Initializable { function __Context_init() internal onlyInitializing { } function __Context_init_unchained() internal onlyInitializing { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Counters.sol) pragma solidity ^0.8.0; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` */ library CountersUpgradeable { struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { unchecked { counter._value += 1; } } function decrement(Counter storage counter) internal { uint256 value = counter._value; require(value > 0, "Counter: decrement overflow"); unchecked { counter._value = value - 1; } } function reset(Counter storage counter) internal { counter._value = 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/MathUpgradeable.sol"; /** * @dev String operations. */ library StringsUpgradeable { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = MathUpgradeable.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, MathUpgradeable.log256(value) + 1); } } /** * @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] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165Upgradeable.sol"; import "../../proxy/utils/Initializable.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable { function __ERC165_init() internal onlyInitializing { } function __ERC165_init_unchained() internal onlyInitializing { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165Upgradeable).interfaceId; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // 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 IERC165Upgradeable { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library MathUpgradeable { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv( uint256 x, uint256 y, uint256 denominator ) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv( uint256 x, uint256 y, uint256 denominator, Rounding rounding ) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10**64) { value /= 10**64; result += 64; } if (value >= 10**32) { value /= 10**32; result += 32; } if (value >= 10**16) { value /= 10**16; result += 16; } if (value >= 10**8) { value /= 10**8; result += 8; } if (value >= 10**4) { value /= 10**4; result += 4; } if (value >= 10**2) { value /= 10**2; result += 2; } if (value >= 10**1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./utils/Bytecode.sol"; /** @title A key-value storage with auto-generated keys for storing chunks of data with a lower write & read cost. @author Agustin Aguilar <[email protected]> Readme: https://github.com/0xsequence/sstore2#readme */ library SSTORE2 { error WriteError(); /** @notice Stores `_data` and returns `pointer` as key for later retrieval @dev The pointer is a contract address with `_data` as code @param _data to be written @return pointer Pointer to the written `_data` */ function write(bytes memory _data) internal returns (address pointer) { // Append 00 to _data so contract can't be called // Build init code bytes memory code = Bytecode.creationCodeFor( abi.encodePacked( hex'00', _data ) ); // Deploy contract using create assembly { pointer := create(0, add(code, 32), mload(code)) } // Address MUST be non-zero if (pointer == address(0)) revert WriteError(); } /** @notice Reads the contents of the `_pointer` code as data, skips the first byte @dev The function is intended for reading pointers generated by `write` @param _pointer to be read @return data read from `_pointer` contract */ function read(address _pointer) internal view returns (bytes memory) { return Bytecode.codeAt(_pointer, 1, type(uint256).max); } /** @notice Reads the contents of the `_pointer` code as data, skips the first byte @dev The function is intended for reading pointers generated by `write` @param _pointer to be read @param _start number of bytes to skip @return data read from `_pointer` contract */ function read(address _pointer, uint256 _start) internal view returns (bytes memory) { return Bytecode.codeAt(_pointer, _start + 1, type(uint256).max); } /** @notice Reads the contents of the `_pointer` code as data, skips the first byte @dev The function is intended for reading pointers generated by `write` @param _pointer to be read @param _start number of bytes to skip @param _end index before which to end extraction @return data read from `_pointer` contract */ function read(address _pointer, uint256 _start, uint256 _end) internal view returns (bytes memory) { return Bytecode.codeAt(_pointer, _start + 1, _end + 1); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; library Bytecode { error InvalidCodeAtRange(uint256 _size, uint256 _start, uint256 _end); /** @notice Generate a creation code that results on a contract with `_code` as bytecode @param _code The returning value of the resulting `creationCode` @return creationCode (constructor) for new contract */ function creationCodeFor(bytes memory _code) internal pure returns (bytes memory) { /* 0x00 0x63 0x63XXXXXX PUSH4 _code.length size 0x01 0x80 0x80 DUP1 size size 0x02 0x60 0x600e PUSH1 14 14 size size 0x03 0x60 0x6000 PUSH1 00 0 14 size size 0x04 0x39 0x39 CODECOPY size 0x05 0x60 0x6000 PUSH1 00 0 size 0x06 0xf3 0xf3 RETURN <CODE> */ return abi.encodePacked( hex"63", uint32(_code.length), hex"80_60_0E_60_00_39_60_00_F3", _code ); } /** @notice Returns the size of the code on a given address @param _addr Address that may or may not contain code @return size of the code on the given `_addr` */ function codeSize(address _addr) internal view returns (uint256 size) { assembly { size := extcodesize(_addr) } } /** @notice Returns the code of a given address @dev It will fail if `_end < _start` @param _addr Address that may or may not contain code @param _start number of bytes of code to skip on read @param _end index before which to end extraction @return oCode read from `_addr` deployed bytecode Forked from: https://gist.github.com/KardanovIR/fe98661df9338c842b4a30306d507fbd */ function codeAt(address _addr, uint256 _start, uint256 _end) internal view returns (bytes memory oCode) { uint256 csize = codeSize(_addr); if (csize == 0) return bytes(""); if (_start > csize) return bytes(""); if (_end < _start) revert InvalidCodeAtRange(csize, _start, _end); unchecked { uint256 reqSize = _end - _start; uint256 maxSize = csize - _start; uint256 size = maxSize < reqSize ? maxSize : reqSize; assembly { // allocate output byte array - this could also be done without assembly // by using o_code = new bytes(size) oCode := mload(0x40) // new "memory end" including padding mstore(0x40, add(oCode, and(add(add(size, 0x20), 0x1f), not(0x1f)))) // store length in memory mstore(oCode, size) // actually retrieve the code, this needs assembly extcodecopy(_addr, add(oCode, 0x20), _start, size) } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import {ERC721Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol"; import {Ownable2StepUpgradeable} from "@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol"; import {CountersUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol"; import {ReentrancyGuardUpgradeable} from "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol"; import {IToken} from "./tokens/interfaces/IToken.sol"; import {IObservability} from "./observability/Observability.sol"; import {UUPS} from "./lib/proxy/UUPS.sol"; import {ITokenFactory} from "./interfaces/ITokenFactory.sol"; import {VersionedContract} from "./VersionedContract.sol"; abstract contract TokenBase is IToken, ERC721Upgradeable, ReentrancyGuardUpgradeable, Ownable2StepUpgradeable, VersionedContract, UUPS { using CountersUpgradeable for CountersUpgradeable.Counter; CountersUpgradeable.Counter private _tokenIdCounter; mapping(uint256 => bytes32) public tokenIdToPreviousBlockHash; mapping(address => bool) public allowedMinters; address public immutable factory; address public immutable o11y; uint256 internal immutable FUNDS_SEND_GAS_LIMIT = 210_000; TokenInfo public tokenInfo; //[[[[MODIFIERS]]]] /// @notice restricts to only users with minter role modifier onlyAllowedMinter() { if (!allowedMinters[msg.sender]) revert SenderNotMinter(); _; } //[[[[SETUP FUNCTIONS]]]] constructor(address _factory, address _o11y) { factory = _factory; o11y = _o11y; } //[[[[VIEW FUNCTIONS]]]] /// @notice gets the total supply of tokens function totalSupply() public view returns (uint256) { return _tokenIdCounter.current(); } //[[[[WITHDRAW FUNCTIONS]]]] /// @notice withdraws the funds from the contract function withdraw() external nonReentrant returns (bool) { uint256 amount = address(this).balance; (bool successFunds, ) = tokenInfo.fundsRecipent.call{ value: amount, gas: FUNDS_SEND_GAS_LIMIT }(""); if (!successFunds) revert FundsSendFailure(); IObservability(o11y).emitFundsWithdrawn( msg.sender, tokenInfo.fundsRecipent, amount ); return successFunds; } /// @notice sets the funds recipent for token funds function setFundsRecipent(address fundsRecipent) external onlyOwner { tokenInfo.fundsRecipent = fundsRecipent; } //[[[[MINT FUNCTIONS]]]] /// @notice sets the minter role for the given user function setMinter(address user, bool isAllowed) public onlyOwner { allowedMinters[user] = isAllowed; } /// @notice mint a token for the given address function safeMint(address to) public onlyAllowedMinter { if (totalSupply() >= tokenInfo.maxSupply) revert MaxSupplyReached(); _seedAndMint(to); } //[[[[PRIVATE FUNCTIONS]]]] /// @notice seeds the token id and mints the token function _seedAndMint(address to) internal { uint256 tokenId = _tokenIdCounter.current(); tokenIdToPreviousBlockHash[tokenId] = blockhash(block.number - 1); _tokenIdCounter.increment(); _safeMint(to, tokenId); } /// @notice checks if an upgrade is valid function _authorizeUpgrade(address newImpl) internal override onlyOwner { if ( !ITokenFactory(factory).isValidUpgrade( _getImplementation(), newImpl ) ) { revert ITokenFactory.InvalidUpgrade(newImpl); } } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.16; abstract contract VersionedContract { function contractVersion() external pure returns (string memory) { return "1.0.0"; } }
//SPDX-License-Identifier: MIT pragma solidity ^0.8.13; interface ITokenFactory { error InvalidUpgrade(address impl); error NotDeployed(address impl); /// @notice Creates a new token contract with the given implementation and data function create( address tokenImpl, bytes calldata data ) external returns (address clone); /// @notice checks if an implementation is valid function isValidDeployment(address impl) external view returns (bool); /// @notice registers a new implementation function registerDeployment(address impl) external; /// @notice unregisters an implementation function unregisterDeployment(address impl) external; /// @notice checks if an upgrade is valid function isValidUpgrade( address prevImpl, address newImpl ) external returns (bool); /// @notice registers a new upgrade function registerUpgrade(address prevImpl, address newImpl) external; /// @notice unregisters an upgrade function unregisterUpgrade(address prevImpl, address newImpl) external; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.16; /// @title IERC1967Upgrade /// @author Rohan Kulkarni /// @notice The external ERC1967Upgrade events and errors interface IERC1967Upgrade { /// /// /// EVENTS /// /// /// /// @notice Emitted when the implementation is upgraded /// @param impl The address of the implementation event Upgraded(address impl); /// /// /// ERRORS /// /// /// /// @dev Reverts if an implementation is an invalid upgrade /// @param impl The address of the invalid implementation error INVALID_UPGRADE(address impl); /// @dev Reverts if an implementation upgrade is not stored at the storage slot of the original error UNSUPPORTED_UUID(); /// @dev Reverts if an implementation does not support ERC1822 proxiableUUID() error ONLY_UUPS(); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.16; import {IERC1822Proxiable} from "@openzeppelin/contracts/interfaces/draft-IERC1822.sol"; import {IERC1967Upgrade} from "./IERC1967Upgrade.sol"; /// @title IUUPS /// @author Rohan Kulkarni /// @notice The external UUPS errors and functions interface IUUPS is IERC1967Upgrade, IERC1822Proxiable { /// /// /// ERRORS /// /// /// /// @dev Reverts if not called directly error ONLY_CALL(); /// @dev Reverts if not called via delegatecall error ONLY_DELEGATECALL(); /// @dev Reverts if not called via proxy error ONLY_PROXY(); /// /// /// FUNCTIONS /// /// /// /// @notice Upgrades to an implementation /// @param newImpl The new implementation address function upgradeTo(address newImpl) external; /// @notice Upgrades to an implementation with an additional function call /// @param newImpl The new implementation address /// @param data The encoded function call function upgradeToAndCall( address newImpl, bytes memory data ) external payable; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.16; import {Proxy} from "@openzeppelin/contracts/proxy/Proxy.sol"; import {IERC1967Upgrade} from "../interfaces/IERC1967Upgrade.sol"; import {ERC1967Upgrade} from "./ERC1967Upgrade.sol"; /// @title ERC1967Proxy /// @author Rohan Kulkarni /// @notice Modified from OpenZeppelin Contracts v4.7.3 (proxy/ERC1967/ERC1967Proxy.sol) /// - Inherits a modern, minimal ERC1967Upgrade contract ERC1967Proxy is IERC1967Upgrade, Proxy, ERC1967Upgrade { /// /// /// CONSTRUCTOR /// /// /// /// @dev Initializes the proxy with an implementation contract and encoded function call /// @param _logic The implementation address /// @param _data The encoded function call constructor(address _logic, bytes memory _data) payable { _upgradeToAndCall(_logic, _data, false); } /// /// /// FUNCTIONS /// /// /// /// @dev The address of the current implementation function _implementation() internal view virtual override returns (address) { return ERC1967Upgrade._getImplementation(); } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.16; import {IERC1822Proxiable} from "@openzeppelin/contracts/interfaces/draft-IERC1822.sol"; import {StorageSlot} from "@openzeppelin/contracts/utils/StorageSlot.sol"; import {IERC1967Upgrade} from "../interfaces/IERC1967Upgrade.sol"; import {Address} from "../utils/Address.sol"; /// @title ERC1967Upgrade /// @author Rohan Kulkarni /// @notice Modified from OpenZeppelin Contracts v4.7.3 (proxy/ERC1967/ERC1967Upgrade.sol) /// - Uses custom errors declared in IERC1967Upgrade /// - Removes ERC1967 admin and beacon support abstract contract ERC1967Upgrade is IERC1967Upgrade { /// /// /// CONSTANTS /// /// /// /// @dev bytes32(uint256(keccak256('eip1967.proxy.rollback')) - 1) bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143; /// @dev bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1) bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; /// /// /// FUNCTIONS /// /// /// /// @dev Upgrades to an implementation with security checks for UUPS proxies and an additional function call /// @param _newImpl The new implementation address /// @param _data The encoded function call function _upgradeToAndCallUUPS( address _newImpl, bytes memory _data, bool _forceCall ) internal { if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) { _setImplementation(_newImpl); } else { try IERC1822Proxiable(_newImpl).proxiableUUID() returns ( bytes32 slot ) { if (slot != _IMPLEMENTATION_SLOT) revert UNSUPPORTED_UUID(); } catch { revert ONLY_UUPS(); } _upgradeToAndCall(_newImpl, _data, _forceCall); } } /// @dev Upgrades to an implementation with an additional function call /// @param _newImpl The new implementation address /// @param _data The encoded function call function _upgradeToAndCall( address _newImpl, bytes memory _data, bool _forceCall ) internal { _upgradeTo(_newImpl); if (_data.length > 0 || _forceCall) { Address.functionDelegateCall(_newImpl, _data); } } /// @dev Performs an implementation upgrade /// @param _newImpl The new implementation address function _upgradeTo(address _newImpl) internal { _setImplementation(_newImpl); emit Upgraded(_newImpl); } /// @dev Stores the address of an implementation /// @param _impl The implementation address function _setImplementation(address _impl) private { if (!Address.isContract(_impl)) revert INVALID_UPGRADE(_impl); StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = _impl; } /// @dev The address of the current implementation function _getImplementation() internal view returns (address) { return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.16; import {IUUPS} from "../interfaces/IUUPS.sol"; import {ERC1967Upgrade} from "./ERC1967Upgrade.sol"; /// @title UUPS /// @author Rohan Kulkarni /// @notice Modified from OpenZeppelin Contracts v4.7.3 (proxy/utils/UUPSUpgradeable.sol) /// - Uses custom errors declared in IUUPS /// - Inherits a modern, minimal ERC1967Upgrade abstract contract UUPS is IUUPS, ERC1967Upgrade { /// /// /// IMMUTABLES /// /// /// /// @dev The address of the implementation address private immutable __self = address(this); /// /// /// MODIFIERS /// /// /// /// @dev Ensures that execution is via proxy delegatecall with the correct implementation modifier onlyProxy() { if (address(this) == __self) revert ONLY_DELEGATECALL(); if (_getImplementation() != __self) revert ONLY_PROXY(); _; } /// @dev Ensures that execution is via direct call modifier notDelegated() { if (address(this) != __self) revert ONLY_CALL(); _; } /// /// /// FUNCTIONS /// /// /// /// @dev Hook to authorize an implementation upgrade /// @param _newImpl The new implementation address function _authorizeUpgrade(address _newImpl) internal virtual; /// @notice Upgrades to an implementation /// @param _newImpl The new implementation address function upgradeTo(address _newImpl) external onlyProxy { _authorizeUpgrade(_newImpl); _upgradeToAndCallUUPS(_newImpl, "", false); } /// @notice Upgrades to an implementation with an additional function call /// @param _newImpl The new implementation address /// @param _data The encoded function call function upgradeToAndCall( address _newImpl, bytes memory _data ) external payable onlyProxy { _authorizeUpgrade(_newImpl); _upgradeToAndCallUUPS(_newImpl, _data, true); } /// @notice The storage slot of the implementation address function proxiableUUID() external view notDelegated returns (bytes32) { return _IMPLEMENTATION_SLOT; } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.16; /// @title EIP712 /// @author Rohan Kulkarni /// @notice Modified from OpenZeppelin Contracts v4.7.3 (utils/Address.sol) /// - Uses custom errors `INVALID_TARGET()` & `DELEGATE_CALL_FAILED()` /// - Adds util converting address to bytes32 library Address { /// /// /// ERRORS /// /// /// /// @dev Reverts if the target of a delegatecall is not a contract error INVALID_TARGET(); /// @dev Reverts if a delegatecall has failed error DELEGATE_CALL_FAILED(); /// /// /// FUNCTIONS /// /// /// /// @dev Utility to convert an address to bytes32 function toBytes32(address _account) internal pure returns (bytes32) { return bytes32(uint256(uint160(_account)) << 96); } /// @dev If an address is a contract function isContract(address _account) internal view returns (bool rv) { assembly { rv := gt(extcodesize(_account), 0) } } /// @dev Performs a delegatecall on an address function functionDelegateCall( address _target, bytes memory _data ) internal returns (bytes memory) { if (!isContract(_target)) revert INVALID_TARGET(); (bool success, bytes memory returndata) = _target.delegatecall(_data); return verifyCallResult(success, returndata); } /// @dev Verifies a delegatecall was successful function verifyCallResult( bool _success, bytes memory _returndata ) internal pure returns (bytes memory) { if (_success) { return _returndata; } else { if (_returndata.length > 0) { assembly { let returndata_size := mload(_returndata) revert(add(32, _returndata), returndata_size) } } else { revert DELEGATE_CALL_FAILED(); } } } }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity ^0.8.13; import {IObservability, IObservabilityEvents} from "./interface/IObservability.sol"; contract Observability is IObservability, IObservabilityEvents { /// @notice Emitted when a new clone is deployed function emitCloneDeployed(address owner, address clone) external override { emit CloneDeployed(msg.sender, owner, clone); } /// @notice Emitted when a sale has occured function emitSale( address to, uint256 pricePerToken, uint256 amount ) external override { emit Sale(msg.sender, to, pricePerToken, amount); } /// @notice Emitted when funds have been withdrawn function emitFundsWithdrawn( address withdrawnBy, address withdrawnTo, uint256 amount ) external override { emit FundsWithdrawn(msg.sender, withdrawnBy, withdrawnTo, amount); } /// @notice Emitted when a new implementation is registered function emitDeploymentTargetRegistererd(address impl) external override { emit DeploymentTargetRegistered(impl); } /// @notice Emitted when an implementation is unregistered function emitDeploymentTargetUnregistered(address impl) external override { emit DeploymentTargetUnregistered(impl); } /// @notice Emitted when a new upgrade is registered function emitUpgradeRegistered( address prevImpl, address impl ) external override { emit UpgradeRegistered(prevImpl, impl); } /// @notice Emitted when an upgrade is unregistered function emitUpgradeUnregistered( address prevImpl, address impl ) external override { emit UpgradeUnregistered(prevImpl, impl); } }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity ^0.8.13; interface IObservabilityEvents { /// @notice Emitted when a new clone is deployed event CloneDeployed( address indexed factory, address indexed owner, address clone ); /// @notice Emitted when a sale has occured event Sale( address indexed clone, address indexed to, uint256 pricePerToken, uint256 amount ); /// @notice Emitted when funds have been withdrawn event FundsWithdrawn( address indexed clone, address indexed withdrawnBy, address indexed withdrawnTo, uint256 amount ); /// @notice Emitted when a new implementation is registered event DeploymentTargetRegistered(address indexed impl); /// @notice Emitted when an implementation is unregistered event DeploymentTargetUnregistered(address indexed impl); /// @notice Emitted when an upgrade is registered /// @param prevImpl The address of the previous implementation /// @param newImpl The address of the registered upgrade event UpgradeRegistered(address indexed prevImpl, address indexed newImpl); /// @notice Emitted when an upgrade is unregistered /// @param prevImpl The address of the previous implementation /// @param newImpl The address of the unregistered upgrade event UpgradeUnregistered( address indexed prevImpl, address indexed newImpl ); } interface IObservability { function emitCloneDeployed(address owner, address clone) external; function emitSale( address to, uint256 pricePerToken, uint256 amount ) external; function emitFundsWithdrawn( address withdrawnBy, address withdrawnTo, uint256 amount ) external; function emitDeploymentTargetRegistererd(address impl) external; function emitDeploymentTargetUnregistered(address imp) external; function emitUpgradeRegistered(address prevImpl, address impl) external; function emitUpgradeUnregistered(address prevImpl, address impl) external; }
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.13; import {ERC1967Proxy} from "../lib/proxy/ERC1967Proxy.sol"; contract HTMLRendererProxy is ERC1967Proxy { constructor(address logic, bytes memory data) ERC1967Proxy(logic, data) {} }
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.13; interface IHTMLRenderer { struct FileType { string name; address fileSystem; uint8 fileType; } function initilize(address owner) external; /// @notice Returns the HTML for the given script and imports function generateURI( FileType[] calldata imports, string calldata script ) external view returns (string memory); }
//SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import {IHTMLRenderer} from "../../renderer/interfaces/IHTMLRenderer.sol"; interface IFixedPriceToken { struct SaleInfo { uint16 artistProofCount; uint64 startTime; uint64 endTime; uint112 price; } error SaleNotActive(); error InvalidPrice(); error SoldOut(); error ProofsMinted(); /// @notice initialize the token function initialize(address owner, bytes calldata data) external; /// @notice contruct a generic data URI from token data function genericDataURI( string memory _name, string memory _description, string memory _animationURL, string memory _image ) external pure returns (string memory); /// @notice generate a preview URI for the token function generatePreviewURI( string memory tokenId ) external view returns (string memory); /// @notice generate the html for the token function tokenHTML(uint256 tokenId) external view returns (string memory); /// @notice generate the full script for the token function generateFullScript( uint256 tokenId ) external view returns (string memory); /// @notice get the script for the contract function getScript() external view returns (string memory); /// @notice set the script for the contract function setScript(string memory script) external; /// @notice get the preview base URI for the token function setPreviewBaseURL(string memory uri) external; /// @notice set the html renderer for the token function setHTMLRenderer(address _htmlRenderer) external; /// @notice add multiple imports to the token function addManyImports( IHTMLRenderer.FileType[] calldata _imports ) external; /// @notice set a single import to the token for a given index function setImport( uint256 index, IHTMLRenderer.FileType calldata _import ) external; /// @notice purchase a number of tokens function purchase(uint256 amount) external payable; }
//SPDX-License-Identifier: MIT pragma solidity ^0.8.13; interface IToken { struct TokenInfo { string name; string symbol; string description; address fundsRecipent; uint256 maxSupply; } error FactoryMustInitilize(); error SenderNotMinter(); error FundsSendFailure(); error MaxSupplyReached(); /// @notice returns the total supply of tokens function totalSupply() external returns (uint256); /// @notice withdraws the funds from the contract function withdraw() external returns (bool); /// @notice mint a token for the given address function safeMint(address to) external; /// @notice sets the funds recipent for token funds function setFundsRecipent(address fundsRecipent) external; /// @notice sets the minter status for the given user function setMinter(address user, bool isAllowed) external; }
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.13; import {IFixedPriceToken} from "../interfaces/IFixedPriceToken.sol"; import {IHTMLRenderer} from "../../renderer/interfaces/IHTMLRenderer.sol"; abstract contract FixedPriceTokenStorageV1 { /// @notice Storage pointer for the generative script address scriptPointer; /// @notice Address of the HTML renderer address htmlRenderer; /// @notice Base URI for the preview URI string previewBaseURI; /// @notice Required imports for the renderer IHTMLRenderer.FileType[] public imports; /// @notice Sales info for token purchases IFixedPriceToken.SaleInfo public saleInfo; /// @notice Flag to indicate if the artist proofs have been minted bool proofsMinted; }
{ "remappings": [ "@0xsequence/sstore2/=lib/sstore2/", "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/", "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/", "ERC721A-Upgradeable/=lib/ERC721A-Upgradeable/contracts/", "base64-sol/=lib/base64/", "base64/=lib/base64/", "ds-test/=lib/forge-std/lib/ds-test/src/", "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/", "ethfs/=lib/ethfs/packages/contracts/src/", "ethier/=lib/ethfs/packages/contracts/lib/ethier/", "forge-std/=lib/forge-std/src/", "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/", "openzeppelin-contracts/=lib/openzeppelin-contracts/contracts/", "openzeppelin/=lib/ethfs/packages/contracts/lib/openzeppelin-contracts/contracts/", "solady/=lib/ethfs/packages/contracts/lib/solady/src/", "solmate/=lib/ethfs/packages/contracts/lib/solady/lib/solmate/src/", "sstore2/=lib/sstore2/contracts/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "bytecodeHash": "ipfs" }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "london", "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_factory","type":"address"},{"internalType":"address","name":"_o11y","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"DELEGATE_CALL_FAILED","type":"error"},{"inputs":[],"name":"FactoryMustInitilize","type":"error"},{"inputs":[],"name":"FundsSendFailure","type":"error"},{"inputs":[],"name":"INVALID_TARGET","type":"error"},{"inputs":[{"internalType":"address","name":"impl","type":"address"}],"name":"INVALID_UPGRADE","type":"error"},{"inputs":[{"internalType":"uint256","name":"_size","type":"uint256"},{"internalType":"uint256","name":"_start","type":"uint256"},{"internalType":"uint256","name":"_end","type":"uint256"}],"name":"InvalidCodeAtRange","type":"error"},{"inputs":[],"name":"InvalidPrice","type":"error"},{"inputs":[{"internalType":"address","name":"impl","type":"address"}],"name":"InvalidUpgrade","type":"error"},{"inputs":[],"name":"MaxSupplyReached","type":"error"},{"inputs":[{"internalType":"address","name":"impl","type":"address"}],"name":"NotDeployed","type":"error"},{"inputs":[],"name":"ONLY_CALL","type":"error"},{"inputs":[],"name":"ONLY_DELEGATECALL","type":"error"},{"inputs":[],"name":"ONLY_PROXY","type":"error"},{"inputs":[],"name":"ONLY_UUPS","type":"error"},{"inputs":[],"name":"ProofsMinted","type":"error"},{"inputs":[],"name":"SaleNotActive","type":"error"},{"inputs":[],"name":"SenderNotMinter","type":"error"},{"inputs":[],"name":"SoldOut","type":"error"},{"inputs":[],"name":"UNSUPPORTED_UUID","type":"error"},{"inputs":[],"name":"WriteError","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"impl","type":"address"}],"name":"Upgraded","type":"event"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"address","name":"fileSystem","type":"address"},{"internalType":"uint8","name":"fileType","type":"uint8"}],"internalType":"struct IHTMLRenderer.FileType[]","name":"_imports","type":"tuple[]"}],"name":"addManyImports","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"allowedMinters","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_script","type":"string"},{"internalType":"string","name":"_previewBaseURI","type":"string"},{"internalType":"address","name":"_rendererImpl","type":"address"},{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"string","name":"description","type":"string"},{"internalType":"address","name":"fundsRecipent","type":"address"},{"internalType":"uint256","name":"maxSupply","type":"uint256"}],"internalType":"struct IToken.TokenInfo","name":"_tokenInfo","type":"tuple"},{"components":[{"internalType":"uint16","name":"artistProofCount","type":"uint16"},{"internalType":"uint64","name":"startTime","type":"uint64"},{"internalType":"uint64","name":"endTime","type":"uint64"},{"internalType":"uint112","name":"price","type":"uint112"}],"internalType":"struct IFixedPriceToken.SaleInfo","name":"_saleInfo","type":"tuple"},{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"address","name":"fileSystem","type":"address"},{"internalType":"uint8","name":"fileType","type":"uint8"}],"internalType":"struct IHTMLRenderer.FileType[]","name":"_imports","type":"tuple[]"}],"name":"constructInitalProps","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"contractVersion","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"factory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"generateFullScript","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"}],"name":"generatePreviewURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_description","type":"string"},{"internalType":"string","name":"_animationURL","type":"string"},{"internalType":"string","name":"_image","type":"string"}],"name":"genericDataURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getScript","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"imports","outputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"address","name":"fileSystem","type":"address"},{"internalType":"uint8","name":"fileType","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"o11y","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proxiableUUID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"purchase","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"safeMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"saleInfo","outputs":[{"internalType":"uint16","name":"artistProofCount","type":"uint16"},{"internalType":"uint64","name":"startTime","type":"uint64"},{"internalType":"uint64","name":"endTime","type":"uint64"},{"internalType":"uint112","name":"price","type":"uint112"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"fundsRecipent","type":"address"}],"name":"setFundsRecipent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_htmlRenderer","type":"address"}],"name":"setHTMLRenderer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"},{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"address","name":"fileSystem","type":"address"},{"internalType":"uint8","name":"fileType","type":"uint8"}],"internalType":"struct IHTMLRenderer.FileType","name":"_import","type":"tuple"}],"name":"setImport","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"bool","name":"isAllowed","type":"bool"}],"name":"setMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"uri","type":"string"}],"name":"setPreviewBaseURL","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"script","type":"string"}],"name":"setScript","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenHTML","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenIdToPreviousBlockHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenInfo","outputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"string","name":"description","type":"string"},{"internalType":"address","name":"fundsRecipent","type":"address"},{"internalType":"uint256","name":"maxSupply","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newImpl","type":"address"}],"name":"upgradeTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newImpl","type":"address"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"upgradeToAndCall","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
610100604052306080526203345060e0523480156200001d57600080fd5b506040516200503738038062005037833981016040819052620000409162000075565b6001600160a01b0391821660a0521660c052620000ad565b80516001600160a01b03811681146200007057600080fd5b919050565b600080604083850312156200008957600080fd5b620000948362000058565b9150620000a46020840162000058565b90509250929050565b60805160a05160c05160e051614f11620001266000396000610dca0152600081816105ac01528181610e7f0152611e0f01526000818161082b0152818161193a015281816119bd0152612262015260008181610cdd01528181610d1f01528181610faf01528181610ff101526110750152614f116000f3fe608060405260043610620002bf5760003560e01c806379ba50971162000177578063c87b56dd11620000d1578063ec9ef5861162000084578063ec9ef5861462000937578063efef39a11462000969578063f2fde38b1462000980578063f88c8cec14620009a5578063f8cf4bb014620009ca578063fa522ac914620009ef57600080fd5b8063c87b56dd146200084d578063cf456ae71462000872578063d00c7c971462000897578063d1f5789414620008cd578063e30c397814620008f2578063e985e9c5146200091257600080fd5b8063a22cb465116200012a578063a22cb465146200075e578063b79bebaf1462000783578063b7d168e614620007a8578063b88d4fde14620007cd578063c36e901b14620007f2578063c45a0155146200081757600080fd5b806379ba50971462000630578063871b43aa14620006485780638da5cb5b146200066d5780638e3695b8146200068d57806395d89b411462000716578063a0a8e460146200072e57600080fd5b806342842e0e116200022957806366e8fce111620001dc57806366e8fce114620005485780636addb663146200056d578063705bf368146200059857806370a0823114620005ce578063715018a614620005f357806378a4ab85146200060b57600080fd5b806342842e0e14620004925780634cb159d814620004b75780634f1ef28614620004dc57806352d1902d14620004f3578063620b7303146200050b5780636352211e146200052357600080fd5b806318160ddd116200028257806318160ddd14620003af57806323b872dd14620003d65780633659cfe614620003fb5780633ccfd60b146200042057806340d097c31462000438578063423afa66146200045d57600080fd5b806301ffc9a714620002c457806306fdde0314620002fe578063081812fc1462000325578063095ea7b314620003635780630dd50a66146200038a575b600080fd5b348015620002d157600080fd5b50620002e9620002e336600462003481565b62000a14565b60405190151581526020015b60405180910390f35b3480156200030b57600080fd5b506200031662000a68565b604051620002f59190620034f5565b3480156200033257600080fd5b506200034a620003443660046200350a565b62000b02565b6040516001600160a01b039091168152602001620002f5565b3480156200037057600080fd5b5062000388620003823660046200354c565b62000b2b565b005b3480156200039757600080fd5b5062000316620003a936600462003937565b62000c4f565b348015620003bc57600080fd5b50620003c762000c89565b604051908152602001620002f5565b348015620003e357600080fd5b5062000388620003f536600462003a17565b62000c9b565b3480156200040857600080fd5b50620003886200041a36600462003a5d565b62000cd3565b3480156200042d57600080fd5b50620002e962000da4565b3480156200044557600080fd5b50620003886200045736600462003a5d565b62000ef1565b3480156200046a57600080fd5b50620002e96200047c36600462003a5d565b61012f6020526000908152604090205460ff1681565b3480156200049f57600080fd5b5062000388620004b136600462003a17565b62000f5b565b348015620004c457600080fd5b5062000388620004d636600462003a5d565b62000f78565b62000388620004ed36600462003a7d565b62000fa5565b3480156200050057600080fd5b50620003c762001068565b3480156200051857600080fd5b5062000316620010c8565b3480156200053057600080fd5b506200034a620005423660046200350a565b620010e3565b3480156200055557600080fd5b50620003886200056736600462003ad2565b62001145565b3480156200057a57600080fd5b506200058562001165565b604051620002f595949392919062003b4b565b348015620005a557600080fd5b506200034a7f000000000000000000000000000000000000000000000000000000000000000081565b348015620005db57600080fd5b50620003c7620005ed36600462003a5d565b62001342565b3480156200060057600080fd5b5062000388620013ca565b3480156200061857600080fd5b50620003886200062a36600462003ba8565b620013e2565b3480156200063d57600080fd5b5062000388620013f7565b3480156200065557600080fd5b5062000316620006673660046200350a565b62001472565b3480156200067a57600080fd5b5060c9546001600160a01b03166200034a565b3480156200069a57600080fd5b5061013954620006da9061ffff8116906001600160401b03620100008204811691600160501b8104909116906001600160701b03600160901b9091041684565b6040805161ffff9590951685526001600160401b03938416602086015291909216908301526001600160701b03166060820152608001620002f5565b3480156200072357600080fd5b5062000316620014db565b3480156200073b57600080fd5b506040805180820190915260058152640312e302e360dc1b602082015262000316565b3480156200076b57600080fd5b50620003886200077d36600462003bef565b620014ec565b3480156200079057600080fd5b5062000316620007a23660046200350a565b620014f9565b348015620007b557600080fd5b5062000316620007c736600462003c2d565b62001583565b348015620007da57600080fd5b5062000388620007ec36600462003ce6565b620015e3565b348015620007ff57600080fd5b50620003166200081136600462003ba8565b62001622565b3480156200082457600080fd5b506200034a7f000000000000000000000000000000000000000000000000000000000000000081565b3480156200085a57600080fd5b50620003166200086c3660046200350a565b62001649565b3480156200087f57600080fd5b50620003886200089136600462003bef565b62001757565b348015620008a457600080fd5b50620008bc620008b63660046200350a565b6200178d565b604051620002f59392919062003d4d565b348015620008da57600080fd5b5062000388620008ec36600462003d85565b62001869565b348015620008ff57600080fd5b5060fb546001600160a01b03166200034a565b3480156200091f57600080fd5b50620002e96200093136600462003e10565b62001cd3565b3480156200094457600080fd5b50620003c7620009563660046200350a565b61012e6020526000908152604090205481565b620003886200097a3660046200350a565b62001d01565b3480156200098d57600080fd5b50620003886200099f36600462003a5d565b62001ead565b348015620009b257600080fd5b5062000388620009c436600462003e43565b62001f21565b348015620009d757600080fd5b5062000388620009e936600462003a5d565b62001f41565b348015620009fc57600080fd5b506200038862000a0e36600462003ba8565b62001f6e565b60006001600160e01b031982166380ac58cd60e01b148062000a4657506001600160e01b03198216635b5e139f60e01b145b8062000a6257506301ffc9a760e01b6001600160e01b03198316145b92915050565b60606065805462000a799062003e88565b80601f016020809104026020016040519081016040528092919081815260200182805462000aa79062003e88565b801562000af85780601f1062000acc5761010080835404028352916020019162000af8565b820191906000526020600020905b81548152906001019060200180831162000ada57829003601f168201915b5050505050905090565b600062000b0f8262001f83565b506000908152606960205260409020546001600160a01b031690565b600062000b3882620010e3565b9050806001600160a01b0316836001600160a01b03160362000bab5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b038216148062000bca575062000bca813362001cd3565b62000c3e5760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c000000606482015260840162000ba2565b62000c4a838362001fe4565b505050565b606086868686868660405160200162000c6e9695949392919062003f43565b60405160208183030381529060405290509695505050505050565b600062000c9661012d5490565b905090565b62000ca7338262002054565b62000cc65760405162461bcd60e51b815260040162000ba29062004053565b62000c4a838383620020ba565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016300362000d1d576040516343d22ee960e01b815260040160405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031662000d5162002239565b6001600160a01b03161462000d795760405163073a6c8560e51b815260040160405180910390fd5b62000d848162002256565b62000da18160405180602001604052806000815250600062002338565b50565b600062000db062002427565b6101335460405147916000916001600160a01b03909116907f000000000000000000000000000000000000000000000000000000000000000090849084818181858888f193505050503d806000811462000e27576040519150601f19603f3d011682016040523d82523d6000602084013e62000e2c565b606091505b505090508062000e4f5760405163050046d960e01b815260040160405180910390fd5b61013354604051633c1ca03760e01b81523360048201526001600160a01b039182166024820152604481018490527f000000000000000000000000000000000000000000000000000000000000000090911690633c1ca03790606401600060405180830381600087803b15801562000ec657600080fd5b505af115801562000edb573d6000803e3d6000fd5b509294505050505062000eee6001609755565b90565b33600090815261012f602052604090205460ff1662000f2357604051632236705560e11b815260040160405180910390fd5b6101345462000f3162000c89565b1062000f505760405163d05cb60960e01b815260040160405180910390fd5b62000da18162002482565b62000c4a83838360405180602001604052806000815250620015e3565b62000f82620024cd565b61013380546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016300362000fef576040516343d22ee960e01b815260040160405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166200102362002239565b6001600160a01b0316146200104b5760405163073a6c8560e51b815260040160405180910390fd5b620010568262002256565b620010648282600162002338565b5050565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614620010b457604051632bade49760e11b815260040160405180910390fd5b5060008051602062004e7c83398151915290565b6101355460609062000c96906001600160a01b031662002529565b6000818152606760205260408120546001600160a01b03168062000a625760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b604482015260640162000ba2565b6200114f620024cd565b620010646200115f8284620040a0565b6200253b565b61013080548190620011779062003e88565b80601f0160208091040260200160405190810160405280929190818152602001828054620011a59062003e88565b8015620011f65780601f10620011ca57610100808354040283529160200191620011f6565b820191906000526020600020905b815481529060010190602001808311620011d857829003601f168201915b5050505050908060010180546200120d9062003e88565b80601f01602080910402602001604051908101604052809291908181526020018280546200123b9062003e88565b80156200128c5780601f1062001260576101008083540402835291602001916200128c565b820191906000526020600020905b8154815290600101906020018083116200126e57829003601f168201915b505050505090806002018054620012a39062003e88565b80601f0160208091040260200160405190810160405280929190818152602001828054620012d19062003e88565b8015620013225780601f10620012f65761010080835404028352916020019162001322565b820191906000526020600020905b8154815290600101906020018083116200130457829003601f168201915b50505050600383015460049093015491926001600160a01b031691905085565b60006001600160a01b038216620013ae5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b606482015260840162000ba2565b506001600160a01b031660009081526068602052604090205490565b620013d4620024cd565b620013e0600062002585565b565b620013ec620024cd565b62000da181620025a0565b60fb5433906001600160a01b03168114620014675760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b606482015260840162000ba2565b62000da18162002585565b600081815261012e60205260409020546060906200149090620025cf565b6200149b83620025cf565b620014a642620025cf565b620014b0620010c8565b604051602001620014c59493929190620040af565b6040516020818303038152906040529050919050565b60606066805462000a799062003e88565b6200106433838362002668565b610136546060906001600160a01b0316631e149ecf6101386200151c8562001472565b6040518363ffffffff1660e01b81526004016200153b92919062004197565b600060405180830381865afa15801562001559573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405262000a629190810190620042b7565b6060620015b785858585604051602001620015a294939291906200432d565b60405160208183030381529060405262002738565b604051602001620015c991906200440d565b60405160208183030381529060405290505b949350505050565b620015ef338362002054565b6200160e5760405162461bcd60e51b815260040162000ba29062004053565b6200161c84848484620028b0565b50505050565b606061013762001634306014620028ea565b83604051602001620014c59392919062004454565b606060006200165883620025cf565b905060006200166662000a68565b826040516020016200167a9291906200450b565b604051602081830303815290604052905060006200169885620014f9565b90506000620016a78462001622565b90506200174d836101306002018054620016c19062003e88565b80601f0160208091040260200160405190810160405280929190818152602001828054620016ef9062003e88565b8015620017405780601f10620017145761010080835404028352916020019162001740565b820191906000526020600020905b8154815290600101906020018083116200172257829003601f168201915b5050505050848462001583565b9695505050505050565b62001761620024cd565b6001600160a01b0391909116600090815261012f60205260409020805460ff1916911515919091179055565b61013881815481106200179f57600080fd5b9060005260206000209060020201600091509050806000018054620017c49062003e88565b80601f0160208091040260200160405190810160405280929190818152602001828054620017f29062003e88565b8015620018435780601f10620018175761010080835404028352916020019162001843565b820191906000526020600020905b8154815290600101906020018083116200182557829003601f168201915b505050600190930154919250506001600160a01b0381169060ff600160a01b9091041683565b600054610100900460ff16158080156200188a5750600054600160ff909116105b80620018a65750303b158015620018a6575060005460ff166001145b6200190b5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840162000ba2565b6000805460ff1916600117905580156200192f576000805461ff0019166101001790555b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614620019795760405163191ade7560e01b815260040160405180910390fd5b600080808080806200198e888a018a62003937565b6040516337703c3d60e11b81526001600160a01b038581166004830152969c50949a50929850909650945092507f000000000000000000000000000000000000000000000000000000000000000090911690636ee0787a90602401602060405180830381865afa15801562001a07573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001a2d91906200454b565b62001a5757604051639a43351160e01b81526001600160a01b038516600482015260240162000ba2565b8360405162001a66906200345c565b6001600160a01b039091168152604060208201819052600090820152606001604051809103906000f08015801562001aa2573d6000803e3d6000fd5b5061013680546001600160a01b0319166001600160a01b039283161790558a16600090815261012f60205260409020805460ff191660011790558251839061013090819062001af29082620045bd565b506020820151600182019062001b099082620045bd565b506040820151600282019062001b209082620045bd565b506060828101516003830180546001600160a01b0319166001600160a01b039283161790556080909301516004928301558451610139805460208801516040808a0151958a015161ffff90951669ffffffffffffffffffff1990931692909217620100006001600160401b03928316021769ffffffffffffffffffff16600160501b919095160271ffffffffffffffffffffffffffffffffffff1693909317600160901b6001600160701b0390931692909202919091179055610136549051632028114560e01b81528d84169281019290925290911690632028114590602401600060405180830381600087803b15801562001c1b57600080fd5b505af115801562001c30573d6000803e3d6000fd5b5050505062001c488360000151846020015162002aaa565b62001c538a62002585565b62001c5e816200253b565b62001c6986620025a0565b62001c748562002ae0565b815162001c819062002aef565b50505050505080156200161c576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150505050565b6001600160a01b039182166000908152606a6020908152604080832093909416825291909152205460ff1690565b62001d0b62002427565b610139546201000090046001600160401b031642108062001d3f575061013954600160501b90046001600160401b03164210155b1562001d5e5760405163b7b2409760e01b815260040160405180910390fd5b6101395462001d7e90600160901b90046001600160701b0316826200469f565b34101562001d9e5760405162bfc92160e01b815260040160405180910390fd5b610134548162001dad62000c89565b62001db99190620046c1565b111562001dd9576040516352df9fe560e01b815260040160405180910390fd5b6101395460405163bbc0ec1f60e01b8152336004820152600160901b9091046001600160701b03166024820152604481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063bbc0ec1f90606401600060405180830381600087803b15801562001e5c57600080fd5b505af115801562001e71573d6000803e3d6000fd5b5050505060005b8181101562001ea15762001e8c3362002482565b8062001e9881620046d7565b91505062001e78565b5062000da16001609755565b62001eb7620024cd565b60fb80546001600160a01b0383166001600160a01b0319909116811790915562001ee960c9546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b62001f2b620024cd565b620010648262001f3b83620046f3565b62002b69565b62001f4b620024cd565b61013680546001600160a01b0319166001600160a01b0392909216919091179055565b62001f78620024cd565b62000da18162002ae0565b6000818152606760205260409020546001600160a01b031662000da15760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b604482015260640162000ba2565b600081815260696020526040902080546001600160a01b0319166001600160a01b03841690811790915581906200201b82620010e3565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000806200206283620010e3565b9050806001600160a01b0316846001600160a01b031614806200208c57506200208c818562001cd3565b80620015db5750836001600160a01b0316620020a88462000b02565b6001600160a01b031614949350505050565b826001600160a01b0316620020cf82620010e3565b6001600160a01b031614620020f85760405162461bcd60e51b815260040162000ba29062004701565b6001600160a01b0382166200215c5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840162000ba2565b6200216b838383600162002be3565b826001600160a01b03166200218082620010e3565b6001600160a01b031614620021a95760405162461bcd60e51b815260040162000ba29062004701565b600081815260696020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260688552838620805460001901905590871680865283862080546001019055868652606790945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60008051602062004e7c833981519152546001600160a01b031690565b62002260620024cd565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663666854a06200229962002239565b6040516001600160e01b031960e084901b1681526001600160a01b03918216600482015290841660248201526044016020604051808303816000875af1158015620022e8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200230e91906200454b565b62000da15760405163c72492e960e01b81526001600160a01b038216600482015260240162000ba2565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff16156200236e5762000c4a8362002c72565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015620023cb575060408051601f3d908101601f19168201909252620023c89181019062004746565b60015b620023e95760405163605d905960e11b815260040160405180910390fd5b60008051602062004e7c83398151915281146200241957604051630424da4b60e11b815260040160405180910390fd5b5062000c4a83838362002cce565b6002609754036200247b5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640162000ba2565b6002609755565b60006200248f61012d5490565b90506200249e60014362004760565b600082815261012e6020526040902090409055620024c161012d80546001019055565b62001064828262002cf9565b60c9546001600160a01b03163314620013e05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640162000ba2565b606062000a6282600160001962002d15565b805160005b8181101562000c4a576200257083828151811062002562576200256262004776565b602002602001015162002dd2565b806200257c81620046d7565b91505062002540565b60fb80546001600160a01b031916905562000da18162002e5b565b620025ab8162002ead565b61013580546001600160a01b0319166001600160a01b039290921691909117905550565b60606000620025de8362002f17565b60010190506000816001600160401b038111156200260057620026006200357b565b6040519080825280601f01601f1916602001820160405280156200262b576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a85049450846200263557509392505050565b816001600160a01b0316836001600160a01b031603620026cb5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015260640162000ba2565b6001600160a01b038381166000818152606a6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b606081516000036200275857505060408051602081019091526000815290565b600060405180606001604052806040815260200162004e9c60409139905060006003845160026200278a9190620046c1565b6200279691906200478c565b620027a39060046200469f565b90506000620027b4826020620046c1565b6001600160401b03811115620027ce57620027ce6200357b565b6040519080825280601f01601f191660200182016040528015620027f9576020820181803683370190505b509050818152600183018586518101602084015b8183101562002867576003830192508251603f8160121c168501518253600182019150603f81600c1c168501518253600182019150603f8160061c168501518253600182019150603f81168501518253506001016200280d565b6003895106600181146200288457600281146200289657620028a2565b613d3d60f01b600119830152620028a2565b603d60f81b6000198301525b509398975050505050505050565b620028bd848484620020ba565b620028cb8484848462002ff6565b6200161c5760405162461bcd60e51b815260040162000ba290620047af565b60606000620028fb8360026200469f565b62002908906002620046c1565b6001600160401b038111156200292257620029226200357b565b6040519080825280601f01601f1916602001820160405280156200294d576020820181803683370190505b509050600360fc1b816000815181106200296b576200296b62004776565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106200299d576200299d62004776565b60200101906001600160f81b031916908160001a9053506000620029c38460026200469f565b620029d0906001620046c1565b90505b600181111562002a52576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811062002a085762002a0862004776565b1a60f81b82828151811062002a215762002a2162004776565b60200101906001600160f81b031916908160001a90535060049490941c9362002a4a8162004801565b9050620029d3565b50831562002aa35760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640162000ba2565b9392505050565b600054610100900460ff1662002ad45760405162461bcd60e51b815260040162000ba2906200481b565b62001064828262003102565b610137620010648282620045bd565b61013a5460ff161562002b1557604051630396d08760e31b815260040160405180910390fd5b60005b8161ffff1681101562002b575762002b4262002b3c60c9546001600160a01b031690565b62002482565b8062002b4e81620046d7565b91505062002b18565b505061013a805460ff19166001179055565b80610138838154811062002b815762002b8162004776565b60009182526020909120825160029092020190819062002ba29082620045bd565b5060208201516001909101805460409093015160ff16600160a01b026001600160a81b03199093166001600160a01b03909216919091179190911790555050565b60018111156200161c576001600160a01b0384161562002c2d576001600160a01b0384166000908152606860205260408120805483929062002c2790849062004760565b90915550505b6001600160a01b038316156200161c576001600160a01b0383166000908152606860205260408120805483929062002c67908490620046c1565b909155505050505050565b803b62002c9e5760405163310365cd60e21b81526001600160a01b038216600482015260240162000ba2565b60008051602062004e7c83398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b62002cd98362003149565b60008251118062002ce75750805b1562000c4a576200161c838362003193565b620010648282604051806020016040528060008152506200322e565b6060833b600081900362002d3a57505060408051602081019091526000815262002aa3565b8084111562002d5a57505060408051602081019091526000815262002aa3565b8383101562002d8e5760405163162544fd60e11b815260048101829052602481018590526044810184905260640162000ba2565b838303848203600082821062002da5578262002da7565b815b60408051603f8301601f19168101909152818152955090508087602087018a3c505050509392505050565b6101388054600181018255600091909152815182916002027ff79a63dcec80ed75c82f36161f17b9c2f407860160383a7be0a0ee7962c527ae0190819062002e1b9082620045bd565b5060208201516001909101805460409093015160ff16600160a01b026001600160a81b03199093166001600160a01b039092169190911791909117905550565b60c980546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60008062002edc8360405160200162002ec7919062004866565b60405160208183030381529060405262003268565b90508051602082016000f091506001600160a01b03821662002f115760405163046a55db60e11b815260040160405180910390fd5b50919050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b831062002f575772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef8100000000831062002f84576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831062002fa357662386f26fc10000830492506010015b6305f5e100831062002fbc576305f5e100830492506008015b612710831062002fd157612710830492506004015b6064831062002fe4576064830492506002015b600a831062000a625760010192915050565b60006001600160a01b0384163b15620030f957604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906200303d9033908990889088906004016200488e565b6020604051808303816000875af19250505080156200307b575060408051601f3d908101601f191682019092526200307891810190620048c3565b60015b620030de573d808015620030ac576040519150601f19603f3d011682016040523d82523d6000602084013e620030b1565b606091505b508051600003620030d65760405162461bcd60e51b815260040162000ba290620047af565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050620015db565b506001620015db565b600054610100900460ff166200312c5760405162461bcd60e51b815260040162000ba2906200481b565b60656200313a8382620045bd565b50606662000c4a8282620045bd565b620031548162002c72565b6040516001600160a01b03821681527fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b9060200160405180910390a150565b6060823b620031b5576040516337f2022960e01b815260040160405180910390fd5b600080846001600160a01b031684604051620031d29190620048e3565b600060405180830381855af49150503d80600081146200320f576040519150601f19603f3d011682016040523d82523d6000602084013e62003214565b606091505b509150915062003225828262003280565b95945050505050565b6200323a8383620032bb565b62003249600084848462002ff6565b62000c4a5760405162461bcd60e51b815260040162000ba290620047af565b6060815182604051602001620014c592919062004901565b606082156200329157508062000a62565b815115620032a25781518083602001fd5b60405163062536b160e41b815260040160405180910390fd5b6001600160a01b038216620033135760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640162000ba2565b6000818152606760205260409020546001600160a01b0316156200337a5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640162000ba2565b6200338a60008383600162002be3565b6000818152606760205260409020546001600160a01b031615620033f15760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640162000ba2565b6001600160a01b038216600081815260686020908152604080832080546001019055848352606790915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b610527806200495583390190565b6001600160e01b03198116811462000da157600080fd5b6000602082840312156200349457600080fd5b813562002aa3816200346a565b60005b83811015620034be578181015183820152602001620034a4565b50506000910152565b60008151808452620034e1816020860160208601620034a1565b601f01601f19169290920160200192915050565b60208152600062002aa36020830184620034c7565b6000602082840312156200351d57600080fd5b5035919050565b6001600160a01b038116811462000da157600080fd5b8035620035478162003524565b919050565b600080604083850312156200356057600080fd5b82356200356d8162003524565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b60405160a081016001600160401b0381118282101715620035b657620035b66200357b565b60405290565b604051601f8201601f191681016001600160401b0381118282101715620035e757620035e76200357b565b604052919050565b60006001600160401b038211156200360b576200360b6200357b565b50601f01601f191660200190565b600082601f8301126200362b57600080fd5b8135620036426200363c82620035ef565b620035bc565b8181528460208386010111156200365857600080fd5b816020850160208301376000918101602001919091529392505050565b600060a082840312156200368857600080fd5b6200369262003591565b905081356001600160401b0380821115620036ac57600080fd5b620036ba8583860162003619565b83526020840135915080821115620036d157600080fd5b620036df8583860162003619565b60208401526040840135915080821115620036f957600080fd5b50620037088482850162003619565b6040830152506200371c606083016200353a565b60608201526080820135608082015292915050565b80356001600160401b03811681146200354757600080fd5b6000608082840312156200375c57600080fd5b604051608081018181106001600160401b03821117156200378157620037816200357b565b604052905080823561ffff811681146200379a57600080fd5b8152620037aa6020840162003731565b6020820152620037bd6040840162003731565b604082015260608301356001600160701b0381168114620037dd57600080fd5b6060919091015292915050565b600060608284031215620037fd57600080fd5b604051606081016001600160401b0382821081831117156200382357620038236200357b565b8160405282935084359150808211156200383c57600080fd5b506200384b8582860162003619565b82525060208301356200385e8162003524565b6020820152604083013560ff811681146200387857600080fd5b6040919091015292915050565b60006001600160401b0380841115620038a257620038a26200357b565b8360051b6020620038b5818301620035bc565b86815293509084019080840187831115620038cf57600080fd5b855b838110156200390857803585811115620038eb5760008081fd5b620038f98a828a01620037ea565b835250908201908201620038d1565b50505050509392505050565b600082601f8301126200392657600080fd5b62002aa38383356020850162003885565b60008060008060008061012087890312156200395257600080fd5b86356001600160401b03808211156200396a57600080fd5b620039788a838b0162003619565b975060208901359150808211156200398f57600080fd5b6200399d8a838b0162003619565b9650620039ad60408a016200353a565b95506060890135915080821115620039c457600080fd5b620039d28a838b0162003675565b9450620039e38a60808b0162003749565b9350610100890135915080821115620039fb57600080fd5b5062003a0a89828a0162003914565b9150509295509295509295565b60008060006060848603121562003a2d57600080fd5b833562003a3a8162003524565b9250602084013562003a4c8162003524565b929592945050506040919091013590565b60006020828403121562003a7057600080fd5b813562002aa38162003524565b6000806040838503121562003a9157600080fd5b823562003a9e8162003524565b915060208301356001600160401b0381111562003aba57600080fd5b62003ac88582860162003619565b9150509250929050565b6000806020838503121562003ae657600080fd5b82356001600160401b038082111562003afe57600080fd5b818501915085601f83011262003b1357600080fd5b81358181111562003b2357600080fd5b8660208260051b850101111562003b3957600080fd5b60209290920196919550909350505050565b60a08152600062003b6060a0830188620034c7565b828103602084015262003b748188620034c7565b9050828103604084015262003b8a8187620034c7565b6001600160a01b039590951660608401525050608001529392505050565b60006020828403121562003bbb57600080fd5b81356001600160401b0381111562003bd257600080fd5b620015db8482850162003619565b801515811462000da157600080fd5b6000806040838503121562003c0357600080fd5b823562003c108162003524565b9150602083013562003c228162003be0565b809150509250929050565b6000806000806080858703121562003c4457600080fd5b84356001600160401b038082111562003c5c57600080fd5b62003c6a8883890162003619565b9550602087013591508082111562003c8157600080fd5b62003c8f8883890162003619565b9450604087013591508082111562003ca657600080fd5b62003cb48883890162003619565b9350606087013591508082111562003ccb57600080fd5b5062003cda8782880162003619565b91505092959194509250565b6000806000806080858703121562003cfd57600080fd5b843562003d0a8162003524565b9350602085013562003d1c8162003524565b92506040850135915060608501356001600160401b0381111562003d3f57600080fd5b62003cda8782880162003619565b60608152600062003d626060830186620034c7565b6001600160a01b039490941660208301525060ff91909116604090910152919050565b60008060006040848603121562003d9b57600080fd5b833562003da88162003524565b925060208401356001600160401b038082111562003dc557600080fd5b818601915086601f83011262003dda57600080fd5b81358181111562003dea57600080fd5b87602082850101111562003dfd57600080fd5b6020830194508093505050509250925092565b6000806040838503121562003e2457600080fd5b823562003e318162003524565b9150602083013562003c228162003524565b6000806040838503121562003e5757600080fd5b8235915060208301356001600160401b0381111562003e7557600080fd5b83016060818603121562003c2257600080fd5b600181811c9082168062003e9d57607f821691505b60208210810362002f1157634e487b7160e01b600052602260045260246000fd5b600081518084526020808501808196508360051b8101915082860160005b8581101562003f3657828403895281516060815181875262003f0182880182620034c7565b838901516001600160a01b0316888a015260409384015160ff1693909701929092525050978401979084019060010162003edc565b5091979650505050505050565b600061012080835262003f598184018a620034c7565b9050828103602084015262003f6f8189620034c7565b905060018060a01b0380881660408501528382036060850152865160a0835262003f9d60a0840182620034c7565b90506020880151838203602085015262003fb88282620034c7565b9150506040880151838203604085015262003fd48282620034c7565b60608a8101518516868201526080808c0151818801528a5161ffff169089015260208a01516001600160401b0390811660a08a015260408b01511660c08901528901516001600160701b031660e088015291506200402f9050565b84810361010086015262004044818762003ebe565b9b9a5050505050505050505050565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b600062002aa336848462003885565b7f3c7363726970743e76617220626c6f636b486173683d22000000000000000000815260008551620040e9816017850160208a01620034a1565b6e111dbb30b9103a37b5b2b724b21e9160891b60179184019182015285516200411a816026840160208a01620034a1565b70111dbb30b9103a34b6b2b9ba30b6b81e9160791b6026929091019182015284516200414e816037840160208901620034a1565b61223b60f01b60379290910191820152835162004173816039840160208801620034a1565b681e17b9b1b934b83a1f60b91b603992909101918201526042019695505050505050565b6000604080830181845280865480835260609250828601915060058382821b88010160008a81526020808220825b868110156200429357605f198c8603018852888552838254620041e88162003e88565b808c89015260806001808416600081146200420c5760018114620042265762004253565b60ff1985168b8401528315158c1b8b018301955062004253565b878a52888a208a5b858110156200424b5781548d8201860152908301908a016200422e565b8c0184019650505b508601546001600160a01b038116888b0152925062004270915050565b60a081901c60ff16878d01525097830197945060029190910190600101620041c5565b5050898303908a015250620042a9818a620034c7565b9a9950505050505050505050565b600060208284031215620042ca57600080fd5b81516001600160401b03811115620042e157600080fd5b8201601f81018413620042f357600080fd5b8051620043046200363c82620035ef565b8181528560208385010111156200431a57600080fd5b62003225826020830160208601620034a1565b683d913730b6b2911d1160b91b8152845160009062004354816009850160208a01620034a1565b71111610113232b9b1b934b83a34b7b7111d1160711b60099184019182015285516200438881601b840160208a01620034a1565b741116101130b734b6b0ba34b7b72fbab936111d101160591b601b92909101918201528451620043c0816030840160208901620034a1565b6c1116101134b6b0b3b2911d101160991b603092909101918201528351620043f081603d840160208801620034a1565b61227d60f01b603d9290910191820152603f019695505050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c0000008152600082516200444781601d850160208701620034a1565b91909101601d0192915050565b6000808554620044648162003e88565b600182811680156200447f57600181146200449557620044c6565b60ff1984168752821515830287019450620044c6565b8960005260208060002060005b85811015620044bd5781548a820152908401908201620044a2565b50505082870194505b5087519250620044db838560208b01620034a1565b602f60f81b93909201928352855191620044fc8382860160208a01620034a1565b91909201019695505050505050565b600083516200451f818460208801620034a1565b600160fd1b90830190815283516200453f816001840160208801620034a1565b01600101949350505050565b6000602082840312156200455e57600080fd5b815162002aa38162003be0565b601f82111562000c4a57600081815260208120601f850160051c81016020861015620045945750805b601f850160051c820191505b81811015620045b557828155600101620045a0565b505050505050565b81516001600160401b03811115620045d957620045d96200357b565b620045f181620045ea845462003e88565b846200456b565b602080601f831160018114620046295760008415620046105750858301515b600019600386901b1c1916600185901b178555620045b5565b600085815260208120601f198616915b828110156200465a5788860151825594840194600190910190840162004639565b5085821015620046795787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615620046bc57620046bc62004689565b500290565b8082018082111562000a625762000a6262004689565b600060018201620046ec57620046ec62004689565b5060010190565b600062000a623683620037ea565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b6000602082840312156200475957600080fd5b5051919050565b8181038181111562000a625762000a6262004689565b634e487b7160e01b600052603260045260246000fd5b600082620047aa57634e487b7160e01b600052601260045260246000fd5b500490565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60008162004813576200481362004689565b506000190190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b600081526000825162004881816001850160208701620034a1565b9190910160010192915050565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906200174d90830184620034c7565b600060208284031215620048d657600080fd5b815162002aa3816200346a565b60008251620048f7818460208701620034a1565b9190910192915050565b606360f81b815260e083901b6001600160e01b03191660018201526880600e6000396000f360b81b600582015281516000906200494681600e850160208701620034a1565b91909101600e01939250505056fe608060405234801561001057600080fd5b5060405161052738038061052783398101604081905261002f9161026d565b818161003d82826000610046565b50505050610357565b61004f8361007c565b60008251118061005c5750805b156100775761007583836100c460201b6100291760201c565b505b505050565b6100858161015b565b6040516001600160a01b03821681527fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b9060200160405180910390a150565b6060823b6100e5576040516337f2022960e01b815260040160405180910390fd5b600080846001600160a01b031684604051610100919061033b565b600060405180830381855af49150503d806000811461013b576040519150601f19603f3d011682016040523d82523d6000602084013e610140565b606091505b50909250905061015082826101f8565b925050505b92915050565b61016e816101f260201b6100bf1760201c565b61019a5760405163310365cd60e21b81526001600160a01b038216600482015260240160405180910390fd5b806101d17f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b61023060201b6100c51760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b3b151590565b60608215610207575080610155565b8151156102175781518083602001fd5b60405163062536b160e41b815260040160405180910390fd5b90565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561026457818101518382015260200161024c565b50506000910152565b6000806040838503121561028057600080fd5b82516001600160a01b038116811461029757600080fd5b60208401519092506001600160401b03808211156102b457600080fd5b818501915085601f8301126102c857600080fd5b8151818111156102da576102da610233565b604051601f8201601f19908116603f0116810190838211818310171561030257610302610233565b8160405282815288602084870101111561031b57600080fd5b61032c836020830160208801610249565b80955050505050509250929050565b6000825161034d818460208701610249565b9190910192915050565b6101c1806103666000396000f3fe60806040523661001357610011610017565b005b6100115b6100276100226100c8565b610100565b565b6060823b61004a576040516337f2022960e01b815260040160405180910390fd5b600080846001600160a01b031684604051610065919061015c565b600060405180830381855af49150503d80600081146100a0576040519150601f19603f3d011682016040523d82523d6000602084013e6100a5565b606091505b50915091506100b48282610124565b925050505b92915050565b3b151590565b90565b60006100fb7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e80801561011f573d6000f35b3d6000fd5b606082156101335750806100b9565b8151156101435781518083602001fd5b60405163062536b160e41b815260040160405180910390fd5b6000825160005b8181101561017d5760208186018101518583015201610163565b50600092019182525091905056fea2646970667358221220e51fe48508fdf1220d63f27b4cd656c7fbde0b68fcff7ed298354afb8a16ec2c64736f6c63430008100033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa2646970667358221220d02dc6aaafc678323d26e8b65aeb872127fb2fae38cb4dfc01a8574373d71f4364736f6c634300081000330000000000000000000000006f94f606a9ad1fddf75a73dc42d37a5991260bb0000000000000000000000000b572d9ee104f764b25d5f74776c523d8c593d22d
Deployed Bytecode
0x608060405260043610620002bf5760003560e01c806379ba50971162000177578063c87b56dd11620000d1578063ec9ef5861162000084578063ec9ef5861462000937578063efef39a11462000969578063f2fde38b1462000980578063f88c8cec14620009a5578063f8cf4bb014620009ca578063fa522ac914620009ef57600080fd5b8063c87b56dd146200084d578063cf456ae71462000872578063d00c7c971462000897578063d1f5789414620008cd578063e30c397814620008f2578063e985e9c5146200091257600080fd5b8063a22cb465116200012a578063a22cb465146200075e578063b79bebaf1462000783578063b7d168e614620007a8578063b88d4fde14620007cd578063c36e901b14620007f2578063c45a0155146200081757600080fd5b806379ba50971462000630578063871b43aa14620006485780638da5cb5b146200066d5780638e3695b8146200068d57806395d89b411462000716578063a0a8e460146200072e57600080fd5b806342842e0e116200022957806366e8fce111620001dc57806366e8fce114620005485780636addb663146200056d578063705bf368146200059857806370a0823114620005ce578063715018a614620005f357806378a4ab85146200060b57600080fd5b806342842e0e14620004925780634cb159d814620004b75780634f1ef28614620004dc57806352d1902d14620004f3578063620b7303146200050b5780636352211e146200052357600080fd5b806318160ddd116200028257806318160ddd14620003af57806323b872dd14620003d65780633659cfe614620003fb5780633ccfd60b146200042057806340d097c31462000438578063423afa66146200045d57600080fd5b806301ffc9a714620002c457806306fdde0314620002fe578063081812fc1462000325578063095ea7b314620003635780630dd50a66146200038a575b600080fd5b348015620002d157600080fd5b50620002e9620002e336600462003481565b62000a14565b60405190151581526020015b60405180910390f35b3480156200030b57600080fd5b506200031662000a68565b604051620002f59190620034f5565b3480156200033257600080fd5b506200034a620003443660046200350a565b62000b02565b6040516001600160a01b039091168152602001620002f5565b3480156200037057600080fd5b5062000388620003823660046200354c565b62000b2b565b005b3480156200039757600080fd5b5062000316620003a936600462003937565b62000c4f565b348015620003bc57600080fd5b50620003c762000c89565b604051908152602001620002f5565b348015620003e357600080fd5b5062000388620003f536600462003a17565b62000c9b565b3480156200040857600080fd5b50620003886200041a36600462003a5d565b62000cd3565b3480156200042d57600080fd5b50620002e962000da4565b3480156200044557600080fd5b50620003886200045736600462003a5d565b62000ef1565b3480156200046a57600080fd5b50620002e96200047c36600462003a5d565b61012f6020526000908152604090205460ff1681565b3480156200049f57600080fd5b5062000388620004b136600462003a17565b62000f5b565b348015620004c457600080fd5b5062000388620004d636600462003a5d565b62000f78565b62000388620004ed36600462003a7d565b62000fa5565b3480156200050057600080fd5b50620003c762001068565b3480156200051857600080fd5b5062000316620010c8565b3480156200053057600080fd5b506200034a620005423660046200350a565b620010e3565b3480156200055557600080fd5b50620003886200056736600462003ad2565b62001145565b3480156200057a57600080fd5b506200058562001165565b604051620002f595949392919062003b4b565b348015620005a557600080fd5b506200034a7f000000000000000000000000b572d9ee104f764b25d5f74776c523d8c593d22d81565b348015620005db57600080fd5b50620003c7620005ed36600462003a5d565b62001342565b3480156200060057600080fd5b5062000388620013ca565b3480156200061857600080fd5b50620003886200062a36600462003ba8565b620013e2565b3480156200063d57600080fd5b5062000388620013f7565b3480156200065557600080fd5b5062000316620006673660046200350a565b62001472565b3480156200067a57600080fd5b5060c9546001600160a01b03166200034a565b3480156200069a57600080fd5b5061013954620006da9061ffff8116906001600160401b03620100008204811691600160501b8104909116906001600160701b03600160901b9091041684565b6040805161ffff9590951685526001600160401b03938416602086015291909216908301526001600160701b03166060820152608001620002f5565b3480156200072357600080fd5b5062000316620014db565b3480156200073b57600080fd5b506040805180820190915260058152640312e302e360dc1b602082015262000316565b3480156200076b57600080fd5b50620003886200077d36600462003bef565b620014ec565b3480156200079057600080fd5b5062000316620007a23660046200350a565b620014f9565b348015620007b557600080fd5b5062000316620007c736600462003c2d565b62001583565b348015620007da57600080fd5b5062000388620007ec36600462003ce6565b620015e3565b348015620007ff57600080fd5b50620003166200081136600462003ba8565b62001622565b3480156200082457600080fd5b506200034a7f0000000000000000000000006f94f606a9ad1fddf75a73dc42d37a5991260bb081565b3480156200085a57600080fd5b50620003166200086c3660046200350a565b62001649565b3480156200087f57600080fd5b50620003886200089136600462003bef565b62001757565b348015620008a457600080fd5b50620008bc620008b63660046200350a565b6200178d565b604051620002f59392919062003d4d565b348015620008da57600080fd5b5062000388620008ec36600462003d85565b62001869565b348015620008ff57600080fd5b5060fb546001600160a01b03166200034a565b3480156200091f57600080fd5b50620002e96200093136600462003e10565b62001cd3565b3480156200094457600080fd5b50620003c7620009563660046200350a565b61012e6020526000908152604090205481565b620003886200097a3660046200350a565b62001d01565b3480156200098d57600080fd5b50620003886200099f36600462003a5d565b62001ead565b348015620009b257600080fd5b5062000388620009c436600462003e43565b62001f21565b348015620009d757600080fd5b5062000388620009e936600462003a5d565b62001f41565b348015620009fc57600080fd5b506200038862000a0e36600462003ba8565b62001f6e565b60006001600160e01b031982166380ac58cd60e01b148062000a4657506001600160e01b03198216635b5e139f60e01b145b8062000a6257506301ffc9a760e01b6001600160e01b03198316145b92915050565b60606065805462000a799062003e88565b80601f016020809104026020016040519081016040528092919081815260200182805462000aa79062003e88565b801562000af85780601f1062000acc5761010080835404028352916020019162000af8565b820191906000526020600020905b81548152906001019060200180831162000ada57829003601f168201915b5050505050905090565b600062000b0f8262001f83565b506000908152606960205260409020546001600160a01b031690565b600062000b3882620010e3565b9050806001600160a01b0316836001600160a01b03160362000bab5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b038216148062000bca575062000bca813362001cd3565b62000c3e5760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c000000606482015260840162000ba2565b62000c4a838362001fe4565b505050565b606086868686868660405160200162000c6e9695949392919062003f43565b60405160208183030381529060405290509695505050505050565b600062000c9661012d5490565b905090565b62000ca7338262002054565b62000cc65760405162461bcd60e51b815260040162000ba29062004053565b62000c4a838383620020ba565b6001600160a01b037f000000000000000000000000835c7f2a650e170e2f3b6c63c410f3a1571c904c16300362000d1d576040516343d22ee960e01b815260040160405180910390fd5b7f000000000000000000000000835c7f2a650e170e2f3b6c63c410f3a1571c904c6001600160a01b031662000d5162002239565b6001600160a01b03161462000d795760405163073a6c8560e51b815260040160405180910390fd5b62000d848162002256565b62000da18160405180602001604052806000815250600062002338565b50565b600062000db062002427565b6101335460405147916000916001600160a01b03909116907f000000000000000000000000000000000000000000000000000000000003345090849084818181858888f193505050503d806000811462000e27576040519150601f19603f3d011682016040523d82523d6000602084013e62000e2c565b606091505b505090508062000e4f5760405163050046d960e01b815260040160405180910390fd5b61013354604051633c1ca03760e01b81523360048201526001600160a01b039182166024820152604481018490527f000000000000000000000000b572d9ee104f764b25d5f74776c523d8c593d22d90911690633c1ca03790606401600060405180830381600087803b15801562000ec657600080fd5b505af115801562000edb573d6000803e3d6000fd5b509294505050505062000eee6001609755565b90565b33600090815261012f602052604090205460ff1662000f2357604051632236705560e11b815260040160405180910390fd5b6101345462000f3162000c89565b1062000f505760405163d05cb60960e01b815260040160405180910390fd5b62000da18162002482565b62000c4a83838360405180602001604052806000815250620015e3565b62000f82620024cd565b61013380546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b037f000000000000000000000000835c7f2a650e170e2f3b6c63c410f3a1571c904c16300362000fef576040516343d22ee960e01b815260040160405180910390fd5b7f000000000000000000000000835c7f2a650e170e2f3b6c63c410f3a1571c904c6001600160a01b03166200102362002239565b6001600160a01b0316146200104b5760405163073a6c8560e51b815260040160405180910390fd5b620010568262002256565b620010648282600162002338565b5050565b6000306001600160a01b037f000000000000000000000000835c7f2a650e170e2f3b6c63c410f3a1571c904c1614620010b457604051632bade49760e11b815260040160405180910390fd5b5060008051602062004e7c83398151915290565b6101355460609062000c96906001600160a01b031662002529565b6000818152606760205260408120546001600160a01b03168062000a625760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b604482015260640162000ba2565b6200114f620024cd565b620010646200115f8284620040a0565b6200253b565b61013080548190620011779062003e88565b80601f0160208091040260200160405190810160405280929190818152602001828054620011a59062003e88565b8015620011f65780601f10620011ca57610100808354040283529160200191620011f6565b820191906000526020600020905b815481529060010190602001808311620011d857829003601f168201915b5050505050908060010180546200120d9062003e88565b80601f01602080910402602001604051908101604052809291908181526020018280546200123b9062003e88565b80156200128c5780601f1062001260576101008083540402835291602001916200128c565b820191906000526020600020905b8154815290600101906020018083116200126e57829003601f168201915b505050505090806002018054620012a39062003e88565b80601f0160208091040260200160405190810160405280929190818152602001828054620012d19062003e88565b8015620013225780601f10620012f65761010080835404028352916020019162001322565b820191906000526020600020905b8154815290600101906020018083116200130457829003601f168201915b50505050600383015460049093015491926001600160a01b031691905085565b60006001600160a01b038216620013ae5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b606482015260840162000ba2565b506001600160a01b031660009081526068602052604090205490565b620013d4620024cd565b620013e0600062002585565b565b620013ec620024cd565b62000da181620025a0565b60fb5433906001600160a01b03168114620014675760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b606482015260840162000ba2565b62000da18162002585565b600081815261012e60205260409020546060906200149090620025cf565b6200149b83620025cf565b620014a642620025cf565b620014b0620010c8565b604051602001620014c59493929190620040af565b6040516020818303038152906040529050919050565b60606066805462000a799062003e88565b6200106433838362002668565b610136546060906001600160a01b0316631e149ecf6101386200151c8562001472565b6040518363ffffffff1660e01b81526004016200153b92919062004197565b600060405180830381865afa15801562001559573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405262000a629190810190620042b7565b6060620015b785858585604051602001620015a294939291906200432d565b60405160208183030381529060405262002738565b604051602001620015c991906200440d565b60405160208183030381529060405290505b949350505050565b620015ef338362002054565b6200160e5760405162461bcd60e51b815260040162000ba29062004053565b6200161c84848484620028b0565b50505050565b606061013762001634306014620028ea565b83604051602001620014c59392919062004454565b606060006200165883620025cf565b905060006200166662000a68565b826040516020016200167a9291906200450b565b604051602081830303815290604052905060006200169885620014f9565b90506000620016a78462001622565b90506200174d836101306002018054620016c19062003e88565b80601f0160208091040260200160405190810160405280929190818152602001828054620016ef9062003e88565b8015620017405780601f10620017145761010080835404028352916020019162001740565b820191906000526020600020905b8154815290600101906020018083116200172257829003601f168201915b5050505050848462001583565b9695505050505050565b62001761620024cd565b6001600160a01b0391909116600090815261012f60205260409020805460ff1916911515919091179055565b61013881815481106200179f57600080fd5b9060005260206000209060020201600091509050806000018054620017c49062003e88565b80601f0160208091040260200160405190810160405280929190818152602001828054620017f29062003e88565b8015620018435780601f10620018175761010080835404028352916020019162001843565b820191906000526020600020905b8154815290600101906020018083116200182557829003601f168201915b505050600190930154919250506001600160a01b0381169060ff600160a01b9091041683565b600054610100900460ff16158080156200188a5750600054600160ff909116105b80620018a65750303b158015620018a6575060005460ff166001145b6200190b5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840162000ba2565b6000805460ff1916600117905580156200192f576000805461ff0019166101001790555b336001600160a01b037f0000000000000000000000006f94f606a9ad1fddf75a73dc42d37a5991260bb01614620019795760405163191ade7560e01b815260040160405180910390fd5b600080808080806200198e888a018a62003937565b6040516337703c3d60e11b81526001600160a01b038581166004830152969c50949a50929850909650945092507f0000000000000000000000006f94f606a9ad1fddf75a73dc42d37a5991260bb090911690636ee0787a90602401602060405180830381865afa15801562001a07573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001a2d91906200454b565b62001a5757604051639a43351160e01b81526001600160a01b038516600482015260240162000ba2565b8360405162001a66906200345c565b6001600160a01b039091168152604060208201819052600090820152606001604051809103906000f08015801562001aa2573d6000803e3d6000fd5b5061013680546001600160a01b0319166001600160a01b039283161790558a16600090815261012f60205260409020805460ff191660011790558251839061013090819062001af29082620045bd565b506020820151600182019062001b099082620045bd565b506040820151600282019062001b209082620045bd565b506060828101516003830180546001600160a01b0319166001600160a01b039283161790556080909301516004928301558451610139805460208801516040808a0151958a015161ffff90951669ffffffffffffffffffff1990931692909217620100006001600160401b03928316021769ffffffffffffffffffff16600160501b919095160271ffffffffffffffffffffffffffffffffffff1693909317600160901b6001600160701b0390931692909202919091179055610136549051632028114560e01b81528d84169281019290925290911690632028114590602401600060405180830381600087803b15801562001c1b57600080fd5b505af115801562001c30573d6000803e3d6000fd5b5050505062001c488360000151846020015162002aaa565b62001c538a62002585565b62001c5e816200253b565b62001c6986620025a0565b62001c748562002ae0565b815162001c819062002aef565b50505050505080156200161c576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150505050565b6001600160a01b039182166000908152606a6020908152604080832093909416825291909152205460ff1690565b62001d0b62002427565b610139546201000090046001600160401b031642108062001d3f575061013954600160501b90046001600160401b03164210155b1562001d5e5760405163b7b2409760e01b815260040160405180910390fd5b6101395462001d7e90600160901b90046001600160701b0316826200469f565b34101562001d9e5760405162bfc92160e01b815260040160405180910390fd5b610134548162001dad62000c89565b62001db99190620046c1565b111562001dd9576040516352df9fe560e01b815260040160405180910390fd5b6101395460405163bbc0ec1f60e01b8152336004820152600160901b9091046001600160701b03166024820152604481018290527f000000000000000000000000b572d9ee104f764b25d5f74776c523d8c593d22d6001600160a01b03169063bbc0ec1f90606401600060405180830381600087803b15801562001e5c57600080fd5b505af115801562001e71573d6000803e3d6000fd5b5050505060005b8181101562001ea15762001e8c3362002482565b8062001e9881620046d7565b91505062001e78565b5062000da16001609755565b62001eb7620024cd565b60fb80546001600160a01b0383166001600160a01b0319909116811790915562001ee960c9546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b62001f2b620024cd565b620010648262001f3b83620046f3565b62002b69565b62001f4b620024cd565b61013680546001600160a01b0319166001600160a01b0392909216919091179055565b62001f78620024cd565b62000da18162002ae0565b6000818152606760205260409020546001600160a01b031662000da15760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b604482015260640162000ba2565b600081815260696020526040902080546001600160a01b0319166001600160a01b03841690811790915581906200201b82620010e3565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000806200206283620010e3565b9050806001600160a01b0316846001600160a01b031614806200208c57506200208c818562001cd3565b80620015db5750836001600160a01b0316620020a88462000b02565b6001600160a01b031614949350505050565b826001600160a01b0316620020cf82620010e3565b6001600160a01b031614620020f85760405162461bcd60e51b815260040162000ba29062004701565b6001600160a01b0382166200215c5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840162000ba2565b6200216b838383600162002be3565b826001600160a01b03166200218082620010e3565b6001600160a01b031614620021a95760405162461bcd60e51b815260040162000ba29062004701565b600081815260696020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260688552838620805460001901905590871680865283862080546001019055868652606790945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60008051602062004e7c833981519152546001600160a01b031690565b62002260620024cd565b7f0000000000000000000000006f94f606a9ad1fddf75a73dc42d37a5991260bb06001600160a01b031663666854a06200229962002239565b6040516001600160e01b031960e084901b1681526001600160a01b03918216600482015290841660248201526044016020604051808303816000875af1158015620022e8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200230e91906200454b565b62000da15760405163c72492e960e01b81526001600160a01b038216600482015260240162000ba2565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff16156200236e5762000c4a8362002c72565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015620023cb575060408051601f3d908101601f19168201909252620023c89181019062004746565b60015b620023e95760405163605d905960e11b815260040160405180910390fd5b60008051602062004e7c83398151915281146200241957604051630424da4b60e11b815260040160405180910390fd5b5062000c4a83838362002cce565b6002609754036200247b5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640162000ba2565b6002609755565b60006200248f61012d5490565b90506200249e60014362004760565b600082815261012e6020526040902090409055620024c161012d80546001019055565b62001064828262002cf9565b60c9546001600160a01b03163314620013e05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640162000ba2565b606062000a6282600160001962002d15565b805160005b8181101562000c4a576200257083828151811062002562576200256262004776565b602002602001015162002dd2565b806200257c81620046d7565b91505062002540565b60fb80546001600160a01b031916905562000da18162002e5b565b620025ab8162002ead565b61013580546001600160a01b0319166001600160a01b039290921691909117905550565b60606000620025de8362002f17565b60010190506000816001600160401b038111156200260057620026006200357b565b6040519080825280601f01601f1916602001820160405280156200262b576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a85049450846200263557509392505050565b816001600160a01b0316836001600160a01b031603620026cb5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015260640162000ba2565b6001600160a01b038381166000818152606a6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b606081516000036200275857505060408051602081019091526000815290565b600060405180606001604052806040815260200162004e9c60409139905060006003845160026200278a9190620046c1565b6200279691906200478c565b620027a39060046200469f565b90506000620027b4826020620046c1565b6001600160401b03811115620027ce57620027ce6200357b565b6040519080825280601f01601f191660200182016040528015620027f9576020820181803683370190505b509050818152600183018586518101602084015b8183101562002867576003830192508251603f8160121c168501518253600182019150603f81600c1c168501518253600182019150603f8160061c168501518253600182019150603f81168501518253506001016200280d565b6003895106600181146200288457600281146200289657620028a2565b613d3d60f01b600119830152620028a2565b603d60f81b6000198301525b509398975050505050505050565b620028bd848484620020ba565b620028cb8484848462002ff6565b6200161c5760405162461bcd60e51b815260040162000ba290620047af565b60606000620028fb8360026200469f565b62002908906002620046c1565b6001600160401b038111156200292257620029226200357b565b6040519080825280601f01601f1916602001820160405280156200294d576020820181803683370190505b509050600360fc1b816000815181106200296b576200296b62004776565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106200299d576200299d62004776565b60200101906001600160f81b031916908160001a9053506000620029c38460026200469f565b620029d0906001620046c1565b90505b600181111562002a52576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811062002a085762002a0862004776565b1a60f81b82828151811062002a215762002a2162004776565b60200101906001600160f81b031916908160001a90535060049490941c9362002a4a8162004801565b9050620029d3565b50831562002aa35760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640162000ba2565b9392505050565b600054610100900460ff1662002ad45760405162461bcd60e51b815260040162000ba2906200481b565b62001064828262003102565b610137620010648282620045bd565b61013a5460ff161562002b1557604051630396d08760e31b815260040160405180910390fd5b60005b8161ffff1681101562002b575762002b4262002b3c60c9546001600160a01b031690565b62002482565b8062002b4e81620046d7565b91505062002b18565b505061013a805460ff19166001179055565b80610138838154811062002b815762002b8162004776565b60009182526020909120825160029092020190819062002ba29082620045bd565b5060208201516001909101805460409093015160ff16600160a01b026001600160a81b03199093166001600160a01b03909216919091179190911790555050565b60018111156200161c576001600160a01b0384161562002c2d576001600160a01b0384166000908152606860205260408120805483929062002c2790849062004760565b90915550505b6001600160a01b038316156200161c576001600160a01b0383166000908152606860205260408120805483929062002c67908490620046c1565b909155505050505050565b803b62002c9e5760405163310365cd60e21b81526001600160a01b038216600482015260240162000ba2565b60008051602062004e7c83398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b62002cd98362003149565b60008251118062002ce75750805b1562000c4a576200161c838362003193565b620010648282604051806020016040528060008152506200322e565b6060833b600081900362002d3a57505060408051602081019091526000815262002aa3565b8084111562002d5a57505060408051602081019091526000815262002aa3565b8383101562002d8e5760405163162544fd60e11b815260048101829052602481018590526044810184905260640162000ba2565b838303848203600082821062002da5578262002da7565b815b60408051603f8301601f19168101909152818152955090508087602087018a3c505050509392505050565b6101388054600181018255600091909152815182916002027ff79a63dcec80ed75c82f36161f17b9c2f407860160383a7be0a0ee7962c527ae0190819062002e1b9082620045bd565b5060208201516001909101805460409093015160ff16600160a01b026001600160a81b03199093166001600160a01b039092169190911791909117905550565b60c980546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60008062002edc8360405160200162002ec7919062004866565b60405160208183030381529060405262003268565b90508051602082016000f091506001600160a01b03821662002f115760405163046a55db60e11b815260040160405180910390fd5b50919050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b831062002f575772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef8100000000831062002f84576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831062002fa357662386f26fc10000830492506010015b6305f5e100831062002fbc576305f5e100830492506008015b612710831062002fd157612710830492506004015b6064831062002fe4576064830492506002015b600a831062000a625760010192915050565b60006001600160a01b0384163b15620030f957604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906200303d9033908990889088906004016200488e565b6020604051808303816000875af19250505080156200307b575060408051601f3d908101601f191682019092526200307891810190620048c3565b60015b620030de573d808015620030ac576040519150601f19603f3d011682016040523d82523d6000602084013e620030b1565b606091505b508051600003620030d65760405162461bcd60e51b815260040162000ba290620047af565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050620015db565b506001620015db565b600054610100900460ff166200312c5760405162461bcd60e51b815260040162000ba2906200481b565b60656200313a8382620045bd565b50606662000c4a8282620045bd565b620031548162002c72565b6040516001600160a01b03821681527fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b9060200160405180910390a150565b6060823b620031b5576040516337f2022960e01b815260040160405180910390fd5b600080846001600160a01b031684604051620031d29190620048e3565b600060405180830381855af49150503d80600081146200320f576040519150601f19603f3d011682016040523d82523d6000602084013e62003214565b606091505b509150915062003225828262003280565b95945050505050565b6200323a8383620032bb565b62003249600084848462002ff6565b62000c4a5760405162461bcd60e51b815260040162000ba290620047af565b6060815182604051602001620014c592919062004901565b606082156200329157508062000a62565b815115620032a25781518083602001fd5b60405163062536b160e41b815260040160405180910390fd5b6001600160a01b038216620033135760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640162000ba2565b6000818152606760205260409020546001600160a01b0316156200337a5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640162000ba2565b6200338a60008383600162002be3565b6000818152606760205260409020546001600160a01b031615620033f15760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640162000ba2565b6001600160a01b038216600081815260686020908152604080832080546001019055848352606790915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b610527806200495583390190565b6001600160e01b03198116811462000da157600080fd5b6000602082840312156200349457600080fd5b813562002aa3816200346a565b60005b83811015620034be578181015183820152602001620034a4565b50506000910152565b60008151808452620034e1816020860160208601620034a1565b601f01601f19169290920160200192915050565b60208152600062002aa36020830184620034c7565b6000602082840312156200351d57600080fd5b5035919050565b6001600160a01b038116811462000da157600080fd5b8035620035478162003524565b919050565b600080604083850312156200356057600080fd5b82356200356d8162003524565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b60405160a081016001600160401b0381118282101715620035b657620035b66200357b565b60405290565b604051601f8201601f191681016001600160401b0381118282101715620035e757620035e76200357b565b604052919050565b60006001600160401b038211156200360b576200360b6200357b565b50601f01601f191660200190565b600082601f8301126200362b57600080fd5b8135620036426200363c82620035ef565b620035bc565b8181528460208386010111156200365857600080fd5b816020850160208301376000918101602001919091529392505050565b600060a082840312156200368857600080fd5b6200369262003591565b905081356001600160401b0380821115620036ac57600080fd5b620036ba8583860162003619565b83526020840135915080821115620036d157600080fd5b620036df8583860162003619565b60208401526040840135915080821115620036f957600080fd5b50620037088482850162003619565b6040830152506200371c606083016200353a565b60608201526080820135608082015292915050565b80356001600160401b03811681146200354757600080fd5b6000608082840312156200375c57600080fd5b604051608081018181106001600160401b03821117156200378157620037816200357b565b604052905080823561ffff811681146200379a57600080fd5b8152620037aa6020840162003731565b6020820152620037bd6040840162003731565b604082015260608301356001600160701b0381168114620037dd57600080fd5b6060919091015292915050565b600060608284031215620037fd57600080fd5b604051606081016001600160401b0382821081831117156200382357620038236200357b565b8160405282935084359150808211156200383c57600080fd5b506200384b8582860162003619565b82525060208301356200385e8162003524565b6020820152604083013560ff811681146200387857600080fd5b6040919091015292915050565b60006001600160401b0380841115620038a257620038a26200357b565b8360051b6020620038b5818301620035bc565b86815293509084019080840187831115620038cf57600080fd5b855b838110156200390857803585811115620038eb5760008081fd5b620038f98a828a01620037ea565b835250908201908201620038d1565b50505050509392505050565b600082601f8301126200392657600080fd5b62002aa38383356020850162003885565b60008060008060008061012087890312156200395257600080fd5b86356001600160401b03808211156200396a57600080fd5b620039788a838b0162003619565b975060208901359150808211156200398f57600080fd5b6200399d8a838b0162003619565b9650620039ad60408a016200353a565b95506060890135915080821115620039c457600080fd5b620039d28a838b0162003675565b9450620039e38a60808b0162003749565b9350610100890135915080821115620039fb57600080fd5b5062003a0a89828a0162003914565b9150509295509295509295565b60008060006060848603121562003a2d57600080fd5b833562003a3a8162003524565b9250602084013562003a4c8162003524565b929592945050506040919091013590565b60006020828403121562003a7057600080fd5b813562002aa38162003524565b6000806040838503121562003a9157600080fd5b823562003a9e8162003524565b915060208301356001600160401b0381111562003aba57600080fd5b62003ac88582860162003619565b9150509250929050565b6000806020838503121562003ae657600080fd5b82356001600160401b038082111562003afe57600080fd5b818501915085601f83011262003b1357600080fd5b81358181111562003b2357600080fd5b8660208260051b850101111562003b3957600080fd5b60209290920196919550909350505050565b60a08152600062003b6060a0830188620034c7565b828103602084015262003b748188620034c7565b9050828103604084015262003b8a8187620034c7565b6001600160a01b039590951660608401525050608001529392505050565b60006020828403121562003bbb57600080fd5b81356001600160401b0381111562003bd257600080fd5b620015db8482850162003619565b801515811462000da157600080fd5b6000806040838503121562003c0357600080fd5b823562003c108162003524565b9150602083013562003c228162003be0565b809150509250929050565b6000806000806080858703121562003c4457600080fd5b84356001600160401b038082111562003c5c57600080fd5b62003c6a8883890162003619565b9550602087013591508082111562003c8157600080fd5b62003c8f8883890162003619565b9450604087013591508082111562003ca657600080fd5b62003cb48883890162003619565b9350606087013591508082111562003ccb57600080fd5b5062003cda8782880162003619565b91505092959194509250565b6000806000806080858703121562003cfd57600080fd5b843562003d0a8162003524565b9350602085013562003d1c8162003524565b92506040850135915060608501356001600160401b0381111562003d3f57600080fd5b62003cda8782880162003619565b60608152600062003d626060830186620034c7565b6001600160a01b039490941660208301525060ff91909116604090910152919050565b60008060006040848603121562003d9b57600080fd5b833562003da88162003524565b925060208401356001600160401b038082111562003dc557600080fd5b818601915086601f83011262003dda57600080fd5b81358181111562003dea57600080fd5b87602082850101111562003dfd57600080fd5b6020830194508093505050509250925092565b6000806040838503121562003e2457600080fd5b823562003e318162003524565b9150602083013562003c228162003524565b6000806040838503121562003e5757600080fd5b8235915060208301356001600160401b0381111562003e7557600080fd5b83016060818603121562003c2257600080fd5b600181811c9082168062003e9d57607f821691505b60208210810362002f1157634e487b7160e01b600052602260045260246000fd5b600081518084526020808501808196508360051b8101915082860160005b8581101562003f3657828403895281516060815181875262003f0182880182620034c7565b838901516001600160a01b0316888a015260409384015160ff1693909701929092525050978401979084019060010162003edc565b5091979650505050505050565b600061012080835262003f598184018a620034c7565b9050828103602084015262003f6f8189620034c7565b905060018060a01b0380881660408501528382036060850152865160a0835262003f9d60a0840182620034c7565b90506020880151838203602085015262003fb88282620034c7565b9150506040880151838203604085015262003fd48282620034c7565b60608a8101518516868201526080808c0151818801528a5161ffff169089015260208a01516001600160401b0390811660a08a015260408b01511660c08901528901516001600160701b031660e088015291506200402f9050565b84810361010086015262004044818762003ebe565b9b9a5050505050505050505050565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b600062002aa336848462003885565b7f3c7363726970743e76617220626c6f636b486173683d22000000000000000000815260008551620040e9816017850160208a01620034a1565b6e111dbb30b9103a37b5b2b724b21e9160891b60179184019182015285516200411a816026840160208a01620034a1565b70111dbb30b9103a34b6b2b9ba30b6b81e9160791b6026929091019182015284516200414e816037840160208901620034a1565b61223b60f01b60379290910191820152835162004173816039840160208801620034a1565b681e17b9b1b934b83a1f60b91b603992909101918201526042019695505050505050565b6000604080830181845280865480835260609250828601915060058382821b88010160008a81526020808220825b868110156200429357605f198c8603018852888552838254620041e88162003e88565b808c89015260806001808416600081146200420c5760018114620042265762004253565b60ff1985168b8401528315158c1b8b018301955062004253565b878a52888a208a5b858110156200424b5781548d8201860152908301908a016200422e565b8c0184019650505b508601546001600160a01b038116888b0152925062004270915050565b60a081901c60ff16878d01525097830197945060029190910190600101620041c5565b5050898303908a015250620042a9818a620034c7565b9a9950505050505050505050565b600060208284031215620042ca57600080fd5b81516001600160401b03811115620042e157600080fd5b8201601f81018413620042f357600080fd5b8051620043046200363c82620035ef565b8181528560208385010111156200431a57600080fd5b62003225826020830160208601620034a1565b683d913730b6b2911d1160b91b8152845160009062004354816009850160208a01620034a1565b71111610113232b9b1b934b83a34b7b7111d1160711b60099184019182015285516200438881601b840160208a01620034a1565b741116101130b734b6b0ba34b7b72fbab936111d101160591b601b92909101918201528451620043c0816030840160208901620034a1565b6c1116101134b6b0b3b2911d101160991b603092909101918201528351620043f081603d840160208801620034a1565b61227d60f01b603d9290910191820152603f019695505050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c0000008152600082516200444781601d850160208701620034a1565b91909101601d0192915050565b6000808554620044648162003e88565b600182811680156200447f57600181146200449557620044c6565b60ff1984168752821515830287019450620044c6565b8960005260208060002060005b85811015620044bd5781548a820152908401908201620044a2565b50505082870194505b5087519250620044db838560208b01620034a1565b602f60f81b93909201928352855191620044fc8382860160208a01620034a1565b91909201019695505050505050565b600083516200451f818460208801620034a1565b600160fd1b90830190815283516200453f816001840160208801620034a1565b01600101949350505050565b6000602082840312156200455e57600080fd5b815162002aa38162003be0565b601f82111562000c4a57600081815260208120601f850160051c81016020861015620045945750805b601f850160051c820191505b81811015620045b557828155600101620045a0565b505050505050565b81516001600160401b03811115620045d957620045d96200357b565b620045f181620045ea845462003e88565b846200456b565b602080601f831160018114620046295760008415620046105750858301515b600019600386901b1c1916600185901b178555620045b5565b600085815260208120601f198616915b828110156200465a5788860151825594840194600190910190840162004639565b5085821015620046795787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615620046bc57620046bc62004689565b500290565b8082018082111562000a625762000a6262004689565b600060018201620046ec57620046ec62004689565b5060010190565b600062000a623683620037ea565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b6000602082840312156200475957600080fd5b5051919050565b8181038181111562000a625762000a6262004689565b634e487b7160e01b600052603260045260246000fd5b600082620047aa57634e487b7160e01b600052601260045260246000fd5b500490565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60008162004813576200481362004689565b506000190190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b600081526000825162004881816001850160208701620034a1565b9190910160010192915050565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906200174d90830184620034c7565b600060208284031215620048d657600080fd5b815162002aa3816200346a565b60008251620048f7818460208701620034a1565b9190910192915050565b606360f81b815260e083901b6001600160e01b03191660018201526880600e6000396000f360b81b600582015281516000906200494681600e850160208701620034a1565b91909101600e01939250505056fe608060405234801561001057600080fd5b5060405161052738038061052783398101604081905261002f9161026d565b818161003d82826000610046565b50505050610357565b61004f8361007c565b60008251118061005c5750805b156100775761007583836100c460201b6100291760201c565b505b505050565b6100858161015b565b6040516001600160a01b03821681527fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b9060200160405180910390a150565b6060823b6100e5576040516337f2022960e01b815260040160405180910390fd5b600080846001600160a01b031684604051610100919061033b565b600060405180830381855af49150503d806000811461013b576040519150601f19603f3d011682016040523d82523d6000602084013e610140565b606091505b50909250905061015082826101f8565b925050505b92915050565b61016e816101f260201b6100bf1760201c565b61019a5760405163310365cd60e21b81526001600160a01b038216600482015260240160405180910390fd5b806101d17f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b61023060201b6100c51760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b3b151590565b60608215610207575080610155565b8151156102175781518083602001fd5b60405163062536b160e41b815260040160405180910390fd5b90565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561026457818101518382015260200161024c565b50506000910152565b6000806040838503121561028057600080fd5b82516001600160a01b038116811461029757600080fd5b60208401519092506001600160401b03808211156102b457600080fd5b818501915085601f8301126102c857600080fd5b8151818111156102da576102da610233565b604051601f8201601f19908116603f0116810190838211818310171561030257610302610233565b8160405282815288602084870101111561031b57600080fd5b61032c836020830160208801610249565b80955050505050509250929050565b6000825161034d818460208701610249565b9190910192915050565b6101c1806103666000396000f3fe60806040523661001357610011610017565b005b6100115b6100276100226100c8565b610100565b565b6060823b61004a576040516337f2022960e01b815260040160405180910390fd5b600080846001600160a01b031684604051610065919061015c565b600060405180830381855af49150503d80600081146100a0576040519150601f19603f3d011682016040523d82523d6000602084013e6100a5565b606091505b50915091506100b48282610124565b925050505b92915050565b3b151590565b90565b60006100fb7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e80801561011f573d6000f35b3d6000fd5b606082156101335750806100b9565b8151156101435781518083602001fd5b60405163062536b160e41b815260040160405180910390fd5b6000825160005b8181101561017d5760208186018101518583015201610163565b50600092019182525091905056fea2646970667358221220e51fe48508fdf1220d63f27b4cd656c7fbde0b68fcff7ed298354afb8a16ec2c64736f6c63430008100033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa2646970667358221220d02dc6aaafc678323d26e8b65aeb872127fb2fae38cb4dfc01a8574373d71f4364736f6c63430008100033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000006f94f606a9ad1fddf75a73dc42d37a5991260bb0000000000000000000000000b572d9ee104f764b25d5f74776c523d8c593d22d
-----Decoded View---------------
Arg [0] : _factory (address): 0x6f94f606a9AD1Fddf75A73Dc42d37A5991260bB0
Arg [1] : _o11y (address): 0xb572D9ee104F764b25d5f74776C523D8c593D22d
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000006f94f606a9ad1fddf75a73dc42d37a5991260bb0
Arg [1] : 000000000000000000000000b572d9ee104f764b25d5f74776c523d8c593d22d
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.