Overview
ETH Balance
0 ETH
ETH Value
$0.00More Info
Private Name Tags
ContractCreator
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Latest 1 internal transaction
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
3879768 | 3 days ago | Contract Creation | 0 ETH |
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Source Code Verified (Exact Match)
Contract Name:
ERC1155MagicDropCloneable
Compiler Version
v0.8.24+commit.e11b9ed9
ZkSolc Version
v1.5.11
Optimization Enabled:
Yes with Mode 3
Other Settings:
cancun EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.22; import {MerkleProofLib} from "solady/src/utils/MerkleProofLib.sol"; import {SafeTransferLib} from "solady/src/utils/ext/zksync/SafeTransferLib.sol"; import {ERC1155MagicDropMetadataCloneable} from "../ERC1155MagicDropMetadataCloneable.sol"; import {PublicStage, AllowlistStage, SetupConfig} from "../Types.sol"; import {IERC1155MagicDropMetadata} from "contracts/nft/erc1155m/interfaces/IERC1155MagicDropMetadata.sol"; import {MINT_FEE_RECEIVER} from "contracts/utils/Constants.sol"; /// ........ /// ..... .. ... /// .. ..... .. .. /// .. ... ..... .. .. /// .. ...... .. ...... .. /// .. ......... ......... .... /// .... .. .. ... /// ........ ......... .. /// .. ... ... .. ......... /// .. .......... .... .... ....... ........ /// ....... .. .. ... .... ..... .. /// ........ . ... .. .. /// . ..... ........ .... .. /// .. .. ... ........... ... ... /// ....... .. ...... ... .. /// ............ ... ........ .. .. /// ... ..... .. .. .. .. .. ...... /// .. ........ ... .. .. .. .... .... /// ....... .. .. ...... ....... .. /// .. ..... .. .... .. /// .. .... ......... . .. .. /// ... .... .. ......... . .. .. /// .... .... .. ..... ...... ... /// ..... .. ........ ... ... /// ... .. .. .. ...... ..... .. /// .. .... ... ... .. .. /// .. .... .. .. .. /// . ...... .. .. .. /// .. ...................... .............. /// .. ................ .... ... /// . ... ........ /// .. ... ...... .. /// .. .... ...EMMY.... /// .. .. ... .... .... .. /// .. .. ..... .......... /// ... .. ... ...... /// ... .... .. .. /// .. ..... ... /// ..... .... ........ ... /// ........ .. ..... .......... /// .. ........ .. ..MAGIC..... . /// .... .... .... ..EDEN.... /// ..... . ... ...... /// .. ....... .. /// ..... ..... /// .... /// @title ERC1155MagicDropCloneable /// @notice A cloneable ERC-1155 drop contract that supports both a public minting stage and an allowlist minting stage. /// @dev This contract extends metadata configuration, ownership, and royalty support from its parent, while adding /// time-gated, price-defined minting stages. It also incorporates a payout recipient and protocol fee structure. /// @dev ZKsync compatible version contract ERC1155MagicDropCloneable is ERC1155MagicDropMetadataCloneable { /*============================================================== = STORAGE = ==============================================================*/ /// @dev Address that receives the primary sale proceeds of minted tokens. /// Configurable by the owner. If unset, withdrawals may fail. address internal _payoutRecipient; /// @dev The address that receives protocol fees on withdrawal. /// @notice This is fixed and cannot be changed. address public constant PROTOCOL_FEE_RECIPIENT = 0xA3833016a4eC61f5c253D71c77522cC8A1cC1106; /// @dev The protocol fee expressed in basis points (e.g., 500 = 5%). /// @notice This fee is taken from the contract's entire balance upon withdrawal. uint256 public constant PROTOCOL_FEE_BPS = 0; // 0% /// @dev The denominator used for calculating basis points. /// @notice 10,000 BPS = 100%. A fee of 500 BPS is therefore 5%. uint256 public constant BPS_DENOMINATOR = 10_000; /// @dev Configuration of the public mint stage, including timing and price. /// @notice Public mints occur only if the current timestamp is within [startTime, endTime]. mapping(uint256 => PublicStage) internal _publicStages; // tokenId => publicStage /// @dev Configuration of the allowlist mint stage, including timing, price, and a merkle root for verification. /// @notice Only addresses proven by a valid Merkle proof can mint during this stage. mapping(uint256 => AllowlistStage) internal _allowlistStages; // tokenId => allowlistStage /// @dev The mint fee to charge on top of each mint /// @notice Set permanently on initialization uint256 public mintFee; /*============================================================== = EVENTS = ==============================================================*/ /// @notice Emitted when the public mint stage is set. event PublicStageSet(PublicStage stage); /// @notice Emitted when the allowlist mint stage is set. event AllowlistStageSet(AllowlistStage stage); /// @notice Emitted when the payout recipient is set. event PayoutRecipientSet(address newPayoutRecipient); /// @notice Emitted when a token is minted. event TokenMinted(address indexed to, uint256 tokenId, uint256 qty); /*============================================================== = ERRORS = ==============================================================*/ /// @notice Thrown when attempting to mint during a public stage that is not currently active. error PublicStageNotActive(); /// @notice Thrown when attempting to mint during an allowlist stage that is not currently active. error AllowlistStageNotActive(); /// @notice Thrown when the provided ETH value for a mint is insufficient. error RequiredValueNotMet(); /// @notice Thrown when the provided Merkle proof for an allowlist mint is invalid. error InvalidProof(); /// @notice Thrown when a stage's start or end time configuration is invalid. error InvalidStageTime(); /// @notice Thrown when the public stage timing conflicts with the allowlist stage timing. error InvalidPublicStageTime(); /// @notice Thrown when the allowlist stage timing conflicts with the public stage timing. error InvalidAllowlistStageTime(); /// @notice Thrown when the payout recipient is set to a zero address. error PayoutRecipientCannotBeZeroAddress(); /*============================================================== = INITIALIZERS = ==============================================================*/ /// @notice Initializes the contract with a name, symbol, owner and mintFee. /// @dev Can only be called once. It sets the owner, emits a deploy event, and prepares the token for minting stages. /// @param _name The ERC-1155 name of the collection. /// @param _symbol The ERC-1155 symbol of the collection. /// @param _owner The address designated as the initial owner of the contract. /// @param _mintFee The fee to charge on top of each mint. function initialize(string memory _name, string memory _symbol, address _owner, uint256 _mintFee) public initializer { __ERC1155MagicDropMetadataCloneable__init(_name, _symbol, _owner); mintFee = _mintFee; } /*============================================================== = PUBLIC WRITE METHODS = ==============================================================*/ /// @notice Mints tokens during the public stage. /// @dev Requires that the current time is within the configured public stage interval. /// Reverts if the buyer does not send enough ETH, or if the wallet limit would be exceeded. /// @param to The recipient address for the minted tokens. /// @param tokenId The ID of the token to mint. /// @param qty The number of tokens to mint. function mintPublic(address to, uint256 tokenId, uint256 qty, bytes memory data) external payable { PublicStage memory stage = _publicStages[tokenId]; if (block.timestamp < stage.startTime || block.timestamp > stage.endTime) { revert PublicStageNotActive(); } uint256 stagePrice = stage.price + mintFee; uint256 requiredPayment = stagePrice * qty; if (msg.value != requiredPayment) { revert RequiredValueNotMet(); } if (_walletLimit[tokenId] > 0 && _totalMintedByUserPerToken[to][tokenId] + qty > _walletLimit[tokenId]) { revert WalletLimitExceeded(tokenId); } _increaseSupplyOnMint(to, tokenId, qty); _mint(to, tokenId, qty, data); if (stagePrice != 0) { _splitProceeds(qty); } emit TokenMinted(to, tokenId, qty); } /// @notice Mints tokens during the allowlist stage. /// @dev Requires a valid Merkle proof and the current time within the allowlist stage interval. /// Reverts if the buyer sends insufficient ETH or if the wallet limit is exceeded. /// @param to The recipient address for the minted tokens. /// @param tokenId The ID of the token to mint. /// @param qty The number of tokens to mint. /// @param proof The Merkle proof verifying `to` is eligible for the allowlist. function mintAllowlist(address to, uint256 tokenId, uint256 qty, bytes32[] calldata proof, bytes memory data) external payable { AllowlistStage memory stage = _allowlistStages[tokenId]; if (block.timestamp < stage.startTime || block.timestamp > stage.endTime) { revert AllowlistStageNotActive(); } if (!MerkleProofLib.verify(proof, stage.merkleRoot, keccak256(bytes.concat(keccak256(abi.encode(to)))))) { revert InvalidProof(); } uint256 stagePrice = stage.price + mintFee; uint256 requiredPayment = stagePrice * qty; if (msg.value != requiredPayment) { revert RequiredValueNotMet(); } if (_walletLimit[tokenId] > 0 && _totalMintedByUserPerToken[to][tokenId] + qty > _walletLimit[tokenId]) { revert WalletLimitExceeded(tokenId); } _increaseSupplyOnMint(to, tokenId, qty); if (stagePrice != 0) { _splitProceeds(qty); } _mint(to, tokenId, qty, data); emit TokenMinted(to, tokenId, qty); } /// @notice Burns a specific quantity of tokens on behalf of a given address. /// @dev Reduces the total supply and calls the internal `_burn` function. /// @param from The address from which the tokens will be burned. /// @param id The ID of the token to burn. /// @param qty The quantity of tokens to burn. function burn(address from, uint256 id, uint256 qty) external { _reduceSupplyOnBurn(id, qty); _burn(msg.sender, from, id, qty); } /// @notice Burns multiple types of tokens in a single batch operation. /// @dev Iterates over each token ID and quantity to reduce supply and burn tokens. /// @param from The address from which the tokens will be burned. /// @param ids An array of token IDs to burn. /// @param qty An array of quantities corresponding to each token ID to burn. function batchBurn(address from, uint256[] calldata ids, uint256[] calldata qty) external { uint256 length = ids.length; for (uint256 i = 0; i < length;) { _reduceSupplyOnBurn(ids[i], qty[i]); unchecked { ++i; } } _batchBurn(msg.sender, from, ids, qty); } /*============================================================== = PUBLIC VIEW METHODS = ==============================================================*/ /// @notice Returns the current configuration of the contract. /// @return The current configuration of the contract. function getConfig(uint256 tokenId) external view returns (SetupConfig memory) { SetupConfig memory newConfig = SetupConfig({ tokenId: tokenId, maxSupply: _tokenSupply[tokenId].maxSupply, walletLimit: _walletLimit[tokenId], baseURI: _baseURI, contractURI: _contractURI, allowlistStage: _allowlistStages[tokenId], publicStage: _publicStages[tokenId], payoutRecipient: _payoutRecipient, royaltyRecipient: _royaltyReceiver, royaltyBps: _royaltyBps }); return newConfig; } /// @notice Returns the current public stage configuration (startTime, endTime, price). /// @return The current public stage settings. function getPublicStage(uint256 tokenId) external view returns (PublicStage memory) { return _publicStages[tokenId]; } /// @notice Returns the current allowlist stage configuration (startTime, endTime, price, merkleRoot). /// @return The current allowlist stage settings. function getAllowlistStage(uint256 tokenId) external view returns (AllowlistStage memory) { return _allowlistStages[tokenId]; } /// @notice Returns the current payout recipient who receives primary sales proceeds after protocol fees. /// @return The address currently set to receive payout funds. function payoutRecipient() external view returns (address) { return _payoutRecipient; } /// @notice Indicates whether the contract implements a given interface. /// @param interfaceId The interface ID to check for support. /// @return True if the interface is supported, false otherwise. function supportsInterface(bytes4 interfaceId) public view virtual override(ERC1155MagicDropMetadataCloneable) returns (bool) { return interfaceId == type(IERC1155MagicDropMetadata).interfaceId || super.supportsInterface(interfaceId); } /*============================================================== = ADMIN OPERATIONS = ==============================================================*/ /// @notice Sets up the contract parameters in a single call. /// @dev Only callable by the owner. Configures max supply, wallet limit, URIs, stages, payout recipient. /// @param config A struct containing all setup parameters. function setup(SetupConfig calldata config) external onlyOwner { if (config.maxSupply > 0) { _setMaxSupply(config.tokenId, config.maxSupply); } if (config.walletLimit > 0) { _setWalletLimit(config.tokenId, config.walletLimit); } if (bytes(config.baseURI).length > 0) { _setBaseURI(config.baseURI); } if (bytes(config.contractURI).length > 0) { _setContractURI(config.contractURI); } if (config.allowlistStage.startTime != 0 || config.allowlistStage.endTime != 0) { _setAllowlistStage(config.tokenId, config.allowlistStage); } if (config.publicStage.startTime != 0 || config.publicStage.endTime != 0) { _setPublicStage(config.tokenId, config.publicStage); } if (config.payoutRecipient != address(0)) { _setPayoutRecipient(config.payoutRecipient); } if (config.royaltyRecipient != address(0)) { _setRoyaltyInfo(config.royaltyRecipient, config.royaltyBps); } } /// @notice Sets the configuration of the public mint stage. /// @dev Only callable by the owner. Ensures the public stage does not overlap improperly with the allowlist stage. /// @param stage A struct defining the public stage timing and price. function setPublicStage(uint256 tokenId, PublicStage calldata stage) external onlyOwner { _setPublicStage(tokenId, stage); } /// @notice Sets the configuration of the allowlist mint stage. /// @dev Only callable by the owner. Ensures the allowlist stage does not overlap improperly with the public stage. /// @param stage A struct defining the allowlist stage timing, price, and merkle root. function setAllowlistStage(uint256 tokenId, AllowlistStage calldata stage) external onlyOwner { _setAllowlistStage(tokenId, stage); } /// @notice Sets the payout recipient address for primary sale proceeds (after the protocol fee is deducted). /// @dev Only callable by the owner. /// @param newPayoutRecipient The address to receive future withdrawals. function setPayoutRecipient(address newPayoutRecipient) external onlyOwner { _setPayoutRecipient(newPayoutRecipient); } /*============================================================== = INTERNAL HELPERS = ==============================================================*/ /// @notice Internal function to set the public mint stage configuration. /// @dev Reverts if timing is invalid or conflicts with the allowlist stage. /// @param stage A struct defining public stage timings and price. function _setPublicStage(uint256 tokenId, PublicStage calldata stage) internal { if (stage.startTime >= stage.endTime) { revert InvalidStageTime(); } // Ensure the public stage starts after the allowlist stage ends if (_allowlistStages[tokenId].startTime != 0 && _allowlistStages[tokenId].endTime != 0) { if (stage.startTime <= _allowlistStages[tokenId].endTime) { revert InvalidPublicStageTime(); } } _publicStages[tokenId] = stage; emit PublicStageSet(stage); } /// @notice Internal function to set the allowlist mint stage configuration. /// @dev Reverts if timing is invalid or conflicts with the public stage. /// @param tokenId The ID of the token to set the allowlist stage for. /// @param stage A struct defining allowlist stage timings, price, and merkle root. function _setAllowlistStage(uint256 tokenId, AllowlistStage calldata stage) internal { if (stage.startTime >= stage.endTime) { revert InvalidStageTime(); } // Ensure the public stage starts after the allowlist stage ends if (_publicStages[tokenId].startTime != 0 && _publicStages[tokenId].endTime != 0) { if (stage.endTime >= _publicStages[tokenId].startTime) { revert InvalidAllowlistStageTime(); } } _allowlistStages[tokenId] = stage; emit AllowlistStageSet(stage); } /// @notice Internal function to set the payout recipient. /// @dev This function does not revert if given a zero address, but no payouts would succeed if so. /// @param newPayoutRecipient The address to receive the payout from mint proceeds. function _setPayoutRecipient(address newPayoutRecipient) internal { _payoutRecipient = newPayoutRecipient; emit PayoutRecipientSet(newPayoutRecipient); } /// @notice Internal function to split the proceeds of a mint. /// @dev This function is called by the mint functions to split the proceeds into a protocol fee and a payout. function _splitProceeds(uint256 qty) internal { if (_payoutRecipient == address(0)) { revert PayoutRecipientCannotBeZeroAddress(); } uint256 proceeds = msg.value; if (mintFee > 0) { uint256 totalMintFee = mintFee * qty; proceeds -= totalMintFee; SafeTransferLib.safeTransferETH(MINT_FEE_RECEIVER, totalMintFee); } // If there are no remaining proceeds after mint fee is taken, exit early if (proceeds == 0) { return; } if (PROTOCOL_FEE_BPS > 0) { uint256 protocolFee = (proceeds * PROTOCOL_FEE_BPS) / BPS_DENOMINATOR; uint256 remainingBalance; unchecked { remainingBalance = proceeds - protocolFee; } SafeTransferLib.safeTransferETH(PROTOCOL_FEE_RECIPIENT, protocolFee); SafeTransferLib.safeTransferETH(_payoutRecipient, remainingBalance); } else { SafeTransferLib.safeTransferETH(_payoutRecipient, proceeds); } } /// @notice Internal function to reduce the total supply when tokens are burned. /// @dev Decreases the `totalSupply` for a given `tokenId` by the specified `qty`. /// Uses `unchecked` to save gas, assuming that underflow is impossible /// because burn operations should not exceed the current supply. /// @param tokenId The ID of the token being burned. /// @param qty The quantity of tokens to burn. function _reduceSupplyOnBurn(uint256 tokenId, uint256 qty) internal { TokenSupply storage supply = _tokenSupply[tokenId]; unchecked { supply.totalSupply -= uint64(qty); } } /// @notice Internal function to increase the total supply when tokens are minted. /// @dev Increases the `totalSupply` and `totalMinted` for a given `tokenId` by the specified `qty`. /// Ensures that the new total minted amount does not exceed the `maxSupply`. /// Uses `unchecked` to save gas, assuming that overflow is impossible /// because the maximum values are constrained by `maxSupply`. /// @param to The address receiving the minted tokens. /// @param tokenId The ID of the token being minted. /// @param qty The quantity of tokens to mint. /// @custom:reverts {CannotExceedMaxSupply} If the minting would exceed the maximum supply for the `tokenId`. function _increaseSupplyOnMint(address to, uint256 tokenId, uint256 qty) internal { TokenSupply storage supply = _tokenSupply[tokenId]; if (supply.totalMinted + qty > supply.maxSupply) { revert CannotExceedMaxSupply(); } unchecked { supply.totalSupply += uint64(qty); supply.totalMinted += uint64(qty); _totalMintedByUserPerToken[to][tokenId] += uint64(qty); } } /*============================================================== = META = ==============================================================*/ /// @notice Returns the contract name and version. /// @dev Useful for external tools or metadata standards. /// @return The contract name and version strings. function contractNameAndVersion() public pure returns (string memory, string memory) { return ("ERC1155MagicDropCloneable", "1.0.2"); } /*============================================================== = MISC = ==============================================================*/ /// @dev Overridden to allow this contract to properly manage owner initialization. /// By always returning true, we ensure that the inherited initializer does not re-run. function _guardInitializeOwner() internal pure virtual override returns (bool) { return true; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; /// @notice Gas optimized verification of proof of inclusion for a leaf in a Merkle tree. /// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/MerkleProofLib.sol) /// @author Modified from Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/MerkleProofLib.sol) /// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/cryptography/MerkleProof.sol) library MerkleProofLib { /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* MERKLE PROOF VERIFICATION OPERATIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Returns whether `leaf` exists in the Merkle tree with `root`, given `proof`. function verify(bytes32[] memory proof, bytes32 root, bytes32 leaf) internal pure returns (bool isValid) { /// @solidity memory-safe-assembly assembly { if mload(proof) { // Initialize `offset` to the offset of `proof` elements in memory. let offset := add(proof, 0x20) // Left shift by 5 is equivalent to multiplying by 0x20. let end := add(offset, shl(5, mload(proof))) // Iterate over proof elements to compute root hash. for {} 1 {} { // Slot of `leaf` in scratch space. // If the condition is true: 0x20, otherwise: 0x00. let scratch := shl(5, gt(leaf, mload(offset))) // Store elements to hash contiguously in scratch space. // Scratch space is 64 bytes (0x00 - 0x3f) and both elements are 32 bytes. mstore(scratch, leaf) mstore(xor(scratch, 0x20), mload(offset)) // Reuse `leaf` to store the hash to reduce stack operations. leaf := keccak256(0x00, 0x40) offset := add(offset, 0x20) if iszero(lt(offset, end)) { break } } } isValid := eq(leaf, root) } } /// @dev Returns whether `leaf` exists in the Merkle tree with `root`, given `proof`. function verifyCalldata(bytes32[] calldata proof, bytes32 root, bytes32 leaf) internal pure returns (bool isValid) { /// @solidity memory-safe-assembly assembly { if proof.length { // Left shift by 5 is equivalent to multiplying by 0x20. let end := add(proof.offset, shl(5, proof.length)) // Initialize `offset` to the offset of `proof` in the calldata. let offset := proof.offset // Iterate over proof elements to compute root hash. for {} 1 {} { // Slot of `leaf` in scratch space. // If the condition is true: 0x20, otherwise: 0x00. let scratch := shl(5, gt(leaf, calldataload(offset))) // Store elements to hash contiguously in scratch space. // Scratch space is 64 bytes (0x00 - 0x3f) and both elements are 32 bytes. mstore(scratch, leaf) mstore(xor(scratch, 0x20), calldataload(offset)) // Reuse `leaf` to store the hash to reduce stack operations. leaf := keccak256(0x00, 0x40) offset := add(offset, 0x20) if iszero(lt(offset, end)) { break } } } isValid := eq(leaf, root) } } /// @dev Returns whether all `leaves` exist in the Merkle tree with `root`, /// given `proof` and `flags`. /// /// Note: /// - Breaking the invariant `flags.length == (leaves.length - 1) + proof.length` /// will always return false. /// - The sum of the lengths of `proof` and `leaves` must never overflow. /// - Any non-zero word in the `flags` array is treated as true. /// - The memory offset of `proof` must be non-zero /// (i.e. `proof` is not pointing to the scratch space). function verifyMultiProof( bytes32[] memory proof, bytes32 root, bytes32[] memory leaves, bool[] memory flags ) internal pure returns (bool isValid) { // Rebuilds the root by consuming and producing values on a queue. // The queue starts with the `leaves` array, and goes into a `hashes` array. // After the process, the last element on the queue is verified // to be equal to the `root`. // // The `flags` array denotes whether the sibling // should be popped from the queue (`flag == true`), or // should be popped from the `proof` (`flag == false`). /// @solidity memory-safe-assembly assembly { // Cache the lengths of the arrays. let leavesLength := mload(leaves) let proofLength := mload(proof) let flagsLength := mload(flags) // Advance the pointers of the arrays to point to the data. leaves := add(0x20, leaves) proof := add(0x20, proof) flags := add(0x20, flags) // If the number of flags is correct. for {} eq(add(leavesLength, proofLength), add(flagsLength, 1)) {} { // For the case where `proof.length + leaves.length == 1`. if iszero(flagsLength) { // `isValid = (proof.length == 1 ? proof[0] : leaves[0]) == root`. isValid := eq(mload(xor(leaves, mul(xor(proof, leaves), proofLength))), root) break } // The required final proof offset if `flagsLength` is not zero, otherwise zero. let proofEnd := add(proof, shl(5, proofLength)) // We can use the free memory space for the queue. // We don't need to allocate, since the queue is temporary. let hashesFront := mload(0x40) // Copy the leaves into the hashes. // Sometimes, a little memory expansion costs less than branching. // Should cost less, even with a high free memory offset of 0x7d00. leavesLength := shl(5, leavesLength) for { let i := 0 } iszero(eq(i, leavesLength)) { i := add(i, 0x20) } { mstore(add(hashesFront, i), mload(add(leaves, i))) } // Compute the back of the hashes. let hashesBack := add(hashesFront, leavesLength) // This is the end of the memory for the queue. // We recycle `flagsLength` to save on stack variables (sometimes save gas). flagsLength := add(hashesBack, shl(5, flagsLength)) for {} 1 {} { // Pop from `hashes`. let a := mload(hashesFront) // Pop from `hashes`. let b := mload(add(hashesFront, 0x20)) hashesFront := add(hashesFront, 0x40) // If the flag is false, load the next proof, // else, pops from the queue. if iszero(mload(flags)) { // Loads the next proof. b := mload(proof) proof := add(proof, 0x20) // Unpop from `hashes`. hashesFront := sub(hashesFront, 0x20) } // Advance to the next flag. flags := add(flags, 0x20) // Slot of `a` in scratch space. // If the condition is true: 0x20, otherwise: 0x00. let scratch := shl(5, gt(a, b)) // Hash the scratch space and push the result onto the queue. mstore(scratch, a) mstore(xor(scratch, 0x20), b) mstore(hashesBack, keccak256(0x00, 0x40)) hashesBack := add(hashesBack, 0x20) if iszero(lt(hashesBack, flagsLength)) { break } } isValid := and( // Checks if the last value in the queue is same as the root. eq(mload(sub(hashesBack, 0x20)), root), // And whether all the proofs are used, if required. eq(proofEnd, proof) ) break } } } /// @dev Returns whether all `leaves` exist in the Merkle tree with `root`, /// given `proof` and `flags`. /// /// Note: /// - Breaking the invariant `flags.length == (leaves.length - 1) + proof.length` /// will always return false. /// - Any non-zero word in the `flags` array is treated as true. /// - The calldata offset of `proof` must be non-zero /// (i.e. `proof` is from a regular Solidity function with a 4-byte selector). function verifyMultiProofCalldata( bytes32[] calldata proof, bytes32 root, bytes32[] calldata leaves, bool[] calldata flags ) internal pure returns (bool isValid) { // Rebuilds the root by consuming and producing values on a queue. // The queue starts with the `leaves` array, and goes into a `hashes` array. // After the process, the last element on the queue is verified // to be equal to the `root`. // // The `flags` array denotes whether the sibling // should be popped from the queue (`flag == true`), or // should be popped from the `proof` (`flag == false`). /// @solidity memory-safe-assembly assembly { // If the number of flags is correct. for {} eq(add(leaves.length, proof.length), add(flags.length, 1)) {} { // For the case where `proof.length + leaves.length == 1`. if iszero(flags.length) { // `isValid = (proof.length == 1 ? proof[0] : leaves[0]) == root`. // forgefmt: disable-next-item isValid := eq( calldataload( xor(leaves.offset, mul(xor(proof.offset, leaves.offset), proof.length)) ), root ) break } // The required final proof offset if `flagsLength` is not zero, otherwise zero. let proofEnd := add(proof.offset, shl(5, proof.length)) // We can use the free memory space for the queue. // We don't need to allocate, since the queue is temporary. let hashesFront := mload(0x40) // Copy the leaves into the hashes. // Sometimes, a little memory expansion costs less than branching. // Should cost less, even with a high free memory offset of 0x7d00. calldatacopy(hashesFront, leaves.offset, shl(5, leaves.length)) // Compute the back of the hashes. let hashesBack := add(hashesFront, shl(5, leaves.length)) // This is the end of the memory for the queue. // We recycle `flagsLength` to save on stack variables (sometimes save gas). flags.length := add(hashesBack, shl(5, flags.length)) // We don't need to make a copy of `proof.offset` or `flags.offset`, // as they are pass-by-value (this trick may not always save gas). for {} 1 {} { // Pop from `hashes`. let a := mload(hashesFront) // Pop from `hashes`. let b := mload(add(hashesFront, 0x20)) hashesFront := add(hashesFront, 0x40) // If the flag is false, load the next proof, // else, pops from the queue. if iszero(calldataload(flags.offset)) { // Loads the next proof. b := calldataload(proof.offset) proof.offset := add(proof.offset, 0x20) // Unpop from `hashes`. hashesFront := sub(hashesFront, 0x20) } // Advance to the next flag offset. flags.offset := add(flags.offset, 0x20) // Slot of `a` in scratch space. // If the condition is true: 0x20, otherwise: 0x00. let scratch := shl(5, gt(a, b)) // Hash the scratch space and push the result onto the queue. mstore(scratch, a) mstore(xor(scratch, 0x20), b) mstore(hashesBack, keccak256(0x00, 0x40)) hashesBack := add(hashesBack, 0x20) if iszero(lt(hashesBack, flags.length)) { break } } isValid := and( // Checks if the last value in the queue is same as the root. eq(mload(sub(hashesBack, 0x20)), root), // And whether all the proofs are used, if required. eq(proofEnd, proof.offset) ) break } } } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* EMPTY CALLDATA HELPERS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Returns an empty calldata bytes32 array. function emptyProof() internal pure returns (bytes32[] calldata proof) { /// @solidity memory-safe-assembly assembly { proof.length := 0 } } /// @dev Returns an empty calldata bytes32 array. function emptyLeaves() internal pure returns (bytes32[] calldata leaves) { /// @solidity memory-safe-assembly assembly { leaves.length := 0 } } /// @dev Returns an empty calldata bool array. function emptyFlags() internal pure returns (bool[] calldata flags) { /// @solidity memory-safe-assembly assembly { flags.length := 0 } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import {SingleUseETHVault} from "./SingleUseETHVault.sol"; /// @notice Library for force safe transferring ETH and ERC20s in ZKsync. /// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/ext/zksync/SafeTransferLib.sol) library SafeTransferLib { /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* EVENTS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev A single use ETH vault has been created for `to`, with `amount`. event SingleUseETHVaultCreated(address indexed to, uint256 amount, address vault); /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* CUSTOM ERRORS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev The ETH transfer has failed. error ETHTransferFailed(); /// @dev The ERC20 `transferFrom` has failed. error TransferFromFailed(); /// @dev The ERC20 `transfer` has failed. error TransferFailed(); /// @dev The ERC20 `approve` has failed. error ApproveFailed(); /// @dev The ERC20 `totalSupply` query has failed. error TotalSupplyQueryFailed(); /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* CONSTANTS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Suggested gas stipend for contract receiving ETH to perform a few /// storage reads and writes, but low enough to prevent griefing. uint256 internal constant GAS_STIPEND_NO_GRIEF = 1000000; /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* ETH OPERATIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ // If the ETH transfer MUST succeed with a reasonable gas budget, use the force variants. // // The regular variants: // - Forwards all remaining gas to the target. // - Reverts if the target reverts. // - Reverts if the current contract has insufficient balance. // // The force variants: // - Forwards with an optional gas stipend // (defaults to `GAS_STIPEND_NO_GRIEF`, which is sufficient for most cases). // - If the target reverts, or if the gas stipend is exhausted, // creates a temporary contract to force send the ETH via `SELFDESTRUCT`. // Future compatible with `SENDALL`: https://eips.ethereum.org/EIPS/eip-4758. // - Reverts if the current contract has insufficient balance. // // The try variants: // - Forwards with a mandatory gas stipend. // - Instead of reverting, returns whether the transfer succeeded. /// @dev Sends `amount` (in wei) ETH to `to`. function safeTransferETH(address to, uint256 amount) internal { /// @solidity memory-safe-assembly assembly { if iszero(call(gas(), to, amount, 0x00, 0x00, 0x00, 0x00)) { mstore(0x00, 0xb12d13eb) // `ETHTransferFailed()`. revert(0x1c, 0x04) } } } /// @dev Sends all the ETH in the current contract to `to`. function safeTransferAllETH(address to) internal { /// @solidity memory-safe-assembly assembly { // Transfer all the ETH and check if it succeeded or not. if iszero(call(gas(), to, selfbalance(), 0x00, 0x00, 0x00, 0x00)) { mstore(0x00, 0xb12d13eb) // `ETHTransferFailed()`. revert(0x1c, 0x04) } } } /// @dev Force sends `amount` (in wei) ETH to `to`, with a `gasStipend`. /// If force transfer is used, returns the vault. Else returns `address(0)`. function forceSafeTransferETH(address to, uint256 amount, uint256 gasStipend) internal returns (address vault) { if (amount == uint256(0)) return address(0); // Early return if `amount` is zero. uint256 selfBalanceBefore = address(this).balance; /// @solidity memory-safe-assembly assembly { if lt(selfBalanceBefore, amount) { mstore(0x00, 0xb12d13eb) // `ETHTransferFailed()`. revert(0x1c, 0x04) } pop(call(gasStipend, to, amount, 0x00, 0x00, 0x00, 0x00)) } if (address(this).balance == selfBalanceBefore) { vault = address(new SingleUseETHVault()); /// @solidity memory-safe-assembly assembly { mstore(0x00, shr(96, shl(96, to))) if iszero(call(gas(), vault, amount, 0x00, 0x20, 0x00, 0x00)) { revert(0x00, 0x00) } } emit SingleUseETHVaultCreated(to, amount, vault); } } /// @dev Force sends all the ETH in the current contract to `to`, with a `gasStipend`. /// If force transfer is used, returns the vault. Else returns `address(0)`. function forceSafeTransferAllETH(address to, uint256 gasStipend) internal returns (address vault) { vault = forceSafeTransferETH(to, address(this).balance, gasStipend); } /// @dev Force sends `amount` (in wei) ETH to `to`, with `GAS_STIPEND_NO_GRIEF`. /// If force transfer is used, returns the vault. Else returns `address(0)`. function forceSafeTransferETH(address to, uint256 amount) internal returns (address vault) { vault = forceSafeTransferETH(to, amount, GAS_STIPEND_NO_GRIEF); } /// @dev Force sends all the ETH in the current contract to `to`, with `GAS_STIPEND_NO_GRIEF`. /// If force transfer is used, returns the vault. Else returns `address(0)`. function forceSafeTransferAllETH(address to) internal returns (address vault) { vault = forceSafeTransferETH(to, address(this).balance, GAS_STIPEND_NO_GRIEF); } /// @dev Sends `amount` (in wei) ETH to `to`, with a `gasStipend`. function trySafeTransferETH(address to, uint256 amount, uint256 gasStipend) internal returns (bool success) { /// @solidity memory-safe-assembly assembly { success := call(gasStipend, to, amount, 0x00, 0x00, 0x00, 0x00) } } /// @dev Sends all the ETH in the current contract to `to`, with a `gasStipend`. function trySafeTransferAllETH(address to, uint256 gasStipend) internal returns (bool success) { /// @solidity memory-safe-assembly assembly { success := call(gasStipend, to, selfbalance(), 0x00, 0x00, 0x00, 0x00) } } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* ERC20 OPERATIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Sends `amount` of ERC20 `token` from `from` to `to`. /// Reverts upon failure. /// /// The `from` account must have at least `amount` approved for /// the current contract to manage. function safeTransferFrom(address token, address from, address to, uint256 amount) internal { /// @solidity memory-safe-assembly assembly { let m := mload(0x40) // Cache the free memory pointer. mstore(0x60, amount) // Store the `amount` argument. mstore(0x40, to) // Store the `to` argument. mstore(0x2c, shl(96, from)) // Store the `from` argument. mstore(0x0c, 0x23b872dd000000000000000000000000) // `transferFrom(address,address,uint256)`. let success := call(gas(), token, 0, 0x1c, 0x64, 0x00, 0x20) if iszero(and(eq(mload(0x00), 1), success)) { if iszero(lt(or(iszero(extcodesize(token)), returndatasize()), success)) { mstore(0x00, 0x7939f424) // `TransferFromFailed()`. revert(0x1c, 0x04) } } mstore(0x60, 0) // Restore the zero slot to zero. mstore(0x40, m) // Restore the free memory pointer. } } /// @dev Sends `amount` of ERC20 `token` from `from` to `to`. /// /// The `from` account must have at least `amount` approved for the current contract to manage. function trySafeTransferFrom(address token, address from, address to, uint256 amount) internal returns (bool success) { /// @solidity memory-safe-assembly assembly { let m := mload(0x40) // Cache the free memory pointer. mstore(0x60, amount) // Store the `amount` argument. mstore(0x40, to) // Store the `to` argument. mstore(0x2c, shl(96, from)) // Store the `from` argument. mstore(0x0c, 0x23b872dd000000000000000000000000) // `transferFrom(address,address,uint256)`. success := call(gas(), token, 0, 0x1c, 0x64, 0x00, 0x20) if iszero(and(eq(mload(0x00), 1), success)) { success := lt(or(iszero(extcodesize(token)), returndatasize()), success) } mstore(0x60, 0) // Restore the zero slot to zero. mstore(0x40, m) // Restore the free memory pointer. } } /// @dev Sends all of ERC20 `token` from `from` to `to`. /// Reverts upon failure. /// /// The `from` account must have their entire balance approved for the current contract to manage. function safeTransferAllFrom(address token, address from, address to) internal returns (uint256 amount) { /// @solidity memory-safe-assembly assembly { let m := mload(0x40) // Cache the free memory pointer. mstore(0x40, to) // Store the `to` argument. mstore(0x2c, shl(96, from)) // Store the `from` argument. mstore(0x0c, 0x70a08231000000000000000000000000) // `balanceOf(address)`. // Read the balance, reverting upon failure. if iszero( and( // The arguments of `and` are evaluated from right to left. gt(returndatasize(), 0x1f), // At least 32 bytes returned. staticcall(gas(), token, 0x1c, 0x24, 0x60, 0x20) ) ) { mstore(0x00, 0x7939f424) // `TransferFromFailed()`. revert(0x1c, 0x04) } mstore(0x00, 0x23b872dd) // `transferFrom(address,address,uint256)`. amount := mload(0x60) // The `amount` is already at 0x60. We'll need to return it. // Perform the transfer, reverting upon failure. let success := call(gas(), token, 0, 0x1c, 0x64, 0x00, 0x20) if iszero(and(eq(mload(0x00), 1), success)) { if iszero(lt(or(iszero(extcodesize(token)), returndatasize()), success)) { mstore(0x00, 0x7939f424) // `TransferFromFailed()`. revert(0x1c, 0x04) } } mstore(0x60, 0) // Restore the zero slot to zero. mstore(0x40, m) // Restore the free memory pointer. } } /// @dev Sends `amount` of ERC20 `token` from the current contract to `to`. /// Reverts upon failure. function safeTransfer(address token, address to, uint256 amount) internal { /// @solidity memory-safe-assembly assembly { mstore(0x14, to) // Store the `to` argument. mstore(0x34, amount) // Store the `amount` argument. mstore(0x00, 0xa9059cbb000000000000000000000000) // `transfer(address,uint256)`. // Perform the transfer, reverting upon failure. let success := call(gas(), token, 0, 0x10, 0x44, 0x00, 0x20) if iszero(and(eq(mload(0x00), 1), success)) { if iszero(lt(or(iszero(extcodesize(token)), returndatasize()), success)) { mstore(0x00, 0x90b8ec18) // `TransferFailed()`. revert(0x1c, 0x04) } } mstore(0x34, 0) // Restore the part of the free memory pointer that was overwritten. } } /// @dev Sends all of ERC20 `token` from the current contract to `to`. /// Reverts upon failure. function safeTransferAll(address token, address to) internal returns (uint256 amount) { /// @solidity memory-safe-assembly assembly { mstore(0x00, 0x70a08231) // Store the function selector of `balanceOf(address)`. mstore(0x20, address()) // Store the address of the current contract. // Read the balance, reverting upon failure. if iszero( and( // The arguments of `and` are evaluated from right to left. gt(returndatasize(), 0x1f), // At least 32 bytes returned. staticcall(gas(), token, 0x1c, 0x24, 0x34, 0x20) ) ) { mstore(0x00, 0x90b8ec18) // `TransferFailed()`. revert(0x1c, 0x04) } mstore(0x14, to) // Store the `to` argument. amount := mload(0x34) // The `amount` is already at 0x34. We'll need to return it. mstore(0x00, 0xa9059cbb000000000000000000000000) // `transfer(address,uint256)`. // Perform the transfer, reverting upon failure. let success := call(gas(), token, 0, 0x10, 0x44, 0x00, 0x20) if iszero(and(eq(mload(0x00), 1), success)) { if iszero(lt(or(iszero(extcodesize(token)), returndatasize()), success)) { mstore(0x00, 0x90b8ec18) // `TransferFailed()`. revert(0x1c, 0x04) } } mstore(0x34, 0) // Restore the part of the free memory pointer that was overwritten. } } /// @dev Sets `amount` of ERC20 `token` for `to` to manage on behalf of the current contract. /// Reverts upon failure. function safeApprove(address token, address to, uint256 amount) internal { /// @solidity memory-safe-assembly assembly { mstore(0x14, to) // Store the `to` argument. mstore(0x34, amount) // Store the `amount` argument. mstore(0x00, 0x095ea7b3000000000000000000000000) // `approve(address,uint256)`. let success := call(gas(), token, 0, 0x10, 0x44, 0x00, 0x20) if iszero(and(eq(mload(0x00), 1), success)) { if iszero(lt(or(iszero(extcodesize(token)), returndatasize()), success)) { mstore(0x00, 0x3e3f8f73) // `ApproveFailed()`. revert(0x1c, 0x04) } } mstore(0x34, 0) // Restore the part of the free memory pointer that was overwritten. } } /// @dev Sets `amount` of ERC20 `token` for `to` to manage on behalf of the current contract. /// If the initial attempt to approve fails, attempts to reset the approved amount to zero, /// then retries the approval again (some tokens, e.g. USDT, requires this). /// Reverts upon failure. function safeApproveWithRetry(address token, address to, uint256 amount) internal { /// @solidity memory-safe-assembly assembly { mstore(0x14, to) // Store the `to` argument. mstore(0x34, amount) // Store the `amount` argument. mstore(0x00, 0x095ea7b3000000000000000000000000) // `approve(address,uint256)`. // Perform the approval, retrying upon failure. let success := call(gas(), token, 0, 0x10, 0x44, 0x00, 0x20) if iszero(and(eq(mload(0x00), 1), success)) { if iszero(lt(or(iszero(extcodesize(token)), returndatasize()), success)) { mstore(0x34, 0) // Store 0 for the `amount`. mstore(0x00, 0x095ea7b3000000000000000000000000) // `approve(address,uint256)`. pop(call(gas(), token, 0, 0x10, 0x44, 0x00, 0x00)) // Reset the approval. mstore(0x34, amount) // Store back the original `amount`. // Retry the approval, reverting upon failure. success := call(gas(), token, 0, 0x10, 0x44, 0x00, 0x20) if iszero(and(eq(mload(0x00), 1), success)) { // Check the `extcodesize` again just in case the token selfdestructs lol. if iszero(lt(or(iszero(extcodesize(token)), returndatasize()), success)) { mstore(0x00, 0x3e3f8f73) // `ApproveFailed()`. revert(0x1c, 0x04) } } } } mstore(0x34, 0) // Restore the part of the free memory pointer that was overwritten. } } /// @dev Returns the amount of ERC20 `token` owned by `account`. /// Returns zero if the `token` does not exist. function balanceOf(address token, address account) internal view returns (uint256 amount) { /// @solidity memory-safe-assembly assembly { mstore(0x14, account) // Store the `account` argument. mstore(0x00, 0x70a08231000000000000000000000000) // `balanceOf(address)`. amount := mul( // The arguments of `mul` are evaluated from right to left. mload(0x20), and( // The arguments of `and` are evaluated from right to left. gt(returndatasize(), 0x1f), // At least 32 bytes returned. staticcall(gas(), token, 0x10, 0x24, 0x20, 0x20) ) ) } } /// @dev Returns the total supply of the `token`. /// Reverts if the token does not exist or does not implement `totalSupply()`. function totalSupply(address token) internal view returns (uint256 result) { /// @solidity memory-safe-assembly assembly { mstore(0x00, 0x18160ddd) // `totalSupply()`. if iszero( and(gt(returndatasize(), 0x1f), staticcall(gas(), token, 0x1c, 0x04, 0x00, 0x20)) ) { mstore(0x00, 0x54cd9435) // `TotalSupplyQueryFailed()`. revert(0x1c, 0x04) } result := mload(0x00) } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.22; import {ERC2981} from "solady/src/tokens/ERC2981.sol"; import {Ownable} from "solady/src/auth/Ownable.sol"; import {Initializable} from "solady/src/utils/Initializable.sol"; import {ERC1155} from "solady/src/tokens/ERC1155.sol"; import {IERC1155MagicDropMetadata} from "../interfaces/IERC1155MagicDropMetadata.sol"; import {ERC1155ConduitPreapprovedCloneable} from "./ERC1155ConduitPreapprovedCloneable.sol"; /// @title ERC1155MagicDropMetadataCloneable /// @notice A cloneable ERC-1155 implementation that supports adjustable metadata URIs, royalty configuration. /// Inherits conduit-based preapprovals, making distribution more gas-efficient. contract ERC1155MagicDropMetadataCloneable is ERC1155ConduitPreapprovedCloneable, IERC1155MagicDropMetadata, ERC2981, Ownable, Initializable { /// @dev The name of the collection. string internal _name; /// @dev The symbol of the collection. string internal _symbol; /// @dev The contract URI. string internal _contractURI; /// @dev The base URI for the collection. string internal _baseURI; /// @dev The address that receives royalty payments. address internal _royaltyReceiver; /// @dev The royalty basis points. uint96 internal _royaltyBps; /// @dev The total supply of each token. mapping(uint256 => TokenSupply) internal _tokenSupply; /// @dev The maximum number of tokens that can be minted by a single wallet. mapping(uint256 => uint256) internal _walletLimit; /// @dev The total number of tokens minted by each user per token. mapping(address => mapping(uint256 => uint256)) internal _totalMintedByUserPerToken; /*============================================================== = INITIALIZERS = ==============================================================*/ /// @notice Initializes the contract with a name, symbol, and owner. /// @dev Can only be called once. It sets the owner, emits a deploy event, and prepares the token for minting stages. /// @param name_ The ERC-1155 name of the collection. /// @param symbol_ The ERC-1155 symbol of the collection. /// @param owner_ The address designated as the initial owner of the contract. function __ERC1155MagicDropMetadataCloneable__init(string memory name_, string memory symbol_, address owner_) internal onlyInitializing { _name = name_; _symbol = symbol_; _initializeOwner(owner_); emit MagicDropTokenDeployed(); } /*============================================================== = PUBLIC VIEW METHODS = ==============================================================*/ /// @notice Returns the name of the collection. function name() public view returns (string memory) { return _name; } /// @notice Returns the symbol of the collection. function symbol() public view returns (string memory) { return _symbol; } /// @notice Returns the current base URI used to construct token URIs. function baseURI() public view override returns (string memory) { return _baseURI; } /// @notice Returns a URI representing contract-level metadata, often used by marketplaces. function contractURI() public view override returns (string memory) { return _contractURI; } /// @notice The address designated to receive royalty payments on secondary sales. /// @return The royalty receiver address. function royaltyAddress() public view returns (address) { return _royaltyReceiver; } /// @notice The royalty rate in basis points (e.g. 100 = 1%) for secondary sales. /// @return The royalty fee in basis points. function royaltyBps() public view returns (uint256) { return _royaltyBps; } /// @notice The maximum number of tokens that can ever be minted by this contract. /// @param tokenId The ID of the token. /// @return The maximum supply of tokens. function maxSupply(uint256 tokenId) public view returns (uint256) { return _tokenSupply[tokenId].maxSupply; } /// @notice Return the total supply of a token. /// @param tokenId The ID of the token. /// @return The total supply of token. function totalSupply(uint256 tokenId) public view returns (uint256) { return _tokenSupply[tokenId].totalSupply; } /// @notice Return the total number of tokens minted for a specific token. /// @param tokenId The ID of the token. /// @return The total number of tokens minted. function totalMinted(uint256 tokenId) public view returns (uint256) { return _tokenSupply[tokenId].totalMinted; } /// @notice Return the total number of tokens minted by a specific address for a specific token. /// @param user The address to query. /// @param tokenId The ID of the token. /// @return The total number of tokens minted by the specified address for the specified token. function totalMintedByUser(address user, uint256 tokenId) public view returns (uint256) { return _totalMintedByUserPerToken[user][tokenId]; } /// @notice Return the maximum number of tokens any single wallet can mint for a specific token. /// @param tokenId The ID of the token. /// @return The minting limit per wallet. function walletLimit(uint256 tokenId) public view returns (uint256) { return _walletLimit[tokenId]; } /// @notice Indicates whether this contract implements a given interface. /// @dev Supports ERC-2981 (royalties) and ERC-4906 (batch metadata updates), in addition to inherited interfaces. /// @param interfaceId The interface ID to check for compliance. /// @return True if the contract implements the specified interface, otherwise false. function supportsInterface(bytes4 interfaceId) public view virtual override(ERC1155, ERC2981) returns (bool) { return interfaceId == 0x2a55205a // ERC-2981 royalties || interfaceId == 0x49064906 // ERC-4906 metadata updates || interfaceId == type(IERC1155MagicDropMetadata).interfaceId || ERC1155.supportsInterface(interfaceId); } /// @notice Returns the URI for a given token ID. /// @dev This returns the base URI for all tokens. /// @return The URI for the token. function uri(uint256 /* tokenId */ ) public view override returns (string memory) { return _baseURI; } /*============================================================== = ADMIN OPERATIONS = ==============================================================*/ /// @notice Sets a new base URI for token metadata, affecting all tokens. /// @dev Emits a batch metadata update event if there are already minted tokens. /// @param newBaseURI The new base URI. function setBaseURI(string calldata newBaseURI) external override onlyOwner { _setBaseURI(newBaseURI); } /// @notice Updates the contract-level metadata URI. /// @dev Useful for marketplaces to display project details. /// @param newContractURI The new contract metadata URI. function setContractURI(string calldata newContractURI) external override onlyOwner { _setContractURI(newContractURI); } /// @notice Adjusts the maximum token supply. /// @dev Cannot increase beyond the original max supply. Cannot set below the current minted amount. /// @param tokenId The ID of the token to update. /// @param newMaxSupply The new maximum supply. function setMaxSupply(uint256 tokenId, uint256 newMaxSupply) external onlyOwner { _setMaxSupply(tokenId, newMaxSupply); } /// @notice Updates the per-wallet minting limit. /// @dev This can be changed at any time to adjust distribution constraints. /// @param tokenId The ID of the token. /// @param newWalletLimit The new per-wallet limit on minted tokens. function setWalletLimit(uint256 tokenId, uint256 newWalletLimit) external onlyOwner { _setWalletLimit(tokenId, newWalletLimit); } /// @notice Configures the royalty information for secondary sales. /// @dev Sets a new receiver and basis points for royalties. Basis points define the percentage rate. /// @param newReceiver The address to receive royalties. /// @param newBps The royalty rate in basis points (e.g., 100 = 1%). function setRoyaltyInfo(address newReceiver, uint96 newBps) external onlyOwner { _setRoyaltyInfo(newReceiver, newBps); } /// @notice Emits an event to notify clients of metadata changes for a specific token range. /// @dev Useful for updating external indexes after significant metadata alterations. /// @param fromTokenId The starting token ID in the updated range. /// @param toTokenId The ending token ID in the updated range. function emitBatchMetadataUpdate(uint256 fromTokenId, uint256 toTokenId) external onlyOwner { emit BatchMetadataUpdate(fromTokenId, toTokenId); } /*============================================================== = INTERNAL HELPERS = ==============================================================*/ /// @notice Internal function setting the base URI for token metadata. /// @param newBaseURI The new base URI string. function _setBaseURI(string calldata newBaseURI) internal { _baseURI = newBaseURI; // Notify EIP-4906 compliant observers of a metadata update. emit BatchMetadataUpdate(0, type(uint256).max); } /// @notice Internal function setting the contract URI. /// @param newContractURI The new contract metadata URI. function _setContractURI(string calldata newContractURI) internal { _contractURI = newContractURI; emit ContractURIUpdated(newContractURI); } /// @notice Internal function setting the royalty information. /// @param newReceiver The address to receive royalties. /// @param newBps The royalty rate in basis points (e.g., 100 = 1%). function _setRoyaltyInfo(address newReceiver, uint96 newBps) internal { _royaltyReceiver = newReceiver; _royaltyBps = newBps; super._setDefaultRoyalty(newReceiver, newBps); emit RoyaltyInfoUpdated(newReceiver, newBps); } /// @notice Internal function setting the maximum token supply. /// @dev Cannot increase beyond the original max supply. Cannot set below the current minted amount. /// @param tokenId The ID of the token. /// @param newMaxSupply The new maximum supply. function _setMaxSupply(uint256 tokenId, uint256 newMaxSupply) internal { uint256 oldMaxSupply = _tokenSupply[tokenId].maxSupply; if (oldMaxSupply != 0 && newMaxSupply > oldMaxSupply) { revert MaxSupplyCannotBeIncreased(); } if (newMaxSupply < _tokenSupply[tokenId].totalMinted) { revert MaxSupplyCannotBeLessThanCurrentSupply(); } if (newMaxSupply > 2 ** 64 - 1) { revert MaxSupplyCannotBeGreaterThan2ToThe64thPower(); } _tokenSupply[tokenId].maxSupply = uint64(newMaxSupply); emit MaxSupplyUpdated(tokenId, oldMaxSupply, newMaxSupply); } /// @notice Internal function setting the per-wallet minting limit. /// @param tokenId The ID of the token. /// @param newWalletLimit The new per-wallet limit on minted tokens. function _setWalletLimit(uint256 tokenId, uint256 newWalletLimit) internal { _walletLimit[tokenId] = newWalletLimit; emit WalletLimitUpdated(tokenId, newWalletLimit); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; struct PublicStage { /// @dev The start time of the public mint stage. uint256 startTime; /// @dev The end time of the public mint stage. uint256 endTime; /// @dev The price of the public mint stage. uint256 price; } struct AllowlistStage { /// @dev The start time of the allowlist mint stage. uint256 startTime; /// @dev The end time of the allowlist mint stage. uint256 endTime; /// @dev The price of the allowlist mint stage. uint256 price; /// @dev The merkle root of the allowlist. bytes32 merkleRoot; } struct SetupConfig { /// @dev The token ID of the token. uint256 tokenId; /// @dev The maximum number of tokens that can be minted. /// - Can be decreased if current supply < new max supply /// - Cannot be increased once set uint256 maxSupply; /// @dev The maximum number of tokens that can be minted per wallet /// @notice A value of 0 indicates unlimited mints per wallet uint256 walletLimit; /// @dev The base URI of the token. string baseURI; /// @dev The contract URI of the token. string contractURI; /// @dev The public mint stage. PublicStage publicStage; /// @dev The allowlist mint stage. AllowlistStage allowlistStage; /// @dev The payout recipient of the token. address payoutRecipient; /// @dev The royalty recipient of the token. address royaltyRecipient; /// @dev The royalty basis points of the token. uint96 royaltyBps; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.22; import {IMagicDropMetadata} from "contracts/common/interfaces/IMagicDropMetadata.sol"; interface IERC1155MagicDropMetadata is IMagicDropMetadata { struct TokenSupply { /// @notice The maximum number of tokens that can be minted. uint64 maxSupply; /// @notice The total number of tokens minted minus the number of tokens burned. uint64 totalSupply; /// @notice The total number of tokens minted. uint64 totalMinted; } /*============================================================== = EVENTS = ==============================================================*/ /// @notice Emitted when the max supply is updated. /// @param _tokenId The token ID. /// @param _oldMaxSupply The old max supply. /// @param _newMaxSupply The new max supply. event MaxSupplyUpdated(uint256 _tokenId, uint256 _oldMaxSupply, uint256 _newMaxSupply); /// @notice Emitted when the wallet limit is updated. /// @param _tokenId The token ID. /// @param _walletLimit The new wallet limit. event WalletLimitUpdated(uint256 _tokenId, uint256 _walletLimit); /*============================================================== = ERRORS = ==============================================================*/ /// @notice Thrown when a mint would exceed the wallet-specific minting limit. /// @param _tokenId The token ID. error WalletLimitExceeded(uint256 _tokenId); /*============================================================== = PUBLIC VIEW METHODS = ==============================================================*/ /// @notice Returns the name of the token function name() external view returns (string memory); /// @notice Returns the symbol of the token function symbol() external view returns (string memory); /// @notice Returns the maximum number of tokens that can be minted /// @dev This value cannot be increased once set, only decreased /// @param tokenId The ID of the token /// @return The maximum supply cap for the collection function maxSupply(uint256 tokenId) external view returns (uint256); /// @notice Returns the total number of tokens minted minus the number of tokens burned /// @param tokenId The ID of the token /// @return The total number of tokens minted minus the number of tokens burned function totalSupply(uint256 tokenId) external view returns (uint256); /// @notice Returns the total number of tokens minted /// @param tokenId The ID of the token /// @return The total number of tokens minted function totalMinted(uint256 tokenId) external view returns (uint256); /// @notice Returns the maximum number of tokens that can be minted per wallet /// @dev Used to prevent excessive concentration of tokens in single wallets /// @param tokenId The ID of the token /// @return The maximum number of tokens allowed per wallet address function walletLimit(uint256 tokenId) external view returns (uint256); /*============================================================== = ADMIN OPERATIONS = ==============================================================*/ /// @notice Updates the maximum supply cap for the collection /// @dev Can only decrease the max supply, never increase it /// Must be greater than or equal to the current total supply /// @param tokenId The ID of the token. /// @param newMaxSupply The new maximum number of tokens that can be minted function setMaxSupply(uint256 tokenId, uint256 newMaxSupply) external; /// @notice Updates the per-wallet token holding limit /// @dev Used to prevent token concentration and ensure fair distribution /// Setting this to 0 effectively removes the wallet limit /// @param tokenId The ID of the token. /// @param walletLimit The new maximum number of tokens allowed per wallet function setWalletLimit(uint256 tokenId, uint256 walletLimit) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.22; address constant CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS = 0x000000000000AAeB6D7670E522A718067333cd4E; address constant ME_SUBSCRIPTION = 0x0403c10721Ff2936EfF684Bbb57CD792Fd4b1B6c; address constant MINT_FEE_RECEIVER = 0x0B98151bEdeE73f9Ba5F2C7b72dEa02D38Ce49Fc;
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; /// @notice A single-use vault that allows a designated caller to withdraw all ETH in it. /// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/ext/zksync/SingleUseETHVault.sol) contract SingleUseETHVault { /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* CUSTOM ERRORS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Unable to withdraw all. error WithdrawAllFailed(); /// @dev Not authorized. error Unauthorized(); /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* WITHDRAW ALL */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ fallback() external payable virtual { /// @solidity memory-safe-assembly assembly { mstore(0x40, 0) // Optimization trick to remove free memory pointer initialization. let owner := sload(0) // Initialization. if iszero(owner) { sstore(0, calldataload(0x00)) // Store the owner. return(0x00, 0x00) // Early return. } // Authorization check. if iszero(eq(caller(), owner)) { mstore(0x00, 0x82b42900) // `Unauthorized()`. revert(0x1c, 0x04) } let to := calldataload(0x00) // If the calldata is less than 32 bytes, zero-left-pad it to 32 bytes. // Then use the rightmost 20 bytes of the word as the `to` address. // This allows for the calldata to be `abi.encode(to)` or `abi.encodePacked(to)`. to := shr(mul(lt(calldatasize(), 0x20), shl(3, sub(0x20, calldatasize()))), to) // If `to` is `address(0)`, set it to `msg.sender`. to := xor(mul(xor(to, caller()), iszero(to)), to) // Transfers the whole balance to `to`. if iszero(call(gas(), to, selfbalance(), 0x00, 0x00, 0x00, 0x00)) { mstore(0x00, 0x651aee10) // `WithdrawAllFailed()`. revert(0x1c, 0x04) } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; /// @notice Simple ERC2981 NFT Royalty Standard implementation. /// @author Solady (https://github.com/vectorized/solady/blob/main/src/tokens/ERC2981.sol) /// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/common/ERC2981.sol) abstract contract ERC2981 { /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* CUSTOM ERRORS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev The royalty fee numerator exceeds the fee denominator. error RoyaltyOverflow(); /// @dev The royalty receiver cannot be the zero address. error RoyaltyReceiverIsZeroAddress(); /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* STORAGE */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev The default royalty info is given by: /// ``` /// let packed := sload(_ERC2981_MASTER_SLOT_SEED) /// let receiver := shr(96, packed) /// let royaltyFraction := xor(packed, shl(96, receiver)) /// ``` /// /// The per token royalty info is given by. /// ``` /// mstore(0x00, tokenId) /// mstore(0x20, _ERC2981_MASTER_SLOT_SEED) /// let packed := sload(keccak256(0x00, 0x40)) /// let receiver := shr(96, packed) /// let royaltyFraction := xor(packed, shl(96, receiver)) /// ``` uint256 private constant _ERC2981_MASTER_SLOT_SEED = 0xaa4ec00224afccfdb7; /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* ERC2981 */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Checks that `_feeDenominator` is non-zero. constructor() { require(_feeDenominator() != 0, "Fee denominator cannot be zero."); } /// @dev Returns the denominator for the royalty amount. /// Defaults to 10000, which represents fees in basis points. /// Override this function to return a custom amount if needed. function _feeDenominator() internal pure virtual returns (uint96) { return 10000; } /// @dev Returns true if this contract implements the interface defined by `interfaceId`. /// See: https://eips.ethereum.org/EIPS/eip-165 /// This function call must use less than 30000 gas. function supportsInterface(bytes4 interfaceId) public view virtual returns (bool result) { /// @solidity memory-safe-assembly assembly { let s := shr(224, interfaceId) // ERC165: 0x01ffc9a7, ERC2981: 0x2a55205a. result := or(eq(s, 0x01ffc9a7), eq(s, 0x2a55205a)) } } /// @dev Returns the `receiver` and `royaltyAmount` for `tokenId` sold at `salePrice`. function royaltyInfo(uint256 tokenId, uint256 salePrice) public view virtual returns (address receiver, uint256 royaltyAmount) { uint256 feeDenominator = _feeDenominator(); /// @solidity memory-safe-assembly assembly { mstore(0x00, tokenId) mstore(0x20, _ERC2981_MASTER_SLOT_SEED) let packed := sload(keccak256(0x00, 0x40)) receiver := shr(96, packed) if iszero(receiver) { packed := sload(mload(0x20)) receiver := shr(96, packed) } let x := salePrice let y := xor(packed, shl(96, receiver)) // `feeNumerator`. // Overflow check, equivalent to `require(y == 0 || x <= type(uint256).max / y)`. // Out-of-gas revert. Should not be triggered in practice, but included for safety. returndatacopy(returndatasize(), returndatasize(), mul(y, gt(x, div(not(0), y)))) royaltyAmount := div(mul(x, y), feeDenominator) } } /// @dev Sets the default royalty `receiver` and `feeNumerator`. /// /// Requirements: /// - `receiver` must not be the zero address. /// - `feeNumerator` must not be greater than the fee denominator. function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual { uint256 feeDenominator = _feeDenominator(); /// @solidity memory-safe-assembly assembly { feeNumerator := shr(160, shl(160, feeNumerator)) if gt(feeNumerator, feeDenominator) { mstore(0x00, 0x350a88b3) // `RoyaltyOverflow()`. revert(0x1c, 0x04) } let packed := shl(96, receiver) if iszero(packed) { mstore(0x00, 0xb4457eaa) // `RoyaltyReceiverIsZeroAddress()`. revert(0x1c, 0x04) } sstore(_ERC2981_MASTER_SLOT_SEED, or(packed, feeNumerator)) } } /// @dev Sets the default royalty `receiver` and `feeNumerator` to zero. function _deleteDefaultRoyalty() internal virtual { /// @solidity memory-safe-assembly assembly { sstore(_ERC2981_MASTER_SLOT_SEED, 0) } } /// @dev Sets the royalty `receiver` and `feeNumerator` for `tokenId`. /// /// Requirements: /// - `receiver` must not be the zero address. /// - `feeNumerator` must not be greater than the fee denominator. function _setTokenRoyalty(uint256 tokenId, address receiver, uint96 feeNumerator) internal virtual { uint256 feeDenominator = _feeDenominator(); /// @solidity memory-safe-assembly assembly { feeNumerator := shr(160, shl(160, feeNumerator)) if gt(feeNumerator, feeDenominator) { mstore(0x00, 0x350a88b3) // `RoyaltyOverflow()`. revert(0x1c, 0x04) } let packed := shl(96, receiver) if iszero(packed) { mstore(0x00, 0xb4457eaa) // `RoyaltyReceiverIsZeroAddress()`. revert(0x1c, 0x04) } mstore(0x00, tokenId) mstore(0x20, _ERC2981_MASTER_SLOT_SEED) sstore(keccak256(0x00, 0x40), or(packed, feeNumerator)) } } /// @dev Sets the royalty `receiver` and `feeNumerator` for `tokenId` to zero. function _resetTokenRoyalty(uint256 tokenId) internal virtual { /// @solidity memory-safe-assembly assembly { mstore(0x00, tokenId) mstore(0x20, _ERC2981_MASTER_SLOT_SEED) sstore(keccak256(0x00, 0x40), 0) } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; /// @notice Simple single owner authorization mixin. /// @author Solady (https://github.com/vectorized/solady/blob/main/src/auth/Ownable.sol) /// /// @dev Note: /// This implementation does NOT auto-initialize the owner to `msg.sender`. /// You MUST call the `_initializeOwner` in the constructor / initializer. /// /// While the ownable portion follows /// [EIP-173](https://eips.ethereum.org/EIPS/eip-173) for compatibility, /// the nomenclature for the 2-step ownership handover may be unique to this codebase. abstract contract Ownable { /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* CUSTOM ERRORS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev The caller is not authorized to call the function. error Unauthorized(); /// @dev The `newOwner` cannot be the zero address. error NewOwnerIsZeroAddress(); /// @dev The `pendingOwner` does not have a valid handover request. error NoHandoverRequest(); /// @dev Cannot double-initialize. error AlreadyInitialized(); /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* EVENTS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev The ownership is transferred from `oldOwner` to `newOwner`. /// This event is intentionally kept the same as OpenZeppelin's Ownable to be /// compatible with indexers and [EIP-173](https://eips.ethereum.org/EIPS/eip-173), /// despite it not being as lightweight as a single argument event. event OwnershipTransferred(address indexed oldOwner, address indexed newOwner); /// @dev An ownership handover to `pendingOwner` has been requested. event OwnershipHandoverRequested(address indexed pendingOwner); /// @dev The ownership handover to `pendingOwner` has been canceled. event OwnershipHandoverCanceled(address indexed pendingOwner); /// @dev `keccak256(bytes("OwnershipTransferred(address,address)"))`. uint256 private constant _OWNERSHIP_TRANSFERRED_EVENT_SIGNATURE = 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0; /// @dev `keccak256(bytes("OwnershipHandoverRequested(address)"))`. uint256 private constant _OWNERSHIP_HANDOVER_REQUESTED_EVENT_SIGNATURE = 0xdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d; /// @dev `keccak256(bytes("OwnershipHandoverCanceled(address)"))`. uint256 private constant _OWNERSHIP_HANDOVER_CANCELED_EVENT_SIGNATURE = 0xfa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92; /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* STORAGE */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev The owner slot is given by: /// `bytes32(~uint256(uint32(bytes4(keccak256("_OWNER_SLOT_NOT")))))`. /// It is intentionally chosen to be a high value /// to avoid collision with lower slots. /// The choice of manual storage layout is to enable compatibility /// with both regular and upgradeable contracts. bytes32 internal constant _OWNER_SLOT = 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927; /// The ownership handover slot of `newOwner` is given by: /// ``` /// mstore(0x00, or(shl(96, user), _HANDOVER_SLOT_SEED)) /// let handoverSlot := keccak256(0x00, 0x20) /// ``` /// It stores the expiry timestamp of the two-step ownership handover. uint256 private constant _HANDOVER_SLOT_SEED = 0x389a75e1; /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* INTERNAL FUNCTIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Override to return true to make `_initializeOwner` prevent double-initialization. function _guardInitializeOwner() internal pure virtual returns (bool guard) {} /// @dev Initializes the owner directly without authorization guard. /// This function must be called upon initialization, /// regardless of whether the contract is upgradeable or not. /// This is to enable generalization to both regular and upgradeable contracts, /// and to save gas in case the initial owner is not the caller. /// For performance reasons, this function will not check if there /// is an existing owner. function _initializeOwner(address newOwner) internal virtual { if (_guardInitializeOwner()) { /// @solidity memory-safe-assembly assembly { let ownerSlot := _OWNER_SLOT if sload(ownerSlot) { mstore(0x00, 0x0dc149f0) // `AlreadyInitialized()`. revert(0x1c, 0x04) } // Clean the upper 96 bits. newOwner := shr(96, shl(96, newOwner)) // Store the new value. sstore(ownerSlot, or(newOwner, shl(255, iszero(newOwner)))) // Emit the {OwnershipTransferred} event. log3(0, 0, _OWNERSHIP_TRANSFERRED_EVENT_SIGNATURE, 0, newOwner) } } else { /// @solidity memory-safe-assembly assembly { // Clean the upper 96 bits. newOwner := shr(96, shl(96, newOwner)) // Store the new value. sstore(_OWNER_SLOT, newOwner) // Emit the {OwnershipTransferred} event. log3(0, 0, _OWNERSHIP_TRANSFERRED_EVENT_SIGNATURE, 0, newOwner) } } } /// @dev Sets the owner directly without authorization guard. function _setOwner(address newOwner) internal virtual { if (_guardInitializeOwner()) { /// @solidity memory-safe-assembly assembly { let ownerSlot := _OWNER_SLOT // Clean the upper 96 bits. newOwner := shr(96, shl(96, newOwner)) // Emit the {OwnershipTransferred} event. log3(0, 0, _OWNERSHIP_TRANSFERRED_EVENT_SIGNATURE, sload(ownerSlot), newOwner) // Store the new value. sstore(ownerSlot, or(newOwner, shl(255, iszero(newOwner)))) } } else { /// @solidity memory-safe-assembly assembly { let ownerSlot := _OWNER_SLOT // Clean the upper 96 bits. newOwner := shr(96, shl(96, newOwner)) // Emit the {OwnershipTransferred} event. log3(0, 0, _OWNERSHIP_TRANSFERRED_EVENT_SIGNATURE, sload(ownerSlot), newOwner) // Store the new value. sstore(ownerSlot, newOwner) } } } /// @dev Throws if the sender is not the owner. function _checkOwner() internal view virtual { /// @solidity memory-safe-assembly assembly { // If the caller is not the stored owner, revert. if iszero(eq(caller(), sload(_OWNER_SLOT))) { mstore(0x00, 0x82b42900) // `Unauthorized()`. revert(0x1c, 0x04) } } } /// @dev Returns how long a two-step ownership handover is valid for in seconds. /// Override to return a different value if needed. /// Made internal to conserve bytecode. Wrap it in a public function if needed. function _ownershipHandoverValidFor() internal view virtual returns (uint64) { return 48 * 3600; } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* PUBLIC UPDATE FUNCTIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Allows the owner to transfer the ownership to `newOwner`. function transferOwnership(address newOwner) public payable virtual onlyOwner { /// @solidity memory-safe-assembly assembly { if iszero(shl(96, newOwner)) { mstore(0x00, 0x7448fbae) // `NewOwnerIsZeroAddress()`. revert(0x1c, 0x04) } } _setOwner(newOwner); } /// @dev Allows the owner to renounce their ownership. function renounceOwnership() public payable virtual onlyOwner { _setOwner(address(0)); } /// @dev Request a two-step ownership handover to the caller. /// The request will automatically expire in 48 hours (172800 seconds) by default. function requestOwnershipHandover() public payable virtual { unchecked { uint256 expires = block.timestamp + _ownershipHandoverValidFor(); /// @solidity memory-safe-assembly assembly { // Compute and set the handover slot to `expires`. mstore(0x0c, _HANDOVER_SLOT_SEED) mstore(0x00, caller()) sstore(keccak256(0x0c, 0x20), expires) // Emit the {OwnershipHandoverRequested} event. log2(0, 0, _OWNERSHIP_HANDOVER_REQUESTED_EVENT_SIGNATURE, caller()) } } } /// @dev Cancels the two-step ownership handover to the caller, if any. function cancelOwnershipHandover() public payable virtual { /// @solidity memory-safe-assembly assembly { // Compute and set the handover slot to 0. mstore(0x0c, _HANDOVER_SLOT_SEED) mstore(0x00, caller()) sstore(keccak256(0x0c, 0x20), 0) // Emit the {OwnershipHandoverCanceled} event. log2(0, 0, _OWNERSHIP_HANDOVER_CANCELED_EVENT_SIGNATURE, caller()) } } /// @dev Allows the owner to complete the two-step ownership handover to `pendingOwner`. /// Reverts if there is no existing ownership handover requested by `pendingOwner`. function completeOwnershipHandover(address pendingOwner) public payable virtual onlyOwner { /// @solidity memory-safe-assembly assembly { // Compute and set the handover slot to 0. mstore(0x0c, _HANDOVER_SLOT_SEED) mstore(0x00, pendingOwner) let handoverSlot := keccak256(0x0c, 0x20) // If the handover does not exist, or has expired. if gt(timestamp(), sload(handoverSlot)) { mstore(0x00, 0x6f5e8818) // `NoHandoverRequest()`. revert(0x1c, 0x04) } // Set the handover slot to 0. sstore(handoverSlot, 0) } _setOwner(pendingOwner); } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* PUBLIC READ FUNCTIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Returns the owner of the contract. function owner() public view virtual returns (address result) { /// @solidity memory-safe-assembly assembly { result := sload(_OWNER_SLOT) } } /// @dev Returns the expiry timestamp for the two-step ownership handover to `pendingOwner`. function ownershipHandoverExpiresAt(address pendingOwner) public view virtual returns (uint256 result) { /// @solidity memory-safe-assembly assembly { // Compute the handover slot. mstore(0x0c, _HANDOVER_SLOT_SEED) mstore(0x00, pendingOwner) // Load the handover slot. result := sload(keccak256(0x0c, 0x20)) } } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* MODIFIERS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Marks a function as only callable by the owner. modifier onlyOwner() virtual { _checkOwner(); _; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; /// @notice Initializable mixin for the upgradeable contracts. /// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/Initializable.sol) /// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/tree/master/contracts/proxy/utils/Initializable.sol) abstract contract Initializable { /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* CUSTOM ERRORS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev The contract is already initialized. error InvalidInitialization(); /// @dev The contract is not initializing. error NotInitializing(); /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* EVENTS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Triggered when the contract has been initialized. event Initialized(uint64 version); /// @dev `keccak256(bytes("Initialized(uint64)"))`. bytes32 private constant _INTIALIZED_EVENT_SIGNATURE = 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2; /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* STORAGE */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev The default initializable slot is given by: /// `bytes32(~uint256(uint32(bytes4(keccak256("_INITIALIZABLE_SLOT")))))`. /// /// Bits Layout: /// - [0] `initializing` /// - [1..64] `initializedVersion` bytes32 private constant _INITIALIZABLE_SLOT = 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf601132; /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* CONSTRUCTOR */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ constructor() { // Construction time check to ensure that `_initializableSlot()` is not // overridden to zero. Will be optimized away if there is no revert. require(_initializableSlot() != bytes32(0)); } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* OPERATIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Override to return a non-zero custom storage slot if required. function _initializableSlot() internal pure virtual returns (bytes32) { return _INITIALIZABLE_SLOT; } /// @dev Guards an initializer function so that it can be invoked at most once. /// /// You can guard a function with `onlyInitializing` such that it can be called /// through a function guarded with `initializer`. /// /// This is similar to `reinitializer(1)`, except that in the context of a constructor, /// an `initializer` guarded function can be invoked multiple times. /// This can be useful during testing and is not expected to be used in production. /// /// Emits an {Initialized} event. modifier initializer() virtual { bytes32 s = _initializableSlot(); /// @solidity memory-safe-assembly assembly { let i := sload(s) // Set `initializing` to 1, `initializedVersion` to 1. sstore(s, 3) // If `!(initializing == 0 && initializedVersion == 0)`. if i { // If `!(address(this).code.length == 0 && initializedVersion == 1)`. if iszero(lt(extcodesize(address()), eq(shr(1, i), 1))) { mstore(0x00, 0xf92ee8a9) // `InvalidInitialization()`. revert(0x1c, 0x04) } s := shl(shl(255, i), s) // Skip initializing if `initializing == 1`. } } _; /// @solidity memory-safe-assembly assembly { if s { // Set `initializing` to 0, `initializedVersion` to 1. sstore(s, 2) // Emit the {Initialized} event. mstore(0x20, 1) log1(0x20, 0x20, _INTIALIZED_EVENT_SIGNATURE) } } } /// @dev Guards an reinitialzer function so that it can be invoked at most once. /// /// You can guard a function with `onlyInitializing` such that it can be called /// through a function guarded with `reinitializer`. /// /// Emits an {Initialized} event. modifier reinitializer(uint64 version) virtual { bytes32 s = _initializableSlot(); /// @solidity memory-safe-assembly assembly { // Clean upper bits, and shift left by 1 to make space for the initializing bit. version := shl(1, and(version, 0xffffffffffffffff)) let i := sload(s) // If `initializing == 1 || initializedVersion >= version`. if iszero(lt(and(i, 1), lt(i, version))) { mstore(0x00, 0xf92ee8a9) // `InvalidInitialization()`. revert(0x1c, 0x04) } // Set `initializing` to 1, `initializedVersion` to `version`. sstore(s, or(1, version)) } _; /// @solidity memory-safe-assembly assembly { // Set `initializing` to 0, `initializedVersion` to `version`. sstore(s, version) // Emit the {Initialized} event. mstore(0x20, shr(1, version)) log1(0x20, 0x20, _INTIALIZED_EVENT_SIGNATURE) } } /// @dev Guards a function such that it can only be called in the scope /// of a function guarded with `initializer` or `reinitializer`. modifier onlyInitializing() virtual { _checkInitializing(); _; } /// @dev Reverts if the contract is not initializing. function _checkInitializing() internal view virtual { bytes32 s = _initializableSlot(); /// @solidity memory-safe-assembly assembly { if iszero(and(1, sload(s))) { mstore(0x00, 0xd7e6bcf8) // `NotInitializing()`. revert(0x1c, 0x04) } } } /// @dev Locks any future initializations by setting the initialized version to `2**64 - 1`. /// /// Calling this in the constructor will prevent the contract from being initialized /// or reinitialized. It is recommended to use this to lock implementation contracts /// that are designed to be called through proxies. /// /// Emits an {Initialized} event the first time it is successfully called. function _disableInitializers() internal virtual { bytes32 s = _initializableSlot(); /// @solidity memory-safe-assembly assembly { let i := sload(s) if and(i, 1) { mstore(0x00, 0xf92ee8a9) // `InvalidInitialization()`. revert(0x1c, 0x04) } let uint64max := 0xffffffffffffffff if iszero(eq(shr(1, i), uint64max)) { // Set `initializing` to 0, `initializedVersion` to `2**64 - 1`. sstore(s, shl(1, uint64max)) // Emit the {Initialized} event. mstore(0x20, uint64max) log1(0x20, 0x20, _INTIALIZED_EVENT_SIGNATURE) } } } /// @dev Returns the highest version that has been initialized. function _getInitializedVersion() internal view virtual returns (uint64 version) { bytes32 s = _initializableSlot(); /// @solidity memory-safe-assembly assembly { version := shr(1, sload(s)) } } /// @dev Returns whether the contract is currently initializing. function _isInitializing() internal view virtual returns (bool result) { bytes32 s = _initializableSlot(); /// @solidity memory-safe-assembly assembly { result := and(1, sload(s)) } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; /// @notice Simple ERC1155 implementation. /// @author Solady (https://github.com/vectorized/solady/blob/main/src/tokens/ERC1155.sol) /// @author Modified from Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC1155.sol) /// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/tree/master/contracts/token/ERC1155/ERC1155.sol) /// /// @dev Note: /// - The ERC1155 standard allows for self-approvals. /// For performance, this implementation WILL NOT revert for such actions. /// Please add any checks with overrides if desired. /// - The transfer functions use the identity precompile (0x4) /// to copy memory internally. /// /// If you are overriding: /// - Make sure all variables written to storage are properly cleaned // (e.g. the bool value for `isApprovedForAll` MUST be either 1 or 0 under the hood). /// - Check that the overridden function is actually used in the function you want to /// change the behavior of. Much of the code has been manually inlined for performance. abstract contract ERC1155 { /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* CUSTOM ERRORS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev The lengths of the input arrays are not the same. error ArrayLengthsMismatch(); /// @dev Cannot mint or transfer to the zero address. error TransferToZeroAddress(); /// @dev The recipient's balance has overflowed. error AccountBalanceOverflow(); /// @dev Insufficient balance. error InsufficientBalance(); /// @dev Only the token owner or an approved account can manage the tokens. error NotOwnerNorApproved(); /// @dev Cannot safely transfer to a contract that does not implement /// the ERC1155Receiver interface. error TransferToNonERC1155ReceiverImplementer(); /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* EVENTS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Emitted when `amount` of token `id` is transferred /// from `from` to `to` by `operator`. event TransferSingle( address indexed operator, address indexed from, address indexed to, uint256 id, uint256 amount ); /// @dev Emitted when `amounts` of token `ids` are transferred /// from `from` to `to` by `operator`. event TransferBatch( address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] amounts ); /// @dev Emitted when `owner` enables or disables `operator` to manage all of their tokens. event ApprovalForAll(address indexed owner, address indexed operator, bool isApproved); /// @dev Emitted when the Uniform Resource Identifier (URI) for token `id` /// is updated to `value`. This event is not used in the base contract. /// You may need to emit this event depending on your URI logic. /// /// See: https://eips.ethereum.org/EIPS/eip-1155#metadata event URI(string value, uint256 indexed id); /// @dev `keccak256(bytes("TransferSingle(address,address,address,uint256,uint256)"))`. uint256 private constant _TRANSFER_SINGLE_EVENT_SIGNATURE = 0xc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62; /// @dev `keccak256(bytes("TransferBatch(address,address,address,uint256[],uint256[])"))`. uint256 private constant _TRANSFER_BATCH_EVENT_SIGNATURE = 0x4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb; /// @dev `keccak256(bytes("ApprovalForAll(address,address,bool)"))`. uint256 private constant _APPROVAL_FOR_ALL_EVENT_SIGNATURE = 0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31; /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* STORAGE */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev The `ownerSlotSeed` of a given owner is given by. /// ``` /// let ownerSlotSeed := or(_ERC1155_MASTER_SLOT_SEED, shl(96, owner)) /// ``` /// /// The balance slot of `owner` is given by. /// ``` /// mstore(0x20, ownerSlotSeed) /// mstore(0x00, id) /// let balanceSlot := keccak256(0x00, 0x40) /// ``` /// /// The operator approval slot of `owner` is given by. /// ``` /// mstore(0x20, ownerSlotSeed) /// mstore(0x00, operator) /// let operatorApprovalSlot := keccak256(0x0c, 0x34) /// ``` uint256 private constant _ERC1155_MASTER_SLOT_SEED = 0x9a31110384e0b0c9; /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* ERC1155 METADATA */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Returns the URI for token `id`. /// /// You can either return the same templated URI for all token IDs, /// (e.g. "https://example.com/api/{id}.json"), /// or return a unique URI for each `id`. /// /// See: https://eips.ethereum.org/EIPS/eip-1155#metadata function uri(uint256 id) public view virtual returns (string memory); /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* ERC1155 */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Returns the amount of `id` owned by `owner`. function balanceOf(address owner, uint256 id) public view virtual returns (uint256 result) { /// @solidity memory-safe-assembly assembly { mstore(0x20, _ERC1155_MASTER_SLOT_SEED) mstore(0x14, owner) mstore(0x00, id) result := sload(keccak256(0x00, 0x40)) } } /// @dev Returns whether `operator` is approved to manage the tokens of `owner`. function isApprovedForAll(address owner, address operator) public view virtual returns (bool result) { /// @solidity memory-safe-assembly assembly { mstore(0x20, _ERC1155_MASTER_SLOT_SEED) mstore(0x14, owner) mstore(0x00, operator) result := sload(keccak256(0x0c, 0x34)) } } /// @dev Sets whether `operator` is approved to manage the tokens of the caller. /// /// Emits a {ApprovalForAll} event. function setApprovalForAll(address operator, bool isApproved) public virtual { /// @solidity memory-safe-assembly assembly { // Convert to 0 or 1. isApproved := iszero(iszero(isApproved)) // Update the `isApproved` for (`msg.sender`, `operator`). mstore(0x20, _ERC1155_MASTER_SLOT_SEED) mstore(0x14, caller()) mstore(0x00, operator) sstore(keccak256(0x0c, 0x34), isApproved) // Emit the {ApprovalForAll} event. mstore(0x00, isApproved) // forgefmt: disable-next-line log3(0x00, 0x20, _APPROVAL_FOR_ALL_EVENT_SIGNATURE, caller(), shr(96, shl(96, operator))) } } /// @dev Transfers `amount` of `id` from `from` to `to`. /// /// Requirements: /// - `to` cannot be the zero address. /// - `from` must have at least `amount` of `id`. /// - If the caller is not `from`, /// it must be approved to manage the tokens of `from`. /// - If `to` refers to a smart contract, it must implement /// {ERC1155-onERC1155Received}, which is called upon a batch transfer. /// /// Emits a {TransferSingle} event. function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes calldata data ) public virtual { if (_useBeforeTokenTransfer()) { _beforeTokenTransfer(from, to, _single(id), _single(amount), data); } /// @solidity memory-safe-assembly assembly { let fromSlotSeed := or(_ERC1155_MASTER_SLOT_SEED, shl(96, from)) let toSlotSeed := or(_ERC1155_MASTER_SLOT_SEED, shl(96, to)) mstore(0x20, fromSlotSeed) // Clear the upper 96 bits. from := shr(96, fromSlotSeed) to := shr(96, toSlotSeed) // Revert if `to` is the zero address. if iszero(to) { mstore(0x00, 0xea553b34) // `TransferToZeroAddress()`. revert(0x1c, 0x04) } // If the caller is not `from`, do the authorization check. if iszero(eq(caller(), from)) { mstore(0x00, caller()) if iszero(sload(keccak256(0x0c, 0x34))) { mstore(0x00, 0x4b6e7f18) // `NotOwnerNorApproved()`. revert(0x1c, 0x04) } } // Subtract and store the updated balance of `from`. { mstore(0x00, id) let fromBalanceSlot := keccak256(0x00, 0x40) let fromBalance := sload(fromBalanceSlot) if gt(amount, fromBalance) { mstore(0x00, 0xf4d678b8) // `InsufficientBalance()`. revert(0x1c, 0x04) } sstore(fromBalanceSlot, sub(fromBalance, amount)) } // Increase and store the updated balance of `to`. { mstore(0x20, toSlotSeed) let toBalanceSlot := keccak256(0x00, 0x40) let toBalanceBefore := sload(toBalanceSlot) let toBalanceAfter := add(toBalanceBefore, amount) if lt(toBalanceAfter, toBalanceBefore) { mstore(0x00, 0x01336cea) // `AccountBalanceOverflow()`. revert(0x1c, 0x04) } sstore(toBalanceSlot, toBalanceAfter) } // Emit a {TransferSingle} event. mstore(0x20, amount) log4(0x00, 0x40, _TRANSFER_SINGLE_EVENT_SIGNATURE, caller(), from, to) } if (_useAfterTokenTransfer()) { _afterTokenTransfer(from, to, _single(id), _single(amount), data); } /// @solidity memory-safe-assembly assembly { // Do the {onERC1155Received} check if `to` is a smart contract. if extcodesize(to) { // Prepare the calldata. let m := mload(0x40) // `onERC1155Received(address,address,uint256,uint256,bytes)`. mstore(m, 0xf23a6e61) mstore(add(m, 0x20), caller()) mstore(add(m, 0x40), from) mstore(add(m, 0x60), id) mstore(add(m, 0x80), amount) mstore(add(m, 0xa0), 0xa0) mstore(add(m, 0xc0), data.length) calldatacopy(add(m, 0xe0), data.offset, data.length) // Revert if the call reverts. if iszero(call(gas(), to, 0, add(m, 0x1c), add(0xc4, data.length), m, 0x20)) { if returndatasize() { // Bubble up the revert if the call reverts. returndatacopy(m, 0x00, returndatasize()) revert(m, returndatasize()) } } // Load the returndata and compare it with the function selector. if iszero(eq(mload(m), shl(224, 0xf23a6e61))) { mstore(0x00, 0x9c05499b) // `TransferToNonERC1155ReceiverImplementer()`. revert(0x1c, 0x04) } } } } /// @dev Transfers `amounts` of `ids` from `from` to `to`. /// /// Requirements: /// - `to` cannot be the zero address. /// - `from` must have at least `amount` of `id`. /// - `ids` and `amounts` must have the same length. /// - If the caller is not `from`, /// it must be approved to manage the tokens of `from`. /// - If `to` refers to a smart contract, it must implement /// {ERC1155-onERC1155BatchReceived}, which is called upon a batch transfer. /// /// Emits a {TransferBatch} event. function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) public virtual { if (_useBeforeTokenTransfer()) { _beforeTokenTransfer(from, to, ids, amounts, data); } /// @solidity memory-safe-assembly assembly { if iszero(eq(ids.length, amounts.length)) { mstore(0x00, 0x3b800a46) // `ArrayLengthsMismatch()`. revert(0x1c, 0x04) } let fromSlotSeed := or(_ERC1155_MASTER_SLOT_SEED, shl(96, from)) let toSlotSeed := or(_ERC1155_MASTER_SLOT_SEED, shl(96, to)) mstore(0x20, fromSlotSeed) // Clear the upper 96 bits. from := shr(96, fromSlotSeed) to := shr(96, toSlotSeed) // Revert if `to` is the zero address. if iszero(to) { mstore(0x00, 0xea553b34) // `TransferToZeroAddress()`. revert(0x1c, 0x04) } // If the caller is not `from`, do the authorization check. if iszero(eq(caller(), from)) { mstore(0x00, caller()) if iszero(sload(keccak256(0x0c, 0x34))) { mstore(0x00, 0x4b6e7f18) // `NotOwnerNorApproved()`. revert(0x1c, 0x04) } } // Loop through all the `ids` and update the balances. { for { let i := shl(5, ids.length) } i {} { i := sub(i, 0x20) let amount := calldataload(add(amounts.offset, i)) // Subtract and store the updated balance of `from`. { mstore(0x20, fromSlotSeed) mstore(0x00, calldataload(add(ids.offset, i))) let fromBalanceSlot := keccak256(0x00, 0x40) let fromBalance := sload(fromBalanceSlot) if gt(amount, fromBalance) { mstore(0x00, 0xf4d678b8) // `InsufficientBalance()`. revert(0x1c, 0x04) } sstore(fromBalanceSlot, sub(fromBalance, amount)) } // Increase and store the updated balance of `to`. { mstore(0x20, toSlotSeed) let toBalanceSlot := keccak256(0x00, 0x40) let toBalanceBefore := sload(toBalanceSlot) let toBalanceAfter := add(toBalanceBefore, amount) if lt(toBalanceAfter, toBalanceBefore) { mstore(0x00, 0x01336cea) // `AccountBalanceOverflow()`. revert(0x1c, 0x04) } sstore(toBalanceSlot, toBalanceAfter) } } } // Emit a {TransferBatch} event. { let m := mload(0x40) // Copy the `ids`. mstore(m, 0x40) let n := shl(5, ids.length) mstore(add(m, 0x40), ids.length) calldatacopy(add(m, 0x60), ids.offset, n) // Copy the `amounts`. mstore(add(m, 0x20), add(0x60, n)) let o := add(add(m, n), 0x60) mstore(o, ids.length) calldatacopy(add(o, 0x20), amounts.offset, n) // Do the emit. log4(m, add(add(n, n), 0x80), _TRANSFER_BATCH_EVENT_SIGNATURE, caller(), from, to) } } if (_useAfterTokenTransfer()) { _afterTokenTransferCalldata(from, to, ids, amounts, data); } /// @solidity memory-safe-assembly assembly { // Do the {onERC1155BatchReceived} check if `to` is a smart contract. if extcodesize(to) { mstore(0x00, to) // Cache `to` to prevent stack too deep. let m := mload(0x40) // Prepare the calldata. // `onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)`. mstore(m, 0xbc197c81) mstore(add(m, 0x20), caller()) mstore(add(m, 0x40), from) // Copy the `ids`. mstore(add(m, 0x60), 0xa0) let n := shl(5, ids.length) mstore(add(m, 0xc0), ids.length) calldatacopy(add(m, 0xe0), ids.offset, n) // Copy the `amounts`. mstore(add(m, 0x80), add(0xc0, n)) let o := add(add(m, n), 0xe0) mstore(o, ids.length) calldatacopy(add(o, 0x20), amounts.offset, n) // Copy the `data`. mstore(add(m, 0xa0), add(add(0xe0, n), n)) o := add(add(o, n), 0x20) mstore(o, data.length) calldatacopy(add(o, 0x20), data.offset, data.length) let nAll := add(0x104, add(data.length, add(n, n))) // Revert if the call reverts. if iszero(call(gas(), mload(0x00), 0, add(mload(0x40), 0x1c), nAll, m, 0x20)) { if returndatasize() { // Bubble up the revert if the call reverts. returndatacopy(m, 0x00, returndatasize()) revert(m, returndatasize()) } } // Load the returndata and compare it with the function selector. if iszero(eq(mload(m), shl(224, 0xbc197c81))) { mstore(0x00, 0x9c05499b) // `TransferToNonERC1155ReceiverImplementer()`. revert(0x1c, 0x04) } } } } /// @dev Returns the amounts of `ids` for `owners. /// /// Requirements: /// - `owners` and `ids` must have the same length. function balanceOfBatch(address[] calldata owners, uint256[] calldata ids) public view virtual returns (uint256[] memory balances) { /// @solidity memory-safe-assembly assembly { if iszero(eq(ids.length, owners.length)) { mstore(0x00, 0x3b800a46) // `ArrayLengthsMismatch()`. revert(0x1c, 0x04) } balances := mload(0x40) mstore(balances, ids.length) let o := add(balances, 0x20) let i := shl(5, ids.length) mstore(0x40, add(i, o)) // Loop through all the `ids` and load the balances. for {} i {} { i := sub(i, 0x20) let owner := calldataload(add(owners.offset, i)) mstore(0x20, or(_ERC1155_MASTER_SLOT_SEED, shl(96, owner))) mstore(0x00, calldataload(add(ids.offset, i))) mstore(add(o, i), sload(keccak256(0x00, 0x40))) } } } /// @dev Returns true if this contract implements the interface defined by `interfaceId`. /// See: https://eips.ethereum.org/EIPS/eip-165 /// This function call must use less than 30000 gas. function supportsInterface(bytes4 interfaceId) public view virtual returns (bool result) { /// @solidity memory-safe-assembly assembly { let s := shr(224, interfaceId) // ERC165: 0x01ffc9a7, ERC1155: 0xd9b67a26, ERC1155MetadataURI: 0x0e89341c. result := or(or(eq(s, 0x01ffc9a7), eq(s, 0xd9b67a26)), eq(s, 0x0e89341c)) } } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* INTERNAL MINT FUNCTIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Mints `amount` of `id` to `to`. /// /// Requirements: /// - `to` cannot be the zero address. /// - If `to` refers to a smart contract, it must implement /// {ERC1155-onERC1155Received}, which is called upon a batch transfer. /// /// Emits a {TransferSingle} event. function _mint(address to, uint256 id, uint256 amount, bytes memory data) internal virtual { if (_useBeforeTokenTransfer()) { _beforeTokenTransfer(address(0), to, _single(id), _single(amount), data); } /// @solidity memory-safe-assembly assembly { let to_ := shl(96, to) // Revert if `to` is the zero address. if iszero(to_) { mstore(0x00, 0xea553b34) // `TransferToZeroAddress()`. revert(0x1c, 0x04) } // Increase and store the updated balance of `to`. { mstore(0x20, _ERC1155_MASTER_SLOT_SEED) mstore(0x14, to) mstore(0x00, id) let toBalanceSlot := keccak256(0x00, 0x40) let toBalanceBefore := sload(toBalanceSlot) let toBalanceAfter := add(toBalanceBefore, amount) if lt(toBalanceAfter, toBalanceBefore) { mstore(0x00, 0x01336cea) // `AccountBalanceOverflow()`. revert(0x1c, 0x04) } sstore(toBalanceSlot, toBalanceAfter) } // Emit a {TransferSingle} event. mstore(0x20, amount) log4(0x00, 0x40, _TRANSFER_SINGLE_EVENT_SIGNATURE, caller(), 0, shr(96, to_)) } if (_useAfterTokenTransfer()) { _afterTokenTransfer(address(0), to, _single(id), _single(amount), data); } if (_hasCode(to)) _checkOnERC1155Received(address(0), to, id, amount, data); } /// @dev Mints `amounts` of `ids` to `to`. /// /// Requirements: /// - `to` cannot be the zero address. /// - `ids` and `amounts` must have the same length. /// - If `to` refers to a smart contract, it must implement /// {ERC1155-onERC1155BatchReceived}, which is called upon a batch transfer. /// /// Emits a {TransferBatch} event. function _batchMint( address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { if (_useBeforeTokenTransfer()) { _beforeTokenTransfer(address(0), to, ids, amounts, data); } /// @solidity memory-safe-assembly assembly { if iszero(eq(mload(ids), mload(amounts))) { mstore(0x00, 0x3b800a46) // `ArrayLengthsMismatch()`. revert(0x1c, 0x04) } let to_ := shl(96, to) // Revert if `to` is the zero address. if iszero(to_) { mstore(0x00, 0xea553b34) // `TransferToZeroAddress()`. revert(0x1c, 0x04) } // Loop through all the `ids` and update the balances. { mstore(0x20, or(_ERC1155_MASTER_SLOT_SEED, to_)) for { let i := shl(5, mload(ids)) } i { i := sub(i, 0x20) } { let amount := mload(add(amounts, i)) // Increase and store the updated balance of `to`. { mstore(0x00, mload(add(ids, i))) let toBalanceSlot := keccak256(0x00, 0x40) let toBalanceBefore := sload(toBalanceSlot) let toBalanceAfter := add(toBalanceBefore, amount) if lt(toBalanceAfter, toBalanceBefore) { mstore(0x00, 0x01336cea) // `AccountBalanceOverflow()`. revert(0x1c, 0x04) } sstore(toBalanceSlot, toBalanceAfter) } } } // Emit a {TransferBatch} event. { let m := mload(0x40) // Copy the `ids`. mstore(m, 0x40) let n := add(0x20, shl(5, mload(ids))) let o := add(m, 0x40) pop(staticcall(gas(), 4, ids, n, o, n)) // Copy the `amounts`. mstore(add(m, 0x20), add(0x40, returndatasize())) o := add(o, returndatasize()) n := add(0x20, shl(5, mload(amounts))) pop(staticcall(gas(), 4, amounts, n, o, n)) n := sub(add(o, returndatasize()), m) // Do the emit. log4(m, n, _TRANSFER_BATCH_EVENT_SIGNATURE, caller(), 0, shr(96, to_)) } } if (_useAfterTokenTransfer()) { _afterTokenTransfer(address(0), to, ids, amounts, data); } if (_hasCode(to)) _checkOnERC1155BatchReceived(address(0), to, ids, amounts, data); } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* INTERNAL BURN FUNCTIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Equivalent to `_burn(address(0), from, id, amount)`. function _burn(address from, uint256 id, uint256 amount) internal virtual { _burn(address(0), from, id, amount); } /// @dev Destroys `amount` of `id` from `from`. /// /// Requirements: /// - `from` must have at least `amount` of `id`. /// - If `by` is not the zero address, it must be either `from`, /// or approved to manage the tokens of `from`. /// /// Emits a {TransferSingle} event. function _burn(address by, address from, uint256 id, uint256 amount) internal virtual { if (_useBeforeTokenTransfer()) { _beforeTokenTransfer(from, address(0), _single(id), _single(amount), ""); } /// @solidity memory-safe-assembly assembly { let from_ := shl(96, from) mstore(0x20, or(_ERC1155_MASTER_SLOT_SEED, from_)) // If `by` is not the zero address, and not equal to `from`, // check if it is approved to manage all the tokens of `from`. if iszero(or(iszero(shl(96, by)), eq(shl(96, by), from_))) { mstore(0x00, by) if iszero(sload(keccak256(0x0c, 0x34))) { mstore(0x00, 0x4b6e7f18) // `NotOwnerNorApproved()`. revert(0x1c, 0x04) } } // Decrease and store the updated balance of `from`. { mstore(0x00, id) let fromBalanceSlot := keccak256(0x00, 0x40) let fromBalance := sload(fromBalanceSlot) if gt(amount, fromBalance) { mstore(0x00, 0xf4d678b8) // `InsufficientBalance()`. revert(0x1c, 0x04) } sstore(fromBalanceSlot, sub(fromBalance, amount)) } // Emit a {TransferSingle} event. mstore(0x20, amount) log4(0x00, 0x40, _TRANSFER_SINGLE_EVENT_SIGNATURE, caller(), shr(96, from_), 0) } if (_useAfterTokenTransfer()) { _afterTokenTransfer(from, address(0), _single(id), _single(amount), ""); } } /// @dev Equivalent to `_batchBurn(address(0), from, ids, amounts)`. function _batchBurn(address from, uint256[] memory ids, uint256[] memory amounts) internal virtual { _batchBurn(address(0), from, ids, amounts); } /// @dev Destroys `amounts` of `ids` from `from`. /// /// Requirements: /// - `ids` and `amounts` must have the same length. /// - `from` must have at least `amounts` of `ids`. /// - If `by` is not the zero address, it must be either `from`, /// or approved to manage the tokens of `from`. /// /// Emits a {TransferBatch} event. function _batchBurn(address by, address from, uint256[] memory ids, uint256[] memory amounts) internal virtual { if (_useBeforeTokenTransfer()) { _beforeTokenTransfer(from, address(0), ids, amounts, ""); } /// @solidity memory-safe-assembly assembly { if iszero(eq(mload(ids), mload(amounts))) { mstore(0x00, 0x3b800a46) // `ArrayLengthsMismatch()`. revert(0x1c, 0x04) } let from_ := shl(96, from) mstore(0x20, or(_ERC1155_MASTER_SLOT_SEED, from_)) // If `by` is not the zero address, and not equal to `from`, // check if it is approved to manage all the tokens of `from`. let by_ := shl(96, by) if iszero(or(iszero(by_), eq(by_, from_))) { mstore(0x00, by) if iszero(sload(keccak256(0x0c, 0x34))) { mstore(0x00, 0x4b6e7f18) // `NotOwnerNorApproved()`. revert(0x1c, 0x04) } } // Loop through all the `ids` and update the balances. { for { let i := shl(5, mload(ids)) } i { i := sub(i, 0x20) } { let amount := mload(add(amounts, i)) // Decrease and store the updated balance of `from`. { mstore(0x00, mload(add(ids, i))) let fromBalanceSlot := keccak256(0x00, 0x40) let fromBalance := sload(fromBalanceSlot) if gt(amount, fromBalance) { mstore(0x00, 0xf4d678b8) // `InsufficientBalance()`. revert(0x1c, 0x04) } sstore(fromBalanceSlot, sub(fromBalance, amount)) } } } // Emit a {TransferBatch} event. { let m := mload(0x40) // Copy the `ids`. mstore(m, 0x40) let n := add(0x20, shl(5, mload(ids))) let o := add(m, 0x40) pop(staticcall(gas(), 4, ids, n, o, n)) // Copy the `amounts`. mstore(add(m, 0x20), add(0x40, returndatasize())) o := add(o, returndatasize()) n := add(0x20, shl(5, mload(amounts))) pop(staticcall(gas(), 4, amounts, n, o, n)) n := sub(add(o, returndatasize()), m) // Do the emit. log4(m, n, _TRANSFER_BATCH_EVENT_SIGNATURE, caller(), shr(96, from_), 0) } } if (_useAfterTokenTransfer()) { _afterTokenTransfer(from, address(0), ids, amounts, ""); } } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* INTERNAL APPROVAL FUNCTIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Approve or remove the `operator` as an operator for `by`, /// without authorization checks. /// /// Emits a {ApprovalForAll} event. function _setApprovalForAll(address by, address operator, bool isApproved) internal virtual { /// @solidity memory-safe-assembly assembly { // Convert to 0 or 1. isApproved := iszero(iszero(isApproved)) // Update the `isApproved` for (`by`, `operator`). mstore(0x20, _ERC1155_MASTER_SLOT_SEED) mstore(0x14, by) mstore(0x00, operator) sstore(keccak256(0x0c, 0x34), isApproved) // Emit the {ApprovalForAll} event. mstore(0x00, isApproved) let m := shr(96, not(0)) log3(0x00, 0x20, _APPROVAL_FOR_ALL_EVENT_SIGNATURE, and(m, by), and(m, operator)) } } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* INTERNAL TRANSFER FUNCTIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Equivalent to `_safeTransfer(address(0), from, to, id, amount, data)`. function _safeTransfer(address from, address to, uint256 id, uint256 amount, bytes memory data) internal virtual { _safeTransfer(address(0), from, to, id, amount, data); } /// @dev Transfers `amount` of `id` from `from` to `to`. /// /// Requirements: /// - `to` cannot be the zero address. /// - `from` must have at least `amount` of `id`. /// - If `by` is not the zero address, it must be either `from`, /// or approved to manage the tokens of `from`. /// - If `to` refers to a smart contract, it must implement /// {ERC1155-onERC1155Received}, which is called upon a batch transfer. /// /// Emits a {TransferSingle} event. function _safeTransfer( address by, address from, address to, uint256 id, uint256 amount, bytes memory data ) internal virtual { if (_useBeforeTokenTransfer()) { _beforeTokenTransfer(from, to, _single(id), _single(amount), data); } /// @solidity memory-safe-assembly assembly { let from_ := shl(96, from) let to_ := shl(96, to) // Revert if `to` is the zero address. if iszero(to_) { mstore(0x00, 0xea553b34) // `TransferToZeroAddress()`. revert(0x1c, 0x04) } mstore(0x20, or(_ERC1155_MASTER_SLOT_SEED, from_)) // If `by` is not the zero address, and not equal to `from`, // check if it is approved to manage all the tokens of `from`. let by_ := shl(96, by) if iszero(or(iszero(by_), eq(by_, from_))) { mstore(0x00, by) if iszero(sload(keccak256(0x0c, 0x34))) { mstore(0x00, 0x4b6e7f18) // `NotOwnerNorApproved()`. revert(0x1c, 0x04) } } // Subtract and store the updated balance of `from`. { mstore(0x00, id) let fromBalanceSlot := keccak256(0x00, 0x40) let fromBalance := sload(fromBalanceSlot) if gt(amount, fromBalance) { mstore(0x00, 0xf4d678b8) // `InsufficientBalance()`. revert(0x1c, 0x04) } sstore(fromBalanceSlot, sub(fromBalance, amount)) } // Increase and store the updated balance of `to`. { mstore(0x20, or(_ERC1155_MASTER_SLOT_SEED, to_)) let toBalanceSlot := keccak256(0x00, 0x40) let toBalanceBefore := sload(toBalanceSlot) let toBalanceAfter := add(toBalanceBefore, amount) if lt(toBalanceAfter, toBalanceBefore) { mstore(0x00, 0x01336cea) // `AccountBalanceOverflow()`. revert(0x1c, 0x04) } sstore(toBalanceSlot, toBalanceAfter) } // Emit a {TransferSingle} event. mstore(0x20, amount) // forgefmt: disable-next-line log4(0x00, 0x40, _TRANSFER_SINGLE_EVENT_SIGNATURE, caller(), shr(96, from_), shr(96, to_)) } if (_useAfterTokenTransfer()) { _afterTokenTransfer(from, to, _single(id), _single(amount), data); } if (_hasCode(to)) _checkOnERC1155Received(from, to, id, amount, data); } /// @dev Equivalent to `_safeBatchTransfer(address(0), from, to, ids, amounts, data)`. function _safeBatchTransfer( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { _safeBatchTransfer(address(0), from, to, ids, amounts, data); } /// @dev Transfers `amounts` of `ids` from `from` to `to`. /// /// Requirements: /// - `to` cannot be the zero address. /// - `ids` and `amounts` must have the same length. /// - `from` must have at least `amounts` of `ids`. /// - If `by` is not the zero address, it must be either `from`, /// or approved to manage the tokens of `from`. /// - If `to` refers to a smart contract, it must implement /// {ERC1155-onERC1155BatchReceived}, which is called upon a batch transfer. /// /// Emits a {TransferBatch} event. function _safeBatchTransfer( address by, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { if (_useBeforeTokenTransfer()) { _beforeTokenTransfer(from, to, ids, amounts, data); } /// @solidity memory-safe-assembly assembly { if iszero(eq(mload(ids), mload(amounts))) { mstore(0x00, 0x3b800a46) // `ArrayLengthsMismatch()`. revert(0x1c, 0x04) } let from_ := shl(96, from) let to_ := shl(96, to) // Revert if `to` is the zero address. if iszero(to_) { mstore(0x00, 0xea553b34) // `TransferToZeroAddress()`. revert(0x1c, 0x04) } let fromSlotSeed := or(_ERC1155_MASTER_SLOT_SEED, from_) let toSlotSeed := or(_ERC1155_MASTER_SLOT_SEED, to_) mstore(0x20, fromSlotSeed) // If `by` is not the zero address, and not equal to `from`, // check if it is approved to manage all the tokens of `from`. let by_ := shl(96, by) if iszero(or(iszero(by_), eq(by_, from_))) { mstore(0x00, by) if iszero(sload(keccak256(0x0c, 0x34))) { mstore(0x00, 0x4b6e7f18) // `NotOwnerNorApproved()`. revert(0x1c, 0x04) } } // Loop through all the `ids` and update the balances. { for { let i := shl(5, mload(ids)) } i { i := sub(i, 0x20) } { let amount := mload(add(amounts, i)) // Subtract and store the updated balance of `from`. { mstore(0x20, fromSlotSeed) mstore(0x00, mload(add(ids, i))) let fromBalanceSlot := keccak256(0x00, 0x40) let fromBalance := sload(fromBalanceSlot) if gt(amount, fromBalance) { mstore(0x00, 0xf4d678b8) // `InsufficientBalance()`. revert(0x1c, 0x04) } sstore(fromBalanceSlot, sub(fromBalance, amount)) } // Increase and store the updated balance of `to`. { mstore(0x20, toSlotSeed) let toBalanceSlot := keccak256(0x00, 0x40) let toBalanceBefore := sload(toBalanceSlot) let toBalanceAfter := add(toBalanceBefore, amount) if lt(toBalanceAfter, toBalanceBefore) { mstore(0x00, 0x01336cea) // `AccountBalanceOverflow()`. revert(0x1c, 0x04) } sstore(toBalanceSlot, toBalanceAfter) } } } // Emit a {TransferBatch} event. { let m := mload(0x40) // Copy the `ids`. mstore(m, 0x40) let n := add(0x20, shl(5, mload(ids))) let o := add(m, 0x40) pop(staticcall(gas(), 4, ids, n, o, n)) // Copy the `amounts`. mstore(add(m, 0x20), add(0x40, returndatasize())) o := add(o, returndatasize()) n := add(0x20, shl(5, mload(amounts))) pop(staticcall(gas(), 4, amounts, n, o, n)) n := sub(add(o, returndatasize()), m) // Do the emit. log4(m, n, _TRANSFER_BATCH_EVENT_SIGNATURE, caller(), shr(96, from_), shr(96, to_)) } } if (_useAfterTokenTransfer()) { _afterTokenTransfer(from, to, ids, amounts, data); } if (_hasCode(to)) _checkOnERC1155BatchReceived(from, to, ids, amounts, data); } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* HOOKS FOR OVERRIDING */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Override this function to return true if `_beforeTokenTransfer` is used. /// This is to help the compiler avoid producing dead bytecode. function _useBeforeTokenTransfer() internal view virtual returns (bool) { return false; } /// @dev Hook that is called before any token transfer. /// This includes minting and burning, as well as batched variants. /// /// The same hook is called on both single and batched variants. /// For single transfers, the length of the `id` and `amount` arrays are 1. function _beforeTokenTransfer( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual {} /// @dev Override this function to return true if `_afterTokenTransfer` is used. /// This is to help the compiler avoid producing dead bytecode. function _useAfterTokenTransfer() internal view virtual returns (bool) { return false; } /// @dev Hook that is called after any token transfer. /// This includes minting and burning, as well as batched variants. /// /// The same hook is called on both single and batched variants. /// For single transfers, the length of the `id` and `amount` arrays are 1. function _afterTokenTransfer( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual {} /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* PRIVATE HELPERS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Helper for calling the `_afterTokenTransfer` hook. /// This is to help the compiler avoid producing dead bytecode. function _afterTokenTransferCalldata( address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) private { if (_useAfterTokenTransfer()) { _afterTokenTransfer(from, to, ids, amounts, data); } } /// @dev Returns if `a` has bytecode of non-zero length. function _hasCode(address a) private view returns (bool result) { /// @solidity memory-safe-assembly assembly { result := extcodesize(a) // Can handle dirty upper bits. } } /// @dev Perform a call to invoke {IERC1155Receiver-onERC1155Received} on `to`. /// Reverts if the target does not support the function correctly. function _checkOnERC1155Received( address from, address to, uint256 id, uint256 amount, bytes memory data ) private { /// @solidity memory-safe-assembly assembly { // Prepare the calldata. let m := mload(0x40) // `onERC1155Received(address,address,uint256,uint256,bytes)`. mstore(m, 0xf23a6e61) mstore(add(m, 0x20), caller()) mstore(add(m, 0x40), shr(96, shl(96, from))) mstore(add(m, 0x60), id) mstore(add(m, 0x80), amount) mstore(add(m, 0xa0), 0xa0) let n := mload(data) mstore(add(m, 0xc0), n) if n { pop(staticcall(gas(), 4, add(data, 0x20), n, add(m, 0xe0), n)) } // Revert if the call reverts. if iszero(call(gas(), to, 0, add(m, 0x1c), add(0xc4, n), m, 0x20)) { if returndatasize() { // Bubble up the revert if the call reverts. returndatacopy(m, 0x00, returndatasize()) revert(m, returndatasize()) } } // Load the returndata and compare it with the function selector. if iszero(eq(mload(m), shl(224, 0xf23a6e61))) { mstore(0x00, 0x9c05499b) // `TransferToNonERC1155ReceiverImplementer()`. revert(0x1c, 0x04) } } } /// @dev Perform a call to invoke {IERC1155Receiver-onERC1155BatchReceived} on `to`. /// Reverts if the target does not support the function correctly. function _checkOnERC1155BatchReceived( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) private { /// @solidity memory-safe-assembly assembly { // Prepare the calldata. let m := mload(0x40) // `onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)`. mstore(m, 0xbc197c81) mstore(add(m, 0x20), caller()) mstore(add(m, 0x40), shr(96, shl(96, from))) // Copy the `ids`. mstore(add(m, 0x60), 0xa0) let n := add(0x20, shl(5, mload(ids))) let o := add(m, 0xc0) pop(staticcall(gas(), 4, ids, n, o, n)) // Copy the `amounts`. let s := add(0xa0, returndatasize()) mstore(add(m, 0x80), s) o := add(o, returndatasize()) n := add(0x20, shl(5, mload(amounts))) pop(staticcall(gas(), 4, amounts, n, o, n)) // Copy the `data`. mstore(add(m, 0xa0), add(s, returndatasize())) o := add(o, returndatasize()) n := add(0x20, mload(data)) pop(staticcall(gas(), 4, data, n, o, n)) n := sub(add(o, returndatasize()), add(m, 0x1c)) // Revert if the call reverts. if iszero(call(gas(), to, 0, add(m, 0x1c), n, m, 0x20)) { if returndatasize() { // Bubble up the revert if the call reverts. returndatacopy(m, 0x00, returndatasize()) revert(m, returndatasize()) } } // Load the returndata and compare it with the function selector. if iszero(eq(mload(m), shl(224, 0xbc197c81))) { mstore(0x00, 0x9c05499b) // `TransferToNonERC1155ReceiverImplementer()`. revert(0x1c, 0x04) } } } /// @dev Returns `x` in an array with a single element. function _single(uint256 x) private pure returns (uint256[] memory result) { /// @solidity memory-safe-assembly assembly { result := mload(0x40) mstore(0x40, add(result, 0x40)) mstore(result, 1) mstore(add(result, 0x20), x) } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.22; import {ERC1155} from "solady/src/tokens/ERC1155.sol"; /// @title ERC1155ConduitPreapprovedCloneable /// @notice ERC1155 token with the MagicEden conduit preapproved for seamless transactions. abstract contract ERC1155ConduitPreapprovedCloneable is ERC1155 { /// @dev The canonical MagicEden conduit address. address internal constant _CONDUIT = 0x2052f8A2Ff46283B30084e5d84c89A2fdBE7f74b; /// @notice Safely transfers `amount` tokens of type `id` from `from` to `to`. /// @param from The address holding the tokens. /// @param to The address to transfer the tokens to. /// @param id The token type identifier. /// @param amount The number of tokens to transfer. /// @param data Additional data with no specified format. function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) public virtual override { _safeTransfer(_by(), from, to, id, amount, data); } /// @notice Safely transfers a batch of tokens from `from` to `to`. /// @param from The address holding the tokens. /// @param to The address to transfer the tokens to. /// @param ids An array of token type identifiers. /// @param amounts An array of amounts to transfer for each token type. /// @param data Additional data with no specified format. function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) public virtual override { _safeBatchTransfer(_by(), from, to, ids, amounts, data); } /// @notice Checks if `operator` is approved to manage all of `owner`'s tokens. /// @param owner The address owning the tokens. /// @param operator The address to query for approval. /// @return True if `operator` is approved, otherwise false. function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { if (operator == _CONDUIT) return true; return ERC1155.isApprovedForAll(owner, operator); } /// @dev Determines the address initiating the transfer. /// If the caller is the predefined conduit, returns address(0), else returns the caller's address. /// @return result The address initiating the transfer. function _by() internal view virtual returns (address result) { assembly { // `msg.sender == _CONDUIT ? address(0) : msg.sender`. result := mul(iszero(eq(caller(), _CONDUIT)), caller()) } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.22; interface IMagicDropMetadata { /*============================================================== = EVENTS = ==============================================================*/ /// @notice Emitted when the contract URI is updated. /// @param _contractURI The new contract URI. event ContractURIUpdated(string _contractURI); /// @notice Emitted when the royalty info is updated. /// @param receiver The new royalty receiver. /// @param bps The new royalty basis points. event RoyaltyInfoUpdated(address receiver, uint256 bps); /// @notice Emitted when the metadata is updated. (EIP-4906) /// @param _fromTokenId The starting token ID. /// @param _toTokenId The ending token ID. event BatchMetadataUpdate(uint256 _fromTokenId, uint256 _toTokenId); /// @notice Emitted once when the token contract is deployed and initialized. event MagicDropTokenDeployed(); /*============================================================== = ERRORS = ==============================================================*/ /// @notice Throw when the max supply is exceeded. error CannotExceedMaxSupply(); /// @notice Throw when the max supply is less than the current supply. error MaxSupplyCannotBeLessThanCurrentSupply(); /// @notice Throw when trying to increase the max supply. error MaxSupplyCannotBeIncreased(); /// @notice Throw when the max supply is greater than 2^64. error MaxSupplyCannotBeGreaterThan2ToThe64thPower(); /*============================================================== = PUBLIC VIEW METHODS = ==============================================================*/ /// @notice Returns the base URI used to construct token URIs /// @dev This is concatenated with the token ID to form the complete token URI /// @return The base URI string that prefixes all token URIs function baseURI() external view returns (string memory); /// @notice Returns the contract-level metadata URI /// @dev Used by marketplaces like MagicEden to display collection information /// @return The URI string pointing to the contract's metadata JSON function contractURI() external view returns (string memory); /// @notice Returns the address that receives royalty payments /// @dev Used in conjunction with royaltyBps for EIP-2981 royalty standard /// @return The address designated to receive royalty payments function royaltyAddress() external view returns (address); /// @notice Returns the royalty percentage in basis points (1/100th of a percent) /// @dev 100 basis points = 1%. Used in EIP-2981 royalty calculations /// @return The royalty percentage in basis points (e.g., 250 = 2.5%) function royaltyBps() external view returns (uint256); /*============================================================== = ADMIN OPERATIONS = ==============================================================*/ /// @notice Sets the base URI for all token metadata /// @dev This is a critical function that determines where all token metadata is hosted /// Changing this will update the metadata location for all tokens in the collection /// @param baseURI The new base URI string that will prefix all token URIs function setBaseURI(string calldata baseURI) external; /// @notice Sets the contract-level metadata URI /// @dev This metadata is used by marketplaces to display collection information /// Should point to a JSON file following collection metadata standards /// @param contractURI The new URI string pointing to the contract's metadata JSON function setContractURI(string calldata contractURI) external; /// @notice Updates the royalty configuration for the collection /// @dev Implements EIP-2981 for NFT royalty standards /// The bps (basis points) must be between 0 and 10000 (0% to 100%) /// @param newReceiver The address that will receive future royalty payments /// @param newBps The royalty percentage in basis points (e.g., 250 = 2.5%) function setRoyaltyInfo(address newReceiver, uint96 newBps) external; }
{ "viaIR": true, "codegen": "yul", "remappings": [ "solady/=lib/solady/", "solemate/=/lib/solemate/src/", "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/", "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/", "forge-std/=lib/forge-std/src/", "erc721a/contracts/=lib/ERC721A/contracts/", "erc721a-upgradeable/contracts/=lib/ERC721A-Upgradeable/contracts/", "@limitbreak/creator-token-standards/src/=lib/creator-token-standards/src/", "@ensdomains/=node_modules/@ensdomains/", "@layerzerolabs/=node_modules/@layerzerolabs/", "@limitbreak/permit-c/=lib/creator-token-standards/lib/PermitC/src/", "@opensea/tstorish/=lib/creator-token-standards/lib/tstorish/src/", "@openzeppelin-3/=node_modules/@openzeppelin-3/", "@rari-capital/solmate/=lib/creator-token-standards/lib/PermitC/lib/solmate/", "@uniswap/=node_modules/@uniswap/", "ERC721A-Upgradeable/=lib/ERC721A-Upgradeable/contracts/", "ERC721A/=lib/ERC721A/contracts/", "PermitC/=lib/creator-token-standards/lib/PermitC/", "creator-token-standards/=lib/creator-token-standards/", "ds-test/=lib/solmate/lib/ds-test/src/", "erc4626-tests/=lib/operator-filter-registry/lib/openzeppelin-contracts/lib/erc4626-tests/", "eth-gas-reporter/=node_modules/eth-gas-reporter/", "forge-gas-metering/=lib/creator-token-standards/lib/PermitC/lib/forge-gas-metering/", "hardhat-deploy/=node_modules/hardhat-deploy/", "hardhat/=node_modules/hardhat/", "murky/=lib/creator-token-standards/lib/murky/", "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/", "openzeppelin-contracts/=lib/openzeppelin-contracts/", "openzeppelin/=lib/creator-token-standards/lib/PermitC/lib/openzeppelin-contracts/contracts/", "operator-filter-registry/=lib/operator-filter-registry/", "solmate/=lib/solmate/src/", "tstorish/=lib/creator-token-standards/lib/tstorish/src/" ], "evmVersion": "cancun", "outputSelection": { "*": { "*": [ "abi" ] } }, "optimizer": { "enabled": true, "mode": "3", "fallback_to_optimizing_for_size": false, "disable_system_request_memoization": true }, "metadata": {}, "libraries": {}, "enableEraVMExtensions": false, "forceEVMLA": false }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"name":"AccountBalanceOverflow","type":"error"},{"inputs":[],"name":"AllowlistStageNotActive","type":"error"},{"inputs":[],"name":"AlreadyInitialized","type":"error"},{"inputs":[],"name":"ArrayLengthsMismatch","type":"error"},{"inputs":[],"name":"CannotExceedMaxSupply","type":"error"},{"inputs":[],"name":"InsufficientBalance","type":"error"},{"inputs":[],"name":"InvalidAllowlistStageTime","type":"error"},{"inputs":[],"name":"InvalidInitialization","type":"error"},{"inputs":[],"name":"InvalidProof","type":"error"},{"inputs":[],"name":"InvalidPublicStageTime","type":"error"},{"inputs":[],"name":"InvalidStageTime","type":"error"},{"inputs":[],"name":"MaxSupplyCannotBeGreaterThan2ToThe64thPower","type":"error"},{"inputs":[],"name":"MaxSupplyCannotBeIncreased","type":"error"},{"inputs":[],"name":"MaxSupplyCannotBeLessThanCurrentSupply","type":"error"},{"inputs":[],"name":"NewOwnerIsZeroAddress","type":"error"},{"inputs":[],"name":"NoHandoverRequest","type":"error"},{"inputs":[],"name":"NotInitializing","type":"error"},{"inputs":[],"name":"NotOwnerNorApproved","type":"error"},{"inputs":[],"name":"PayoutRecipientCannotBeZeroAddress","type":"error"},{"inputs":[],"name":"PublicStageNotActive","type":"error"},{"inputs":[],"name":"RequiredValueNotMet","type":"error"},{"inputs":[],"name":"RoyaltyOverflow","type":"error"},{"inputs":[],"name":"RoyaltyReceiverIsZeroAddress","type":"error"},{"inputs":[],"name":"TransferToNonERC1155ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"Unauthorized","type":"error"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"WalletLimitExceeded","type":"error"},{"anonymous":false,"inputs":[{"components":[{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"}],"indexed":false,"internalType":"struct AllowlistStage","name":"stage","type":"tuple"}],"name":"AllowlistStageSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"isApproved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_toTokenId","type":"uint256"}],"name":"BatchMetadataUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"_contractURI","type":"string"}],"name":"ContractURIUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"version","type":"uint64"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[],"name":"MagicDropTokenDeployed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_oldMaxSupply","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_newMaxSupply","type":"uint256"}],"name":"MaxSupplyUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"pendingOwner","type":"address"}],"name":"OwnershipHandoverCanceled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"pendingOwner","type":"address"}],"name":"OwnershipHandoverRequested","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newPayoutRecipient","type":"address"}],"name":"PayoutRecipientSet","type":"event"},{"anonymous":false,"inputs":[{"components":[{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"}],"indexed":false,"internalType":"struct PublicStage","name":"stage","type":"tuple"}],"name":"PublicStageSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"bps","type":"uint256"}],"name":"RoyaltyInfoUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"qty","type":"uint256"}],"name":"TokenMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_walletLimit","type":"uint256"}],"name":"WalletLimitUpdated","type":"event"},{"inputs":[],"name":"BPS_DENOMINATOR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PROTOCOL_FEE_BPS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PROTOCOL_FEE_RECIPIENT","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"result","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"owners","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"balances","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"qty","type":"uint256[]"}],"name":"batchBurn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"qty","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"cancelOwnershipHandover","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"pendingOwner","type":"address"}],"name":"completeOwnershipHandover","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"contractNameAndVersion","outputs":[{"internalType":"string","name":"","type":"string"},{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"internalType":"uint256","name":"toTokenId","type":"uint256"}],"name":"emitBatchMetadataUpdate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getAllowlistStage","outputs":[{"components":[{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"}],"internalType":"struct AllowlistStage","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getConfig","outputs":[{"components":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"maxSupply","type":"uint256"},{"internalType":"uint256","name":"walletLimit","type":"uint256"},{"internalType":"string","name":"baseURI","type":"string"},{"internalType":"string","name":"contractURI","type":"string"},{"components":[{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"}],"internalType":"struct PublicStage","name":"publicStage","type":"tuple"},{"components":[{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"}],"internalType":"struct AllowlistStage","name":"allowlistStage","type":"tuple"},{"internalType":"address","name":"payoutRecipient","type":"address"},{"internalType":"address","name":"royaltyRecipient","type":"address"},{"internalType":"uint96","name":"royaltyBps","type":"uint96"}],"internalType":"struct SetupConfig","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getPublicStage","outputs":[{"components":[{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"}],"internalType":"struct PublicStage","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"address","name":"_owner","type":"address"},{"internalType":"uint256","name":"_mintFee","type":"uint256"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"qty","type":"uint256"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"mintAllowlist","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"mintFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"qty","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"mintPublic","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"result","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"pendingOwner","type":"address"}],"name":"ownershipHandoverExpiresAt","outputs":[{"internalType":"uint256","name":"result","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"payoutRecipient","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"requestOwnershipHandover","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"royaltyAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"royaltyBps","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"components":[{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"}],"internalType":"struct AllowlistStage","name":"stage","type":"tuple"}],"name":"setAllowlistStage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"isApproved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newBaseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newContractURI","type":"string"}],"name":"setContractURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"newMaxSupply","type":"uint256"}],"name":"setMaxSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newPayoutRecipient","type":"address"}],"name":"setPayoutRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"components":[{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"}],"internalType":"struct PublicStage","name":"stage","type":"tuple"}],"name":"setPublicStage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newReceiver","type":"address"},{"internalType":"uint96","name":"newBps","type":"uint96"}],"name":"setRoyaltyInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"newWalletLimit","type":"uint256"}],"name":"setWalletLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"maxSupply","type":"uint256"},{"internalType":"uint256","name":"walletLimit","type":"uint256"},{"internalType":"string","name":"baseURI","type":"string"},{"internalType":"string","name":"contractURI","type":"string"},{"components":[{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"}],"internalType":"struct PublicStage","name":"publicStage","type":"tuple"},{"components":[{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"}],"internalType":"struct AllowlistStage","name":"allowlistStage","type":"tuple"},{"internalType":"address","name":"payoutRecipient","type":"address"},{"internalType":"address","name":"royaltyRecipient","type":"address"},{"internalType":"uint96","name":"royaltyBps","type":"uint96"}],"internalType":"struct SetupConfig","name":"config","type":"tuple"}],"name":"setup","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"totalMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"totalMintedByUser","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"walletLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
3cda33510b6a866fa283524661d3b4a0f7f5b85636819e32e1384b395d5454edc7d9299a01000647f0d69baa6164d1ab406ae0eaf4956569ee9e0dfde6c55bf70ee13fe000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x0004000000000002000d000000000002000000000d01034f00000060011002700000057e0310019700030000003d035500020000000d03550000057e0010019d0000008004000039000000400040043f0000000100200190000000230000c13d000000040030008c0000113a0000413d00000000010d043b000000e001100270000005800010009c0000002b0000a13d000005810010009c0000003e0000213d000005930010009c0000016b0000a13d000005940010009c000002070000a13d000005950010009c0000030f0000213d000005980010009c000004230000613d000005990010009c0000113a0000c13d0000000001000416000000000001004b0000113a0000c13d000000040100003900000bc10000013d0000000001000416000000000001004b0000113a0000c13d0000002001000039000001000010044300000120000004430000057f01000041000015f40001042e000005a40010009c0000010b0000a13d000005a50010009c0000012a0000a13d000005a60010009c000001980000a13d000005a70010009c000002fc0000213d000005aa0010009c000003360000613d000005ab0010009c0000113a0000c13d0000000001000416000000000001004b0000113a0000c13d0000060b01000041000000800010043f000005c701000041000015f40001042e000005820010009c000001870000a13d000005830010009c000002260000a13d000005840010009c000003230000213d000005870010009c000004d20000613d000005880010009c0000113a0000c13d000000840030008c0000113a0000413d0000000001000416000000000001004b0000113a0000c13d0000000401d00370000000000201043b000005c80020009c0000113a0000213d0000002301200039000000000031004b0000113a0000813d000000040420003900000000014d034f000000000101043b000005c80010009c000009250000213d0000001f0510003900000630055001970000003f055000390000063005500197000005d60050009c000009250000213d00000024022000390000008005500039000000400050043f000000800010043f0000000002210019000000000032004b0000113a0000213d000000200240003900000000042d034f00000630051001980000001f0610018f000000a002500039000000720000613d000000a007000039000000000804034f000000008908043c0000000007970436000000000027004b0000006e0000c13d000000000006004b0000007f0000613d000000000454034f0000000305600210000000000602043300000000065601cf000000000656022f000000000404043b0000010005500089000000000454022f00000000045401cf000000000464019f0000000000420435000000a00110003900000000000104350000002401d00370000000000201043b000005c80020009c0000113a0000213d0000002301200039000000000031004b0000113a0000813d000000040420003900000000014d034f000000000101043b000005c80010009c000009250000213d0000001f0510003900000630055001970000003f055000390000063005500197000000400600043d0000000005560019000d00000006001d000000000065004b00000000060000390000000106004039000005c80050009c000009250000213d0000000100600190000009250000c13d0000002402200039000000400050043f0000000d050000290000000005150436000c00000005001d0000000002210019000000000032004b0000113a0000213d000000200240003900000000090d034f00000000032d034f00000630041001980000001f0510018f0000000c02400029000000b00000613d000000000603034f0000000c07000029000000006806043c0000000007870436000000000027004b000000ac0000c13d000000000005004b000000bd0000613d000000000343034f0000000304500210000000000502043300000000054501cf000000000545022f000000000303043b0000010004400089000000000343022f00000000034301cf000000000353019f00000000003204350000000c0110002900000000000104350000004401900370000000000101043b000b00000001001d000005c50010009c0000113a0000213d000005d703000041000000000403041a0000000301000039000905d700000045000000000013041b000a00000004001d000000000004004b000000e50000613d000005d80100004100000000001004430000000001000410000000040010044300000000010004140000057e0010009c0000057e01008041000000c001100210000005d9011001c7000080020200003915f315ee0000040f000000010020019000000dd40000613d000000020200008a0000000a0220017f000000000101043b000000020020008c00000e980000c13d000000000001004b00000e980000c13d0000000a0100002900000001001001900000000001000019000005d701006041000900000001001d000000800100043d000005c80010009c000009250000213d000000000300041a000000010030019000000001023002700000007f0220618f0000001f0020008c00000000040000390000000104002039000000000343013f0000000100300190000008ba0000c13d000000200020008c000001030000413d0000001f031000390000000503300270000005dc0330009a000000200010008c000005dd03004041000000000000043f0000001f022000390000000502200270000005dc0220009a000000000023004b000001030000813d000000000003041b0000000103300039000000000023004b000000ff0000413d0000001f0010008c00000eee0000a13d0000063003100198000000000000043f00000fe70000c13d000000a004000039000005dd0200004100000ff50000013d000005b60010009c0000014a0000213d000005be0010009c0000023d0000213d000005c20010009c000007d00000613d000005c30010009c0000092b0000613d000005c40010009c0000113a0000c13d000000440030008c0000113a0000413d0000000001000416000000000001004b0000113a0000c13d0000000401d00370000000000101043b000d00000001001d000005c50010009c0000113a0000213d0000002401d00370000000000101043b000c00000001001d000005f90010009c0000113a0000213d15f312790000040f0000000d010000290000000c0200002915f312830000040f0000000001000019000015f40001042e000005af0010009c0000019f0000213d000005b30010009c000003f30000613d000005b40010009c000005120000613d000005b50010009c0000113a0000c13d000000440030008c0000113a0000413d0000000001000416000000000001004b0000113a0000c13d0000000401d00370000000000101043b000005c50010009c0000113a0000213d000000000010043f0000000701000039000000200010043f00000040020000390000000001000019000d0000000d035315f315d40000040f0000000d0200035f0000002402200370000000000202043b000000000020043f000000200010043f0000000001000019000000400200003900000bef0000013d000005b70010009c0000024a0000213d000005bb0010009c000007e00000613d000005bc0010009c000009470000613d000005bd0010009c0000113a0000c13d000000240030008c0000113a0000413d0000000001000416000000000001004b0000113a0000c13d15f312250000040f00000004010000390000000201100367000000000101043b000000000010043f0000000901000039000000200010043f0000004002000039000000000100001915f315d40000040f15f312360000040f000000400200043d000d00000002001d15f311640000040f0000000d010000290000057e0010009c0000057e01008041000000400110021000000628011001c7000015f40001042e0000059d0010009c000002690000213d000005a10010009c0000084c0000613d000005a20010009c00000bbd0000613d000005a30010009c0000113a0000c13d000000240030008c0000113a0000413d0000000001000416000000000001004b0000113a0000c13d0000000401d00370000000000101043b000005c80010009c0000113a0000213d0000000401100039000000000203001915f3116d0000040f000d00000001001d000c00000002001d15f312790000040f0000000d010000290000000c0200002915f313a40000040f0000000001000019000015f40001042e0000058c0010009c000002e40000213d000005900010009c000008a60000613d000005910010009c00000bc60000613d000005920010009c0000113a0000c13d0000000001000416000000000001004b0000113a0000c13d0000000401000039000000000101041a000000a001100270000000800010043f000005c701000041000015f40001042e000005ac0010009c000003db0000613d000005ad0010009c0000040f0000613d000005ae0010009c000002450000613d0000113a0000013d000005b00010009c000004000000613d000005b10010009c000005170000613d000005b20010009c0000113a0000c13d000000440030008c0000113a0000413d0000000001000416000000000001004b0000113a0000c13d0000000401d00370000000000201043b000005c80020009c0000113a0000213d0000002301200039000000000031004b0000113a0000813d000c00040020003d0000000c01d00360000000000101043b000005c80010009c0000113a0000213d000000050410021000000000024200190000002402200039000000000032004b0000113a0000213d0000002402d00370000000000402043b000005c80040009c0000113a0000213d0000002302400039000000000032004b0000113a0000813d000b00040040003d0000000b02d00360000000000202043b000005c80020009c0000113a0000213d000000050520021000000000045400190000002404400039000000000034004b0000113a0000213d000000000012004b00000cf70000c13d0000000003050019000000800020043f000000a001500039000000400010043f000000000002004b000001f00000613d000d00000003001d0000000c013000290000000201100367000000000101043b0000006001100210000005cf011001c7000000200010043f0000000b013000290000000201100367000000000101043b000000000010043f00000000010004140000057e0010009c0000057e01008041000000c001100210000005cb011001c7000080100200003915f315ee0000040f00000001002001900000113a0000613d000000000101043b000000000101041a0000000d0300002900000080023000390000000000120435000000200330008c000001d40000c13d000000400100043d00000020020000390000000002210436000000800300043d00000000003204350000004002100039000000000003004b000001fe0000613d000000a0040000390000000005000019000000004604043400000000026204360000000105500039000000000035004b000001f90000413d00000000021200490000057e0020009c0000057e0200804100000060022002100000057e0010009c0000057e010080410000004001100210000000000112019f000015f40001042e0000059a0010009c0000078e0000613d0000059b0010009c000008c70000613d0000059c0010009c0000113a0000c13d000000440030008c0000113a0000413d0000000001000416000000000001004b0000113a0000c13d000005e201000041000000000101041a0000000002000411000000000012004b000008a20000c13d0000002401d00370000000000101043b0000000402d00370000000000202043b000000800020043f000000a00010043f00000000010004140000057e0010009c0000057e01008041000000c001100210000005fa011001c70000800d020000390000000103000039000005fb040000410000096e0000013d000005890010009c000007a10000613d0000058a0010009c000008f70000613d0000058b0010009c0000113a0000c13d000000240030008c0000113a0000413d0000000401d00370000000000101043b000005c50010009c0000113a0000213d000005e202000041000000000202041a0000000003000411000000000023004b000008a20000c13d000000000001004b00000cca0000c13d000005ea01000041000000000010043f000005db01000041000015f500010430000005bf0010009c000007e50000613d000005c00010009c000009730000613d000005c10010009c0000113a0000c13d000000240030008c0000113a0000413d0000000001000416000000000001004b0000113a0000c13d15f311b10000040f00000bf80000013d000005b80010009c000008020000613d000005b90010009c000009800000613d000005ba0010009c0000113a0000c13d000000240030008c0000113a0000413d0000000001000416000000000001004b0000113a0000c13d15f3124c0000040f00000004010000390000000201100367000000000101043b000000000010043f0000000a01000039000000200010043f0000004002000039000000000100001915f315d40000040f15f3125f0000040f000000400200043d000d00000002001d15f311870000040f0000000d010000290000057e0010009c0000057e0100804100000040011002100000061d011001c7000015f40001042e0000059e0010009c000008ac0000613d0000059f0010009c00000be30000613d000005a00010009c0000113a0000c13d000000840030008c0000113a0000413d0000000401d00370000000000101043b000d00000001001d000005c50010009c0000113a0000213d0000004401d00370000000000101043b000b00000001001d0000002401d00370000000000101043b000c00000001001d0000006401d00370000000000201043b000005c80020009c0000113a0000213d0000002301200039000000000031004b0000113a0000813d000000040420003900000000014d034f000000000101043b000005c80010009c000009250000213d0000001f0610003900000630066001970000003f066000390000063006600197000005d60060009c000009250000213d00000024022000390000008006600039000000400060043f000000800010043f0000000002210019000000000032004b0000113a0000213d000000200240003900000000032d034f00000630041001980000001f0510018f000000a002400039000002a10000613d000000a006000039000000000703034f000000007807043c0000000006860436000000000026004b0000029d0000c13d000000000005004b000002ae0000613d000000000343034f0000000304500210000000000502043300000000054501cf000000000545022f000000000303043b0000010004400089000000000343022f00000000034301cf000000000353019f0000000000320435000000a00110003900000000000104350000000c01000029000000000010043f0000000901000039000000200010043f00000000010004140000057e0010009c0000057e01008041000000c001100210000005cb011001c7000080100200003915f315ee0000040f00000001002001900000113a0000613d000000400200043d000005fe0020009c000009250000213d000000000101043b0000006003200039000000400030043f000000000301041a000a00000003001d00000000043204360000000103100039000000000303041a000900000004001d000000000034043500000040022000390000000201100039000000000101041a000800000002001d0000000000120435000005f001000041000000000010044300000000010004140000057e0010009c0000057e01008041000000c001100210000005f1011001c70000800b0200003915f315ee0000040f000000010020019000000dd40000613d000000000101043b0000000a0010006c000002e10000413d00000009020000290000000002020433000000000021004b00000e020000a13d000000400100043d000006010200004100000c860000013d0000058d0010009c000008c00000613d0000058e0010009c00000bf40000613d0000058f0010009c0000113a0000c13d000000440030008c0000113a0000413d0000000001000416000000000001004b0000113a0000c13d0000000401d00370000000000101043b000005c50010009c0000113a0000213d0000002402d00370000000000202043b000005c50020009c0000113a0000213d000005eb0020009c00000c230000c13d0000000101000039000000800200003900000c360000013d000005a80010009c0000034c0000613d000005a90010009c0000113a0000c13d000000240030008c0000113a0000413d0000000001000416000000000001004b0000113a0000c13d0000000401d00370000000000101043b000000000010043f0000000501000039000000200010043f0000004002000039000000000100001915f315d40000040f000000000101041a0000079d0000013d000005960010009c000005dc0000613d000005970010009c0000113a0000c13d000000240030008c0000113a0000413d0000000001000416000000000001004b0000113a0000c13d0000000401d00370000000000101043b000000000010043f0000000501000039000000200010043f0000004002000039000000000100001915f315d40000040f000000000101041a00000040011002700000079d0000013d000005850010009c0000062c0000613d000005860010009c0000113a0000c13d000000240030008c0000113a0000413d0000000001000416000000000001004b0000113a0000c13d0000000401d00370000000000101043b000005c50010009c0000113a0000213d000005c6020000410000000c0020043f000000000010043f0000000c01000039000000200200003900000bef0000013d000005e201000041000000000101041a0000000005000411000000000015004b000008a20000c13d00000000010004140000057e0010009c0000057e01008041000000c001100210000005d4011001c70000800d020000390000000303000039000005e504000041000000000600001915f315e90000040f00000001002001900000113a0000613d000005e401000041000005e202000041000000000012041b0000000001000019000015f40001042e000000a40030008c0000113a0000413d0000000401d00370000000000101043b000d00000001001d000005c50010009c0000113a0000213d0000004401d00370000000000101043b000b00000001001d0000002401d00370000000000101043b000c00000001001d0000006401d00370000000000101043b000005c80010009c0000113a0000213d0000002302100039000000000032004b0000113a0000813d000000040210003900000000022d034f000000000202043b000a00000002001d000005c80020009c0000113a0000213d00000024011000390000000a020000290000000502200210000700000001001d000900000002001d000800000012001d000000080030006b0000113a0000213d0000008401d00370000000000201043b000005c80020009c0000113a0000213d0000002301200039000000000031004b0000113a0000813d000000040420003900000000014d034f000000000101043b000005c80010009c000009250000213d0000001f0610003900000630066001970000003f066000390000063006600197000005d60060009c000009250000213d00000024022000390000008006600039000000400060043f000000800010043f0000000002210019000000000032004b0000113a0000213d000000200240003900000000032d034f00000630041001980000001f0510018f000000a002400039000003930000613d000000a006000039000000000703034f000000007807043c0000000006860436000000000026004b0000038f0000c13d000000000005004b000003a00000613d000000000343034f0000000304500210000000000502043300000000054501cf000000000545022f000000000303043b0000010004400089000000000343022f00000000034301cf000000000353019f0000000000320435000000a00110003900000000000104350000000c01000029000000000010043f0000000a01000039000000200010043f00000000010004140000057e0010009c0000057e01008041000000c001100210000005cb011001c7000080100200003915f315ee0000040f00000001002001900000113a0000613d000000400200043d000005d60020009c000009250000213d000000000101043b0000008003200039000000400030043f000000000301041a000600000003001d00000000043204360000000103100039000000000303041a000500000004001d00000000003404350000000203100039000000000303041a0000004004200039000300000004001d000000000034043500000060022000390000000301100039000000000101041a000400000002001d0000000000120435000005f001000041000000000010044300000000010004140000057e0010009c0000057e01008041000000c001100210000005f1011001c70000800b0200003915f315ee0000040f000000010020019000000dd40000613d000000000101043b000000060010006c000003d80000413d00000005020000290000000002020433000000000021004b00000ef90000a13d000000400100043d0000060a0200004100000c860000013d000005c6010000410000000c0010043f0000000001000411000000000010043f00000000010004140000057e0010009c0000057e01008041000000c001100210000005ef011001c7000080100200003915f315ee0000040f00000001002001900000113a0000613d000000000101043b000000000001041b00000000010004140000057e0010009c0000057e01008041000000c001100210000005d4011001c70000800d0200003900000002030000390000060c040000410000096d0000013d0000000001000416000000000001004b0000113a0000c13d000000000103001915f311580000040f000d00000001001d000c00000002001d15f312790000040f0000000d010000290000000c0200002915f312d70000040f0000000001000019000015f40001042e000000240030008c0000113a0000413d0000000001000416000000000001004b0000113a0000c13d0000000401d00370000000000101043b000d00000001001d000005c50010009c0000113a0000213d15f312790000040f0000000d0100002915f3131a0000040f0000000001000019000015f40001042e000000240030008c0000113a0000413d0000000001000416000000000001004b0000113a0000c13d0000000401d00370000000000101043b000005c80010009c0000113a0000213d0000000401100039000000000203001915f3116d0000040f000d00000001001d000c00000002001d15f312790000040f0000000d010000290000000c0200002915f313340000040f0000000001000019000015f40001042e0000000001000416000000000001004b0000113a0000c13d000000240030008c0000113a0000413d0000000401d00370000000000101043b000c00000001001d000001c001000039000000400010043f000000800000043f000000a00000043f000000c00000043f0000006001000039000000e00010043f000001000010043f15f312250000040f000001200010043f15f3124c0000040f000001400010043f000001600000043f000001800000043f000001a00000043f0000000c01000029000000000010043f0000000501000039000000200010043f0000004002000039000000000100001915f315d40000040f000000000101041a000a00000001001d0000000601000039000000200010043f0000000001000019000000400200003915f315d40000040f000000000101041a000800000001001d0000000a01000039000000200010043f0000000001000019000000400200003915f315d40000040f0000000902000039000000200020043f000b00000001001d0000000001000019000000400200003915f315d40000040f0000000802000039000000000202041a000900000002001d0000000402000039000000000202041a000300000002001d000200000001001d000000400100043d000d00000001001d15f311940000040f0000000d030000290000004001300039000700000001001d000000080200002900000000002104350000000a01000029000005c8011001970000002002300039000500000002001d00000000001204350000000c01000029000000000013043515f311b10000040f0000000d020000290000006002200039000400000002001d000000000012043515f311eb0000040f0000000d020000290000008002200039000600000002001d0000000000120435000000020100002915f312360000040f0000000d02000029000000a002200039000800000002001d00000000001204350000000b0100002915f3125f0000040f0000000305000029000000a0025002700000000d040000290000012003400039000b00000003001d0000000000230435000005c5025001970000010003400039000a00000003001d00000000002304350000000902000029000005c502200197000000e003400039000900000003001d0000000000230435000000c002400039000300000002001d00000000001204350000002001000039000000400500043d000c00000005001d0000000001150436000000000204043300000000002104350000000501000029000000000101043300000040025000390000000000120435000000070100002900000000010104330000006002500039000000000012043500000004010000290000000001010433000001e00200003900000080035000390000000000230435000002000250003915f311460000040f00000000020100190000000c040000290000000001410049000000200310008a00000006010000290000000001010433000000a004400039000000000034043515f311460000040f00000008020000290000000003020433000d00000001001d0000000c01000029000000c002100039000000000103001915f311640000040f000000030100002900000000010104330000000c02000029000001200220003915f311870000040f00000009010000290000000001010433000005c5011001970000000c03000029000001a00230003900000000001204350000000a010000290000000001010433000005c501100197000001c00230003900000000001204350000000b010000290000000001010433000005f901100197000001e00230003900000000001204350000000d013000690000057e0030009c0000057e0300804100000040023002100000057e0010009c0000057e010080410000006001100210000000000121019f000015f40001042e000000640030008c0000113a0000413d0000000001000416000000000001004b0000113a0000c13d0000000401d00370000000000101043b000d00000001001d000005c50010009c0000113a0000213d0000004401d00370000000000101043b000c00000001001d0000002401d00370000000000101043b000b00000001001d000000000010043f0000000501000039000000200010043f00000000010004140000057e0010009c0000057e01008041000000c001100210000005cb011001c7000080100200003915f315ee0000040f00000001002001900000113a0000613d0000000c020000290000004002200210000000000101043b000000000301041a0000000002230049000005cc02200197000005cd03300197000000000232019f000000000021041b0000000d010000290000006001100210000005cf021001c7000000200020043f0000000003000411000000600230021200000c0f0000613d000000000012004b00000c0f0000613d000000000030043f00000000010004140000057e0010009c0000057e01008041000000c001100210000005d0011001c7000080100200003915f315ee0000040f00000001002001900000113a0000613d000000000101043b000000000101041a000000000001004b00000c0f0000c13d0000062501000041000000000010043f000005db01000041000015f5000104300000000001000416000000000001004b0000113a0000c13d000000080100003900000bc10000013d000000240030008c0000113a0000413d0000000001000416000000000001004b0000113a0000c13d0000000401d00370000000000101043b000d00000001001d000005c80010009c0000113a0000213d0000000d0130006a0000060d0010009c0000113a0000213d000001e40010008c0000113a0000413d000005e201000041000000000101041a0000000002000411000000000012004b000008a20000c13d0000000d010000290000000402100039000000240310003900000000013d034f000000000101043b000000000001004b000c00000002001d00000c5b0000c13d000000200330003900000000013d034f000000000101043b000b00000001001d000000000001004b00000c9d0000c13d000b00200030003d0000000b01d00360000000000101043b00000000030000310000000d0230006a000000230420008a000005e402400197000005e405100197000000000625013f000000000025004b0000000002000019000005e402004041000000000041004b0000000005000019000005e405008041000005e40060009c000000000205c019000000000002004b0000113a0000c13d0000000c0110002900000000021d034f000000000202043b000005c80020009c0000113a0000213d00000000052300490000002001100039000005e406500197000005e407100197000000000867013f000000000067004b0000000006000019000005e406004041000000000051004b0000000005000019000005e405002041000005e40080009c000000000605c019000000000006004b0000113a0000c13d000000000002004b000005670000613d15f313340000040f00000000030000310000000d0130006a000000020d000367000000230410008a0000000b01000029000d00200010003d0000000d01d00360000000000101043b000005e402100197000005e405400197000000000652013f000000000052004b0000000002000019000005e402004041000000000041004b0000000004000019000005e404008041000005e40060009c000000000204c019000000000002004b0000113a0000c13d0000000c0110002900000000021d034f000000000202043b000005c80020009c0000113a0000213d00000000032300490000002001100039000005e404300197000005e405100197000000000645013f000000000045004b0000000004000019000005e404004041000000000031004b0000000003000019000005e403002041000005e40060009c000000000403c019000000000004004b0000113a0000c13d000000000002004b000005900000613d15f313a40000040f000000020d0003670000000d03000029000000800130003900000000011d034f000a00a00030003d0000000a02d00360000000000202043b000000000101043b000b00000001001d000d00000002001d00000000002101a000000e440000c13d0000000a03000029000000800130008a00000000011d034f000d0060003000920000000d02d00360000000000202043b000000000101043b000c00000001001d000b00000002001d00000000002101a000000e9c0000c13d0000000d01000029000d00c00010003d0000000d01d00360000000000101043b000005c50010009c0000113a0000213d000000000001004b000005c50000613d0000000802000039000000000302041a0000061803300197000000000313019f000000000032041b000000400200043d00000000001204350000057e0020009c0000057e02008041000000400120021000000000020004140000057e0020009c0000057e02008041000000c002200210000000000112019f000005fc011001c70000800d020000390000000103000039000006190400004115f315e90000040f00000001002001900000113a0000613d000000020d0003670000000d01000029000000200210003900000000012d034f000000000101043b000005c50010009c0000113a0000213d000000000001004b000009710000613d000000200220003900000000022d034f000000000202043b000005f90020009c0000113a0000213d000000a003200210000000000313019f0000000404000039000000000034041b000027110020008c000010d50000413d0000061c01000041000000000010043f000005db01000041000015f500010430000000840030008c0000113a0000413d0000000001000416000000000001004b0000113a0000c13d0000000401d00370000000000301043b000005e201000041000000000101041a0000000002000411000000000012004b000008a20000c13d0000004401d00370000000000201043b0000002401d00370000000000101043b000000000021004b00000bfd0000813d000c00000001001d000b00000002001d000d00000003001d000000000030043f0000000a01000039000000200010043f00000000010004140000057e0010009c0000057e01008041000000c001100210000005cb011001c7000080100200003915f315ee0000040f00000001002001900000113a0000613d000000000101043b000000000201041a000000000002004b00000c750000c13d0000000d01000029000000000010043f0000000901000039000000200010043f00000000010004140000057e0010009c0000057e01008041000000c001100210000005cb011001c7000080100200003915f315ee0000040f00000001002001900000113a0000613d000000000101043b0000000c05000029000000000051041b00000001021000390000000b04000029000000000042041b00000064020000390000000202200367000000000202043b0000000201100039000000000021041b000000400100043d000000400310003900000000002304350000002002100039000000000042043500000000005104350000057e0010009c0000057e01008041000000400110021000000000020004140000057e0020009c0000057e02008041000000c002200210000000000112019f000005f7011001c70000800d020000390000000103000039000005f804000041000002250000013d000000640030008c0000113a0000413d0000000001000416000000000001004b0000113a0000c13d0000000401d00370000000000101043b000600000001001d000005c50010009c0000113a0000213d0000002401d00370000000000101043b000005c80010009c0000113a0000213d0000002302100039000000000032004b0000113a0000813d000000040210003900000000022d034f000000000202043b000b00000002001d000005c80020009c0000113a0000213d00000024011000390000000b020000290000000502200210000a00000001001d000500000002001d000400000012001d000000040030006b0000113a0000213d0000004401d00370000000000101043b000005c80010009c0000113a0000213d0000002302100039000000000032004b0000113a0000813d000300040010003d0000000302d00360000000000202043b000900000002001d000005c80020009c0000113a0000213d000000240110003900000009020000290000000502200210000800000001001d000200000002001d000100000012001d000000010030006b0000113a0000213d000700000004001d0000000b0000006b0000068d0000613d0000000004000019000000090040006c00000008020000290000000a0300002900000dfc0000813d000d00000004001d00000005014002100000000002210019000000000131001900000002011003670000000202200367000000000202043b000c00000002001d000000000101043b000000000010043f0000000501000039000000200010043f00000000010004140000057e0010009c0000057e01008041000000c001100210000005cb011001c7000080100200003915f315ee0000040f00000001002001900000113a0000613d0000000c020000290000004002200210000000000101043b000000000301041a0000000002230049000005cc02200197000005cd03300197000000000232019f000000000021041b0000000d0400002900000001044000390000000b0040006c000006640000413d000000400100043d000700000001001d000000000300003100000005010000290000003f01100039000005ce011001970000000701100029000000070010006c00000000020000390000000102004039000005c80010009c000009250000213d0000000100200190000009250000c13d000000400010043f00000007010000290000000b020000290000000000210435000000040030006b0000113a0000213d0000000b0000006b0000000a050000290000000406000029000006ab0000613d00000002010003670000000702000029000000000451034f000000000404043b000000200220003900000000004204350000002005500039000000000065004b000006a40000413d00000002010000290000003f01100039000005ce01100197000000400200043d0000000001120019000b00000002001d000000000021004b00000000020000390000000102004039000005c80010009c000009250000213d0000000100200190000009250000c13d000000400010043f0000000b0100002900000009020000290000000000210435000000010030006b0000113a0000213d000000090000006b0000000001000019000006cf0000613d0000000301000029000000200110003900000002011003670000000b02000029000000080400002900000001050000290000002002200039000000001301043c00000000003204350000002004400039000000000054004b000006c70000413d0000000b01000029000000000101043300000007020000290000000002020433000000000012004b00000cf70000c13d00000006010000290000006001100210000005cf021001c7000000200020043f00000000020004110000006002200212000006eb0000613d000000000012004b000006eb0000613d0000000001000411000000000010043f00000000010004140000057e0010009c0000057e01008041000000c001100210000005d0011001c7000080100200003915f315ee0000040f00000001002001900000113a0000613d000000000101043b000000000101041a000000000001004b0000050e0000613d000000070300002900000000010304330000000504100212000007080000613d0000000001340019000c00000004001d0000000b024000290000000002020433000d00000002001d0000000001010433000000000010043f00000000010004140000057e0010009c0000057e01008041000000c001100210000005cb011001c7000080100200003915f315ee0000040f000000070300002900000001002001900000113a0000613d000000000101043b000000000201041a0000000d0220006c00000c1f0000413d000000000021041b0000000c04000029000000200440008c000006ef0000c13d000000400200043d000d00000002001d00000040010000390000000001120436000c00000001001d0000057e0030009c0000057e0100004100000000010340190000004001100210000000000203043300000005022002100000002002200039000a00000002001d0000057e0020009c0000057e020080410000006002200210000000000112019f00000000020004140000057e0020009c0000057e02008041000000c002200210000000000121019f000000040200003915f315ee0000040f00000060021002700000057e022001970000000a0020006c0000000a0300002900000000030240190000001f0430018f00000000050300190000000d030000290000004006300039000005d1055001980000000003560019000007310000613d000000000701034f000000007807043c0000000006860436000000000036004b0000072d0000c13d000000000004004b0000073e0000613d000000000551034f0000000304400210000000000603043300000000064601cf000000000646022f000000000505043b0000010004400089000000000545022f00000000044501cf000000000464019f00000000004304350003000000010355000100000002001f0000004002200039000a00000002001d0000000c0100002900000000002104350000000b020000290000057e0020009c0000057e0100004100000000010240190000004001100210000000000202043300000005022002100000002002200039000c00000002001d0000057e0020009c0000057e020080410000006002200210000000000112019f00000000020004140000057e0020009c0000057e02008041000000c002200210000000000121019f000000040200003915f315ee0000040f0000000a0300002900000000090300190000000d0430002900000060021002700000057e022001970000000c0020006c0000000c0300002900000000030240190000001f0530018f000005d1063001980000000003640019000007690000613d000000000701034f000000007807043c0000000004840436000000000034004b000007650000c13d000000000005004b000007760000613d000000000461034f0000000305500210000000000603043300000000065601cf000000000656022f000000000404043b0000010005500089000000000454022f00000000045401cf000000000464019f00000000004304350003000000010355000100000002001f00000000012900190000006002100210000005d20010009c000005d3020080410000000d010000290000057e0010009c0000057e01008041000000400110021000000000030004140000057e0030009c0000057e03008041000000c003300210000000000131019f000000000121019f000005d4011001c70000000602000029000005c5062001970000800d020000390000000403000039000005d504000041000000000500041100000c980000013d000000240030008c0000113a0000413d0000000001000416000000000001004b0000113a0000c13d0000000401d00370000000000101043b000000000010043f0000000501000039000000200010043f0000004002000039000000000100001915f315d40000040f000000000101041a0000008001100270000005c801100197000000800010043f000005c701000041000015f40001042e000000240030008c0000113a0000413d0000000401d00370000000000101043b000d00000001001d000005c50010009c0000113a0000213d000005e201000041000000000101041a0000000002000411000000000012004b000008a20000c13d000005c6010000410000000c0010043f0000000d01000029000000000010043f00000000010004140000057e0010009c0000057e01008041000000c001100210000005ef011001c7000080100200003915f315ee0000040f00000001002001900000113a0000613d000000000101043b000b00000001001d000000000101041a000c00000001001d000005f001000041000000000010044300000000010004140000057e0010009c0000057e01008041000000c001100210000005f1011001c70000800b0200003915f315ee0000040f000000010020019000000dd40000613d000000000101043b0000000c0010006c00000cc70000a13d000005f201000041000000000010043f000005db01000041000015f500010430000000440030008c0000113a0000413d0000000001000416000000000001004b0000113a0000c13d0000000401d00370000000000101043b000005c50010009c0000113a0000213d000005cf02000041000000200020043f000000140010043f0000002401d00370000000000101043b000000000010043f00000bed0000013d0000000001000416000000000001004b0000113a0000c13d0000000b0100003900000bf00000013d0000000001000416000000000001004b0000113a0000c13d000000000200041a000000010320019000000001012002700000007f0110618f0000001f0010008c00000000040000390000000104002039000000000043004b000008ba0000c13d000000800010043f000000000003004b00000c090000613d000000000000043f000000000001004b00000c070000613d000005dd0200004100000000040000190000000003040019000000000402041a000000a005300039000000000045043500000001022000390000002004300039000000000014004b000007f90000413d00000c470000013d000000440030008c0000113a0000413d0000000001000416000000000001004b0000113a0000c13d0000002401d00370000000000101043b000d00000001001d0000000401d00370000000000101043b000000000010043f0000061a01000041000000200010043f00000000010004140000057e0010009c0000057e01008041000000c001100210000005cb011001c7000080100200003915f315ee0000040f00000001002001900000113a0000613d000000000101043b000000000201041a000005f90020009c0000081e0000213d0000061a01000041000000000201041a000005f9012001980000000003000019000000010300c08a000000000313c0d90000000d0030006b0000000003000019000000000301201900000001040000310000000005430019000000000045004b0000113a0000213d00000630053001980000001f0630018f00000003074003670000000003540019000008330000613d000000000807034f000000008908043c0000000004940436000000000034004b0000082f0000c13d0000006002200270000000000006004b000008410000613d000000000457034f0000000305600210000000000603043300000000065601cf000000000656022f000000000404043b0000010005500089000000000454022f00000000045401cf000000000464019f00000000004304350000000d011000b9000027100110011a000000400300043d0000002004300039000000000014043500000000002304350000057e0030009c0000057e03008041000000400130021000000627011001c7000015f40001042e000000a40030008c0000113a0000413d0000000001000416000000000001004b0000113a0000c13d0000000401d00370000000000301043b000005e201000041000000000101041a0000000002000411000000000012004b000008a20000c13d0000004401d00370000000000201043b0000002401d00370000000000101043b000000000021004b00000bfd0000813d000b00000001001d000d00000002001d000c00000003001d000000000030043f0000000901000039000000200010043f00000000010004140000057e0010009c0000057e01008041000000c001100210000005cb011001c7000080100200003915f315ee0000040f00000001002001900000113a0000613d000000000101043b000000000201041a000000000002004b00000c7e0000c13d0000000c01000029000000000010043f0000000a01000039000000200010043f00000000010004140000057e0010009c0000057e01008041000000c001100210000005cb011001c7000080100200003915f315ee0000040f00000001002001900000113a0000613d000000000101043b0000000b06000029000000000061041b00000001021000390000000d05000029000000000052041b00000002020003670000006403200370000000000303043b0000000204100039000000000034041b00000003011000390000008402200370000000000202043b000000000021041b000000400100043d00000060041000390000000000240435000000400210003900000000003204350000002002100039000000000052043500000000006104350000057e0010009c0000057e01008041000000400110021000000000020004140000057e0020009c0000057e02008041000000c002200210000000000112019f00000605011001c70000800d0200003900000001030000390000060604000041000002250000013d0000060e01000041000000000010043f000005db01000041000015f5000104300000000001000416000000000001004b0000113a0000c13d000000800000043f000005c701000041000015f40001042e0000000001000416000000000001004b0000113a0000c13d0000000103000039000000000203041a000000010420019000000001012002700000007f0110618f0000001f0010008c00000000050000390000000105002039000000000552013f000000010050019000000c010000613d000005c901000041000000000010043f0000002201000039000000040010043f000005ca01000041000015f5000104300000000001000416000000000001004b0000113a0000c13d0000271001000039000000800010043f000005c701000041000015f40001042e000000440030008c0000113a0000413d0000000001000416000000000001004b0000113a0000c13d0000000401d00370000000000101043b000d00000001001d000005c50010009c0000113a0000213d0000002401d00370000000000201043b000000000002004b0000000001000039000000010100c039000c00000002001d000000000012004b0000113a0000c13d000005cf01000041000000200010043f0000000001000411000000140010043f0000000d01000029000000000010043f00000000010004140000057e0010009c0000057e01008041000000c001100210000005d0011001c7000080100200003915f315ee0000040f00000001002001900000113a0000613d000000000101043b0000000c02000029000000000021041b000000000020043f00000000010004140000057e0010009c0000057e01008041000000c001100210000005fc011001c70000800d020000390000000303000039000005fd0400004100000000050004110000000d060000290000096e0000013d000000a40030008c0000113a0000413d0000000001000416000000000001004b0000113a0000c13d0000000401d00370000000000101043b000d00000001001d000005c50010009c0000113a0000213d0000002401d00370000000000101043b000c00000001001d000005c50010009c0000113a0000213d0000006401d00370000000000101043b000a00000001001d0000004401d00370000000000101043b000b00000001001d0000008401d00370000000000201043b000005c80020009c0000113a0000213d0000002301200039000000000031004b0000113a0000813d000000040420003900000000014d034f000000000101043b000005c80010009c0000113a0000213d00000000021200190000002402200039000000000032004b0000113a0000213d0000001f0210003900000630022001970000003f0220003900000630052001970000000002000411000005eb0020009c0000000002006019000005d60050009c00000ccd0000a13d000005c901000041000000000010043f0000004101000039000000040010043f000005ca01000041000015f500010430000000240030008c0000113a0000413d0000000001000416000000000001004b0000113a0000c13d0000000401d00370000000000201043b0000062b002001980000113a0000c13d00000001010000390000062c0020009c000009430000613d0000062d0020009c000009430000613d0000062e0020009c000009430000613d000000e0022002700000062f0020009c00000000010000390000000101006039000005c30020009c00000001011061bf000005c10020009c00000001011061bf000000010110018f000000800010043f000005c701000041000015f40001042e000005c6010000410000000c0010043f0000000001000411000000000010043f000005f001000041000000000010044300000000010004140000057e0010009c0000057e01008041000000c001100210000005f1011001c70000800b0200003915f315ee0000040f000000010020019000000dd40000613d000000000101043b000d00000001001d00000000010004140000057e0010009c0000057e01008041000000c001100210000005ef011001c7000080100200003915f315ee0000040f00000001002001900000113a0000613d000000000101043b0000000d02000029000006290220009a000000000021041b00000000010004140000057e0010009c0000057e01008041000000c001100210000005d4011001c70000800d0200003900000002030000390000062a04000041000000000500041115f315e90000040f00000001002001900000113a0000613d0000000001000019000015f40001042e0000000001000416000000000001004b0000113a0000c13d000000000103001915f311580000040f000d00000001001d000c00000002001d15f312790000040f0000000d010000290000000c0200002915f312ae0000040f0000000001000019000015f40001042e000000a40030008c0000113a0000413d0000000001000416000000000001004b0000113a0000c13d0000000401d00370000000000101043b000800000001001d000005c50010009c0000113a0000213d0000002401d00370000000000101043b000700000001001d000005c50010009c0000113a0000213d0000004401d00370000000000101043b000005c80010009c0000113a0000213d0000002302100039000000000032004b0000113a0000813d000000040210003900000000022d034f000000000a02043b000005c800a0009c0000113a0000213d0000002408100039000000050ca0021000000000098c0019000000000039004b0000113a0000213d0000006401d00370000000000101043b000005c80010009c0000113a0000213d0000002302100039000000000032004b0000113a0000813d000000040210003900000000022d034f000000000702043b000005c80070009c0000113a0000213d0000002405100039000000050b70021000000000065b0019000000000036004b0000113a0000213d0000008401d00370000000000101043b000005c80010009c0000113a0000213d0000002302100039000000000032004b0000113a0000813d000000040410003900000000024d034f000000000202043b000005c80020009c0000113a0000213d00000000012100190000002401100039000000000031004b0000113a0000213d0000000001000411000005eb0010009c00000000010060190000003f03c00039000005ce03300197000005d60030009c000009250000213d0000008003300039000b00000003001d000000400030043f0000008000a0043f00000000000a004b000009d90000613d0000008003000039000000000c0d034f000000000a8c034f000000000a0a043b00000020033000390000000000a304350000002008800039000000000098004b000009d00000413d000000400300043d000b00000003001d0000003f03b00039000005ce033001970000000b033000290000000b0030006c00000000080000390000000108004039000005c80030009c000009250000213d0000000100800190000009250000c13d000000400030043f0000000b030000290000000000730435000000000007004b000009f00000613d0000000b0300002900000000075d034f000000000707043b000000200330003900000000007304350000002005500039000000000065004b000009e90000413d0000001f0320003900000630033001970000003f033000390000063003300197000000400500043d0000000003350019000600000005001d000000000053004b00000000050000390000000105004039000005c80030009c000009250000213d0000000100500190000009250000c13d000000400030043f000000200340003900000000053d034f0000000603000029000000000323043600000630062001980000001f0720018f000000000463001900000a0d0000613d000000000805034f0000000009030019000000008a08043c0000000009a90436000000000049004b00000a090000c13d000000000007004b00000a1a0000613d000000000565034f0000000306700210000000000704043300000000076701cf000000000767022f000000000505043b0000010006600089000000000565022f00000000056501cf000000000575019f0000000000540435000000000223001900000000000204350000000b020000290000000002020433000000800300043d000000000023004b00000cf70000c13d0000000703000029000d00600030021a00000ced0000613d00000008030000290000006003300210000005cf043001c7000a00000004001d000000200040043f000000600410021200000a3c0000613d000000000034004b00000a3c0000613d000000000010043f00000000010004140000057e0010009c0000057e01008041000000c001100210000005d0011001c7000080100200003915f315ee0000040f00000001002001900000113a0000613d000000000101043b000000000101041a000000000001004b0000050e0000613d000000800200043d0000000502200212000010a60000c13d000000400200043d000d00000002001d00000040010000390000000001120436000900000001001d000000800100043d00000000020004140000057e0020009c0000057e02008041000000c00220021000000005011002100000002001100039000c00000001001d0000057e0010009c0000057e010080410000006001100210000000000121019f00000621011001c7000000040200003915f315ee0000040f00000060021002700000057e022001970000000c0020006c00000000080200190000000c0400002900000000040240190000001f0340018f0000000d02000029000c00400020003d000005d1044001980000000c0240002900000a640000613d000000000501034f0000000c06000029000000005705043c0000000006760436000000000026004b00000a600000c13d000000000003004b00000a710000613d000000000441034f0000000303300210000000000502043300000000053501cf000000000535022f000000000404043b0000010003300089000000000434022f00000000033401cf000000000353019f00000000003204350003000000010355000500000008001d000100000008001f0000004001800039000a00000001001d000000090200002900000000001204350000000b03000029000000000103043300000000020004140000057e0020009c0000057e02008041000000c00220021000000005011002100000002001100039000900000001001d0000057e0010009c0000057e010080410000006001100210000000000121019f0000057e0030009c0000057e020000410000000002034019000400400020021800000004011001af000000040200003915f315ee0000040f00000005030000290000000c0430002900000060021002700000057e02200197000000090020006c000000090300002900000000030240190000001f0530018f000005d106300198000000000364001900000a9c0000613d000000000701034f000000007807043c0000000004840436000000000034004b00000a980000c13d000000000005004b00000aa90000613d000000000461034f0000000305500210000000000603043300000000065601cf000000000656022f000000000404043b0000010005500089000000000454022f00000000045401cf000000000464019f00000000004304350003000000010355000100000002001f0000000a012000290000057e0010009c0000057e0100804100000060011002100000000d020000290000057e0020009c0000057e020080410000004002200210000000000121019f00000000020004140000057e0020009c0000057e02008041000000c002200210000000000121019f000005d4011001c70000000802000029000005c5062001970000000702000029000005c5072001970000800d020000390000000403000039000005d5040000410000000005000411000c00000006001d15f315e90000040f00000001002001900000113a0000613d000005d80100004100000000001004430000000701000029000000040010044300000000010004140000057e0010009c0000057e01008041000000c001100210000005d9011001c7000080020200003915f315ee0000040f000000010020019000000dd40000613d000000000101043b000000000001004b000009710000613d000000400300043d000d00000003001d0000006001300039000000a002000039000000000021043500000040013000390000000c02000029000000000021043500000020013000390000000002000411000000000021043500000622010000410000000000130435000000800100043d00000000020004140000057e0020009c0000057e02008041000000c00220021000000005011002100000002001100039000a00000001001d0000057e0010009c0000057e010080410000006001100210000000000121019f00000621011001c7000000040200003915f315ee0000040f00000060021002700000057e022001970000000a0020006c00000000080200190000000a0400002900000000040240190000001f0340018f0000000d02000029000000c005200039000005d104400198000000000245001900000b030000613d000000000601034f000000006706043c0000000005750436000000000025004b00000aff0000c13d000000000003004b00000b100000613d000000000441034f0000000303300210000000000502043300000000053501cf000000000535022f000000000404043b0000010003300089000000000434022f00000000033401cf000000000353019f00000000003204350003000000010355000c00000008001d000100000008001f000000a0028000390000000d010000290000008001100039000a00000002001d00000000002104350000000b01000029000000000101043300000000020004140000057e0020009c0000057e02008041000000c00220021000000005011002100000002001100039000900000001001d0000057e0010009c0000057e010080410000006001100210000000000121019f00000004011001af000000040200003915f315ee0000040f0000000d030000290000000c0430002900000060021002700000057e02200197000000090020006c0000000008020019000000090500002900000000050240190000001f0350018f0000000002050019000c00000004001d000000c005400039000005d104200198000000000245001900000b3c0000613d000000000601034f000000006706043c0000000005750436000000000025004b00000b380000c13d000000000003004b00000b490000613d000000000441034f0000000303300210000000000502043300000000053501cf000000000535022f000000000404043b0000010003300089000000000434022f00000000033401cf000000000353019f00000000003204350003000000010355000b00000008001d000100000008001f0000000a018000290000000d02000029000000a002200039000000000012043500000006020000290000057e0020009c0000057e010000410000000001024019000000400110021000000000020204330000002002200039000a00000002001d0000057e0020009c0000057e020080410000006002200210000000000112019f00000000020004140000057e0020009c0000057e02008041000000c002200210000000000121019f000000040200003915f315ee0000040f0000000b030000290000000c0230002900000060031002700000057e033001970000000a0030006c0000000a0400002900000000040340190000001f0540018f000000c007200039000005d106400198000000000467001900000b740000613d000000000801034f000000008908043c0000000007970436000000000047004b00000b700000c13d000000000005004b00000b810000613d000000000661034f0000000305500210000000000704043300000000075701cf000000000757022f000000000606043b0000010005500089000000000656022f00000000055601cf000000000575019f00000000005404350000000d0400002900000000024200490000000002320019000100000003001f0003000000010355000000a4012000390000057e0010009c0000057e0100804100000060011002100000001c024000390000057e0020009c0000057e020080410000004002200210000000000121019f00000000020004140000057e0020009c0000057e02008041000000c002200210000000000121019f000000070200002915f315e90000040f00000060031002700000057e03300197000000200030008c000000200400003900000000040340190000001f0540018f00000020064001900000000d0460002900000ba50000613d000000000701034f0000000d08000029000000007907043c0000000008980436000000000048004b00000ba10000c13d000000000005004b00000bb20000613d000000000661034f0000000305500210000000000704043300000000075701cf000000000757022f000000000606043b0000010005500089000000000656022f00000000055601cf000000000575019f00000000005404350003000000010355000100000003001f000000000003004b00000001022061bf0000000100200190000010ed0000613d0000000d010000290000000001010433000006230010009c000009710000613d00000dd00000013d0000000001000416000000000001004b0000113a0000c13d000005e201000041000000000101041a000005c501100197000000800010043f000005c701000041000015f40001042e0000000001000416000000000001004b0000113a0000c13d0000001901000039000000800010043f000005f401000041000000a00010043f0000010001000039000000400010043f0000000501000039000000c00010043f000005f501000041000000e00010043f0000004001000039000001000010043f0000008001000039000001400200003915f311460000040f0000000002010019000001000110008a000001200010043f000000c00100003915f311460000040f000001000110008a0000057e0010009c0000057e010080410000006001100210000005f6011001c7000015f40001042e000000240030008c0000113a0000413d0000000001000416000000000001004b0000113a0000c13d0000000401d00370000000000101043b000000000010043f0000000601000039000000200010043f0000004002000039000000000100001915f315d40000040f000000000101041a000000800010043f000005c701000041000015f40001042e0000000001000416000000000001004b0000113a0000c13d15f311eb0000040f0000002002000039000000400300043d000d00000003001d000000000223043600000c500000013d0000060301000041000000800010043f0000060401000041000015f500010430000000800010043f000000000004004b00000c090000613d000000000030043f000000000001004b00000c3d0000c13d000000a00100003900000c480000013d0000063102200197000000a00020043f000000000001004b000000c001000039000000a00100603900000c480000013d0000000b01000029000000000010043f00000000010004140000057e0010009c0000057e01008041000000c001100210000005cb011001c7000080100200003915f315ee0000040f00000001002001900000113a0000613d000000000101043b000000000201041a0000000c03000029000000000232004b00000c8c0000813d0000062001000041000000000010043f000005db01000041000015f500010430000005cf03000041000000200030043f000000140010043f000000000020043f00000000010004140000057e0010009c0000057e01008041000000c001100210000005d0011001c7000080100200003915f315ee0000040f00000001002001900000113a0000613d000000400200043d000000000101043b000000000101041a000000000001004b0000000001000039000000010100c039000000010110018f00000000001204350000057e0020009c0000057e020080410000004001200210000005f3011001c7000015f40001042e000005e00200004100000000040000190000000003040019000000000402041a000000a005300039000000000045043500000001022000390000002004300039000000000014004b00000c3f0000413d000000c001300039000000800210008a000000800100003915f3119f0000040f0000002001000039000000400200043d000d00000002001d0000000002120436000000800100003915f311460000040f0000000d0200002900000000012100490000057e0010009c0000057e0100804100000060011002100000057e0020009c0000057e020080410000004002200210000000000121019f000015f40001042e000b00000001001d000900000003001d00000000012d034f000000000101043b000a00000001001d000000000010043f0000000501000039000000200010043f00000000010004140000057e0010009c0000057e01008041000000c001100210000005cb011001c7000080100200003915f315ee0000040f00000001002001900000113a0000613d000000400200043d000000000301043b000000000403041a000005c80140019800000cf10000613d0000000b0010006c00000cf10000813d000006140100004100000dd90000013d0000000101100039000000000101041a000000000001004b000006010000613d0000000c0010006b000006010000213d000000400100043d000006170200004100000c860000013d0000000d0020006b000008710000413d0000000101100039000000000101041a000000000001004b000008710000613d000000400100043d000006160200004100000000002104350000057e0010009c0000057e01008041000000400110021000000602011001c7000015f500010430000000000021041b000000200030043f00000000010004140000057e0010009c0000057e01008041000000c001100210000005cb011001c70000800d020000390000000403000039000005e90400004100000000050004110000000d06000029000000000700001915f315e90000040f00000001002001900000113a0000613d000009710000013d000900000003001d00000000012d034f000000000101043b000a00000001001d000000000010043f0000000601000039000000200010043f00000000010004140000057e0010009c0000057e01008041000000c001100210000005cb011001c7000080100200003915f315ee0000040f00000001002001900000113a0000613d000000000101043b0000000b03000029000000000031041b000000400100043d000000200210003900000000003204350000000a0200002900000000002104350000057e0010009c0000057e01008041000000400110021000000000020004140000057e0020009c0000057e02008041000000c002200210000000000112019f000005cb011001c70000800d020000390000000103000039000006150400004115f315e90000040f00000001002001900000113a0000613d000000020d0003670000000903000029000005390000013d0000000b01000029000000000001041b0000000d0100002915f314330000040f0000000001000019000015f40001042e0000008005500039000000400050043f000000200440003900000000044d034f000000800010043f00000630051001980000001f0610018f000000a00350003900000cdc0000613d000000a007000039000000000804034f000000008908043c0000000007970436000000000037004b00000cd80000c13d000000000006004b00000ce90000613d000000000454034f0000000305600210000000000603043300000000065601cf000000000656022f000000000404043b0000010005500089000000000454022f00000000045401cf000000000464019f0000000000430435000000a00110003900000000000104350000000c0000006b00000cfb0000c13d0000062601000041000000000010043f000005db01000041000015f5000104300000008005400270000005c8055001970000000b0050006c00000dd50000a13d000006130100004100000dd90000013d0000061e01000041000000000010043f000005db01000041000015f5000104300000000d010000290000006001100210000005cf031001c7000000200030043f000000600320021200000d110000613d000000000013004b00000d110000613d000000000020043f00000000010004140000057e0010009c0000057e01008041000000c001100210000005d0011001c7000080100200003915f315ee0000040f00000001002001900000113a0000613d000000000101043b000000000101041a000000000001004b0000050e0000613d0000000b01000029000000000010043f00000000010004140000057e0010009c0000057e01008041000000c001100210000005cb011001c7000080100200003915f315ee0000040f00000001002001900000113a0000613d000000000101043b000000000201041a0000000a0220006c00000c1f0000413d0000000c030000290000006003300210000000000021041b000005cf013001c7000000200010043f00000000010004140000057e0010009c0000057e01008041000000c001100210000005cb011001c7000080100200003915f315ee0000040f00000001002001900000113a0000613d000000000101043b000000000201041a0000000a0020002a000011420000413d0000000a030000290000000002320019000000000021041b000000200030043f00000000010004140000057e0010009c0000057e01008041000000c001100210000005cb011001c70000800d020000390000000403000039000005e90400004100000000050004110000000d060000290000000c0700002915f315e90000040f00000001002001900000113a0000613d000005d80100004100000000001004430000000c01000029000000040010044300000000010004140000057e0010009c0000057e01008041000000c001100210000005d9011001c7000080020200003915f315ee0000040f000000010020019000000dd40000613d000000000101043b000000000001004b000009710000613d000000400300043d000000a001300039000000a002000039000000000021043500000080013000390000000a02000029000000000021043500000060013000390000000b02000029000000000021043500000040013000390000000d020000290000000000210435000000200130003900000000020004110000000000210435000005ec010000410000000000130435000900000003001d000000c001300039000000800200043d0000000000210435000d00000002001d000000000002004b00000d980000613d0000000d010000290000057e0010009c0000057e01008041000000600110021000000000020004140000057e0020009c0000057e02008041000000c002200210000000000112019f000005ed011001c7000000040200003915f315ee0000040f00000060021002700000057e022001970000000d0020006c0000000d0300002900000000030240190000001f0430018f0000000905000029000000e006500039000005d105300198000000000356001900000d890000613d000000000701034f000000007807043c0000000006860436000000000036004b00000d850000c13d000000000004004b00000d960000613d000000000551034f0000000304400210000000000603043300000000064601cf000000000646022f000000000505043b0000010004400089000000000545022f00000000044501cf000000000464019f0000000000430435000100000002001f000300000001035500000009010000290000001c011000390000057e0010009c0000057e0100804100000040011002100000000d02000029000000c4022000390000057e0020009c0000057e020080410000006002200210000000000112019f00000000020004140000057e0020009c0000057e02008041000000c002200210000000000112019f0000000c0200002915f315e90000040f00000060031002700000057e03300197000000200030008c000000200400003900000000040340190000001f0540018f0000002006400190000000090460002900000db90000613d000000000701034f0000000908000029000000007907043c0000000008980436000000000048004b00000db50000c13d000000000005004b00000dc60000613d000000000661034f0000000305500210000000000704043300000000075701cf000000000757022f000000000606043b0000010005500089000000000656022f00000000055601cf000000000575019f00000000005404350003000000010355000100000003001f000000000003004b00000001022061bf0000000100200190000010290000613d00000009010000290000000001010433000005ee0010009c000009710000613d0000062401000041000000000010043f000005db01000041000015f500010430000000000001042f0000000b050000290000060f0050009c00000ddf0000413d000006120100004100000000001204350000057e0020009c0000057e02008041000000400120021000000602011001c7000015f50001043000000610044001970000000b05000029000000000454019f000000000043041b00000040032000390000000000530435000000200320003900000000001304350000000a0100002900000000001204350000057e0020009c0000057e02008041000000400120021000000000020004140000057e0020009c0000057e02008041000000c002200210000000000112019f000005f7011001c70000800d020000390000000103000039000006110400004115f315e90000040f00000001002001900000113a0000613d000000020d0003670000000c020000290000000903000029000005330000013d000005c901000041000000000010043f0000003201000039000000040010043f000005ca01000041000015f500010430000000080100002900000000010104330000000b02000039000000000202041a000000000012001a0000113c0000413d000000000212001a000a00000002001d0000000b012000b900000e0f0000613d0000000a021000fa0000000b0020006c0000113c0000c13d0000000002000416000000000012004b00000fa70000c13d0000000c01000029000000000010043f0000000601000039000000200010043f00000000010004140000057e0010009c0000057e01008041000000c001100210000005cb011001c7000080100200003915f315ee0000040f00000001002001900000113a0000613d000000000101043b000000000101041a000000000001004b00000faa0000c13d0000000d010000290000000c020000290000000b0300002915f3144c0000040f00000080040000390000000d010000290000000c020000290000000b0300002915f314ed0000040f0000000a0000006b00000e300000613d0000000b0100002915f314a30000040f000000400100043d00000020021000390000000b0300002900000000003204350000000c0200002900000000002104350000057e0010009c0000057e01008041000000400110021000000000020004140000057e0020009c0000057e02008041000000c002200210000000000112019f000005cb011001c70000800d02000039000000020300003900000600040000410000000d050000290000096e0000013d0000000c01d00360000000000101043b000900000001001d0000000d020000290000000b0020006b00000eeb0000813d0000000901000029000000000010043f0000000901000039000000200010043f00000000010004140000057e0010009c0000057e01008041000000c001100210000005cb011001c7000080100200003915f315ee0000040f00000001002001900000113a0000613d000000000101043b000000000201041a000000000002004b00000e610000613d0000000d0020006b00000e610000413d0000000101100039000000000101041a000000000001004b00000c840000c13d0000000901000029000000000010043f0000000a01000039000000200010043f00000000010004140000057e0010009c0000057e01008041000000c001100210000005cb011001c7000080100200003915f315ee0000040f00000001002001900000113a0000613d000000000101043b0000000b06000029000000000061041b00000001021000390000000d07000029000000000072041b0000000c0500002900000140025000390000000202200367000000000202043b0000000204100039000000000024041b00000160045000390000000203400367000000000303043b0000000301100039000000000031041b000000400100043d00000060041000390000000000340435000000400310003900000000002304350000002002100039000000000072043500000000006104350000057e0010009c0000057e01008041000000400110021000000000020004140000057e0020009c0000057e02008041000000c002200210000000000112019f00000605011001c70000800d020000390000000103000039000006060400004115f315e90000040f00000001002001900000113a0000613d000000020d0003670000059b0000013d000005da01000041000000000010043f000005db01000041000015f5000104300000000d01000029000900c0001000920000000901d00360000000000101043b000a00000001001d0000000b020000290000000c0020006b00000eeb0000813d0000000a01000029000000000010043f0000000a01000039000000200010043f00000000010004140000057e0010009c0000057e01008041000000c001100210000005cb011001c7000080100200003915f315ee0000040f00000001002001900000113a0000613d000000000101043b000000000201041a000000000002004b00000ebb0000613d0000000101100039000000000101041a000000000001004b00000ebb0000613d0000000c0010006b00000c7b0000a13d0000000a01000029000000000010043f0000000901000039000000200010043f00000000010004140000057e0010009c0000057e01008041000000c001100210000005cb011001c7000080100200003915f315ee0000040f00000001002001900000113a0000613d000000000101043b0000000c04000029000000000041041b00000001021000390000000b05000029000000000052041b0000000902000029000000e0022000390000000202200367000000000202043b0000000201100039000000000021041b000000400100043d000000400310003900000000002304350000002002100039000000000052043500000000004104350000057e0010009c0000057e01008041000000400110021000000000020004140000057e0020009c0000057e02008041000000c002200210000000000112019f000005f7011001c70000800d020000390000000103000039000005f80400004115f315e90000040f00000001002001900000113a0000613d000000020d000367000005a60000013d000000400100043d000006030200004100000c860000013d000000000001004b000000000200001900000ef20000613d000000a00200043d0000000303100210000006320330027f0000063203300167000000000232016f0000000101100210000000000112019f000010000000013d00000004010000290000000001010433000600000001001d000000400100043d000000200200003900000000022104360000000d030000290000000000320435000006070010009c000009250000213d0000004003100039000000400030043f0000057e0020009c0000057e02008041000000400220021000000000010104330000057e0010009c0000057e010080410000006001100210000000000121019f00000000020004140000057e0020009c0000057e02008041000000c002200210000000000112019f000005d4011001c7000080100200003915f315ee0000040f00000001002001900000113a0000613d000000000301043b000000400100043d000000200200003900000000022104360000000000320435000006070010009c000009250000213d0000004003100039000000400030043f0000057e0020009c0000057e02008041000000400220021000000000010104330000057e0010009c0000057e010080410000006001100210000000000121019f00000000020004140000057e0020009c0000057e02008041000000c002200210000000000112019f000005d4011001c7000080100200003915f315ee0000040f00000001002001900000113a0000613d000000000101043b00000009020000290000003f02200039000005ce02200197000000400300043d0000000002230019000000000032004b00000000040000390000000104004039000005c80020009c000009250000213d0000000100400190000009250000c13d000000400020043f0000000a0200002900000000022304360000000805000029000000000050007c0000113a0000213d0000000a0000006b00000f6c0000613d0000000707000029000000020470036700000000050200190000000808000029000000004604043c00000000056504360000002007700039000000000087004b00000f4b0000413d0000000003030433000000000003004b00000f6c0000613d0000000503300210000900000023001d0000000043020434000a00000004001d000000000031004b000000000300003900000020030020390000000000130435000000200130015f0000000002020433000000000021043500000000010004140000057e0010009c0000057e01008041000000c001100210000005cb011001c7000080100200003915f315ee0000040f00000001002001900000113a0000613d000000000101043b0000000a03000029000000090030006c000000000203001900000f550000413d000000060010006c000010ea0000c13d000000030100002900000000010104330000000b02000039000000000202041a000000000012001a0000113c0000413d000000000212001a000a00000002001d0000000b012000b900000f7b0000613d0000000a021000fa0000000b0020006c0000113c0000c13d0000000002000416000000000012004b00000fa70000c13d0000000c01000029000000000010043f0000000601000039000000200010043f00000000010004140000057e0010009c0000057e01008041000000c001100210000005cb011001c7000080100200003915f315ee0000040f00000001002001900000113a0000613d000000000101043b000000000101041a000000000001004b000011070000c13d0000000d010000290000000c020000290000000b0300002915f3144c0000040f0000000a0000006b00000f970000613d0000000b0100002915f314a30000040f00000080040000390000000d010000290000000c020000290000000b0300002915f314ed0000040f000000400100043d00000020021000390000000b0300002900000000003204350000000c0200002900000000002104350000057e0010009c0000057e010080410000004001100210000000000200041400000e3a0000013d000000400100043d000006090200004100000c860000013d0000000d01000029000000000010043f0000000701000039000000200010043f00000000010004140000057e0010009c0000057e01008041000000c001100210000005cb011001c7000080100200003915f315ee0000040f00000001002001900000113a0000613d000000000101043b0000000c02000029000000000020043f000000200010043f00000000010004140000057e0010009c0000057e01008041000000c001100210000005cb011001c7000080100200003915f315ee0000040f00000001002001900000113a0000613d000000000101043b000000000201041a000900000002001d0000000b0020002a0000113c0000413d0000000c01000029000000000010043f0000000601000039000000200010043f00000000010004140000057e0010009c0000057e01008041000000c001100210000005cb011001c7000080100200003915f315ee0000040f00000001002001900000113a0000613d00000009030000290000000b02300029000000000101043b000000000101041a000000000012004b00000e230000a13d000000400100043d000005ff02000041000000000021043500000004021000390000000c0300002900000000003204350000057e0010009c0000057e010080410000004001100210000005ca011001c7000015f500010430000005dd020000410000002005000039000000010430008a0000000504400270000005de0440009a000000000605001900000080055000390000000005050433000000000052041b00000020056000390000000102200039000000000042004b00000fec0000c13d000000a004600039000000000013004b00000ffe0000813d0000000303100210000000f80330018f000006320330027f00000632033001670000000004040433000000000334016f000000000032041b000000010110021000000001011001bf000000000010041b0000000d010000290000000002010433000005c80020009c000009250000213d0000000101000039000000000401041a000000010040019000000001034002700000007f0330618f0000001f0030008c00000000050000390000000105002039000000000454013f0000000100400190000008ba0000c13d000000200030008c000010210000413d000000000010043f0000001f042000390000000504400270000005df0440009a000000200020008c000005e0040040410000001f033000390000000503300270000005df0330009a000000000034004b000010210000813d000000000004041b0000000104400039000000000034004b0000101d0000413d0000001f0020008c000010470000a13d000000000010043f0000063005200198000010530000c13d0000002004000039000005e003000041000010600000013d0000001f0430018f000005d1053001980000000902500029000010330000613d000000000601034f0000000907000029000000006806043c0000000007870436000000000027004b0000102f0000c13d000000000004004b000010400000613d000000000151034f0000000304400210000000000502043300000000054501cf000000000545022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000000009020000290000057e0020009c0000057e020080410000004002200210000000000121019f000015f500010430000000000002004b00000000030000190000104c0000613d0000000c0300002900000000030304330000000304200210000006320440027f0000063204400167000000000343016f0000000102200210000000000223019f0000106c0000013d000005e0030000410000002004000039000000010650008a0000000506600270000005e10660009a0000000d0800002900000000078400190000000007070433000000000073041b00000020044000390000000103300039000000000063004b000010590000c13d000000000025004b0000106a0000813d0000000305200210000000f80550018f000006320550027f00000632055001670000000d044000290000000004040433000000000454016f000000000043041b000000010220021000000001022001bf000000000021041b000005e201000041000000000201041a000000000002004b000010a20000c13d0000000b02000029000005c5062001980000000002000019000005e402006041000000000262019f000000000021041b00000000010004140000057e0010009c0000057e01008041000000c001100210000005d4011001c70000800d020000390000000303000039000005e504000041000000000500001915f315e90000040f00000001002001900000113a0000613d00000000010004140000057e0010009c0000057e01008041000000c001100210000005d4011001c70000800d020000390000000103000039000005e60400004115f315e90000040f00000001002001900000113a0000613d00000064010000390000000201100367000000000101043b0000000b02000039000000000012041b000000090000006b000009710000613d00000002010000390000000902000029000000000012041b0000000103000039000000200030043f00000000010004140000057e0010009c0000057e01008041000000c001100210000005e7011001c70000800d02000039000005e804000041000002250000013d000005e301000041000000000010043f000005db01000041000015f5000104300000000d01000029000905cf001001cb0000000b012000290000000001010433000d00000001001d0000000a01000029000000200010043f000c00000002001d00000080012000390000000001010433000000000010043f00000000010004140000057e0010009c0000057e01008041000000c001100210000005cb011001c7000080100200003915f315ee0000040f00000001002001900000113a0000613d000000000101043b000000000201041a0000000d0220006c00000c1f0000413d000000000021041b0000000901000029000000200010043f00000000010004140000057e0010009c0000057e01008041000000c001100210000005cb011001c7000080100200003915f315ee0000040f00000001002001900000113a0000613d000000000101043b000000000201041a0000000d03000029000000000032001a000011420000413d0000000002320019000000000021041b0000000c02000029000000200220008c000010a80000c13d00000a3e0000013d0000006003100210000000000332019f0000061a04000041000000000034041b000000400300043d0000002004300039000000000024043500000000001304350000057e0030009c0000057e03008041000000400130021000000000020004140000057e0020009c0000057e02008041000000c002200210000000000112019f000005cb011001c70000800d0200003900000001030000390000061b04000041000002250000013d000000400100043d000006080200004100000c860000013d0000001f0430018f000005d1053001980000000d02500029000010f70000613d000000000601034f0000000d07000029000000006806043c0000000007870436000000000027004b000010f30000c13d000000000004004b000011040000613d000000000151034f0000000304400210000000000502043300000000054501cf000000000545022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f000000000012043500000060013002100000000d02000029000010420000013d0000000d01000029000000000010043f0000000701000039000000200010043f00000000010004140000057e0010009c0000057e01008041000000c001100210000005cb011001c7000080100200003915f315ee0000040f00000001002001900000113a0000613d000000000101043b0000000c02000029000000000020043f000000200010043f00000000010004140000057e0010009c0000057e01008041000000c001100210000005cb011001c7000080100200003915f315ee0000040f00000001002001900000113a0000613d000000000101043b000000000201041a000900000002001d0000000b0020002a0000113c0000413d0000000c01000029000000000010043f0000000601000039000000200010043f00000000010004140000057e0010009c0000057e01008041000000c001100210000005cb011001c7000080100200003915f315ee0000040f00000001002001900000113a0000613d00000009030000290000000b02300029000000000101043b000000000101041a000000000012004b00000f8f0000a13d00000fdc0000013d0000000001000019000015f500010430000005c901000041000000000010043f0000001101000039000000040010043f000005ca01000041000015f5000104300000061f01000041000000000010043f000005db01000041000015f50001043000000000430104340000000001320436000000000003004b000011520000613d000000000200001900000000052100190000000006240019000000000606043300000000006504350000002002200039000000000032004b0000114b0000413d000000000231001900000000000204350000001f0230003900000630022001970000000001210019000000000001042d0000060d0010009c000011620000213d000000430010008c000011620000a13d00000002020003670000000401200370000000000101043b0000002402200370000000000202043b000000000001042d0000000001000019000015f50001043000000000430104340000000003320436000000000404043300000000004304350000004002200039000000400110003900000000010104330000000000120435000000000001042d0000001f03100039000000000023004b0000000004000019000005e404004041000005e405200197000005e403300197000000000653013f000000000053004b0000000003000019000005e403002041000005e40060009c000000000304c019000000000003004b000011850000613d0000000203100367000000000303043b000005c80030009c000011850000213d00000020011000390000000004310019000000000024004b000011850000213d0000000002030019000000000001042d0000000001000019000015f500010430000000004301043400000000033204360000000004040433000000000043043500000040031000390000000003030433000000400420003900000000003404350000006002200039000000600110003900000000010104330000000000120435000000000001042d000006330010009c000011990000813d0000014001100039000000400010043f000000000001042d000005c901000041000000000010043f0000004101000039000000040010043f000005ca01000041000015f5000104300000001f0220003900000630022001970000000001120019000000000021004b00000000020000390000000102004039000005c80010009c000011ab0000213d0000000100200190000011ab0000c13d000000400010043f000000000001042d000005c901000041000000000010043f0000004101000039000000040010043f000005ca01000041000015f5000104300000000305000039000000000405041a000000010640019000000001024002700000007f0220618f0000001f0020008c00000000010000390000000101002039000000000016004b000011df0000c13d000000400100043d0000000003210436000000000006004b000011cc0000613d000000000050043f000000000002004b000011d20000613d000006340500004100000000040000190000000006430019000000000705041a000000000076043500000001055000390000002004400039000000000024004b000011c40000413d000011d30000013d00000631044001970000000000430435000000000002004b00000020040000390000000004006039000011d30000013d00000000040000190000003f0240003900000630032001970000000002130019000000000032004b00000000030000390000000103004039000005c80020009c000011e50000213d0000000100300190000011e50000c13d000000400020043f000000000001042d000005c901000041000000000010043f0000002201000039000000040010043f000005ca01000041000015f500010430000005c901000041000000000010043f0000004101000039000000040010043f000005ca01000041000015f5000104300000000205000039000000000405041a000000010640019000000001024002700000007f0220618f0000001f0020008c00000000010000390000000101002039000000000016004b000012190000c13d000000400100043d0000000003210436000000000006004b000012060000613d000000000050043f000000000002004b0000120c0000613d000006350500004100000000040000190000000006430019000000000705041a000000000076043500000001055000390000002004400039000000000024004b000011fe0000413d0000120d0000013d00000631044001970000000000430435000000000002004b000000200400003900000000040060390000120d0000013d00000000040000190000003f0240003900000630032001970000000002130019000000000032004b00000000030000390000000103004039000005c80020009c0000121f0000213d00000001003001900000121f0000c13d000000400020043f000000000001042d000005c901000041000000000010043f0000002201000039000000040010043f000005ca01000041000015f500010430000005c901000041000000000010043f0000004101000039000000040010043f000005ca01000041000015f500010430000000400100043d000006360010009c000012300000813d0000006002100039000000400020043f00000040021000390000000000020435000000200210003900000000000204350000000000010435000000000001042d000005c901000041000000000010043f0000004101000039000000040010043f000005ca01000041000015f5000104300000000002010019000000400100043d000006360010009c000012460000813d0000006003100039000000400030043f000000000302041a00000000033104360000000104200039000000000404041a00000000004304350000000202200039000000000202041a00000040031000390000000000230435000000000001042d000005c901000041000000000010043f0000004101000039000000040010043f000005ca01000041000015f500010430000000400100043d000006370010009c000012590000813d0000008002100039000000400020043f0000006002100039000000000002043500000040021000390000000000020435000000200210003900000000000204350000000000010435000000000001042d000005c901000041000000000010043f0000004101000039000000040010043f000005ca01000041000015f5000104300000000002010019000000400100043d000006370010009c000012730000813d0000008003100039000000400030043f000000000302041a00000000033104360000000104200039000000000404041a00000000004304350000000203200039000000000303041a000000400410003900000000003404350000000302200039000000000202041a00000060031000390000000000230435000000000001042d000005c901000041000000000010043f0000004101000039000000040010043f000005ca01000041000015f500010430000005e201000041000000000101041a0000000002000411000000000012004b0000127f0000c13d000000000001042d0000060e01000041000000000010043f000005db01000041000015f500010430000005c503100197000000a004200210000000000434019f0000000405000039000000000045041b000005f902200197000027110020008c000012a40000813d0000006001100212000012a80000613d000000000112019f0000061a04000041000000000014041b000000400100043d0000002004100039000000000024043500000000003104350000057e0010009c0000057e01008041000000400110021000000000020004140000057e0020009c0000057e02008041000000c002200210000000000112019f000005cb011001c70000800d0200003900000001030000390000061b0400004115f315e90000040f0000000100200190000012ac0000613d000000000001042d0000061c01000041000000000010043f000005db01000041000015f5000104300000063801000041000000000010043f000005db01000041000015f5000104300000000001000019000015f5000104300002000000000002000100000002001d000200000001001d000000000010043f0000000601000039000000200010043f00000000010004140000057e0010009c0000057e01008041000000c001100210000005cb011001c7000080100200003915f315ee0000040f0000000100200190000012d50000613d000000000101043b0000000103000029000000000031041b000000400100043d00000020021000390000000000320435000000020200002900000000002104350000057e0010009c0000057e01008041000000400110021000000000020004140000057e0020009c0000057e02008041000000c002200210000000000112019f000005cb011001c70000800d020000390000000103000039000006150400004115f315e90000040f0000000100200190000012d50000613d000000000001042d0000000001000019000015f5000104300002000000000002000200000002001d000100000001001d000000000010043f0000000501000039000000200010043f00000000010004140000057e0010009c0000057e01008041000000c001100210000005cb011001c7000080100200003915f315ee0000040f00000001002001900000130d0000613d000000400200043d000000000301043b000000000403041a000005c8014001980000000206000029000012ee0000613d000000000061004b0000130f0000413d0000008005400270000005c805500197000000000065004b000013110000213d0000060f0060009c000013130000813d0000061004400197000000000464019f000000000043041b0000004003200039000000000063043500000020032000390000000000130435000000010100002900000000001204350000057e0020009c0000057e02008041000000400120021000000000020004140000057e0020009c0000057e02008041000000c002200210000000000112019f000005f7011001c70000800d020000390000000103000039000006110400004115f315e90000040f00000001002001900000130d0000613d000000000001042d0000000001000019000015f5000104300000061401000041000013140000013d0000061301000041000013140000013d000006120100004100000000001204350000057e0020009c0000057e02008041000000400120021000000602011001c7000015f500010430000005c5011001970000000802000039000000000302041a0000061803300197000000000313019f000000000032041b000000400200043d00000000001204350000057e0020009c0000057e02008041000000400120021000000000020004140000057e0020009c0000057e02008041000000c002200210000000000112019f000005fc011001c70000800d020000390000000103000039000006190400004115f315e90000040f0000000100200190000013320000613d000000000001042d0000000001000019000015f5000104300000060f0020009c000013960000813d0000000303000039000000000403041a000000010540019000000001044002700000007f0440618f0000001f0040008c00000000060000390000000106002039000000000065004b0000139c0000c13d000000200040008c000013510000413d000000000030043f0000001f052000390000000505500270000006390550009a000000200020008c00000634050040410000001f044000390000000504400270000006390440009a000000000045004b000013510000813d000000000005041b0000000105500039000000000045004b0000134d0000413d0000001f0020008c000000010400008a000013700000a13d000000000030043f00000630062001980000137b0000613d0000063405000041000000020800036700000000070000190000000009170019000000000998034f000000000909043b000000000095041b00000001055000390000002007700039000000000067004b0000135a0000413d000000000026004b0000136d0000813d0000000306200210000000f80660018f000000000664022f000000000646013f00000000011700190000000201100367000000000101043b000000000161016f000000000015041b000000010120021000000001011001bf000013810000013d000000000002004b000013800000613d0000000305200210000000000554022f000000000545013f0000000201100367000000000101043b000000000151016f0000000102200210000000000121019f000013810000013d00000634050000410000000007000019000000000026004b000013640000413d0000136d0000013d0000000001000019000000000013041b000000400100043d0000002002100039000000000042043500000000000104350000057e0010009c0000057e01008041000000400110021000000000020004140000057e0020009c0000057e02008041000000c002200210000000000112019f000005cb011001c70000800d020000390000000103000039000005fb0400004115f315e90000040f0000000100200190000013a20000613d000000000001042d000005c901000041000000000010043f0000004101000039000000040010043f000005ca01000041000015f500010430000005c901000041000000000010043f0000002201000039000000040010043f000005ca01000041000015f5000104300000000001000019000015f5000104300000060f0020009c000014250000813d0000000204000039000000000304041a000000010630019000000001053002700000007f0550618f0000001f0050008c00000000030000390000000103002039000000000036004b0000142b0000c13d000000200050008c0000001f03200039000013c10000413d000000000040043f00000005063002700000063a0660009a000000200020008c00000635060040410000001f0550003900000005055002700000063a0550009a000000000056004b000013c10000813d000000000006041b0000000106600039000000000056004b000013bd0000413d00000002070003670000001f0020008c000000000617034f000000200500008a000013e10000a13d000000000040043f0000000009520170000013eb0000613d0000063508000041000000000a000019000000000b1a0019000000000bb7034f000000000b0b043b0000000000b8041b0000000108800039000000200aa0003900000000009a004b000013cb0000413d000000000029004b000013de0000813d0000000309200210000000f80990018f000006320990027f000006320990016700000000011a0019000000000117034f000000000101043b000000000191016f000000000018041b000000010120021000000001011001bf000013f10000013d000000000002004b000013f00000613d0000000301200210000006320110027f0000063201100167000000000706043b000000000117016f0000000107200210000000000171019f000013f10000013d0000063508000041000000000a000019000000000029004b000013d50000413d000013de0000013d0000000001000019000000000014041b0000002004000039000000400100043d0000000004410436000000000024043500000000085201700000001f0920018f00000040041000390000000007840019000014010000613d000000000a06034f000000000b04001900000000ac0a043c000000000bcb043600000000007b004b000013fd0000c13d000000000009004b0000140e0000613d000000000686034f0000000308900210000000000907043300000000098901cf000000000989022f000000000606043b0000010008800089000000000686022f00000000068601cf000000000696019f0000000000670435000000000353016f0000000002240019000000000002043500000060023002100000063b0220009a0000063c0030009c0000063d020080410000057e0010009c0000057e010080410000004001100210000000000112019f00000000020004140000057e0020009c0000057e02008041000000c00220021000000000012100190000800d0200003900000001030000390000063e0400004115f315e90000040f0000000100200190000014310000613d000000000001042d000005c901000041000000000010043f0000004101000039000000040010043f000005ca01000041000015f500010430000005c901000041000000000010043f0000002201000039000000040010043f000005ca01000041000015f5000104300000000001000019000015f5000104300001000000000002000005e202000041000000000502041a0000000002000414000005c5061001970000057e0020009c0000057e02008041000000c001200210000005d4011001c70000800d020000390000000303000039000005e504000041000100000006001d15f315e90000040f00000001002001900000144a0000613d000000010000006b0000000001000019000005e40100604100000001011001af000005e202000041000000000012041b000000000001042d0000000001000019000015f5000104300003000000000002000300000003001d000200000001001d000100000002001d000000000020043f0000000501000039000000200010043f00000000010004140000057e0010009c0000057e01008041000000c001100210000005cb011001c7000080100200003915f315ee0000040f0000000100200190000014930000613d000000000101043b000000000201041a0000008003200270000005c8033001970000000305000029000000000053001a0000149d0000413d0000000003530019000005c804200197000000000043004b000014950000213d00000040035002100000000003320019000005cc033001970000063f04200197000000000343019f000000800450021000000000024200190000064002200197000000000223019f000000000021041b0000000201000029000005c501100197000000000010043f0000000701000039000000200010043f00000000010004140000057e0010009c0000057e01008041000000c001100210000005cb011001c7000080100200003915f315ee0000040f0000000100200190000014930000613d000000000101043b0000000102000029000000000020043f000000200010043f00000000010004140000057e0010009c0000057e01008041000000c001100210000005cb011001c7000080100200003915f315ee0000040f0000000100200190000014930000613d0000000302000029000005c802200197000000000101043b000000000301041a0000000002230019000000000021041b000000000001042d0000000001000019000015f500010430000000400100043d000006410200004100000000002104350000057e0010009c0000057e01008041000000400110021000000602011001c7000015f500010430000005c901000041000000000010043f0000001101000039000000040010043f000005ca01000041000015f50001043000010000000000020000000803000039000000000203041a000005c500200198000014df0000613d00000000050004160000000b02000039000000000202041a000000000002004b000014c80000613d00000000031200a900000000022300d9000000000012004b000014e70000c13d000000000535004b000014e70000413d000100000005001d00000000010004140000057e0010009c0000057e01008041000000c001100210000000000003004b000014bf0000613d000005d4011001c7000080090200003900000642040000410000000005000019000014c00000013d000006420200004115f315e90000040f000300000001035500000060011002700001057e0010019d000000010020019000000001050000290000000803000039000014db0000613d000000000005004b000014da0000613d000000000103041a0000000002000414000005c5041001970000057e0020009c0000057e02008041000000c001200210000005d4011001c700008009020000390000000003050019000000000500001915f315e90000040f00000060031002700001057e0030019d00030000000103550000000100200190000014db0000613d000000000001042d0000064301000041000000000010043f000005db01000041000015f500010430000000400100043d000006440200004100000000002104350000057e0010009c0000057e01008041000000400110021000000602011001c7000015f500010430000005c901000041000000000010043f0000001101000039000000040010043f000005ca01000041000015f5000104300005000000000002000200000004001d000500000003001d000305c50010019c000015a80000613d000005cf03000041000000200030043f000400000001001d000000140010043f000100000002001d000000000020043f00000000010004140000057e0010009c0000057e01008041000000c001100210000005cb011001c7000080100200003915f315ee0000040f0000000100200190000015a60000613d000000000101043b000000000201041a0000000503000029000000000032001a000015cf0000413d0000000002320019000000000021041b000000200030043f00000000010004140000057e0010009c0000057e01008041000000c001100210000005cb011001c70000800d0200003900000004030000390000000005000411000005e9040000410000000006000019000000030700002915f315e90000040f0000000100200190000015a60000613d000005d80100004100000000001004430000000401000029000000040010044300000000010004140000057e0010009c0000057e01008041000000c001100210000005d9011001c7000080020200003915f315ee0000040f0000000100200190000015ac0000613d000000000101043b000000000001004b000015a50000613d000000400900043d000000a001900039000000a0020000390000000000210435000000800190003900000005020000290000000000210435000000600190003900000001020000290000000000210435000000200190003900000000020004110000000000210435000005ec010000410000000000190435000000400190003900000000000104350000000201000029000000001a010434000000c0029000390000000000a2043500000000000a004b000500000009001d0000156f0000613d0000057e00a0009c0000057e0200004100000000020a401900000060022002100000057e0010009c0000057e010080410000004001100210000000000112019f00000000020004140000057e0020009c0000057e02008041000000c002200210000000000112019f000000040200003900030000000a001d15f315ee0000040f000000030a000029000000050900002900000060021002700000057e022001970000000000a2004b00000000030a001900000000030240190000001f0430018f000000e006900039000005d1053001980000000003560019000015600000613d000000000701034f000000007807043c0000000006860436000000000036004b0000155c0000c13d000000000004004b0000156d0000613d000000000551034f0000000304400210000000000603043300000000064601cf000000000646022f000000000505043b0000010004400089000000000545022f00000000044501cf000000000464019f0000000000430435000100000002001f00030000000103550000001c019000390000057e0010009c0000057e010080410000004001100210000000c402a000390000057e0020009c0000057e020080410000006002200210000000000112019f00000000020004140000057e0020009c0000057e02008041000000c002200210000000000112019f000000040200002915f315e90000040f000000050a00002900000060031002700000057e03300197000000200030008c000000200400003900000000040340190000001f0540018f000000200640019000000000046a00190000158f0000613d000000000701034f00000000080a0019000000007907043c0000000008980436000000000048004b0000158b0000c13d000000000005004b0000159c0000613d000000000661034f0000000305500210000000000704043300000000075701cf000000000757022f000000000606043b0000010005500089000000000656022f00000000055601cf000000000575019f00000000005404350003000000010355000100000003001f000000000003004b00000001022061bf0000000100200190000015ad0000613d00000000010a0433000005ee0010009c000015cb0000c13d000000000001042d0000000001000019000015f5000104300000062601000041000000000010043f000005db01000041000015f500010430000000000001042f0000001f0430018f000005d10530019800000000025a0019000015b70000613d000000000601034f0000000507000029000000006806043c0000000007870436000000000027004b000015b30000c13d000000000004004b000015c40000613d000000000151034f0000000304400210000000000502043300000000054501cf000000000545022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000000005020000290000057e0020009c0000057e020080410000004002200210000000000121019f000015f5000104300000062401000041000000000010043f000005db01000041000015f5000104300000061f01000041000000000010043f000005db01000041000015f500010430000000000001042f0000057e0010009c0000057e0100804100000040011002100000057e0020009c0000057e020080410000006002200210000000000112019f00000000020004140000057e0020009c0000057e02008041000000c002200210000000000112019f000005d4011001c7000080100200003915f315ee0000040f0000000100200190000015e70000613d000000000101043b000000000001042d0000000001000019000015f500010430000015ec002104210000000102000039000000000001042d0000000002000019000000000001042d000015f1002104230000000102000039000000000001042d0000000002000019000000000001042d000015f300000432000015f40001042e000015f5000104300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffff0000000200000000000000000000000000000040000001000000000000000000000000000000000000000000000000000000000000000000000000008d527ad800000000000000000000000000000000000000000000000000000000be37822700000000000000000000000000000000000000000000000000000000f04e283d00000000000000000000000000000000000000000000000000000000f5298ac900000000000000000000000000000000000000000000000000000000f6eb127900000000000000000000000000000000000000000000000000000000f6eb127a00000000000000000000000000000000000000000000000000000000fee81cf400000000000000000000000000000000000000000000000000000000f5298aca00000000000000000000000000000000000000000000000000000000f542033f00000000000000000000000000000000000000000000000000000000f04e283e00000000000000000000000000000000000000000000000000000000f242432a00000000000000000000000000000000000000000000000000000000f2fde38b00000000000000000000000000000000000000000000000000000000e1a4521700000000000000000000000000000000000000000000000000000000e1a4521800000000000000000000000000000000000000000000000000000000e8a3d48500000000000000000000000000000000000000000000000000000000e985e9c500000000000000000000000000000000000000000000000000000000be37822800000000000000000000000000000000000000000000000000000000c3db27c100000000000000000000000000000000000000000000000000000000c63adb2b000000000000000000000000000000000000000000000000000000009d7f4ebe00000000000000000000000000000000000000000000000000000000a81b2f8c00000000000000000000000000000000000000000000000000000000b06e4f0c00000000000000000000000000000000000000000000000000000000b06e4f0d00000000000000000000000000000000000000000000000000000000bd85b03900000000000000000000000000000000000000000000000000000000a81b2f8d00000000000000000000000000000000000000000000000000000000ad2f852a000000000000000000000000000000000000000000000000000000009d7f4ebf00000000000000000000000000000000000000000000000000000000a22cb46500000000000000000000000000000000000000000000000000000000a48301140000000000000000000000000000000000000000000000000000000095d89b400000000000000000000000000000000000000000000000000000000095d89b4100000000000000000000000000000000000000000000000000000000976e7970000000000000000000000000000000000000000000000000000000009b4f3af5000000000000000000000000000000000000000000000000000000008d527ad9000000000000000000000000000000000000000000000000000000008da5cb5b00000000000000000000000000000000000000000000000000000000938e3d7b0000000000000000000000000000000000000000000000000000000037da577b0000000000000000000000000000000000000000000000000000000054d1f13c00000000000000000000000000000000000000000000000000000000715018a5000000000000000000000000000000000000000000000000000000007bca93c1000000000000000000000000000000000000000000000000000000007bca93c200000000000000000000000000000000000000000000000000000000869f759400000000000000000000000000000000000000000000000000000000715018a600000000000000000000000000000000000000000000000000000000730143c60000000000000000000000000000000000000000000000000000000054d1f13d0000000000000000000000000000000000000000000000000000000055f804b3000000000000000000000000000000000000000000000000000000006c0360eb0000000000000000000000000000000000000000000000000000000046bb59530000000000000000000000000000000000000000000000000000000046bb5954000000000000000000000000000000000000000000000000000000004c347fe8000000000000000000000000000000000000000000000000000000004e1273f40000000000000000000000000000000000000000000000000000000037da577c000000000000000000000000000000000000000000000000000000003fb80b15000000000000000000000000000000000000000000000000000000004520ce2e0000000000000000000000000000000000000000000000000000000013966db4000000000000000000000000000000000000000000000000000000002a552059000000000000000000000000000000000000000000000000000000002a55205a000000000000000000000000000000000000000000000000000000002eb2c2d6000000000000000000000000000000000000000000000000000000003454485d0000000000000000000000000000000000000000000000000000000013966db500000000000000000000000000000000000000000000000000000000256929620000000000000000000000000000000000000000000000000000000026b460cf0000000000000000000000000000000000000000000000000000000006fdde020000000000000000000000000000000000000000000000000000000006fdde0300000000000000000000000000000000000000000000000000000000075f45c2000000000000000000000000000000000000000000000000000000000e89341c0000000000000000000000000000000000000000000000000000000000fdd58e0000000000000000000000000000000000000000000000000000000001ffc9a70000000000000000000000000000000000000000000000000000000002fa7c47000000000000000000000000ffffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000389a75e10000000000000000000000000000000000000020000000800000000000000000000000000000000000000000000000000000000000000000ffffffffffffffff4e487b71000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024000000000000000000000000020000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000ffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe00000000000000000000000000000000000000000000000009a31110384e0b0c902000000000000000000000000000000000000340000000c000000000000000000000000000000000000000000000000000000000000000000000000ffffffe0000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000ffffffff00000000000000000000000002000000000000000000000000000000000000000000000000000000000000004a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb000000000000000000000000000000000000000000000000ffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011321806aa1896bbf26568e884a7374b41e002500962caba6a15023a8d90e8508b83020000020000000000000000000000000000002400000000000000000000000000000000000000000000000000000000000000000000000000000000f92ee8a900000000000000000000000000000000000000040000001c0000000000000000d6f21326ab749d5729fcba5677c79037b459436ab7bff709c9d06ce9f10c1a9d290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563d6f21326ab749d5729fcba5677c79037b459436ab7bff709c9d06ce9f10c1a9c4ef1d2ad89edf8c4d91132028e8195cdf30bb4b5053d4f8cd260341d4805f30ab10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf64ef1d2ad89edf8c4d91132028e8195cdf30bb4b5053d4f8cd260341d4805f309ffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927000000000000000000000000000000000000000000000000000000000dc149f080000000000000000000000000000000000000000000000000000000000000008be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e04cdc0855317fc903931370d8fa2cbf56b50c63f39e1a46f1d5859b2d91b2c2c40200000000000000000000000000000000000020000000200000000000000000c7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2c3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62000000000000000000000000000000000000000000000000000000007448fbae0000000000000000000000002052f8a2ff46283b30084e5d84c89a2fdbe7f74b00000000000000000000000000000000000000000000000000000000f23a6e610000000000000000000000000000000000000000000000a00000000000000000f23a6e610000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000200000000c0000000000000000796b89b91644bc98cd93958e4c9038275d622183e25ac5af08cc6b5d955391320200000200000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000006f5e88180000000000000000000000000000000000000020000000000000000000000000455243313135354d6167696344726f70436c6f6e6561626c6500000000000000312e302e3200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000200000000000000000000000000000000000060000000000000000000000000be59aad4e5e3cd0369b75babff1d2cf97c307e9d1ad1d4a7a22a32a8d0b9ed2a0000000000000000000000000000000000000000ffffffffffffffffffffffff02000000000000000000000000000000000000400000008000000000000000006bd5c950a8d8df17f772f5af37cb3655737899cbf903264b9795592da439661c020000000000000000000000000000000000002000000000000000000000000017307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31000000000000000000000000000000000000000000000000ffffffffffffff9f2f7a6e320000000000000000000000000000000000000000000000000000000096234cb3d6c373a1aaa06497a540bc166d4b0359243a088eaf95e21d7253d0beb358b4ef0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000003ee5527400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000080000000000000000002000000000000000000000000000000000000800000000000000000000000006d95873399671cd981e5dbfbb034ad9c7ad8030a29b541bfd5fb5796d5d99909000000000000000000000000000000000000000000000000ffffffffffffffbf09bde33900000000000000000000000000000000000000000000000000000000f73316d400000000000000000000000000000000000000000000000000000000e58961bf00000000000000000000000000000000000000000000000000000000000000000000000000000000a3833016a4ec61f5c253d71c77522cc8a1cc1106fa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000082b429000000000000000000000000000000000000000000000000010000000000000000ffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000708949a737b310dd5b3a011a4f5b1985f9ee4c69334aaa1613866e6f16f0334a8981b33900000000000000000000000000000000000000000000000000000000fb115a68000000000000000000000000000000000000000000000000000000002e08a50800000000000000000000000000000000000000000000000000000000c9aa851a9e693d868d2f64d4eda0e3480830af4a05b796fcbf27f8e8b58c18bca630cab0000000000000000000000000000000000000000000000000000000004b07080b00000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff00000000000000000000000000000000000000009a0dcf10a4d35ed2209787aa6b02577335bd59ab979fb43e2c0438f098bd81bd0000000000000000000000000000000000000000000000aa4ec00224afccfdb7f21fccf4d64d86d532c4e4eb86c007b6ad57a460c27d724188625e755ec6cf6d00000000000000000000000000000000000000000000000000000000350a88b30000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000003b800a460000000000000000000000000000000000000000000000000000000001336cea00000000000000000000000000000000000000000000000000000000f4d678b8000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000bc197c81bc197c8100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009c05499b000000000000000000000000000000000000000000000000000000004b6e7f1800000000000000000000000000000000000000000000000000000000ea553b3400000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000060000000000000000000000000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd5d00dbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff2a55205a0000000000000000000000000000000000000000000000000000000092aba59e00000000000000000000000000000000000000000000000000000000490649060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d9b67a26ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000000000000000000000fffffffffffffec0c2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace000000000000000000000000000000000000000000000000ffffffffffffffa0000000000000000000000000000000000000000000000000ffffffffffffff8000000000000000000000000000000000000000000000000000000000b4457eaa3da8a5f161a6c3ff06a60736d0ed24d7963cc6a5c4fafd2fa1dae9bb908e07a5bfa87805ed57dc1f0d489ce33be4c4577d74ccde357eeeee058a32c55c44a532fdffffffffffffffffffffffffffffffffffffc000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffc002000000000000000000000000000000ffffffff000000000000000000000000905d981207a7d0b6c62cc46ab0be2a076d0298e4a86d0ab79882dbd01ac37378ffffffffffffffff00000000000000000000000000000000ffffffffffffffff0000000000000000ffffffffffffffff0000000000000000000000000000000083986307000000000000000000000000000000000000000000000000000000000000000000000000000000000b98151bedee73f9ba5f2c7b72dea02d38ce49fc00000000000000000000000000000000000000000000000000000000b12d13ebb9b0f857000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f599754bd4525113d8c7c84cf615369f5224aff02527795b3606dd1ed5716ad5
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 35 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ 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.