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 | |||
---|---|---|---|---|---|---|
3817552 | 36 hrs 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, mintFee: mintFee }); 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.0"); } /*============================================================== = 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; /// @dev The mint fee of the token. uint256 mintFee; }
// 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":"uint256","name":"mintFee","type":"uint256"}],"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":"uint256","name":"mintFee","type":"uint256"}],"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
3cda33512e73f8dcaff75cb6abbea635578966478db066b9ffd4cfbd355f71916bf955fb010006497f349972f7575f9eb6c718c7c0da5294968297a3f3ae953c65d54cfe00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x0004000000000002000d000000000002000000000d01034f0000006001100270000005810310019700030000003d035500020000000d0355000005810010019d0000008004000039000000400040043f0000000100200190000000230000c13d000000040030008c000011460000413d00000000010d043b000000e001100270000005830010009c0000002b0000a13d000005840010009c0000003e0000213d000005960010009c0000016b0000a13d000005970010009c0000026a0000a13d000005980010009c000003720000213d0000059b0010009c000004860000613d0000059c0010009c000011460000c13d0000000001000416000000000001004b000011460000c13d000000040100003900000bcd0000013d0000000001000416000000000001004b000011460000c13d0000002001000039000001000010044300000120000004430000058201000041000016000001042e000005a70010009c0000010b0000a13d000005a80010009c0000012a0000a13d000005a90010009c000001980000a13d000005aa0010009c0000035f0000213d000005ad0010009c000003990000613d000005ae0010009c000011460000c13d0000000001000416000000000001004b000011460000c13d0000060e01000041000000800010043f000005ca01000041000016000001042e000005850010009c000001870000a13d000005860010009c000002890000a13d000005870010009c000003860000213d0000058a0010009c000005410000613d0000058b0010009c000011460000c13d000000840030008c000011460000413d0000000001000416000000000001004b000011460000c13d0000000401d00370000000000201043b000005cb0020009c000011460000213d0000002301200039000000000031004b000011460000813d000000040420003900000000014d034f000000000101043b000005cb0010009c000009310000213d0000001f0510003900000633055001970000003f055000390000063305500197000005d90050009c000009310000213d00000024022000390000008005500039000000400050043f000000800010043f0000000002210019000000000032004b000011460000213d000000200240003900000000042d034f00000633051001980000001f0610018f000000a002500039000000720000613d000000a007000039000000000804034f000000008908043c0000000007970436000000000027004b0000006e0000c13d000000000006004b0000007f0000613d000000000454034f0000000305600210000000000602043300000000065601cf000000000656022f000000000404043b0000010005500089000000000454022f00000000045401cf000000000464019f0000000000420435000000a00110003900000000000104350000002401d00370000000000201043b000005cb0020009c000011460000213d0000002301200039000000000031004b000011460000813d000000040420003900000000014d034f000000000101043b000005cb0010009c000009310000213d0000001f0510003900000633055001970000003f055000390000063305500197000000400600043d0000000005560019000d00000006001d000000000065004b00000000060000390000000106004039000005cb0050009c000009310000213d0000000100600190000009310000c13d0000002402200039000000400050043f0000000d050000290000000005150436000c00000005001d0000000002210019000000000032004b000011460000213d000000200240003900000000090d034f00000000032d034f00000633041001980000001f0510018f0000000c02400029000000b00000613d000000000603034f0000000c07000029000000006806043c0000000007870436000000000027004b000000ac0000c13d000000000005004b000000bd0000613d000000000343034f0000000304500210000000000502043300000000054501cf000000000545022f000000000303043b0000010004400089000000000343022f00000000034301cf000000000353019f00000000003204350000000c0110002900000000000104350000004401900370000000000101043b000b00000001001d000005c80010009c000011460000213d000005da03000041000000000403041a0000000301000039000905da00000045000000000013041b000a00000004001d000000000004004b000000e50000613d000005db010000410000000000100443000000000100041000000004001004430000000001000414000005810010009c0000058101008041000000c001100210000005dc011001c7000080020200003915ff15fa0000040f000000010020019000000dea0000613d000000020200008a0000000a0220017f000000000101043b000000020020008c00000ea40000c13d000000000001004b00000ea40000c13d0000000a0100002900000001001001900000000001000019000005da01006041000900000001001d000000800100043d000005cb0010009c000009310000213d000000000300041a000000010030019000000001023002700000007f0220618f0000001f0020008c00000000040000390000000104002039000000000343013f0000000100300190000008c60000c13d000000200020008c000001030000413d0000001f031000390000000503300270000005df0330009a000000200010008c000005e003004041000000000000043f0000001f022000390000000502200270000005df0220009a000000000023004b000001030000813d000000000003041b0000000103300039000000000023004b000000ff0000413d0000001f0010008c00000efa0000a13d0000063303100198000000000000043f00000ff30000c13d000000a004000039000005e002000041000010010000013d000005b90010009c0000014a0000213d000005c10010009c000002a00000213d000005c50010009c000007dc0000613d000005c60010009c000009370000613d000005c70010009c000011460000c13d000000440030008c000011460000413d0000000001000416000000000001004b000011460000c13d0000000401d00370000000000101043b000d00000001001d000005c80010009c000011460000213d0000002401d00370000000000101043b000c00000001001d000005fc0010009c000011460000213d15ff12850000040f0000000d010000290000000c0200002915ff128f0000040f0000000001000019000016000001042e000005b20010009c0000019f0000213d000005b60010009c000004560000613d000005b70010009c000005810000613d000005b80010009c000011460000c13d000000440030008c000011460000413d0000000001000416000000000001004b000011460000c13d0000000401d00370000000000101043b000005c80010009c000011460000213d000000000010043f0000000701000039000000200010043f00000040020000390000000001000019000d0000000d035315ff15e00000040f0000000d0200035f0000002402200370000000000202043b000000000020043f000000200010043f0000000001000019000000400200003900000bfb0000013d000005ba0010009c000002ad0000213d000005be0010009c000007ec0000613d000005bf0010009c000009530000613d000005c00010009c000011460000c13d000000240030008c000011460000413d0000000001000416000000000001004b000011460000c13d15ff12310000040f00000004010000390000000201100367000000000101043b000000000010043f0000000901000039000000200010043f0000004002000039000000000100001915ff15e00000040f15ff12420000040f000000400200043d000d00000002001d15ff11700000040f0000000d01000029000005810010009c000005810100804100000040011002100000062b011001c7000016000001042e000005a00010009c000002cc0000213d000005a40010009c000008580000613d000005a50010009c00000bc90000613d000005a60010009c000011460000c13d000000240030008c000011460000413d0000000001000416000000000001004b000011460000c13d0000000401d00370000000000101043b000005cb0010009c000011460000213d0000000401100039000000000203001915ff11790000040f000d00000001001d000c00000002001d15ff12850000040f0000000d010000290000000c0200002915ff13b00000040f0000000001000019000016000001042e0000058f0010009c000003470000213d000005930010009c000008b20000613d000005940010009c00000bd20000613d000005950010009c000011460000c13d0000000001000416000000000001004b000011460000c13d0000000401000039000000000101041a000000a001100270000000800010043f000005ca01000041000016000001042e000005af0010009c0000043e0000613d000005b00010009c000004720000613d000005b10010009c000002a80000613d000011460000013d000005b30010009c000004630000613d000005b40010009c000005860000613d000005b50010009c000011460000c13d000000240030008c000011460000413d0000000001000416000000000001004b000011460000c13d0000000401d00370000000000101043b000d00000001001d000005cb0010009c000011460000213d0000000d0130006a000006100010009c000011460000213d000002040010008c000011460000413d000005e501000041000000000101041a0000000002000411000000000012004b000008ae0000c13d0000000d010000290000000402100039000000240310003900000000013d034f000000000101043b000000000001004b000c00000002001d00000c670000c13d000000200330003900000000013d034f000000000101043b000b00000001001d000000000001004b00000ca90000c13d000b00200030003d0000000b01d00360000000000101043b00000000030000310000000d0230006a000000230420008a000005e702400197000005e705100197000000000625013f000000000025004b0000000002000019000005e702004041000000000041004b0000000005000019000005e705008041000005e70060009c000000000205c019000000000002004b000011460000c13d0000000c0110002900000000021d034f000000000202043b000005cb0020009c000011460000213d00000000052300490000002001100039000005e706500197000005e707100197000000000867013f000000000067004b0000000006000019000005e706004041000000000051004b0000000005000019000005e705002041000005e70080009c000000000605c019000000000006004b000011460000c13d000000000002004b000001f50000613d15ff13400000040f00000000030000310000000d0130006a000000020d000367000000230410008a0000000b01000029000d00200010003d0000000d01d00360000000000101043b000005e702100197000005e705400197000000000652013f000000000052004b0000000002000019000005e702004041000000000041004b0000000004000019000005e704008041000005e70060009c000000000204c019000000000002004b000011460000c13d0000000c0110002900000000021d034f000000000202043b000005cb0020009c000011460000213d00000000032300490000002001100039000005e704300197000005e705100197000000000645013f000000000045004b0000000004000019000005e704004041000000000031004b0000000003000019000005e703002041000005e70060009c000000000403c019000000000004004b000011460000c13d000000000002004b0000021e0000613d15ff13b00000040f000000020d0003670000000d03000029000000800130003900000000011d034f000a00a00030003d0000000a02d00360000000000202043b000000000101043b000b00000001001d000d00000002001d00000000002101a000000e500000c13d0000000a03000029000000800130008a00000000011d034f000d0060003000920000000d02d00360000000000202043b000000000101043b000c00000001001d000b00000002001d00000000002101a000000ea80000c13d0000000d01000029000d00c00010003d0000000d01d00360000000000101043b000005c80010009c000011460000213d000000000001004b000002530000613d0000000802000039000000000302041a0000061b03300197000000000313019f000000000032041b000000400200043d0000000000120435000005810020009c000005810200804100000040012002100000000002000414000005810020009c0000058102008041000000c002200210000000000112019f000005ff011001c70000800d0200003900000001030000390000061c0400004115ff15f50000040f0000000100200190000011460000613d000000020d0003670000000d01000029000000200210003900000000012d034f000000000101043b000005c80010009c000011460000213d000000000001004b0000097d0000613d000000200220003900000000022d034f000000000202043b000005fc0020009c000011460000213d000000a003200210000000000313019f0000000404000039000000000034041b000027110020008c000010e10000413d0000061f01000041000000000010043f000005de0100004100001601000104300000059d0010009c0000079a0000613d0000059e0010009c000008d30000613d0000059f0010009c000011460000c13d000000440030008c000011460000413d0000000001000416000000000001004b000011460000c13d000005e501000041000000000101041a0000000002000411000000000012004b000008ae0000c13d0000002401d00370000000000101043b0000000402d00370000000000202043b000000800020043f000000a00010043f0000000001000414000005810010009c0000058101008041000000c001100210000005fd011001c70000800d020000390000000103000039000005fe040000410000097a0000013d0000058c0010009c000007ad0000613d0000058d0010009c000009030000613d0000058e0010009c000011460000c13d000000240030008c000011460000413d0000000401d00370000000000101043b000005c80010009c000011460000213d000005e502000041000000000202041a0000000003000411000000000023004b000008ae0000c13d000000000001004b00000cd60000c13d000005ed01000041000000000010043f000005de010000410000160100010430000005c20010009c000007f10000613d000005c30010009c0000097f0000613d000005c40010009c000011460000c13d000000240030008c000011460000413d0000000001000416000000000001004b000011460000c13d15ff11bd0000040f00000c040000013d000005bb0010009c0000080e0000613d000005bc0010009c0000098c0000613d000005bd0010009c000011460000c13d000000240030008c000011460000413d0000000001000416000000000001004b000011460000c13d15ff12580000040f00000004010000390000000201100367000000000101043b000000000010043f0000000a01000039000000200010043f0000004002000039000000000100001915ff15e00000040f15ff126b0000040f000000400200043d000d00000002001d15ff11930000040f0000000d01000029000005810010009c0000058101008041000000400110021000000620011001c7000016000001042e000005a10010009c000008b80000613d000005a20010009c00000bef0000613d000005a30010009c000011460000c13d000000840030008c000011460000413d0000000401d00370000000000101043b000d00000001001d000005c80010009c000011460000213d0000004401d00370000000000101043b000b00000001001d0000002401d00370000000000101043b000c00000001001d0000006401d00370000000000201043b000005cb0020009c000011460000213d0000002301200039000000000031004b000011460000813d000000040420003900000000014d034f000000000101043b000005cb0010009c000009310000213d0000001f0610003900000633066001970000003f066000390000063306600197000005d90060009c000009310000213d00000024022000390000008006600039000000400060043f000000800010043f0000000002210019000000000032004b000011460000213d000000200240003900000000032d034f00000633041001980000001f0510018f000000a002400039000003040000613d000000a006000039000000000703034f000000007807043c0000000006860436000000000026004b000003000000c13d000000000005004b000003110000613d000000000343034f0000000304500210000000000502043300000000054501cf000000000545022f000000000303043b0000010004400089000000000343022f00000000034301cf000000000353019f0000000000320435000000a00110003900000000000104350000000c01000029000000000010043f0000000901000039000000200010043f0000000001000414000005810010009c0000058101008041000000c001100210000005ce011001c7000080100200003915ff15fa0000040f0000000100200190000011460000613d000000400200043d000006010020009c000009310000213d000000000101043b0000006003200039000000400030043f000000000301041a000a00000003001d00000000043204360000000103100039000000000303041a000900000004001d000000000034043500000040022000390000000201100039000000000101041a000800000002001d0000000000120435000005f30100004100000000001004430000000001000414000005810010009c0000058101008041000000c001100210000005f4011001c70000800b0200003915ff15fa0000040f000000010020019000000dea0000613d000000000101043b0000000a0010006c000003440000413d00000009020000290000000002020433000000000021004b00000e0e0000a13d000000400100043d000006040200004100000c920000013d000005900010009c000008cc0000613d000005910010009c00000c000000613d000005920010009c000011460000c13d000000440030008c000011460000413d0000000001000416000000000001004b000011460000c13d0000000401d00370000000000101043b000005c80010009c000011460000213d0000002402d00370000000000202043b000005c80020009c000011460000213d000005ee0020009c00000c2f0000c13d0000000101000039000000800200003900000c420000013d000005ab0010009c000003af0000613d000005ac0010009c000011460000c13d000000240030008c000011460000413d0000000001000416000000000001004b000011460000c13d0000000401d00370000000000101043b000000000010043f0000000501000039000000200010043f0000004002000039000000000100001915ff15e00000040f000000000101041a000007a90000013d000005990010009c000005e80000613d0000059a0010009c000011460000c13d000000240030008c000011460000413d0000000001000416000000000001004b000011460000c13d0000000401d00370000000000101043b000000000010043f0000000501000039000000200010043f0000004002000039000000000100001915ff15e00000040f000000000101041a0000004001100270000007a90000013d000005880010009c000006380000613d000005890010009c000011460000c13d000000240030008c000011460000413d0000000001000416000000000001004b000011460000c13d0000000401d00370000000000101043b000005c80010009c000011460000213d000005c9020000410000000c0020043f000000000010043f0000000c01000039000000200200003900000bfb0000013d000005e501000041000000000101041a0000000005000411000000000015004b000008ae0000c13d0000000001000414000005810010009c0000058101008041000000c001100210000005d7011001c70000800d020000390000000303000039000005e804000041000000000600001915ff15f50000040f0000000100200190000011460000613d000005e701000041000005e502000041000000000012041b0000000001000019000016000001042e000000a40030008c000011460000413d0000000401d00370000000000101043b000d00000001001d000005c80010009c000011460000213d0000004401d00370000000000101043b000b00000001001d0000002401d00370000000000101043b000c00000001001d0000006401d00370000000000101043b000005cb0010009c000011460000213d0000002302100039000000000032004b000011460000813d000000040210003900000000022d034f000000000202043b000a00000002001d000005cb0020009c000011460000213d00000024011000390000000a020000290000000502200210000700000001001d000900000002001d000800000012001d000000080030006b000011460000213d0000008401d00370000000000201043b000005cb0020009c000011460000213d0000002301200039000000000031004b000011460000813d000000040420003900000000014d034f000000000101043b000005cb0010009c000009310000213d0000001f0610003900000633066001970000003f066000390000063306600197000005d90060009c000009310000213d00000024022000390000008006600039000000400060043f000000800010043f0000000002210019000000000032004b000011460000213d000000200240003900000000032d034f00000633041001980000001f0510018f000000a002400039000003f60000613d000000a006000039000000000703034f000000007807043c0000000006860436000000000026004b000003f20000c13d000000000005004b000004030000613d000000000343034f0000000304500210000000000502043300000000054501cf000000000545022f000000000303043b0000010004400089000000000343022f00000000034301cf000000000353019f0000000000320435000000a00110003900000000000104350000000c01000029000000000010043f0000000a01000039000000200010043f0000000001000414000005810010009c0000058101008041000000c001100210000005ce011001c7000080100200003915ff15fa0000040f0000000100200190000011460000613d000000400200043d000005d90020009c000009310000213d000000000101043b0000008003200039000000400030043f000000000301041a000600000003001d00000000043204360000000103100039000000000303041a000500000004001d00000000003404350000000203100039000000000303041a0000004004200039000300000004001d000000000034043500000060022000390000000301100039000000000101041a000400000002001d0000000000120435000005f30100004100000000001004430000000001000414000005810010009c0000058101008041000000c001100210000005f4011001c70000800b0200003915ff15fa0000040f000000010020019000000dea0000613d000000000101043b000000060010006c0000043b0000413d00000005020000290000000002020433000000000021004b00000f050000a13d000000400100043d0000060d0200004100000c920000013d000005c9010000410000000c0010043f0000000001000411000000000010043f0000000001000414000005810010009c0000058101008041000000c001100210000005f2011001c7000080100200003915ff15fa0000040f0000000100200190000011460000613d000000000101043b000000000001041b0000000001000414000005810010009c0000058101008041000000c001100210000005d7011001c70000800d0200003900000002030000390000060f04000041000009790000013d0000000001000416000000000001004b000011460000c13d000000000103001915ff11640000040f000d00000001001d000c00000002001d15ff12850000040f0000000d010000290000000c0200002915ff12e30000040f0000000001000019000016000001042e000000240030008c000011460000413d0000000001000416000000000001004b000011460000c13d0000000401d00370000000000101043b000d00000001001d000005c80010009c000011460000213d15ff12850000040f0000000d0100002915ff13260000040f0000000001000019000016000001042e000000240030008c000011460000413d0000000001000416000000000001004b000011460000c13d0000000401d00370000000000101043b000005cb0010009c000011460000213d0000000401100039000000000203001915ff11790000040f000d00000001001d000c00000002001d15ff12850000040f0000000d010000290000000c0200002915ff13400000040f0000000001000019000016000001042e000000240030008c000011460000413d0000000001000416000000000001004b000011460000c13d0000000401d00370000000000101043b000c00000001001d000001e001000039000000400010043f000000800000043f000000a00000043f000000c00000043f0000006001000039000000e00010043f000001000010043f15ff12310000040f000001200010043f15ff12580000040f000001400010043f000001600000043f000001800000043f000001a00000043f000001c00000043f0000000c01000029000000000010043f0000000501000039000000200010043f0000004002000039000000000100001915ff15e00000040f000000000101041a000a00000001001d0000000601000039000000200010043f0000000001000019000000400200003915ff15e00000040f000000000101041a000800000001001d0000000a01000039000000200010043f0000000001000019000000400200003915ff15e00000040f0000000902000039000000200020043f000b00000001001d0000000001000019000000400200003915ff15e00000040f0000000802000039000000000202041a000700000002001d0000000402000039000000000202041a000900000002001d0000000b02000039000000000202041a000200000002001d000100000001001d000000400100043d000d00000001001d15ff11a00000040f0000000d030000290000004001300039000600000001001d000000080200002900000000002104350000000a01000029000005cb011001970000002002300039000400000002001d00000000001204350000000c01000029000000000013043515ff11bd0000040f0000000d020000290000006002200039000300000002001d000000000012043515ff11f70000040f0000000d020000290000008002200039000500000002001d0000000000120435000000010100002915ff12420000040f0000000d02000029000000a002200039000800000002001d00000000001204350000000b0100002915ff126b0000040f0000000d040000290000014002400039000b00000002001d000000020300002900000000003204350000000905000029000000a0025002700000012003400039000a00000003001d0000000000230435000005c8025001970000010003400039000900000003001d00000000002304350000000702000029000005c802200197000000e003400039000700000003001d0000000000230435000000c002400039000200000002001d00000000001204350000002001000039000000400500043d000c00000005001d0000000001150436000000000204043300000000002104350000000401000029000000000101043300000040025000390000000000120435000000060100002900000000010104330000006002500039000000000012043500000003010000290000000001010433000002000200003900000080035000390000000000230435000002200250003915ff11520000040f00000000020100190000000c040000290000000001410049000000200310008a00000005010000290000000001010433000000a004400039000000000034043515ff11520000040f00000008020000290000000003020433000d00000001001d0000000c01000029000000c002100039000000000103001915ff11700000040f000000020100002900000000010104330000000c02000029000001200220003915ff11930000040f00000007010000290000000001010433000005c8011001970000000c03000029000001a002300039000000000012043500000009010000290000000001010433000005c801100197000001c00230003900000000001204350000000a010000290000000001010433000005fc01100197000001e00230003900000000001204350000000b010000290000000001010433000002000230003900000000001204350000000d01300069000005810030009c00000581030080410000004002300210000005810010009c00000581010080410000006001100210000000000121019f000016000001042e000000640030008c000011460000413d0000000001000416000000000001004b000011460000c13d0000000401d00370000000000101043b000d00000001001d000005c80010009c000011460000213d0000004401d00370000000000101043b000c00000001001d0000002401d00370000000000101043b000b00000001001d000000000010043f0000000501000039000000200010043f0000000001000414000005810010009c0000058101008041000000c001100210000005ce011001c7000080100200003915ff15fa0000040f0000000100200190000011460000613d0000000c020000290000004002200210000000000101043b000000000301041a0000000002230049000005cf02200197000005d003300197000000000232019f000000000021041b0000000d010000290000006001100210000005d2021001c7000000200020043f0000000003000411000000600230021200000c1b0000613d000000000012004b00000c1b0000613d000000000030043f0000000001000414000005810010009c0000058101008041000000c001100210000005d3011001c7000080100200003915ff15fa0000040f0000000100200190000011460000613d000000000101043b000000000101041a000000000001004b00000c1b0000c13d0000062801000041000000000010043f000005de0100004100001601000104300000000001000416000000000001004b000011460000c13d000000080100003900000bcd0000013d000000440030008c000011460000413d0000000001000416000000000001004b000011460000c13d0000000401d00370000000000201043b000005cb0020009c000011460000213d0000002301200039000000000031004b000011460000813d000c00040020003d0000000c01d00360000000000101043b000005cb0010009c000011460000213d000000050410021000000000024200190000002402200039000000000032004b000011460000213d0000002402d00370000000000402043b000005cb0040009c000011460000213d0000002302400039000000000032004b000011460000813d000b00040040003d0000000b02d00360000000000202043b000005cb0020009c000011460000213d000000050520021000000000045400190000002404400039000000000034004b000011460000213d000000000012004b00000d030000c13d0000000003050019000000800020043f000000a001500039000000400010043f000000000002004b000005d10000613d000d00000003001d0000000c013000290000000201100367000000000101043b0000006001100210000005d2011001c7000000200010043f0000000b013000290000000201100367000000000101043b000000000010043f0000000001000414000005810010009c0000058101008041000000c001100210000005ce011001c7000080100200003915ff15fa0000040f0000000100200190000011460000613d000000000101043b000000000101041a0000000d0300002900000080023000390000000000120435000000200330008c000005b50000c13d000000400100043d00000020020000390000000002210436000000800300043d00000000003204350000004002100039000000000003004b000005df0000613d000000a0040000390000000005000019000000004604043400000000026204360000000105500039000000000035004b000005da0000413d0000000002120049000005810020009c00000581020080410000006002200210000005810010009c00000581010080410000004001100210000000000112019f000016000001042e000000840030008c000011460000413d0000000001000416000000000001004b000011460000c13d0000000401d00370000000000301043b000005e501000041000000000101041a0000000002000411000000000012004b000008ae0000c13d0000004401d00370000000000201043b0000002401d00370000000000101043b000000000021004b00000c090000813d000c00000001001d000b00000002001d000d00000003001d000000000030043f0000000a01000039000000200010043f0000000001000414000005810010009c0000058101008041000000c001100210000005ce011001c7000080100200003915ff15fa0000040f0000000100200190000011460000613d000000000101043b000000000201041a000000000002004b00000c810000c13d0000000d01000029000000000010043f0000000901000039000000200010043f0000000001000414000005810010009c0000058101008041000000c001100210000005ce011001c7000080100200003915ff15fa0000040f0000000100200190000011460000613d000000000101043b0000000c05000029000000000051041b00000001021000390000000b04000029000000000042041b00000064020000390000000202200367000000000202043b0000000201100039000000000021041b000000400100043d00000040031000390000000000230435000000200210003900000000004204350000000000510435000005810010009c000005810100804100000040011002100000000002000414000005810020009c0000058102008041000000c002200210000000000112019f000005fa011001c70000800d020000390000000103000039000005fb04000041000002880000013d000000640030008c000011460000413d0000000001000416000000000001004b000011460000c13d0000000401d00370000000000101043b000600000001001d000005c80010009c000011460000213d0000002401d00370000000000101043b000005cb0010009c000011460000213d0000002302100039000000000032004b000011460000813d000000040210003900000000022d034f000000000202043b000b00000002001d000005cb0020009c000011460000213d00000024011000390000000b020000290000000502200210000a00000001001d000500000002001d000400000012001d000000040030006b000011460000213d0000004401d00370000000000101043b000005cb0010009c000011460000213d0000002302100039000000000032004b000011460000813d000300040010003d0000000302d00360000000000202043b000900000002001d000005cb0020009c000011460000213d000000240110003900000009020000290000000502200210000800000001001d000200000002001d000100000012001d000000010030006b000011460000213d000700000004001d0000000b0000006b000006990000613d0000000004000019000000090040006c00000008020000290000000a0300002900000e080000813d000d00000004001d00000005014002100000000002210019000000000131001900000002011003670000000202200367000000000202043b000c00000002001d000000000101043b000000000010043f0000000501000039000000200010043f0000000001000414000005810010009c0000058101008041000000c001100210000005ce011001c7000080100200003915ff15fa0000040f0000000100200190000011460000613d0000000c020000290000004002200210000000000101043b000000000301041a0000000002230049000005cf02200197000005d003300197000000000232019f000000000021041b0000000d0400002900000001044000390000000b0040006c000006700000413d000000400100043d000700000001001d000000000300003100000005010000290000003f01100039000005d1011001970000000701100029000000070010006c00000000020000390000000102004039000005cb0010009c000009310000213d0000000100200190000009310000c13d000000400010043f00000007010000290000000b020000290000000000210435000000040030006b000011460000213d0000000b0000006b0000000a050000290000000406000029000006b70000613d00000002010003670000000702000029000000000451034f000000000404043b000000200220003900000000004204350000002005500039000000000065004b000006b00000413d00000002010000290000003f01100039000005d101100197000000400200043d0000000001120019000b00000002001d000000000021004b00000000020000390000000102004039000005cb0010009c000009310000213d0000000100200190000009310000c13d000000400010043f0000000b0100002900000009020000290000000000210435000000010030006b000011460000213d000000090000006b0000000001000019000006db0000613d0000000301000029000000200110003900000002011003670000000b02000029000000080400002900000001050000290000002002200039000000001301043c00000000003204350000002004400039000000000054004b000006d30000413d0000000b01000029000000000101043300000007020000290000000002020433000000000012004b00000d030000c13d00000006010000290000006001100210000005d2021001c7000000200020043f00000000020004110000006002200212000006f70000613d000000000012004b000006f70000613d0000000001000411000000000010043f0000000001000414000005810010009c0000058101008041000000c001100210000005d3011001c7000080100200003915ff15fa0000040f0000000100200190000011460000613d000000000101043b000000000101041a000000000001004b0000057d0000613d000000070300002900000000010304330000000504100212000007140000613d0000000001340019000c00000004001d0000000b024000290000000002020433000d00000002001d0000000001010433000000000010043f0000000001000414000005810010009c0000058101008041000000c001100210000005ce011001c7000080100200003915ff15fa0000040f00000007030000290000000100200190000011460000613d000000000101043b000000000201041a0000000d0220006c00000c2b0000413d000000000021041b0000000c04000029000000200440008c000006fb0000c13d000000400200043d000d00000002001d00000040010000390000000001120436000c00000001001d000005810030009c000005810100004100000000010340190000004001100210000000000203043300000005022002100000002002200039000a00000002001d000005810020009c00000581020080410000006002200210000000000112019f0000000002000414000005810020009c0000058102008041000000c002200210000000000121019f000000040200003915ff15fa0000040f000000600210027000000581022001970000000a0020006c0000000a0300002900000000030240190000001f0430018f00000000050300190000000d030000290000004006300039000005d40550019800000000035600190000073d0000613d000000000701034f000000007807043c0000000006860436000000000036004b000007390000c13d000000000004004b0000074a0000613d000000000551034f0000000304400210000000000603043300000000064601cf000000000646022f000000000505043b0000010004400089000000000545022f00000000044501cf000000000464019f00000000004304350003000000010355000100000002001f0000004002200039000a00000002001d0000000c0100002900000000002104350000000b02000029000005810020009c000005810100004100000000010240190000004001100210000000000202043300000005022002100000002002200039000c00000002001d000005810020009c00000581020080410000006002200210000000000112019f0000000002000414000005810020009c0000058102008041000000c002200210000000000121019f000000040200003915ff15fa0000040f0000000a0300002900000000090300190000000d04300029000000600210027000000581022001970000000c0020006c0000000c0300002900000000030240190000001f0530018f000005d4063001980000000003640019000007750000613d000000000701034f000000007807043c0000000004840436000000000034004b000007710000c13d000000000005004b000007820000613d000000000461034f0000000305500210000000000603043300000000065601cf000000000656022f000000000404043b0000010005500089000000000454022f00000000045401cf000000000464019f00000000004304350003000000010355000100000002001f00000000012900190000006002100210000005d50010009c000005d6020080410000000d01000029000005810010009c000005810100804100000040011002100000000003000414000005810030009c0000058103008041000000c003300210000000000131019f000000000121019f000005d7011001c70000000602000029000005c8062001970000800d020000390000000403000039000005d804000041000000000500041100000ca40000013d000000240030008c000011460000413d0000000001000416000000000001004b000011460000c13d0000000401d00370000000000101043b000000000010043f0000000501000039000000200010043f0000004002000039000000000100001915ff15e00000040f000000000101041a0000008001100270000005cb01100197000000800010043f000005ca01000041000016000001042e000000240030008c000011460000413d0000000401d00370000000000101043b000d00000001001d000005c80010009c000011460000213d000005e501000041000000000101041a0000000002000411000000000012004b000008ae0000c13d000005c9010000410000000c0010043f0000000d01000029000000000010043f0000000001000414000005810010009c0000058101008041000000c001100210000005f2011001c7000080100200003915ff15fa0000040f0000000100200190000011460000613d000000000101043b000b00000001001d000000000101041a000c00000001001d000005f30100004100000000001004430000000001000414000005810010009c0000058101008041000000c001100210000005f4011001c70000800b0200003915ff15fa0000040f000000010020019000000dea0000613d000000000101043b0000000c0010006c00000cd30000a13d000005f501000041000000000010043f000005de010000410000160100010430000000440030008c000011460000413d0000000001000416000000000001004b000011460000c13d0000000401d00370000000000101043b000005c80010009c000011460000213d000005d202000041000000200020043f000000140010043f0000002401d00370000000000101043b000000000010043f00000bf90000013d0000000001000416000000000001004b000011460000c13d0000000b0100003900000bfc0000013d0000000001000416000000000001004b000011460000c13d000000000200041a000000010320019000000001012002700000007f0110618f0000001f0010008c00000000040000390000000104002039000000000043004b000008c60000c13d000000800010043f000000000003004b00000c150000613d000000000000043f000000000001004b00000c130000613d000005e00200004100000000040000190000000003040019000000000402041a000000a005300039000000000045043500000001022000390000002004300039000000000014004b000008050000413d00000c530000013d000000440030008c000011460000413d0000000001000416000000000001004b000011460000c13d0000002401d00370000000000101043b000d00000001001d0000000401d00370000000000101043b000000000010043f0000061d01000041000000200010043f0000000001000414000005810010009c0000058101008041000000c001100210000005ce011001c7000080100200003915ff15fa0000040f0000000100200190000011460000613d000000000101043b000000000201041a000005fc0020009c0000082a0000213d0000061d01000041000000000201041a000005fc012001980000000003000019000000010300c08a000000000313c0d90000000d0030006b0000000003000019000000000301201900000001040000310000000005430019000000000045004b000011460000213d00000633053001980000001f0630018f000000030740036700000000035400190000083f0000613d000000000807034f000000008908043c0000000004940436000000000034004b0000083b0000c13d0000006002200270000000000006004b0000084d0000613d000000000457034f0000000305600210000000000603043300000000065601cf000000000656022f000000000404043b0000010005500089000000000454022f00000000045401cf000000000464019f00000000004304350000000d011000b9000027100110011a000000400300043d000000200430003900000000001404350000000000230435000005810030009c000005810300804100000040013002100000062a011001c7000016000001042e000000a40030008c000011460000413d0000000001000416000000000001004b000011460000c13d0000000401d00370000000000301043b000005e501000041000000000101041a0000000002000411000000000012004b000008ae0000c13d0000004401d00370000000000201043b0000002401d00370000000000101043b000000000021004b00000c090000813d000b00000001001d000d00000002001d000c00000003001d000000000030043f0000000901000039000000200010043f0000000001000414000005810010009c0000058101008041000000c001100210000005ce011001c7000080100200003915ff15fa0000040f0000000100200190000011460000613d000000000101043b000000000201041a000000000002004b00000c8a0000c13d0000000c01000029000000000010043f0000000a01000039000000200010043f0000000001000414000005810010009c0000058101008041000000c001100210000005ce011001c7000080100200003915ff15fa0000040f0000000100200190000011460000613d000000000101043b0000000b06000029000000000061041b00000001021000390000000d05000029000000000052041b00000002020003670000006403200370000000000303043b0000000204100039000000000034041b00000003011000390000008402200370000000000202043b000000000021041b000000400100043d0000006004100039000000000024043500000040021000390000000000320435000000200210003900000000005204350000000000610435000005810010009c000005810100804100000040011002100000000002000414000005810020009c0000058102008041000000c002200210000000000112019f00000608011001c70000800d0200003900000001030000390000060904000041000002880000013d0000061101000041000000000010043f000005de0100004100001601000104300000000001000416000000000001004b000011460000c13d000000800000043f000005ca01000041000016000001042e0000000001000416000000000001004b000011460000c13d0000000103000039000000000203041a000000010420019000000001012002700000007f0110618f0000001f0010008c00000000050000390000000105002039000000000552013f000000010050019000000c0d0000613d000005cc01000041000000000010043f0000002201000039000000040010043f000005cd0100004100001601000104300000000001000416000000000001004b000011460000c13d0000271001000039000000800010043f000005ca01000041000016000001042e000000440030008c000011460000413d0000000001000416000000000001004b000011460000c13d0000000401d00370000000000101043b000d00000001001d000005c80010009c000011460000213d0000002401d00370000000000201043b000000000002004b0000000001000039000000010100c039000c00000002001d000000000012004b000011460000c13d000005d201000041000000200010043f0000000001000411000000140010043f0000000d01000029000000000010043f0000000001000414000005810010009c0000058101008041000000c001100210000005d3011001c7000080100200003915ff15fa0000040f0000000100200190000011460000613d000000000101043b0000000c02000029000000000021041b000000000020043f0000000001000414000005810010009c0000058101008041000000c001100210000005ff011001c70000800d020000390000000303000039000006000400004100000000050004110000000d060000290000097a0000013d000000a40030008c000011460000413d0000000001000416000000000001004b000011460000c13d0000000401d00370000000000101043b000d00000001001d000005c80010009c000011460000213d0000002401d00370000000000101043b000c00000001001d000005c80010009c000011460000213d0000006401d00370000000000101043b000a00000001001d0000004401d00370000000000101043b000b00000001001d0000008401d00370000000000201043b000005cb0020009c000011460000213d0000002301200039000000000031004b000011460000813d000000040420003900000000014d034f000000000101043b000005cb0010009c000011460000213d00000000021200190000002402200039000000000032004b000011460000213d0000001f0210003900000633022001970000003f0220003900000633052001970000000002000411000005ee0020009c0000000002006019000005d90050009c00000cdf0000a13d000005cc01000041000000000010043f0000004101000039000000040010043f000005cd010000410000160100010430000000240030008c000011460000413d0000000001000416000000000001004b000011460000c13d0000000401d00370000000000201043b0000062e00200198000011460000c13d00000001010000390000062f0020009c0000094f0000613d000006300020009c0000094f0000613d000006310020009c0000094f0000613d000000e002200270000006320020009c00000000010000390000000101006039000005c60020009c00000001011061bf000005c40020009c00000001011061bf000000010110018f000000800010043f000005ca01000041000016000001042e000005c9010000410000000c0010043f0000000001000411000000000010043f000005f30100004100000000001004430000000001000414000005810010009c0000058101008041000000c001100210000005f4011001c70000800b0200003915ff15fa0000040f000000010020019000000dea0000613d000000000101043b000d00000001001d0000000001000414000005810010009c0000058101008041000000c001100210000005f2011001c7000080100200003915ff15fa0000040f0000000100200190000011460000613d000000000101043b0000000d020000290000062c0220009a000000000021041b0000000001000414000005810010009c0000058101008041000000c001100210000005d7011001c70000800d0200003900000002030000390000062d04000041000000000500041115ff15f50000040f0000000100200190000011460000613d0000000001000019000016000001042e0000000001000416000000000001004b000011460000c13d000000000103001915ff11640000040f000d00000001001d000c00000002001d15ff12850000040f0000000d010000290000000c0200002915ff12ba0000040f0000000001000019000016000001042e000000a40030008c000011460000413d0000000001000416000000000001004b000011460000c13d0000000401d00370000000000101043b000800000001001d000005c80010009c000011460000213d0000002401d00370000000000101043b000700000001001d000005c80010009c000011460000213d0000004401d00370000000000101043b000005cb0010009c000011460000213d0000002302100039000000000032004b000011460000813d000000040210003900000000022d034f000000000a02043b000005cb00a0009c000011460000213d0000002408100039000000050ca0021000000000098c0019000000000039004b000011460000213d0000006401d00370000000000101043b000005cb0010009c000011460000213d0000002302100039000000000032004b000011460000813d000000040210003900000000022d034f000000000702043b000005cb0070009c000011460000213d0000002405100039000000050b70021000000000065b0019000000000036004b000011460000213d0000008401d00370000000000101043b000005cb0010009c000011460000213d0000002302100039000000000032004b000011460000813d000000040410003900000000024d034f000000000202043b000005cb0020009c000011460000213d00000000012100190000002401100039000000000031004b000011460000213d0000000001000411000005ee0010009c00000000010060190000003f03c00039000005d103300197000005d90030009c000009310000213d0000008003300039000b00000003001d000000400030043f0000008000a0043f00000000000a004b000009e50000613d0000008003000039000000000c0d034f000000000a8c034f000000000a0a043b00000020033000390000000000a304350000002008800039000000000098004b000009dc0000413d000000400300043d000b00000003001d0000003f03b00039000005d1033001970000000b033000290000000b0030006c00000000080000390000000108004039000005cb0030009c000009310000213d0000000100800190000009310000c13d000000400030043f0000000b030000290000000000730435000000000007004b000009fc0000613d0000000b0300002900000000075d034f000000000707043b000000200330003900000000007304350000002005500039000000000065004b000009f50000413d0000001f0320003900000633033001970000003f033000390000063303300197000000400500043d0000000003350019000600000005001d000000000053004b00000000050000390000000105004039000005cb0030009c000009310000213d0000000100500190000009310000c13d000000400030043f000000200340003900000000053d034f0000000603000029000000000323043600000633062001980000001f0720018f000000000463001900000a190000613d000000000805034f0000000009030019000000008a08043c0000000009a90436000000000049004b00000a150000c13d000000000007004b00000a260000613d000000000565034f0000000306700210000000000704043300000000076701cf000000000767022f000000000505043b0000010006600089000000000565022f00000000056501cf000000000575019f0000000000540435000000000223001900000000000204350000000b020000290000000002020433000000800300043d000000000023004b00000d030000c13d0000000703000029000d00600030021a00000cff0000613d00000008030000290000006003300210000005d2043001c7000a00000004001d000000200040043f000000600410021200000a480000613d000000000034004b00000a480000613d000000000010043f0000000001000414000005810010009c0000058101008041000000c001100210000005d3011001c7000080100200003915ff15fa0000040f0000000100200190000011460000613d000000000101043b000000000101041a000000000001004b0000057d0000613d000000800200043d0000000502200212000010b20000c13d000000400200043d000d00000002001d00000040010000390000000001120436000900000001001d000000800100043d0000000002000414000005810020009c0000058102008041000000c00220021000000005011002100000002001100039000c00000001001d000005810010009c00000581010080410000006001100210000000000121019f00000624011001c7000000040200003915ff15fa0000040f000000600210027000000581022001970000000c0020006c00000000080200190000000c0400002900000000040240190000001f0340018f0000000d02000029000c00400020003d000005d4044001980000000c0240002900000a700000613d000000000501034f0000000c06000029000000005705043c0000000006760436000000000026004b00000a6c0000c13d000000000003004b00000a7d0000613d000000000441034f0000000303300210000000000502043300000000053501cf000000000535022f000000000404043b0000010003300089000000000434022f00000000033401cf000000000353019f00000000003204350003000000010355000500000008001d000100000008001f0000004001800039000a00000001001d000000090200002900000000001204350000000b0300002900000000010304330000000002000414000005810020009c0000058102008041000000c00220021000000005011002100000002001100039000900000001001d000005810010009c00000581010080410000006001100210000000000121019f000005810030009c00000581020000410000000002034019000400400020021800000004011001af000000040200003915ff15fa0000040f00000005030000290000000c0430002900000060021002700000058102200197000000090020006c000000090300002900000000030240190000001f0530018f000005d406300198000000000364001900000aa80000613d000000000701034f000000007807043c0000000004840436000000000034004b00000aa40000c13d000000000005004b00000ab50000613d000000000461034f0000000305500210000000000603043300000000065601cf000000000656022f000000000404043b0000010005500089000000000454022f00000000045401cf000000000464019f00000000004304350003000000010355000100000002001f0000000a01200029000005810010009c000005810100804100000060011002100000000d02000029000005810020009c00000581020080410000004002200210000000000121019f0000000002000414000005810020009c0000058102008041000000c002200210000000000121019f000005d7011001c70000000802000029000005c8062001970000000702000029000005c8072001970000800d020000390000000403000039000005d8040000410000000005000411000c00000006001d15ff15f50000040f0000000100200190000011460000613d000005db010000410000000000100443000000070100002900000004001004430000000001000414000005810010009c0000058101008041000000c001100210000005dc011001c7000080020200003915ff15fa0000040f000000010020019000000dea0000613d000000000101043b000000000001004b0000097d0000613d000000400300043d000d00000003001d0000006001300039000000a002000039000000000021043500000040013000390000000c02000029000000000021043500000020013000390000000002000411000000000021043500000625010000410000000000130435000000800100043d0000000002000414000005810020009c0000058102008041000000c00220021000000005011002100000002001100039000a00000001001d000005810010009c00000581010080410000006001100210000000000121019f00000624011001c7000000040200003915ff15fa0000040f000000600210027000000581022001970000000a0020006c00000000080200190000000a0400002900000000040240190000001f0340018f0000000d02000029000000c005200039000005d404400198000000000245001900000b0f0000613d000000000601034f000000006706043c0000000005750436000000000025004b00000b0b0000c13d000000000003004b00000b1c0000613d000000000441034f0000000303300210000000000502043300000000053501cf000000000535022f000000000404043b0000010003300089000000000434022f00000000033401cf000000000353019f00000000003204350003000000010355000c00000008001d000100000008001f000000a0028000390000000d010000290000008001100039000a00000002001d00000000002104350000000b0100002900000000010104330000000002000414000005810020009c0000058102008041000000c00220021000000005011002100000002001100039000900000001001d000005810010009c00000581010080410000006001100210000000000121019f00000004011001af000000040200003915ff15fa0000040f0000000d030000290000000c0430002900000060021002700000058102200197000000090020006c0000000008020019000000090500002900000000050240190000001f0350018f0000000002050019000c00000004001d000000c005400039000005d404200198000000000245001900000b480000613d000000000601034f000000006706043c0000000005750436000000000025004b00000b440000c13d000000000003004b00000b550000613d000000000441034f0000000303300210000000000502043300000000053501cf000000000535022f000000000404043b0000010003300089000000000434022f00000000033401cf000000000353019f00000000003204350003000000010355000b00000008001d000100000008001f0000000a018000290000000d02000029000000a00220003900000000001204350000000602000029000005810020009c00000581010000410000000001024019000000400110021000000000020204330000002002200039000a00000002001d000005810020009c00000581020080410000006002200210000000000112019f0000000002000414000005810020009c0000058102008041000000c002200210000000000121019f000000040200003915ff15fa0000040f0000000b030000290000000c02300029000000600310027000000581033001970000000a0030006c0000000a0400002900000000040340190000001f0540018f000000c007200039000005d406400198000000000467001900000b800000613d000000000801034f000000008908043c0000000007970436000000000047004b00000b7c0000c13d000000000005004b00000b8d0000613d000000000661034f0000000305500210000000000704043300000000075701cf000000000757022f000000000606043b0000010005500089000000000656022f00000000055601cf000000000575019f00000000005404350000000d0400002900000000024200490000000002320019000100000003001f0003000000010355000000a401200039000005810010009c000005810100804100000060011002100000001c02400039000005810020009c00000581020080410000004002200210000000000121019f0000000002000414000005810020009c0000058102008041000000c002200210000000000121019f000000070200002915ff15f50000040f00000060031002700000058103300197000000200030008c000000200400003900000000040340190000001f0540018f00000020064001900000000d0460002900000bb10000613d000000000701034f0000000d08000029000000007907043c0000000008980436000000000048004b00000bad0000c13d000000000005004b00000bbe0000613d000000000661034f0000000305500210000000000704043300000000075701cf000000000757022f000000000606043b0000010005500089000000000656022f00000000055601cf000000000575019f00000000005404350003000000010355000100000003001f000000000003004b00000001022061bf0000000100200190000010f90000613d0000000d010000290000000001010433000006260010009c0000097d0000613d00000de60000013d0000000001000416000000000001004b000011460000c13d000005e501000041000000000101041a000005c801100197000000800010043f000005ca01000041000016000001042e0000000001000416000000000001004b000011460000c13d0000001901000039000000800010043f000005f701000041000000a00010043f0000010001000039000000400010043f0000000501000039000000c00010043f000005f801000041000000e00010043f0000004001000039000001000010043f0000008001000039000001400200003915ff11520000040f0000000002010019000001000110008a000001200010043f000000c00100003915ff11520000040f000001000110008a000005810010009c00000581010080410000006001100210000005f9011001c7000016000001042e000000240030008c000011460000413d0000000001000416000000000001004b000011460000c13d0000000401d00370000000000101043b000000000010043f0000000601000039000000200010043f0000004002000039000000000100001915ff15e00000040f000000000101041a000000800010043f000005ca01000041000016000001042e0000000001000416000000000001004b000011460000c13d15ff11f70000040f0000002002000039000000400300043d000d00000003001d000000000223043600000c5c0000013d0000060601000041000000800010043f00000607010000410000160100010430000000800010043f000000000004004b00000c150000613d000000000030043f000000000001004b00000c490000c13d000000a00100003900000c540000013d0000063402200197000000a00020043f000000000001004b000000c001000039000000a00100603900000c540000013d0000000b01000029000000000010043f0000000001000414000005810010009c0000058101008041000000c001100210000005ce011001c7000080100200003915ff15fa0000040f0000000100200190000011460000613d000000000101043b000000000201041a0000000c03000029000000000232004b00000c980000813d0000062301000041000000000010043f000005de010000410000160100010430000005d203000041000000200030043f000000140010043f000000000020043f0000000001000414000005810010009c0000058101008041000000c001100210000005d3011001c7000080100200003915ff15fa0000040f0000000100200190000011460000613d000000400200043d000000000101043b000000000101041a000000000001004b0000000001000039000000010100c039000000010110018f0000000000120435000005810020009c00000581020080410000004001200210000005f6011001c7000016000001042e000005e30200004100000000040000190000000003040019000000000402041a000000a005300039000000000045043500000001022000390000002004300039000000000014004b00000c4b0000413d000000c001300039000000800210008a000000800100003915ff11ab0000040f0000002001000039000000400200043d000d00000002001d0000000002120436000000800100003915ff11520000040f0000000d020000290000000001210049000005810010009c00000581010080410000006001100210000005810020009c00000581020080410000004002200210000000000121019f000016000001042e000b00000001001d000900000003001d00000000012d034f000000000101043b000a00000001001d000000000010043f0000000501000039000000200010043f0000000001000414000005810010009c0000058101008041000000c001100210000005ce011001c7000080100200003915ff15fa0000040f0000000100200190000011460000613d000000400200043d000000000301043b000000000403041a000005cb0140019800000cd90000613d0000000b0010006c00000cd90000813d000006170100004100000d0b0000013d0000000101100039000000000101041a000000000001004b0000060d0000613d0000000c0010006b0000060d0000213d000000400100043d0000061a0200004100000c920000013d0000000d0020006b0000087d0000413d0000000101100039000000000101041a000000000001004b0000087d0000613d000000400100043d00000619020000410000000000210435000005810010009c0000058101008041000000400110021000000605011001c70000160100010430000000000021041b000000200030043f0000000001000414000005810010009c0000058101008041000000c001100210000005ce011001c70000800d020000390000000403000039000005ec0400004100000000050004110000000d06000029000000000700001915ff15f50000040f0000000100200190000011460000613d0000097d0000013d000900000003001d00000000012d034f000000000101043b000a00000001001d000000000010043f0000000601000039000000200010043f0000000001000414000005810010009c0000058101008041000000c001100210000005ce011001c7000080100200003915ff15fa0000040f0000000100200190000011460000613d000000000101043b0000000b03000029000000000031041b000000400100043d000000200210003900000000003204350000000a020000290000000000210435000005810010009c000005810100804100000040011002100000000002000414000005810020009c0000058102008041000000c002200210000000000112019f000005ce011001c70000800d020000390000000103000039000006180400004115ff15f50000040f0000000100200190000011460000613d000000020d0003670000000903000029000001c70000013d0000000b01000029000000000001041b0000000d0100002915ff143f0000040f0000000001000019000016000001042e0000008005400270000005cb055001970000000b0050006c00000d070000a13d000006160100004100000d0b0000013d0000008005500039000000400050043f000000200440003900000000044d034f000000800010043f00000633051001980000001f0610018f000000a00350003900000cee0000613d000000a007000039000000000804034f000000008908043c0000000007970436000000000037004b00000cea0000c13d000000000006004b00000cfb0000613d000000000454034f0000000305600210000000000603043300000000065601cf000000000656022f000000000404043b0000010005500089000000000454022f00000000045401cf000000000464019f0000000000430435000000a00110003900000000000104350000000c0000006b00000d110000c13d0000062901000041000000000010043f000005de0100004100001601000104300000062101000041000000000010043f000005de0100004100001601000104300000000b05000029000006120050009c00000deb0000413d00000615010000410000000000120435000005810020009c0000058102008041000000400120021000000605011001c700001601000104300000000d010000290000006001100210000005d2031001c7000000200030043f000000600320021200000d270000613d000000000013004b00000d270000613d000000000020043f0000000001000414000005810010009c0000058101008041000000c001100210000005d3011001c7000080100200003915ff15fa0000040f0000000100200190000011460000613d000000000101043b000000000101041a000000000001004b0000057d0000613d0000000b01000029000000000010043f0000000001000414000005810010009c0000058101008041000000c001100210000005ce011001c7000080100200003915ff15fa0000040f0000000100200190000011460000613d000000000101043b000000000201041a0000000a0220006c00000c2b0000413d0000000c030000290000006003300210000000000021041b000005d2013001c7000000200010043f0000000001000414000005810010009c0000058101008041000000c001100210000005ce011001c7000080100200003915ff15fa0000040f0000000100200190000011460000613d000000000101043b000000000201041a0000000a0020002a0000114e0000413d0000000a030000290000000002320019000000000021041b000000200030043f0000000001000414000005810010009c0000058101008041000000c001100210000005ce011001c70000800d020000390000000403000039000005ec0400004100000000050004110000000d060000290000000c0700002915ff15f50000040f0000000100200190000011460000613d000005db0100004100000000001004430000000c0100002900000004001004430000000001000414000005810010009c0000058101008041000000c001100210000005dc011001c7000080020200003915ff15fa0000040f000000010020019000000dea0000613d000000000101043b000000000001004b0000097d0000613d000000400300043d000000a001300039000000a002000039000000000021043500000080013000390000000a02000029000000000021043500000060013000390000000b02000029000000000021043500000040013000390000000d020000290000000000210435000000200130003900000000020004110000000000210435000005ef010000410000000000130435000900000003001d000000c001300039000000800200043d0000000000210435000d00000002001d000000000002004b00000dae0000613d0000000d01000029000005810010009c000005810100804100000060011002100000000002000414000005810020009c0000058102008041000000c002200210000000000112019f000005f0011001c7000000040200003915ff15fa0000040f000000600210027000000581022001970000000d0020006c0000000d0300002900000000030240190000001f0430018f0000000905000029000000e006500039000005d405300198000000000356001900000d9f0000613d000000000701034f000000007807043c0000000006860436000000000036004b00000d9b0000c13d000000000004004b00000dac0000613d000000000551034f0000000304400210000000000603043300000000064601cf000000000646022f000000000505043b0000010004400089000000000545022f00000000044501cf000000000464019f0000000000430435000100000002001f000300000001035500000009010000290000001c01100039000005810010009c000005810100804100000040011002100000000d02000029000000c402200039000005810020009c00000581020080410000006002200210000000000112019f0000000002000414000005810020009c0000058102008041000000c002200210000000000112019f0000000c0200002915ff15f50000040f00000060031002700000058103300197000000200030008c000000200400003900000000040340190000001f0540018f0000002006400190000000090460002900000dcf0000613d000000000701034f0000000908000029000000007907043c0000000008980436000000000048004b00000dcb0000c13d000000000005004b00000ddc0000613d000000000661034f0000000305500210000000000704043300000000075701cf000000000757022f000000000606043b0000010005500089000000000656022f00000000055601cf000000000575019f00000000005404350003000000010355000100000003001f000000000003004b00000001022061bf0000000100200190000010350000613d00000009010000290000000001010433000005f10010009c0000097d0000613d0000062701000041000000000010043f000005de010000410000160100010430000000000001042f00000613044001970000000b05000029000000000454019f000000000043041b00000040032000390000000000530435000000200320003900000000001304350000000a010000290000000000120435000005810020009c000005810200804100000040012002100000000002000414000005810020009c0000058102008041000000c002200210000000000112019f000005fa011001c70000800d020000390000000103000039000006140400004115ff15f50000040f0000000100200190000011460000613d000000020d0003670000000c020000290000000903000029000001c10000013d000005cc01000041000000000010043f0000003201000039000000040010043f000005cd010000410000160100010430000000080100002900000000010104330000000b02000039000000000202041a000000000012001a000011480000413d000000000212001a000a00000002001d0000000b012000b900000e1b0000613d0000000a021000fa0000000b0020006c000011480000c13d0000000002000416000000000012004b00000fb30000c13d0000000c01000029000000000010043f0000000601000039000000200010043f0000000001000414000005810010009c0000058101008041000000c001100210000005ce011001c7000080100200003915ff15fa0000040f0000000100200190000011460000613d000000000101043b000000000101041a000000000001004b00000fb60000c13d0000000d010000290000000c020000290000000b0300002915ff14580000040f00000080040000390000000d010000290000000c020000290000000b0300002915ff14f90000040f0000000a0000006b00000e3c0000613d0000000b0100002915ff14af0000040f000000400100043d00000020021000390000000b0300002900000000003204350000000c020000290000000000210435000005810010009c000005810100804100000040011002100000000002000414000005810020009c0000058102008041000000c002200210000000000112019f000005ce011001c70000800d02000039000000020300003900000603040000410000000d050000290000097a0000013d0000000c01d00360000000000101043b000900000001001d0000000d020000290000000b0020006b00000ef70000813d0000000901000029000000000010043f0000000901000039000000200010043f0000000001000414000005810010009c0000058101008041000000c001100210000005ce011001c7000080100200003915ff15fa0000040f0000000100200190000011460000613d000000000101043b000000000201041a000000000002004b00000e6d0000613d0000000d0020006b00000e6d0000413d0000000101100039000000000101041a000000000001004b00000c900000c13d0000000901000029000000000010043f0000000a01000039000000200010043f0000000001000414000005810010009c0000058101008041000000c001100210000005ce011001c7000080100200003915ff15fa0000040f0000000100200190000011460000613d000000000101043b0000000b06000029000000000061041b00000001021000390000000d07000029000000000072041b0000000c0500002900000140025000390000000202200367000000000202043b0000000204100039000000000024041b00000160045000390000000203400367000000000303043b0000000301100039000000000031041b000000400100043d0000006004100039000000000034043500000040031000390000000000230435000000200210003900000000007204350000000000610435000005810010009c000005810100804100000040011002100000000002000414000005810020009c0000058102008041000000c002200210000000000112019f00000608011001c70000800d020000390000000103000039000006090400004115ff15f50000040f0000000100200190000011460000613d000000020d000367000002290000013d000005dd01000041000000000010043f000005de0100004100001601000104300000000d01000029000900c0001000920000000901d00360000000000101043b000a00000001001d0000000b020000290000000c0020006b00000ef70000813d0000000a01000029000000000010043f0000000a01000039000000200010043f0000000001000414000005810010009c0000058101008041000000c001100210000005ce011001c7000080100200003915ff15fa0000040f0000000100200190000011460000613d000000000101043b000000000201041a000000000002004b00000ec70000613d0000000101100039000000000101041a000000000001004b00000ec70000613d0000000c0010006b00000c870000a13d0000000a01000029000000000010043f0000000901000039000000200010043f0000000001000414000005810010009c0000058101008041000000c001100210000005ce011001c7000080100200003915ff15fa0000040f0000000100200190000011460000613d000000000101043b0000000c04000029000000000041041b00000001021000390000000b05000029000000000052041b0000000902000029000000e0022000390000000202200367000000000202043b0000000201100039000000000021041b000000400100043d00000040031000390000000000230435000000200210003900000000005204350000000000410435000005810010009c000005810100804100000040011002100000000002000414000005810020009c0000058102008041000000c002200210000000000112019f000005fa011001c70000800d020000390000000103000039000005fb0400004115ff15f50000040f0000000100200190000011460000613d000000020d000367000002340000013d000000400100043d000006060200004100000c920000013d000000000001004b000000000200001900000efe0000613d000000a00200043d0000000303100210000006350330027f0000063503300167000000000232016f0000000101100210000000000112019f0000100c0000013d00000004010000290000000001010433000600000001001d000000400100043d000000200200003900000000022104360000000d0300002900000000003204350000060a0010009c000009310000213d0000004003100039000000400030043f000005810020009c000005810200804100000040022002100000000001010433000005810010009c00000581010080410000006001100210000000000121019f0000000002000414000005810020009c0000058102008041000000c002200210000000000112019f000005d7011001c7000080100200003915ff15fa0000040f0000000100200190000011460000613d000000000301043b000000400100043d0000002002000039000000000221043600000000003204350000060a0010009c000009310000213d0000004003100039000000400030043f000005810020009c000005810200804100000040022002100000000001010433000005810010009c00000581010080410000006001100210000000000121019f0000000002000414000005810020009c0000058102008041000000c002200210000000000112019f000005d7011001c7000080100200003915ff15fa0000040f0000000100200190000011460000613d000000000101043b00000009020000290000003f02200039000005d102200197000000400300043d0000000002230019000000000032004b00000000040000390000000104004039000005cb0020009c000009310000213d0000000100400190000009310000c13d000000400020043f0000000a0200002900000000022304360000000805000029000000000050007c000011460000213d0000000a0000006b00000f780000613d0000000707000029000000020470036700000000050200190000000808000029000000004604043c00000000056504360000002007700039000000000087004b00000f570000413d0000000003030433000000000003004b00000f780000613d0000000503300210000900000023001d0000000043020434000a00000004001d000000000031004b000000000300003900000020030020390000000000130435000000200130015f000000000202043300000000002104350000000001000414000005810010009c0000058101008041000000c001100210000005ce011001c7000080100200003915ff15fa0000040f0000000100200190000011460000613d000000000101043b0000000a03000029000000090030006c000000000203001900000f610000413d000000060010006c000010f60000c13d000000030100002900000000010104330000000b02000039000000000202041a000000000012001a000011480000413d000000000212001a000a00000002001d0000000b012000b900000f870000613d0000000a021000fa0000000b0020006c000011480000c13d0000000002000416000000000012004b00000fb30000c13d0000000c01000029000000000010043f0000000601000039000000200010043f0000000001000414000005810010009c0000058101008041000000c001100210000005ce011001c7000080100200003915ff15fa0000040f0000000100200190000011460000613d000000000101043b000000000101041a000000000001004b000011130000c13d0000000d010000290000000c020000290000000b0300002915ff14580000040f0000000a0000006b00000fa30000613d0000000b0100002915ff14af0000040f00000080040000390000000d010000290000000c020000290000000b0300002915ff14f90000040f000000400100043d00000020021000390000000b0300002900000000003204350000000c020000290000000000210435000005810010009c00000581010080410000004001100210000000000200041400000e460000013d000000400100043d0000060c0200004100000c920000013d0000000d01000029000000000010043f0000000701000039000000200010043f0000000001000414000005810010009c0000058101008041000000c001100210000005ce011001c7000080100200003915ff15fa0000040f0000000100200190000011460000613d000000000101043b0000000c02000029000000000020043f000000200010043f0000000001000414000005810010009c0000058101008041000000c001100210000005ce011001c7000080100200003915ff15fa0000040f0000000100200190000011460000613d000000000101043b000000000201041a000900000002001d0000000b0020002a000011480000413d0000000c01000029000000000010043f0000000601000039000000200010043f0000000001000414000005810010009c0000058101008041000000c001100210000005ce011001c7000080100200003915ff15fa0000040f0000000100200190000011460000613d00000009030000290000000b02300029000000000101043b000000000101041a000000000012004b00000e2f0000a13d000000400100043d0000060202000041000000000021043500000004021000390000000c030000290000000000320435000005810010009c00000581010080410000004001100210000005cd011001c70000160100010430000005e0020000410000002005000039000000010430008a0000000504400270000005e10440009a000000000605001900000080055000390000000005050433000000000052041b00000020056000390000000102200039000000000042004b00000ff80000c13d000000a004600039000000000013004b0000100a0000813d0000000303100210000000f80330018f000006350330027f00000635033001670000000004040433000000000334016f000000000032041b000000010110021000000001011001bf000000000010041b0000000d010000290000000002010433000005cb0020009c000009310000213d0000000101000039000000000401041a000000010040019000000001034002700000007f0330618f0000001f0030008c00000000050000390000000105002039000000000454013f0000000100400190000008c60000c13d000000200030008c0000102d0000413d000000000010043f0000001f042000390000000504400270000005e20440009a000000200020008c000005e3040040410000001f033000390000000503300270000005e20330009a000000000034004b0000102d0000813d000000000004041b0000000104400039000000000034004b000010290000413d0000001f0020008c000010530000a13d000000000010043f00000633052001980000105f0000c13d0000002004000039000005e3030000410000106c0000013d0000001f0430018f000005d40530019800000009025000290000103f0000613d000000000601034f0000000907000029000000006806043c0000000007870436000000000027004b0000103b0000c13d000000000004004b0000104c0000613d000000000151034f0000000304400210000000000502043300000000054501cf000000000545022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f000000000012043500000060013002100000000902000029000005810020009c00000581020080410000004002200210000000000121019f0000160100010430000000000002004b0000000003000019000010580000613d0000000c0300002900000000030304330000000304200210000006350440027f0000063504400167000000000343016f0000000102200210000000000223019f000010780000013d000005e3030000410000002004000039000000010650008a0000000506600270000005e40660009a0000000d0800002900000000078400190000000007070433000000000073041b00000020044000390000000103300039000000000063004b000010650000c13d000000000025004b000010760000813d0000000305200210000000f80550018f000006350550027f00000635055001670000000d044000290000000004040433000000000454016f000000000043041b000000010220021000000001022001bf000000000021041b000005e501000041000000000201041a000000000002004b000010ae0000c13d0000000b02000029000005c8062001980000000002000019000005e702006041000000000262019f000000000021041b0000000001000414000005810010009c0000058101008041000000c001100210000005d7011001c70000800d020000390000000303000039000005e804000041000000000500001915ff15f50000040f0000000100200190000011460000613d0000000001000414000005810010009c0000058101008041000000c001100210000005d7011001c70000800d020000390000000103000039000005e90400004115ff15f50000040f0000000100200190000011460000613d00000064010000390000000201100367000000000101043b0000000b02000039000000000012041b000000090000006b0000097d0000613d00000002010000390000000902000029000000000012041b0000000103000039000000200030043f0000000001000414000005810010009c0000058101008041000000c001100210000005ea011001c70000800d02000039000005eb04000041000002880000013d000005e601000041000000000010043f000005de0100004100001601000104300000000d01000029000905d2001001cb0000000b012000290000000001010433000d00000001001d0000000a01000029000000200010043f000c00000002001d00000080012000390000000001010433000000000010043f0000000001000414000005810010009c0000058101008041000000c001100210000005ce011001c7000080100200003915ff15fa0000040f0000000100200190000011460000613d000000000101043b000000000201041a0000000d0220006c00000c2b0000413d000000000021041b0000000901000029000000200010043f0000000001000414000005810010009c0000058101008041000000c001100210000005ce011001c7000080100200003915ff15fa0000040f0000000100200190000011460000613d000000000101043b000000000201041a0000000d03000029000000000032001a0000114e0000413d0000000002320019000000000021041b0000000c02000029000000200220008c000010b40000c13d00000a4a0000013d0000006003100210000000000332019f0000061d04000041000000000034041b000000400300043d000000200430003900000000002404350000000000130435000005810030009c000005810300804100000040013002100000000002000414000005810020009c0000058102008041000000c002200210000000000112019f000005ce011001c70000800d0200003900000001030000390000061e04000041000002880000013d000000400100043d0000060b0200004100000c920000013d0000001f0430018f000005d4053001980000000d02500029000011030000613d000000000601034f0000000d07000029000000006806043c0000000007870436000000000027004b000010ff0000c13d000000000004004b000011100000613d000000000151034f0000000304400210000000000502043300000000054501cf000000000545022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f000000000012043500000060013002100000000d020000290000104e0000013d0000000d01000029000000000010043f0000000701000039000000200010043f0000000001000414000005810010009c0000058101008041000000c001100210000005ce011001c7000080100200003915ff15fa0000040f0000000100200190000011460000613d000000000101043b0000000c02000029000000000020043f000000200010043f0000000001000414000005810010009c0000058101008041000000c001100210000005ce011001c7000080100200003915ff15fa0000040f0000000100200190000011460000613d000000000101043b000000000201041a000900000002001d0000000b0020002a000011480000413d0000000c01000029000000000010043f0000000601000039000000200010043f0000000001000414000005810010009c0000058101008041000000c001100210000005ce011001c7000080100200003915ff15fa0000040f0000000100200190000011460000613d00000009030000290000000b02300029000000000101043b000000000101041a000000000012004b00000f9b0000a13d00000fe80000013d00000000010000190000160100010430000005cc01000041000000000010043f0000001101000039000000040010043f000005cd0100004100001601000104300000062201000041000000000010043f000005de01000041000016010001043000000000430104340000000001320436000000000003004b0000115e0000613d000000000200001900000000052100190000000006240019000000000606043300000000006504350000002002200039000000000032004b000011570000413d000000000231001900000000000204350000001f0230003900000633022001970000000001210019000000000001042d000006100010009c0000116e0000213d000000430010008c0000116e0000a13d00000002020003670000000401200370000000000101043b0000002402200370000000000202043b000000000001042d0000000001000019000016010001043000000000430104340000000003320436000000000404043300000000004304350000004002200039000000400110003900000000010104330000000000120435000000000001042d0000001f03100039000000000023004b0000000004000019000005e704004041000005e705200197000005e703300197000000000653013f000000000053004b0000000003000019000005e703002041000005e70060009c000000000304c019000000000003004b000011910000613d0000000203100367000000000303043b000005cb0030009c000011910000213d00000020011000390000000004310019000000000024004b000011910000213d0000000002030019000000000001042d00000000010000190000160100010430000000004301043400000000033204360000000004040433000000000043043500000040031000390000000003030433000000400420003900000000003404350000006002200039000000600110003900000000010104330000000000120435000000000001042d000006360010009c000011a50000813d0000016001100039000000400010043f000000000001042d000005cc01000041000000000010043f0000004101000039000000040010043f000005cd0100004100001601000104300000001f0220003900000633022001970000000001120019000000000021004b00000000020000390000000102004039000005cb0010009c000011b70000213d0000000100200190000011b70000c13d000000400010043f000000000001042d000005cc01000041000000000010043f0000004101000039000000040010043f000005cd0100004100001601000104300000000305000039000000000405041a000000010640019000000001024002700000007f0220618f0000001f0020008c00000000010000390000000101002039000000000016004b000011eb0000c13d000000400100043d0000000003210436000000000006004b000011d80000613d000000000050043f000000000002004b000011de0000613d000006370500004100000000040000190000000006430019000000000705041a000000000076043500000001055000390000002004400039000000000024004b000011d00000413d000011df0000013d00000634044001970000000000430435000000000002004b00000020040000390000000004006039000011df0000013d00000000040000190000003f0240003900000633032001970000000002130019000000000032004b00000000030000390000000103004039000005cb0020009c000011f10000213d0000000100300190000011f10000c13d000000400020043f000000000001042d000005cc01000041000000000010043f0000002201000039000000040010043f000005cd010000410000160100010430000005cc01000041000000000010043f0000004101000039000000040010043f000005cd0100004100001601000104300000000205000039000000000405041a000000010640019000000001024002700000007f0220618f0000001f0020008c00000000010000390000000101002039000000000016004b000012250000c13d000000400100043d0000000003210436000000000006004b000012120000613d000000000050043f000000000002004b000012180000613d000006380500004100000000040000190000000006430019000000000705041a000000000076043500000001055000390000002004400039000000000024004b0000120a0000413d000012190000013d00000634044001970000000000430435000000000002004b00000020040000390000000004006039000012190000013d00000000040000190000003f0240003900000633032001970000000002130019000000000032004b00000000030000390000000103004039000005cb0020009c0000122b0000213d00000001003001900000122b0000c13d000000400020043f000000000001042d000005cc01000041000000000010043f0000002201000039000000040010043f000005cd010000410000160100010430000005cc01000041000000000010043f0000004101000039000000040010043f000005cd010000410000160100010430000000400100043d000006390010009c0000123c0000813d0000006002100039000000400020043f00000040021000390000000000020435000000200210003900000000000204350000000000010435000000000001042d000005cc01000041000000000010043f0000004101000039000000040010043f000005cd0100004100001601000104300000000002010019000000400100043d000006390010009c000012520000813d0000006003100039000000400030043f000000000302041a00000000033104360000000104200039000000000404041a00000000004304350000000202200039000000000202041a00000040031000390000000000230435000000000001042d000005cc01000041000000000010043f0000004101000039000000040010043f000005cd010000410000160100010430000000400100043d0000063a0010009c000012650000813d0000008002100039000000400020043f0000006002100039000000000002043500000040021000390000000000020435000000200210003900000000000204350000000000010435000000000001042d000005cc01000041000000000010043f0000004101000039000000040010043f000005cd0100004100001601000104300000000002010019000000400100043d0000063a0010009c0000127f0000813d0000008003100039000000400030043f000000000302041a00000000033104360000000104200039000000000404041a00000000004304350000000203200039000000000303041a000000400410003900000000003404350000000302200039000000000202041a00000060031000390000000000230435000000000001042d000005cc01000041000000000010043f0000004101000039000000040010043f000005cd010000410000160100010430000005e501000041000000000101041a0000000002000411000000000012004b0000128b0000c13d000000000001042d0000061101000041000000000010043f000005de010000410000160100010430000005c803100197000000a004200210000000000434019f0000000405000039000000000045041b000005fc02200197000027110020008c000012b00000813d0000006001100212000012b40000613d000000000112019f0000061d04000041000000000014041b000000400100043d000000200410003900000000002404350000000000310435000005810010009c000005810100804100000040011002100000000002000414000005810020009c0000058102008041000000c002200210000000000112019f000005ce011001c70000800d0200003900000001030000390000061e0400004115ff15f50000040f0000000100200190000012b80000613d000000000001042d0000061f01000041000000000010043f000005de0100004100001601000104300000063b01000041000000000010043f000005de010000410000160100010430000000000100001900001601000104300002000000000002000100000002001d000200000001001d000000000010043f0000000601000039000000200010043f0000000001000414000005810010009c0000058101008041000000c001100210000005ce011001c7000080100200003915ff15fa0000040f0000000100200190000012e10000613d000000000101043b0000000103000029000000000031041b000000400100043d0000002002100039000000000032043500000002020000290000000000210435000005810010009c000005810100804100000040011002100000000002000414000005810020009c0000058102008041000000c002200210000000000112019f000005ce011001c70000800d020000390000000103000039000006180400004115ff15f50000040f0000000100200190000012e10000613d000000000001042d000000000100001900001601000104300002000000000002000200000002001d000100000001001d000000000010043f0000000501000039000000200010043f0000000001000414000005810010009c0000058101008041000000c001100210000005ce011001c7000080100200003915ff15fa0000040f0000000100200190000013190000613d000000400200043d000000000301043b000000000403041a000005cb014001980000000206000029000012fa0000613d000000000061004b0000131b0000413d0000008005400270000005cb05500197000000000065004b0000131d0000213d000006120060009c0000131f0000813d0000061304400197000000000464019f000000000043041b000000400320003900000000006304350000002003200039000000000013043500000001010000290000000000120435000005810020009c000005810200804100000040012002100000000002000414000005810020009c0000058102008041000000c002200210000000000112019f000005fa011001c70000800d020000390000000103000039000006140400004115ff15f50000040f0000000100200190000013190000613d000000000001042d000000000100001900001601000104300000061701000041000013200000013d0000061601000041000013200000013d00000615010000410000000000120435000005810020009c0000058102008041000000400120021000000605011001c70000160100010430000005c8011001970000000802000039000000000302041a0000061b03300197000000000313019f000000000032041b000000400200043d0000000000120435000005810020009c000005810200804100000040012002100000000002000414000005810020009c0000058102008041000000c002200210000000000112019f000005ff011001c70000800d0200003900000001030000390000061c0400004115ff15f50000040f00000001002001900000133e0000613d000000000001042d00000000010000190000160100010430000006120020009c000013a20000813d0000000303000039000000000403041a000000010540019000000001044002700000007f0440618f0000001f0040008c00000000060000390000000106002039000000000065004b000013a80000c13d000000200040008c0000135d0000413d000000000030043f0000001f0520003900000005055002700000063c0550009a000000200020008c00000637050040410000001f0440003900000005044002700000063c0440009a000000000045004b0000135d0000813d000000000005041b0000000105500039000000000045004b000013590000413d0000001f0020008c000000010400008a0000137c0000a13d000000000030043f0000063306200198000013870000613d0000063705000041000000020800036700000000070000190000000009170019000000000998034f000000000909043b000000000095041b00000001055000390000002007700039000000000067004b000013660000413d000000000026004b000013790000813d0000000306200210000000f80660018f000000000664022f000000000646013f00000000011700190000000201100367000000000101043b000000000161016f000000000015041b000000010120021000000001011001bf0000138d0000013d000000000002004b0000138c0000613d0000000305200210000000000554022f000000000545013f0000000201100367000000000101043b000000000151016f0000000102200210000000000121019f0000138d0000013d00000637050000410000000007000019000000000026004b000013700000413d000013790000013d0000000001000019000000000013041b000000400100043d000000200210003900000000004204350000000000010435000005810010009c000005810100804100000040011002100000000002000414000005810020009c0000058102008041000000c002200210000000000112019f000005ce011001c70000800d020000390000000103000039000005fe0400004115ff15f50000040f0000000100200190000013ae0000613d000000000001042d000005cc01000041000000000010043f0000004101000039000000040010043f000005cd010000410000160100010430000005cc01000041000000000010043f0000002201000039000000040010043f000005cd01000041000016010001043000000000010000190000160100010430000006120020009c000014310000813d0000000204000039000000000304041a000000010630019000000001053002700000007f0550618f0000001f0050008c00000000030000390000000103002039000000000036004b000014370000c13d000000200050008c0000001f03200039000013cd0000413d000000000040043f00000005063002700000063d0660009a000000200020008c00000638060040410000001f0550003900000005055002700000063d0550009a000000000056004b000013cd0000813d000000000006041b0000000106600039000000000056004b000013c90000413d00000002070003670000001f0020008c000000000617034f000000200500008a000013ed0000a13d000000000040043f0000000009520170000013f70000613d0000063808000041000000000a000019000000000b1a0019000000000bb7034f000000000b0b043b0000000000b8041b0000000108800039000000200aa0003900000000009a004b000013d70000413d000000000029004b000013ea0000813d0000000309200210000000f80990018f000006350990027f000006350990016700000000011a0019000000000117034f000000000101043b000000000191016f000000000018041b000000010120021000000001011001bf000013fd0000013d000000000002004b000013fc0000613d0000000301200210000006350110027f0000063501100167000000000706043b000000000117016f0000000107200210000000000171019f000013fd0000013d0000063808000041000000000a000019000000000029004b000013e10000413d000013ea0000013d0000000001000019000000000014041b0000002004000039000000400100043d0000000004410436000000000024043500000000085201700000001f0920018f000000400410003900000000078400190000140d0000613d000000000a06034f000000000b04001900000000ac0a043c000000000bcb043600000000007b004b000014090000c13d000000000009004b0000141a0000613d000000000686034f0000000308900210000000000907043300000000098901cf000000000989022f000000000606043b0000010008800089000000000686022f00000000068601cf000000000696019f0000000000670435000000000353016f0000000002240019000000000002043500000060023002100000063e0220009a0000063f0030009c0000064002008041000005810010009c00000581010080410000004001100210000000000112019f0000000002000414000005810020009c0000058102008041000000c00220021000000000012100190000800d020000390000000103000039000006410400004115ff15f50000040f00000001002001900000143d0000613d000000000001042d000005cc01000041000000000010043f0000004101000039000000040010043f000005cd010000410000160100010430000005cc01000041000000000010043f0000002201000039000000040010043f000005cd010000410000160100010430000000000100001900001601000104300001000000000002000005e502000041000000000502041a0000000002000414000005c806100197000005810020009c0000058102008041000000c001200210000005d7011001c70000800d020000390000000303000039000005e804000041000100000006001d15ff15f50000040f0000000100200190000014560000613d000000010000006b0000000001000019000005e70100604100000001011001af000005e502000041000000000012041b000000000001042d000000000100001900001601000104300003000000000002000300000003001d000200000001001d000100000002001d000000000020043f0000000501000039000000200010043f0000000001000414000005810010009c0000058101008041000000c001100210000005ce011001c7000080100200003915ff15fa0000040f00000001002001900000149f0000613d000000000101043b000000000201041a0000008003200270000005cb033001970000000305000029000000000053001a000014a90000413d0000000003530019000005cb04200197000000000043004b000014a10000213d00000040035002100000000003320019000005cf033001970000064204200197000000000343019f000000800450021000000000024200190000064302200197000000000223019f000000000021041b0000000201000029000005c801100197000000000010043f0000000701000039000000200010043f0000000001000414000005810010009c0000058101008041000000c001100210000005ce011001c7000080100200003915ff15fa0000040f00000001002001900000149f0000613d000000000101043b0000000102000029000000000020043f000000200010043f0000000001000414000005810010009c0000058101008041000000c001100210000005ce011001c7000080100200003915ff15fa0000040f00000001002001900000149f0000613d0000000302000029000005cb02200197000000000101043b000000000301041a0000000002230019000000000021041b000000000001042d00000000010000190000160100010430000000400100043d00000644020000410000000000210435000005810010009c0000058101008041000000400110021000000605011001c70000160100010430000005cc01000041000000000010043f0000001101000039000000040010043f000005cd01000041000016010001043000010000000000020000000803000039000000000203041a000005c800200198000014eb0000613d00000000050004160000000b02000039000000000202041a000000000002004b000014d40000613d00000000031200a900000000022300d9000000000012004b000014f30000c13d000000000535004b000014f30000413d000100000005001d0000000001000414000005810010009c0000058101008041000000c001100210000000000003004b000014cb0000613d000005d7011001c7000080090200003900000645040000410000000005000019000014cc0000013d000006450200004115ff15f50000040f00030000000103550000006001100270000105810010019d000000010020019000000001050000290000000803000039000014e70000613d000000000005004b000014e60000613d000000000103041a0000000002000414000005c804100197000005810020009c0000058102008041000000c001200210000005d7011001c700008009020000390000000003050019000000000500001915ff15f50000040f0000006003100270000105810030019d00030000000103550000000100200190000014e70000613d000000000001042d0000064601000041000000000010043f000005de010000410000160100010430000000400100043d00000647020000410000000000210435000005810010009c0000058101008041000000400110021000000605011001c70000160100010430000005cc01000041000000000010043f0000001101000039000000040010043f000005cd0100004100001601000104300005000000000002000200000004001d000500000003001d000305c80010019c000015b40000613d000005d203000041000000200030043f000400000001001d000000140010043f000100000002001d000000000020043f0000000001000414000005810010009c0000058101008041000000c001100210000005ce011001c7000080100200003915ff15fa0000040f0000000100200190000015b20000613d000000000101043b000000000201041a0000000503000029000000000032001a000015db0000413d0000000002320019000000000021041b000000200030043f0000000001000414000005810010009c0000058101008041000000c001100210000005ce011001c70000800d0200003900000004030000390000000005000411000005ec040000410000000006000019000000030700002915ff15f50000040f0000000100200190000015b20000613d000005db010000410000000000100443000000040100002900000004001004430000000001000414000005810010009c0000058101008041000000c001100210000005dc011001c7000080020200003915ff15fa0000040f0000000100200190000015b80000613d000000000101043b000000000001004b000015b10000613d000000400900043d000000a001900039000000a0020000390000000000210435000000800190003900000005020000290000000000210435000000600190003900000001020000290000000000210435000000200190003900000000020004110000000000210435000005ef010000410000000000190435000000400190003900000000000104350000000201000029000000001a010434000000c0029000390000000000a2043500000000000a004b000500000009001d0000157b0000613d0000058100a0009c000005810200004100000000020a40190000006002200210000005810010009c00000581010080410000004001100210000000000112019f0000000002000414000005810020009c0000058102008041000000c002200210000000000112019f000000040200003900030000000a001d15ff15fa0000040f000000030a0000290000000509000029000000600210027000000581022001970000000000a2004b00000000030a001900000000030240190000001f0430018f000000e006900039000005d40530019800000000035600190000156c0000613d000000000701034f000000007807043c0000000006860436000000000036004b000015680000c13d000000000004004b000015790000613d000000000551034f0000000304400210000000000603043300000000064601cf000000000646022f000000000505043b0000010004400089000000000545022f00000000044501cf000000000464019f0000000000430435000100000002001f00030000000103550000001c01900039000005810010009c00000581010080410000004001100210000000c402a00039000005810020009c00000581020080410000006002200210000000000112019f0000000002000414000005810020009c0000058102008041000000c002200210000000000112019f000000040200002915ff15f50000040f000000050a00002900000060031002700000058103300197000000200030008c000000200400003900000000040340190000001f0540018f000000200640019000000000046a00190000159b0000613d000000000701034f00000000080a0019000000007907043c0000000008980436000000000048004b000015970000c13d000000000005004b000015a80000613d000000000661034f0000000305500210000000000704043300000000075701cf000000000757022f000000000606043b0000010005500089000000000656022f00000000055601cf000000000575019f00000000005404350003000000010355000100000003001f000000000003004b00000001022061bf0000000100200190000015b90000613d00000000010a0433000005f10010009c000015d70000c13d000000000001042d000000000100001900001601000104300000062901000041000000000010043f000005de010000410000160100010430000000000001042f0000001f0430018f000005d40530019800000000025a0019000015c30000613d000000000601034f0000000507000029000000006806043c0000000007870436000000000027004b000015bf0000c13d000000000004004b000015d00000613d000000000151034f0000000304400210000000000502043300000000054501cf000000000545022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f000000000012043500000060013002100000000502000029000005810020009c00000581020080410000004002200210000000000121019f00001601000104300000062701000041000000000010043f000005de0100004100001601000104300000062201000041000000000010043f000005de010000410000160100010430000000000001042f000005810010009c00000581010080410000004001100210000005810020009c00000581020080410000006002200210000000000112019f0000000002000414000005810020009c0000058102008041000000c002200210000000000112019f000005d7011001c7000080100200003915ff15fa0000040f0000000100200190000015f30000613d000000000101043b000000000001042d00000000010000190000160100010430000015f8002104210000000102000039000000000001042d0000000002000019000000000001042d000015fd002104230000000102000039000000000001042d0000000002000019000000000001042d000015ff00000432000016000001042e00001601000104300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffff0000000200000000000000000000000000000040000001000000000000000000000000000000000000000000000000000000000000000000000000008d527ad800000000000000000000000000000000000000000000000000000000be37822700000000000000000000000000000000000000000000000000000000f04e283d00000000000000000000000000000000000000000000000000000000f5298ac900000000000000000000000000000000000000000000000000000000f6eb127900000000000000000000000000000000000000000000000000000000f6eb127a00000000000000000000000000000000000000000000000000000000fee81cf400000000000000000000000000000000000000000000000000000000f5298aca00000000000000000000000000000000000000000000000000000000f542033f00000000000000000000000000000000000000000000000000000000f04e283e00000000000000000000000000000000000000000000000000000000f242432a00000000000000000000000000000000000000000000000000000000f2fde38b00000000000000000000000000000000000000000000000000000000e1a4521700000000000000000000000000000000000000000000000000000000e1a4521800000000000000000000000000000000000000000000000000000000e8a3d48500000000000000000000000000000000000000000000000000000000e985e9c500000000000000000000000000000000000000000000000000000000be37822800000000000000000000000000000000000000000000000000000000c3db27c100000000000000000000000000000000000000000000000000000000c63adb2b000000000000000000000000000000000000000000000000000000009d7f4ebe00000000000000000000000000000000000000000000000000000000a81b2f8c00000000000000000000000000000000000000000000000000000000b06e4f0c00000000000000000000000000000000000000000000000000000000b06e4f0d00000000000000000000000000000000000000000000000000000000bd85b03900000000000000000000000000000000000000000000000000000000a81b2f8d00000000000000000000000000000000000000000000000000000000ad2f852a000000000000000000000000000000000000000000000000000000009d7f4ebf00000000000000000000000000000000000000000000000000000000a22cb46500000000000000000000000000000000000000000000000000000000a48301140000000000000000000000000000000000000000000000000000000095d89b400000000000000000000000000000000000000000000000000000000095d89b4100000000000000000000000000000000000000000000000000000000976e7970000000000000000000000000000000000000000000000000000000009b4f3af5000000000000000000000000000000000000000000000000000000008d527ad9000000000000000000000000000000000000000000000000000000008da5cb5b00000000000000000000000000000000000000000000000000000000938e3d7b0000000000000000000000000000000000000000000000000000000037da577b0000000000000000000000000000000000000000000000000000000054d1f13c00000000000000000000000000000000000000000000000000000000715018a5000000000000000000000000000000000000000000000000000000007bca93c1000000000000000000000000000000000000000000000000000000007bca93c200000000000000000000000000000000000000000000000000000000869f759400000000000000000000000000000000000000000000000000000000715018a600000000000000000000000000000000000000000000000000000000730143c60000000000000000000000000000000000000000000000000000000054d1f13d0000000000000000000000000000000000000000000000000000000055f804b3000000000000000000000000000000000000000000000000000000006c0360eb0000000000000000000000000000000000000000000000000000000046bb59530000000000000000000000000000000000000000000000000000000046bb5954000000000000000000000000000000000000000000000000000000004e1273f40000000000000000000000000000000000000000000000000000000054b366110000000000000000000000000000000000000000000000000000000037da577c000000000000000000000000000000000000000000000000000000003fb80b15000000000000000000000000000000000000000000000000000000004520ce2e0000000000000000000000000000000000000000000000000000000013966db4000000000000000000000000000000000000000000000000000000002a552059000000000000000000000000000000000000000000000000000000002a55205a000000000000000000000000000000000000000000000000000000002eb2c2d6000000000000000000000000000000000000000000000000000000003454485d0000000000000000000000000000000000000000000000000000000013966db500000000000000000000000000000000000000000000000000000000256929620000000000000000000000000000000000000000000000000000000026b460cf0000000000000000000000000000000000000000000000000000000006fdde020000000000000000000000000000000000000000000000000000000006fdde0300000000000000000000000000000000000000000000000000000000075f45c2000000000000000000000000000000000000000000000000000000000e89341c0000000000000000000000000000000000000000000000000000000000fdd58e0000000000000000000000000000000000000000000000000000000001ffc9a70000000000000000000000000000000000000000000000000000000002fa7c47000000000000000000000000ffffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000389a75e10000000000000000000000000000000000000020000000800000000000000000000000000000000000000000000000000000000000000000ffffffffffffffff4e487b71000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024000000000000000000000000020000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000ffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe00000000000000000000000000000000000000000000000009a31110384e0b0c902000000000000000000000000000000000000340000000c000000000000000000000000000000000000000000000000000000000000000000000000ffffffe0000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000ffffffff00000000000000000000000002000000000000000000000000000000000000000000000000000000000000004a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb000000000000000000000000000000000000000000000000ffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011321806aa1896bbf26568e884a7374b41e002500962caba6a15023a8d90e8508b83020000020000000000000000000000000000002400000000000000000000000000000000000000000000000000000000000000000000000000000000f92ee8a900000000000000000000000000000000000000040000001c0000000000000000d6f21326ab749d5729fcba5677c79037b459436ab7bff709c9d06ce9f10c1a9d290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563d6f21326ab749d5729fcba5677c79037b459436ab7bff709c9d06ce9f10c1a9c4ef1d2ad89edf8c4d91132028e8195cdf30bb4b5053d4f8cd260341d4805f30ab10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf64ef1d2ad89edf8c4d91132028e8195cdf30bb4b5053d4f8cd260341d4805f309ffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927000000000000000000000000000000000000000000000000000000000dc149f080000000000000000000000000000000000000000000000000000000000000008be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e04cdc0855317fc903931370d8fa2cbf56b50c63f39e1a46f1d5859b2d91b2c2c40200000000000000000000000000000000000020000000200000000000000000c7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2c3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62000000000000000000000000000000000000000000000000000000007448fbae0000000000000000000000002052f8a2ff46283b30084e5d84c89a2fdbe7f74b00000000000000000000000000000000000000000000000000000000f23a6e610000000000000000000000000000000000000000000000a00000000000000000f23a6e610000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000200000000c0000000000000000796b89b91644bc98cd93958e4c9038275d622183e25ac5af08cc6b5d955391320200000200000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000006f5e88180000000000000000000000000000000000000020000000000000000000000000455243313135354d6167696344726f70436c6f6e6561626c6500000000000000312e302e3000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000200000000000000000000000000000000000060000000000000000000000000be59aad4e5e3cd0369b75babff1d2cf97c307e9d1ad1d4a7a22a32a8d0b9ed2a0000000000000000000000000000000000000000ffffffffffffffffffffffff02000000000000000000000000000000000000400000008000000000000000006bd5c950a8d8df17f772f5af37cb3655737899cbf903264b9795592da439661c020000000000000000000000000000000000002000000000000000000000000017307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31000000000000000000000000000000000000000000000000ffffffffffffff9f2f7a6e320000000000000000000000000000000000000000000000000000000096234cb3d6c373a1aaa06497a540bc166d4b0359243a088eaf95e21d7253d0beb358b4ef0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000003ee5527400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000080000000000000000002000000000000000000000000000000000000800000000000000000000000006d95873399671cd981e5dbfbb034ad9c7ad8030a29b541bfd5fb5796d5d99909000000000000000000000000000000000000000000000000ffffffffffffffbf09bde33900000000000000000000000000000000000000000000000000000000f73316d400000000000000000000000000000000000000000000000000000000e58961bf00000000000000000000000000000000000000000000000000000000000000000000000000000000a3833016a4ec61f5c253d71c77522cc8a1cc1106fa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000082b429000000000000000000000000000000000000000000000000010000000000000000ffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000708949a737b310dd5b3a011a4f5b1985f9ee4c69334aaa1613866e6f16f0334a8981b33900000000000000000000000000000000000000000000000000000000fb115a68000000000000000000000000000000000000000000000000000000002e08a50800000000000000000000000000000000000000000000000000000000c9aa851a9e693d868d2f64d4eda0e3480830af4a05b796fcbf27f8e8b58c18bca630cab0000000000000000000000000000000000000000000000000000000004b07080b00000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff00000000000000000000000000000000000000009a0dcf10a4d35ed2209787aa6b02577335bd59ab979fb43e2c0438f098bd81bd0000000000000000000000000000000000000000000000aa4ec00224afccfdb7f21fccf4d64d86d532c4e4eb86c007b6ad57a460c27d724188625e755ec6cf6d00000000000000000000000000000000000000000000000000000000350a88b30000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000003b800a460000000000000000000000000000000000000000000000000000000001336cea00000000000000000000000000000000000000000000000000000000f4d678b8000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000bc197c81bc197c8100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009c05499b000000000000000000000000000000000000000000000000000000004b6e7f1800000000000000000000000000000000000000000000000000000000ea553b3400000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000060000000000000000000000000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd5d00dbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff2a55205a0000000000000000000000000000000000000000000000000000000092aba59e00000000000000000000000000000000000000000000000000000000490649060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d9b67a26ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000000000000000000000fffffffffffffea0c2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace000000000000000000000000000000000000000000000000ffffffffffffffa0000000000000000000000000000000000000000000000000ffffffffffffff8000000000000000000000000000000000000000000000000000000000b4457eaa3da8a5f161a6c3ff06a60736d0ed24d7963cc6a5c4fafd2fa1dae9bb908e07a5bfa87805ed57dc1f0d489ce33be4c4577d74ccde357eeeee058a32c55c44a532fdffffffffffffffffffffffffffffffffffffc000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffc002000000000000000000000000000000ffffffff000000000000000000000000905d981207a7d0b6c62cc46ab0be2a076d0298e4a86d0ab79882dbd01ac37378ffffffffffffffff00000000000000000000000000000000ffffffffffffffff0000000000000000ffffffffffffffff0000000000000000000000000000000083986307000000000000000000000000000000000000000000000000000000000000000000000000000000000b98151bedee73f9ba5f2c7b72dea02d38ce49fc00000000000000000000000000000000000000000000000000000000b12d13ebb9b0f85700000000000000000000000000000000000000000000000000000000bfdb9b1efa547411acbdab532c96fe0ba76f6b4e718ac3108fbc535f50aa7dd0
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.