Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 7 from a total of 7 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Create Clone | 21201247 | 3 days ago | IN | 0 ETH | 0.00445438 | ||||
Create Clone | 21121409 | 14 days ago | IN | 0 ETH | 0.00151579 | ||||
Create Clone | 21001345 | 31 days ago | IN | 0 ETH | 0.00300279 | ||||
Create Clone | 20866879 | 50 days ago | IN | 0 ETH | 0.00237305 | ||||
Create Clone | 20550445 | 94 days ago | IN | 0 ETH | 0.00051269 | ||||
Create Clone | 20103611 | 156 days ago | IN | 0 ETH | 0.00105783 | ||||
0x60a06040 | 20088736 | 158 days ago | IN | 0 ETH | 0.06902022 |
Latest 7 internal transactions
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
21201247 | 3 days ago | Contract Creation | 0 ETH | |||
21121409 | 14 days ago | Contract Creation | 0 ETH | |||
21001345 | 31 days ago | Contract Creation | 0 ETH | |||
20866879 | 50 days ago | Contract Creation | 0 ETH | |||
20550445 | 94 days ago | Contract Creation | 0 ETH | |||
20103611 | 156 days ago | Contract Creation | 0 ETH | |||
20088736 | 158 days ago | Contract Creation | 0 ETH |
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:
ERC721LGArtLabCloneFactory
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 1000000 runs
Other Settings:
london EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; import { ERC721LGArtLabCloneable } from "./ERC721LGArtLabCloneable.sol"; import { Clones } from "openzeppelin-contracts/proxy/Clones.sol"; contract ERC721LGArtLabCloneFactory { address public immutable lgartlabCloneableUpgradeableImplementation; address public constant DEFAULT_DROP = address(0x008Ec6B9A0533E8596A6011B9eD133e0A725216f); constructor() { ERC721LGArtLabCloneable impl = new ERC721LGArtLabCloneable(); impl.initialize("", "", new address[](0), address(this)); lgartlabCloneableUpgradeableImplementation = address(impl); } function createClone( string memory name, string memory symbol, bytes32 salt ) external returns (address) { // Derive a pseudo-random salt, so clone addresses don't collide // across chains. bytes32 cloneSalt = keccak256( abi.encodePacked(salt, blockhash(block.number)) ); address instance = Clones.cloneDeterministic( lgartlabCloneableUpgradeableImplementation, cloneSalt ); address[] memory allowedDrop = new address[](1); allowedDrop[0] = DEFAULT_DROP; ERC721LGArtLabCloneable(instance).initialize( name, symbol, allowedDrop, msg.sender ); return instance; } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; import "forge-std/console.sol"; import { ERC721ContractMetadataCloneable, ILGArtLabDropTokenContractMetadata } from "./ERC721ContractMetadataCloneable.sol"; import { INonFungibleLGArtLabDropToken } from "../interfaces/INonFungibleLGArtLabDropToken.sol"; import { ILGArtLabDrop } from "../interfaces/ILGArtLabDrop.sol"; import { PublicDrop, ProjectInfo } from "../lib/LGArtLabDropStructs.sol"; import { ERC721LGArtLabStructsErrorsAndEvents } from "../lib/ERC721LGArtLabStructsErrorsAndEvents.sol"; import { ReentrancyGuardUpgradeable } from "openzeppelin-contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol"; import { IERC165 } from "openzeppelin-contracts/utils/introspection/IERC165.sol"; /** * @title ERC721LGArtLab * @notice ERC721LGArtLab is forked from Project OpenSea's drop */ contract ERC721LGArtLabCloneable is ERC721ContractMetadataCloneable, INonFungibleLGArtLabDropToken, ERC721LGArtLabStructsErrorsAndEvents, ReentrancyGuardUpgradeable { /// @notice Track the allowed drop addresses. mapping(address => bool) internal _allowedDrop; /// @notice Tract the number minted by project id. mapping(uint256 => mapping(address => uint)) internal _numberMinted; /// @notice Track the enumerated allowed drop addresses. address[] internal _enumeratedAllowedDrop; /// @notice Internal constants to make base token id by /// multiplying projectId with this variable uint24 internal constant _TOKEN_MAX_SUPPLY_MULTIPLIER = 100_000; /** * @dev Reverts if not an allowed drop contract. * This function is inlined instead of being a modifier * to save contract space from being inlined N times. * * @param drop The drop address to check if allowed. */ function _onlyAllowedDrop(address drop) internal view { if (!_allowedDrop[drop]) { revert OnlyAllowedDrop(); } } /** * @notice Deploy the token contract with its name, symbol, * and allowed SeaDrop addresses. */ function initialize( string calldata __name, string calldata __symbol, address[] calldata allowedDrop, address initialOwner ) public initializer { __ERC721Cloneable__init(__name, __symbol); __ReentrancyGuard_init(); _updateAllowedDrop(allowedDrop); _transferOwnership(initialOwner); emit DropTokenDeployed(); } /** * @notice Update the allowed drop contracts. * Only the owner can use this function. * * @param allowedDrop The allowed drop addresses. */ function updateAllowedDrop( address[] calldata allowedDrop ) external virtual override onlyOwner { _updateAllowedDrop(allowedDrop); } /** * @notice Internal function to update the allowed drop contracts. * * @param allowedDrop The allowed drop addresses. */ function _updateAllowedDrop(address[] calldata allowedDrop) internal { // Put the length on the stack for more efficient access. uint256 enumeratedallowedDropLength = _enumeratedAllowedDrop.length; uint256 allowedDropLength = allowedDrop.length; // Reset the old mapping. for (uint256 i = 0; i < enumeratedallowedDropLength; ) { _allowedDrop[_enumeratedAllowedDrop[i]] = false; unchecked { ++i; } } // Set the new mapping for allowed drop contracts. for (uint256 i = 0; i < allowedDropLength; ) { _allowedDrop[allowedDrop[i]] = true; unchecked { ++i; } } // Set the enumeration. _enumeratedAllowedDrop = allowedDrop; // Emit an event for the update. emit AllowedDropUpdated(allowedDrop); } /** * @notice Get project info * * @param projectId The project id. */ function getProjectInfo( uint256 projectId ) public view returns (ProjectInfo memory) { return _projectInfos[projectId]; } /** * @dev Overrides the `tokenURI()` function from ERC721 * to return just the base URI if it is implied to not be a directory. * * This is to help with ERC721 contracts in which the same token URI * is desired for each token, such as when the tokenURI is 'unrevealed'. */ function tokenURI( uint256 tokenId ) public view virtual override returns (string memory) { if (!_exists(tokenId)) { revert URIQueryForNonexistentToken(); } string memory baseURI = _baseURI(tokenId); // Exit early if the baseURI is empty. if (bytes(baseURI).length == 0) { return ""; } // Check if the last character in baseURI is a slash. if (bytes(baseURI)[bytes(baseURI).length - 1] != bytes("/")[0]) { return baseURI; } return string(abi.encodePacked(baseURI, _toString(tokenId))); } function _toString( uint256 value ) internal pure virtual returns (string memory str) { assembly { // The maximum value of a uint256 contains 78 digits (1 byte per digit), but // we allocate 0xa0 bytes to keep the free memory pointer 32-byte word aligned. // We will need 1 word for the trailing zeros padding, 1 word for the length, // and 3 words for a maximum of 78 digits. Total: 5 * 0x20 = 0xa0. let m := add(mload(0x40), 0xa0) // Update the free memory pointer to allocate. mstore(0x40, m) // Assign the `str` to the end. str := sub(m, 0x20) // Zeroize the slot after the string. mstore(str, 0) // Cache the end of the memory to calculate the length later. let end := str // We write the string from rightmost digit to leftmost digit. // The following is essentially a do-while loop that also handles the zero case. // prettier-ignore for { let temp := value } 1 {} { str := sub(str, 1) // Write the character to the pointer. // The ASCII index of the '0' character is 48. mstore8(str, add(48, mod(temp, 10))) // Keep dividing `temp` until zero. temp := div(temp, 10) // prettier-ignore if iszero(temp) { break } } let length := sub(end, str) // Move the pointer 32 bytes leftwards to make room for the length. str := sub(str, 0x20) // Store the length. mstore(str, length) } } /** * @notice Mint tokens, restricted to the drop contract. * * @dev NOTE: If a token registers itself with multiple drop * contracts, the implementation of this function should guard * against reentrancy. If the implementing token uses * _safeMint(), or a feeRecipient with a malicious receive() hook * is specified, the token or fee recipients may be able to execute * another mint in the same transaction via a separate drop * contract. * This is dangerous if an implementing token does not correctly * update the minterNumMinted and currentTotalSupply values before * transferring minted tokens, as drop references these values * to enforce token limits on a per-wallet and per-stage basis. * * ERC721A tracks these values automatically, but this note and * nonReentrant modifier are left here to encourage best-practices * when referencing this contract. * * @param projectId The project id to mint. * @param minter The address to mint to. */ function mintDrop( uint256 projectId, address minter ) external virtual override nonReentrant { // Ensure the drop is allowed. _onlyAllowedDrop(msg.sender); // Extra safety check to ensure the max supply is not exceeded. if (_totalMinted(projectId) + 1 > maxSupplyForProject(projectId)) { revert MintQuantityExceedsMaxSupply( _totalMinted(projectId) + 1, maxSupplyForProject(projectId) // from ERC721LGArtLabContractMetadata.sol ); } uint256 currentProjectTokenIndex = _projectInfos[projectId] .currentTokenIndex; uint256 mintTokenId = (projectId * _TOKEN_MAX_SUPPLY_MULTIPLIER) + currentProjectTokenIndex + 1; _projectInfos[projectId].currentTokenIndex++; _projectInfos[projectId].totalMinted++; _numberMinted[projectId][minter]++; // Mint the quantity of tokens to the minter. _safeMint(minter, mintTokenId); } /** * @notice Update the public drop data for this nft contract on drop. * Only the owner can use this function. * * @param dropImpl The allowed drop contract. * @param projectIds The project id array. * @param publicDrops The public drop data array. */ function updatePublicDrops( address dropImpl, uint256[] calldata projectIds, PublicDrop[] calldata publicDrops ) external virtual { // Ensure the sender is only the owner or contract itself. _onlyOwnerOrSelf(); // Ensure the drop is allowed. _onlyAllowedDrop(dropImpl); ILGArtLabDrop(dropImpl).updatePublicDrops(projectIds, publicDrops); } /** * @notice Update the drop URI for this nft contract on drop. * Only the owner can use this function. * * @param dropImpl The allowed drop contract. * @param projectId The project id. * @param dropURI The new drop URI. */ function updateDropURI( address dropImpl, uint256 projectId, string calldata dropURI ) external virtual override { // Ensure the sender is only the owner or contract itself. _onlyOwnerOrSelf(); // Ensure the drop is allowed. _onlyAllowedDrop(dropImpl); // Update the drop URI. ILGArtLabDrop(dropImpl).updateDropURI(projectId, dropURI); } /** * @notice Update the creator payout address for this nft contract on * drop. * Only the owner can set the creator payout address. * * @param dropImpl The allowed drop contract. * @param payoutAddress The new payout address. */ function updateCreatorPayoutAddress( address dropImpl, address payoutAddress ) external { // Ensure the sender is only the owner or contract itself. _onlyOwnerOrSelf(); // Ensure the drop is allowed. _onlyAllowedDrop(dropImpl); // Update the creator payout address. ILGArtLabDrop(dropImpl).updateCreatorPayoutAddress(payoutAddress); } /** * @notice Update the allowed fee recipient for this nft contract * on drop. * Only the owner can set the allowed fee recipient. * * @param dropImpl The allowed drop contract. * @param feeRecipient The new fee recipient. * @param allowed If the fee recipient is allowed. */ function updateAllowedFeeRecipient( address dropImpl, address feeRecipient, bool allowed ) external virtual { // Ensure the sender is only the owner or contract itself. _onlyOwnerOrSelf(); // Ensure the drop is allowed. _onlyAllowedDrop(dropImpl); // Update the allowed fee recipient. ILGArtLabDrop(dropImpl).updateAllowedFeeRecipient(feeRecipient, allowed); } /** * @notice Update the allowed payers for this nft contract on drop. * Only the owner can use this function. * * @param dropImpl The allowed drop contract. * @param payer The payer to update. * @param allowed Whether the payer is allowed. */ function updatePayer( address dropImpl, address payer, bool allowed ) external virtual { // Ensure the sender is only the owner or contract itself. _onlyOwnerOrSelf(); // Ensure the drop is allowed. _onlyAllowedDrop(dropImpl); // Update the payer. ILGArtLabDrop(dropImpl).updatePayer(payer, allowed); } /** * @notice Returns a set of mint stats for the address. * This assists drop in enforcing maxSupply, * maxTotalMintableByWallet, and maxTokenSupplyForStage checks. * * @dev NOTE: Implementing contracts should always update these numbers * before transferring any tokens with _safeMint() to mitigate * consequences of malicious onERC721Received() hooks. * * @param minter The minter address. */ function getMintStats( uint256 projectId, address minter ) external view returns ( uint256 minterNumMinted, uint256 currentTotalSupply, uint256 maxSupplyForProject ) { minterNumMinted = _numberMinted[projectId][minter]; currentTotalSupply = _totalMinted(projectId); maxSupplyForProject = _maxSupplyForProjects[projectId]; } function supportsInterface( bytes4 interfaceId ) public view virtual override(IERC165, ERC721ContractMetadataCloneable) returns (bool) { return interfaceId == type(INonFungibleLGArtLabDropToken).interfaceId || interfaceId == type(ILGArtLabDropTokenContractMetadata).interfaceId || // ERC721ContractMetadata returns supportsInterface true for // EIP-2981 // ERC721A returns supportsInterface true for // ERC165, ERC721, ERC721Metadata super.supportsInterface(interfaceId); } /** * @notice Configure multiple properties at a time. * * Note: The individual configure methods should be used * to unset or reset any properties to zero, as this method * will ignore zero-value properties in the config struct. * * @param config The configuration struct. */ /** * @notice Configure multiple properties at a time. * * Note: The individual configure methods should be used * to unset or reset any properties to zero, as this method * will ignore zero-value properties in the config struct. * * @param config The configuration struct. */ function multiConfigure( MultiConfigureStruct calldata config ) external onlyOwner { if ( (config.projectIds.length != config.maxSupplies.length) || (config.projectIds.length != config.publicDrops.length) ) { revert InvalidConfigInput(); } if (config.maxSupplies.length != 0) { this.setProjectMaxSupplies(config.projectIds, config.maxSupplies); } if (bytes(config.baseURI).length != 0) { this.setBaseURI(config.baseURI); } if (bytes(config.contractURI).length != 0) { this.setContractURI(config.contractURI); } if (config.publicDrops.length != 0) { this.updatePublicDrops( config.dropImpl, config.projectIds, config.publicDrops ); } // if (bytes(config.dropURI).length != 0) { // this.updateDropURI(config.dropImpl, config.dropURI); // } if (config.creatorPayoutAddress != address(0)) { this.updateCreatorPayoutAddress( config.dropImpl, config.creatorPayoutAddress ); } if (config.royaltyReceiver != address(0) && config.royaltyFraction > 0) { RoyaltyInfo memory royaltyInfo; royaltyInfo.royaltyAddress = config.royaltyReceiver; royaltyInfo.royaltyBps = config.royaltyFraction; this.setRoyaltyInfo(royaltyInfo); } // if (config.provenanceHash != bytes32(0)) { // this.setProvenanceHash(config.provenanceHash); // } if (config.allowedFeeRecipients.length > 0) { for (uint256 i = 0; i < config.allowedFeeRecipients.length; ) { this.updateAllowedFeeRecipient( config.dropImpl, config.allowedFeeRecipients[i], true ); unchecked { ++i; } } } if (config.disallowedFeeRecipients.length > 0) { for (uint256 i = 0; i < config.disallowedFeeRecipients.length; ) { this.updateAllowedFeeRecipient( config.dropImpl, config.disallowedFeeRecipients[i], false ); unchecked { ++i; } } } if (config.allowedPayers.length > 0) { for (uint256 i = 0; i < config.allowedPayers.length; ) { this.updatePayer( config.dropImpl, config.allowedPayers[i], true ); unchecked { ++i; } } } if (config.disallowedPayers.length > 0) { for (uint256 i = 0; i < config.disallowedPayers.length; ) { this.updatePayer( config.dropImpl, config.disallowedPayers[i], false ); unchecked { ++i; } } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (proxy/Clones.sol) pragma solidity ^0.8.0; /** * @dev https://eips.ethereum.org/EIPS/eip-1167[EIP 1167] is a standard for * deploying minimal proxy contracts, also known as "clones". * * > To simply and cheaply clone contract functionality in an immutable way, this standard specifies * > a minimal bytecode implementation that delegates all calls to a known, fixed address. * * The library includes functions to deploy a proxy using either `create` (traditional deployment) or `create2` * (salted deterministic deployment). It also includes functions to predict the addresses of clones deployed using the * deterministic method. * * _Available since v3.4._ */ library Clones { /** * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`. * * This function uses the create opcode, which should never revert. */ function clone(address implementation) internal returns (address instance) { /// @solidity memory-safe-assembly assembly { // Cleans the upper 96 bits of the `implementation` word, then packs the first 3 bytes // of the `implementation` address with the bytecode before the address. mstore(0x00, or(shr(0xe8, shl(0x60, implementation)), 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000)) // Packs the remaining 17 bytes of `implementation` with the bytecode after the address. mstore(0x20, or(shl(0x78, implementation), 0x5af43d82803e903d91602b57fd5bf3)) instance := create(0, 0x09, 0x37) } require(instance != address(0), "ERC1167: create failed"); } /** * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`. * * This function uses the create2 opcode and a `salt` to deterministically deploy * the clone. Using the same `implementation` and `salt` multiple time will revert, since * the clones cannot be deployed twice at the same address. */ function cloneDeterministic(address implementation, bytes32 salt) internal returns (address instance) { /// @solidity memory-safe-assembly assembly { // Cleans the upper 96 bits of the `implementation` word, then packs the first 3 bytes // of the `implementation` address with the bytecode before the address. mstore(0x00, or(shr(0xe8, shl(0x60, implementation)), 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000)) // Packs the remaining 17 bytes of `implementation` with the bytecode after the address. mstore(0x20, or(shl(0x78, implementation), 0x5af43d82803e903d91602b57fd5bf3)) instance := create2(0, 0x09, 0x37, salt) } require(instance != address(0), "ERC1167: create2 failed"); } /** * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}. */ function predictDeterministicAddress( address implementation, bytes32 salt, address deployer ) internal pure returns (address predicted) { /// @solidity memory-safe-assembly assembly { let ptr := mload(0x40) mstore(add(ptr, 0x38), deployer) mstore(add(ptr, 0x24), 0x5af43d82803e903d91602b57fd5bf3ff) mstore(add(ptr, 0x14), implementation) mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73) mstore(add(ptr, 0x58), salt) mstore(add(ptr, 0x78), keccak256(add(ptr, 0x0c), 0x37)) predicted := keccak256(add(ptr, 0x43), 0x55) } } /** * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}. */ function predictDeterministicAddress(address implementation, bytes32 salt) internal view returns (address predicted) { return predictDeterministicAddress(implementation, salt, address(this)); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.4.22 <0.9.0; library console { address constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67); function _sendLogPayload(bytes memory payload) private view { uint256 payloadLength = payload.length; address consoleAddress = CONSOLE_ADDRESS; /// @solidity memory-safe-assembly assembly { let payloadStart := add(payload, 32) let r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0) } } function log() internal view { _sendLogPayload(abi.encodeWithSignature("log()")); } function logInt(int p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(int)", p0)); } function logUint(uint p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint)", p0)); } function logString(string memory p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(string)", p0)); } function logBool(bool p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool)", p0)); } function logAddress(address p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(address)", p0)); } function logBytes(bytes memory p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes)", p0)); } function logBytes1(bytes1 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes1)", p0)); } function logBytes2(bytes2 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes2)", p0)); } function logBytes3(bytes3 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes3)", p0)); } function logBytes4(bytes4 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes4)", p0)); } function logBytes5(bytes5 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes5)", p0)); } function logBytes6(bytes6 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes6)", p0)); } function logBytes7(bytes7 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes7)", p0)); } function logBytes8(bytes8 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes8)", p0)); } function logBytes9(bytes9 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes9)", p0)); } function logBytes10(bytes10 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes10)", p0)); } function logBytes11(bytes11 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes11)", p0)); } function logBytes12(bytes12 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes12)", p0)); } function logBytes13(bytes13 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes13)", p0)); } function logBytes14(bytes14 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes14)", p0)); } function logBytes15(bytes15 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes15)", p0)); } function logBytes16(bytes16 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes16)", p0)); } function logBytes17(bytes17 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes17)", p0)); } function logBytes18(bytes18 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes18)", p0)); } function logBytes19(bytes19 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes19)", p0)); } function logBytes20(bytes20 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes20)", p0)); } function logBytes21(bytes21 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes21)", p0)); } function logBytes22(bytes22 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes22)", p0)); } function logBytes23(bytes23 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes23)", p0)); } function logBytes24(bytes24 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes24)", p0)); } function logBytes25(bytes25 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes25)", p0)); } function logBytes26(bytes26 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes26)", p0)); } function logBytes27(bytes27 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes27)", p0)); } function logBytes28(bytes28 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes28)", p0)); } function logBytes29(bytes29 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes29)", p0)); } function logBytes30(bytes30 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes30)", p0)); } function logBytes31(bytes31 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes31)", p0)); } function logBytes32(bytes32 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes32)", p0)); } function log(uint p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint)", p0)); } function log(string memory p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(string)", p0)); } function log(bool p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool)", p0)); } function log(address p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(address)", p0)); } function log(uint p0, uint p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint)", p0, p1)); } function log(uint p0, string memory p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string)", p0, p1)); } function log(uint p0, bool p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool)", p0, p1)); } function log(uint p0, address p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address)", p0, p1)); } function log(string memory p0, uint p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint)", p0, p1)); } function log(string memory p0, string memory p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string)", p0, p1)); } function log(string memory p0, bool p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool)", p0, p1)); } function log(string memory p0, address p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address)", p0, p1)); } function log(bool p0, uint p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint)", p0, p1)); } function log(bool p0, string memory p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string)", p0, p1)); } function log(bool p0, bool p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool)", p0, p1)); } function log(bool p0, address p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address)", p0, p1)); } function log(address p0, uint p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint)", p0, p1)); } function log(address p0, string memory p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string)", p0, p1)); } function log(address p0, bool p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool)", p0, p1)); } function log(address p0, address p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address)", p0, p1)); } function log(uint p0, uint p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint)", p0, p1, p2)); } function log(uint p0, uint p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,string)", p0, p1, p2)); } function log(uint p0, uint p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool)", p0, p1, p2)); } function log(uint p0, uint p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,address)", p0, p1, p2)); } function log(uint p0, string memory p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,uint)", p0, p1, p2)); } function log(uint p0, string memory p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,string)", p0, p1, p2)); } function log(uint p0, string memory p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,bool)", p0, p1, p2)); } function log(uint p0, string memory p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,address)", p0, p1, p2)); } function log(uint p0, bool p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint)", p0, p1, p2)); } function log(uint p0, bool p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,string)", p0, p1, p2)); } function log(uint p0, bool p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool)", p0, p1, p2)); } function log(uint p0, bool p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,address)", p0, p1, p2)); } function log(uint p0, address p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,uint)", p0, p1, p2)); } function log(uint p0, address p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,string)", p0, p1, p2)); } function log(uint p0, address p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,bool)", p0, p1, p2)); } function log(uint p0, address p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,address)", p0, p1, p2)); } function log(string memory p0, uint p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,uint)", p0, p1, p2)); } function log(string memory p0, uint p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,string)", p0, p1, p2)); } function log(string memory p0, uint p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,bool)", p0, p1, p2)); } function log(string memory p0, uint p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,address)", p0, p1, p2)); } function log(string memory p0, string memory p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,uint)", p0, p1, p2)); } function log(string memory p0, string memory p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,string)", p0, p1, p2)); } function log(string memory p0, string memory p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,bool)", p0, p1, p2)); } function log(string memory p0, string memory p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,address)", p0, p1, p2)); } function log(string memory p0, bool p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint)", p0, p1, p2)); } function log(string memory p0, bool p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,string)", p0, p1, p2)); } function log(string memory p0, bool p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool)", p0, p1, p2)); } function log(string memory p0, bool p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,address)", p0, p1, p2)); } function log(string memory p0, address p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,uint)", p0, p1, p2)); } function log(string memory p0, address p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,string)", p0, p1, p2)); } function log(string memory p0, address p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,bool)", p0, p1, p2)); } function log(string memory p0, address p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,address)", p0, p1, p2)); } function log(bool p0, uint p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint)", p0, p1, p2)); } function log(bool p0, uint p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,string)", p0, p1, p2)); } function log(bool p0, uint p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool)", p0, p1, p2)); } function log(bool p0, uint p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,address)", p0, p1, p2)); } function log(bool p0, string memory p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint)", p0, p1, p2)); } function log(bool p0, string memory p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,string)", p0, p1, p2)); } function log(bool p0, string memory p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool)", p0, p1, p2)); } function log(bool p0, string memory p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,address)", p0, p1, p2)); } function log(bool p0, bool p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint)", p0, p1, p2)); } function log(bool p0, bool p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string)", p0, p1, p2)); } function log(bool p0, bool p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool)", p0, p1, p2)); } function log(bool p0, bool p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address)", p0, p1, p2)); } function log(bool p0, address p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint)", p0, p1, p2)); } function log(bool p0, address p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,string)", p0, p1, p2)); } function log(bool p0, address p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool)", p0, p1, p2)); } function log(bool p0, address p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,address)", p0, p1, p2)); } function log(address p0, uint p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,uint)", p0, p1, p2)); } function log(address p0, uint p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,string)", p0, p1, p2)); } function log(address p0, uint p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,bool)", p0, p1, p2)); } function log(address p0, uint p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,address)", p0, p1, p2)); } function log(address p0, string memory p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,uint)", p0, p1, p2)); } function log(address p0, string memory p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,string)", p0, p1, p2)); } function log(address p0, string memory p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,bool)", p0, p1, p2)); } function log(address p0, string memory p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,address)", p0, p1, p2)); } function log(address p0, bool p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint)", p0, p1, p2)); } function log(address p0, bool p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,string)", p0, p1, p2)); } function log(address p0, bool p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool)", p0, p1, p2)); } function log(address p0, bool p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,address)", p0, p1, p2)); } function log(address p0, address p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,uint)", p0, p1, p2)); } function log(address p0, address p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,string)", p0, p1, p2)); } function log(address p0, address p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,bool)", p0, p1, p2)); } function log(address p0, address p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,address)", p0, p1, p2)); } function log(uint p0, uint p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,uint)", p0, p1, p2, p3)); } function log(uint p0, uint p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,string)", p0, p1, p2, p3)); } function log(uint p0, uint p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,bool)", p0, p1, p2, p3)); } function log(uint p0, uint p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,address)", p0, p1, p2, p3)); } function log(uint p0, uint p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,uint)", p0, p1, p2, p3)); } function log(uint p0, uint p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,string)", p0, p1, p2, p3)); } function log(uint p0, uint p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,bool)", p0, p1, p2, p3)); } function log(uint p0, uint p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,address)", p0, p1, p2, p3)); } function log(uint p0, uint p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,uint)", p0, p1, p2, p3)); } function log(uint p0, uint p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,string)", p0, p1, p2, p3)); } function log(uint p0, uint p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,bool)", p0, p1, p2, p3)); } function log(uint p0, uint p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,address)", p0, p1, p2, p3)); } function log(uint p0, uint p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,uint)", p0, p1, p2, p3)); } function log(uint p0, uint p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,string)", p0, p1, p2, p3)); } function log(uint p0, uint p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,bool)", p0, p1, p2, p3)); } function log(uint p0, uint p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,address)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,uint)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,string)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,bool)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,address)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,string,uint)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,string,string)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,string,bool)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,string,address)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,uint)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,string)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,bool)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,address)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,address,uint)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,address,string)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,address,bool)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,address,address)", p0, p1, p2, p3)); } function log(uint p0, bool p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,uint)", p0, p1, p2, p3)); } function log(uint p0, bool p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,string)", p0, p1, p2, p3)); } function log(uint p0, bool p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,bool)", p0, p1, p2, p3)); } function log(uint p0, bool p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,address)", p0, p1, p2, p3)); } function log(uint p0, bool p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,uint)", p0, p1, p2, p3)); } function log(uint p0, bool p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,string)", p0, p1, p2, p3)); } function log(uint p0, bool p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,bool)", p0, p1, p2, p3)); } function log(uint p0, bool p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,address)", p0, p1, p2, p3)); } function log(uint p0, bool p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,uint)", p0, p1, p2, p3)); } function log(uint p0, bool p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,string)", p0, p1, p2, p3)); } function log(uint p0, bool p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,bool)", p0, p1, p2, p3)); } function log(uint p0, bool p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,address)", p0, p1, p2, p3)); } function log(uint p0, bool p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,uint)", p0, p1, p2, p3)); } function log(uint p0, bool p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,string)", p0, p1, p2, p3)); } function log(uint p0, bool p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,bool)", p0, p1, p2, p3)); } function log(uint p0, bool p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,address)", p0, p1, p2, p3)); } function log(uint p0, address p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,uint)", p0, p1, p2, p3)); } function log(uint p0, address p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,string)", p0, p1, p2, p3)); } function log(uint p0, address p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,bool)", p0, p1, p2, p3)); } function log(uint p0, address p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,address)", p0, p1, p2, p3)); } function log(uint p0, address p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,string,uint)", p0, p1, p2, p3)); } function log(uint p0, address p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,string,string)", p0, p1, p2, p3)); } function log(uint p0, address p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,string,bool)", p0, p1, p2, p3)); } function log(uint p0, address p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,string,address)", p0, p1, p2, p3)); } function log(uint p0, address p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,uint)", p0, p1, p2, p3)); } function log(uint p0, address p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,string)", p0, p1, p2, p3)); } function log(uint p0, address p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,bool)", p0, p1, p2, p3)); } function log(uint p0, address p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,address)", p0, p1, p2, p3)); } function log(uint p0, address p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,address,uint)", p0, p1, p2, p3)); } function log(uint p0, address p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,address,string)", p0, p1, p2, p3)); } function log(uint p0, address p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,address,bool)", p0, p1, p2, p3)); } function log(uint p0, address p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,address,address)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,uint)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,string)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,bool)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,address)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,string,uint)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,string,string)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,string,bool)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,string,address)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,uint)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,string)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,bool)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,address)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,address,uint)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,address,string)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,address,bool)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,address,address)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,uint,uint)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,uint,string)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,uint,bool)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,uint,address)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,string,uint)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,string,string)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,string,bool)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,string,address)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,uint)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,string)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,bool)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,address)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,address,uint)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,address,string)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,address,bool)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,address,address)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,uint)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,string)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,bool)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,address)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,uint)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,string)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,bool)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,address)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,uint)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,string)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,bool)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,address)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,uint)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,string)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,bool)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,address)", p0, p1, p2, p3)); } function log(string memory p0, address p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,uint,uint)", p0, p1, p2, p3)); } function log(string memory p0, address p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,uint,string)", p0, p1, p2, p3)); } function log(string memory p0, address p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,uint,bool)", p0, p1, p2, p3)); } function log(string memory p0, address p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,uint,address)", p0, p1, p2, p3)); } function log(string memory p0, address p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,string,uint)", p0, p1, p2, p3)); } function log(string memory p0, address p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,string,string)", p0, p1, p2, p3)); } function log(string memory p0, address p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,string,bool)", p0, p1, p2, p3)); } function log(string memory p0, address p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,string,address)", p0, p1, p2, p3)); } function log(string memory p0, address p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,uint)", p0, p1, p2, p3)); } function log(string memory p0, address p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,string)", p0, p1, p2, p3)); } function log(string memory p0, address p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,bool)", p0, p1, p2, p3)); } function log(string memory p0, address p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,address)", p0, p1, p2, p3)); } function log(string memory p0, address p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,address,uint)", p0, p1, p2, p3)); } function log(string memory p0, address p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,address,string)", p0, p1, p2, p3)); } function log(string memory p0, address p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,address,bool)", p0, p1, p2, p3)); } function log(string memory p0, address p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,address,address)", p0, p1, p2, p3)); } function log(bool p0, uint p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,uint)", p0, p1, p2, p3)); } function log(bool p0, uint p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,string)", p0, p1, p2, p3)); } function log(bool p0, uint p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,bool)", p0, p1, p2, p3)); } function log(bool p0, uint p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,address)", p0, p1, p2, p3)); } function log(bool p0, uint p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,uint)", p0, p1, p2, p3)); } function log(bool p0, uint p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,string)", p0, p1, p2, p3)); } function log(bool p0, uint p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,bool)", p0, p1, p2, p3)); } function log(bool p0, uint p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,address)", p0, p1, p2, p3)); } function log(bool p0, uint p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,uint)", p0, p1, p2, p3)); } function log(bool p0, uint p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,string)", p0, p1, p2, p3)); } function log(bool p0, uint p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,bool)", p0, p1, p2, p3)); } function log(bool p0, uint p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,address)", p0, p1, p2, p3)); } function log(bool p0, uint p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,uint)", p0, p1, p2, p3)); } function log(bool p0, uint p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,string)", p0, p1, p2, p3)); } function log(bool p0, uint p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,bool)", p0, p1, p2, p3)); } function log(bool p0, uint p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,address)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,uint)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,string)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,bool)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,address)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,uint)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,string)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,bool)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,address)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,uint)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,string)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,bool)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,address)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,uint)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,string)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,bool)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,address)", p0, p1, p2, p3)); } function log(bool p0, bool p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,uint)", p0, p1, p2, p3)); } function log(bool p0, bool p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,string)", p0, p1, p2, p3)); } function log(bool p0, bool p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,bool)", p0, p1, p2, p3)); } function log(bool p0, bool p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,address)", p0, p1, p2, p3)); } function log(bool p0, bool p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,uint)", p0, p1, p2, p3)); } function log(bool p0, bool p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,string)", p0, p1, p2, p3)); } function log(bool p0, bool p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,bool)", p0, p1, p2, p3)); } function log(bool p0, bool p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,address)", p0, p1, p2, p3)); } function log(bool p0, bool p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,uint)", p0, p1, p2, p3)); } function log(bool p0, bool p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,string)", p0, p1, p2, p3)); } function log(bool p0, bool p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,bool)", p0, p1, p2, p3)); } function log(bool p0, bool p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,address)", p0, p1, p2, p3)); } function log(bool p0, bool p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,uint)", p0, p1, p2, p3)); } function log(bool p0, bool p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,string)", p0, p1, p2, p3)); } function log(bool p0, bool p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,bool)", p0, p1, p2, p3)); } function log(bool p0, bool p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,address)", p0, p1, p2, p3)); } function log(bool p0, address p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,uint)", p0, p1, p2, p3)); } function log(bool p0, address p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,string)", p0, p1, p2, p3)); } function log(bool p0, address p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,bool)", p0, p1, p2, p3)); } function log(bool p0, address p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,address)", p0, p1, p2, p3)); } function log(bool p0, address p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,uint)", p0, p1, p2, p3)); } function log(bool p0, address p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,string)", p0, p1, p2, p3)); } function log(bool p0, address p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,bool)", p0, p1, p2, p3)); } function log(bool p0, address p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,address)", p0, p1, p2, p3)); } function log(bool p0, address p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,uint)", p0, p1, p2, p3)); } function log(bool p0, address p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,string)", p0, p1, p2, p3)); } function log(bool p0, address p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,bool)", p0, p1, p2, p3)); } function log(bool p0, address p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,address)", p0, p1, p2, p3)); } function log(bool p0, address p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,uint)", p0, p1, p2, p3)); } function log(bool p0, address p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,string)", p0, p1, p2, p3)); } function log(bool p0, address p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,bool)", p0, p1, p2, p3)); } function log(bool p0, address p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,address)", p0, p1, p2, p3)); } function log(address p0, uint p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,uint)", p0, p1, p2, p3)); } function log(address p0, uint p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,string)", p0, p1, p2, p3)); } function log(address p0, uint p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,bool)", p0, p1, p2, p3)); } function log(address p0, uint p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,address)", p0, p1, p2, p3)); } function log(address p0, uint p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,string,uint)", p0, p1, p2, p3)); } function log(address p0, uint p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,string,string)", p0, p1, p2, p3)); } function log(address p0, uint p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,string,bool)", p0, p1, p2, p3)); } function log(address p0, uint p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,string,address)", p0, p1, p2, p3)); } function log(address p0, uint p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,uint)", p0, p1, p2, p3)); } function log(address p0, uint p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,string)", p0, p1, p2, p3)); } function log(address p0, uint p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,bool)", p0, p1, p2, p3)); } function log(address p0, uint p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,address)", p0, p1, p2, p3)); } function log(address p0, uint p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,address,uint)", p0, p1, p2, p3)); } function log(address p0, uint p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,address,string)", p0, p1, p2, p3)); } function log(address p0, uint p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,address,bool)", p0, p1, p2, p3)); } function log(address p0, uint p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,address,address)", p0, p1, p2, p3)); } function log(address p0, string memory p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,uint,uint)", p0, p1, p2, p3)); } function log(address p0, string memory p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,uint,string)", p0, p1, p2, p3)); } function log(address p0, string memory p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,uint,bool)", p0, p1, p2, p3)); } function log(address p0, string memory p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,uint,address)", p0, p1, p2, p3)); } function log(address p0, string memory p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,string,uint)", p0, p1, p2, p3)); } function log(address p0, string memory p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,string,string)", p0, p1, p2, p3)); } function log(address p0, string memory p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,string,bool)", p0, p1, p2, p3)); } function log(address p0, string memory p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,string,address)", p0, p1, p2, p3)); } function log(address p0, string memory p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,uint)", p0, p1, p2, p3)); } function log(address p0, string memory p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,string)", p0, p1, p2, p3)); } function log(address p0, string memory p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,bool)", p0, p1, p2, p3)); } function log(address p0, string memory p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,address)", p0, p1, p2, p3)); } function log(address p0, string memory p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,address,uint)", p0, p1, p2, p3)); } function log(address p0, string memory p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,address,string)", p0, p1, p2, p3)); } function log(address p0, string memory p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,address,bool)", p0, p1, p2, p3)); } function log(address p0, string memory p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,address,address)", p0, p1, p2, p3)); } function log(address p0, bool p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,uint)", p0, p1, p2, p3)); } function log(address p0, bool p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,string)", p0, p1, p2, p3)); } function log(address p0, bool p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,bool)", p0, p1, p2, p3)); } function log(address p0, bool p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,address)", p0, p1, p2, p3)); } function log(address p0, bool p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,uint)", p0, p1, p2, p3)); } function log(address p0, bool p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,string)", p0, p1, p2, p3)); } function log(address p0, bool p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,bool)", p0, p1, p2, p3)); } function log(address p0, bool p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,address)", p0, p1, p2, p3)); } function log(address p0, bool p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,uint)", p0, p1, p2, p3)); } function log(address p0, bool p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,string)", p0, p1, p2, p3)); } function log(address p0, bool p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,bool)", p0, p1, p2, p3)); } function log(address p0, bool p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,address)", p0, p1, p2, p3)); } function log(address p0, bool p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,uint)", p0, p1, p2, p3)); } function log(address p0, bool p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,string)", p0, p1, p2, p3)); } function log(address p0, bool p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,bool)", p0, p1, p2, p3)); } function log(address p0, bool p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,address)", p0, p1, p2, p3)); } function log(address p0, address p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,uint,uint)", p0, p1, p2, p3)); } function log(address p0, address p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,uint,string)", p0, p1, p2, p3)); } function log(address p0, address p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,uint,bool)", p0, p1, p2, p3)); } function log(address p0, address p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,uint,address)", p0, p1, p2, p3)); } function log(address p0, address p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,string,uint)", p0, p1, p2, p3)); } function log(address p0, address p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,string,string)", p0, p1, p2, p3)); } function log(address p0, address p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,string,bool)", p0, p1, p2, p3)); } function log(address p0, address p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,string,address)", p0, p1, p2, p3)); } function log(address p0, address p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,uint)", p0, p1, p2, p3)); } function log(address p0, address p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,string)", p0, p1, p2, p3)); } function log(address p0, address p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,bool)", p0, p1, p2, p3)); } function log(address p0, address p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,address)", p0, p1, p2, p3)); } function log(address p0, address p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,address,uint)", p0, p1, p2, p3)); } function log(address p0, address p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,address,string)", p0, p1, p2, p3)); } function log(address p0, address p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,address,bool)", p0, p1, p2, p3)); } function log(address p0, address p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,address,address)", p0, p1, p2, p3)); } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; import { ILGArtLabDropTokenContractMetadata } from "../interfaces/ILGArtLabDropTokenContractMetadata.sol"; import { ERC721EnumerableCloneable } from "./ERC721EnumerableCloneable.sol"; import { ERC721Cloneable } from "./ERC721Cloneable.sol"; import { TwoStepOwnable } from "utility-contracts/TwoStepOwnable.sol"; import { IERC2981 } from "openzeppelin-contracts/interfaces/IERC2981.sol"; import { IERC165 } from "openzeppelin-contracts/utils/introspection/IERC165.sol"; import { ProjectInfo } from "../lib/LGArtLabDropStructs.sol"; /** * @title ERC721ContractMetadataCloneable */ contract ERC721ContractMetadataCloneable is ERC721Cloneable, ERC721EnumerableCloneable, TwoStepOwnable, ILGArtLabDropTokenContractMetadata { /// @notice Track the max supply. uint256 _maxSupply; /// @notice Track the max supply for project by project id mapping(uint256 => uint256) _maxSupplyForProjects; /// @notice Track the base URI for token metadata. string _tokenBaseURI; /// @notice Track the contract URI for contract metadata. string _contractURI; /// @notice Track the provenance hash for guaranteeing metadata order /// for random reveals. mapping(uint256 => bytes32) _provenanceHash; /// @notice Track the royalty info: address to receive royalties, and /// royalty basis points. RoyaltyInfo _royaltyInfo; mapping(uint256 => ProjectInfo) internal _projectInfos; // bytes32 public constant SECOND_ADMIN_ROLE = keccak256("SECOND_ADMIN_ROLE"); /** * @dev Reverts if the sender is not the owner or the contract itself. * This function is inlined instead of being a modifier * to save contract space from being inlined N times. */ function _onlyOwnerOrSelf() internal view { if ( _cast(msg.sender == owner()) | _cast(msg.sender == address(this)) == 0 ) { revert OnlyOwner(); } } /** * @notice Sets the base URI for the token metadata and emits an event. * * @param newBaseURI The new base URI to set. */ function setBaseURI( string calldata newBaseURI ) external override { // Ensure the sender is only the owner or contract itself. _onlyOwnerOrSelf(); // Set the new base URI. _tokenBaseURI = newBaseURI; // Emit an event with the update. // if (totalSupply() != 0) { // emit BatchMetadataUpdate(1, _nextTokenId() - 1); // } } /** * @notice Sets the contract URI for contract metadata. * * @param newContractURI The new contract URI. */ function setContractURI(string calldata newContractURI) external { // Ensure the sender is only the owner or contract itself. _onlyOwnerOrSelf(); // Set the new contract URI. _contractURI = newContractURI; // Emit an event with the update. emit ContractURIUpdated(newContractURI); } /** * @notice Emit an event notifying metadata updates for * a range of token ids, according to EIP-4906. * * @param fromTokenId The start token id. * @param toTokenId The end token id. */ function emitBatchMetadataUpdate( uint256 fromTokenId, uint256 toTokenId ) external { // Ensure the sender is only the owner or contract itself. _onlyOwnerOrSelf(); // Emit an event with the update. emit BatchMetadataUpdate(fromTokenId, toTokenId); } /** * @notice Sets the max token supply and emits an event. * * @param newMaxSupply The new max supply to set. */ function setMaxSupply(uint256 newMaxSupply) external { // Ensure the sender is only the owner or contract itself. _onlyOwnerOrSelf(); // Ensure the max supply does not exceed the maximum value of uint64. if (newMaxSupply > 2 ** 64 - 1) { revert CannotExceedMaxSupplyOfUint64(newMaxSupply); } // Set the new max supply. _maxSupply = newMaxSupply; // Emit an event with the update. emit MaxSupplyUpdated(newMaxSupply); } function setProjectMaxSupplies( uint256[] calldata projectIds, uint256[] calldata newMaxSupplies ) external { _onlyOwnerOrSelf(); for (uint8 i = 0; i < projectIds.length; i++) { this.setProjectMaxSupply(projectIds[i], newMaxSupplies[i]); } } /** * @notice Sets the max token supply and emits an event. * * @param newMaxSupply The new max supply to set. */ function setProjectMaxSupply( uint256 projectId, uint256 newMaxSupply ) external { // Ensure the sender is only the owner or contract itself. _onlyOwnerOrSelf(); // Ensure the max supply does not exceed the maximum value of uint64. if (newMaxSupply > 2 ** 64 - 1) { revert CannotExceedMaxSupplyOfUint64(newMaxSupply); } // Set the new max supply. _maxSupplyForProjects[projectId] = newMaxSupply; // Emit an event with the update. emit ProjectMaxSupplyUpdated(projectId, newMaxSupply); } function _totalMinted( uint256 projectId ) internal view virtual returns (uint256) { return _projectInfos[projectId].totalMinted; } /** * @notice Sets the provenance hash and emits an event. * * The provenance hash is used for random reveals, which * is a hash of the ordered metadata to show it has not been * modified after mint started. * * This function will revert after the first item has been minted. * * @param newProvenanceHash The new provenance hash to set. */ function setProvenanceHash( uint256 projectId, bytes32 newProvenanceHash ) external { // Ensure the sender is only the owner or contract itself. _onlyOwnerOrSelf(); // Revert if any items have been minted. if (_totalMinted(projectId) > 0) { revert ProvenanceHashCannotBeSetAfterMintStarted(); } // Keep track of the old provenance hash for emitting with the event. bytes32 oldProvenanceHash = _provenanceHash[projectId]; // Set the new provenance hash. _provenanceHash[projectId] = newProvenanceHash; // Emit an event with the update. emit ProvenanceHashUpdated(oldProvenanceHash, newProvenanceHash); } /** * @notice Sets the address and basis points for royalties. * * @param newInfo The struct to configure royalties. */ function setRoyaltyInfo(RoyaltyInfo calldata newInfo) external { // Ensure the sender is only the owner or contract itself. _onlyOwnerOrSelf(); // Revert if the new royalty address is the zero address. if (newInfo.royaltyAddress == address(0)) { revert RoyaltyAddressCannotBeZeroAddress(); } // Revert if the new basis points is greater than 10_000. if (newInfo.royaltyBps > 10_000) { revert InvalidRoyaltyBasisPoints(newInfo.royaltyBps); } // Set the new royalty info. _royaltyInfo = newInfo; // Emit an event with the updated params. emit RoyaltyInfoUpdated(newInfo.royaltyAddress, newInfo.royaltyBps); } /** * @notice Returns the base URI for token metadata. */ function baseURI( uint256 tokenId ) external view override returns (string memory) { return _baseURI(tokenId); } /** * @notice Returns the base URI for the contract */ function _baseURI( uint256 tokenId ) internal view virtual returns (string memory) { return _tokenBaseURI; } /** * @notice Returns the contract URI for contract metadata. */ function contractURI() external view override returns (string memory) { return _contractURI; } /** * @notice Returns the max token supply. */ function maxSupply() public view returns (uint256) { return _maxSupply; } function maxSupplyForProject( uint256 projectId ) public view returns (uint256) { return _maxSupplyForProjects[projectId]; } /** * @notice Returns the provenance hash. * The provenance hash is used for random reveals, which * is a hash of the ordered metadata to show it is unmodified * after mint has started. */ function provenanceHash( uint256 projectId ) external view override returns (bytes32) { return _provenanceHash[projectId]; } /** * @notice Returns the address that receives royalties. */ function royaltyAddress() external view returns (address) { return _royaltyInfo.royaltyAddress; } /** * @notice Returns the royalty basis points out of 10_000. */ function royaltyBasisPoints() external view returns (uint256) { return _royaltyInfo.royaltyBps; } /** * @notice Called with the sale price to determine how much royalty * is owed and to whom. * * @ param _tokenId The NFT asset queried for royalty information. * @param _salePrice The sale price of the NFT asset specified by * _tokenId. * * @return receiver Address of who should be sent the royalty payment. * @return royaltyAmount The royalty payment amount for _salePrice. */ function royaltyInfo( // uint256 /* _tokenId */, uint256 _salePrice ) external view returns (address receiver, uint256 royaltyAmount) { // Put the royalty info on the stack for more efficient access. RoyaltyInfo storage info = _royaltyInfo; // Set the royalty amount to the sale price times the royalty basis // points divided by 10_000. royaltyAmount = (_salePrice * info.royaltyBps) / 10_000; // Set the receiver of the royalty. receiver = info.royaltyAddress; } function royaltyInfo( uint256 /* _tokenId */, uint256 _salePrice ) external view returns (address receiver, uint256 royaltyAmount) { // Put the royalty info on the stack for more efficient access. // RoyaltyInfo storage info = _royaltyInfo[0]; RoyaltyInfo storage info = _royaltyInfo; // Set the royalty amount to the sale price times the royalty basis // points divided by 10_000. royaltyAmount = (_salePrice * info.royaltyBps) / 10_000; // Set the receiver of the royalty. receiver = info.royaltyAddress; } function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal override(ERC721Cloneable, ERC721EnumerableCloneable) { super._beforeTokenTransfer(from, to, tokenId); } function _beforeConsecutiveTokenTransfer( address, address, uint256, uint96 ) internal virtual override(ERC721Cloneable, ERC721EnumerableCloneable) { revert("ERC721Enumerable: consecutive transfers not supported"); } /** * @notice Returns whether the interface is supported. * * @param interfaceId The interface id to check against. */ function supportsInterface( bytes4 interfaceId ) public view virtual override(IERC165, ERC721Cloneable, ERC721EnumerableCloneable) returns (bool) { return interfaceId == type(IERC2981).interfaceId || interfaceId == 0x49064906 || // ERC-4906 super.supportsInterface(interfaceId); } /** * @dev Internal pure function to cast a `bool` value to a `uint256` value. * * @param b The `bool` value to cast. * * @return u The `uint256` value. */ function _cast(bool b) internal pure returns (uint256 u) { assembly { u := b } } function _tokenIdToProjectId( uint256 tokenId ) internal pure returns (uint256 projectId) { unchecked { projectId = (tokenId / 100_000); } } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; import { ILGArtLabDropTokenContractMetadata } from "./ILGArtLabDropTokenContractMetadata.sol"; import { PublicDrop } from "../lib/LGArtLabDropStructs.sol"; interface INonFungibleLGArtLabDropToken is ILGArtLabDropTokenContractMetadata { /** * @dev Revert with an error if a contract is not an allowed * drop address. */ error OnlyAllowedDrop(); /** * @dev Emit an event when allowed drop contracts are updated. */ event AllowedDropUpdated(address[] allowedDrop); /** * @notice Update the allowed drop contracts. * Only the owner can use this function. * * @param allowedDrop The allowed drop addresses. */ function updateAllowedDrop(address[] calldata allowedDrop) external; /** * @notice Mint tokens, restricted to the drop contract. * * @dev NOTE: If a token registers itself with multiple drop * contracts, the implementation of this function should guard * against reentrancy. If the implementing token uses * _safeMint(), or a feeRecipient with a malicious receive() hook * is specified, the token or fee recipients may be able to execute * another mint in the same transaction via a separate drop * contract. * This is dangerous if an implementing token does not correctly * update the minterNumMinted and currentTotalSupply values before * transferring minted tokens, as drop references these values * to enforce token limits on a per-wallet and per-stage basis. * * @param projectId The project id to mint. * @param minter The address to mint to. */ function mintDrop(uint256 projectId, address minter) external; /** * @notice Returns a set of mint stats for the address. * This assists drop in enforcing maxSupply, * maxTotalMintableByWallet, and maxTokenSupplyForStage checks. * * @dev NOTE: Implementing contracts should always update these numbers * before transferring any tokens with _safeMint() to mitigate * consequences of malicious onERC721Received() hooks. * * @param projectId The project id. * @param minter The minter address. */ function getMintStats( uint256 projectId, address minter ) external view returns ( uint256 minterNumMinted, uint256 currentTotalSupply, uint256 maxSupply ); /** * @notice Update the public drop data for this nft contract on drop. * Only the owner can use this function. * * @param dropImpl The allowed drop contract. * @param projectIds The project ids array. * @param publicDrops The public drop data array. */ function updatePublicDrops( address dropImpl, uint256[] calldata projectIds, PublicDrop[] calldata publicDrops ) external; /** * @notice Update the drop URI for this nft contract on drop. * Only the owner can use this function. * * @param dropImpl The allowed drop contract. * @param projectId The project id. * @param dropURI The new drop URI. */ function updateDropURI( address dropImpl, uint256 projectId, string calldata dropURI ) external; /** * @notice Update the creator payout address for this nft contract on * drop. * Only the owner can set the creator payout address. * * @param dropImpl The allowed drop contract. * @param payoutAddress The new payout address. */ function updateCreatorPayoutAddress( address dropImpl, address payoutAddress ) external; /** * @notice Update the allowed fee recipient for this nft contract * on drop. * * @param dropImpl The allowed drop contract. * @param feeRecipient The new fee recipient. * @param allowed Whether the fee recipient is allowed. */ function updateAllowedFeeRecipient( address dropImpl, address feeRecipient, bool allowed ) external; /** * @notice Update the allowed payers for this nft contract on drop. * Only the owner can use this function. * * @param dropImpl The allowed drop contract. * @param payer The payer to update. * @param allowed Whether the payer is allowed. */ function updatePayer( address dropImpl, address payer, bool allowed ) external; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; import { PublicDrop } from "../lib/LGArtLabDropStructs.sol"; import { LGArtLabDropErrorsAndEvents } from "../lib/LGArtLabDropErrorsAndEvents.sol"; interface ILGArtLabDrop is LGArtLabDropErrorsAndEvents { /** * @notice Mint a public drop. * * @param nftContract The nftContract * @param projectId The project id to mint * @param feeRecipient The fee recipient. * @param minterIfNotPayer The mint recipient if different than the payer. * @param tax The tax value for payment. * @param quantity The mint quantity. */ function mintPublic( address nftContract, uint256 projectId, address feeRecipient, address minterIfNotPayer, uint256 tax, uint256 quantity ) external payable; /** * @notice Emits an event to notify update of the drop URI. * * This method assume msg.sender is an nft contract and its * ERC165 interface id matches INonFungibleLGArtLabDropToken. * * Note: Be sure only authorized users can call this from * token contracts that implement INonFungibleLGArtLabDropToken. * * @param dropURI The new drop URI. */ function updateDropURI(uint256 projectId, string calldata dropURI) external; /** * @notice Updates the public drop data for the nft contract * and emits an event. * * This method assume msg.sender is an nft contract and its * ERC165 interface id matches INonFungibleLGArtLabDropToken. * * Note: Be sure only authorized users can call this from * token contracts that implement INonFungibleLGArtLabDropToken. * * @param publicDrops The public drop data. */ function updatePublicDrops( uint256[] calldata projectIds, PublicDrop[] calldata publicDrops ) external; /** * @notice Updates the creator payout address and emits an event. * * This method assume msg.sender is an nft contract and its * ERC165 interface id matches INonFungibleLGArtLabDropToken. * * Note: Be sure only authorized users can call this from * token contracts that implement INonFungibleLGArtLabDropToken. * * @param payoutAddress The creator payout address. */ function updateCreatorPayoutAddress(address payoutAddress) external; /** * @notice Updates the allowed fee recipient and emits an event. * * This method assume msg.sender is an nft contract and its * ERC165 interface id matches INonFungibleLGArtLabDropToken. * * Note: Be sure only authorized users can call this from * token contracts that implement INonFungibleLGArtLabDropToken. * * @param feeRecipient The fee recipient. * @param allowed If the fee recipient is allowed. */ function updateAllowedFeeRecipient( address feeRecipient, bool allowed ) external; /** * @notice Updates the allowed payer and emits an event. * * This method assume msg.sender is an nft contract and its * ERC165 interface id matches INonFungibleLGArtLabDropToken. * * Note: Be sure only authorized users can call this from * token contracts that implement INonFungibleLGArtLabDropToken. * * @param payer The payer to add or remove. * @param allowed Whether to add or remove the payer. */ function updatePayer(address payer, bool allowed) external; /** * @notice Returns the public drop data for the nft contract. * */ function getPublicDrop( address nftContract, uint256 projectId ) external view returns (PublicDrop memory); /** * @notice Returns the creator payout address for the nft contract. * */ function getCreatorPayoutAddress( address nftContract ) external view returns (address); /** * @notice Returns if the specified fee recipient is allowed * for the nft contract. * * @param feeRecipient The fee recipient. */ function getFeeRecipientIsAllowed( address nftContract, address feeRecipient ) external view returns (bool); /** * @notice Returns an enumeration of allowed fee recipients for an * nft contract when fee recipients are enforced * */ function getAllowedFeeRecipients( address nftContract ) external view returns (address[] memory); /** * @notice Returns the payers for the nft contract. * */ function getPayers( address nftContract ) external view returns (address[] memory); /** * @notice Returns if the specified payer is allowed * for the nft contract. * * @param payer The payer. */ function getPayerIsAllowed( address nftContract, address payer ) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; /** * @notice A struct defining public drop data. * Designed to fit efficiently in one storage slot. * * @param mintPrice The mint price per token. (Up to 1.2m * of native token, e.g. ETH, MATIC) * @param startTime The start time, ensure this is not zero. * @param endTIme The end time, ensure this is not zero. * @param maxTotalMintableByWallet Maximum total number of mints a user is * allowed. (The limit for this field is * 2^16 - 1) * @param feeBps Fee out of 10_000 basis points to be * collected. * @param restrictFeeRecipients If false, allow any fee recipient; * if true, check fee recipient is allowed. * @param paymentToken Drop payment token type enum value. * see `enum PaymentTokenType` */ struct PublicDrop { uint80 mintPrice; // 80/256 bits uint48 startTime; // 128/256 bits uint48 endTime; // 176/256 bits uint16 maxTotalMintableByWallet; // 224/256 bits uint16 feeBps; // 240/256 bits bool restrictFeeRecipients; // 248/256 bits PaymentTokenType paymentToken; // 256/256 bits } /** * @notice A struct defining token's project info * * @param totalMinted * @param maxSupply * @param currentTokenIndex */ struct ProjectInfo { uint256 totalMinted; uint256 maxSupply; uint256 currentTokenIndex; } /** * @notice A enum defining drop payment token's type */ enum PaymentTokenType { // 0: Native token. ETH on mainnet, MATIC on polygon, etc. NATIVE, // 1: Wrapped ETH WETH, // 2: USD Coin USDC, // 3: Tether USDT, // 4: DAI DAI, // 5: Custom ERC20 Token CUSTOM }
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; import { PublicDrop } from "./LGArtLabDropStructs.sol"; interface ERC721LGArtLabStructsErrorsAndEvents { /** * @notice Revert with an error if mint exceeds the max supply. */ error MintQuantityExceedsMaxSupply(uint256 total, uint256 maxSupply); /** * @notice Revert with an error if query token does not exists. */ error URIQueryForNonexistentToken(); /** * @notice Revert with an error if config inputs are incorrect. */ error InvalidConfigInput(); /** * @notice Revert with an error if the number of signers doesn't match * the length of supplied signedMintValidationParams */ error SignersMismatch(); /** * @notice An event to signify that a SeaDrop token contract was deployed. */ event DropTokenDeployed(); /** * @notice A struct to configure multiple contract options at a time. */ struct MultiConfigureStruct { address dropImpl; // collection-scope configs string baseURI; string contractURI; string dropURI; address creatorPayoutAddress; address[] allowedFeeRecipients; address[] disallowedFeeRecipients; address[] allowedPayers; address[] disallowedPayers; // drop-scope configs uint256[] maxSupplies; uint256[] projectIds; PublicDrop[] publicDrops; bytes32 provenanceHash; address royaltyReceiver; uint96 royaltyFraction; } }
// 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 v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; import { IERC2981 } from "openzeppelin-contracts/interfaces/IERC2981.sol"; interface ILGArtLabDropTokenContractMetadata is IERC2981 { /** * @notice Throw if the max supply exceeds uint64 */ error CannotExceedMaxSupplyOfUint64(uint256 newMaxSupply); /** * @dev Revert with an error when attempting to set the provenance * hash after the mint has started. */ error ProvenanceHashCannotBeSetAfterMintStarted(); /** * @dev Revert if the royalty basis points is greater than 10_000. */ error InvalidRoyaltyBasisPoints(uint256 basisPoints); /** * @dev Revert if the royalty address is being set to the zero address. */ error RoyaltyAddressCannotBeZeroAddress(); /** * @dev Emit an event for token metadata reveals/updates, * according to EIP-4906. * * @param _fromTokenId The start token id. * @param _toTokenId The end token id. */ event BatchMetadataUpdate(uint256 _fromTokenId, uint256 _toTokenId); /** * @dev Emit an event when the URI for the collection-level metadata * is updated. */ event ContractURIUpdated(string newContractURI); /** * @dev Emit an event when the max token supply is updated. */ event MaxSupplyUpdated(uint256 newMaxSupply); /** * @dev Emit an event when the project max token supply is updated. */ event ProjectMaxSupplyUpdated(uint256 projectId, uint256 newMaxSupply); /** * @dev Emit an event with the previous and new provenance hash after * being updated. */ event ProvenanceHashUpdated(bytes32 previousHash, bytes32 newHash); /** * @dev Emit an event when the royalties info is updated. */ event RoyaltyInfoUpdated(address receiver, uint256 bps); /** * @notice A struct defining royalty info for the contract. */ struct RoyaltyInfo { address royaltyAddress; uint96 royaltyBps; } /** * @notice Sets the base URI for the token metadata and emits an event. * * @param tokenURI The new base URI to set. */ function setBaseURI(string calldata tokenURI) external; /** * @notice Sets the contract URI for contract metadata. * * @param newContractURI The new contract URI. */ function setContractURI(string calldata newContractURI) external; /** * @notice Sets the max supply and emits an event. * * @param newMaxSupply The new max supply to set. */ function setMaxSupply(uint256 newMaxSupply) external; /** * @notice Sets the provenance hash and emits an event. * * The provenance hash is used for random reveals, which * is a hash of the ordered metadata to show it has not been * modified after mint started. * * This function will revert after the first item has been minted. * * @param newProvenanceHash The new provenance hash to set. */ function setProvenanceHash( uint256 projectId, bytes32 newProvenanceHash ) external; /** * @notice Sets the address and basis points for royalties. * * @param newInfo The struct to configure royalties. */ function setRoyaltyInfo(RoyaltyInfo calldata newInfo) external; /** * @notice Returns the base URI for token metadata. */ function baseURI(uint256 projectId) external view returns (string memory); /** * @notice Returns the contract URI. */ function contractURI() external view returns (string memory); /** * @notice Returns the max token supply. */ function maxSupply() external view returns (uint256); /** * @notice Returns the provenance hash. * The provenance hash is used for random reveals, which * is a hash of the ordered metadata to show it is unmodified * after mint has started. */ function provenanceHash(uint256 projectId) external view returns (bytes32); /** * @notice Returns the address that receives royalties. */ function royaltyAddress() external view returns (address); /** * @notice Returns the royalty basis points out of 10_000. */ function royaltyBasisPoints() external view returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./ERC721Cloneable.sol"; import { IERC721Enumerable } from "openzeppelin-contracts/token/ERC721/extensions/IERC721Enumerable.sol"; import "openzeppelin-contracts/utils/introspection/ERC165.sol"; /** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */ abstract contract ERC721EnumerableCloneable is ERC721Cloneable, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with all token ids, used for enumeration uint256[] private _allTokens; // Mapping from token id to position in the allTokens array mapping(uint256 => uint256) private _allTokensIndex; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721Cloneable) returns (bool) { return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721Cloneable.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require(index < ERC721EnumerableCloneable.totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and 'to' cannot be the zero address at the same time. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnumeration(from, tokenId); } if (to == address(0)) { _removeTokenFromAllTokensEnumeration(tokenId); } else if (to != from) { _addTokenToOwnerEnumeration(to, tokenId); } } /** * @dev Hook that is called before any batch token transfer. For now this is limited * to batch minting by the {ERC721Consecutive} extension. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` cannot be the zero address. * - `to` cannot be the zero address. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeConsecutiveTokenTransfer( address, address, uint256, uint96 ) internal virtual override { revert("ERC721Enumerable: consecutive transfers not supported"); } /** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */ function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = ERC721Cloneable.balanceOf(to); _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; } /** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */ function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); } /** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes). * This has O(1) time complexity, but alters the order of the _ownedTokens array. * @param from address representing the previous owner of the given token ID * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = ERC721Cloneable.balanceOf(from) - 1; uint256 tokenIndex = _ownedTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary if (tokenIndex != lastTokenIndex) { uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index } // This also deletes the contents at the last position of the array delete _ownedTokensIndex[tokenId]; delete _ownedTokens[from][lastTokenIndex]; } /** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */ function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding // an 'if' statement (like in _removeTokenFromOwnerEnumeration) uint256 lastTokenId = _allTokens[lastTokenIndex]; _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index // This also deletes the contents at the last position of the array delete _allTokensIndex[tokenId]; _allTokens.pop(); } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.2 // Creator: Chiru Labs pragma solidity ^0.8.4; import { IERC721 } from "openzeppelin-contracts/token/ERC721/IERC721.sol"; import "openzeppelin-contracts/token/ERC721/extensions/IERC721Metadata.sol"; import "openzeppelin-contracts/utils/Address.sol"; import "openzeppelin-contracts/utils/Context.sol"; import "openzeppelin-contracts/utils/Strings.sol"; import "openzeppelin-contracts/utils/introspection/ERC165.sol"; import { Initializable } from "openzeppelin-contracts-upgradeable/proxy/utils/Initializable.sol"; interface IERC721Receiver { /** * @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); } contract ERC721Cloneable is Context, ERC165, IERC721, IERC721Metadata, Initializable { using Address for address; using Strings 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 __ERC721Cloneable__init( string memory name_, string memory symbol_ ) internal onlyInitializing { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || interfaceId == 0x5b5e139f || // ERC165 interface ID for ERC721metadata 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 = ERC721Cloneable.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 = ERC721Cloneable.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); // 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); } /** * @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 = ERC721Cloneable.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook owner = ERC721Cloneable.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); } /** * @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(ERC721Cloneable.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Check that tokenId was not transferred by `_beforeTokenTransfer` hook require(ERC721Cloneable.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); } /** * @dev Approve `to` to operate on `tokenId` * * Emits an {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721Cloneable.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 IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) { return retval == IERC721Receiver.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 (single) token transfer. This includes minting and burning. * See {_beforeConsecutiveTokenTransfer}. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} /** * @dev Hook that is called after any (single) transfer of tokens. This includes minting and burning. * See {_afterConsecutiveTokenTransfer}. * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} /** * @dev Hook that is called before consecutive token transfers. * Calling conditions are similar to {_beforeTokenTransfer}. * * The default implementation include balances updates that extensions such as {ERC721Consecutive} cannot perform * directly. */ function _beforeConsecutiveTokenTransfer( address from, address to, uint256, /*first*/ uint96 size ) internal virtual { if (from != address(0)) { _balances[from] -= size; } if (to != address(0)) { _balances[to] += size; } } /** * @dev Hook that is called after consecutive token transfers. * Calling conditions are similar to {_afterTokenTransfer}. */ function _afterConsecutiveTokenTransfer( address, /*from*/ address, /*to*/ uint256, /*first*/ uint96 /*size*/ ) internal virtual {} }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.4; import {ConstructorInitializable} from "./ConstructorInitializable.sol"; /** @notice A two-step extension of Ownable, where the new owner must claim ownership of the contract after owner initiates transfer Owner can cancel the transfer at any point before the new owner claims ownership. Helpful in guarding against transferring ownership to an address that is unable to act as the Owner. */ abstract contract TwoStepOwnable is ConstructorInitializable { address private _owner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); address internal potentialOwner; event PotentialOwnerUpdated(address newPotentialAdministrator); error NewOwnerIsZeroAddress(); error NotNextOwner(); error OnlyOwner(); modifier onlyOwner() { _checkOwner(); _; } constructor() { _initialize(); } function _initialize() private onlyConstructor { _transferOwnership(msg.sender); } ///@notice Initiate ownership transfer to newPotentialOwner. Note: new owner will have to manually acceptOwnership ///@param newPotentialOwner address of potential new owner function transferOwnership(address newPotentialOwner) public virtual onlyOwner { if (newPotentialOwner == address(0)) { revert NewOwnerIsZeroAddress(); } potentialOwner = newPotentialOwner; emit PotentialOwnerUpdated(newPotentialOwner); } ///@notice Claim ownership of smart contract, after the current owner has initiated the process with transferOwnership function acceptOwnership() public virtual { address _potentialOwner = potentialOwner; if (msg.sender != _potentialOwner) { revert NotNextOwner(); } delete potentialOwner; emit PotentialOwnerUpdated(address(0)); _transferOwnership(_potentialOwner); } ///@notice cancel ownership transfer function cancelOwnershipTransfer() public virtual onlyOwner { delete potentialOwner; emit PotentialOwnerUpdated(address(0)); } function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { if (_owner != msg.sender) { revert OnlyOwner(); } } /** * @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`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165.sol"; /** * @dev Interface for the NFT Royalty Standard. * * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal * support for royalty payments across all NFT marketplaces and ecosystem participants. * * _Available since v4.5._ */ interface IERC2981 is IERC165 { /** * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of * exchange. The royalty amount is denominated and should be paid in that same unit of exchange. */ function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; import { PublicDrop, PaymentTokenType } from "./LGArtLabDropStructs.sol"; interface LGArtLabDropErrorsAndEvents { /** * @dev Revert with an error if the drop stage is not active. */ error NotActive( uint256 currentTimestamp, uint256 startTimestamp, uint256 endTimestamp ); /** * @dev Revert with an error if the mint quantity is not one. */ error MintQuantityShouldBeOne(); /** * @dev Revert with an error if the mint quantity is zero. */ error MintQuantityCannotBeZero(); /** * @dev Revert with an error if the mint quantity exceeds the max allowed * to be minted per wallet. */ error MintQuantityExceedsMaxMintedPerWallet(uint256 total, uint256 allowed); /** * @dev Revert with an error if the mint quantity exceeds the max token * supply. */ error MintQuantityExceedsMaxSupply(uint256 total, uint256 maxSupply); /** * @dev Revert with an error if the mint quantity exceeds the max token * supply for the stage. * Note: The `maxTokenSupplyForStage` for public mint is * always `type(uint).max`. */ error MintQuantityExceedsMaxTokenSupplyForStage( uint256 total, uint256 maxTokenSupplyForStage ); /** * @dev Revert if the fee recipient is the zero address. */ error FeeRecipientCannotBeZeroAddress(); /** * @dev Revert if the fee recipient is not already included. */ error FeeRecipientNotPresent(); /** * @dev Revert if the fee basis points is greater than 10_000. */ error InvalidFeeBps(uint256 feeBps); /** * @dev Revert if the tax amount is greater than paymentAmount (mintPrice - feeAmount) */ error InvalidTaxAmount(uint256 taxAmount, uint256 paymentAmount); /** * @dev */ error ArrayLengthMismatch(uint256 length1, uint256 length2); /** * @dev Revert if exceeds max drop update limit. */ error ExceedsMaxDropUpdateLimit(); /** * @dev Revert if the fee recipient is already included. */ error DuplicateFeeRecipient(); /** * @dev Revert if the fee recipient is restricted and not allowed. */ error FeeRecipientNotAllowed(); /** * @dev Revert if the creator payout address is the zero address. */ error CreatorPayoutAddressCannotBeZeroAddress(); /** * @dev Revert if the payment token address is the zero address. */ error PaymentTokenCannotBeZeroAddress(); /** * @dev Revert if the payment token balance of allowance is insufficient. */ error InsufficientPaymentTokenBalanceOrAllowance( uint256 userBalance, uint256 userAllowance, uint256 requiredAmount ); /** * @dev Revert with an error if the received payment is incorrect. */ error IncorrectPayment(uint256 got, uint256 want); /** * @dev Revert if a supplied signer address is the zero address. */ error SignerCannotBeZeroAddress(); /** * @dev Revert with an error if signer's signature is invalid. */ error InvalidSignature(address recoveredSigner); /** * @dev Revert with an error if a signer is not included in * the enumeration when removing. */ error SignerNotPresent(); /** * @dev Revert with an error if a payer is not included in * the enumeration when removing. */ error PayerNotPresent(); /** * @dev Revert with an error if a payer is already included in mapping * when adding. * Note: only applies when adding a single payer, as duplicates in * enumeration can be removed with updatePayer. */ error DuplicatePayer(); /** * @dev Revert with an error if the payer is not allowed. The minter must * pay for their own mint. */ error PayerNotAllowed(); /** * @dev Revert if a supplied payer address is the zero address. */ error PayerCannotBeZeroAddress(); /** * @dev Revert with an error if the sender does not * match the INonFungibleSeaDropToken interface. */ error OnlyINonFungibleLGArtLabDropToken(address sender); /** * @dev An event with details of a SeaDrop mint, for analytical purposes. * * @param nftContract The nft contract. * @param projectId The project id. * @param minter The mint recipient. * @param feeRecipient The fee recipient. * @param payer The address who payed for the tx. * @param quantityMinted The number of tokens minted. * @param unitMintPrice The amount paid for each token. * @param feeBps The fee out of 10_000 basis points collected. * @param dropStageIndex The drop stage index. Items minted * through mintPublic() have * dropStageIndex of 0. */ event DropMint( address indexed nftContract, uint256 indexed projectId, address indexed minter, address feeRecipient, address payer, uint256 quantityMinted, uint256 unitMintPrice, uint256 feeBps, uint256 dropStageIndex ); /** * @dev Emit an event when payment token array initialized. */ event PaymentTokenInitialized(address[6] paymentTokens); /** * @dev Emit an event when payment token updated. */ event PaymentTokenSet(PaymentTokenType paymentTokenType, address tokenAddress); /** * @dev An event with updated public drop data for an nft contract. */ event PublicDropUpdated( address indexed nftContract, PublicDrop[] publicDrops ); /** * @dev An event with updated drop URI for an nft contract. */ event DropURIUpdated(address indexed nftContract, string newDropURI); /** * @dev An event with the updated creator payout address for an nft * contract. */ event CreatorPayoutAddressUpdated( address indexed nftContract, address indexed newPayoutAddress ); /** * @dev An event with the updated allowed fee recipient for an nft * contract. */ event AllowedFeeRecipientUpdated( address indexed nftContract, address indexed feeRecipient, bool indexed allowed ); /** * @dev An event with the updated payer for an nft contract. */ event PayerUpdated( address indexed nftContract, address indexed payer, bool indexed allowed ); }
// 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 (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.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 ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @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 "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @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 Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [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://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return 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 Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(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; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; /** * @dev String operations. */ library Strings { 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 = Math.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, Math.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 pragma solidity >=0.8.4; /** * @author emo.eth * @notice Abstract smart contract that provides an onlyUninitialized modifier which only allows calling when * from within a constructor of some sort, whether directly instantiating an inherting contract, * or when delegatecalling from a proxy */ abstract contract ConstructorInitializable { error AlreadyInitialized(); modifier onlyConstructor() { if (address(this).code.length != 0) { revert AlreadyInitialized(); } _; } }
// 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 (last updated v4.7.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { 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 * 8) < value ? 1 : 0); } } }
{ "remappings": [ "ERC721A/=lib/ERC721A/contracts/", "ERC721A-Upgradeable/=lib/ERC721A-Upgradeable/contracts/", "ds-test/=lib/ds-test/src/", "forge-std/=lib/forge-std/src/", "murky/=lib/murky/src/", "openzeppelin-contracts/=lib/openzeppelin-contracts/contracts/", "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/", "operator-filter-registry/=lib/operator-filter-registry/src/", "drop/=src/", "solmate/=lib/solmate/src/", "utility-contracts/=lib/utility-contracts/src/", "create2-scripts/=lib/create2-helpers/script/", "@openzeppelin/contracts/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/", "create2-helpers/=lib/create2-helpers/", "erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/" ], "optimizer": { "enabled": true, "runs": 1000000 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "none" }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "london", "viaIR": false, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"DEFAULT_DROP","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"bytes32","name":"salt","type":"bytes32"}],"name":"createClone","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lgartlabCloneableUpgradeableImplementation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60a060405234801561001057600080fd5b50600060405161001f906100bc565b604051809103906000f08015801561003b573d6000803e3d6000fd5b5060408051600081526020810191829052631206923b60e21b9091529091506001600160a01b0382169063481a48ec906100799030602482016100c9565b600060405180830381600087803b15801561009357600080fd5b505af11580156100a7573d6000803e3d6000fd5b505050506001600160a01b031660805261014a565b61519b806106d683390190565b60808152600060808201526000602060a081840152600060a084015260c0830160c0604085015280865180835260e086019150838801925060005b818110156101295783516001600160a01b031683529284019291840191600101610104565b50506001600160a01b03959095166060949094019390935250919392505050565b60805161056b61016b60003960008181604b0152610102015261056b6000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c806349848f0d146100465780637e734c5a14610096578063b1e74b11146100a9575b600080fd5b61006d7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b61006d6100a43660046103c0565b6100c3565b61006d728ec6b9a0533e8596a6011b9ed133e0a725216f81565b6000808243406040516020016100e3929190918252602082015260400190565b60405160208183030381529060405280519060200120905060006101277f000000000000000000000000000000000000000000000000000000000000000083610218565b6040805160018082528183019092529192506000919060208083019080368337019050509050728ec6b9a0533e8596a6011b9ed133e0a725216f816000815181106101745761017461042d565b73ffffffffffffffffffffffffffffffffffffffff92831660209182029290920101526040517f481a48ec0000000000000000000000000000000000000000000000000000000081529083169063481a48ec906101db908a908a90869033906004016104c0565b600060405180830381600087803b1580156101f557600080fd5b505af1158015610209573d6000803e3d6000fd5b50939998505050505050505050565b6000763d602d80600a3d3981f3363d3d373d3d3d363d730000008360601b60e81c176000526e5af43d82803e903d91602b57fd5bf38360781b1760205281603760096000f5905073ffffffffffffffffffffffffffffffffffffffff81166102e0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f455243313136373a2063726561746532206661696c6564000000000000000000604482015260640160405180910390fd5b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f83011261032657600080fd5b813567ffffffffffffffff80821115610341576103416102e6565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715610387576103876102e6565b816040528381528660208588010111156103a057600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000806000606084860312156103d557600080fd5b833567ffffffffffffffff808211156103ed57600080fd5b6103f987838801610315565b9450602086013591508082111561040f57600080fd5b5061041c86828701610315565b925050604084013590509250925092565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000815180845260005b8181101561048257602081850181015186830182015201610466565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b6080815260006104d3608083018761045c565b6020838203818501526104e6828861045c565b8481036040860152865180825282880193509082019060005b8181101561053157845173ffffffffffffffffffffffffffffffffffffffff16835293830193918301916001016104ff565b505080935050505073ffffffffffffffffffffffffffffffffffffffff831660608301529594505050505056fea164736f6c6343000811000a60806040523480156200001157600080fd5b506200001c62000022565b620000a1565b303b15620000425760405162dc149f60e41b815260040160405180910390fd5b6200004d336200004f565b565b600b80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6150ea80620000b16000396000f3fe608060405234801561001057600080fd5b506004361061032b5760003560e01c80636352211e116101b2578063ad2f852a116100f9578063d4956b3b116100a2578063e985e9c51161007c578063e985e9c514610718578063f2fde38b14610761578063fabf596814610774578063fb9cbe22146107a957600080fd5b8063d4956b3b146106f5578063d5abeb0114610708578063e8a3d4851461071057600080fd5b8063c87b56dd116100d3578063c87b56dd146106bc578063cb743ba8146106cf578063cef6d368146106e257600080fd5b8063ad2f852a14610678578063b88d4fde14610696578063c14115c2146106a957600080fd5b80638469775d1161015b57806395d89b411161013557806395d89b411461064a578063a22cb46514610652578063a48301141461066557600080fd5b80638469775d146106065780638da5cb5b14610619578063938e3d7b1461063757600080fd5b806370a082311161018c57806370a08231146105e3578063715018a6146105f657806379ba5097146105fe57600080fd5b80636352211e146105aa57806366251b69146105bd5780636f8b44b0146105d057600080fd5b806323b872dd1161027657806342842e0e1161021f57806348a4c101116101f957806348a4c101146105715780634f6ccce71461058457806355f804b31461059757600080fd5b806342842e0e1461053857806344dae42c1461054b578063481a48ec1461055e57600080fd5b80632f745c59116102505780632f745c59146104e457806335599310146104f757806342260b5d1461050a57600080fd5b806323b872dd1461047f5780632a55205a146104925780632ccde4f6146104d157600080fd5b806317088a63116102d857806318778d0b116102b257806318778d0b14610444578063224c14111461045757806323452b9c1461047757600080fd5b806317088a63146103e057806318160ddd1461040e57806318317fba1461041657600080fd5b8063095ea7b311610309578063095ea7b3146103a55780630e0b4b94146103ba57806310b8c96c146103cd57600080fd5b806301ffc9a71461033057806306fdde0314610358578063081812fc1461036d575b600080fd5b61034361033e36600461401c565b6107bc565b60405190151581526020015b60405180910390f35b610360610864565b60405161034f91906140ae565b61038061037b3660046140c1565b6108f6565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161034f565b6103b86103b33660046140fc565b61092a565b005b6103b86103c8366004614171565b610abb565b6103b86103db366004614212565b610b5a565b6104006103ee3660046140c1565b60009081526011602052604090205490565b60405190815260200161034f565b600954610400565b610429610424366004614272565b610c20565b6040805193845260208401929092529082015260600161034f565b6103b86104523660046142a2565b610c81565b6104006104653660046140c1565b6000908152600e602052604090205490565b6103b861157c565b6103b861048d3660046142de565b6115e2565b6104a56104a036600461431f565b611683565b6040805173ffffffffffffffffffffffffffffffffffffffff909316835260208301919091520161034f565b6103606104df3660046140c1565b6116ec565b6104006104f23660046140fc565b6116f7565b6103b8610505366004614272565b6117c6565b6012547401000000000000000000000000000000000000000090046bffffffffffffffffffffffff16610400565b6103b86105463660046142de565b61193a565b6103b8610559366004614341565b611955565b6103b861056c366004614359565b611ac1565b6103b861057f36600461441c565b611d08565b6104006105923660046140c1565b611da8565b6103b86105a5366004614463565b611e66565b6103806105b83660046140c1565b611e7b565b6103b86105cb3660046144a5565b611f07565b6103b86105de3660046140c1565b611f9d565b6104006105f13660046144d3565b61201f565b6103b86120ed565b6103b8612101565b6103b861061436600461431f565b6121b8565b600b5473ffffffffffffffffffffffffffffffffffffffff16610380565b6103b8610645366004614463565b61225a565b6103606122ad565b6103b86106603660046144f0565b6122bc565b6103b861067336600461431f565b6122c7565b60125473ffffffffffffffffffffffffffffffffffffffff16610380565b6103b86106a4366004614554565b612305565b6103b86106b736600461431f565b6123ad565b6103606106ca3660046140c1565b612442565b6103b86106dd36600461441c565b612585565b6104a56106f03660046140c1565b6125f2565b6103b8610703366004614652565b61265a565b600d54610400565b61036061266c565b6103436107263660046144a5565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260066020908152604080832093909416825291909152205460ff1690565b6103b861076f3660046144d3565b61267b565b6107876107823660046140c1565b612743565b604080518251815260208084015190820152918101519082015260600161034f565b6103b86107b7366004614688565b6127a0565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167fe99f93e700000000000000000000000000000000000000000000000000000000148061084f57507fffffffff0000000000000000000000000000000000000000000000000000000082167f808a316f00000000000000000000000000000000000000000000000000000000145b8061085e575061085e82612842565b92915050565b60606001805461087390614738565b80601f016020809104026020016040519081016040528092919081815260200182805461089f90614738565b80156108ec5780601f106108c1576101008083540402835291602001916108ec565b820191906000526020600020905b8154815290600101906020018083116108cf57829003601f168201915b5050505050905090565b6000610901826128e4565b5060009081526005602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b600061093582611e7b565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036109f7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f720000000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff82161480610a205750610a208133610726565b610aac576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c00000060648201526084016109ee565b610ab6838361296f565b505050565b610ac3612a0f565b610acc84612a9f565b6040517f684be2fb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85169063684be2fb90610b22908690869086906004016147ce565b600060405180830381600087803b158015610b3c57600080fd5b505af1158015610b50573d6000803e3d6000fd5b5050505050505050565b610b62612a0f565b60005b60ff8116841115610c19573063c14115c2868660ff8516818110610b8b57610b8b6147f1565b9050602002013585858560ff16818110610ba757610ba76147f1565b905060200201356040518363ffffffff1660e01b8152600401610bd4929190918252602082015260400190565b600060405180830381600087803b158015610bee57600080fd5b505af1158015610c02573d6000803e3d6000fd5b505050508080610c119061484f565b915050610b65565b5050505050565b600082815260476020908152604080832073ffffffffffffffffffffffffffffffffffffffff851684529091528120549080610c688560009081526013602052604090205490565b6000958652600e60205260409095205492959293505050565b610c89612afe565b610c9761012082018261486e565b9050610ca761014083018361486e565b9050141580610cd45750610cbf6101608201826148d6565b9050610ccf61014083018361486e565b905014155b15610d0b576040517f55b7144600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610d1961012082018261486e565b159050610d9457306310b8c96c610d3461014084018461486e565b610d4261012086018661486e565b6040518563ffffffff1660e01b8152600401610d619493929190614988565b600060405180830381600087803b158015610d7b57600080fd5b505af1158015610d8f573d6000803e3d6000fd5b505050505b610da160208201826149ba565b159050610e0b57306355f804b3610dbb60208401846149ba565b6040518363ffffffff1660e01b8152600401610dd8929190614a1f565b600060405180830381600087803b158015610df257600080fd5b505af1158015610e06573d6000803e3d6000fd5b505050505b610e1860408201826149ba565b159050610e82573063938e3d7b610e3260408401846149ba565b6040518363ffffffff1660e01b8152600401610e4f929190614a1f565b600060405180830381600087803b158015610e6957600080fd5b505af1158015610e7d573d6000803e3d6000fd5b505050505b610e906101608201826148d6565b159050610f19573063fb9cbe22610eaa60208401846144d3565b610eb861014085018561486e565b610ec66101608701876148d6565b6040518663ffffffff1660e01b8152600401610ee6959493929190614b82565b600060405180830381600087803b158015610f0057600080fd5b505af1158015610f14573d6000803e3d6000fd5b505050505b6000610f2b60a08301608084016144d3565b73ffffffffffffffffffffffffffffffffffffffff1614610fef57306366251b69610f5960208401846144d3565b610f6960a08501608086016144d3565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff928316600482015291166024820152604401600060405180830381600087803b158015610fd657600080fd5b505af1158015610fea573d6000803e3d6000fd5b505050505b60006110036101c083016101a084016144d3565b73ffffffffffffffffffffffffffffffffffffffff1614158015611046575060006110366101e083016101c08401614beb565b6bffffffffffffffffffffffff16115b1561113e5760408051808201909152600080825260208201526110716101c083016101a084016144d3565b73ffffffffffffffffffffffffffffffffffffffff16815261109b6101e083016101c08401614beb565b6bffffffffffffffffffffffff908116602083019081526040517f44dae42c000000000000000000000000000000000000000000000000000000008152835173ffffffffffffffffffffffffffffffffffffffff1660048201529051909116602482015230906344dae42c90604401600060405180830381600087803b15801561112457600080fd5b505af1158015611138573d6000803e3d6000fd5b50505050505b600061114d60a083018361486e565b9050111561124c5760005b61116560a083018361486e565b905081101561124a57306348a4c10161118160208501856144d3565b61118e60a086018661486e565b8581811061119e5761119e6147f1565b90506020020160208101906111b391906144d3565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff92831660048201529116602482015260016044820152606401600060405180830381600087803b15801561122757600080fd5b505af115801561123b573d6000803e3d6000fd5b50505050806001019050611158565b505b600061125b60c083018361486e565b9050111561135a5760005b61127360c083018361486e565b905081101561135857306348a4c10161128f60208501856144d3565b61129c60c086018661486e565b858181106112ac576112ac6147f1565b90506020020160208101906112c191906144d3565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff92831660048201529116602482015260006044820152606401600060405180830381600087803b15801561133557600080fd5b505af1158015611349573d6000803e3d6000fd5b50505050806001019050611266565b505b600061136960e083018361486e565b905011156114685760005b61138160e083018361486e565b9050811015611466573063cb743ba861139d60208501856144d3565b6113aa60e086018661486e565b858181106113ba576113ba6147f1565b90506020020160208101906113cf91906144d3565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff92831660048201529116602482015260016044820152606401600060405180830381600087803b15801561144357600080fd5b505af1158015611457573d6000803e3d6000fd5b50505050806001019050611374565b505b600061147861010083018361486e565b905011156115795760005b61149161010083018361486e565b9050811015611577573063cb743ba86114ad60208501856144d3565b6114bb61010086018661486e565b858181106114cb576114cb6147f1565b90506020020160208101906114e091906144d3565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff92831660048201529116602482015260006044820152606401600060405180830381600087803b15801561155457600080fd5b505af1158015611568573d6000803e3d6000fd5b50505050806001019050611483565b505b50565b611584612afe565b600c80547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055604051600081527f11a3cf439fb225bfe74225716b6774765670ec1060e3796802e62139d69974da9060200160405180910390a1565b6115ec3382612b4f565b611678576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206f7220617070726f7665640000000000000000000000000000000000000060648201526084016109ee565b610ab6838383612c0f565b601280546000918291612710906116c0907401000000000000000000000000000000000000000090046bffffffffffffffffffffffff1686614c08565b6116ca9190614c1f565b905473ffffffffffffffffffffffffffffffffffffffff169590945092505050565b606061085e82612f15565b60006117028361201f565b8210611790576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201527f74206f6620626f756e647300000000000000000000000000000000000000000060648201526084016109ee565b5073ffffffffffffffffffffffffffffffffffffffff919091166000908152600760209081526040808320938352929052205490565b6117ce612fa9565b6117d733612a9f565b6000828152600e6020526040902054600083815260136020526040902054611800906001614c5a565b111561186a57600082815260136020526040902054611820906001614c5a565b6000838152600e60205260409020546040517fe12d2314000000000000000000000000000000000000000000000000000000008152600481019290925260248201526044016109ee565b600082815260136020526040812060020154908161188b620186a086614c08565b6118959190614c5a565b6118a0906001614c5a565b60008581526013602052604081206002018054929350906118c083614c6d565b909155505060008481526013602052604081208054916118df83614c6d565b9091555050600084815260476020908152604080832073ffffffffffffffffffffffffffffffffffffffff87168452909152812080549161191f83614c6d565b919050555061192e838261301c565b50506115776001601455565b610ab683838360405180602001604052806000815250612305565b61195d612a0f565b600061196c60208301836144d3565b73ffffffffffffffffffffffffffffffffffffffff16036119b9576040517f1cc0baef00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6127106119cc6040830160208401614beb565b6bffffffffffffffffffffffff161115611a33576119f06040820160208301614beb565b6040517f3cadbafb0000000000000000000000000000000000000000000000000000000081526bffffffffffffffffffffffff90911660048201526024016109ee565b806012611a408282614ca5565b507ff21fccf4d64d86d532c4e4eb86c007b6ad57a460c27d724188625e755ec6cf6d9050611a7160208301836144d3565b611a816040840160208501614beb565b6040805173ffffffffffffffffffffffffffffffffffffffff90931683526bffffffffffffffffffffffff9091166020830152015b60405180910390a150565b600054610100900460ff1615808015611ae15750600054600160ff909116105b80611afb5750303b158015611afb575060005460ff166001145b611b87576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016109ee565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558015611be557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b611c5888888080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8c018190048102820181019092528a815292508a915089908190840183828082843760009201919091525061303d92505050565b611c606130ed565b611c6a848461318c565b611c73826132fc565b6040517f5b5d2b5939aa18fe3121da7f20b8186de7da964dcf8c464e19c19331ed7d6f0c90600090a18015610b5057600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050505050505050565b611d10612a0f565b611d1983612a9f565b6040517f8e7d1e4300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301528215156024830152841690638e7d1e43906044015b600060405180830381600087803b158015611d8b57600080fd5b505af1158015611d9f573d6000803e3d6000fd5b50505050505050565b6000611db360095490565b8210611e41576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201527f7574206f6620626f756e6473000000000000000000000000000000000000000060648201526084016109ee565b60098281548110611e5457611e546147f1565b90600052602060002001549050919050565b611e6e612a0f565b600f610ab6828483614d50565b60008181526003602052604081205473ffffffffffffffffffffffffffffffffffffffff168061085e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e204944000000000000000060448201526064016109ee565b611f0f612a0f565b611f1882612a9f565b6040517f12738db800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82811660048301528316906312738db890602401600060405180830381600087803b158015611f8157600080fd5b505af1158015611f95573d6000803e3d6000fd5b505050505050565b611fa5612a0f565b67ffffffffffffffff811115611fea576040517fb43e9137000000000000000000000000000000000000000000000000000000008152600481018290526024016109ee565b600d8190556040518181527f7810bd47de260c3e9ee10061cf438099dd12256c79485f12f94dbccc981e806c90602001611ab6565b600073ffffffffffffffffffffffffffffffffffffffff82166120c4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f74206120766160448201527f6c6964206f776e6572000000000000000000000000000000000000000000000060648201526084016109ee565b5073ffffffffffffffffffffffffffffffffffffffff1660009081526004602052604090205490565b6120f5612afe565b6120ff60006132fc565b565b600c5473ffffffffffffffffffffffffffffffffffffffff16338114612153576040517fd6eb09ce00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600c80547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055604051600081527f11a3cf439fb225bfe74225716b6774765670ec1060e3796802e62139d69974da9060200160405180910390a1611579816132fc565b6121c0612a0f565b60008281526013602052604090205415612206576040517fe03264af00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000828152601160209081526040918290208054908490558251818152918201849052917f7c22004198bf87da0f0dab623c72e66ca1200f4454aa3b9ca30f436275428b7c910160405180910390a1505050565b612262612a0f565b601061226f828483614d50565b507f905d981207a7d0b6c62cc46ab0be2a076d0298e4a86d0ab79882dbd01ac3737882826040516122a1929190614a1f565b60405180910390a15050565b60606002805461087390614738565b611577338383613373565b6122cf612a0f565b60408051838152602081018390527f6bd5c950a8d8df17f772f5af37cb3655737899cbf903264b9795592da439661c91016122a1565b61230f3383612b4f565b61239b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206f7220617070726f7665640000000000000000000000000000000000000060648201526084016109ee565b6123a7848484846134a0565b50505050565b6123b5612a0f565b67ffffffffffffffff8111156123fa576040517fb43e9137000000000000000000000000000000000000000000000000000000008152600481018290526024016109ee565b6000828152600e602090815260409182902083905581518481529081018390527fdc5e99d9657bf1ebde1615249c636594f91f814c726697734159d63e3805658591016122a1565b60008181526003602052604090205460609073ffffffffffffffffffffffffffffffffffffffff166124a0576040517fa14c4b5000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006124ab83612f15565b905080516000036124cc575050604080516020810190915260008152919050565b6040805180820190915260018082527f2f0000000000000000000000000000000000000000000000000000000000000060209092018290528251839161251191614e6a565b81518110612521576125216147f1565b01602001517fff0000000000000000000000000000000000000000000000000000000000000016146125535792915050565b8061255d84613543565b60405160200161256e929190614e7d565b604051602081830303815290604052915050919050565b61258d612a0f565b61259683612a9f565b6040517f7f2a5cca00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301528215156024830152841690637f2a5cca90604401611d71565b6012805460009182916127109061262f907401000000000000000000000000000000000000000090046bffffffffffffffffffffffff1686614c08565b6126399190614c1f565b905473ffffffffffffffffffffffffffffffffffffffff1694909350915050565b612662612afe565b611577828261318c565b60606010805461087390614738565b612683612afe565b73ffffffffffffffffffffffffffffffffffffffff81166126d0576040517f7448fbae00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600c80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527f11a3cf439fb225bfe74225716b6774765670ec1060e3796802e62139d69974da90602001611ab6565b61276760405180606001604052806000815260200160008152602001600081525090565b50600090815260136020908152604091829020825160608101845281548152600182015492810192909252600201549181019190915290565b6127a8612a0f565b6127b185612a9f565b6040517f1953dc8e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff861690631953dc8e90612809908790879087908790600401614eac565b600060405180830381600087803b15801561282357600080fd5b505af1158015612837573d6000803e3d6000fd5b505050505050505050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f2a55205a0000000000000000000000000000000000000000000000000000000014806128d557507f49064906000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b8061085e575061085e826135a5565b60008181526003602052604090205473ffffffffffffffffffffffffffffffffffffffff16611579576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e204944000000000000000060448201526064016109ee565b600081815260056020526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff841690811790915581906129c982611e7b565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b303314612a65612a34600b5473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161490565b176000036120ff576040517f5fc483c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff811660009081526046602052604090205460ff16611579576040517f66b6ce0d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600b5473ffffffffffffffffffffffffffffffffffffffff1633146120ff576040517f5fc483c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080612b5b83611e7b565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480612bc9575073ffffffffffffffffffffffffffffffffffffffff80821660009081526006602090815260408083209388168352929052205460ff165b80612c0757508373ffffffffffffffffffffffffffffffffffffffff16612bef846108f6565b73ffffffffffffffffffffffffffffffffffffffff16145b949350505050565b8273ffffffffffffffffffffffffffffffffffffffff16612c2f82611e7b565b73ffffffffffffffffffffffffffffffffffffffff1614612cd2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e657200000000000000000000000000000000000000000000000000000060648201526084016109ee565b73ffffffffffffffffffffffffffffffffffffffff8216612d74576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f726573730000000000000000000000000000000000000000000000000000000060648201526084016109ee565b612d7f8383836135fb565b8273ffffffffffffffffffffffffffffffffffffffff16612d9f82611e7b565b73ffffffffffffffffffffffffffffffffffffffff1614612e42576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e657200000000000000000000000000000000000000000000000000000060648201526084016109ee565b600081815260056020908152604080832080547fffffffffffffffffffffffff000000000000000000000000000000000000000090811690915573ffffffffffffffffffffffffffffffffffffffff8781168086526004855283862080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01905590871680865283862080546001019055868652600390945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6060600f8054612f2490614738565b80601f0160208091040260200160405190810160405280929190818152602001828054612f5090614738565b8015612f9d5780601f10612f7257610100808354040283529160200191612f9d565b820191906000526020600020905b815481529060010190602001808311612f8057829003601f168201915b50505050509050919050565b600260145403613015576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109ee565b6002601455565b611577828260405180602001604052806000815250613606565b6001601455565b600054610100900460ff166130d4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016109ee565b60016130e08382614ed3565b506002610ab68282614ed3565b600054610100900460ff16613184576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016109ee565b6120ff6136a9565b6048548160005b8281101561321b57600060466000604884815481106131b4576131b46147f1565b60009182526020808320919091015473ffffffffffffffffffffffffffffffffffffffff168352820192909252604001902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055600101613193565b5060005b818110156132af5760016046600087878581811061323f5761323f6147f1565b905060200201602081019061325491906144d3565b73ffffffffffffffffffffffffffffffffffffffff168152602081019190915260400160002080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001691151591909117905560010161321f565b506132bc60488585613f51565b507f4f294c48a4c4481870fc7c60c671fcf43bc61e1adbddea40c56ce275ebb2325784846040516132ee929190614fed565b60405180910390a150505050565b600b805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603613408576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016109ee565b73ffffffffffffffffffffffffffffffffffffffff83811660008181526006602090815260408083209487168084529482529182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6134ab848484612c0f565b6134b784848484613740565b6123a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e746572000000000000000000000000000060648201526084016109ee565b606060a06040510180604052602081039150506000815280825b600183039250600a81066030018353600a90048061355d57508190037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909101908152919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f780e9d6300000000000000000000000000000000000000000000000000000000148061085e575061085e82613933565b610ab6838383613a62565b6136108383613b68565b61361d6000848484613740565b610ab6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e746572000000000000000000000000000060648201526084016109ee565b600054610100900460ff16613036576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016109ee565b600073ffffffffffffffffffffffffffffffffffffffff84163b15613928576040517f150b7a0200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85169063150b7a02906137b7903390899088908890600401615048565b6020604051808303816000875af1925050508015613810575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261380d91810190615091565b60015b6138dd573d80801561383e576040519150601f19603f3d011682016040523d82523d6000602084013e613843565b606091505b5080516000036138d5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e746572000000000000000000000000000060648201526084016109ee565b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a0200000000000000000000000000000000000000000000000000000000149050612c07565b506001949350505050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd0000000000000000000000000000000000000000000000000000000014806139c657507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80613a1257507f5b5e139f000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b8061085e57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000083161461085e565b73ffffffffffffffffffffffffffffffffffffffff8316613aca57613ac581600980546000838152600a60205260408120829055600182018355919091527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af0155565b613b07565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614613b0757613b078382613d9a565b73ffffffffffffffffffffffffffffffffffffffff8216613b2b57610ab681613e51565b8273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614610ab657610ab68282613f00565b73ffffffffffffffffffffffffffffffffffffffff8216613be5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016109ee565b60008181526003602052604090205473ffffffffffffffffffffffffffffffffffffffff1615613c71576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016109ee565b613c7d600083836135fb565b60008181526003602052604090205473ffffffffffffffffffffffffffffffffffffffff1615613d09576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016109ee565b73ffffffffffffffffffffffffffffffffffffffff8216600081815260046020908152604080832080546001019055848352600390915280822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4611577565b60006001613da78461201f565b613db19190614e6a565b600083815260086020526040902054909150808214613e115773ffffffffffffffffffffffffffffffffffffffff841660009081526007602090815260408083208584528252808320548484528184208190558352600890915290208190555b50600091825260086020908152604080842084905573ffffffffffffffffffffffffffffffffffffffff9094168352600781528383209183525290812055565b600954600090613e6390600190614e6a565b6000838152600a602052604081205460098054939450909284908110613e8b57613e8b6147f1565b906000526020600020015490508060098381548110613eac57613eac6147f1565b6000918252602080832090910192909255828152600a90915260408082208490558582528120556009805480613ee457613ee46150ae565b6001900381819060005260206000200160009055905550505050565b6000613f0b8361201f565b73ffffffffffffffffffffffffffffffffffffffff9093166000908152600760209081526040808320868452825280832085905593825260089052919091209190915550565b828054828255906000526020600020908101928215613fc9579160200282015b82811115613fc95781547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff843516178255602090920191600190910190613f71565b50613fd5929150613fd9565b5090565b5b80821115613fd55760008155600101613fda565b7fffffffff000000000000000000000000000000000000000000000000000000008116811461157957600080fd5b60006020828403121561402e57600080fd5b813561403981613fee565b9392505050565b60005b8381101561405b578181015183820152602001614043565b50506000910152565b6000815180845261407c816020860160208601614040565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006140396020830184614064565b6000602082840312156140d357600080fd5b5035919050565b73ffffffffffffffffffffffffffffffffffffffff8116811461157957600080fd5b6000806040838503121561410f57600080fd5b823561411a816140da565b946020939093013593505050565b60008083601f84011261413a57600080fd5b50813567ffffffffffffffff81111561415257600080fd5b60208301915083602082850101111561416a57600080fd5b9250929050565b6000806000806060858703121561418757600080fd5b8435614192816140da565b935060208501359250604085013567ffffffffffffffff8111156141b557600080fd5b6141c187828801614128565b95989497509550505050565b60008083601f8401126141df57600080fd5b50813567ffffffffffffffff8111156141f757600080fd5b6020830191508360208260051b850101111561416a57600080fd5b6000806000806040858703121561422857600080fd5b843567ffffffffffffffff8082111561424057600080fd5b61424c888389016141cd565b9096509450602087013591508082111561426557600080fd5b506141c1878288016141cd565b6000806040838503121561428557600080fd5b823591506020830135614297816140da565b809150509250929050565b6000602082840312156142b457600080fd5b813567ffffffffffffffff8111156142cb57600080fd5b82016101e0818503121561403957600080fd5b6000806000606084860312156142f357600080fd5b83356142fe816140da565b9250602084013561430e816140da565b929592945050506040919091013590565b6000806040838503121561433257600080fd5b50508035926020909101359150565b60006040828403121561435357600080fd5b50919050565b60008060008060008060006080888a03121561437457600080fd5b873567ffffffffffffffff8082111561438c57600080fd5b6143988b838c01614128565b909950975060208a01359150808211156143b157600080fd5b6143bd8b838c01614128565b909750955060408a01359150808211156143d657600080fd5b506143e38a828b016141cd565b90945092505060608801356143f7816140da565b8091505092959891949750929550565b8035801515811461441757600080fd5b919050565b60008060006060848603121561443157600080fd5b833561443c816140da565b9250602084013561444c816140da565b915061445a60408501614407565b90509250925092565b6000806020838503121561447657600080fd5b823567ffffffffffffffff81111561448d57600080fd5b61449985828601614128565b90969095509350505050565b600080604083850312156144b857600080fd5b82356144c3816140da565b91506020830135614297816140da565b6000602082840312156144e557600080fd5b8135614039816140da565b6000806040838503121561450357600080fd5b823561450e816140da565b915061451c60208401614407565b90509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000806000806080858703121561456a57600080fd5b8435614575816140da565b93506020850135614585816140da565b925060408501359150606085013567ffffffffffffffff808211156145a957600080fd5b818701915087601f8301126145bd57600080fd5b8135818111156145cf576145cf614525565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190838211818310171561461557614615614525565b816040528281528a602084870101111561462e57600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b6000806020838503121561466557600080fd5b823567ffffffffffffffff81111561467c57600080fd5b614499858286016141cd565b6000806000806000606086880312156146a057600080fd5b85356146ab816140da565b9450602086013567ffffffffffffffff808211156146c857600080fd5b6146d489838a016141cd565b909650945060408801359150808211156146ed57600080fd5b818801915088601f83011261470157600080fd5b81358181111561471057600080fd5b89602060e08302850101111561472557600080fd5b9699959850939650602001949392505050565b600181811c9082168061474c57607f821691505b602082108103614353577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b8381526040602082015260006147e8604083018486614785565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600060ff821660ff810361486557614865614820565b60010192915050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18436030181126148a357600080fd5b83018035915067ffffffffffffffff8211156148be57600080fd5b6020019150600581901b360382131561416a57600080fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261490b57600080fd5b83018035915067ffffffffffffffff82111561492657600080fd5b602001915060e08102360382131561416a57600080fd5b81835260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83111561496f57600080fd5b8260051b80836020870137939093016020019392505050565b60408152600061499c60408301868861493d565b82810360208401526149af81858761493d565b979650505050505050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18436030181126149ef57600080fd5b83018035915067ffffffffffffffff821115614a0a57600080fd5b60200191503681900382131561416a57600080fd5b602081526000612c07602083018486614785565b803565ffffffffffff8116811461441757600080fd5b803561ffff8116811461441757600080fd5b80356006811061441757600080fd5b60068110614aa1577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9052565b818352600060208085019450826000805b86811015614b7657823569ffffffffffffffffffff8116808214614ad8578384fd5b89525065ffffffffffff614aed848601614a33565b16848901526040614aff818501614a33565b65ffffffffffff16908901526060614b18848201614a49565b61ffff16908901526080614b2d848201614a49565b61ffff169089015260a0614b42848201614407565b15159089015260c0614b55848201614a5b565b614b61828b0182614a6a565b505060e0978801979290920191600101614ab6565b50959695505050505050565b73ffffffffffffffffffffffffffffffffffffffff86168152606060208201526000614bb260608301868861493d565b8281036040840152614bc5818587614aa5565b98975050505050505050565b6bffffffffffffffffffffffff8116811461157957600080fd5b600060208284031215614bfd57600080fd5b813561403981614bd1565b808202811582820484141761085e5761085e614820565b600082614c55577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b8082018082111561085e5761085e614820565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203614c9e57614c9e614820565b5060010190565b8135614cb0816140da565b73ffffffffffffffffffffffffffffffffffffffff811690507fffffffffffffffffffffffff000000000000000000000000000000000000000081818454161783556020840135614d0081614bd1565b60a01b1617905550565b601f821115610ab657600081815260208120601f850160051c81016020861015614d315750805b601f850160051c820191505b81811015611f9557828155600101614d3d565b67ffffffffffffffff831115614d6857614d68614525565b614d7c83614d768354614738565b83614d0a565b6000601f841160018114614dce5760008515614d985750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b178355610c19565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b82811015614e1d5786850135825560209485019460019092019101614dfd565b5086821015614e58577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555050505050565b8181038181111561085e5761085e614820565b60008351614e8f818460208801614040565b835190830190614ea3818360208801614040565b01949350505050565b604081526000614ec060408301868861493d565b82810360208401526149af818587614aa5565b815167ffffffffffffffff811115614eed57614eed614525565b614f0181614efb8454614738565b84614d0a565b602080601f831160018114614f545760008415614f1e5750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555611f95565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b82811015614fa157888601518255948401946001909101908401614f82565b5085821015614fdd57878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b60208082528181018390526000908460408401835b8681101561503d578235615015816140da565b73ffffffffffffffffffffffffffffffffffffffff1682529183019190830190600101615002565b509695505050505050565b600073ffffffffffffffffffffffffffffffffffffffff8087168352808616602084015250836040830152608060608301526150876080830184614064565b9695505050505050565b6000602082840312156150a357600080fd5b815161403981613fee565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea164736f6c6343000811000a
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100415760003560e01c806349848f0d146100465780637e734c5a14610096578063b1e74b11146100a9575b600080fd5b61006d7f000000000000000000000000fadfa987b5bdf4b14fbcd0b909eea6b66b594a8581565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b61006d6100a43660046103c0565b6100c3565b61006d728ec6b9a0533e8596a6011b9ed133e0a725216f81565b6000808243406040516020016100e3929190918252602082015260400190565b60405160208183030381529060405280519060200120905060006101277f000000000000000000000000fadfa987b5bdf4b14fbcd0b909eea6b66b594a8583610218565b6040805160018082528183019092529192506000919060208083019080368337019050509050728ec6b9a0533e8596a6011b9ed133e0a725216f816000815181106101745761017461042d565b73ffffffffffffffffffffffffffffffffffffffff92831660209182029290920101526040517f481a48ec0000000000000000000000000000000000000000000000000000000081529083169063481a48ec906101db908a908a90869033906004016104c0565b600060405180830381600087803b1580156101f557600080fd5b505af1158015610209573d6000803e3d6000fd5b50939998505050505050505050565b6000763d602d80600a3d3981f3363d3d373d3d3d363d730000008360601b60e81c176000526e5af43d82803e903d91602b57fd5bf38360781b1760205281603760096000f5905073ffffffffffffffffffffffffffffffffffffffff81166102e0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f455243313136373a2063726561746532206661696c6564000000000000000000604482015260640160405180910390fd5b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f83011261032657600080fd5b813567ffffffffffffffff80821115610341576103416102e6565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715610387576103876102e6565b816040528381528660208588010111156103a057600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000806000606084860312156103d557600080fd5b833567ffffffffffffffff808211156103ed57600080fd5b6103f987838801610315565b9450602086013591508082111561040f57600080fd5b5061041c86828701610315565b925050604084013590509250925092565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000815180845260005b8181101561048257602081850181015186830182015201610466565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b6080815260006104d3608083018761045c565b6020838203818501526104e6828861045c565b8481036040860152865180825282880193509082019060005b8181101561053157845173ffffffffffffffffffffffffffffffffffffffff16835293830193918301916001016104ff565b505080935050505073ffffffffffffffffffffffffffffffffffffffff831660608301529594505050505056fea164736f6c6343000811000a
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
[ 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.