Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0.01069 ETH
Eth Value
$39.74 (@ $3,717.67/ETH)Token Holdings
More Info
Private Name Tags
ContractCreator
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
0xcbd5972e76ce3c9ec7ee7ed969485d2b3e6571b1e29536f7c31f537d770b8b66 | Mint | (pending) | 6 hrs ago | IN | 0.0005 ETH | (Pending) | |||
0x3bec6a995b64f87f5d7bdd618f9dc618a6f093dbb205f84b992f2a3422927f1a | Mint | (pending) | 7 hrs ago | IN | 0.0005 ETH | (Pending) | |||
0xed5d17f8379b6e3ba61e48dd3cfc235e18b90cac0ce9f88a60984d5cfca9d296 | Mint | (pending) | 18 hrs ago | IN | 0.0005 ETH | (Pending) | |||
Mint | 21303271 | 1 hr ago | IN | 0.0974 ETH | 0.0020278 | ||||
Mint | 21289660 | 47 hrs ago | IN | 0.0115 ETH | 0.00072672 | ||||
Mint | 21289652 | 47 hrs ago | IN | 0.0115 ETH | 0.00079203 | ||||
Mint | 21289644 | 47 hrs ago | IN | 0.0115 ETH | 0.00074483 | ||||
Mint | 21289640 | 47 hrs ago | IN | 0.0115 ETH | 0.00074434 | ||||
Mint | 21287959 | 2 days ago | IN | 0.0115 ETH | 0.00163869 | ||||
Update Claim | 21287712 | 2 days ago | IN | 0 ETH | 0.00076214 | ||||
Update Claim | 21287704 | 2 days ago | IN | 0 ETH | 0.00072454 | ||||
Update Claim | 21287691 | 2 days ago | IN | 0 ETH | 0.00070105 | ||||
Update Claim | 21287679 | 2 days ago | IN | 0 ETH | 0.00071899 | ||||
Update Claim | 21287673 | 2 days ago | IN | 0 ETH | 0.00072112 | ||||
Update Claim | 21287666 | 2 days ago | IN | 0 ETH | 0.00070897 | ||||
Mint Batch | 21263033 | 5 days ago | IN | 0.051 ETH | 0.0013808 | ||||
Airdrop | 21252210 | 7 days ago | IN | 0 ETH | 0.0024011 | ||||
Mint | 21217911 | 11 days ago | IN | 0.0255 ETH | 0.00184528 | ||||
Mint | 21217687 | 12 days ago | IN | 0.0255 ETH | 0.00187361 | ||||
Update Claim | 21143978 | 22 days ago | IN | 0 ETH | 0.00183637 | ||||
Update Claim | 21143974 | 22 days ago | IN | 0 ETH | 0.00194578 | ||||
Update Claim | 21143970 | 22 days ago | IN | 0 ETH | 0.00192837 | ||||
Update Claim | 21143966 | 22 days ago | IN | 0 ETH | 0.001876 | ||||
Update Claim | 21143961 | 22 days ago | IN | 0 ETH | 0.0016126 | ||||
Update Claim | 21143957 | 22 days ago | IN | 0 ETH | 0.00166153 |
Advanced mode: Intended for advanced users or developers and will display all Internal Transactions including zero value transfers. Name tag integration is not available in advanced view.
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block | From | To | ||||
---|---|---|---|---|---|---|---|
21303271 | 1 hr ago | 0 ETH | |||||
21303271 | 1 hr ago | 0.0969 ETH | |||||
21289660 | 47 hrs ago | 0 ETH | |||||
21289660 | 47 hrs ago | 0.011 ETH | |||||
21289652 | 47 hrs ago | 0 ETH | |||||
21289652 | 47 hrs ago | 0.011 ETH | |||||
21289644 | 47 hrs ago | 0 ETH | |||||
21289644 | 47 hrs ago | 0.011 ETH | |||||
21289640 | 47 hrs ago | 0 ETH | |||||
21289640 | 47 hrs ago | 0.011 ETH | |||||
21287959 | 2 days ago | 0 ETH | |||||
21287959 | 2 days ago | 0.011 ETH | |||||
21287712 | 2 days ago | 0 ETH | |||||
21287704 | 2 days ago | 0 ETH | |||||
21287691 | 2 days ago | 0 ETH | |||||
21287679 | 2 days ago | 0 ETH | |||||
21287673 | 2 days ago | 0 ETH | |||||
21287666 | 2 days ago | 0 ETH | |||||
21263033 | 5 days ago | 0 ETH | |||||
21263033 | 5 days ago | 0.05 ETH | |||||
21252210 | 7 days ago | 0 ETH | |||||
21252210 | 7 days ago | 0 ETH | |||||
21217911 | 11 days ago | 0 ETH | |||||
21217911 | 11 days ago | 0.025 ETH | |||||
21217687 | 12 days ago | 0 ETH |
Loading...
Loading
Contract Name:
ERC721LazyPayableClaim
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 1000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@manifoldxyz/creator-core-solidity/contracts/core/IERC721CreatorCore.sol"; import "@manifoldxyz/creator-core-solidity/contracts/extensions/ICreatorExtensionTokenURI.sol"; import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; import "./LazyPayableClaim.sol"; import "./IERC721LazyPayableClaim.sol"; import "../../libraries/IERC721CreatorCoreVersion.sol"; /** * @title Lazy Payable Claim * @author manifold.xyz * @notice Lazy payable claim with optional whitelist ERC721 tokens */ contract ERC721LazyPayableClaim is IERC165, IERC721LazyPayableClaim, ICreatorExtensionTokenURI, LazyPayableClaim { using Strings for uint256; // stores mapping from contractAddress/instanceId to the claim it represents // { contractAddress => { instanceId => Claim } } mapping(address => mapping(uint256 => Claim)) private _claims; struct TokenClaim { uint224 instanceId; uint32 mintOrder; } // NOTE: Only used for creatorContract versions < 3 // stores which tokenId corresponds to which instanceId, used to generate token uris // { contractAddress => { tokenId => TokenClaim } } mapping(address => mapping(uint256 => TokenClaim)) private _tokenClaims; function supportsInterface(bytes4 interfaceId) public view virtual override(AdminControl, IERC165) returns (bool) { return interfaceId == type(IERC721LazyPayableClaim).interfaceId || interfaceId == type(ILazyPayableClaim).interfaceId || interfaceId == type(ICreatorExtensionTokenURI).interfaceId || interfaceId == type(IAdminControl).interfaceId || interfaceId == type(IERC165).interfaceId; } constructor(address initialOwner, address delegationRegistry) LazyPayableClaim(initialOwner, delegationRegistry) {} /** * See {IERC721LazyClaim-initializeClaim}. */ function initializeClaim( address creatorContractAddress, uint256 instanceId, ClaimParameters calldata claimParameters ) external override creatorAdminRequired(creatorContractAddress) { // Max uint56 for instanceId require(instanceId > 0 && instanceId <= MAX_UINT_56, "Invalid instanceId"); // Revert if claim at instanceId already exists require(_claims[creatorContractAddress][instanceId].storageProtocol == StorageProtocol.INVALID, "Claim already initialized"); // Sanity checks require(claimParameters.storageProtocol != StorageProtocol.INVALID, "Cannot initialize with invalid storage protocol"); require(claimParameters.endDate == 0 || claimParameters.startDate < claimParameters.endDate, "Cannot have startDate greater than or equal to endDate"); require(claimParameters.merkleRoot == "" || claimParameters.walletMax == 0, "Cannot provide both walletMax and merkleRoot"); uint8 creatorContractVersion; try IERC721CreatorCoreVersion(creatorContractAddress).VERSION() returns(uint256 version) { require(version <= 255, "Unsupported contract version"); creatorContractVersion = uint8(version); } catch {} // Create the claim _claims[creatorContractAddress][instanceId] = Claim({ total: 0, totalMax: claimParameters.totalMax, walletMax: claimParameters.walletMax, startDate: claimParameters.startDate, endDate: claimParameters.endDate, storageProtocol: claimParameters.storageProtocol, contractVersion: creatorContractVersion, identical: claimParameters.identical, merkleRoot: claimParameters.merkleRoot, location: claimParameters.location, cost: claimParameters.cost, paymentReceiver: claimParameters.paymentReceiver, erc20: claimParameters.erc20 }); emit ClaimInitialized(creatorContractAddress, instanceId, msg.sender); } /** * See {IERC721LazyClaim-udpateClaim}. */ function updateClaim( address creatorContractAddress, uint256 instanceId, ClaimParameters memory claimParameters ) external override creatorAdminRequired(creatorContractAddress) { // Sanity checks Claim memory claim = _claims[creatorContractAddress][instanceId]; require(claim.storageProtocol != StorageProtocol.INVALID, "Claim not initialized"); require(claimParameters.storageProtocol != StorageProtocol.INVALID, "Cannot set invalid storage protocol"); require(claimParameters.endDate == 0 || claimParameters.startDate < claimParameters.endDate, "Cannot have startDate greater than or equal to endDate"); require(claimParameters.erc20 == claim.erc20, "Cannot change payment token"); if (claimParameters.totalMax != 0 && claim.total > claimParameters.totalMax) { claimParameters.totalMax = claim.total; } // Overwrite the existing claim _claims[creatorContractAddress][instanceId] = Claim({ total: claim.total, totalMax: claimParameters.totalMax, walletMax: claimParameters.walletMax, startDate: claimParameters.startDate, endDate: claimParameters.endDate, storageProtocol: claimParameters.storageProtocol, contractVersion: claim.contractVersion, identical: claimParameters.identical, merkleRoot: claimParameters.merkleRoot, location: claimParameters.location, cost: claimParameters.cost, paymentReceiver: claimParameters.paymentReceiver, erc20: claim.erc20 }); emit ClaimUpdated(creatorContractAddress, instanceId); } /** * See {IERC721LazyClaim-updateTokenURIParams}. */ function updateTokenURIParams( address creatorContractAddress, uint256 instanceId, StorageProtocol storageProtocol, bool identical, string calldata location ) external override creatorAdminRequired(creatorContractAddress) { Claim storage claim = _claims[creatorContractAddress][instanceId]; require(_claims[creatorContractAddress][instanceId].storageProtocol != StorageProtocol.INVALID, "Claim not initialized"); require(storageProtocol != StorageProtocol.INVALID, "Cannot set invalid storage protocol"); claim.storageProtocol = storageProtocol; claim.location = location; claim.identical = identical; emit ClaimUpdated(creatorContractAddress, instanceId); } /** * See {IERC1155LazyClaim-extendTokenURI}. */ function extendTokenURI( address creatorContractAddress, uint256 instanceId, string calldata locationChunk ) external override creatorAdminRequired(creatorContractAddress) { Claim storage claim = _claims[creatorContractAddress][instanceId]; require(claim.storageProtocol == StorageProtocol.NONE && claim.identical, "Invalid storage protocol"); claim.location = string(abi.encodePacked(claim.location, locationChunk)); emit ClaimUpdated(creatorContractAddress, instanceId); } /** * See {ILazyPayableClaim-getClaim}. */ function getClaim(address creatorContractAddress, uint256 instanceId) public override view returns(Claim memory) { return _getClaim(creatorContractAddress, instanceId); } /** * See {ILazyPayableClaim-getClaimForToken}. */ function getClaimForToken(address creatorContractAddress, uint256 tokenId) external override view returns(uint256 instanceId, Claim memory claim) { TokenClaim memory tokenClaim = _tokenClaims[creatorContractAddress][tokenId]; if (tokenClaim.instanceId == 0) { // No claim, try to retrieve from tokenData uint80 tokenData = IERC721CreatorCore(creatorContractAddress).tokenData(tokenId); instanceId = uint56(tokenData >> 24); } else { instanceId = tokenClaim.instanceId; } claim = _getClaim(creatorContractAddress, instanceId); } function _getClaim(address creatorContractAddress, uint256 instanceId) private view returns(Claim storage claim) { claim = _claims[creatorContractAddress][instanceId]; require(claim.storageProtocol != StorageProtocol.INVALID, "Claim not initialized"); } /** * See {ILazyPayableClaim-checkMintIndex}. */ function checkMintIndex(address creatorContractAddress, uint256 instanceId, uint32 mintIndex) external override view returns(bool) { Claim memory claim = getClaim(creatorContractAddress, instanceId); return _checkMintIndex(creatorContractAddress, instanceId, claim.merkleRoot, mintIndex); } /** * See {ILazyPayableClaim-checkMintIndices}. */ function checkMintIndices(address creatorContractAddress, uint256 instanceId, uint32[] calldata mintIndices) external override view returns(bool[] memory minted) { Claim memory claim = getClaim(creatorContractAddress, instanceId); uint256 mintIndicesLength = mintIndices.length; minted = new bool[](mintIndices.length); for (uint256 i; i < mintIndicesLength;) { minted[i] = _checkMintIndex(creatorContractAddress, instanceId, claim.merkleRoot, mintIndices[i]); unchecked{ ++i; } } } /** * See {ILazyPayableClaim-getTotalMints}. */ function getTotalMints(address minter, address creatorContractAddress, uint256 instanceId) external override view returns(uint32) { Claim memory claim = getClaim(creatorContractAddress, instanceId); return _getTotalMints(claim.walletMax, minter, creatorContractAddress, instanceId); } /** * See {ILazyPayableClaim-mint}. */ function mint(address creatorContractAddress, uint256 instanceId, uint32 mintIndex, bytes32[] calldata merkleProof, address mintFor) external payable override { Claim storage claim = _getClaim(creatorContractAddress, instanceId); // Check totalMax require((++claim.total <= claim.totalMax || claim.totalMax == 0) && claim.total <= MAX_UINT_24, "Maximum tokens already minted for this claim"); // Validate mint _validateMint(creatorContractAddress, instanceId, claim.startDate, claim.endDate, claim.walletMax, claim.merkleRoot, mintIndex, merkleProof, mintFor); // Transfer funds _transferFunds(claim.erc20, claim.cost, claim.paymentReceiver, 1, claim.merkleRoot != "", true); // Do mint if (claim.contractVersion >= 3) { uint80 tokenData = uint56(instanceId) << 24 | uint24(claim.total); IERC721CreatorCore(creatorContractAddress).mintExtension(msg.sender, tokenData); } else { uint256 newTokenId = IERC721CreatorCore(creatorContractAddress).mintExtension(msg.sender); // Insert the new tokenId into _tokenClaims for the current claim address & instanceId _tokenClaims[creatorContractAddress][newTokenId] = TokenClaim(uint224(instanceId), claim.total); } emit ClaimMint(creatorContractAddress, instanceId); } /** * See {ILazyPayableClaim-mintBatch}. */ function mintBatch(address creatorContractAddress, uint256 instanceId, uint16 mintCount, uint32[] calldata mintIndices, bytes32[][] calldata merkleProofs, address mintFor) external payable override { Claim storage claim = _getClaim(creatorContractAddress, instanceId); // Check totalMax claim.total += mintCount; require((claim.totalMax == 0 || claim.total <= claim.totalMax) && claim.total <= MAX_UINT_24, "Too many requested for this claim"); // Validate mint _validateMint(creatorContractAddress, instanceId, claim.startDate, claim.endDate, claim.walletMax, claim.merkleRoot, mintCount, mintIndices, merkleProofs, mintFor); uint256 newMintIndex = claim.total - mintCount + 1; // Transfer funds _transferFunds(claim.erc20, claim.cost, claim.paymentReceiver, mintCount, claim.merkleRoot != "", true); if (claim.contractVersion >= 3) { uint80[] memory tokenData = new uint80[](mintCount); for (uint256 i; i < mintCount;) { tokenData[i] = uint56(instanceId) << 24 | uint24(newMintIndex+i); unchecked { ++i; } } IERC721CreatorCore(creatorContractAddress).mintExtensionBatch(msg.sender, tokenData); } else { uint256[] memory newTokenIds = IERC721CreatorCore(creatorContractAddress).mintExtensionBatch(msg.sender, mintCount); for (uint256 i; i < mintCount;) { _tokenClaims[creatorContractAddress][newTokenIds[i]] = TokenClaim(uint224(instanceId), uint32(newMintIndex+i)); unchecked { ++i; } } } emit ClaimMintBatch(creatorContractAddress, instanceId, mintCount); } /** * See {ILazyPayableClaim-mintProxy}. */ function mintProxy(address creatorContractAddress, uint256 instanceId, uint16 mintCount, uint32[] calldata mintIndices, bytes32[][] calldata merkleProofs, address mintFor) external payable override { Claim storage claim = _getClaim(creatorContractAddress, instanceId); // Check totalMax claim.total += mintCount; require((claim.totalMax == 0 || claim.total <= claim.totalMax) && claim.total <= MAX_UINT_24, "Too many requested for this claim"); // Validate mint _validateMintProxy(creatorContractAddress, instanceId, claim.startDate, claim.endDate, claim.walletMax, claim.merkleRoot, mintCount, mintIndices, merkleProofs, mintFor); uint256 newMintIndex = claim.total - mintCount + 1; // Transfer funds _transferFunds(claim.erc20, claim.cost, claim.paymentReceiver, mintCount, claim.merkleRoot != "", false); if (claim.contractVersion >= 3) { uint80[] memory tokenData = new uint80[](mintCount); for (uint256 i; i < mintCount;) { tokenData[i] = uint56(instanceId) << 24 | uint24(newMintIndex+i); unchecked { ++i; } } IERC721CreatorCore(creatorContractAddress).mintExtensionBatch(mintFor, tokenData); } else { uint256[] memory newTokenIds = IERC721CreatorCore(creatorContractAddress).mintExtensionBatch(mintFor, mintCount); for (uint256 i; i < mintCount;) { _tokenClaims[creatorContractAddress][newTokenIds[i]] = TokenClaim(uint224(instanceId), uint32(newMintIndex+i)); unchecked { ++i; } } } emit ClaimMintProxy(creatorContractAddress, instanceId, mintCount, msg.sender, mintFor); } /** * See {IERC721LazyClaim-airdrop}. */ function airdrop(address creatorContractAddress, uint256 instanceId, address[] calldata recipients, uint16[] calldata amounts) external override creatorAdminRequired(creatorContractAddress) { require(recipients.length == amounts.length, "Unequal number of recipients and amounts provided"); // Fetch the claim, create newMintIndex to keep track of token ids created by the airdrop Claim storage claim = _claims[creatorContractAddress][instanceId]; uint256 newMintIndex = claim.total+1; if (claim.contractVersion >= 3) { for (uint256 i; i < recipients.length;) { uint16 mintCount = amounts[i]; uint80[] memory tokenDatas = new uint80[](mintCount); for (uint256 j; j < mintCount;) { tokenDatas[j] = uint56(instanceId) << 24 | uint24(newMintIndex+j); unchecked { ++j; } } // Airdrop the tokens IERC721CreatorCore(creatorContractAddress).mintExtensionBatch(recipients[i], tokenDatas); // Increment newMintIndex for the next airdrop unchecked{ newMintIndex += mintCount; } unchecked{ ++i; } } } else { for (uint256 i; i < recipients.length;) { // Airdrop the tokens uint256[] memory newTokenIds = IERC721CreatorCore(creatorContractAddress).mintExtensionBatch(recipients[i], amounts[i]); // Register the tokenClaims, so that tokenURI will work for airdropped tokens for (uint256 j; j < newTokenIds.length;) { _tokenClaims[creatorContractAddress][newTokenIds[j]] = TokenClaim(uint224(instanceId), uint32(newMintIndex+j)); unchecked { ++j; } } // Increment newMintIndex for the next airdrop unchecked{ newMintIndex += newTokenIds.length; } unchecked{ ++i; } } } require(newMintIndex - claim.total - 1 <= MAX_UINT_24, "Too many requested"); claim.total += uint32(newMintIndex - claim.total - 1); if (claim.totalMax != 0 && claim.total > claim.totalMax) { claim.totalMax = claim.total; } } /** * See {ICreatorExtensionTokenURI-tokenURI}. */ function tokenURI(address creatorContractAddress, uint256 tokenId) external override view returns(string memory uri) { TokenClaim memory tokenClaim = _tokenClaims[creatorContractAddress][tokenId]; Claim memory claim; uint256 mintOrder; if (tokenClaim.instanceId != 0) { claim = _claims[creatorContractAddress][tokenClaim.instanceId]; mintOrder = tokenClaim.mintOrder; } else { // No claim, try to retrieve from tokenData uint80 tokenData = IERC721CreatorCore(creatorContractAddress).tokenData(tokenId); uint56 instanceId = uint56(tokenData >> 24); require(instanceId != 0, "Token does not exist"); claim = _claims[creatorContractAddress][instanceId]; mintOrder = uint24(tokenData & MAX_UINT_24); } string memory prefix = ""; if (claim.storageProtocol == StorageProtocol.ARWEAVE) { prefix = ARWEAVE_PREFIX; } else if (claim.storageProtocol == StorageProtocol.IPFS) { prefix = IPFS_PREFIX; } uri = string(abi.encodePacked(prefix, claim.location)); // Depending on params, we may want to append a suffix to location if (!claim.identical) { uri = string(abi.encodePacked(uri, "/", uint256(mintOrder).toString())); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /// @author: manifold.xyz import "./ICreatorCore.sol"; /** * @dev Core ERC721 creator interface */ interface IERC721CreatorCore is ICreatorCore { /** * @dev mint a token with no extension. Can only be called by an admin. * Returns tokenId minted */ function mintBase(address to) external returns (uint256); /** * @dev mint a token with no extension. Can only be called by an admin. * Returns tokenId minted */ function mintBase(address to, string calldata uri) external returns (uint256); /** * @dev batch mint a token with no extension. Can only be called by an admin. * Returns tokenId minted */ function mintBaseBatch(address to, uint16 count) external returns (uint256[] memory); /** * @dev batch mint a token with no extension. Can only be called by an admin. * Returns tokenId minted */ function mintBaseBatch(address to, string[] calldata uris) external returns (uint256[] memory); /** * @dev mint a token. Can only be called by a registered extension. * Returns tokenId minted */ function mintExtension(address to) external returns (uint256); /** * @dev mint a token. Can only be called by a registered extension. * Returns tokenId minted */ function mintExtension(address to, string calldata uri) external returns (uint256); /** * @dev mint a token. Can only be called by a registered extension. * Returns tokenId minted */ function mintExtension(address to, uint80 data) external returns (uint256); /** * @dev batch mint a token. Can only be called by a registered extension. * Returns tokenIds minted */ function mintExtensionBatch(address to, uint16 count) external returns (uint256[] memory); /** * @dev batch mint a token. Can only be called by a registered extension. * Returns tokenId minted */ function mintExtensionBatch(address to, string[] calldata uris) external returns (uint256[] memory); /** * @dev batch mint a token. Can only be called by a registered extension. * Returns tokenId minted */ function mintExtensionBatch(address to, uint80[] calldata data) external returns (uint256[] memory); /** * @dev burn a token. Can only be called by token owner or approved address. * On burn, calls back to the registered extension's onBurn method */ function burn(uint256 tokenId) external; /** * @dev get token data */ function tokenData(uint256 tokenId) external view returns (uint80); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /// @author: manifold.xyz import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; /** * @dev Implement this if you want your extension to have overloadable URI's */ interface ICreatorExtensionTokenURI is IERC165 { /** * Get the uri for a given creator/tokenId */ function tokenURI(address creator, uint256 tokenId) external view returns (string memory); }
// 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 // solhint-disable reason-string pragma solidity ^0.8.0; import "@manifoldxyz/libraries-solidity/contracts/access/AdminControl.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "../../libraries/delegation-registry/IDelegationRegistry.sol"; import "../../libraries/manifold-membership/IManifoldMembership.sol"; import "./ILazyPayableClaim.sol"; /** * @title Lazy Payable Claim * @author manifold.xyz * @notice Lazy payable claim with optional whitelist ERC721 tokens */ abstract contract LazyPayableClaim is ILazyPayableClaim, AdminControl { using EnumerableSet for EnumerableSet.AddressSet; string internal constant ARWEAVE_PREFIX = "https://arweave.net/"; string internal constant IPFS_PREFIX = "ipfs://"; uint256 internal constant MINT_INDEX_BITMASK = 0xFF; // solhint-disable-next-line address public immutable DELEGATION_REGISTRY; uint256 public constant MINT_FEE = 500000000000000; uint256 public constant MINT_FEE_MERKLE = 690000000000000; address public MEMBERSHIP_ADDRESS; uint256 internal constant MAX_UINT_24 = 0xffffff; uint256 internal constant MAX_UINT_32 = 0xffffffff; uint256 internal constant MAX_UINT_56 = 0xffffffffffffff; uint256 internal constant MAX_UINT_256 = 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff; address private constant ADDRESS_ZERO = 0x0000000000000000000000000000000000000000; // ONLY USED FOR NON-MERKLE MINTS: stores the number of tokens minted per wallet per claim, in order to limit maximum // { contractAddress => { instanceId => { walletAddress => walletMints } } } mapping(address => mapping(uint256 => mapping(address => uint256))) internal _mintsPerWallet; // ONLY USED FOR MERKLE MINTS: stores mapping from claim to indices minted // { contractAddress => {instanceId => { instanceIdOffset => index } } } mapping(address => mapping(uint256 => mapping(uint256 => uint256))) internal _claimMintIndices; EnumerableSet.AddressSet private _proxyAddresses; /** * @notice This extension is shared, not single-creator. So we must ensure * that a claim's initializer is an admin on the creator contract * @param creatorContractAddress the address of the creator contract to check the admin against */ modifier creatorAdminRequired(address creatorContractAddress) { AdminControl creatorCoreContract = AdminControl(creatorContractAddress); require(creatorCoreContract.isAdmin(msg.sender), "Wallet is not an administrator for contract"); _; } constructor(address initialOwner, address delegationRegistry) { _transferOwnership(initialOwner); DELEGATION_REGISTRY = delegationRegistry; } /** * See {ILazyPayableClaim-withdraw}. */ function withdraw(address payable receiver, uint256 amount) external override adminRequired { (bool sent, ) = receiver.call{value: amount}(""); require(sent, "Failed to transfer to receiver"); } /** * See {ILazyPayableClaim-setMembershipAddress}. */ function setMembershipAddress(address membershipAddress) external override adminRequired { MEMBERSHIP_ADDRESS = membershipAddress; } function _transferFunds(address erc20, uint256 cost, address payable recipient, uint16 mintCount, bool merkle, bool allowMembership) internal { uint256 payableCost; if (erc20 != ADDRESS_ZERO) { require(IERC20(erc20).transferFrom(msg.sender, recipient, cost*mintCount), "Insufficient funds"); } else { payableCost = cost; } /** * Add mint fee if: * 1. Not allowing memberships OR * 2. No membership address set OR * 3. Not an active member */ if (MEMBERSHIP_ADDRESS == ADDRESS_ZERO || !allowMembership || !IManifoldMembership(MEMBERSHIP_ADDRESS).isActiveMember(msg.sender)) { payableCost += merkle ? MINT_FEE_MERKLE : MINT_FEE; } if (mintCount > 1) { payableCost *= mintCount; cost *= mintCount; } // Check price require(msg.value >= payableCost, "Invalid amount"); if (erc20 == ADDRESS_ZERO && cost != 0) { // solhint-disable-next-line (bool sent, ) = recipient.call{value: cost}(""); require(sent, "Failed to transfer to receiver"); } } function _checkMintIndex(address creatorContractAddress, uint256 instanceId, bytes32 merkleRoot, uint32 mintIndex) internal view returns (bool) { uint256 claimMintIndex = mintIndex >> 8; require(merkleRoot != "", "Can only check merkle claims"); uint256 claimMintTracking = _claimMintIndices[creatorContractAddress][instanceId][claimMintIndex]; uint256 mintBitmask = 1 << (mintIndex & MINT_INDEX_BITMASK); return mintBitmask & claimMintTracking != 0; } function _validateMint(address creatorContractAddress, uint256 instanceId, uint48 startDate, uint48 endDate, uint32 walletMax, bytes32 merkleRoot, uint32 mintIndex, bytes32[] calldata merkleProof, address mintFor) internal { // Check timestamps require( (startDate <= block.timestamp) && (endDate == 0 || endDate >= block.timestamp), "Claim inactive" ); if (merkleRoot != "") { // Merkle mint _checkMerkleAndUpdate(msg.sender, creatorContractAddress, instanceId, merkleRoot, mintIndex, merkleProof, mintFor); } else { require(mintFor == msg.sender, "Invalid input"); // Non-merkle mint if (walletMax != 0) { require(++_mintsPerWallet[creatorContractAddress][instanceId][msg.sender] <= walletMax, "Maximum tokens already minted for this wallet"); } } } function _validateMint(address creatorContractAddress, uint256 instanceId, uint48 startDate, uint48 endDate, uint32 walletMax, bytes32 merkleRoot, uint16 mintCount, uint32[] calldata mintIndices, bytes32[][] calldata merkleProofs, address mintFor) internal { // Check timestamps require( (startDate <= block.timestamp) && (endDate == 0 || endDate >= block.timestamp), "Claim inactive" ); if (merkleRoot != "") { require(mintCount == mintIndices.length && mintCount == merkleProofs.length, "Invalid input"); // Merkle mint for (uint256 i; i < mintCount;) { _checkMerkleAndUpdate(msg.sender, creatorContractAddress, instanceId, merkleRoot, mintIndices[i], merkleProofs[i], mintFor); unchecked { ++i; } } } else { require(mintFor == msg.sender, "Invalid input"); // Non-merkle mint if (walletMax != 0) { _mintsPerWallet[creatorContractAddress][instanceId][mintFor] += mintCount; require(_mintsPerWallet[creatorContractAddress][instanceId][mintFor] <= walletMax, "Too many requested for this wallet"); } } } function _validateMintProxy(address creatorContractAddress, uint256 instanceId, uint48 startDate, uint48 endDate, uint32 walletMax, bytes32 merkleRoot, uint16 mintCount, uint32[] calldata mintIndices, bytes32[][] calldata merkleProofs, address mintFor) internal { // Check timestamps require( (startDate <= block.timestamp) && (endDate == 0 || endDate >= block.timestamp), "Claim inactive" ); if (merkleRoot != "") { require(mintCount == mintIndices.length && mintCount == merkleProofs.length, "Invalid input"); // Merkle mint for (uint256 i; i < mintCount;) { // Proxy mints treat the mintFor as the transaction sender _checkMerkleAndUpdate(mintFor, creatorContractAddress, instanceId, merkleRoot, mintIndices[i], merkleProofs[i], mintFor); unchecked { ++i; } } } else { // Non-merkle mint if (walletMax != 0) { _mintsPerWallet[creatorContractAddress][instanceId][mintFor] += mintCount; require(_mintsPerWallet[creatorContractAddress][instanceId][mintFor] <= walletMax, "Too many requested for this wallet"); } } } function _checkMerkleAndUpdate(address sender, address creatorContractAddress, uint256 instanceId, bytes32 merkleRoot, uint32 mintIndex, bytes32[] memory merkleProof, address mintFor) private { // Merkle mint bytes32 leaf; if (mintFor == sender) { leaf = keccak256(abi.encodePacked(sender, mintIndex)); } else { // Direct verification failed, try delegate verification IDelegationRegistry dr = IDelegationRegistry(DELEGATION_REGISTRY); require(dr.checkDelegateForContract(sender, mintFor, address(this)), "Invalid delegate"); leaf = keccak256(abi.encodePacked(mintFor, mintIndex)); } require(MerkleProof.verify(merkleProof, merkleRoot, leaf), "Could not verify merkle proof"); // Check if mintIndex has been minted uint256 claimMintIndex = mintIndex >> 8; uint256 claimMintTracking = _claimMintIndices[creatorContractAddress][instanceId][claimMintIndex]; uint256 mintBitmask = 1 << (mintIndex & MINT_INDEX_BITMASK); require(mintBitmask & claimMintTracking == 0, "Already minted"); _claimMintIndices[creatorContractAddress][instanceId][claimMintIndex] = claimMintTracking | mintBitmask; } function _getTotalMints(uint32 walletMax, address minter, address creatorContractAddress, uint256 instanceId) internal view returns(uint32) { require(walletMax != 0, "Can only retrieve for non-merkle claims with walletMax"); return uint32(_mintsPerWallet[creatorContractAddress][instanceId][minter]); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /// @author: manifold.xyz import "./ILazyPayableClaim.sol"; /** * Lazy Payable Claim interface */ interface IERC721LazyPayableClaim is ILazyPayableClaim { struct ClaimParameters { uint32 totalMax; uint32 walletMax; uint48 startDate; uint48 endDate; StorageProtocol storageProtocol; bool identical; bytes32 merkleRoot; string location; uint256 cost; address payable paymentReceiver; address erc20; } struct Claim { uint32 total; uint32 totalMax; uint32 walletMax; uint48 startDate; uint48 endDate; StorageProtocol storageProtocol; uint8 contractVersion; bool identical; bytes32 merkleRoot; string location; uint256 cost; address payable paymentReceiver; address erc20; } /** * @notice initialize a new claim, emit initialize event * @param creatorContractAddress the creator contract the claim will mint tokens for * @param instanceId the claim instanceId for the creator contract * @param claimParameters the parameters which will affect the minting behavior of the claim */ function initializeClaim(address creatorContractAddress, uint256 instanceId, ClaimParameters calldata claimParameters) external; /** * @notice update an existing claim at instanceId * @param creatorContractAddress the creator contract corresponding to the claim * @param instanceId the claim instanceId for the creator contract * @param claimParameters the parameters which will affect the minting behavior of the claim */ function updateClaim(address creatorContractAddress, uint256 instanceId, ClaimParameters calldata claimParameters) external; /** * @notice update tokenURI parameters for an existing claim at instanceId * @param creatorContractAddress the creator contract corresponding to the claim * @param instanceId the claim instanceId for the creator contract * @param storageProtocol the new storage protocol * @param identical the new value of identical * @param location the new location */ function updateTokenURIParams(address creatorContractAddress, uint256 instanceId, StorageProtocol storageProtocol, bool identical, string calldata location) external; /** * @notice extend tokenURI parameters for an existing claim at instanceId. Must have NONE StorageProtocol * @param creatorContractAddress the creator contract corresponding to the claim * @param instanceId the claim instanceId for the creator contract * @param locationChunk the additional location chunk */ function extendTokenURI(address creatorContractAddress, uint256 instanceId, string calldata locationChunk) external; /** * @notice get a claim corresponding to a creator contract and instanceId * @param creatorContractAddress the address of the creator contract * @param instanceId the claim instanceId for the creator contract * @return the claim object */ function getClaim(address creatorContractAddress, uint256 instanceId) external view returns(Claim memory); /** * @notice get a claim corresponding to a token * @param creatorContractAddress the address of the creator contract * @param tokenId the tokenId of the claim * @return the claim instanceId and claim object */ function getClaimForToken(address creatorContractAddress, uint256 tokenId) external view returns(uint256, Claim memory); /** * @notice allow admin to airdrop arbitrary tokens * @param creatorContractAddress the creator contract the claim will mint tokens for * @param instanceId the claim instanceId for the creator contract * @param recipients addresses to airdrop to * @param amounts number of tokens to airdrop to each address in addresses */ function airdrop(address creatorContractAddress, uint256 instanceId, address[] calldata recipients, uint16[] calldata amounts) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IERC721CreatorCoreVersion { function VERSION() external view returns(uint256); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /// @author: manifold.xyz import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; /** * @dev Core creator interface */ interface ICreatorCore is IERC165 { event ExtensionRegistered(address indexed extension, address indexed sender); event ExtensionUnregistered(address indexed extension, address indexed sender); event ExtensionBlacklisted(address indexed extension, address indexed sender); event MintPermissionsUpdated(address indexed extension, address indexed permissions, address indexed sender); event RoyaltiesUpdated(uint256 indexed tokenId, address payable[] receivers, uint256[] basisPoints); event DefaultRoyaltiesUpdated(address payable[] receivers, uint256[] basisPoints); event ApproveTransferUpdated(address extension); event ExtensionRoyaltiesUpdated(address indexed extension, address payable[] receivers, uint256[] basisPoints); event ExtensionApproveTransferUpdated(address indexed extension, bool enabled); /** * @dev gets address of all extensions */ function getExtensions() external view returns (address[] memory); /** * @dev add an extension. Can only be called by contract owner or admin. * extension address must point to a contract implementing ICreatorExtension. * Returns True if newly added, False if already added. */ function registerExtension(address extension, string calldata baseURI) external; /** * @dev add an extension. Can only be called by contract owner or admin. * extension address must point to a contract implementing ICreatorExtension. * Returns True if newly added, False if already added. */ function registerExtension(address extension, string calldata baseURI, bool baseURIIdentical) external; /** * @dev add an extension. Can only be called by contract owner or admin. * Returns True if removed, False if already removed. */ function unregisterExtension(address extension) external; /** * @dev blacklist an extension. Can only be called by contract owner or admin. * This function will destroy all ability to reference the metadata of any tokens created * by the specified extension. It will also unregister the extension if needed. * Returns True if removed, False if already removed. */ function blacklistExtension(address extension) external; /** * @dev set the baseTokenURI of an extension. Can only be called by extension. */ function setBaseTokenURIExtension(string calldata uri) external; /** * @dev set the baseTokenURI of an extension. Can only be called by extension. * For tokens with no uri configured, tokenURI will return "uri+tokenId" */ function setBaseTokenURIExtension(string calldata uri, bool identical) external; /** * @dev set the common prefix of an extension. Can only be called by extension. * If configured, and a token has a uri set, tokenURI will return "prefixURI+tokenURI" * Useful if you want to use ipfs/arweave */ function setTokenURIPrefixExtension(string calldata prefix) external; /** * @dev set the tokenURI of a token extension. Can only be called by extension that minted token. */ function setTokenURIExtension(uint256 tokenId, string calldata uri) external; /** * @dev set the tokenURI of a token extension for multiple tokens. Can only be called by extension that minted token. */ function setTokenURIExtension(uint256[] memory tokenId, string[] calldata uri) external; /** * @dev set the baseTokenURI for tokens with no extension. Can only be called by owner/admin. * For tokens with no uri configured, tokenURI will return "uri+tokenId" */ function setBaseTokenURI(string calldata uri) external; /** * @dev set the common prefix for tokens with no extension. Can only be called by owner/admin. * If configured, and a token has a uri set, tokenURI will return "prefixURI+tokenURI" * Useful if you want to use ipfs/arweave */ function setTokenURIPrefix(string calldata prefix) external; /** * @dev set the tokenURI of a token with no extension. Can only be called by owner/admin. */ function setTokenURI(uint256 tokenId, string calldata uri) external; /** * @dev set the tokenURI of multiple tokens with no extension. Can only be called by owner/admin. */ function setTokenURI(uint256[] memory tokenIds, string[] calldata uris) external; /** * @dev set a permissions contract for an extension. Used to control minting. */ function setMintPermissions(address extension, address permissions) external; /** * @dev Configure so transfers of tokens created by the caller (must be extension) gets approval * from the extension before transferring */ function setApproveTransferExtension(bool enabled) external; /** * @dev get the extension of a given token */ function tokenExtension(uint256 tokenId) external view returns (address); /** * @dev Set default royalties */ function setRoyalties(address payable[] calldata receivers, uint256[] calldata basisPoints) external; /** * @dev Set royalties of a token */ function setRoyalties(uint256 tokenId, address payable[] calldata receivers, uint256[] calldata basisPoints) external; /** * @dev Set royalties of an extension */ function setRoyaltiesExtension(address extension, address payable[] calldata receivers, uint256[] calldata basisPoints) external; /** * @dev Get royalites of a token. Returns list of receivers and basisPoints */ function getRoyalties(uint256 tokenId) external view returns (address payable[] memory, uint256[] memory); // Royalty support for various other standards function getFeeRecipients(uint256 tokenId) external view returns (address payable[] memory); function getFeeBps(uint256 tokenId) external view returns (uint[] memory); function getFees(uint256 tokenId) external view returns (address payable[] memory, uint256[] memory); function royaltyInfo(uint256 tokenId, uint256 value) external view returns (address, uint256); /** * @dev Set the default approve transfer contract location. */ function setApproveTransfer(address extension) external; /** * @dev Get the default approve transfer contract location. */ function getApproveTransfer() external view returns (address); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /// @author: manifold.xyz import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./IAdminControl.sol"; abstract contract AdminControl is Ownable, IAdminControl, ERC165 { using EnumerableSet for EnumerableSet.AddressSet; // Track registered admins EnumerableSet.AddressSet private _admins; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IAdminControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Only allows approved admins to call the specified function */ modifier adminRequired() { require(owner() == msg.sender || _admins.contains(msg.sender), "AdminControl: Must be owner or admin"); _; } /** * @dev See {IAdminControl-getAdmins}. */ function getAdmins() external view override returns (address[] memory admins) { admins = new address[](_admins.length()); for (uint i = 0; i < _admins.length(); i++) { admins[i] = _admins.at(i); } return admins; } /** * @dev See {IAdminControl-approveAdmin}. */ function approveAdmin(address admin) external override onlyOwner { if (!_admins.contains(admin)) { emit AdminApproved(admin, msg.sender); _admins.add(admin); } } /** * @dev See {IAdminControl-revokeAdmin}. */ function revokeAdmin(address admin) external override onlyOwner { if (_admins.contains(admin)) { emit AdminRevoked(admin, msg.sender); _admins.remove(admin); } } /** * @dev See {IAdminControl-isAdmin}. */ function isAdmin(address admin) public override view returns (bool) { return (owner() == admin || _admins.contains(admin)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Tree proofs. * * The proofs can be generated using the JavaScript library * https://github.com/miguelmota/merkletreejs[merkletreejs]. * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled. * * See `test/utils/cryptography/MerkleProof.test.js` for some examples. * * WARNING: You should avoid using leaf values that are 64 bytes long prior to * hashing, or use a hash function other than keccak256 for hashing leaves. * This is because the concatenation of a sorted pair of internal nodes in * the merkle tree could be reinterpreted as a leaf value. */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Calldata version of {verify} * * _Available since v4.7._ */ function verifyCalldata( bytes32[] calldata proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProofCalldata(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. * * _Available since v4.4._ */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Calldata version of {processProof} * * _Available since v4.7._ */ function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Returns true if the `leaves` can be proved to be a part of a Merkle tree defined by * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}. * * _Available since v4.7._ */ function multiProofVerify( bytes32[] memory proof, bool[] memory proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProof(proof, proofFlags, leaves) == root; } /** * @dev Calldata version of {multiProofVerify} * * _Available since v4.7._ */ function multiProofVerifyCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProofCalldata(proof, proofFlags, leaves) == root; } /** * @dev Returns the root of a tree reconstructed from `leaves` and the sibling nodes in `proof`, * consuming from one or the other at each step according to the instructions given by * `proofFlags`. * * _Available since v4.7._ */ function processMultiProof( bytes32[] memory proof, bool[] memory proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } /** * @dev Calldata version of {processMultiProof} * * _Available since v4.7._ */ function processMultiProofCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) { return a < b ? _efficientHash(a, b) : _efficientHash(b, a); } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { /// @solidity memory-safe-assembly assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol) pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. * * [WARNING] * ==== * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable. * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. * * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet. * ==== */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastValue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastValue; // Update the index for the moved value set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { return _values(set._inner); } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_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) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @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: CC0-1.0 pragma solidity ^0.8.9; /** * @title An immutable registry contract to be deployed as a standalone primitive * @dev See EIP-5639, new project launches can read previous cold wallet -> hot wallet delegations * from here and integrate those permissions into their flow */ interface IDelegationRegistry { /// @notice Delegation type enum DelegationType { NONE, ALL, CONTRACT, TOKEN } /// @notice Info about a single delegation, used for onchain enumeration struct DelegationInfo { DelegationType type_; address vault; address delegate; address contract_; uint256 tokenId; } /// @notice Info about a single contract-level delegation struct ContractDelegation { address contract_; address delegate; } /// @notice Info about a single token-level delegation struct TokenDelegation { address contract_; uint256 tokenId; address delegate; } /// @notice Emitted when a user delegates their entire wallet event DelegateForAll(address vault, address delegate, bool value); /// @notice Emitted when a user delegates a specific contract event DelegateForContract(address vault, address delegate, address contract_, bool value); /// @notice Emitted when a user delegates a specific token event DelegateForToken(address vault, address delegate, address contract_, uint256 tokenId, bool value); /// @notice Emitted when a user revokes all delegations event RevokeAllDelegates(address vault); /// @notice Emitted when a user revoes all delegations for a given delegate event RevokeDelegate(address vault, address delegate); /** * ----------- WRITE ----------- */ /** * @notice Allow the delegate to act on your behalf for all contracts * @param delegate The hotwallet to act on your behalf * @param value Whether to enable or disable delegation for this address, true for setting and false for revoking */ function delegateForAll(address delegate, bool value) external; /** * @notice Allow the delegate to act on your behalf for a specific contract * @param delegate The hotwallet to act on your behalf * @param contract_ The address for the contract you're delegating * @param value Whether to enable or disable delegation for this address, true for setting and false for revoking */ function delegateForContract(address delegate, address contract_, bool value) external; /** * @notice Allow the delegate to act on your behalf for a specific token * @param delegate The hotwallet to act on your behalf * @param contract_ The address for the contract you're delegating * @param tokenId The token id for the token you're delegating * @param value Whether to enable or disable delegation for this address, true for setting and false for revoking */ function delegateForToken(address delegate, address contract_, uint256 tokenId, bool value) external; /** * @notice Revoke all delegates */ function revokeAllDelegates() external; /** * @notice Revoke a specific delegate for all their permissions * @param delegate The hotwallet to revoke */ function revokeDelegate(address delegate) external; /** * @notice Remove yourself as a delegate for a specific vault * @param vault The vault which delegated to the msg.sender, and should be removed */ function revokeSelf(address vault) external; /** * ----------- READ ----------- */ /** * @notice Returns all active delegations a given delegate is able to claim on behalf of * @param delegate The delegate that you would like to retrieve delegations for * @return info Array of DelegationInfo structs */ function getDelegationsByDelegate(address delegate) external view returns (DelegationInfo[] memory); /** * @notice Returns an array of wallet-level delegates for a given vault * @param vault The cold wallet who issued the delegation * @return addresses Array of wallet-level delegates for a given vault */ function getDelegatesForAll(address vault) external view returns (address[] memory); /** * @notice Returns an array of contract-level delegates for a given vault and contract * @param vault The cold wallet who issued the delegation * @param contract_ The address for the contract you're delegating * @return addresses Array of contract-level delegates for a given vault and contract */ function getDelegatesForContract(address vault, address contract_) external view returns (address[] memory); /** * @notice Returns an array of contract-level delegates for a given vault's token * @param vault The cold wallet who issued the delegation * @param contract_ The address for the contract holding the token * @param tokenId The token id for the token you're delegating * @return addresses Array of contract-level delegates for a given vault's token */ function getDelegatesForToken(address vault, address contract_, uint256 tokenId) external view returns (address[] memory); /** * @notice Returns all contract-level delegations for a given vault * @param vault The cold wallet who issued the delegations * @return delegations Array of ContractDelegation structs */ function getContractLevelDelegations(address vault) external view returns (ContractDelegation[] memory delegations); /** * @notice Returns all token-level delegations for a given vault * @param vault The cold wallet who issued the delegations * @return delegations Array of TokenDelegation structs */ function getTokenLevelDelegations(address vault) external view returns (TokenDelegation[] memory delegations); /** * @notice Returns true if the address is delegated to act on the entire vault * @param delegate The hotwallet to act on your behalf * @param vault The cold wallet who issued the delegation */ function checkDelegateForAll(address delegate, address vault) external view returns (bool); /** * @notice Returns true if the address is delegated to act on your behalf for a token contract or an entire vault * @param delegate The hotwallet to act on your behalf * @param contract_ The address for the contract you're delegating * @param vault The cold wallet who issued the delegation */ function checkDelegateForContract(address delegate, address vault, address contract_) external view returns (bool); /** * @notice Returns true if the address is delegated to act on your behalf for a specific token, the token's contract or an entire vault * @param delegate The hotwallet to act on your behalf * @param contract_ The address for the contract you're delegating * @param tokenId The token id for the token you're delegating * @param vault The cold wallet who issued the delegation */ function checkDelegateForToken(address delegate, address vault, address contract_, uint256 tokenId) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /// @author: manifold.xyz /** * Manifold Membership interface */ interface IManifoldMembership { function isActiveMember(address sender) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /// @author: manifold.xyz /** * Lazy Payable Claim interface */ interface ILazyPayableClaim { enum StorageProtocol { INVALID, NONE, ARWEAVE, IPFS } event ClaimInitialized(address indexed creatorContract, uint256 indexed instanceId, address initializer); event ClaimUpdated(address indexed creatorContract, uint256 indexed instanceId); event ClaimMint(address indexed creatorContract, uint256 indexed instanceId); event ClaimMintBatch(address indexed creatorContract, uint256 indexed instanceId, uint16 mintCount); event ClaimMintProxy(address indexed creatorContract, uint256 indexed instanceId, uint16 mintCount, address proxy, address mintFor); /** * @notice Withdraw funds */ function withdraw(address payable receiver, uint256 amount) external; /** * @notice Set the Manifold Membership address */ function setMembershipAddress(address membershipAddress) external; /** * @notice check if a mint index has been consumed or not (only for merkle claims) * * @param creatorContractAddress the address of the creator contract for the claim * @param instanceId the claim instanceId for the creator contract * @param mintIndex the mint claim instance * @return whether or not the mint index was consumed */ function checkMintIndex(address creatorContractAddress, uint256 instanceId, uint32 mintIndex) external view returns(bool); /** * @notice check if multiple mint indices has been consumed or not (only for merkle claims) * * @param creatorContractAddress the address of the creator contract for the claim * @param instanceId the claim instanceId for the creator contract * @param mintIndices the mint claim instance * @return whether or not the mint index was consumed */ function checkMintIndices(address creatorContractAddress, uint256 instanceId, uint32[] calldata mintIndices) external view returns(bool[] memory); /** * @notice get mints made for a wallet (only for non-merkle claims with walletMax) * * @param minter the address of the minting address * @param creatorContractAddress the address of the creator contract for the claim * @param instanceId the claim instance for the creator contract * @return how many mints the minter has made */ function getTotalMints(address minter, address creatorContractAddress, uint256 instanceId) external view returns(uint32); /** * @notice allow a wallet to lazily claim a token according to parameters * @param creatorContractAddress the creator contract address * @param instanceId the claim instanceId for the creator contract * @param mintIndex the mint index (only needed for merkle claims) * @param merkleProof if the claim has a merkleRoot, verifying merkleProof ensures that address + minterValue was used to construct it (only needed for merkle claims) * @param mintFor mintFor must be the msg.sender or a delegate wallet address (in the case of merkle based mints) */ function mint(address creatorContractAddress, uint256 instanceId, uint32 mintIndex, bytes32[] calldata merkleProof, address mintFor) external payable; /** * @notice allow a wallet to lazily claim a token according to parameters * @param creatorContractAddress the creator contract address * @param instanceId the claim instanceId for the creator contract * @param mintCount the number of claims to mint * @param mintIndices the mint index (only needed for merkle claims) * @param merkleProofs if the claim has a merkleRoot, verifying merkleProof ensures that address + minterValue was used to construct it (only needed for merkle claims) * @param mintFor mintFor must be the msg.sender or a delegate wallet address (in the case of merkle based mints) */ function mintBatch(address creatorContractAddress, uint256 instanceId, uint16 mintCount, uint32[] calldata mintIndices, bytes32[][] calldata merkleProofs, address mintFor) external payable; /** * @notice allow a proxy to mint a token for another address * @param creatorContractAddress the creator contract address * @param instanceId the claim instanceId for the creator contract * @param mintCount the number of claims to mint * @param mintIndices the mint index (only needed for merkle claims) * @param merkleProofs if the claim has a merkleRoot, verifying merkleProof ensures that address + minterValue was used to construct it (only needed for merkle claims) * @param mintFor the address to mint for */ function mintProxy(address creatorContractAddress, uint256 instanceId, uint16 mintCount, uint32[] calldata mintIndices, bytes32[][] calldata merkleProofs, address mintFor) external payable; }
// 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) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /// @author: manifold.xyz import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; /** * @dev Interface for admin control */ interface IAdminControl is IERC165 { event AdminApproved(address indexed account, address indexed sender); event AdminRevoked(address indexed account, address indexed sender); /** * @dev gets address of all admins */ function getAdmins() external view returns (address[] memory); /** * @dev add an admin. Can only be called by contract owner. */ function approveAdmin(address admin) external; /** * @dev remove an admin. Can only be called by contract owner. */ function revokeAdmin(address admin) external; /** * @dev checks whether or not given address is an admin * Returns True if they are */ function isAdmin(address admin) external view returns (bool); }
// 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; } }
{ "remappings": [ "@ensdomains/=node_modules/@ensdomains/", "@manifoldxyz/=node_modules/@manifoldxyz/", "@openzeppelin/=node_modules/@openzeppelin/", "ds-test/=lib/forge-std/lib/ds-test/src/", "eth-gas-reporter/=node_modules/eth-gas-reporter/", "forge-std/=lib/forge-std/src/", "hardhat/=node_modules/hardhat/", "operator-filter-registry/=node_modules/operator-filter-registry/", "truffle/=node_modules/truffle/" ], "optimizer": { "enabled": true, "runs": 1000 }, "metadata": { "bytecodeHash": "ipfs" }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "london", "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"initialOwner","type":"address"},{"internalType":"address","name":"delegationRegistry","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"AdminApproved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"AdminRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"creatorContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"instanceId","type":"uint256"},{"indexed":false,"internalType":"address","name":"initializer","type":"address"}],"name":"ClaimInitialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"creatorContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"instanceId","type":"uint256"}],"name":"ClaimMint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"creatorContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"instanceId","type":"uint256"},{"indexed":false,"internalType":"uint16","name":"mintCount","type":"uint16"}],"name":"ClaimMintBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"creatorContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"instanceId","type":"uint256"},{"indexed":false,"internalType":"uint16","name":"mintCount","type":"uint16"},{"indexed":false,"internalType":"address","name":"proxy","type":"address"},{"indexed":false,"internalType":"address","name":"mintFor","type":"address"}],"name":"ClaimMintProxy","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"creatorContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"instanceId","type":"uint256"}],"name":"ClaimUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"DELEGATION_REGISTRY","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MEMBERSHIP_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINT_FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINT_FEE_MERKLE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"creatorContractAddress","type":"address"},{"internalType":"uint256","name":"instanceId","type":"uint256"},{"internalType":"address[]","name":"recipients","type":"address[]"},{"internalType":"uint16[]","name":"amounts","type":"uint16[]"}],"name":"airdrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"name":"approveAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"creatorContractAddress","type":"address"},{"internalType":"uint256","name":"instanceId","type":"uint256"},{"internalType":"uint32","name":"mintIndex","type":"uint32"}],"name":"checkMintIndex","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"creatorContractAddress","type":"address"},{"internalType":"uint256","name":"instanceId","type":"uint256"},{"internalType":"uint32[]","name":"mintIndices","type":"uint32[]"}],"name":"checkMintIndices","outputs":[{"internalType":"bool[]","name":"minted","type":"bool[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"creatorContractAddress","type":"address"},{"internalType":"uint256","name":"instanceId","type":"uint256"},{"internalType":"string","name":"locationChunk","type":"string"}],"name":"extendTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getAdmins","outputs":[{"internalType":"address[]","name":"admins","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"creatorContractAddress","type":"address"},{"internalType":"uint256","name":"instanceId","type":"uint256"}],"name":"getClaim","outputs":[{"components":[{"internalType":"uint32","name":"total","type":"uint32"},{"internalType":"uint32","name":"totalMax","type":"uint32"},{"internalType":"uint32","name":"walletMax","type":"uint32"},{"internalType":"uint48","name":"startDate","type":"uint48"},{"internalType":"uint48","name":"endDate","type":"uint48"},{"internalType":"enum ILazyPayableClaim.StorageProtocol","name":"storageProtocol","type":"uint8"},{"internalType":"uint8","name":"contractVersion","type":"uint8"},{"internalType":"bool","name":"identical","type":"bool"},{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"},{"internalType":"string","name":"location","type":"string"},{"internalType":"uint256","name":"cost","type":"uint256"},{"internalType":"address payable","name":"paymentReceiver","type":"address"},{"internalType":"address","name":"erc20","type":"address"}],"internalType":"struct IERC721LazyPayableClaim.Claim","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"creatorContractAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getClaimForToken","outputs":[{"internalType":"uint256","name":"instanceId","type":"uint256"},{"components":[{"internalType":"uint32","name":"total","type":"uint32"},{"internalType":"uint32","name":"totalMax","type":"uint32"},{"internalType":"uint32","name":"walletMax","type":"uint32"},{"internalType":"uint48","name":"startDate","type":"uint48"},{"internalType":"uint48","name":"endDate","type":"uint48"},{"internalType":"enum ILazyPayableClaim.StorageProtocol","name":"storageProtocol","type":"uint8"},{"internalType":"uint8","name":"contractVersion","type":"uint8"},{"internalType":"bool","name":"identical","type":"bool"},{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"},{"internalType":"string","name":"location","type":"string"},{"internalType":"uint256","name":"cost","type":"uint256"},{"internalType":"address payable","name":"paymentReceiver","type":"address"},{"internalType":"address","name":"erc20","type":"address"}],"internalType":"struct IERC721LazyPayableClaim.Claim","name":"claim","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"minter","type":"address"},{"internalType":"address","name":"creatorContractAddress","type":"address"},{"internalType":"uint256","name":"instanceId","type":"uint256"}],"name":"getTotalMints","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"creatorContractAddress","type":"address"},{"internalType":"uint256","name":"instanceId","type":"uint256"},{"components":[{"internalType":"uint32","name":"totalMax","type":"uint32"},{"internalType":"uint32","name":"walletMax","type":"uint32"},{"internalType":"uint48","name":"startDate","type":"uint48"},{"internalType":"uint48","name":"endDate","type":"uint48"},{"internalType":"enum ILazyPayableClaim.StorageProtocol","name":"storageProtocol","type":"uint8"},{"internalType":"bool","name":"identical","type":"bool"},{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"},{"internalType":"string","name":"location","type":"string"},{"internalType":"uint256","name":"cost","type":"uint256"},{"internalType":"address payable","name":"paymentReceiver","type":"address"},{"internalType":"address","name":"erc20","type":"address"}],"internalType":"struct IERC721LazyPayableClaim.ClaimParameters","name":"claimParameters","type":"tuple"}],"name":"initializeClaim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"name":"isAdmin","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"creatorContractAddress","type":"address"},{"internalType":"uint256","name":"instanceId","type":"uint256"},{"internalType":"uint32","name":"mintIndex","type":"uint32"},{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"},{"internalType":"address","name":"mintFor","type":"address"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"creatorContractAddress","type":"address"},{"internalType":"uint256","name":"instanceId","type":"uint256"},{"internalType":"uint16","name":"mintCount","type":"uint16"},{"internalType":"uint32[]","name":"mintIndices","type":"uint32[]"},{"internalType":"bytes32[][]","name":"merkleProofs","type":"bytes32[][]"},{"internalType":"address","name":"mintFor","type":"address"}],"name":"mintBatch","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"creatorContractAddress","type":"address"},{"internalType":"uint256","name":"instanceId","type":"uint256"},{"internalType":"uint16","name":"mintCount","type":"uint16"},{"internalType":"uint32[]","name":"mintIndices","type":"uint32[]"},{"internalType":"bytes32[][]","name":"merkleProofs","type":"bytes32[][]"},{"internalType":"address","name":"mintFor","type":"address"}],"name":"mintProxy","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"name":"revokeAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"membershipAddress","type":"address"}],"name":"setMembershipAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"creatorContractAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"uri","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"creatorContractAddress","type":"address"},{"internalType":"uint256","name":"instanceId","type":"uint256"},{"components":[{"internalType":"uint32","name":"totalMax","type":"uint32"},{"internalType":"uint32","name":"walletMax","type":"uint32"},{"internalType":"uint48","name":"startDate","type":"uint48"},{"internalType":"uint48","name":"endDate","type":"uint48"},{"internalType":"enum ILazyPayableClaim.StorageProtocol","name":"storageProtocol","type":"uint8"},{"internalType":"bool","name":"identical","type":"bool"},{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"},{"internalType":"string","name":"location","type":"string"},{"internalType":"uint256","name":"cost","type":"uint256"},{"internalType":"address payable","name":"paymentReceiver","type":"address"},{"internalType":"address","name":"erc20","type":"address"}],"internalType":"struct IERC721LazyPayableClaim.ClaimParameters","name":"claimParameters","type":"tuple"}],"name":"updateClaim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"creatorContractAddress","type":"address"},{"internalType":"uint256","name":"instanceId","type":"uint256"},{"internalType":"enum ILazyPayableClaim.StorageProtocol","name":"storageProtocol","type":"uint8"},{"internalType":"bool","name":"identical","type":"bool"},{"internalType":"string","name":"location","type":"string"}],"name":"updateTokenURIParams","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"receiver","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60a06040523480156200001157600080fd5b5060405162005ffa38038062005ffa8339810160408190526200003491620000cf565b8181620000413362000062565b6200004c8262000062565b6001600160a01b03166080525062000107915050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b0381168114620000ca57600080fd5b919050565b60008060408385031215620000e357600080fd5b620000ee83620000b2565b9150620000fe60208401620000b2565b90509250929050565b608051615ed06200012a6000396000818161032701526149e10152615ed06000f3fe6080604052600436106101b75760003560e01c8063895696f2116100ec578063cda085361161008a578063f2fde38b11610064578063f2fde38b1461051b578063f3fef3a31461053b578063f8a6137b1461055b578063fa2b068f1461058857600080fd5b8063cda08536146104b3578063d7bf81a3146104d3578063e9dc6375146104ee57600080fd5b806399c14347116100c657806399c143471461042a5780639c8eb4891461044a578063b93aa86c1461046a578063cb7997161461048a57600080fd5b8063895696f2146103be5780638da5cb5b146103ec578063975b4d951461040a57600080fd5b806342f3bef4116101595780635f2f5129116101335780635f2f5129146103495780636d73e66914610369578063715018a6146103895780637ab393921461039e57600080fd5b806342f3bef4146102a85780634baa62bf146102dd5780634daadff71461031557600080fd5b806324d7806c1161019557806324d7806c1461023357806326c858a4146102535780632d3456701461026657806331ae450b1461028657600080fd5b806301ffc9a7146101bc57806307591acc146101f15780630f79ab3914610206575b600080fd5b3480156101c857600080fd5b506101dc6101d7366004614e0f565b61059b565b60405190151581526020015b60405180910390f35b6102046101ff366004614ebc565b6106a0565b005b34801561021257600080fd5b50610226610221366004614f6c565b610b0e565b6040516101e8919061513d565b34801561023f57600080fd5b506101dc61024e366004615150565b610d04565b610204610261366004614ebc565b610d3d565b34801561027257600080fd5b50610204610281366004615150565b611183565b34801561029257600080fd5b5061029b6111e1565b6040516101e8919061516d565b3480156102b457600080fd5b506102c86102c33660046151ba565b611290565b60405163ffffffff90911681526020016101e8565b3480156102e957600080fd5b506003546102fd906001600160a01b031681565b6040516001600160a01b0390911681526020016101e8565b34801561032157600080fd5b506102fd7f000000000000000000000000000000000000000000000000000000000000000081565b34801561035557600080fd5b506102046103643660046151fb565b6112b8565b34801561037557600080fd5b50610204610384366004615150565b6118b8565b34801561039557600080fd5b50610204611910565b3480156103aa57600080fd5b506102046103b9366004615150565b611924565b3480156103ca57600080fd5b506103de6103d9366004614f6c565b6119d9565b6040516101e8929190615287565b3480156103f857600080fd5b506000546001600160a01b03166102fd565b34801561041657600080fd5b506102046104253660046152a0565b611cb6565b34801561043657600080fd5b5061020461044536600461536b565b61249a565b34801561045657600080fd5b506102046104653660046154e7565b6126f2565b34801561047657600080fd5b50610204610485366004615616565b612e68565b34801561049657600080fd5b506104a56602738d24e5200081565b6040519081526020016101e8565b3480156104bf57600080fd5b506101dc6104ce366004615672565b61304e565b3480156104df57600080fd5b506104a56601c6bf5263400081565b3480156104fa57600080fd5b5061050e610509366004614f6c565b61306e565b6040516101e891906156b0565b34801561052757600080fd5b50610204610536366004615150565b613697565b34801561054757600080fd5b50610204610556366004614f6c565b613724565b34801561056757600080fd5b5061057b6105763660046156c3565b613852565b6040516101e89190615713565b61020461059636600461574d565b61391f565b60006001600160e01b031982167ff22e7ed50000000000000000000000000000000000000000000000000000000014806105fe57506001600160e01b031982167f25020c6f00000000000000000000000000000000000000000000000000000000145b8061063257506001600160e01b031982167fe9dc637500000000000000000000000000000000000000000000000000000000145b8061066657506001600160e01b031982167f553e757e00000000000000000000000000000000000000000000000000000000145b8061069a57506001600160e01b031982167f01ffc9a700000000000000000000000000000000000000000000000000000000145b92915050565b60006106ac8989613c6b565b805490915061ffff88169082906000906106cd90849063ffffffff166157e6565b82546101009290920a63ffffffff8181021990931691831602179091558254640100000000900416159050806107145750805463ffffffff64010000000082048116911611155b801561072c5750805462ffffff63ffffffff90911611155b6107875760405162461bcd60e51b815260206004820152602160248201527f546f6f206d616e792072657175657374656420666f72207468697320636c61696044820152606d60f81b60648201526084015b60405180910390fd5b805460018201546107cc918b918b9165ffffffffffff600160601b8204811692600160901b83049091169163ffffffff600160401b90910416908d8d8d8d8d8d613cf9565b80546000906107e69061ffff8a169063ffffffff16615803565b6107f19060016157e6565b600583015460038401546004850154600186015463ffffffff94909416945061082f936001600160a01b0393841693909116908c9015156000613f71565b81546003600160c81b90910460ff16106109765760008861ffff1667ffffffffffffffff811115610862576108626153dc565b60405190808252806020026020018201604052801561088b578160200160208202803683370190505b50905060005b8961ffff168110156108f9576108a78184615820565b62ffffff1660188c66ffffffffffffff16901b1766ffffffffffffff168282815181106108d6576108d6615833565b69ffffffffffffffffffff90921660209283029190910190910152600101610891565b5060405163213c198760e11b81526001600160a01b038c1690634278330e906109289087908590600401615849565b6000604051808303816000875af1158015610947573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261096f91908101906158ac565b5050610aac565b60405163e00aab4b60e01b81526001600160a01b03848116600483015261ffff8a166024830152600091908c169063e00aab4b906044016000604051808303816000875af11580156109cc573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526109f491908101906158ac565b905060005b8961ffff16811015610aa95760405180604001604052808c6001600160e01b031681526020018285610a2b9190615820565b63ffffffff1690526001600160a01b038d1660009081526009602052604081208451909190859085908110610a6257610a62615833565b6020908102919091018101518252818101929092526040016000208251929091015163ffffffff16600160e01b026001600160e01b039092169190911790556001016109f9565b50505b6040805161ffff8a1681523360208201526001600160a01b03858116928201929092528a918c16907f61039ad47d0b05ec206a4450fd164cc2055af66ac594c12b8dd747e8803a90de906060015b60405180910390a350505050505050505050565b604080516101a08101825260008082526020820181905291810182905260608082018390526080820183905260a0820183905260c0820183905260e08201839052610100820183905261012082015261014081018290526101608101829052610180810191909152610b808383613c6b565b604080516101a081018252825463ffffffff8082168352640100000000820481166020840152600160401b8204169282019290925265ffffffffffff600160601b830481166060830152600160901b8304166080820152919060a083019060ff600160c01b909104166003811115610bfa57610bfa614f98565b6003811115610c0b57610c0b614f98565b8152815460ff600160c81b820481166020840152600160d01b909104161515604082015260018201546060820152600282018054608090920191610c4e90615952565b80601f0160208091040260200160405190810160405280929190818152602001828054610c7a90615952565b8015610cc75780601f10610c9c57610100808354040283529160200191610cc7565b820191906000526020600020905b815481529060010190602001808311610caa57829003601f168201915b50505091835250506003820154602082015260048201546001600160a01b0390811660408301526005909201549091166060909101529392505050565b6000816001600160a01b0316610d226000546001600160a01b031690565b6001600160a01b0316148061069a575061069a600183614284565b6000610d498989613c6b565b805490915061ffff8816908290600090610d6a90849063ffffffff166157e6565b82546101009290920a63ffffffff818102199093169183160217909155825464010000000090041615905080610db15750805463ffffffff64010000000082048116911611155b8015610dc95750805462ffffff63ffffffff90911611155b610e1f5760405162461bcd60e51b815260206004820152602160248201527f546f6f206d616e792072657175657374656420666f72207468697320636c61696044820152606d60f81b606482015260840161077e565b80546001820154610e64918b918b9165ffffffffffff600160601b8204811692600160901b83049091169163ffffffff600160401b90910416908d8d8d8d8d8d6142a9565b8054600090610e7e9061ffff8a169063ffffffff16615803565b610e899060016157e6565b60058301546003840154600485015460018087015463ffffffff959095169550610ec8946001600160a01b0394851694909216918d9190151590613f71565b81546003600160c81b90910460ff161061100f5760008861ffff1667ffffffffffffffff811115610efb57610efb6153dc565b604051908082528060200260200182016040528015610f24578160200160208202803683370190505b50905060005b8961ffff16811015610f9257610f408184615820565b62ffffff1660188c66ffffffffffffff16901b1766ffffffffffffff16828281518110610f6f57610f6f615833565b69ffffffffffffffffffff90921660209283029190910190910152600101610f2a565b5060405163213c198760e11b81526001600160a01b038c1690634278330e90610fc19033908590600401615849565b6000604051808303816000875af1158015610fe0573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261100891908101906158ac565b5050611142565b60405163e00aab4b60e01b815233600482015261ffff891660248201526000906001600160a01b038c169063e00aab4b906044016000604051808303816000875af1158015611062573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261108a91908101906158ac565b905060005b8961ffff1681101561113f5760405180604001604052808c6001600160e01b0316815260200182856110c19190615820565b63ffffffff1690526001600160a01b038d16600090815260096020526040812084519091908590859081106110f8576110f8615833565b6020908102919091018101518252818101929092526040016000208251929091015163ffffffff16600160e01b026001600160e01b0390921691909117905560010161108f565b50505b60405161ffff8916815289906001600160a01b038c16907f74f5d3254dfa39a7b1217a27d5d9b3e061eafe11720eca1cf499da2dc1eb125990602001610afa565b61118b6143e6565b611196600182614284565b156111de5760405133906001600160a01b038316907f7c0c3c84c67c85fcac635147348bfe374c24a1a93d0366d1cfe9d8853cbf89d590600090a36111dc600182614440565b505b50565b60606111ed6001614455565b67ffffffffffffffff811115611205576112056153dc565b60405190808252806020026020018201604052801561122e578160200160208202803683370190505b50905060005b61123e6001614455565b81101561128c5761125060018261445f565b82828151811061126257611262615833565b6001600160a01b0390921660209283029190910190910152806112848161598c565b915050611234565b5090565b60008061129d8484610b0e565b90506112af816040015186868661446b565b95945050505050565b604051630935e01b60e21b8152336004820152869081906001600160a01b038216906324d7806c90602401602060405180830381865afa158015611300573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061132491906159a5565b6113845760405162461bcd60e51b815260206004820152602b60248201527f57616c6c6574206973206e6f7420616e2061646d696e6973747261746f72206660448201526a1bdc8818dbdb9d1c9858dd60aa1b606482015260840161077e565b8483146113f95760405162461bcd60e51b815260206004820152603160248201527f556e657175616c206e756d626572206f6620726563697069656e747320616e6460448201527f20616d6f756e74732070726f7669646564000000000000000000000000000000606482015260840161077e565b6001600160a01b03881660009081526008602090815260408083208a8452909152812080549091906114329063ffffffff1660016157e6565b825463ffffffff9190911691506003600160c81b90910460ff16106115f25760005b878110156115ec57600087878381811061147057611470615833565b905060200201602081019061148591906159c2565b905060008161ffff1667ffffffffffffffff8111156114a6576114a66153dc565b6040519080825280602002602001820160405280156114cf578160200160208202803683370190505b50905060005b8261ffff1681101561153d576114eb8186615820565b62ffffff1660188e66ffffffffffffff16901b1766ffffffffffffff1682828151811061151a5761151a615833565b69ffffffffffffffffffff909216602092830291909101909101526001016114d5565b508c6001600160a01b0316634278330e8c8c8681811061155f5761155f615833565b90506020020160208101906115749190615150565b836040518363ffffffff1660e01b8152600401611592929190615849565b6000604051808303816000875af11580156115b1573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526115d991908101906158ac565b505061ffff169190910190600101611454565b50611796565b60005b878110156117945760008b6001600160a01b031663e00aab4b8b8b8581811061162057611620615833565b90506020020160208101906116359190615150565b8a8a8681811061164757611647615833565b905060200201602081019061165c91906159c2565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015261ffff1660248201526044016000604051808303816000875af11580156116ab573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526116d391908101906158ac565b905060005b81518110156117855760405180604001604052808d6001600160e01b0316815260200182866117079190615820565b63ffffffff1690526001600160a01b038e166000908152600960205260408120845190919085908590811061173e5761173e615833565b6020908102919091018101518252818101929092526040016000208251929091015163ffffffff16600160e01b026001600160e01b039092169190911790556001016116d8565b505191909101906001016115f5565b505b815462ffffff906001906117b09063ffffffff16846159dd565b6117ba91906159dd565b11156118085760405162461bcd60e51b815260206004820152601260248201527f546f6f206d616e79207265717565737465640000000000000000000000000000604482015260640161077e565b815460019061181d9063ffffffff16836159dd565b61182791906159dd565b8254839060009061183f90849063ffffffff166157e6565b82546101009290920a63ffffffff818102199093169183160217909155835464010000000090041615801591506118865750815463ffffffff640100000000820481169116115b156118ac57815464010000000063ffffffff82160267ffffffff00000000199091161782555b50505050505050505050565b6118c06143e6565b6118cb600182614284565b6111de5760405133906001600160a01b038316907f7e1a1a08d52e4ba0e21554733d66165fd5151f99460116223d9e3a608eec5cb190600090a36111dc600182614520565b6119186143e6565b6119226000614535565b565b336119376000546001600160a01b031690565b6001600160a01b031614806119525750611952600133614284565b6119aa5760405162461bcd60e51b8152602060048201526024808201527f41646d696e436f6e74726f6c3a204d757374206265206f776e6572206f7220616044820152633236b4b760e11b606482015260840161077e565b6003805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b604080516101a08101825260008082526020820181905291810182905260608082018390526080820183905260a0820183905260c0820183905260e0820183905261010082018390526101208201526101408101829052610160810182905261018081018290526001600160a01b038416600090815260096020908152604080832086845282528083208151808301909252546001600160e01b038116808352600160e01b90910463ffffffff16928201929092529103611b155760405163b4b5b48f60e01b8152600481018590526000906001600160a01b0387169063b4b5b48f90602401602060405180830381865afa158015611adc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b0091906159f0565b60181c66ffffffffffffff169350611b239050565b80516001600160e01b031692505b611b2d8584613c6b565b604080516101a081018252825463ffffffff8082168352640100000000820481166020840152600160401b8204169282019290925265ffffffffffff600160601b830481166060830152600160901b8304166080820152919060a083019060ff600160c01b909104166003811115611ba757611ba7614f98565b6003811115611bb857611bb8614f98565b8152815460ff600160c81b820481166020840152600160d01b909104161515604082015260018201546060820152600282018054608090920191611bfb90615952565b80601f0160208091040260200160405190810160405280929190818152602001828054611c2790615952565b8015611c745780601f10611c4957610100808354040283529160200191611c74565b820191906000526020600020905b815481529060010190602001808311611c5757829003601f168201915b50505091835250506003820154602082015260048201546001600160a01b03908116604083015260059092015490911660609091015292959294509192505050565b604051630935e01b60e21b8152336004820152839081906001600160a01b038216906324d7806c90602401602060405180830381865afa158015611cfe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d2291906159a5565b611d825760405162461bcd60e51b815260206004820152602b60248201527f57616c6c6574206973206e6f7420616e2061646d696e6973747261746f72206660448201526a1bdc8818dbdb9d1c9858dd60aa1b606482015260840161077e565b600084118015611d99575066ffffffffffffff8411155b611de55760405162461bcd60e51b815260206004820152601260248201527f496e76616c696420696e7374616e636549640000000000000000000000000000604482015260640161077e565b60006001600160a01b0386166000908152600860209081526040808320888452909152902054600160c01b900460ff166003811115611e2657611e26614f98565b14611e735760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c726561647920696e697469616c697a656400000000000000604482015260640161077e565b6000611e8560a0850160808601615a1c565b6003811115611e9657611e96614f98565b03611f095760405162461bcd60e51b815260206004820152602f60248201527f43616e6e6f7420696e697469616c697a65207769746820696e76616c6964207360448201527f746f726167652070726f746f636f6c0000000000000000000000000000000000606482015260840161077e565b611f196080840160608501615a37565b65ffffffffffff161580611f5a5750611f386080840160608501615a37565b65ffffffffffff16611f506060850160408601615a37565b65ffffffffffff16105b611fcc5760405162461bcd60e51b815260206004820152603660248201527f43616e6e6f74206861766520737461727444617465206772656174657220746860448201527f616e206f7220657175616c20746f20656e644461746500000000000000000000606482015260840161077e565b60c08301351580611ff05750611fe86040840160208501615a52565b63ffffffff16155b6120625760405162461bcd60e51b815260206004820152602c60248201527f43616e6e6f742070726f7669646520626f74682077616c6c65744d617820616e60448201527f64206d65726b6c65526f6f740000000000000000000000000000000000000000606482015260840161077e565b6000856001600160a01b031663ffa1ad746040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156120be575060408051601f3d908101601f191682019092526120bb91810190615a6d565b60015b156121175760ff8111156121145760405162461bcd60e51b815260206004820152601c60248201527f556e737570706f7274656420636f6e74726163742076657273696f6e00000000604482015260640161077e565b90505b604080516101a081019091526000815260208082019061213990870187615a52565b63ffffffff1681526020018560200160208101906121579190615a52565b63ffffffff1681526020016121726060870160408801615a37565b65ffffffffffff16815260200161218f6080870160608801615a37565b65ffffffffffff1681526020016121ac60a0870160808801615a1c565b60038111156121bd576121bd614f98565b815260ff831660208201526040016121db60c0870160a08801615a86565b1515815260c086013560208201526040016121f960e0870187615aa3565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250505090825250610100860135602082015260400161225061014087016101208801615150565b6001600160a01b0316815260200161227061016087016101408801615150565b6001600160a01b03908116909152871660009081526008602090815260408083208984528252918290208351815492850151938501516060860151608087015165ffffffffffff908116600160901b027fffffffffffffffff000000000000ffffffffffffffffffffffffffffffffffff91909216600160601b0271ffffffffffff0000000000000000000000001963ffffffff948516600160401b021671ffffffffffffffffffff0000000000000000199885166401000000000267ffffffffffffffff199098169490951693909317959095179590951691909117179182168317815560a084015190929091839160ff60c01b19167fffffffffffffff00000000000000ffffffffffffffffffffffffffffffffffff90911617600160c01b8360038111156123a3576123a3614f98565b021790555060c0820151815460e08401511515600160d01b0260ff60d01b1960ff909316600160c81b029290921661ffff60c81b1990911617178155610100820151600182015561012082015160028201906123ff9082615b38565b50610140820151600382015561016082015160048201805473ffffffffffffffffffffffffffffffffffffffff199081166001600160a01b039384161790915561018090930151600590920180549093169181169190911790915560405133815286918816907fd02727da4c6c6c111e00310108209a4de39f6817414df43ca1a10730d47c6a349060200160405180910390a3505050505050565b604051630935e01b60e21b8152336004820152869081906001600160a01b038216906324d7806c90602401602060405180830381865afa1580156124e2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061250691906159a5565b6125665760405162461bcd60e51b815260206004820152602b60248201527f57616c6c6574206973206e6f7420616e2061646d696e6973747261746f72206660448201526a1bdc8818dbdb9d1c9858dd60aa1b606482015260840161077e565b6001600160a01b03881660009081526008602090815260408083208a845290915281208054909190600160c01b900460ff1660038111156125a9576125a9614f98565b036125f65760405162461bcd60e51b815260206004820152601560248201527f436c61696d206e6f7420696e697469616c697a65640000000000000000000000604482015260640161077e565b600087600381111561260a5761260a614f98565b036126635760405162461bcd60e51b815260206004820152602360248201527f43616e6e6f742073657420696e76616c69642073746f726167652070726f746f60448201526218dbdb60ea1b606482015260840161077e565b80548790829060ff60c01b1916600160c01b83600381111561268757612687614f98565b02179055506002810161269b858783615bf8565b50805460ff60d01b1916600160d01b8715150217815560405188906001600160a01b038b16907f657336af9bb6c51d60c05491508d7d3026a24ee549d7a0af42e44c75bfaec47c90600090a3505050505050505050565b604051630935e01b60e21b8152336004820152839081906001600160a01b038216906324d7806c90602401602060405180830381865afa15801561273a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061275e91906159a5565b6127be5760405162461bcd60e51b815260206004820152602b60248201527f57616c6c6574206973206e6f7420616e2061646d696e6973747261746f72206660448201526a1bdc8818dbdb9d1c9858dd60aa1b606482015260840161077e565b6001600160a01b0385166000908152600860209081526040808320878452825280832081516101a081018352815463ffffffff80821683526401000000008204811695830195909552600160401b81049094169281019290925265ffffffffffff600160601b840481166060840152600160901b8404166080830152909160a083019060ff600160c01b90910416600381111561285d5761285d614f98565b600381111561286e5761286e614f98565b8152815460ff600160c81b820481166020840152600160d01b9091041615156040820152600182015460608201526002820180546080909201916128b190615952565b80601f01602080910402602001604051908101604052809291908181526020018280546128dd90615952565b801561292a5780601f106128ff5761010080835404028352916020019161292a565b820191906000526020600020905b81548152906001019060200180831161290d57829003601f168201915b50505091835250506003820154602082015260048201546001600160a01b039081166040830152600590920154909116606090910152905060008160a00151600381111561297a5761297a614f98565b036129c75760405162461bcd60e51b815260206004820152601560248201527f436c61696d206e6f7420696e697469616c697a65640000000000000000000000604482015260640161077e565b6000846080015160038111156129df576129df614f98565b03612a385760405162461bcd60e51b815260206004820152602360248201527f43616e6e6f742073657420696e76616c69642073746f726167652070726f746f60448201526218dbdb60ea1b606482015260840161077e565b606084015165ffffffffffff161580612a685750836060015165ffffffffffff16846040015165ffffffffffff16105b612ada5760405162461bcd60e51b815260206004820152603660248201527f43616e6e6f74206861766520737461727444617465206772656174657220746860448201527f616e206f7220657175616c20746f20656e644461746500000000000000000000606482015260840161077e565b8061018001516001600160a01b03168461014001516001600160a01b031614612b455760405162461bcd60e51b815260206004820152601b60248201527f43616e6e6f74206368616e6765207061796d656e7420746f6b656e0000000000604482015260640161077e565b835163ffffffff1615801590612b6657508351815163ffffffff9182169116115b15612b7657805163ffffffff1684525b604051806101a00160405280826000015163ffffffff168152602001856000015163ffffffff168152602001856020015163ffffffff168152602001856040015165ffffffffffff168152602001856060015165ffffffffffff16815260200185608001516003811115612bec57612bec614f98565b815260c08084015160ff1660208084019190915260a08881015115156040808601919091528984015160608087019190915260e0808c01516080808901919091526101008d0151858901526101208d01516001600160a01b03908116978901979097526101808a015187169190970152938c166000908152600884528181208c82528452819020865181549488015192880151958801519688015165ffffffffffff908116600160901b027fffffffffffffffff000000000000ffffffffffffffffffffffffffffffffffff91909816600160601b0271ffffffffffff0000000000000000000000001963ffffffff988916600160401b021671ffffffffffffffffffff0000000000000000199589166401000000000267ffffffffffffffff19909816989093169790971795909517929092169190911793909317918216841783558401519192839160ff60c01b199091167fffffffffffffff00000000000000ffffffffffffffffffffffffffffffffffff90911617600160c01b836003811115612d7b57612d7b614f98565b021790555060c0820151815460e08401511515600160d01b0260ff60d01b1960ff909316600160c81b029290921661ffff60c81b199091161717815561010082015160018201556101208201516002820190612dd79082615b38565b50610140820151600382015561016082015160048201805473ffffffffffffffffffffffffffffffffffffffff199081166001600160a01b039384161790915561018090930151600590920180549093169181169190911790915560405186918816907f657336af9bb6c51d60c05491508d7d3026a24ee549d7a0af42e44c75bfaec47c90600090a3505050505050565b604051630935e01b60e21b8152336004820152849081906001600160a01b038216906324d7806c90602401602060405180830381865afa158015612eb0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ed491906159a5565b612f345760405162461bcd60e51b815260206004820152602b60248201527f57616c6c6574206973206e6f7420616e2061646d696e6973747261746f72206660448201526a1bdc8818dbdb9d1c9858dd60aa1b606482015260840161077e565b6001600160a01b0386166000908152600860209081526040808320888452909152902060018154600160c01b900460ff166003811115612f7657612f76614f98565b148015612f8b57508054600160d01b900460ff165b612fd75760405162461bcd60e51b815260206004820152601860248201527f496e76616c69642073746f726167652070726f746f636f6c0000000000000000604482015260640161077e565b806002018585604051602001612fef93929190615cb9565b60405160208183030381529060405281600201908161300e9190615b38565b5060405186906001600160a01b038916907f657336af9bb6c51d60c05491508d7d3026a24ee549d7a0af42e44c75bfaec47c90600090a350505050505050565b60008061305b8585610b0e565b90506112af858583610100015186614592565b6001600160a01b038216600090815260096020908152604080832084845282528083208151808301835290546001600160e01b0381168252600160e01b900463ffffffff168184015281516101a08101835284815292830184905290820183905260608083018490526080830184905260a0830184905260c0830184905260e0830184905261010083018490526101208301819052610140830184905261016083018490526101808301939093529081516000906001600160e01b0316156132f3576001600160a01b038616600090815260086020908152604080832086516001600160e01b0316845282529182902082516101a081018452815463ffffffff80821683526401000000008204811694830194909452600160401b81049093169381019390935265ffffffffffff600160601b830481166060850152600160901b83041660808401529060a083019060ff600160c01b9091041660038111156131d9576131d9614f98565b60038111156131ea576131ea614f98565b8152815460ff600160c81b820481166020840152600160d01b90910416151560408201526001820154606082015260028201805460809092019161322d90615952565b80601f016020809104026020016040519081016040528092919081815260200182805461325990615952565b80156132a65780601f1061327b576101008083540402835291602001916132a6565b820191906000526020600020905b81548152906001019060200180831161328957829003601f168201915b5050509183525050600382015460208083019190915260048301546001600160a01b03908116604084015260059093015490921660609091015284015190925063ffffffff169050613576565b60405163b4b5b48f60e01b8152600481018690526000906001600160a01b0388169063b4b5b48f90602401602060405180830381865afa15801561333b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061335f91906159f0565b905066ffffffffffffff601882901c1660008190036133c05760405162461bcd60e51b815260206004820152601460248201527f546f6b656e20646f6573206e6f74206578697374000000000000000000000000604482015260640161077e565b6001600160a01b038816600090815260086020908152604080832066ffffffffffffff8516845282529182902082516101a081018452815463ffffffff80821683526401000000008204811694830194909452600160401b81049093169381019390935265ffffffffffff600160601b830481166060850152600160901b83041660808401529060a083019060ff600160c01b90910416600381111561346857613468614f98565b600381111561347957613479614f98565b8152815460ff600160c81b820481166020840152600160d01b9091041615156040820152600182015460608201526002820180546080909201916134bc90615952565b80601f01602080910402602001604051908101604052809291908181526020018280546134e890615952565b80156135355780601f1061350a57610100808354040283529160200191613535565b820191906000526020600020905b81548152906001019060200180831161351857829003601f168201915b50505091835250506003820154602082015260048201546001600160a01b03908116604083015260059092015490911660609091015293505062ffffff1690505b60408051602081019091526000815260028360a00151600381111561359d5761359d614f98565b036135dc575060408051808201909152601481527f68747470733a2f2f617277656176652e6e65742f000000000000000000000000602082015261362f565b60038360a0015160038111156135f4576135f4614f98565b0361362f575060408051808201909152600781527f697066733a2f2f0000000000000000000000000000000000000000000000000060208201525b610120830151604051613646918391602001615d3b565b60405160208183030381529060405294508260e0015161368d578461366a8361462c565b60405160200161367b929190615d6a565b60405160208183030381529060405294505b5050505092915050565b61369f6143e6565b6001600160a01b03811661371b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161077e565b6111de81614535565b336137376000546001600160a01b031690565b6001600160a01b031614806137525750613752600133614284565b6137aa5760405162461bcd60e51b8152602060048201526024808201527f41646d696e436f6e74726f6c3a204d757374206265206f776e6572206f7220616044820152633236b4b760e11b606482015260840161077e565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146137f7576040519150601f19603f3d011682016040523d82523d6000602084013e6137fc565b606091505b505090508061384d5760405162461bcd60e51b815260206004820152601e60248201527f4661696c656420746f207472616e7366657220746f2072656365697665720000604482015260640161077e565b505050565b606060006138608686610b0e565b9050828067ffffffffffffffff81111561387c5761387c6153dc565b6040519080825280602002602001820160405280156138a5578160200160208202803683370190505b50925060005b81811015613914576138ea88888561010001518989868181106138d0576138d0615833565b90506020020160208101906138e59190615a52565b614592565b8482815181106138fc576138fc615833565b911515602092830291909101909101526001016138ab565b505050949350505050565b600061392b8787613c6b565b805490915063ffffffff6401000000008204811691839160009161394f9116615dc2565b91906101000a81548163ffffffff021916908363ffffffff160217905563ffffffff1611158061398c57508054640100000000900463ffffffff16155b80156139a45750805462ffffff63ffffffff90911611155b613a165760405162461bcd60e51b815260206004820152602c60248201527f4d6178696d756d20746f6b656e7320616c7265616479206d696e74656420666f60448201527f72207468697320636c61696d0000000000000000000000000000000000000000606482015260840161077e565b80546001820154613a59918991899165ffffffffffff600160601b8204811692600160901b83049091169163ffffffff600160401b90910416908b8b8b8b614769565b600581015460038201546004830154600180850154613a8a946001600160a01b039081169493169190151581613f71565b80546003600160c81b90910460ff1610613b485780546040517fd397371900000000000000000000000000000000000000000000000000000000815233600482015262ffffff909116601888901b66ffffffff000000161760248201819052906001600160a01b0389169063d3973719906044016020604051808303816000875af1158015613b1d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b419190615a6d565b5050613c2c565b6040517f2928ca580000000000000000000000000000000000000000000000000000000081523360048201526000906001600160a01b03891690632928ca58906024016020604051808303816000875af1158015613baa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613bce9190615a6d565b6040805180820182526001600160e01b03808b168252855463ffffffff90811660208085019182526001600160a01b038f166000908152600982528681209781529690529390942091519251909316600160e01b0291909216179055505b60405186906001600160a01b038916907f5d404f369772cfab2b65717fca9bc2077efeab89a0dbec036bf0c13783154eb190600090a350505050505050565b6001600160a01b03821660009081526008602090815260408083208484529091528120908154600160c01b900460ff166003811115613cac57613cac614f98565b0361069a5760405162461bcd60e51b815260206004820152601560248201527f436c61696d206e6f7420696e697469616c697a65640000000000000000000000604482015260640161077e565b428a65ffffffffffff1611158015613d29575065ffffffffffff89161580613d295750428965ffffffffffff1610155b613d665760405162461bcd60e51b815260206004820152600e60248201526d436c61696d20696e61637469766560901b604482015260640161077e565b8615613e665761ffff861684148015613d82575061ffff861682145b613dbe5760405162461bcd60e51b815260206004820152600d60248201526c125b9d985b1a59081a5b9c1d5d609a1b604482015260640161077e565b60005b8661ffff16811015613e6057613e58828e8e8b8a8a87818110613de657613de6615833565b9050602002016020810190613dfb9190615a52565b898988818110613e0d57613e0d615833565b9050602002810190613e1f9190615de5565b808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152508b9250614930915050565b600101613dc1565b50613f63565b63ffffffff881615613f63576001600160a01b03808d1660009081526004602090815260408083208f845282528083209385168352929052908120805461ffff89169290613eb5908490615820565b90915550506001600160a01b03808d1660009081526004602090815260408083208f845282528083209385168352929052205463ffffffff89161015613f635760405162461bcd60e51b815260206004820152602260248201527f546f6f206d616e792072657175657374656420666f7220746869732077616c6c60448201527f6574000000000000000000000000000000000000000000000000000000000000606482015260840161077e565b505050505050505050505050565b60006001600160a01b0387161561406a576001600160a01b0387166323b872dd3387613fa161ffff89168b615e2f565b6040516001600160e01b031960e086901b1681526001600160a01b03938416600482015292909116602483015260448201526064016020604051808303816000875af1158015613ff5573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061401991906159a5565b6140655760405162461bcd60e51b815260206004820152601260248201527f496e73756666696369656e742066756e64730000000000000000000000000000604482015260640161077e565b61406d565b50845b6003546001600160a01b03161580614083575081155b8061411057506003546040517f45ecd02f0000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b03909116906345ecd02f90602401602060405180830381865afa1580156140ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061410e91906159a5565b155b1561413d5782614127576601c6bf52634000614130565b6602738d24e520005b61413a9082615820565b90505b60018461ffff16111561416b5761415861ffff851682615e2f565b905061416861ffff851687615e2f565b95505b803410156141bb5760405162461bcd60e51b815260206004820152600e60248201527f496e76616c696420616d6f756e74000000000000000000000000000000000000604482015260640161077e565b6001600160a01b0387161580156141d157508515155b1561427b576000856001600160a01b03168760405160006040518083038185875af1925050503d8060008114614223576040519150601f19603f3d011682016040523d82523d6000602084013e614228565b606091505b50509050806142795760405162461bcd60e51b815260206004820152601e60248201527f4661696c656420746f207472616e7366657220746f2072656365697665720000604482015260640161077e565b505b50505050505050565b6001600160a01b038116600090815260018301602052604081205415155b9392505050565b428a65ffffffffffff16111580156142d9575065ffffffffffff891615806142d95750428965ffffffffffff1610155b6143165760405162461bcd60e51b815260206004820152600e60248201526d436c61696d20696e61637469766560901b604482015260640161077e565b861561439e5761ffff861684148015614332575061ffff861682145b61436e5760405162461bcd60e51b815260206004820152600d60248201526c125b9d985b1a59081a5b9c1d5d609a1b604482015260640161077e565b60005b8661ffff16811015613e6057614396338e8e8b8a8a87818110613de657613de6615833565b600101614371565b6001600160a01b0381163314613e665760405162461bcd60e51b815260206004820152600d60248201526c125b9d985b1a59081a5b9c1d5d609a1b604482015260640161077e565b6000546001600160a01b031633146119225760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161077e565b60006142a2836001600160a01b038416614c0a565b600061069a825490565b60006142a28383614d04565b60008463ffffffff166000036144e95760405162461bcd60e51b815260206004820152603660248201527f43616e206f6e6c7920726574726965766520666f72206e6f6e2d6d65726b6c6560448201527f20636c61696d7320776974682077616c6c65744d617800000000000000000000606482015260840161077e565b506001600160a01b038083166000908152600460209081526040808320858452825280832093871683529290522054949350505050565b60006142a2836001600160a01b038416614d2e565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600062ffffff600883901c168382036145ed5760405162461bcd60e51b815260206004820152601c60248201527f43616e206f6e6c7920636865636b206d65726b6c6520636c61696d7300000000604482015260640161077e565b6001600160a01b038616600090815260056020908152604080832088845282528083209383529290522054600160ff84161b1615159050949350505050565b60608160000361466f57505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b811561469957806146838161598c565b91506146929050600a83615e5c565b9150614673565b60008167ffffffffffffffff8111156146b4576146b46153dc565b6040519080825280601f01601f1916602001820160405280156146de576020820181803683370190505b5090505b8415614761576146f36001836159dd565b9150614700600a86615e70565b61470b906030615820565b60f81b81838151811061472057614720615833565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535061475a600a86615e5c565b94506146e2565b949350505050565b428865ffffffffffff1611158015614799575065ffffffffffff871615806147995750428765ffffffffffff1610155b6147d65760405162461bcd60e51b815260206004820152600e60248201526d436c61696d20696e61637469766560901b604482015260640161077e565b84156148245761481f338b8b88888888808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152508a9250614930915050565b6118ac565b6001600160a01b038116331461486c5760405162461bcd60e51b815260206004820152600d60248201526c125b9d985b1a59081a5b9c1d5d609a1b604482015260640161077e565b63ffffffff8616156118ac576001600160a01b038a1660009081526004602090815260408083208c845282528083203384529091528120805463ffffffff891692906148b79061598c565b918290555011156118ac5760405162461bcd60e51b815260206004820152602d60248201527f4d6178696d756d20746f6b656e7320616c7265616479206d696e74656420666f60448201527f7220746869732077616c6c657400000000000000000000000000000000000000606482015260840161077e565b6000876001600160a01b0316826001600160a01b03160361499b576040516bffffffffffffffffffffffff1960608a901b1660208201526001600160e01b031960e086901b166034820152603801604051602081830303815290604052805190602001209050614ae8565b6040517f90c9a2d00000000000000000000000000000000000000000000000000000000081526001600160a01b03898116600483015283811660248301523060448301527f000000000000000000000000000000000000000000000000000000000000000091908216906390c9a2d090606401602060405180830381865afa158015614a2b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614a4f91906159a5565b614a9b5760405162461bcd60e51b815260206004820152601060248201527f496e76616c69642064656c656761746500000000000000000000000000000000604482015260640161077e565b6040516bffffffffffffffffffffffff19606085901b1660208201526001600160e01b031960e087901b166034820152603801604051602081830303815290604052805190602001209150505b614af3838683614d7d565b614b3f5760405162461bcd60e51b815260206004820152601d60248201527f436f756c64206e6f7420766572696679206d65726b6c652070726f6f66000000604482015260640161077e565b6001600160a01b0387166000908152600560209081526040808320898452825280832062ffffff600889901c16808552925290912054600160ff87161b80821615614bcc5760405162461bcd60e51b815260206004820152600e60248201527f416c7265616479206d696e746564000000000000000000000000000000000000604482015260640161077e565b6001600160a01b0390991660009081526005602090815260408083209a83529981528982209382529290925296902095909617909455505050505050565b60008181526001830160205260408120548015614cf3576000614c2e6001836159dd565b8554909150600090614c42906001906159dd565b9050818114614ca7576000866000018281548110614c6257614c62615833565b9060005260206000200154905080876000018481548110614c8557614c85615833565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080614cb857614cb8615e84565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061069a565b600091505061069a565b5092915050565b6000826000018281548110614d1b57614d1b615833565b9060005260206000200154905092915050565b6000818152600183016020526040812054614d755750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561069a565b50600061069a565b600082614d8a8584614d93565b14949350505050565b600081815b8451811015614dd857614dc482868381518110614db757614db7615833565b6020026020010151614de0565b915080614dd08161598c565b915050614d98565b509392505050565b6000818310614dfc5760008281526020849052604090206142a2565b60008381526020839052604090206142a2565b600060208284031215614e2157600080fd5b81356001600160e01b0319811681146142a257600080fd5b6001600160a01b03811681146111de57600080fd5b8035614e5981614e39565b919050565b803561ffff81168114614e5957600080fd5b60008083601f840112614e8257600080fd5b50813567ffffffffffffffff811115614e9a57600080fd5b6020830191508360208260051b8501011115614eb557600080fd5b9250929050565b60008060008060008060008060c0898b031215614ed857600080fd5b8835614ee381614e39565b975060208901359650614ef860408a01614e5e565b9550606089013567ffffffffffffffff80821115614f1557600080fd5b614f218c838d01614e70565b909750955060808b0135915080821115614f3a57600080fd5b50614f478b828c01614e70565b90945092505060a0890135614f5b81614e39565b809150509295985092959890939650565b60008060408385031215614f7f57600080fd5b8235614f8a81614e39565b946020939093013593505050565b634e487b7160e01b600052602160045260246000fd5b60048110614fcc57634e487b7160e01b600052602160045260246000fd5b9052565b60005b83811015614feb578181015183820152602001614fd3565b50506000910152565b6000815180845261500c816020860160208601614fd0565b601f01601f19169290920160200192915050565b805163ffffffff16825260006101a06020830151615046602086018263ffffffff169052565b50604083015161505e604086018263ffffffff169052565b506060830151615078606086018265ffffffffffff169052565b506080830151615092608086018265ffffffffffff169052565b5060a08301516150a560a0860182614fae565b5060c08301516150ba60c086018260ff169052565b5060e08301516150ce60e086018215159052565b506101008084015181860152506101208084015182828701526150f383870182614ff4565b925050506101408084015181860152506101608084015161511e828701826001600160a01b03169052565b5050610180928301516001600160a01b03169390920192909252919050565b6020815260006142a26020830184615020565b60006020828403121561516257600080fd5b81356142a281614e39565b6020808252825182820181905260009190848201906040850190845b818110156151ae5783516001600160a01b031683529284019291840191600101615189565b50909695505050505050565b6000806000606084860312156151cf57600080fd5b83356151da81614e39565b925060208401356151ea81614e39565b929592945050506040919091013590565b6000806000806000806080878903121561521457600080fd5b863561521f81614e39565b955060208701359450604087013567ffffffffffffffff8082111561524357600080fd5b61524f8a838b01614e70565b9096509450606089013591508082111561526857600080fd5b5061527589828a01614e70565b979a9699509497509295939492505050565b8281526040602082015260006147616040830184615020565b6000806000606084860312156152b557600080fd5b83356152c081614e39565b925060208401359150604084013567ffffffffffffffff8111156152e357600080fd5b840161016081870312156152f657600080fd5b809150509250925092565b803560048110614e5957600080fd5b80151581146111de57600080fd5b8035614e5981615310565b60008083601f84011261533b57600080fd5b50813567ffffffffffffffff81111561535357600080fd5b602083019150836020828501011115614eb557600080fd5b60008060008060008060a0878903121561538457600080fd5b863561538f81614e39565b9550602087013594506153a460408801615301565b935060608701356153b481615310565b9250608087013567ffffffffffffffff8111156153d057600080fd5b61527589828a01615329565b634e487b7160e01b600052604160045260246000fd5b604051610160810167ffffffffffffffff81118282101715615416576154166153dc565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715615445576154456153dc565b604052919050565b803563ffffffff81168114614e5957600080fd5b803565ffffffffffff81168114614e5957600080fd5b600082601f83011261548857600080fd5b813567ffffffffffffffff8111156154a2576154a26153dc565b6154b5601f8201601f191660200161541c565b8181528460208386010111156154ca57600080fd5b816020850160208301376000918101602001919091529392505050565b6000806000606084860312156154fc57600080fd5b833561550781614e39565b925060208401359150604084013567ffffffffffffffff8082111561552b57600080fd5b90850190610160828803121561554057600080fd5b6155486153f2565b6155518361544d565b815261555f6020840161544d565b602082015261557060408401615461565b604082015261558160608401615461565b606082015261559260808401615301565b60808201526155a360a0840161531e565b60a082015260c083013560c082015260e0830135828111156155c457600080fd5b6155d089828601615477565b60e083015250610100838101359082015261012091506155f1828401614e4e565b828201526101409150615605828401614e4e565b828201528093505050509250925092565b6000806000806060858703121561562c57600080fd5b843561563781614e39565b935060208501359250604085013567ffffffffffffffff81111561565a57600080fd5b61566687828801615329565b95989497509550505050565b60008060006060848603121561568757600080fd5b833561569281614e39565b9250602084013591506156a76040850161544d565b90509250925092565b6020815260006142a26020830184614ff4565b600080600080606085870312156156d957600080fd5b84356156e481614e39565b935060208501359250604085013567ffffffffffffffff81111561570757600080fd5b61566687828801614e70565b6020808252825182820181905260009190848201906040850190845b818110156151ae57835115158352928401929184019160010161572f565b60008060008060008060a0878903121561576657600080fd5b863561577181614e39565b9550602087013594506157866040880161544d565b9350606087013567ffffffffffffffff8111156157a257600080fd5b6157ae89828a01614e70565b90945092505060808701356157c281614e39565b809150509295509295509295565b634e487b7160e01b600052601160045260246000fd5b63ffffffff818116838216019080821115614cfd57614cfd6157d0565b63ffffffff828116828216039080821115614cfd57614cfd6157d0565b8082018082111561069a5761069a6157d0565b634e487b7160e01b600052603260045260246000fd5b6000604082016001600160a01b03851683526020604081850152818551808452606086019150828701935060005b8181101561589f57845169ffffffffffffffffffff1683529383019391830191600101615877565b5090979650505050505050565b600060208083850312156158bf57600080fd5b825167ffffffffffffffff808211156158d757600080fd5b818501915085601f8301126158eb57600080fd5b8151818111156158fd576158fd6153dc565b8060051b915061590e84830161541c565b818152918301840191848101908884111561592857600080fd5b938501935b838510156159465784518252938501939085019061592d565b98975050505050505050565b600181811c9082168061596657607f821691505b60208210810361598657634e487b7160e01b600052602260045260246000fd5b50919050565b60006001820161599e5761599e6157d0565b5060010190565b6000602082840312156159b757600080fd5b81516142a281615310565b6000602082840312156159d457600080fd5b6142a282614e5e565b8181038181111561069a5761069a6157d0565b600060208284031215615a0257600080fd5b815169ffffffffffffffffffff811681146142a257600080fd5b600060208284031215615a2e57600080fd5b6142a282615301565b600060208284031215615a4957600080fd5b6142a282615461565b600060208284031215615a6457600080fd5b6142a28261544d565b600060208284031215615a7f57600080fd5b5051919050565b600060208284031215615a9857600080fd5b81356142a281615310565b6000808335601e19843603018112615aba57600080fd5b83018035915067ffffffffffffffff821115615ad557600080fd5b602001915036819003821315614eb557600080fd5b601f82111561384d57600081815260208120601f850160051c81016020861015615b115750805b601f850160051c820191505b81811015615b3057828155600101615b1d565b505050505050565b815167ffffffffffffffff811115615b5257615b526153dc565b615b6681615b608454615952565b84615aea565b602080601f831160018114615b9b5760008415615b835750858301515b600019600386901b1c1916600185901b178555615b30565b600085815260208120601f198616915b82811015615bca57888601518255948401946001909101908401615bab565b5085821015615be85787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b67ffffffffffffffff831115615c1057615c106153dc565b615c2483615c1e8354615952565b83615aea565b6000601f841160018114615c585760008515615c405750838201355b600019600387901b1c1916600186901b178355615cb2565b600083815260209020601f19861690835b82811015615c895786850135825560209485019460019092019101615c69565b5086821015615ca65760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b6000808554615cc781615952565b60018281168015615cdf5760018114615cf457615d23565b60ff1984168752821515830287019450615d23565b8960005260208060002060005b85811015615d1a5781548a820152908401908201615d01565b50505082870194505b50505050838582376000930192835250909392505050565b60008351615d4d818460208801614fd0565b835190830190615d61818360208801614fd0565b01949350505050565b60008351615d7c818460208801614fd0565b7f2f000000000000000000000000000000000000000000000000000000000000009083019081528351615db6816001840160208801614fd0565b01600101949350505050565b600063ffffffff808316818103615ddb57615ddb6157d0565b6001019392505050565b6000808335601e19843603018112615dfc57600080fd5b83018035915067ffffffffffffffff821115615e1757600080fd5b6020019150600581901b3603821315614eb557600080fd5b808202811582820484141761069a5761069a6157d0565b634e487b7160e01b600052601260045260246000fd5b600082615e6b57615e6b615e46565b500490565b600082615e7f57615e7f615e46565b500690565b634e487b7160e01b600052603160045260246000fdfea26469706673582212205b2333c63b81c4de7b8bb9ca702e57ab44fc6d0d02f09cb279d8a25c5ace85c664736f6c63430008110033000000000000000000000000a8863bf1c8933f649e7b03eb72109e5e187505ea00000000000000000000000000000000000076a84fef008cdabe6409d2fe638b
Deployed Bytecode
0x6080604052600436106101b75760003560e01c8063895696f2116100ec578063cda085361161008a578063f2fde38b11610064578063f2fde38b1461051b578063f3fef3a31461053b578063f8a6137b1461055b578063fa2b068f1461058857600080fd5b8063cda08536146104b3578063d7bf81a3146104d3578063e9dc6375146104ee57600080fd5b806399c14347116100c657806399c143471461042a5780639c8eb4891461044a578063b93aa86c1461046a578063cb7997161461048a57600080fd5b8063895696f2146103be5780638da5cb5b146103ec578063975b4d951461040a57600080fd5b806342f3bef4116101595780635f2f5129116101335780635f2f5129146103495780636d73e66914610369578063715018a6146103895780637ab393921461039e57600080fd5b806342f3bef4146102a85780634baa62bf146102dd5780634daadff71461031557600080fd5b806324d7806c1161019557806324d7806c1461023357806326c858a4146102535780632d3456701461026657806331ae450b1461028657600080fd5b806301ffc9a7146101bc57806307591acc146101f15780630f79ab3914610206575b600080fd5b3480156101c857600080fd5b506101dc6101d7366004614e0f565b61059b565b60405190151581526020015b60405180910390f35b6102046101ff366004614ebc565b6106a0565b005b34801561021257600080fd5b50610226610221366004614f6c565b610b0e565b6040516101e8919061513d565b34801561023f57600080fd5b506101dc61024e366004615150565b610d04565b610204610261366004614ebc565b610d3d565b34801561027257600080fd5b50610204610281366004615150565b611183565b34801561029257600080fd5b5061029b6111e1565b6040516101e8919061516d565b3480156102b457600080fd5b506102c86102c33660046151ba565b611290565b60405163ffffffff90911681526020016101e8565b3480156102e957600080fd5b506003546102fd906001600160a01b031681565b6040516001600160a01b0390911681526020016101e8565b34801561032157600080fd5b506102fd7f00000000000000000000000000000000000076a84fef008cdabe6409d2fe638b81565b34801561035557600080fd5b506102046103643660046151fb565b6112b8565b34801561037557600080fd5b50610204610384366004615150565b6118b8565b34801561039557600080fd5b50610204611910565b3480156103aa57600080fd5b506102046103b9366004615150565b611924565b3480156103ca57600080fd5b506103de6103d9366004614f6c565b6119d9565b6040516101e8929190615287565b3480156103f857600080fd5b506000546001600160a01b03166102fd565b34801561041657600080fd5b506102046104253660046152a0565b611cb6565b34801561043657600080fd5b5061020461044536600461536b565b61249a565b34801561045657600080fd5b506102046104653660046154e7565b6126f2565b34801561047657600080fd5b50610204610485366004615616565b612e68565b34801561049657600080fd5b506104a56602738d24e5200081565b6040519081526020016101e8565b3480156104bf57600080fd5b506101dc6104ce366004615672565b61304e565b3480156104df57600080fd5b506104a56601c6bf5263400081565b3480156104fa57600080fd5b5061050e610509366004614f6c565b61306e565b6040516101e891906156b0565b34801561052757600080fd5b50610204610536366004615150565b613697565b34801561054757600080fd5b50610204610556366004614f6c565b613724565b34801561056757600080fd5b5061057b6105763660046156c3565b613852565b6040516101e89190615713565b61020461059636600461574d565b61391f565b60006001600160e01b031982167ff22e7ed50000000000000000000000000000000000000000000000000000000014806105fe57506001600160e01b031982167f25020c6f00000000000000000000000000000000000000000000000000000000145b8061063257506001600160e01b031982167fe9dc637500000000000000000000000000000000000000000000000000000000145b8061066657506001600160e01b031982167f553e757e00000000000000000000000000000000000000000000000000000000145b8061069a57506001600160e01b031982167f01ffc9a700000000000000000000000000000000000000000000000000000000145b92915050565b60006106ac8989613c6b565b805490915061ffff88169082906000906106cd90849063ffffffff166157e6565b82546101009290920a63ffffffff8181021990931691831602179091558254640100000000900416159050806107145750805463ffffffff64010000000082048116911611155b801561072c5750805462ffffff63ffffffff90911611155b6107875760405162461bcd60e51b815260206004820152602160248201527f546f6f206d616e792072657175657374656420666f72207468697320636c61696044820152606d60f81b60648201526084015b60405180910390fd5b805460018201546107cc918b918b9165ffffffffffff600160601b8204811692600160901b83049091169163ffffffff600160401b90910416908d8d8d8d8d8d613cf9565b80546000906107e69061ffff8a169063ffffffff16615803565b6107f19060016157e6565b600583015460038401546004850154600186015463ffffffff94909416945061082f936001600160a01b0393841693909116908c9015156000613f71565b81546003600160c81b90910460ff16106109765760008861ffff1667ffffffffffffffff811115610862576108626153dc565b60405190808252806020026020018201604052801561088b578160200160208202803683370190505b50905060005b8961ffff168110156108f9576108a78184615820565b62ffffff1660188c66ffffffffffffff16901b1766ffffffffffffff168282815181106108d6576108d6615833565b69ffffffffffffffffffff90921660209283029190910190910152600101610891565b5060405163213c198760e11b81526001600160a01b038c1690634278330e906109289087908590600401615849565b6000604051808303816000875af1158015610947573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261096f91908101906158ac565b5050610aac565b60405163e00aab4b60e01b81526001600160a01b03848116600483015261ffff8a166024830152600091908c169063e00aab4b906044016000604051808303816000875af11580156109cc573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526109f491908101906158ac565b905060005b8961ffff16811015610aa95760405180604001604052808c6001600160e01b031681526020018285610a2b9190615820565b63ffffffff1690526001600160a01b038d1660009081526009602052604081208451909190859085908110610a6257610a62615833565b6020908102919091018101518252818101929092526040016000208251929091015163ffffffff16600160e01b026001600160e01b039092169190911790556001016109f9565b50505b6040805161ffff8a1681523360208201526001600160a01b03858116928201929092528a918c16907f61039ad47d0b05ec206a4450fd164cc2055af66ac594c12b8dd747e8803a90de906060015b60405180910390a350505050505050505050565b604080516101a08101825260008082526020820181905291810182905260608082018390526080820183905260a0820183905260c0820183905260e08201839052610100820183905261012082015261014081018290526101608101829052610180810191909152610b808383613c6b565b604080516101a081018252825463ffffffff8082168352640100000000820481166020840152600160401b8204169282019290925265ffffffffffff600160601b830481166060830152600160901b8304166080820152919060a083019060ff600160c01b909104166003811115610bfa57610bfa614f98565b6003811115610c0b57610c0b614f98565b8152815460ff600160c81b820481166020840152600160d01b909104161515604082015260018201546060820152600282018054608090920191610c4e90615952565b80601f0160208091040260200160405190810160405280929190818152602001828054610c7a90615952565b8015610cc75780601f10610c9c57610100808354040283529160200191610cc7565b820191906000526020600020905b815481529060010190602001808311610caa57829003601f168201915b50505091835250506003820154602082015260048201546001600160a01b0390811660408301526005909201549091166060909101529392505050565b6000816001600160a01b0316610d226000546001600160a01b031690565b6001600160a01b0316148061069a575061069a600183614284565b6000610d498989613c6b565b805490915061ffff8816908290600090610d6a90849063ffffffff166157e6565b82546101009290920a63ffffffff818102199093169183160217909155825464010000000090041615905080610db15750805463ffffffff64010000000082048116911611155b8015610dc95750805462ffffff63ffffffff90911611155b610e1f5760405162461bcd60e51b815260206004820152602160248201527f546f6f206d616e792072657175657374656420666f72207468697320636c61696044820152606d60f81b606482015260840161077e565b80546001820154610e64918b918b9165ffffffffffff600160601b8204811692600160901b83049091169163ffffffff600160401b90910416908d8d8d8d8d8d6142a9565b8054600090610e7e9061ffff8a169063ffffffff16615803565b610e899060016157e6565b60058301546003840154600485015460018087015463ffffffff959095169550610ec8946001600160a01b0394851694909216918d9190151590613f71565b81546003600160c81b90910460ff161061100f5760008861ffff1667ffffffffffffffff811115610efb57610efb6153dc565b604051908082528060200260200182016040528015610f24578160200160208202803683370190505b50905060005b8961ffff16811015610f9257610f408184615820565b62ffffff1660188c66ffffffffffffff16901b1766ffffffffffffff16828281518110610f6f57610f6f615833565b69ffffffffffffffffffff90921660209283029190910190910152600101610f2a565b5060405163213c198760e11b81526001600160a01b038c1690634278330e90610fc19033908590600401615849565b6000604051808303816000875af1158015610fe0573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261100891908101906158ac565b5050611142565b60405163e00aab4b60e01b815233600482015261ffff891660248201526000906001600160a01b038c169063e00aab4b906044016000604051808303816000875af1158015611062573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261108a91908101906158ac565b905060005b8961ffff1681101561113f5760405180604001604052808c6001600160e01b0316815260200182856110c19190615820565b63ffffffff1690526001600160a01b038d16600090815260096020526040812084519091908590859081106110f8576110f8615833565b6020908102919091018101518252818101929092526040016000208251929091015163ffffffff16600160e01b026001600160e01b0390921691909117905560010161108f565b50505b60405161ffff8916815289906001600160a01b038c16907f74f5d3254dfa39a7b1217a27d5d9b3e061eafe11720eca1cf499da2dc1eb125990602001610afa565b61118b6143e6565b611196600182614284565b156111de5760405133906001600160a01b038316907f7c0c3c84c67c85fcac635147348bfe374c24a1a93d0366d1cfe9d8853cbf89d590600090a36111dc600182614440565b505b50565b60606111ed6001614455565b67ffffffffffffffff811115611205576112056153dc565b60405190808252806020026020018201604052801561122e578160200160208202803683370190505b50905060005b61123e6001614455565b81101561128c5761125060018261445f565b82828151811061126257611262615833565b6001600160a01b0390921660209283029190910190910152806112848161598c565b915050611234565b5090565b60008061129d8484610b0e565b90506112af816040015186868661446b565b95945050505050565b604051630935e01b60e21b8152336004820152869081906001600160a01b038216906324d7806c90602401602060405180830381865afa158015611300573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061132491906159a5565b6113845760405162461bcd60e51b815260206004820152602b60248201527f57616c6c6574206973206e6f7420616e2061646d696e6973747261746f72206660448201526a1bdc8818dbdb9d1c9858dd60aa1b606482015260840161077e565b8483146113f95760405162461bcd60e51b815260206004820152603160248201527f556e657175616c206e756d626572206f6620726563697069656e747320616e6460448201527f20616d6f756e74732070726f7669646564000000000000000000000000000000606482015260840161077e565b6001600160a01b03881660009081526008602090815260408083208a8452909152812080549091906114329063ffffffff1660016157e6565b825463ffffffff9190911691506003600160c81b90910460ff16106115f25760005b878110156115ec57600087878381811061147057611470615833565b905060200201602081019061148591906159c2565b905060008161ffff1667ffffffffffffffff8111156114a6576114a66153dc565b6040519080825280602002602001820160405280156114cf578160200160208202803683370190505b50905060005b8261ffff1681101561153d576114eb8186615820565b62ffffff1660188e66ffffffffffffff16901b1766ffffffffffffff1682828151811061151a5761151a615833565b69ffffffffffffffffffff909216602092830291909101909101526001016114d5565b508c6001600160a01b0316634278330e8c8c8681811061155f5761155f615833565b90506020020160208101906115749190615150565b836040518363ffffffff1660e01b8152600401611592929190615849565b6000604051808303816000875af11580156115b1573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526115d991908101906158ac565b505061ffff169190910190600101611454565b50611796565b60005b878110156117945760008b6001600160a01b031663e00aab4b8b8b8581811061162057611620615833565b90506020020160208101906116359190615150565b8a8a8681811061164757611647615833565b905060200201602081019061165c91906159c2565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015261ffff1660248201526044016000604051808303816000875af11580156116ab573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526116d391908101906158ac565b905060005b81518110156117855760405180604001604052808d6001600160e01b0316815260200182866117079190615820565b63ffffffff1690526001600160a01b038e166000908152600960205260408120845190919085908590811061173e5761173e615833565b6020908102919091018101518252818101929092526040016000208251929091015163ffffffff16600160e01b026001600160e01b039092169190911790556001016116d8565b505191909101906001016115f5565b505b815462ffffff906001906117b09063ffffffff16846159dd565b6117ba91906159dd565b11156118085760405162461bcd60e51b815260206004820152601260248201527f546f6f206d616e79207265717565737465640000000000000000000000000000604482015260640161077e565b815460019061181d9063ffffffff16836159dd565b61182791906159dd565b8254839060009061183f90849063ffffffff166157e6565b82546101009290920a63ffffffff818102199093169183160217909155835464010000000090041615801591506118865750815463ffffffff640100000000820481169116115b156118ac57815464010000000063ffffffff82160267ffffffff00000000199091161782555b50505050505050505050565b6118c06143e6565b6118cb600182614284565b6111de5760405133906001600160a01b038316907f7e1a1a08d52e4ba0e21554733d66165fd5151f99460116223d9e3a608eec5cb190600090a36111dc600182614520565b6119186143e6565b6119226000614535565b565b336119376000546001600160a01b031690565b6001600160a01b031614806119525750611952600133614284565b6119aa5760405162461bcd60e51b8152602060048201526024808201527f41646d696e436f6e74726f6c3a204d757374206265206f776e6572206f7220616044820152633236b4b760e11b606482015260840161077e565b6003805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b604080516101a08101825260008082526020820181905291810182905260608082018390526080820183905260a0820183905260c0820183905260e0820183905261010082018390526101208201526101408101829052610160810182905261018081018290526001600160a01b038416600090815260096020908152604080832086845282528083208151808301909252546001600160e01b038116808352600160e01b90910463ffffffff16928201929092529103611b155760405163b4b5b48f60e01b8152600481018590526000906001600160a01b0387169063b4b5b48f90602401602060405180830381865afa158015611adc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b0091906159f0565b60181c66ffffffffffffff169350611b239050565b80516001600160e01b031692505b611b2d8584613c6b565b604080516101a081018252825463ffffffff8082168352640100000000820481166020840152600160401b8204169282019290925265ffffffffffff600160601b830481166060830152600160901b8304166080820152919060a083019060ff600160c01b909104166003811115611ba757611ba7614f98565b6003811115611bb857611bb8614f98565b8152815460ff600160c81b820481166020840152600160d01b909104161515604082015260018201546060820152600282018054608090920191611bfb90615952565b80601f0160208091040260200160405190810160405280929190818152602001828054611c2790615952565b8015611c745780601f10611c4957610100808354040283529160200191611c74565b820191906000526020600020905b815481529060010190602001808311611c5757829003601f168201915b50505091835250506003820154602082015260048201546001600160a01b03908116604083015260059092015490911660609091015292959294509192505050565b604051630935e01b60e21b8152336004820152839081906001600160a01b038216906324d7806c90602401602060405180830381865afa158015611cfe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d2291906159a5565b611d825760405162461bcd60e51b815260206004820152602b60248201527f57616c6c6574206973206e6f7420616e2061646d696e6973747261746f72206660448201526a1bdc8818dbdb9d1c9858dd60aa1b606482015260840161077e565b600084118015611d99575066ffffffffffffff8411155b611de55760405162461bcd60e51b815260206004820152601260248201527f496e76616c696420696e7374616e636549640000000000000000000000000000604482015260640161077e565b60006001600160a01b0386166000908152600860209081526040808320888452909152902054600160c01b900460ff166003811115611e2657611e26614f98565b14611e735760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c726561647920696e697469616c697a656400000000000000604482015260640161077e565b6000611e8560a0850160808601615a1c565b6003811115611e9657611e96614f98565b03611f095760405162461bcd60e51b815260206004820152602f60248201527f43616e6e6f7420696e697469616c697a65207769746820696e76616c6964207360448201527f746f726167652070726f746f636f6c0000000000000000000000000000000000606482015260840161077e565b611f196080840160608501615a37565b65ffffffffffff161580611f5a5750611f386080840160608501615a37565b65ffffffffffff16611f506060850160408601615a37565b65ffffffffffff16105b611fcc5760405162461bcd60e51b815260206004820152603660248201527f43616e6e6f74206861766520737461727444617465206772656174657220746860448201527f616e206f7220657175616c20746f20656e644461746500000000000000000000606482015260840161077e565b60c08301351580611ff05750611fe86040840160208501615a52565b63ffffffff16155b6120625760405162461bcd60e51b815260206004820152602c60248201527f43616e6e6f742070726f7669646520626f74682077616c6c65744d617820616e60448201527f64206d65726b6c65526f6f740000000000000000000000000000000000000000606482015260840161077e565b6000856001600160a01b031663ffa1ad746040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156120be575060408051601f3d908101601f191682019092526120bb91810190615a6d565b60015b156121175760ff8111156121145760405162461bcd60e51b815260206004820152601c60248201527f556e737570706f7274656420636f6e74726163742076657273696f6e00000000604482015260640161077e565b90505b604080516101a081019091526000815260208082019061213990870187615a52565b63ffffffff1681526020018560200160208101906121579190615a52565b63ffffffff1681526020016121726060870160408801615a37565b65ffffffffffff16815260200161218f6080870160608801615a37565b65ffffffffffff1681526020016121ac60a0870160808801615a1c565b60038111156121bd576121bd614f98565b815260ff831660208201526040016121db60c0870160a08801615a86565b1515815260c086013560208201526040016121f960e0870187615aa3565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250505090825250610100860135602082015260400161225061014087016101208801615150565b6001600160a01b0316815260200161227061016087016101408801615150565b6001600160a01b03908116909152871660009081526008602090815260408083208984528252918290208351815492850151938501516060860151608087015165ffffffffffff908116600160901b027fffffffffffffffff000000000000ffffffffffffffffffffffffffffffffffff91909216600160601b0271ffffffffffff0000000000000000000000001963ffffffff948516600160401b021671ffffffffffffffffffff0000000000000000199885166401000000000267ffffffffffffffff199098169490951693909317959095179590951691909117179182168317815560a084015190929091839160ff60c01b19167fffffffffffffff00000000000000ffffffffffffffffffffffffffffffffffff90911617600160c01b8360038111156123a3576123a3614f98565b021790555060c0820151815460e08401511515600160d01b0260ff60d01b1960ff909316600160c81b029290921661ffff60c81b1990911617178155610100820151600182015561012082015160028201906123ff9082615b38565b50610140820151600382015561016082015160048201805473ffffffffffffffffffffffffffffffffffffffff199081166001600160a01b039384161790915561018090930151600590920180549093169181169190911790915560405133815286918816907fd02727da4c6c6c111e00310108209a4de39f6817414df43ca1a10730d47c6a349060200160405180910390a3505050505050565b604051630935e01b60e21b8152336004820152869081906001600160a01b038216906324d7806c90602401602060405180830381865afa1580156124e2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061250691906159a5565b6125665760405162461bcd60e51b815260206004820152602b60248201527f57616c6c6574206973206e6f7420616e2061646d696e6973747261746f72206660448201526a1bdc8818dbdb9d1c9858dd60aa1b606482015260840161077e565b6001600160a01b03881660009081526008602090815260408083208a845290915281208054909190600160c01b900460ff1660038111156125a9576125a9614f98565b036125f65760405162461bcd60e51b815260206004820152601560248201527f436c61696d206e6f7420696e697469616c697a65640000000000000000000000604482015260640161077e565b600087600381111561260a5761260a614f98565b036126635760405162461bcd60e51b815260206004820152602360248201527f43616e6e6f742073657420696e76616c69642073746f726167652070726f746f60448201526218dbdb60ea1b606482015260840161077e565b80548790829060ff60c01b1916600160c01b83600381111561268757612687614f98565b02179055506002810161269b858783615bf8565b50805460ff60d01b1916600160d01b8715150217815560405188906001600160a01b038b16907f657336af9bb6c51d60c05491508d7d3026a24ee549d7a0af42e44c75bfaec47c90600090a3505050505050505050565b604051630935e01b60e21b8152336004820152839081906001600160a01b038216906324d7806c90602401602060405180830381865afa15801561273a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061275e91906159a5565b6127be5760405162461bcd60e51b815260206004820152602b60248201527f57616c6c6574206973206e6f7420616e2061646d696e6973747261746f72206660448201526a1bdc8818dbdb9d1c9858dd60aa1b606482015260840161077e565b6001600160a01b0385166000908152600860209081526040808320878452825280832081516101a081018352815463ffffffff80821683526401000000008204811695830195909552600160401b81049094169281019290925265ffffffffffff600160601b840481166060840152600160901b8404166080830152909160a083019060ff600160c01b90910416600381111561285d5761285d614f98565b600381111561286e5761286e614f98565b8152815460ff600160c81b820481166020840152600160d01b9091041615156040820152600182015460608201526002820180546080909201916128b190615952565b80601f01602080910402602001604051908101604052809291908181526020018280546128dd90615952565b801561292a5780601f106128ff5761010080835404028352916020019161292a565b820191906000526020600020905b81548152906001019060200180831161290d57829003601f168201915b50505091835250506003820154602082015260048201546001600160a01b039081166040830152600590920154909116606090910152905060008160a00151600381111561297a5761297a614f98565b036129c75760405162461bcd60e51b815260206004820152601560248201527f436c61696d206e6f7420696e697469616c697a65640000000000000000000000604482015260640161077e565b6000846080015160038111156129df576129df614f98565b03612a385760405162461bcd60e51b815260206004820152602360248201527f43616e6e6f742073657420696e76616c69642073746f726167652070726f746f60448201526218dbdb60ea1b606482015260840161077e565b606084015165ffffffffffff161580612a685750836060015165ffffffffffff16846040015165ffffffffffff16105b612ada5760405162461bcd60e51b815260206004820152603660248201527f43616e6e6f74206861766520737461727444617465206772656174657220746860448201527f616e206f7220657175616c20746f20656e644461746500000000000000000000606482015260840161077e565b8061018001516001600160a01b03168461014001516001600160a01b031614612b455760405162461bcd60e51b815260206004820152601b60248201527f43616e6e6f74206368616e6765207061796d656e7420746f6b656e0000000000604482015260640161077e565b835163ffffffff1615801590612b6657508351815163ffffffff9182169116115b15612b7657805163ffffffff1684525b604051806101a00160405280826000015163ffffffff168152602001856000015163ffffffff168152602001856020015163ffffffff168152602001856040015165ffffffffffff168152602001856060015165ffffffffffff16815260200185608001516003811115612bec57612bec614f98565b815260c08084015160ff1660208084019190915260a08881015115156040808601919091528984015160608087019190915260e0808c01516080808901919091526101008d0151858901526101208d01516001600160a01b03908116978901979097526101808a015187169190970152938c166000908152600884528181208c82528452819020865181549488015192880151958801519688015165ffffffffffff908116600160901b027fffffffffffffffff000000000000ffffffffffffffffffffffffffffffffffff91909816600160601b0271ffffffffffff0000000000000000000000001963ffffffff988916600160401b021671ffffffffffffffffffff0000000000000000199589166401000000000267ffffffffffffffff19909816989093169790971795909517929092169190911793909317918216841783558401519192839160ff60c01b199091167fffffffffffffff00000000000000ffffffffffffffffffffffffffffffffffff90911617600160c01b836003811115612d7b57612d7b614f98565b021790555060c0820151815460e08401511515600160d01b0260ff60d01b1960ff909316600160c81b029290921661ffff60c81b199091161717815561010082015160018201556101208201516002820190612dd79082615b38565b50610140820151600382015561016082015160048201805473ffffffffffffffffffffffffffffffffffffffff199081166001600160a01b039384161790915561018090930151600590920180549093169181169190911790915560405186918816907f657336af9bb6c51d60c05491508d7d3026a24ee549d7a0af42e44c75bfaec47c90600090a3505050505050565b604051630935e01b60e21b8152336004820152849081906001600160a01b038216906324d7806c90602401602060405180830381865afa158015612eb0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ed491906159a5565b612f345760405162461bcd60e51b815260206004820152602b60248201527f57616c6c6574206973206e6f7420616e2061646d696e6973747261746f72206660448201526a1bdc8818dbdb9d1c9858dd60aa1b606482015260840161077e565b6001600160a01b0386166000908152600860209081526040808320888452909152902060018154600160c01b900460ff166003811115612f7657612f76614f98565b148015612f8b57508054600160d01b900460ff165b612fd75760405162461bcd60e51b815260206004820152601860248201527f496e76616c69642073746f726167652070726f746f636f6c0000000000000000604482015260640161077e565b806002018585604051602001612fef93929190615cb9565b60405160208183030381529060405281600201908161300e9190615b38565b5060405186906001600160a01b038916907f657336af9bb6c51d60c05491508d7d3026a24ee549d7a0af42e44c75bfaec47c90600090a350505050505050565b60008061305b8585610b0e565b90506112af858583610100015186614592565b6001600160a01b038216600090815260096020908152604080832084845282528083208151808301835290546001600160e01b0381168252600160e01b900463ffffffff168184015281516101a08101835284815292830184905290820183905260608083018490526080830184905260a0830184905260c0830184905260e0830184905261010083018490526101208301819052610140830184905261016083018490526101808301939093529081516000906001600160e01b0316156132f3576001600160a01b038616600090815260086020908152604080832086516001600160e01b0316845282529182902082516101a081018452815463ffffffff80821683526401000000008204811694830194909452600160401b81049093169381019390935265ffffffffffff600160601b830481166060850152600160901b83041660808401529060a083019060ff600160c01b9091041660038111156131d9576131d9614f98565b60038111156131ea576131ea614f98565b8152815460ff600160c81b820481166020840152600160d01b90910416151560408201526001820154606082015260028201805460809092019161322d90615952565b80601f016020809104026020016040519081016040528092919081815260200182805461325990615952565b80156132a65780601f1061327b576101008083540402835291602001916132a6565b820191906000526020600020905b81548152906001019060200180831161328957829003601f168201915b5050509183525050600382015460208083019190915260048301546001600160a01b03908116604084015260059093015490921660609091015284015190925063ffffffff169050613576565b60405163b4b5b48f60e01b8152600481018690526000906001600160a01b0388169063b4b5b48f90602401602060405180830381865afa15801561333b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061335f91906159f0565b905066ffffffffffffff601882901c1660008190036133c05760405162461bcd60e51b815260206004820152601460248201527f546f6b656e20646f6573206e6f74206578697374000000000000000000000000604482015260640161077e565b6001600160a01b038816600090815260086020908152604080832066ffffffffffffff8516845282529182902082516101a081018452815463ffffffff80821683526401000000008204811694830194909452600160401b81049093169381019390935265ffffffffffff600160601b830481166060850152600160901b83041660808401529060a083019060ff600160c01b90910416600381111561346857613468614f98565b600381111561347957613479614f98565b8152815460ff600160c81b820481166020840152600160d01b9091041615156040820152600182015460608201526002820180546080909201916134bc90615952565b80601f01602080910402602001604051908101604052809291908181526020018280546134e890615952565b80156135355780601f1061350a57610100808354040283529160200191613535565b820191906000526020600020905b81548152906001019060200180831161351857829003601f168201915b50505091835250506003820154602082015260048201546001600160a01b03908116604083015260059092015490911660609091015293505062ffffff1690505b60408051602081019091526000815260028360a00151600381111561359d5761359d614f98565b036135dc575060408051808201909152601481527f68747470733a2f2f617277656176652e6e65742f000000000000000000000000602082015261362f565b60038360a0015160038111156135f4576135f4614f98565b0361362f575060408051808201909152600781527f697066733a2f2f0000000000000000000000000000000000000000000000000060208201525b610120830151604051613646918391602001615d3b565b60405160208183030381529060405294508260e0015161368d578461366a8361462c565b60405160200161367b929190615d6a565b60405160208183030381529060405294505b5050505092915050565b61369f6143e6565b6001600160a01b03811661371b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161077e565b6111de81614535565b336137376000546001600160a01b031690565b6001600160a01b031614806137525750613752600133614284565b6137aa5760405162461bcd60e51b8152602060048201526024808201527f41646d696e436f6e74726f6c3a204d757374206265206f776e6572206f7220616044820152633236b4b760e11b606482015260840161077e565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146137f7576040519150601f19603f3d011682016040523d82523d6000602084013e6137fc565b606091505b505090508061384d5760405162461bcd60e51b815260206004820152601e60248201527f4661696c656420746f207472616e7366657220746f2072656365697665720000604482015260640161077e565b505050565b606060006138608686610b0e565b9050828067ffffffffffffffff81111561387c5761387c6153dc565b6040519080825280602002602001820160405280156138a5578160200160208202803683370190505b50925060005b81811015613914576138ea88888561010001518989868181106138d0576138d0615833565b90506020020160208101906138e59190615a52565b614592565b8482815181106138fc576138fc615833565b911515602092830291909101909101526001016138ab565b505050949350505050565b600061392b8787613c6b565b805490915063ffffffff6401000000008204811691839160009161394f9116615dc2565b91906101000a81548163ffffffff021916908363ffffffff160217905563ffffffff1611158061398c57508054640100000000900463ffffffff16155b80156139a45750805462ffffff63ffffffff90911611155b613a165760405162461bcd60e51b815260206004820152602c60248201527f4d6178696d756d20746f6b656e7320616c7265616479206d696e74656420666f60448201527f72207468697320636c61696d0000000000000000000000000000000000000000606482015260840161077e565b80546001820154613a59918991899165ffffffffffff600160601b8204811692600160901b83049091169163ffffffff600160401b90910416908b8b8b8b614769565b600581015460038201546004830154600180850154613a8a946001600160a01b039081169493169190151581613f71565b80546003600160c81b90910460ff1610613b485780546040517fd397371900000000000000000000000000000000000000000000000000000000815233600482015262ffffff909116601888901b66ffffffff000000161760248201819052906001600160a01b0389169063d3973719906044016020604051808303816000875af1158015613b1d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b419190615a6d565b5050613c2c565b6040517f2928ca580000000000000000000000000000000000000000000000000000000081523360048201526000906001600160a01b03891690632928ca58906024016020604051808303816000875af1158015613baa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613bce9190615a6d565b6040805180820182526001600160e01b03808b168252855463ffffffff90811660208085019182526001600160a01b038f166000908152600982528681209781529690529390942091519251909316600160e01b0291909216179055505b60405186906001600160a01b038916907f5d404f369772cfab2b65717fca9bc2077efeab89a0dbec036bf0c13783154eb190600090a350505050505050565b6001600160a01b03821660009081526008602090815260408083208484529091528120908154600160c01b900460ff166003811115613cac57613cac614f98565b0361069a5760405162461bcd60e51b815260206004820152601560248201527f436c61696d206e6f7420696e697469616c697a65640000000000000000000000604482015260640161077e565b428a65ffffffffffff1611158015613d29575065ffffffffffff89161580613d295750428965ffffffffffff1610155b613d665760405162461bcd60e51b815260206004820152600e60248201526d436c61696d20696e61637469766560901b604482015260640161077e565b8615613e665761ffff861684148015613d82575061ffff861682145b613dbe5760405162461bcd60e51b815260206004820152600d60248201526c125b9d985b1a59081a5b9c1d5d609a1b604482015260640161077e565b60005b8661ffff16811015613e6057613e58828e8e8b8a8a87818110613de657613de6615833565b9050602002016020810190613dfb9190615a52565b898988818110613e0d57613e0d615833565b9050602002810190613e1f9190615de5565b808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152508b9250614930915050565b600101613dc1565b50613f63565b63ffffffff881615613f63576001600160a01b03808d1660009081526004602090815260408083208f845282528083209385168352929052908120805461ffff89169290613eb5908490615820565b90915550506001600160a01b03808d1660009081526004602090815260408083208f845282528083209385168352929052205463ffffffff89161015613f635760405162461bcd60e51b815260206004820152602260248201527f546f6f206d616e792072657175657374656420666f7220746869732077616c6c60448201527f6574000000000000000000000000000000000000000000000000000000000000606482015260840161077e565b505050505050505050505050565b60006001600160a01b0387161561406a576001600160a01b0387166323b872dd3387613fa161ffff89168b615e2f565b6040516001600160e01b031960e086901b1681526001600160a01b03938416600482015292909116602483015260448201526064016020604051808303816000875af1158015613ff5573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061401991906159a5565b6140655760405162461bcd60e51b815260206004820152601260248201527f496e73756666696369656e742066756e64730000000000000000000000000000604482015260640161077e565b61406d565b50845b6003546001600160a01b03161580614083575081155b8061411057506003546040517f45ecd02f0000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b03909116906345ecd02f90602401602060405180830381865afa1580156140ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061410e91906159a5565b155b1561413d5782614127576601c6bf52634000614130565b6602738d24e520005b61413a9082615820565b90505b60018461ffff16111561416b5761415861ffff851682615e2f565b905061416861ffff851687615e2f565b95505b803410156141bb5760405162461bcd60e51b815260206004820152600e60248201527f496e76616c696420616d6f756e74000000000000000000000000000000000000604482015260640161077e565b6001600160a01b0387161580156141d157508515155b1561427b576000856001600160a01b03168760405160006040518083038185875af1925050503d8060008114614223576040519150601f19603f3d011682016040523d82523d6000602084013e614228565b606091505b50509050806142795760405162461bcd60e51b815260206004820152601e60248201527f4661696c656420746f207472616e7366657220746f2072656365697665720000604482015260640161077e565b505b50505050505050565b6001600160a01b038116600090815260018301602052604081205415155b9392505050565b428a65ffffffffffff16111580156142d9575065ffffffffffff891615806142d95750428965ffffffffffff1610155b6143165760405162461bcd60e51b815260206004820152600e60248201526d436c61696d20696e61637469766560901b604482015260640161077e565b861561439e5761ffff861684148015614332575061ffff861682145b61436e5760405162461bcd60e51b815260206004820152600d60248201526c125b9d985b1a59081a5b9c1d5d609a1b604482015260640161077e565b60005b8661ffff16811015613e6057614396338e8e8b8a8a87818110613de657613de6615833565b600101614371565b6001600160a01b0381163314613e665760405162461bcd60e51b815260206004820152600d60248201526c125b9d985b1a59081a5b9c1d5d609a1b604482015260640161077e565b6000546001600160a01b031633146119225760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161077e565b60006142a2836001600160a01b038416614c0a565b600061069a825490565b60006142a28383614d04565b60008463ffffffff166000036144e95760405162461bcd60e51b815260206004820152603660248201527f43616e206f6e6c7920726574726965766520666f72206e6f6e2d6d65726b6c6560448201527f20636c61696d7320776974682077616c6c65744d617800000000000000000000606482015260840161077e565b506001600160a01b038083166000908152600460209081526040808320858452825280832093871683529290522054949350505050565b60006142a2836001600160a01b038416614d2e565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600062ffffff600883901c168382036145ed5760405162461bcd60e51b815260206004820152601c60248201527f43616e206f6e6c7920636865636b206d65726b6c6520636c61696d7300000000604482015260640161077e565b6001600160a01b038616600090815260056020908152604080832088845282528083209383529290522054600160ff84161b1615159050949350505050565b60608160000361466f57505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b811561469957806146838161598c565b91506146929050600a83615e5c565b9150614673565b60008167ffffffffffffffff8111156146b4576146b46153dc565b6040519080825280601f01601f1916602001820160405280156146de576020820181803683370190505b5090505b8415614761576146f36001836159dd565b9150614700600a86615e70565b61470b906030615820565b60f81b81838151811061472057614720615833565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535061475a600a86615e5c565b94506146e2565b949350505050565b428865ffffffffffff1611158015614799575065ffffffffffff871615806147995750428765ffffffffffff1610155b6147d65760405162461bcd60e51b815260206004820152600e60248201526d436c61696d20696e61637469766560901b604482015260640161077e565b84156148245761481f338b8b88888888808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152508a9250614930915050565b6118ac565b6001600160a01b038116331461486c5760405162461bcd60e51b815260206004820152600d60248201526c125b9d985b1a59081a5b9c1d5d609a1b604482015260640161077e565b63ffffffff8616156118ac576001600160a01b038a1660009081526004602090815260408083208c845282528083203384529091528120805463ffffffff891692906148b79061598c565b918290555011156118ac5760405162461bcd60e51b815260206004820152602d60248201527f4d6178696d756d20746f6b656e7320616c7265616479206d696e74656420666f60448201527f7220746869732077616c6c657400000000000000000000000000000000000000606482015260840161077e565b6000876001600160a01b0316826001600160a01b03160361499b576040516bffffffffffffffffffffffff1960608a901b1660208201526001600160e01b031960e086901b166034820152603801604051602081830303815290604052805190602001209050614ae8565b6040517f90c9a2d00000000000000000000000000000000000000000000000000000000081526001600160a01b03898116600483015283811660248301523060448301527f00000000000000000000000000000000000076a84fef008cdabe6409d2fe638b91908216906390c9a2d090606401602060405180830381865afa158015614a2b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614a4f91906159a5565b614a9b5760405162461bcd60e51b815260206004820152601060248201527f496e76616c69642064656c656761746500000000000000000000000000000000604482015260640161077e565b6040516bffffffffffffffffffffffff19606085901b1660208201526001600160e01b031960e087901b166034820152603801604051602081830303815290604052805190602001209150505b614af3838683614d7d565b614b3f5760405162461bcd60e51b815260206004820152601d60248201527f436f756c64206e6f7420766572696679206d65726b6c652070726f6f66000000604482015260640161077e565b6001600160a01b0387166000908152600560209081526040808320898452825280832062ffffff600889901c16808552925290912054600160ff87161b80821615614bcc5760405162461bcd60e51b815260206004820152600e60248201527f416c7265616479206d696e746564000000000000000000000000000000000000604482015260640161077e565b6001600160a01b0390991660009081526005602090815260408083209a83529981528982209382529290925296902095909617909455505050505050565b60008181526001830160205260408120548015614cf3576000614c2e6001836159dd565b8554909150600090614c42906001906159dd565b9050818114614ca7576000866000018281548110614c6257614c62615833565b9060005260206000200154905080876000018481548110614c8557614c85615833565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080614cb857614cb8615e84565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061069a565b600091505061069a565b5092915050565b6000826000018281548110614d1b57614d1b615833565b9060005260206000200154905092915050565b6000818152600183016020526040812054614d755750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561069a565b50600061069a565b600082614d8a8584614d93565b14949350505050565b600081815b8451811015614dd857614dc482868381518110614db757614db7615833565b6020026020010151614de0565b915080614dd08161598c565b915050614d98565b509392505050565b6000818310614dfc5760008281526020849052604090206142a2565b60008381526020839052604090206142a2565b600060208284031215614e2157600080fd5b81356001600160e01b0319811681146142a257600080fd5b6001600160a01b03811681146111de57600080fd5b8035614e5981614e39565b919050565b803561ffff81168114614e5957600080fd5b60008083601f840112614e8257600080fd5b50813567ffffffffffffffff811115614e9a57600080fd5b6020830191508360208260051b8501011115614eb557600080fd5b9250929050565b60008060008060008060008060c0898b031215614ed857600080fd5b8835614ee381614e39565b975060208901359650614ef860408a01614e5e565b9550606089013567ffffffffffffffff80821115614f1557600080fd5b614f218c838d01614e70565b909750955060808b0135915080821115614f3a57600080fd5b50614f478b828c01614e70565b90945092505060a0890135614f5b81614e39565b809150509295985092959890939650565b60008060408385031215614f7f57600080fd5b8235614f8a81614e39565b946020939093013593505050565b634e487b7160e01b600052602160045260246000fd5b60048110614fcc57634e487b7160e01b600052602160045260246000fd5b9052565b60005b83811015614feb578181015183820152602001614fd3565b50506000910152565b6000815180845261500c816020860160208601614fd0565b601f01601f19169290920160200192915050565b805163ffffffff16825260006101a06020830151615046602086018263ffffffff169052565b50604083015161505e604086018263ffffffff169052565b506060830151615078606086018265ffffffffffff169052565b506080830151615092608086018265ffffffffffff169052565b5060a08301516150a560a0860182614fae565b5060c08301516150ba60c086018260ff169052565b5060e08301516150ce60e086018215159052565b506101008084015181860152506101208084015182828701526150f383870182614ff4565b925050506101408084015181860152506101608084015161511e828701826001600160a01b03169052565b5050610180928301516001600160a01b03169390920192909252919050565b6020815260006142a26020830184615020565b60006020828403121561516257600080fd5b81356142a281614e39565b6020808252825182820181905260009190848201906040850190845b818110156151ae5783516001600160a01b031683529284019291840191600101615189565b50909695505050505050565b6000806000606084860312156151cf57600080fd5b83356151da81614e39565b925060208401356151ea81614e39565b929592945050506040919091013590565b6000806000806000806080878903121561521457600080fd5b863561521f81614e39565b955060208701359450604087013567ffffffffffffffff8082111561524357600080fd5b61524f8a838b01614e70565b9096509450606089013591508082111561526857600080fd5b5061527589828a01614e70565b979a9699509497509295939492505050565b8281526040602082015260006147616040830184615020565b6000806000606084860312156152b557600080fd5b83356152c081614e39565b925060208401359150604084013567ffffffffffffffff8111156152e357600080fd5b840161016081870312156152f657600080fd5b809150509250925092565b803560048110614e5957600080fd5b80151581146111de57600080fd5b8035614e5981615310565b60008083601f84011261533b57600080fd5b50813567ffffffffffffffff81111561535357600080fd5b602083019150836020828501011115614eb557600080fd5b60008060008060008060a0878903121561538457600080fd5b863561538f81614e39565b9550602087013594506153a460408801615301565b935060608701356153b481615310565b9250608087013567ffffffffffffffff8111156153d057600080fd5b61527589828a01615329565b634e487b7160e01b600052604160045260246000fd5b604051610160810167ffffffffffffffff81118282101715615416576154166153dc565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715615445576154456153dc565b604052919050565b803563ffffffff81168114614e5957600080fd5b803565ffffffffffff81168114614e5957600080fd5b600082601f83011261548857600080fd5b813567ffffffffffffffff8111156154a2576154a26153dc565b6154b5601f8201601f191660200161541c565b8181528460208386010111156154ca57600080fd5b816020850160208301376000918101602001919091529392505050565b6000806000606084860312156154fc57600080fd5b833561550781614e39565b925060208401359150604084013567ffffffffffffffff8082111561552b57600080fd5b90850190610160828803121561554057600080fd5b6155486153f2565b6155518361544d565b815261555f6020840161544d565b602082015261557060408401615461565b604082015261558160608401615461565b606082015261559260808401615301565b60808201526155a360a0840161531e565b60a082015260c083013560c082015260e0830135828111156155c457600080fd5b6155d089828601615477565b60e083015250610100838101359082015261012091506155f1828401614e4e565b828201526101409150615605828401614e4e565b828201528093505050509250925092565b6000806000806060858703121561562c57600080fd5b843561563781614e39565b935060208501359250604085013567ffffffffffffffff81111561565a57600080fd5b61566687828801615329565b95989497509550505050565b60008060006060848603121561568757600080fd5b833561569281614e39565b9250602084013591506156a76040850161544d565b90509250925092565b6020815260006142a26020830184614ff4565b600080600080606085870312156156d957600080fd5b84356156e481614e39565b935060208501359250604085013567ffffffffffffffff81111561570757600080fd5b61566687828801614e70565b6020808252825182820181905260009190848201906040850190845b818110156151ae57835115158352928401929184019160010161572f565b60008060008060008060a0878903121561576657600080fd5b863561577181614e39565b9550602087013594506157866040880161544d565b9350606087013567ffffffffffffffff8111156157a257600080fd5b6157ae89828a01614e70565b90945092505060808701356157c281614e39565b809150509295509295509295565b634e487b7160e01b600052601160045260246000fd5b63ffffffff818116838216019080821115614cfd57614cfd6157d0565b63ffffffff828116828216039080821115614cfd57614cfd6157d0565b8082018082111561069a5761069a6157d0565b634e487b7160e01b600052603260045260246000fd5b6000604082016001600160a01b03851683526020604081850152818551808452606086019150828701935060005b8181101561589f57845169ffffffffffffffffffff1683529383019391830191600101615877565b5090979650505050505050565b600060208083850312156158bf57600080fd5b825167ffffffffffffffff808211156158d757600080fd5b818501915085601f8301126158eb57600080fd5b8151818111156158fd576158fd6153dc565b8060051b915061590e84830161541c565b818152918301840191848101908884111561592857600080fd5b938501935b838510156159465784518252938501939085019061592d565b98975050505050505050565b600181811c9082168061596657607f821691505b60208210810361598657634e487b7160e01b600052602260045260246000fd5b50919050565b60006001820161599e5761599e6157d0565b5060010190565b6000602082840312156159b757600080fd5b81516142a281615310565b6000602082840312156159d457600080fd5b6142a282614e5e565b8181038181111561069a5761069a6157d0565b600060208284031215615a0257600080fd5b815169ffffffffffffffffffff811681146142a257600080fd5b600060208284031215615a2e57600080fd5b6142a282615301565b600060208284031215615a4957600080fd5b6142a282615461565b600060208284031215615a6457600080fd5b6142a28261544d565b600060208284031215615a7f57600080fd5b5051919050565b600060208284031215615a9857600080fd5b81356142a281615310565b6000808335601e19843603018112615aba57600080fd5b83018035915067ffffffffffffffff821115615ad557600080fd5b602001915036819003821315614eb557600080fd5b601f82111561384d57600081815260208120601f850160051c81016020861015615b115750805b601f850160051c820191505b81811015615b3057828155600101615b1d565b505050505050565b815167ffffffffffffffff811115615b5257615b526153dc565b615b6681615b608454615952565b84615aea565b602080601f831160018114615b9b5760008415615b835750858301515b600019600386901b1c1916600185901b178555615b30565b600085815260208120601f198616915b82811015615bca57888601518255948401946001909101908401615bab565b5085821015615be85787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b67ffffffffffffffff831115615c1057615c106153dc565b615c2483615c1e8354615952565b83615aea565b6000601f841160018114615c585760008515615c405750838201355b600019600387901b1c1916600186901b178355615cb2565b600083815260209020601f19861690835b82811015615c895786850135825560209485019460019092019101615c69565b5086821015615ca65760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b6000808554615cc781615952565b60018281168015615cdf5760018114615cf457615d23565b60ff1984168752821515830287019450615d23565b8960005260208060002060005b85811015615d1a5781548a820152908401908201615d01565b50505082870194505b50505050838582376000930192835250909392505050565b60008351615d4d818460208801614fd0565b835190830190615d61818360208801614fd0565b01949350505050565b60008351615d7c818460208801614fd0565b7f2f000000000000000000000000000000000000000000000000000000000000009083019081528351615db6816001840160208801614fd0565b01600101949350505050565b600063ffffffff808316818103615ddb57615ddb6157d0565b6001019392505050565b6000808335601e19843603018112615dfc57600080fd5b83018035915067ffffffffffffffff821115615e1757600080fd5b6020019150600581901b3603821315614eb557600080fd5b808202811582820484141761069a5761069a6157d0565b634e487b7160e01b600052601260045260246000fd5b600082615e6b57615e6b615e46565b500490565b600082615e7f57615e7f615e46565b500690565b634e487b7160e01b600052603160045260246000fdfea26469706673582212205b2333c63b81c4de7b8bb9ca702e57ab44fc6d0d02f09cb279d8a25c5ace85c664736f6c63430008110033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000a8863bf1c8933f649e7b03eb72109e5e187505ea00000000000000000000000000000000000076a84fef008cdabe6409d2fe638b
-----Decoded View---------------
Arg [0] : initialOwner (address): 0xa8863bf1c8933f649e7b03Eb72109E5E187505Ea
Arg [1] : delegationRegistry (address): 0x00000000000076A84feF008CDAbe6409d2FE638B
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000a8863bf1c8933f649e7b03eb72109e5e187505ea
Arg [1] : 00000000000000000000000000000000000076a84fef008cdabe6409d2fe638b
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
OP | 38.66% | $3,718.54 | 0.1342 | $498.99 | |
ARB | 26.49% | $3,717.1 | 0.092 | $341.94 | |
BASE | 18.84% | $3,711.98 | 0.0655 | $243.13 | |
BSC | 8.41% | $655.14 | 0.1656 | $108.49 | |
ZKSYNC | 3.74% | $3,712.5 | 0.013 | $48.26 | |
ETH | Ether (ETH) | 3.07% | $3,712.5 | 0.0107 | $39.69 |
ARBNOVA | 0.43% | $3,711.89 | 0.0015 | $5.57 | |
OPBNB | 0.20% | $655.44 | 0.004 | $2.62 | |
LINEA | 0.14% | $3,717.67 | 0.0005 | $1.86 | |
POL | <0.01% | $0.597414 | 0.1381 | $0.082485 | |
AVAX | <0.01% | $45.07 | 0.0005 | $0.022536 | |
MANTLE | <0.01% | $0.906022 | 0.003 | $0.002718 | |
CRONOS | <0.01% | $0.185954 | 0.0015 | $0.000279 |
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.