Source Code
Overview
SOPH Balance
More Info
ContractCreator
Multichain Info
N/A
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
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:
SophonBadgeNFT
Compiler Version
v0.8.27+commit.40a35a09
ZkSolc Version
v1.5.7
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.27; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@ethereum-attestation-service/eas-contracts/contracts/resolver/SchemaResolver.sol"; import "@erc721a/extensions/ERC721AQueryable.sol"; import "@erc721a/IERC721A.sol"; import "../../proxies/UpgradeableAccessControl.sol"; import "../../common/Rescuable.sol"; contract SophonBadgeNFT is UpgradeableAccessControl, Rescuable, ERC721AQueryable, SchemaResolver { using Strings for uint256; struct BadgeInfo { uint256 badgeType; uint256 level; bool active; } string private _baseTokenURI; mapping(uint256 => mapping(uint256 => BadgeInfo)) public badgeInfos; // badge type => level => badge info mapping(uint256 => BadgeInfo) public tokenToBadgeInfo; // tokenId => badge info mapping(address => mapping(uint256 => mapping(uint256 => bool))) public claimed; // to track claimed badges mapping(address => mapping(uint256 => mapping(uint256 => uint256))) public userBadgeTokenIds; // to track which badge tokenId a user has for a badge type/level event BadgeClaimed(address indexed user, uint256 badgeType, uint256 level, uint256 tokenId); event BadgeAdded(uint256 badgeType, uint256 level); event BaseURIUpdated(string newBaseURI); constructor(address easContractAddress) ERC721A("", "") SchemaResolver(IEAS(easContractAddress)) {} function addBadge( uint256 badgeType, uint256 level, bool active ) external onlyRole(DEFAULT_ADMIN_ROLE) { badgeInfos[badgeType][level] = BadgeInfo({ badgeType: badgeType, level: level, active: active }); emit BadgeAdded(badgeType, level); } function setBaseURI(string calldata baseURI) external onlyRole(DEFAULT_ADMIN_ROLE) { _baseTokenURI = baseURI; emit BaseURIUpdated(baseURI); } function onAttest( Attestation calldata attestation, uint256 /* value */ ) internal override returns (bool) { (uint256 badgeType, uint256 level) = abi.decode(attestation.data, (uint256, uint256)); if (!badgeInfos[badgeType][level].active) revert("Badge not active"); address recipient = attestation.recipient; if (claimed[recipient][badgeType][level]) revert("Badge already claimed"); claimed[recipient][badgeType][level] = true; // Get the next token ID using the function, not as a variable uint256 tokenId = _nextTokenId(); _safeMint(recipient, 1); // This automatically increments _currentIndex tokenToBadgeInfo[tokenId] = BadgeInfo({ badgeType: badgeType, level: level, active: true }); userBadgeTokenIds[recipient][badgeType][level] = tokenId; emit BadgeClaimed(recipient, badgeType, level, tokenId); return true; } function onRevoke( Attestation calldata /* attestation */, uint256 /* value */ ) internal pure override returns (bool) { return false; } function name() public pure override(ERC721A, IERC721A) returns (string memory) { return "Sophon Badges"; } function symbol() public pure override(ERC721A, IERC721A) returns (string memory) { return "SB"; } function tokenURI(uint256 tokenId) public view override(ERC721A, IERC721A) returns (string memory) { if (!_exists(tokenId)) revert("Token does not exist"); BadgeInfo memory info = tokenToBadgeInfo[tokenId]; return string(abi.encodePacked( _baseTokenURI, "badge-type-", info.badgeType.toString(), "-level-", info.level.toString(), ".json" )); } function eas() external view returns (IEAS) { return _eas; } function isPayable() public pure override returns (bool) { return false; } function canClaim( address user, uint256 badgeType, uint256 level ) external view returns (bool) { return badgeInfos[badgeType][level].active && !claimed[user][badgeType][level]; } /** * @dev Override approve to disable approvals */ function approve(address, uint256) public payable override(ERC721A, IERC721A) { revert("Badge is soulbound and cannot be approved for transfer"); } /** * @dev Override setApprovalForAll to disable approvals */ function setApprovalForAll(address, bool) public pure override(ERC721A, IERC721A) { revert("Badge is soulbound and cannot be approved for transfer"); } function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal override { if (from != address(0)) { revert("Badge is soulbound and cannot be transferred"); } super._beforeTokenTransfers(from, to, startTokenId, quantity); } function _requireRescuerRole() internal view override onlyRole(DEFAULT_ADMIN_ROLE) { // Empty function body } // Override supportsInterface with all parent contracts function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A, IERC721A, UpgradeableAccessControl) returns (bool) { return ERC721A.supportsInterface(interfaceId) || AccessControlDefaultAdminRules.supportsInterface(interfaceId); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.20; import {IERC165} from "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon * a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or * {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon * a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721 * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must * understand this adds an external call which potentially creates a reentrancy vulnerability. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 tokenId) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the address zero. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol) pragma solidity ^0.8.20; import {Math} from "./math/Math.sol"; import {SignedMath} from "./math/SignedMath.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant HEX_DIGITS = "0123456789abcdef"; uint8 private constant ADDRESS_LENGTH = 20; /** * @dev The `value` string doesn't fit in the specified `length`. */ error StringsInsufficientHexLength(uint256 value, uint256 length); /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), HEX_DIGITS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `int256` to its ASCII `string` decimal representation. */ function toStringSigned(int256 value) internal pure returns (string memory) { return string.concat(value < 0 ? "-" : "", toString(SignedMath.abs(value))); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { uint256 localValue = value; bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = HEX_DIGITS[localValue & 0xf]; localValue >>= 4; } if (localValue != 0) { revert StringsInsufficientHexLength(value, length); } return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal * representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), ADDRESS_LENGTH); } /** * @dev Returns true if the two strings are equal. */ function equal(string memory a, string memory b) internal pure returns (bool) { return bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b)); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import { AccessDenied, InvalidEAS, InvalidLength, uncheckedInc } from "./../Common.sol"; import { IEAS, Attestation } from "./../IEAS.sol"; import { Semver } from "./../Semver.sol"; import { ISchemaResolver } from "./ISchemaResolver.sol"; /// @title SchemaResolver /// @notice The base schema resolver contract. abstract contract SchemaResolver is ISchemaResolver, Semver { error InsufficientValue(); error NotPayable(); // The global EAS contract. IEAS internal immutable _eas; /// @dev Creates a new resolver. /// @param eas The address of the global EAS contract. constructor(IEAS eas) Semver(1, 3, 0) { if (address(eas) == address(0)) { revert InvalidEAS(); } _eas = eas; } /// @dev Ensures that only the EAS contract can make this call. modifier onlyEAS() { _onlyEAS(); _; } /// @inheritdoc ISchemaResolver function isPayable() public pure virtual returns (bool) { return false; } /// @dev ETH callback. receive() external payable virtual { if (!isPayable()) { revert NotPayable(); } } /// @inheritdoc ISchemaResolver function attest(Attestation calldata attestation) external payable onlyEAS returns (bool) { return onAttest(attestation, msg.value); } /// @inheritdoc ISchemaResolver function multiAttest( Attestation[] calldata attestations, uint256[] calldata values ) external payable onlyEAS returns (bool) { uint256 length = attestations.length; if (length != values.length) { revert InvalidLength(); } // We are keeping track of the remaining ETH amount that can be sent to resolvers and will keep deducting // from it to verify that there isn't any attempt to send too much ETH to resolvers. Please note that unless // some ETH was stuck in the contract by accident (which shouldn't happen in normal conditions), it won't be // possible to send too much ETH anyway. uint256 remainingValue = msg.value; for (uint256 i = 0; i < length; i = uncheckedInc(i)) { // Ensure that the attester/revoker doesn't try to spend more than available. uint256 value = values[i]; if (value > remainingValue) { revert InsufficientValue(); } // Forward the attestation to the underlying resolver and return false in case it isn't approved. if (!onAttest(attestations[i], value)) { return false; } unchecked { // Subtract the ETH amount, that was provided to this attestation, from the global remaining ETH amount. remainingValue -= value; } } return true; } /// @inheritdoc ISchemaResolver function revoke(Attestation calldata attestation) external payable onlyEAS returns (bool) { return onRevoke(attestation, msg.value); } /// @inheritdoc ISchemaResolver function multiRevoke( Attestation[] calldata attestations, uint256[] calldata values ) external payable onlyEAS returns (bool) { uint256 length = attestations.length; if (length != values.length) { revert InvalidLength(); } // We are keeping track of the remaining ETH amount that can be sent to resolvers and will keep deducting // from it to verify that there isn't any attempt to send too much ETH to resolvers. Please note that unless // some ETH was stuck in the contract by accident (which shouldn't happen in normal conditions), it won't be // possible to send too much ETH anyway. uint256 remainingValue = msg.value; for (uint256 i = 0; i < length; i = uncheckedInc(i)) { // Ensure that the attester/revoker doesn't try to spend more than available. uint256 value = values[i]; if (value > remainingValue) { revert InsufficientValue(); } // Forward the revocation to the underlying resolver and return false in case it isn't approved. if (!onRevoke(attestations[i], value)) { return false; } unchecked { // Subtract the ETH amount, that was provided to this attestation, from the global remaining ETH amount. remainingValue -= value; } } return true; } /// @notice A resolver callback that should be implemented by child contracts. /// @param attestation The new attestation. /// @param value An explicit ETH amount that was sent to the resolver. Please note that this value is verified in /// both attest() and multiAttest() callbacks EAS-only callbacks and that in case of multi attestations, it'll /// usually hold that msg.value != value, since msg.value aggregated the sent ETH amounts for all the /// attestations in the batch. /// @return Whether the attestation is valid. function onAttest(Attestation calldata attestation, uint256 value) internal virtual returns (bool); /// @notice Processes an attestation revocation and verifies if it can be revoked. /// @param attestation The existing attestation to be revoked. /// @param value An explicit ETH amount that was sent to the resolver. Please note that this value is verified in /// both revoke() and multiRevoke() callbacks EAS-only callbacks and that in case of multi attestations, it'll /// usually hold that msg.value != value, since msg.value aggregated the sent ETH amounts for all the /// attestations in the batch. /// @return Whether the attestation can be revoked. function onRevoke(Attestation calldata attestation, uint256 value) internal virtual returns (bool); /// @dev Ensures that only the EAS contract can make this call. function _onlyEAS() private view { if (msg.sender != address(_eas)) { revert AccessDenied(); } } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.3.0 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721AQueryable.sol'; import '../ERC721A.sol'; /** * @title ERC721AQueryable. * * @dev ERC721A subclass with convenience query functions. */ abstract contract ERC721AQueryable is ERC721A, IERC721AQueryable { /** * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting. * * If the `tokenId` is out of bounds: * * - `addr = address(0)` * - `startTimestamp = 0` * - `burned = false` * - `extraData = 0` * * If the `tokenId` is burned: * * - `addr = <Address of owner before token was burned>` * - `startTimestamp = <Timestamp when token was burned>` * - `burned = true` * - `extraData = <Extra data when token was burned>` * * Otherwise: * * - `addr = <Address of owner>` * - `startTimestamp = <Timestamp of start of ownership>` * - `burned = false` * - `extraData = <Extra data at start of ownership>` */ function explicitOwnershipOf(uint256 tokenId) public view virtual override returns (TokenOwnership memory ownership) { unchecked { if (tokenId >= _startTokenId()) { if (tokenId > _sequentialUpTo()) return _ownershipAt(tokenId); if (tokenId < _nextTokenId()) { // If the `tokenId` is within bounds, // scan backwards for the initialized ownership slot. while (!_ownershipIsInitialized(tokenId)) --tokenId; return _ownershipAt(tokenId); } } } } /** * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order. * See {ERC721AQueryable-explicitOwnershipOf} */ function explicitOwnershipsOf(uint256[] calldata tokenIds) external view virtual override returns (TokenOwnership[] memory) { TokenOwnership[] memory ownerships; uint256 i = tokenIds.length; assembly { // Grab the free memory pointer. ownerships := mload(0x40) // Store the length. mstore(ownerships, i) // Allocate one word for the length, // `tokenIds.length` words for the pointers. i := shl(5, i) // Multiply `i` by 32. mstore(0x40, add(add(ownerships, 0x20), i)) } while (i != 0) { uint256 tokenId; assembly { i := sub(i, 0x20) tokenId := calldataload(add(tokenIds.offset, i)) } TokenOwnership memory ownership = explicitOwnershipOf(tokenId); assembly { // Store the pointer of `ownership` in the `ownerships` array. mstore(add(add(ownerships, 0x20), i), ownership) } } return ownerships; } /** * @dev Returns an array of token IDs owned by `owner`, * in the range [`start`, `stop`) * (i.e. `start <= tokenId < stop`). * * This function allows for tokens to be queried if the collection * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}. * * Requirements: * * - `start < stop` */ function tokensOfOwnerIn( address owner, uint256 start, uint256 stop ) external view virtual override returns (uint256[] memory) { return _tokensOfOwnerIn(owner, start, stop); } /** * @dev Returns an array of token IDs owned by `owner`. * * This function scans the ownership mapping and is O(`totalSupply`) in complexity. * It is meant to be called off-chain. * * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into * multiple smaller scans if the collection is large enough to cause * an out-of-gas error (10K collections should be fine). */ /*function tokensOfOwner(address owner) external view virtual override returns (uint256[] memory) { // If spot mints are enabled, full-range scan is disabled. if (_sequentialUpTo() != type(uint256).max) _revert(NotCompatibleWithSpotMints.selector); uint256 start = _startTokenId(); uint256 stop = _nextTokenId(); uint256[] memory tokenIds; if (start != stop) tokenIds = _tokensOfOwnerIn(owner, start, stop); return tokenIds; }*/ /** * @dev Helper function for returning an array of token IDs owned by `owner`. * * Note that this function is optimized for smaller bytecode size over runtime gas, * since it is meant to be called off-chain. */ function _tokensOfOwnerIn( address owner, uint256 start, uint256 stop ) private view returns (uint256[] memory tokenIds) { unchecked { if (start >= stop) _revert(InvalidQueryRange.selector); // Set `start = max(start, _startTokenId())`. if (start < _startTokenId()) start = _startTokenId(); uint256 nextTokenId = _nextTokenId(); // If spot mints are enabled, scan all the way until the specified `stop`. uint256 stopLimit = _sequentialUpTo() != type(uint256).max ? stop : nextTokenId; // Set `stop = min(stop, stopLimit)`. if (stop >= stopLimit) stop = stopLimit; // Number of tokens to scan. uint256 tokenIdsMaxLength = balanceOf(owner); // Set `tokenIdsMaxLength` to zero if the range contains no tokens. if (start >= stop) tokenIdsMaxLength = 0; // If there are one or more tokens to scan. if (tokenIdsMaxLength != 0) { // Set `tokenIdsMaxLength = min(balanceOf(owner), tokenIdsMaxLength)`. if (stop - start <= tokenIdsMaxLength) tokenIdsMaxLength = stop - start; uint256 m; // Start of available memory. assembly { // Grab the free memory pointer. tokenIds := mload(0x40) // Allocate one word for the length, and `tokenIdsMaxLength` words // for the data. `shl(5, x)` is equivalent to `mul(32, x)`. m := add(tokenIds, shl(5, add(tokenIdsMaxLength, 1))) mstore(0x40, m) } // We need to call `explicitOwnershipOf(start)`, // because the slot at `start` may not be initialized. TokenOwnership memory ownership = explicitOwnershipOf(start); address currOwnershipAddr; // If the starting slot exists (i.e. not burned), // initialize `currOwnershipAddr`. // `ownership.address` will not be zero, // as `start` is clamped to the valid token ID range. if (!ownership.burned) currOwnershipAddr = ownership.addr; uint256 tokenIdsIdx; // Use a do-while, which is slightly more efficient for this case, // as the array will at least contain one element. do { if (_sequentialUpTo() != type(uint256).max) { // Skip the remaining unused sequential slots. if (start == nextTokenId) start = _sequentialUpTo() + 1; // Reset `currOwnershipAddr`, as each spot-minted token is a batch of one. if (start > _sequentialUpTo()) currOwnershipAddr = address(0); } ownership = _ownershipAt(start); // This implicitly allocates memory. assembly { switch mload(add(ownership, 0x40)) // if `ownership.burned == false`. case 0 { // if `ownership.addr != address(0)`. // The `addr` already has it's upper 96 bits clearned, // since it is written to memory with regular Solidity. if mload(ownership) { currOwnershipAddr := mload(ownership) } // if `currOwnershipAddr == owner`. // The `shl(96, x)` is to make the comparison agnostic to any // dirty upper 96 bits in `owner`. if iszero(shl(96, xor(currOwnershipAddr, owner))) { tokenIdsIdx := add(tokenIdsIdx, 1) mstore(add(tokenIds, shl(5, tokenIdsIdx)), start) } } // Otherwise, reset `currOwnershipAddr`. // This handles the case of batch burned tokens // (burned bit of first slot set, remaining slots left uninitialized). default { currOwnershipAddr := 0 } start := add(start, 1) // Free temporary memory implicitly allocated for ownership // to avoid quadratic memory expansion costs. mstore(0x40, m) } } while (!(start == stop || tokenIdsIdx == tokenIdsMaxLength)); // Store the length of the array. assembly { mstore(tokenIds, tokenIdsIdx) } } } } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.3.0 // Creator: Chiru Labs pragma solidity ^0.8.4; /** * @dev Interface of ERC721A. */ interface IERC721A { /** * The caller must own the token or be an approved operator. */ error ApprovalCallerNotOwnerNorApproved(); /** * The token does not exist. */ error ApprovalQueryForNonexistentToken(); /** * Cannot query the balance for the zero address. */ error BalanceQueryForZeroAddress(); /** * Cannot mint to the zero address. */ error MintToZeroAddress(); /** * The quantity of tokens minted must be more than zero. */ error MintZeroQuantity(); /** * The token does not exist. */ error OwnerQueryForNonexistentToken(); /** * The caller must own the token or be an approved operator. */ error TransferCallerNotOwnerNorApproved(); /** * The token must be owned by `from`. */ error TransferFromIncorrectOwner(); /** * Cannot safely transfer to a contract that does not implement the * ERC721Receiver interface. */ error TransferToNonERC721ReceiverImplementer(); /** * Cannot transfer to the zero address. */ error TransferToZeroAddress(); /** * The token does not exist. */ error URIQueryForNonexistentToken(); /** * The `quantity` minted with ERC2309 exceeds the safety limit. */ error MintERC2309QuantityExceedsLimit(); /** * The `extraData` cannot be set on an unintialized ownership slot. */ error OwnershipNotInitializedForExtraData(); /** * `_sequentialUpTo()` must be greater than `_startTokenId()`. */ error SequentialUpToTooSmall(); /** * The `tokenId` of a sequential mint exceeds `_sequentialUpTo()`. */ error SequentialMintExceedsLimit(); /** * Spot minting requires a `tokenId` greater than `_sequentialUpTo()`. */ error SpotMintTokenIdTooSmall(); /** * Cannot mint over a token that already exists. */ error TokenAlreadyExists(); /** * The feature is not compatible with spot mints. */ error NotCompatibleWithSpotMints(); // ============================================================= // STRUCTS // ============================================================= struct TokenOwnership { // The address of the owner. address addr; // Stores the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; // Arbitrary data similar to `startTimestamp` that can be set via {_extraData}. uint24 extraData; } // ============================================================= // TOKEN COUNTERS // ============================================================= /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() external view returns (uint256); // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); // ============================================================= // IERC721 // ============================================================= /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables * (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, * checking first that contract recipients are aware of the ERC721 protocol * to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move * this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external payable; /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external payable; /** * @dev Transfers `tokenId` from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} * whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external payable; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the * zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external payable; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} * for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) external view returns (bool); // ============================================================= // IERC721Metadata // ============================================================= /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); // ============================================================= // IERC2309 // ============================================================= /** * @dev Emitted when tokens in `fromTokenId` to `toTokenId` * (inclusive) is transferred from `from` to `to`, as defined in the * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309) standard. * * See {_mintERC2309} for more details. */ event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to); }
// SPDX-License-Identifier: GPL-3.0-only pragma solidity ^0.8.26; import "@openzeppelin/contracts/access/extensions/AccessControlDefaultAdminRules.sol"; /** * @title UpgradeableAccessControl * @notice This contract extends AccessControlDefaultAdminRules to provide role-based access control with an upgradeable implementation. * @dev Allows the default admin to replace the implementation address with a new one and optionally initialize it. The admin role changes are subject to a delay defined in the constructor. */ contract UpgradeableAccessControl is AccessControlDefaultAdminRules { /// @notice The slot containing the address of the current implementation contract. bytes32 public constant IMPLEMENTATION_SLOT = keccak256("IMPLEMENTATION_SLOT"); /** * @notice Constructs the UpgradeableAccessControl contract. * @dev Initializes the AccessControlDefaultAdminRules with a delay of 3 days and sets the deployer as the initial default admin. */ constructor() AccessControlDefaultAdminRules(3 days, msg.sender) {} /** * @notice Replaces the current implementation with a new one and optionally initializes it. * @dev Can only be called by an account with the DEFAULT_ADMIN_ROLE. If `initData_` is provided, a delegatecall is made to the new implementation with that data. * @param impl_ The address of the new implementation contract. * @param initData_ Optional initialization data to delegatecall to the new implementation. */ function replaceImplementation(address impl_, bytes memory initData_) public onlyRole(DEFAULT_ADMIN_ROLE) { require(impl_ != address(0), "impl_ is zero address"); bytes32 slot = IMPLEMENTATION_SLOT; assembly { sstore(slot, impl_) } if (initData_.length != 0) { (bool success,) = impl_.delegatecall(initData_); require(success, "init failed"); } } /** * @notice Checks if the contract implements an interface. * @dev Overrides supportsInterface from AccessControlDefaultAdminRules. * @param interfaceId The interface identifier, as specified in ERC-165. * @return True if the contract implements `interfaceId`, false otherwise. */ function supportsInterface(bytes4 interfaceId) public view virtual override(AccessControlDefaultAdminRules) returns (bool) { return super.supportsInterface(interfaceId); } /** * @notice Returns the current implementation address * @return The current implementation address */ function implementation() public view returns (address) { address implementation_; bytes32 slot = IMPLEMENTATION_SLOT; assembly { implementation_ := sload(slot) } return implementation_; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.26; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; abstract contract Rescuable { using SafeERC20 for IERC20; /** * @notice Override this function in inheriting contracts to set appropriate permissions */ function _requireRescuerRole() internal view virtual; /** * @notice Allows the rescue of ERC20 tokens held by the contract * @param token The ERC20 token to be rescued */ function rescue(IERC20 token) external { _requireRescuerRole(); uint256 balance = token.balanceOf(address(this)); token.safeTransfer(msg.sender, balance); } /** * @notice Allows the rescue of Ether held by the contract */ function rescueEth() external { _requireRescuerRole(); uint256 balance = address(this).balance; (bool success,) = msg.sender.call{value: balance}(""); require(success, "Transfer failed"); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol) pragma solidity ^0.8.20; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { /** * @dev Muldiv operation overflow. */ error MathOverflowedMulDiv(); enum Rounding { Floor, // Toward negative infinity Ceil, // Toward positive infinity Trunc, // Toward zero Expand // Away from zero } /** * @dev Returns the addition of two unsigned integers, with an overflow flag. */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the subtraction of two unsigned integers, with an overflow flag. */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds towards infinity instead * of rounding towards zero. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { if (b == 0) { // Guarantee the same behavior as in a regular Solidity division. return a / b; } // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or * denominator == 0. * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by * Uniswap Labs also under MIT license. */ function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0 = x * y; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { // Solidity will revert if denominator == 0, unlike the div opcode on its own. // The surrounding unchecked block does not change this fact. // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic. return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. if (denominator <= prod1) { revert MathOverflowedMulDiv(); } /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. // Always >= 1. See https://cs.stackexchange.com/q/138556/92363. uint256 twos = denominator & (0 - denominator); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also // works in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded * towards zero. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2 of a positive value rounded towards zero. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10 of a positive value rounded towards zero. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10 ** 64) { value /= 10 ** 64; result += 64; } if (value >= 10 ** 32) { value /= 10 ** 32; result += 32; } if (value >= 10 ** 16) { value /= 10 ** 16; result += 16; } if (value >= 10 ** 8) { value /= 10 ** 8; result += 8; } if (value >= 10 ** 4) { value /= 10 ** 4; result += 4; } if (value >= 10 ** 2) { value /= 10 ** 2; result += 2; } if (value >= 10 ** 1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0); } } /** * @dev Return the log in base 256 of a positive value rounded towards zero. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 256, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0); } } /** * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers. */ function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) { return uint8(rounding) % 2 == 1; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol) pragma solidity ^0.8.20; /** * @dev Standard signed math utilities missing in the Solidity language. */ library SignedMath { /** * @dev Returns the largest of two signed numbers. */ function max(int256 a, int256 b) internal pure returns (int256) { return a > b ? a : b; } /** * @dev Returns the smallest of two signed numbers. */ function min(int256 a, int256 b) internal pure returns (int256) { return a < b ? a : b; } /** * @dev Returns the average of two signed numbers without overflow. * The result is rounded towards zero. */ function average(int256 a, int256 b) internal pure returns (int256) { // Formula from the book "Hacker's Delight" int256 x = (a & b) + ((a ^ b) >> 1); return x + (int256(uint256(x) >> 255) & (a ^ b)); } /** * @dev Returns the absolute unsigned value of a signed value. */ function abs(int256 n) internal pure returns (uint256) { unchecked { // must be unchecked in order to support `n = type(int256).min` return uint256(n >= 0 ? n : -n); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; // A representation of an empty/uninitialized UID. bytes32 constant EMPTY_UID = 0; // A zero expiration represents an non-expiring attestation. uint64 constant NO_EXPIRATION_TIME = 0; error AccessDenied(); error DeadlineExpired(); error InvalidEAS(); error InvalidLength(); error InvalidSignature(); error NotFound(); /// @notice A struct representing ECDSA signature data. struct Signature { uint8 v; // The recovery ID. bytes32 r; // The x-coordinate of the nonce R. bytes32 s; // The signature data. } /// @notice A struct representing a single attestation. struct Attestation { bytes32 uid; // A unique identifier of the attestation. bytes32 schema; // The unique identifier of the schema. uint64 time; // The time when the attestation was created (Unix timestamp). uint64 expirationTime; // The time when the attestation expires (Unix timestamp). uint64 revocationTime; // The time when the attestation was revoked (Unix timestamp). bytes32 refUID; // The UID of the related attestation. address recipient; // The recipient of the attestation. address attester; // The attester/sender of the attestation. bool revocable; // Whether the attestation is revocable. bytes data; // Custom attestation data. } /// @notice A helper function to work with unchecked iterators in loops. function uncheckedInc(uint256 i) pure returns (uint256 j) { unchecked { j = i + 1; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import { ISchemaRegistry } from "./ISchemaRegistry.sol"; import { ISemver } from "./ISemver.sol"; import { Attestation, Signature } from "./Common.sol"; /// @notice A struct representing the arguments of the attestation request. struct AttestationRequestData { address recipient; // The recipient of the attestation. uint64 expirationTime; // The time when the attestation expires (Unix timestamp). bool revocable; // Whether the attestation is revocable. bytes32 refUID; // The UID of the related attestation. bytes data; // Custom attestation data. uint256 value; // An explicit ETH amount to send to the resolver. This is important to prevent accidental user errors. } /// @notice A struct representing the full arguments of the attestation request. struct AttestationRequest { bytes32 schema; // The unique identifier of the schema. AttestationRequestData data; // The arguments of the attestation request. } /// @notice A struct representing the full arguments of the full delegated attestation request. struct DelegatedAttestationRequest { bytes32 schema; // The unique identifier of the schema. AttestationRequestData data; // The arguments of the attestation request. Signature signature; // The ECDSA signature data. address attester; // The attesting account. uint64 deadline; // The deadline of the signature/request. } /// @notice A struct representing the full arguments of the multi attestation request. struct MultiAttestationRequest { bytes32 schema; // The unique identifier of the schema. AttestationRequestData[] data; // The arguments of the attestation request. } /// @notice A struct representing the full arguments of the delegated multi attestation request. struct MultiDelegatedAttestationRequest { bytes32 schema; // The unique identifier of the schema. AttestationRequestData[] data; // The arguments of the attestation requests. Signature[] signatures; // The ECDSA signatures data. Please note that the signatures are assumed to be signed with increasing nonces. address attester; // The attesting account. uint64 deadline; // The deadline of the signature/request. } /// @notice A struct representing the arguments of the revocation request. struct RevocationRequestData { bytes32 uid; // The UID of the attestation to revoke. uint256 value; // An explicit ETH amount to send to the resolver. This is important to prevent accidental user errors. } /// @notice A struct representing the full arguments of the revocation request. struct RevocationRequest { bytes32 schema; // The unique identifier of the schema. RevocationRequestData data; // The arguments of the revocation request. } /// @notice A struct representing the arguments of the full delegated revocation request. struct DelegatedRevocationRequest { bytes32 schema; // The unique identifier of the schema. RevocationRequestData data; // The arguments of the revocation request. Signature signature; // The ECDSA signature data. address revoker; // The revoking account. uint64 deadline; // The deadline of the signature/request. } /// @notice A struct representing the full arguments of the multi revocation request. struct MultiRevocationRequest { bytes32 schema; // The unique identifier of the schema. RevocationRequestData[] data; // The arguments of the revocation request. } /// @notice A struct representing the full arguments of the delegated multi revocation request. struct MultiDelegatedRevocationRequest { bytes32 schema; // The unique identifier of the schema. RevocationRequestData[] data; // The arguments of the revocation requests. Signature[] signatures; // The ECDSA signatures data. Please note that the signatures are assumed to be signed with increasing nonces. address revoker; // The revoking account. uint64 deadline; // The deadline of the signature/request. } /// @title IEAS /// @notice EAS - Ethereum Attestation Service interface. interface IEAS is ISemver { /// @notice Emitted when an attestation has been made. /// @param recipient The recipient of the attestation. /// @param attester The attesting account. /// @param uid The UID of the new attestation. /// @param schemaUID The UID of the schema. event Attested(address indexed recipient, address indexed attester, bytes32 uid, bytes32 indexed schemaUID); /// @notice Emitted when an attestation has been revoked. /// @param recipient The recipient of the attestation. /// @param attester The attesting account. /// @param schemaUID The UID of the schema. /// @param uid The UID the revoked attestation. event Revoked(address indexed recipient, address indexed attester, bytes32 uid, bytes32 indexed schemaUID); /// @notice Emitted when a data has been timestamped. /// @param data The data. /// @param timestamp The timestamp. event Timestamped(bytes32 indexed data, uint64 indexed timestamp); /// @notice Emitted when a data has been revoked. /// @param revoker The address of the revoker. /// @param data The data. /// @param timestamp The timestamp. event RevokedOffchain(address indexed revoker, bytes32 indexed data, uint64 indexed timestamp); /// @notice Returns the address of the global schema registry. /// @return The address of the global schema registry. function getSchemaRegistry() external view returns (ISchemaRegistry); /// @notice Attests to a specific schema. /// @param request The arguments of the attestation request. /// @return The UID of the new attestation. /// /// Example: /// attest({ /// schema: "0facc36681cbe2456019c1b0d1e7bedd6d1d40f6f324bf3dd3a4cef2999200a0", /// data: { /// recipient: "0xdEADBeAFdeAdbEafdeadbeafDeAdbEAFdeadbeaf", /// expirationTime: 0, /// revocable: true, /// refUID: "0x0000000000000000000000000000000000000000000000000000000000000000", /// data: "0xF00D", /// value: 0 /// } /// }) function attest(AttestationRequest calldata request) external payable returns (bytes32); /// @notice Attests to a specific schema via the provided ECDSA signature. /// @param delegatedRequest The arguments of the delegated attestation request. /// @return The UID of the new attestation. /// /// Example: /// attestByDelegation({ /// schema: '0x8e72f5bc0a8d4be6aa98360baa889040c50a0e51f32dbf0baa5199bd93472ebc', /// data: { /// recipient: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266', /// expirationTime: 1673891048, /// revocable: true, /// refUID: '0x0000000000000000000000000000000000000000000000000000000000000000', /// data: '0x1234', /// value: 0 /// }, /// signature: { /// v: 28, /// r: '0x148c...b25b', /// s: '0x5a72...be22' /// }, /// attester: '0xc5E8740aD971409492b1A63Db8d83025e0Fc427e', /// deadline: 1673891048 /// }) function attestByDelegation( DelegatedAttestationRequest calldata delegatedRequest ) external payable returns (bytes32); /// @notice Attests to multiple schemas. /// @param multiRequests The arguments of the multi attestation requests. The requests should be grouped by distinct /// schema ids to benefit from the best batching optimization. /// @return The UIDs of the new attestations. /// /// Example: /// multiAttest([{ /// schema: '0x33e9094830a5cba5554d1954310e4fbed2ef5f859ec1404619adea4207f391fd', /// data: [{ /// recipient: '0xdEADBeAFdeAdbEafdeadbeafDeAdbEAFdeadbeaf', /// expirationTime: 1673891048, /// revocable: true, /// refUID: '0x0000000000000000000000000000000000000000000000000000000000000000', /// data: '0x1234', /// value: 1000 /// }, /// { /// recipient: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266', /// expirationTime: 0, /// revocable: false, /// refUID: '0x480df4a039efc31b11bfdf491b383ca138b6bde160988222a2a3509c02cee174', /// data: '0x00', /// value: 0 /// }], /// }, /// { /// schema: '0x5ac273ce41e3c8bfa383efe7c03e54c5f0bff29c9f11ef6ffa930fc84ca32425', /// data: [{ /// recipient: '0xdEADBeAFdeAdbEafdeadbeafDeAdbEAFdeadbeaf', /// expirationTime: 0, /// revocable: true, /// refUID: '0x75bf2ed8dca25a8190c50c52db136664de25b2449535839008ccfdab469b214f', /// data: '0x12345678', /// value: 0 /// }, /// }]) function multiAttest(MultiAttestationRequest[] calldata multiRequests) external payable returns (bytes32[] memory); /// @notice Attests to multiple schemas using via provided ECDSA signatures. /// @param multiDelegatedRequests The arguments of the delegated multi attestation requests. The requests should be /// grouped by distinct schema ids to benefit from the best batching optimization. /// @return The UIDs of the new attestations. /// /// Example: /// multiAttestByDelegation([{ /// schema: '0x8e72f5bc0a8d4be6aa98360baa889040c50a0e51f32dbf0baa5199bd93472ebc', /// data: [{ /// recipient: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266', /// expirationTime: 1673891048, /// revocable: true, /// refUID: '0x0000000000000000000000000000000000000000000000000000000000000000', /// data: '0x1234', /// value: 0 /// }, /// { /// recipient: '0xdEADBeAFdeAdbEafdeadbeafDeAdbEAFdeadbeaf', /// expirationTime: 0, /// revocable: false, /// refUID: '0x0000000000000000000000000000000000000000000000000000000000000000', /// data: '0x00', /// value: 0 /// }], /// signatures: [{ /// v: 28, /// r: '0x148c...b25b', /// s: '0x5a72...be22' /// }, /// { /// v: 28, /// r: '0x487s...67bb', /// s: '0x12ad...2366' /// }], /// attester: '0x1D86495b2A7B524D747d2839b3C645Bed32e8CF4', /// deadline: 1673891048 /// }]) function multiAttestByDelegation( MultiDelegatedAttestationRequest[] calldata multiDelegatedRequests ) external payable returns (bytes32[] memory); /// @notice Revokes an existing attestation to a specific schema. /// @param request The arguments of the revocation request. /// /// Example: /// revoke({ /// schema: '0x8e72f5bc0a8d4be6aa98360baa889040c50a0e51f32dbf0baa5199bd93472ebc', /// data: { /// uid: '0x101032e487642ee04ee17049f99a70590c735b8614079fc9275f9dd57c00966d', /// value: 0 /// } /// }) function revoke(RevocationRequest calldata request) external payable; /// @notice Revokes an existing attestation to a specific schema via the provided ECDSA signature. /// @param delegatedRequest The arguments of the delegated revocation request. /// /// Example: /// revokeByDelegation({ /// schema: '0x8e72f5bc0a8d4be6aa98360baa889040c50a0e51f32dbf0baa5199bd93472ebc', /// data: { /// uid: '0xcbbc12102578c642a0f7b34fe7111e41afa25683b6cd7b5a14caf90fa14d24ba', /// value: 0 /// }, /// signature: { /// v: 27, /// r: '0xb593...7142', /// s: '0x0f5b...2cce' /// }, /// revoker: '0x244934dd3e31bE2c81f84ECf0b3E6329F5381992', /// deadline: 1673891048 /// }) function revokeByDelegation(DelegatedRevocationRequest calldata delegatedRequest) external payable; /// @notice Revokes existing attestations to multiple schemas. /// @param multiRequests The arguments of the multi revocation requests. The requests should be grouped by distinct /// schema ids to benefit from the best batching optimization. /// /// Example: /// multiRevoke([{ /// schema: '0x8e72f5bc0a8d4be6aa98360baa889040c50a0e51f32dbf0baa5199bd93472ebc', /// data: [{ /// uid: '0x211296a1ca0d7f9f2cfebf0daaa575bea9b20e968d81aef4e743d699c6ac4b25', /// value: 1000 /// }, /// { /// uid: '0xe160ac1bd3606a287b4d53d5d1d6da5895f65b4b4bab6d93aaf5046e48167ade', /// value: 0 /// }], /// }, /// { /// schema: '0x5ac273ce41e3c8bfa383efe7c03e54c5f0bff29c9f11ef6ffa930fc84ca32425', /// data: [{ /// uid: '0x053d42abce1fd7c8fcddfae21845ad34dae287b2c326220b03ba241bc5a8f019', /// value: 0 /// }, /// }]) function multiRevoke(MultiRevocationRequest[] calldata multiRequests) external payable; /// @notice Revokes existing attestations to multiple schemas via provided ECDSA signatures. /// @param multiDelegatedRequests The arguments of the delegated multi revocation attestation requests. The requests /// should be grouped by distinct schema ids to benefit from the best batching optimization. /// /// Example: /// multiRevokeByDelegation([{ /// schema: '0x8e72f5bc0a8d4be6aa98360baa889040c50a0e51f32dbf0baa5199bd93472ebc', /// data: [{ /// uid: '0x211296a1ca0d7f9f2cfebf0daaa575bea9b20e968d81aef4e743d699c6ac4b25', /// value: 1000 /// }, /// { /// uid: '0xe160ac1bd3606a287b4d53d5d1d6da5895f65b4b4bab6d93aaf5046e48167ade', /// value: 0 /// }], /// signatures: [{ /// v: 28, /// r: '0x148c...b25b', /// s: '0x5a72...be22' /// }, /// { /// v: 28, /// r: '0x487s...67bb', /// s: '0x12ad...2366' /// }], /// revoker: '0x244934dd3e31bE2c81f84ECf0b3E6329F5381992', /// deadline: 1673891048 /// }]) function multiRevokeByDelegation( MultiDelegatedRevocationRequest[] calldata multiDelegatedRequests ) external payable; /// @notice Timestamps the specified bytes32 data. /// @param data The data to timestamp. /// @return The timestamp the data was timestamped with. function timestamp(bytes32 data) external returns (uint64); /// @notice Timestamps the specified multiple bytes32 data. /// @param data The data to timestamp. /// @return The timestamp the data was timestamped with. function multiTimestamp(bytes32[] calldata data) external returns (uint64); /// @notice Revokes the specified bytes32 data. /// @param data The data to timestamp. /// @return The timestamp the data was revoked with. function revokeOffchain(bytes32 data) external returns (uint64); /// @notice Revokes the specified multiple bytes32 data. /// @param data The data to timestamp. /// @return The timestamp the data was revoked with. function multiRevokeOffchain(bytes32[] calldata data) external returns (uint64); /// @notice Returns an existing attestation by UID. /// @param uid The UID of the attestation to retrieve. /// @return The attestation data members. function getAttestation(bytes32 uid) external view returns (Attestation memory); /// @notice Checks whether an attestation exists. /// @param uid The UID of the attestation to retrieve. /// @return Whether an attestation exists. function isAttestationValid(bytes32 uid) external view returns (bool); /// @notice Returns the timestamp that the specified data was timestamped with. /// @param data The data to query. /// @return The timestamp the data was timestamped with. function getTimestamp(bytes32 data) external view returns (uint64); /// @notice Returns the timestamp that the specified data was timestamped with. /// @param data The data to query. /// @return The timestamp the data was timestamped with. function getRevokeOffchain(address revoker, bytes32 data) external view returns (uint64); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import { Strings } from "@openzeppelin/contracts/utils/Strings.sol"; import { ISemver } from "./ISemver.sol"; /// @title Semver /// @notice A simple contract for managing contract versions. contract Semver is ISemver { // Contract's major version number. uint256 private immutable _major; // Contract's minor version number. uint256 private immutable _minor; // Contract's patch version number. uint256 private immutable _patch; /// @dev Create a new Semver instance. /// @param major Major version number. /// @param minor Minor version number. /// @param patch Patch version number. constructor(uint256 major, uint256 minor, uint256 patch) { _major = major; _minor = minor; _patch = patch; } /// @notice Returns the full semver contract version. /// @return Semver contract version as a string. function version() external view returns (string memory) { return string( abi.encodePacked(Strings.toString(_major), ".", Strings.toString(_minor), ".", Strings.toString(_patch)) ); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import { Attestation } from "./../Common.sol"; import { ISemver } from "./../ISemver.sol"; /// @title ISchemaResolver /// @notice The interface of an optional schema resolver. interface ISchemaResolver is ISemver { /// @notice Checks if the resolver can be sent ETH. /// @return Whether the resolver supports ETH transfers. function isPayable() external pure returns (bool); /// @notice Processes an attestation and verifies whether it's valid. /// @param attestation The new attestation. /// @return Whether the attestation is valid. function attest(Attestation calldata attestation) external payable returns (bool); /// @notice Processes multiple attestations and verifies whether they are valid. /// @param attestations The new attestations. /// @param values Explicit ETH amounts which were sent with each attestation. /// @return Whether all the attestations are valid. function multiAttest( Attestation[] calldata attestations, uint256[] calldata values ) external payable returns (bool); /// @notice Processes an attestation revocation and verifies if it can be revoked. /// @param attestation The existing attestation to be revoked. /// @return Whether the attestation can be revoked. function revoke(Attestation calldata attestation) external payable returns (bool); /// @notice Processes revocation of multiple attestation and verifies they can be revoked. /// @param attestations The existing attestations to be revoked. /// @param values Explicit ETH amounts which were sent with each revocation. /// @return Whether the attestations can be revoked. function multiRevoke( Attestation[] calldata attestations, uint256[] calldata values ) external payable returns (bool); }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.3.0 // Creator: Chiru Labs pragma solidity ^0.8.4; import '../IERC721A.sol'; /** * @dev Interface of ERC721AQueryable. */ interface IERC721AQueryable is IERC721A { /** * Invalid query range (`start` >= `stop`). */ error InvalidQueryRange(); /** * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting. * * If the `tokenId` is out of bounds: * * - `addr = address(0)` * - `startTimestamp = 0` * - `burned = false` * - `extraData = 0` * * If the `tokenId` is burned: * * - `addr = <Address of owner before token was burned>` * - `startTimestamp = <Timestamp when token was burned>` * - `burned = true` * - `extraData = <Extra data when token was burned>` * * Otherwise: * * - `addr = <Address of owner>` * - `startTimestamp = <Timestamp of start of ownership>` * - `burned = false` * - `extraData = <Extra data at start of ownership>` */ function explicitOwnershipOf(uint256 tokenId) external view returns (TokenOwnership memory); /** * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order. * See {ERC721AQueryable-explicitOwnershipOf} */ function explicitOwnershipsOf(uint256[] memory tokenIds) external view returns (TokenOwnership[] memory); /** * @dev Returns an array of token IDs owned by `owner`, * in the range [`start`, `stop`) * (i.e. `start <= tokenId < stop`). * * This function allows for tokens to be queried if the collection * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}. * * Requirements: * * - `start < stop` */ function tokensOfOwnerIn( address owner, uint256 start, uint256 stop ) external view returns (uint256[] memory); /** * @dev Returns an array of token IDs owned by `owner`. * * This function scans the ownership mapping and is O(`totalSupply`) in complexity. * It is meant to be called off-chain. * * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into * multiple smaller scans if the collection is large enough to cause * an out-of-gas error (10K collections should be fine). */ /*function tokensOfOwner(address owner) external view returns (uint256[] memory);*/ }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.3.0 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721A.sol'; /** * @dev Interface of ERC721 token receiver. */ interface ERC721A__IERC721Receiver { function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); } /** * @title ERC721A * * @dev Implementation of the [ERC721](https://eips.ethereum.org/EIPS/eip-721) * Non-Fungible Token Standard, including the Metadata extension. * Optimized for lower gas during batch mints. * * Token IDs are minted in sequential order (e.g. 0, 1, 2, 3, ...) * starting from `_startTokenId()`. * * The `_sequentialUpTo()` function can be overriden to enable spot mints * (i.e. non-consecutive mints) for `tokenId`s greater than `_sequentialUpTo()`. * * Assumptions: * * - An owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * - The maximum token ID cannot exceed 2**256 - 1 (max value of uint256). */ contract ERC721A is IERC721A { // Bypass for a `--via-ir` bug (https://github.com/chiru-labs/ERC721A/pull/364). struct TokenApprovalRef { address value; } // ============================================================= // CONSTANTS // ============================================================= // Mask of an entry in packed address data. uint256 private constant _BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1; // The bit position of `numberMinted` in packed address data. uint256 private constant _BITPOS_NUMBER_MINTED = 64; // The bit position of `numberBurned` in packed address data. uint256 private constant _BITPOS_NUMBER_BURNED = 128; // The bit position of `aux` in packed address data. uint256 private constant _BITPOS_AUX = 192; // Mask of all 256 bits in packed address data except the 64 bits for `aux`. uint256 private constant _BITMASK_AUX_COMPLEMENT = (1 << 192) - 1; // The bit position of `startTimestamp` in packed ownership. uint256 private constant _BITPOS_START_TIMESTAMP = 160; // The bit mask of the `burned` bit in packed ownership. uint256 private constant _BITMASK_BURNED = 1 << 224; // The bit position of the `nextInitialized` bit in packed ownership. uint256 private constant _BITPOS_NEXT_INITIALIZED = 225; // The bit mask of the `nextInitialized` bit in packed ownership. uint256 private constant _BITMASK_NEXT_INITIALIZED = 1 << 225; // The bit position of `extraData` in packed ownership. uint256 private constant _BITPOS_EXTRA_DATA = 232; // Mask of all 256 bits in a packed ownership except the 24 bits for `extraData`. uint256 private constant _BITMASK_EXTRA_DATA_COMPLEMENT = (1 << 232) - 1; // The mask of the lower 160 bits for addresses. uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1; // The maximum `quantity` that can be minted with {_mintERC2309}. // This limit is to prevent overflows on the address data entries. // For a limit of 5000, a total of 3.689e15 calls to {_mintERC2309} // is required to cause an overflow, which is unrealistic. uint256 private constant _MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000; // The `Transfer` event signature is given by: // `keccak256(bytes("Transfer(address,address,uint256)"))`. bytes32 private constant _TRANSFER_EVENT_SIGNATURE = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef; // ============================================================= // STORAGE // ============================================================= // The next token ID to be minted. uint256 private _currentIndex; // The number of tokens burned. uint256 private _burnCounter; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. // See {_packedOwnershipOf} implementation for details. // // Bits Layout: // - [0..159] `addr` // - [160..223] `startTimestamp` // - [224] `burned` // - [225] `nextInitialized` // - [232..255] `extraData` mapping(uint256 => uint256) private _packedOwnerships; // Mapping owner address to address data. // // Bits Layout: // - [0..63] `balance` // - [64..127] `numberMinted` // - [128..191] `numberBurned` // - [192..255] `aux` mapping(address => uint256) private _packedAddressData; // Mapping from token ID to approved address. mapping(uint256 => TokenApprovalRef) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) internal _operatorApprovals; // The amount of tokens minted above `_sequentialUpTo()`. // We call these spot mints (i.e. non-sequential mints). uint256 private _spotMinted; // ============================================================= // CONSTRUCTOR // ============================================================= constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; _currentIndex = _startTokenId(); if (_sequentialUpTo() < _startTokenId()) _revert(SequentialUpToTooSmall.selector); } // ============================================================= // TOKEN COUNTING OPERATIONS // ============================================================= /** * @dev Returns the starting token ID for sequential mints. * * Override this function to change the starting token ID for sequential mints. * * Note: The value returned must never change after any tokens have been minted. */ function _startTokenId() internal view virtual returns (uint256) { return 0; } /** * @dev Returns the maximum token ID (inclusive) for sequential mints. * * Override this function to return a value less than 2**256 - 1, * but greater than `_startTokenId()`, to enable spot (non-sequential) mints. * * Note: The value returned must never change after any tokens have been minted. */ function _sequentialUpTo() internal view virtual returns (uint256) { return type(uint256).max; } /** * @dev Returns the next token ID to be minted. */ function _nextTokenId() internal view virtual returns (uint256) { return _currentIndex; } /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() public view virtual override returns (uint256 result) { // Counter underflow is impossible as `_burnCounter` cannot be incremented // more than `_currentIndex + _spotMinted - _startTokenId()` times. unchecked { // With spot minting, the intermediate `result` can be temporarily negative, // and the computation must be unchecked. result = _currentIndex - _burnCounter - _startTokenId(); if (_sequentialUpTo() != type(uint256).max) result += _spotMinted; } } /** * @dev Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view virtual returns (uint256 result) { // Counter underflow is impossible as `_currentIndex` does not decrement, // and it is initialized to `_startTokenId()`. unchecked { result = _currentIndex - _startTokenId(); if (_sequentialUpTo() != type(uint256).max) result += _spotMinted; } } /** * @dev Returns the total number of tokens burned. */ function _totalBurned() internal view virtual returns (uint256) { return _burnCounter; } /** * @dev Returns the total number of tokens that are spot-minted. */ function _totalSpotMinted() internal view virtual returns (uint256) { return _spotMinted; } // ============================================================= // ADDRESS DATA OPERATIONS // ============================================================= /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) public view virtual override returns (uint256) { if (owner == address(0)) _revert(BalanceQueryForZeroAddress.selector); return _packedAddressData[owner] & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> _BITPOS_NUMBER_MINTED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens burned by or on behalf of `owner`. */ function _numberBurned(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> _BITPOS_NUMBER_BURNED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). */ function _getAux(address owner) internal view returns (uint64) { return uint64(_packedAddressData[owner] >> _BITPOS_AUX); } /** * Sets the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). * If there are multiple variables, please pack them into a uint64. */ function _setAux(address owner, uint64 aux) internal virtual { uint256 packed = _packedAddressData[owner]; uint256 auxCasted; // Cast `aux` with assembly to avoid redundant masking. assembly { auxCasted := aux } packed = (packed & _BITMASK_AUX_COMPLEMENT) | (auxCasted << _BITPOS_AUX); _packedAddressData[owner] = packed; } // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { // The interface IDs are constants representing the first 4 bytes // of the XOR of all function selectors in the interface. // See: [ERC165](https://eips.ethereum.org/EIPS/eip-165) // (e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`) return interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165. interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721. interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata. } // ============================================================= // IERC721Metadata // ============================================================= /** * @dev Returns the token collection name. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the token collection symbol. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { if (!_exists(tokenId)) _revert(URIQueryForNonexistentToken.selector); string memory baseURI = _baseURI(); return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, _toString(tokenId))) : ''; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, it can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ''; } // ============================================================= // OWNERSHIPS OPERATIONS // ============================================================= /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { return address(uint160(_packedOwnershipOf(tokenId))); } /** * @dev Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around over time. */ function _ownershipOf(uint256 tokenId) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnershipOf(tokenId)); } /** * @dev Returns the unpacked `TokenOwnership` struct at `index`. */ function _ownershipAt(uint256 index) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnerships[index]); } /** * @dev Returns whether the ownership slot at `index` is initialized. * An uninitialized slot does not necessarily mean that the slot has no owner. */ function _ownershipIsInitialized(uint256 index) internal view virtual returns (bool) { return _packedOwnerships[index] != 0; } /** * @dev Initializes the ownership slot minted at `index` for efficiency purposes. */ function _initializeOwnershipAt(uint256 index) internal virtual { if (_packedOwnerships[index] == 0) { _packedOwnerships[index] = _packedOwnershipOf(index); } } /** * @dev Returns the packed ownership data of `tokenId`. */ function _packedOwnershipOf(uint256 tokenId) private view returns (uint256 packed) { if (_startTokenId() <= tokenId) { packed = _packedOwnerships[tokenId]; if (tokenId > _sequentialUpTo()) { if (_packedOwnershipExists(packed)) return packed; _revert(OwnerQueryForNonexistentToken.selector); } // If the data at the starting slot does not exist, start the scan. if (packed == 0) { if (tokenId >= _currentIndex) _revert(OwnerQueryForNonexistentToken.selector); // Invariant: // There will always be an initialized ownership slot // (i.e. `ownership.addr != address(0) && ownership.burned == false`) // before an unintialized ownership slot // (i.e. `ownership.addr == address(0) && ownership.burned == false`) // Hence, `tokenId` will not underflow. // // We can directly compare the packed value. // If the address is zero, packed will be zero. for (;;) { unchecked { packed = _packedOwnerships[--tokenId]; } if (packed == 0) continue; if (packed & _BITMASK_BURNED == 0) return packed; // Otherwise, the token is burned, and we must revert. // This handles the case of batch burned tokens, where only the burned bit // of the starting slot is set, and remaining slots are left uninitialized. _revert(OwnerQueryForNonexistentToken.selector); } } // Otherwise, the data exists and we can skip the scan. // This is possible because we have already achieved the target condition. // This saves 2143 gas on transfers of initialized tokens. // If the token is not burned, return `packed`. Otherwise, revert. if (packed & _BITMASK_BURNED == 0) return packed; } _revert(OwnerQueryForNonexistentToken.selector); } /** * @dev Returns the unpacked `TokenOwnership` struct from `packed`. */ function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) { ownership.addr = address(uint160(packed)); ownership.startTimestamp = uint64(packed >> _BITPOS_START_TIMESTAMP); ownership.burned = packed & _BITMASK_BURNED != 0; ownership.extraData = uint24(packed >> _BITPOS_EXTRA_DATA); } /** * @dev Packs ownership data into a single uint256. */ function _packOwnershipData(address owner, uint256 flags) private view returns (uint256 result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // `owner | (block.timestamp << _BITPOS_START_TIMESTAMP) | flags`. result := or(owner, or(shl(_BITPOS_START_TIMESTAMP, timestamp()), flags)) } } /** * @dev Returns the `nextInitialized` flag set if `quantity` equals 1. */ function _nextInitializedFlag(uint256 quantity) private pure returns (uint256 result) { // For branchless setting of the `nextInitialized` flag. assembly { // `(quantity == 1) << _BITPOS_NEXT_INITIALIZED`. result := shl(_BITPOS_NEXT_INITIALIZED, eq(quantity, 1)) } } // ============================================================= // APPROVAL OPERATIONS // ============================================================= /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. See {ERC721A-_approve}. * * Requirements: * * - The caller must own the token or be an approved operator. */ function approve(address to, uint256 tokenId) public payable virtual override { _approve(to, tokenId, true); } /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { if (!_exists(tokenId)) _revert(ApprovalQueryForNonexistentToken.selector); return _tokenApprovals[tokenId].value; } /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} * for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool approved) public virtual override { _operatorApprovals[_msgSenderERC721A()][operator] = approved; emit ApprovalForAll(_msgSenderERC721A(), operator, approved); } /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted. See {_mint}. */ function _exists(uint256 tokenId) internal view virtual returns (bool result) { if (_startTokenId() <= tokenId) { if (tokenId > _sequentialUpTo()) return _packedOwnershipExists(_packedOwnerships[tokenId]); if (tokenId < _currentIndex) { uint256 packed; while ((packed = _packedOwnerships[tokenId]) == 0) --tokenId; result = packed & _BITMASK_BURNED == 0; } } } /** * @dev Returns whether `packed` represents a token that exists. */ function _packedOwnershipExists(uint256 packed) private pure returns (bool result) { assembly { // The following is equivalent to `owner != address(0) && burned == false`. // Symbolically tested. result := gt(and(packed, _BITMASK_ADDRESS), and(packed, _BITMASK_BURNED)) } } /** * @dev Returns whether `msgSender` is equal to `approvedAddress` or `owner`. */ function _isSenderApprovedOrOwner( address approvedAddress, address owner, address msgSender ) private pure returns (bool result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // Mask `msgSender` to the lower 160 bits, in case the upper bits somehow aren't clean. msgSender := and(msgSender, _BITMASK_ADDRESS) // `msgSender == owner || msgSender == approvedAddress`. result := or(eq(msgSender, owner), eq(msgSender, approvedAddress)) } } /** * @dev Returns the storage slot and value for the approved address of `tokenId`. */ function _getApprovedSlotAndAddress(uint256 tokenId) private view returns (uint256 approvedAddressSlot, address approvedAddress) { TokenApprovalRef storage tokenApproval = _tokenApprovals[tokenId]; // The following is equivalent to `approvedAddress = _tokenApprovals[tokenId].value`. assembly { approvedAddressSlot := tokenApproval.slot approvedAddress := sload(approvedAddressSlot) } } // ============================================================= // TRANSFER OPERATIONS // ============================================================= /** * @dev Transfers `tokenId` from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) public payable virtual override { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); // Mask `from` to the lower 160 bits, in case the upper bits somehow aren't clean. from = address(uint160(uint256(uint160(from)) & _BITMASK_ADDRESS)); if (address(uint160(prevOwnershipPacked)) != from) _revert(TransferFromIncorrectOwner.selector); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) _revert(TransferCallerNotOwnerNorApproved.selector); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // We can directly increment and decrement the balances. --_packedAddressData[from]; // Updates: `balance -= 1`. ++_packedAddressData[to]; // Updates: `balance += 1`. // Updates: // - `address` to the next owner. // - `startTimestamp` to the timestamp of transfering. // - `burned` to `false`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( to, _BITMASK_NEXT_INITIALIZED | _nextExtraData(from, to, prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean. uint256 toMasked = uint256(uint160(to)) & _BITMASK_ADDRESS; assembly { // Emit the `Transfer` event. log4( 0, // Start of data (0, since no data). 0, // End of data (0, since no data). _TRANSFER_EVENT_SIGNATURE, // Signature. from, // `from`. toMasked, // `to`. tokenId // `tokenId`. ) } if (toMasked == 0) _revert(TransferToZeroAddress.selector); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public payable virtual override { safeTransferFrom(from, to, tokenId, ''); } /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public payable virtual override { transferFrom(from, to, tokenId); if (to.code.length != 0) if (!_checkContractOnERC721Received(from, to, tokenId, _data)) { _revert(TransferToNonERC721ReceiverImplementer.selector); } } /** * @dev Hook that is called before a set of serially-ordered token IDs * are about to be transferred. This includes minting. * And also called before burning one token. * * `startTokenId` - the first token ID to be transferred. * `quantity` - the amount to be transferred. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token IDs * have been transferred. This includes minting. * And also called after one token has been burned. * * `startTokenId` - the first token ID to be transferred. * `quantity` - the amount to be transferred. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target contract. * * `from` - Previous owner of the given token ID. * `to` - Target address that will receive the token. * `tokenId` - Token ID to be transferred. * `_data` - Optional data to send along with the call. * * Returns whether the call correctly returned the expected magic value. */ function _checkContractOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { try ERC721A__IERC721Receiver(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data) returns ( bytes4 retval ) { return retval == ERC721A__IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { _revert(TransferToNonERC721ReceiverImplementer.selector); } assembly { revert(add(32, reason), mload(reason)) } } } // ============================================================= // MINT OPERATIONS // ============================================================= /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event for each mint. */ function _mint(address to, uint256 quantity) internal virtual { uint256 startTokenId = _currentIndex; if (quantity == 0) _revert(MintZeroQuantity.selector); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // `balance` and `numberMinted` have a maximum limit of 2**64. // `tokenId` has a maximum limit of 2**256. unchecked { // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean. uint256 toMasked = uint256(uint160(to)) & _BITMASK_ADDRESS; if (toMasked == 0) _revert(MintToZeroAddress.selector); uint256 end = startTokenId + quantity; uint256 tokenId = startTokenId; if (end - 1 > _sequentialUpTo()) _revert(SequentialMintExceedsLimit.selector); do { assembly { // Emit the `Transfer` event. log4( 0, // Start of data (0, since no data). 0, // End of data (0, since no data). _TRANSFER_EVENT_SIGNATURE, // Signature. 0, // `address(0)`. toMasked, // `to`. tokenId // `tokenId`. ) } // The `!=` check ensures that large values of `quantity` // that overflows uint256 will make the loop run out of gas. } while (++tokenId != end); _currentIndex = end; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * This function is intended for efficient minting only during contract creation. * * It emits only one {ConsecutiveTransfer} as defined in * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309), * instead of a sequence of {Transfer} event(s). * * Calling this function outside of contract creation WILL make your contract * non-compliant with the ERC721 standard. * For full ERC721 compliance, substituting ERC721 {Transfer} event(s) with the ERC2309 * {ConsecutiveTransfer} event is only permissible during contract creation. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {ConsecutiveTransfer} event. */ function _mintERC2309(address to, uint256 quantity) internal virtual { uint256 startTokenId = _currentIndex; if (to == address(0)) _revert(MintToZeroAddress.selector); if (quantity == 0) _revert(MintZeroQuantity.selector); if (quantity > _MAX_MINT_ERC2309_QUANTITY_LIMIT) _revert(MintERC2309QuantityExceedsLimit.selector); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are unrealistic due to the above check for `quantity` to be below the limit. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); if (startTokenId + quantity - 1 > _sequentialUpTo()) _revert(SequentialMintExceedsLimit.selector); emit ConsecutiveTransfer(startTokenId, startTokenId + quantity - 1, address(0), to); _currentIndex = startTokenId + quantity; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * See {_mint}. * * Emits a {Transfer} event for each mint. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal virtual { _mint(to, quantity); unchecked { if (to.code.length != 0) { uint256 end = _currentIndex; uint256 index = end - quantity; do { if (!_checkContractOnERC721Received(address(0), to, index++, _data)) { _revert(TransferToNonERC721ReceiverImplementer.selector); } } while (index < end); // This prevents reentrancy to `_safeMint`. // It does not prevent reentrancy to `_safeMintSpot`. if (_currentIndex != end) revert(); } } } /** * @dev Equivalent to `_safeMint(to, quantity, '')`. */ function _safeMint(address to, uint256 quantity) internal virtual { _safeMint(to, quantity, ''); } /** * @dev Mints a single token at `tokenId`. * * Note: A spot-minted `tokenId` that has been burned can be re-minted again. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` must be greater than `_sequentialUpTo()`. * - `tokenId` must not exist. * * Emits a {Transfer} event for each mint. */ function _mintSpot(address to, uint256 tokenId) internal virtual { if (tokenId <= _sequentialUpTo()) _revert(SpotMintTokenIdTooSmall.selector); uint256 prevOwnershipPacked = _packedOwnerships[tokenId]; if (_packedOwnershipExists(prevOwnershipPacked)) _revert(TokenAlreadyExists.selector); _beforeTokenTransfers(address(0), to, tokenId, 1); // Overflows are incredibly unrealistic. // The `numberMinted` for `to` is incremented by 1, and has a max limit of 2**64 - 1. // `_spotMinted` is incremented by 1, and has a max limit of 2**256 - 1. unchecked { // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `true` (as `quantity == 1`). _packedOwnerships[tokenId] = _packOwnershipData( to, _nextInitializedFlag(1) | _nextExtraData(address(0), to, prevOwnershipPacked) ); // Updates: // - `balance += 1`. // - `numberMinted += 1`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += (1 << _BITPOS_NUMBER_MINTED) | 1; // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean. uint256 toMasked = uint256(uint160(to)) & _BITMASK_ADDRESS; if (toMasked == 0) _revert(MintToZeroAddress.selector); assembly { // Emit the `Transfer` event. log4( 0, // Start of data (0, since no data). 0, // End of data (0, since no data). _TRANSFER_EVENT_SIGNATURE, // Signature. 0, // `address(0)`. toMasked, // `to`. tokenId // `tokenId`. ) } ++_spotMinted; } _afterTokenTransfers(address(0), to, tokenId, 1); } /** * @dev Safely mints a single token at `tokenId`. * * Note: A spot-minted `tokenId` that has been burned can be re-minted again. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}. * - `tokenId` must be greater than `_sequentialUpTo()`. * - `tokenId` must not exist. * * See {_mintSpot}. * * Emits a {Transfer} event. */ function _safeMintSpot( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mintSpot(to, tokenId); unchecked { if (to.code.length != 0) { uint256 currentSpotMinted = _spotMinted; if (!_checkContractOnERC721Received(address(0), to, tokenId, _data)) { _revert(TransferToNonERC721ReceiverImplementer.selector); } // This prevents reentrancy to `_safeMintSpot`. // It does not prevent reentrancy to `_safeMint`. if (_spotMinted != currentSpotMinted) revert(); } } } /** * @dev Equivalent to `_safeMintSpot(to, tokenId, '')`. */ function _safeMintSpot(address to, uint256 tokenId) internal virtual { _safeMintSpot(to, tokenId, ''); } // ============================================================= // APPROVAL OPERATIONS // ============================================================= /** * @dev Equivalent to `_approve(to, tokenId, false)`. */ function _approve(address to, uint256 tokenId) internal virtual { _approve(to, tokenId, false); } /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the * zero address clears previous approvals. * * Requirements: * * - `tokenId` must exist. * * Emits an {Approval} event. */ function _approve( address to, uint256 tokenId, bool approvalCheck ) internal virtual { address owner = ownerOf(tokenId); if (approvalCheck && _msgSenderERC721A() != owner) if (!isApprovedForAll(owner, _msgSenderERC721A())) { _revert(ApprovalCallerNotOwnerNorApproved.selector); } _tokenApprovals[tokenId].value = to; emit Approval(owner, to, tokenId); } // ============================================================= // BURN OPERATIONS // ============================================================= /** * @dev Equivalent to `_burn(tokenId, false)`. */ function _burn(uint256 tokenId) internal virtual returns (address from) { return _burn(tokenId, false); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId, bool approvalCheck) internal virtual returns (address from) { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); from = address(uint160(prevOwnershipPacked)); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); if (approvalCheck) { // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) _revert(TransferCallerNotOwnerNorApproved.selector); } _beforeTokenTransfers(from, address(0), tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // Updates: // - `balance -= 1`. // - `numberBurned += 1`. // // We can directly decrement the balance, and increment the number burned. // This is equivalent to `packed -= 1; packed += 1 << _BITPOS_NUMBER_BURNED;`. _packedAddressData[from] += (1 << _BITPOS_NUMBER_BURNED) - 1; // Updates: // - `address` to the last owner. // - `startTimestamp` to the timestamp of burning. // - `burned` to `true`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( from, (_BITMASK_BURNED | _BITMASK_NEXT_INITIALIZED) | _nextExtraData(from, address(0), prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, address(0), tokenId); _afterTokenTransfers(from, address(0), tokenId, 1); // Overflow not possible, as `_burnCounter` cannot be exceed `_currentIndex + _spotMinted` times. unchecked { _burnCounter++; } } // ============================================================= // EXTRA DATA OPERATIONS // ============================================================= /** * @dev Directly sets the extra data for the ownership data `index`. */ function _setExtraDataAt(uint256 index, uint24 extraData) internal virtual { uint256 packed = _packedOwnerships[index]; if (packed == 0) _revert(OwnershipNotInitializedForExtraData.selector); uint256 extraDataCasted; // Cast `extraData` with assembly to avoid redundant masking. assembly { extraDataCasted := extraData } packed = (packed & _BITMASK_EXTRA_DATA_COMPLEMENT) | (extraDataCasted << _BITPOS_EXTRA_DATA); _packedOwnerships[index] = packed; } /** * @dev Called during each token transfer to set the 24bit `extraData` field. * Intended to be overridden by the cosumer contract. * * `previousExtraData` - the value of `extraData` before transfer. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _extraData( address from, address to, uint24 previousExtraData ) internal view virtual returns (uint24) {} /** * @dev Returns the next extra data for the packed ownership data. * The returned result is shifted into position. */ function _nextExtraData( address from, address to, uint256 prevOwnershipPacked ) private view returns (uint256) { uint24 extraData = uint24(prevOwnershipPacked >> _BITPOS_EXTRA_DATA); return uint256(_extraData(from, to, extraData)) << _BITPOS_EXTRA_DATA; } // ============================================================= // OTHER OPERATIONS // ============================================================= /** * @dev Returns the message sender (defaults to `msg.sender`). * * If you are writing GSN compatible contracts, you need to override this function. */ function _msgSenderERC721A() internal view virtual returns (address) { return msg.sender; } /** * @dev Converts a uint256 to its ASCII string decimal representation. */ function _toString(uint256 value) internal pure virtual returns (string memory str) { assembly { // The maximum value of a uint256 contains 78 digits (1 byte per digit), but // we allocate 0xa0 bytes to keep the free memory pointer 32-byte word aligned. // We will need 1 word for the trailing zeros padding, 1 word for the length, // and 3 words for a maximum of 78 digits. Total: 5 * 0x20 = 0xa0. let m := add(mload(0x40), 0xa0) // Update the free memory pointer to allocate. mstore(0x40, m) // Assign the `str` to the end. str := sub(m, 0x20) // Zeroize the slot after the string. mstore(str, 0) // Cache the end of the memory to calculate the length later. let end := str // We write the string from rightmost digit to leftmost digit. // The following is essentially a do-while loop that also handles the zero case. // prettier-ignore for { let temp := value } 1 {} { str := sub(str, 1) // Write the character to the pointer. // The ASCII index of the '0' character is 48. mstore8(str, add(48, mod(temp, 10))) // Keep dividing `temp` until zero. temp := div(temp, 10) // prettier-ignore if iszero(temp) { break } } let length := sub(end, str) // Move the pointer 32 bytes leftwards to make room for the length. str := sub(str, 0x20) // Store the length. mstore(str, length) } } /** * @dev For more efficient reverts. */ function _revert(bytes4 errorSelector) internal pure { assembly { mstore(0x00, errorSelector) revert(0x00, 0x04) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/extensions/AccessControlDefaultAdminRules.sol) pragma solidity ^0.8.20; import {IAccessControlDefaultAdminRules} from "./IAccessControlDefaultAdminRules.sol"; import {AccessControl, IAccessControl} from "../AccessControl.sol"; import {SafeCast} from "../../utils/math/SafeCast.sol"; import {Math} from "../../utils/math/Math.sol"; import {IERC5313} from "../../interfaces/IERC5313.sol"; /** * @dev Extension of {AccessControl} that allows specifying special rules to manage * the `DEFAULT_ADMIN_ROLE` holder, which is a sensitive role with special permissions * over other roles that may potentially have privileged rights in the system. * * If a specific role doesn't have an admin role assigned, the holder of the * `DEFAULT_ADMIN_ROLE` will have the ability to grant it and revoke it. * * This contract implements the following risk mitigations on top of {AccessControl}: * * * Only one account holds the `DEFAULT_ADMIN_ROLE` since deployment until it's potentially renounced. * * Enforces a 2-step process to transfer the `DEFAULT_ADMIN_ROLE` to another account. * * Enforces a configurable delay between the two steps, with the ability to cancel before the transfer is accepted. * * The delay can be changed by scheduling, see {changeDefaultAdminDelay}. * * It is not possible to use another role to manage the `DEFAULT_ADMIN_ROLE`. * * Example usage: * * ```solidity * contract MyToken is AccessControlDefaultAdminRules { * constructor() AccessControlDefaultAdminRules( * 3 days, * msg.sender // Explicit initial `DEFAULT_ADMIN_ROLE` holder * ) {} * } * ``` */ abstract contract AccessControlDefaultAdminRules is IAccessControlDefaultAdminRules, IERC5313, AccessControl { // pending admin pair read/written together frequently address private _pendingDefaultAdmin; uint48 private _pendingDefaultAdminSchedule; // 0 == unset uint48 private _currentDelay; address private _currentDefaultAdmin; // pending delay pair read/written together frequently uint48 private _pendingDelay; uint48 private _pendingDelaySchedule; // 0 == unset /** * @dev Sets the initial values for {defaultAdminDelay} and {defaultAdmin} address. */ constructor(uint48 initialDelay, address initialDefaultAdmin) { if (initialDefaultAdmin == address(0)) { revert AccessControlInvalidDefaultAdmin(address(0)); } _currentDelay = initialDelay; _grantRole(DEFAULT_ADMIN_ROLE, initialDefaultAdmin); } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControlDefaultAdminRules).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC5313-owner}. */ function owner() public view virtual returns (address) { return defaultAdmin(); } /// /// Override AccessControl role management /// /** * @dev See {AccessControl-grantRole}. Reverts for `DEFAULT_ADMIN_ROLE`. */ function grantRole(bytes32 role, address account) public virtual override(AccessControl, IAccessControl) { if (role == DEFAULT_ADMIN_ROLE) { revert AccessControlEnforcedDefaultAdminRules(); } super.grantRole(role, account); } /** * @dev See {AccessControl-revokeRole}. Reverts for `DEFAULT_ADMIN_ROLE`. */ function revokeRole(bytes32 role, address account) public virtual override(AccessControl, IAccessControl) { if (role == DEFAULT_ADMIN_ROLE) { revert AccessControlEnforcedDefaultAdminRules(); } super.revokeRole(role, account); } /** * @dev See {AccessControl-renounceRole}. * * For the `DEFAULT_ADMIN_ROLE`, it only allows renouncing in two steps by first calling * {beginDefaultAdminTransfer} to the `address(0)`, so it's required that the {pendingDefaultAdmin} schedule * has also passed when calling this function. * * After its execution, it will not be possible to call `onlyRole(DEFAULT_ADMIN_ROLE)` functions. * * NOTE: Renouncing `DEFAULT_ADMIN_ROLE` will leave the contract without a {defaultAdmin}, * thereby disabling any functionality that is only available for it, and the possibility of reassigning a * non-administrated role. */ function renounceRole(bytes32 role, address account) public virtual override(AccessControl, IAccessControl) { if (role == DEFAULT_ADMIN_ROLE && account == defaultAdmin()) { (address newDefaultAdmin, uint48 schedule) = pendingDefaultAdmin(); if (newDefaultAdmin != address(0) || !_isScheduleSet(schedule) || !_hasSchedulePassed(schedule)) { revert AccessControlEnforcedDefaultAdminDelay(schedule); } delete _pendingDefaultAdminSchedule; } super.renounceRole(role, account); } /** * @dev See {AccessControl-_grantRole}. * * For `DEFAULT_ADMIN_ROLE`, it only allows granting if there isn't already a {defaultAdmin} or if the * role has been previously renounced. * * NOTE: Exposing this function through another mechanism may make the `DEFAULT_ADMIN_ROLE` * assignable again. Make sure to guarantee this is the expected behavior in your implementation. */ function _grantRole(bytes32 role, address account) internal virtual override returns (bool) { if (role == DEFAULT_ADMIN_ROLE) { if (defaultAdmin() != address(0)) { revert AccessControlEnforcedDefaultAdminRules(); } _currentDefaultAdmin = account; } return super._grantRole(role, account); } /** * @dev See {AccessControl-_revokeRole}. */ function _revokeRole(bytes32 role, address account) internal virtual override returns (bool) { if (role == DEFAULT_ADMIN_ROLE && account == defaultAdmin()) { delete _currentDefaultAdmin; } return super._revokeRole(role, account); } /** * @dev See {AccessControl-_setRoleAdmin}. Reverts for `DEFAULT_ADMIN_ROLE`. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual override { if (role == DEFAULT_ADMIN_ROLE) { revert AccessControlEnforcedDefaultAdminRules(); } super._setRoleAdmin(role, adminRole); } /// /// AccessControlDefaultAdminRules accessors /// /** * @inheritdoc IAccessControlDefaultAdminRules */ function defaultAdmin() public view virtual returns (address) { return _currentDefaultAdmin; } /** * @inheritdoc IAccessControlDefaultAdminRules */ function pendingDefaultAdmin() public view virtual returns (address newAdmin, uint48 schedule) { return (_pendingDefaultAdmin, _pendingDefaultAdminSchedule); } /** * @inheritdoc IAccessControlDefaultAdminRules */ function defaultAdminDelay() public view virtual returns (uint48) { uint48 schedule = _pendingDelaySchedule; return (_isScheduleSet(schedule) && _hasSchedulePassed(schedule)) ? _pendingDelay : _currentDelay; } /** * @inheritdoc IAccessControlDefaultAdminRules */ function pendingDefaultAdminDelay() public view virtual returns (uint48 newDelay, uint48 schedule) { schedule = _pendingDelaySchedule; return (_isScheduleSet(schedule) && !_hasSchedulePassed(schedule)) ? (_pendingDelay, schedule) : (0, 0); } /** * @inheritdoc IAccessControlDefaultAdminRules */ function defaultAdminDelayIncreaseWait() public view virtual returns (uint48) { return 5 days; } /// /// AccessControlDefaultAdminRules public and internal setters for defaultAdmin/pendingDefaultAdmin /// /** * @inheritdoc IAccessControlDefaultAdminRules */ function beginDefaultAdminTransfer(address newAdmin) public virtual onlyRole(DEFAULT_ADMIN_ROLE) { _beginDefaultAdminTransfer(newAdmin); } /** * @dev See {beginDefaultAdminTransfer}. * * Internal function without access restriction. */ function _beginDefaultAdminTransfer(address newAdmin) internal virtual { uint48 newSchedule = SafeCast.toUint48(block.timestamp) + defaultAdminDelay(); _setPendingDefaultAdmin(newAdmin, newSchedule); emit DefaultAdminTransferScheduled(newAdmin, newSchedule); } /** * @inheritdoc IAccessControlDefaultAdminRules */ function cancelDefaultAdminTransfer() public virtual onlyRole(DEFAULT_ADMIN_ROLE) { _cancelDefaultAdminTransfer(); } /** * @dev See {cancelDefaultAdminTransfer}. * * Internal function without access restriction. */ function _cancelDefaultAdminTransfer() internal virtual { _setPendingDefaultAdmin(address(0), 0); } /** * @inheritdoc IAccessControlDefaultAdminRules */ function acceptDefaultAdminTransfer() public virtual { (address newDefaultAdmin, ) = pendingDefaultAdmin(); if (_msgSender() != newDefaultAdmin) { // Enforce newDefaultAdmin explicit acceptance. revert AccessControlInvalidDefaultAdmin(_msgSender()); } _acceptDefaultAdminTransfer(); } /** * @dev See {acceptDefaultAdminTransfer}. * * Internal function without access restriction. */ function _acceptDefaultAdminTransfer() internal virtual { (address newAdmin, uint48 schedule) = pendingDefaultAdmin(); if (!_isScheduleSet(schedule) || !_hasSchedulePassed(schedule)) { revert AccessControlEnforcedDefaultAdminDelay(schedule); } _revokeRole(DEFAULT_ADMIN_ROLE, defaultAdmin()); _grantRole(DEFAULT_ADMIN_ROLE, newAdmin); delete _pendingDefaultAdmin; delete _pendingDefaultAdminSchedule; } /// /// AccessControlDefaultAdminRules public and internal setters for defaultAdminDelay/pendingDefaultAdminDelay /// /** * @inheritdoc IAccessControlDefaultAdminRules */ function changeDefaultAdminDelay(uint48 newDelay) public virtual onlyRole(DEFAULT_ADMIN_ROLE) { _changeDefaultAdminDelay(newDelay); } /** * @dev See {changeDefaultAdminDelay}. * * Internal function without access restriction. */ function _changeDefaultAdminDelay(uint48 newDelay) internal virtual { uint48 newSchedule = SafeCast.toUint48(block.timestamp) + _delayChangeWait(newDelay); _setPendingDelay(newDelay, newSchedule); emit DefaultAdminDelayChangeScheduled(newDelay, newSchedule); } /** * @inheritdoc IAccessControlDefaultAdminRules */ function rollbackDefaultAdminDelay() public virtual onlyRole(DEFAULT_ADMIN_ROLE) { _rollbackDefaultAdminDelay(); } /** * @dev See {rollbackDefaultAdminDelay}. * * Internal function without access restriction. */ function _rollbackDefaultAdminDelay() internal virtual { _setPendingDelay(0, 0); } /** * @dev Returns the amount of seconds to wait after the `newDelay` will * become the new {defaultAdminDelay}. * * The value returned guarantees that if the delay is reduced, it will go into effect * after a wait that honors the previously set delay. * * See {defaultAdminDelayIncreaseWait}. */ function _delayChangeWait(uint48 newDelay) internal view virtual returns (uint48) { uint48 currentDelay = defaultAdminDelay(); // When increasing the delay, we schedule the delay change to occur after a period of "new delay" has passed, up // to a maximum given by defaultAdminDelayIncreaseWait, by default 5 days. For example, if increasing from 1 day // to 3 days, the new delay will come into effect after 3 days. If increasing from 1 day to 10 days, the new // delay will come into effect after 5 days. The 5 day wait period is intended to be able to fix an error like // using milliseconds instead of seconds. // // When decreasing the delay, we wait the difference between "current delay" and "new delay". This guarantees // that an admin transfer cannot be made faster than "current delay" at the time the delay change is scheduled. // For example, if decreasing from 10 days to 3 days, the new delay will come into effect after 7 days. return newDelay > currentDelay ? uint48(Math.min(newDelay, defaultAdminDelayIncreaseWait())) // no need to safecast, both inputs are uint48 : currentDelay - newDelay; } /// /// Private setters /// /** * @dev Setter of the tuple for pending admin and its schedule. * * May emit a DefaultAdminTransferCanceled event. */ function _setPendingDefaultAdmin(address newAdmin, uint48 newSchedule) private { (, uint48 oldSchedule) = pendingDefaultAdmin(); _pendingDefaultAdmin = newAdmin; _pendingDefaultAdminSchedule = newSchedule; // An `oldSchedule` from `pendingDefaultAdmin()` is only set if it hasn't been accepted. if (_isScheduleSet(oldSchedule)) { // Emit for implicit cancellations when another default admin was scheduled. emit DefaultAdminTransferCanceled(); } } /** * @dev Setter of the tuple for pending delay and its schedule. * * May emit a DefaultAdminDelayChangeCanceled event. */ function _setPendingDelay(uint48 newDelay, uint48 newSchedule) private { uint48 oldSchedule = _pendingDelaySchedule; if (_isScheduleSet(oldSchedule)) { if (_hasSchedulePassed(oldSchedule)) { // Materialize a virtual delay _currentDelay = _pendingDelay; } else { // Emit for implicit cancellations when another delay was scheduled. emit DefaultAdminDelayChangeCanceled(); } } _pendingDelay = newDelay; _pendingDelaySchedule = newSchedule; } /// /// Private helpers /// /** * @dev Defines if an `schedule` is considered set. For consistency purposes. */ function _isScheduleSet(uint48 schedule) private pure returns (bool) { return schedule != 0; } /** * @dev Defines if an `schedule` is considered passed. For consistency purposes. */ function _hasSchedulePassed(uint48 schedule) private view returns (bool) { return schedule < block.timestamp; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.20; import {IERC20} from "../IERC20.sol"; import {IERC20Permit} from "../extensions/IERC20Permit.sol"; import {Address} from "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; /** * @dev An operation with an ERC20 token failed. */ error SafeERC20FailedOperation(address token); /** * @dev Indicates a failed `decreaseAllowance` request. */ error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease); /** * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value))); } /** * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful. */ function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value))); } /** * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 oldAllowance = token.allowance(address(this), spender); forceApprove(token, spender, oldAllowance + value); } /** * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no * value, non-reverting calls are assumed to be successful. */ function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal { unchecked { uint256 currentAllowance = token.allowance(address(this), spender); if (currentAllowance < requestedDecrease) { revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease); } forceApprove(token, spender, currentAllowance - requestedDecrease); } } /** * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval * to be set to zero before setting it to a non-zero value, such as USDT. */ function forceApprove(IERC20 token, address spender, uint256 value) internal { bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value)); if (!_callOptionalReturnBool(token, approvalCall)) { _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0))); _callOptionalReturn(token, approvalCall); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data); if (returndata.length != 0 && !abi.decode(returndata, (bool))) { revert SafeERC20FailedOperation(address(token)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). * * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead. */ function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false // and not revert is the subcall reverts. (bool success, bytes memory returndata) = address(token).call(data); return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && address(token).code.length > 0; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import { ISemver } from "./ISemver.sol"; import { ISchemaResolver } from "./resolver/ISchemaResolver.sol"; /// @notice A struct representing a record for a submitted schema. struct SchemaRecord { bytes32 uid; // The unique identifier of the schema. ISchemaResolver resolver; // Optional schema resolver. bool revocable; // Whether the schema allows revocations explicitly. string schema; // Custom specification of the schema (e.g., an ABI). } /// @title ISchemaRegistry /// @notice The interface of global attestation schemas for the Ethereum Attestation Service protocol. interface ISchemaRegistry is ISemver { /// @notice Emitted when a new schema has been registered /// @param uid The schema UID. /// @param registerer The address of the account used to register the schema. /// @param schema The schema data. event Registered(bytes32 indexed uid, address indexed registerer, SchemaRecord schema); /// @notice Submits and reserves a new schema /// @param schema The schema data schema. /// @param resolver An optional schema resolver. /// @param revocable Whether the schema allows revocations explicitly. /// @return The UID of the new schema. function register(string calldata schema, ISchemaResolver resolver, bool revocable) external returns (bytes32); /// @notice Returns an existing schema by UID /// @param uid The UID of the schema to retrieve. /// @return The schema data members. function getSchema(bytes32 uid) external view returns (SchemaRecord memory); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /// @title ISemver /// @notice A semver interface. interface ISemver { /// @notice Returns the full semver contract version. /// @return Semver contract version as a string. function version() external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/extensions/IAccessControlDefaultAdminRules.sol) pragma solidity ^0.8.20; import {IAccessControl} from "../IAccessControl.sol"; /** * @dev External interface of AccessControlDefaultAdminRules declared to support ERC165 detection. */ interface IAccessControlDefaultAdminRules is IAccessControl { /** * @dev The new default admin is not a valid default admin. */ error AccessControlInvalidDefaultAdmin(address defaultAdmin); /** * @dev At least one of the following rules was violated: * * - The `DEFAULT_ADMIN_ROLE` must only be managed by itself. * - The `DEFAULT_ADMIN_ROLE` must only be held by one account at the time. * - Any `DEFAULT_ADMIN_ROLE` transfer must be in two delayed steps. */ error AccessControlEnforcedDefaultAdminRules(); /** * @dev The delay for transferring the default admin delay is enforced and * the operation must wait until `schedule`. * * NOTE: `schedule` can be 0 indicating there's no transfer scheduled. */ error AccessControlEnforcedDefaultAdminDelay(uint48 schedule); /** * @dev Emitted when a {defaultAdmin} transfer is started, setting `newAdmin` as the next * address to become the {defaultAdmin} by calling {acceptDefaultAdminTransfer} only after `acceptSchedule` * passes. */ event DefaultAdminTransferScheduled(address indexed newAdmin, uint48 acceptSchedule); /** * @dev Emitted when a {pendingDefaultAdmin} is reset if it was never accepted, regardless of its schedule. */ event DefaultAdminTransferCanceled(); /** * @dev Emitted when a {defaultAdminDelay} change is started, setting `newDelay` as the next * delay to be applied between default admin transfer after `effectSchedule` has passed. */ event DefaultAdminDelayChangeScheduled(uint48 newDelay, uint48 effectSchedule); /** * @dev Emitted when a {pendingDefaultAdminDelay} is reset if its schedule didn't pass. */ event DefaultAdminDelayChangeCanceled(); /** * @dev Returns the address of the current `DEFAULT_ADMIN_ROLE` holder. */ function defaultAdmin() external view returns (address); /** * @dev Returns a tuple of a `newAdmin` and an accept schedule. * * After the `schedule` passes, the `newAdmin` will be able to accept the {defaultAdmin} role * by calling {acceptDefaultAdminTransfer}, completing the role transfer. * * A zero value only in `acceptSchedule` indicates no pending admin transfer. * * NOTE: A zero address `newAdmin` means that {defaultAdmin} is being renounced. */ function pendingDefaultAdmin() external view returns (address newAdmin, uint48 acceptSchedule); /** * @dev Returns the delay required to schedule the acceptance of a {defaultAdmin} transfer started. * * This delay will be added to the current timestamp when calling {beginDefaultAdminTransfer} to set * the acceptance schedule. * * NOTE: If a delay change has been scheduled, it will take effect as soon as the schedule passes, making this * function returns the new delay. See {changeDefaultAdminDelay}. */ function defaultAdminDelay() external view returns (uint48); /** * @dev Returns a tuple of `newDelay` and an effect schedule. * * After the `schedule` passes, the `newDelay` will get into effect immediately for every * new {defaultAdmin} transfer started with {beginDefaultAdminTransfer}. * * A zero value only in `effectSchedule` indicates no pending delay change. * * NOTE: A zero value only for `newDelay` means that the next {defaultAdminDelay} * will be zero after the effect schedule. */ function pendingDefaultAdminDelay() external view returns (uint48 newDelay, uint48 effectSchedule); /** * @dev Starts a {defaultAdmin} transfer by setting a {pendingDefaultAdmin} scheduled for acceptance * after the current timestamp plus a {defaultAdminDelay}. * * Requirements: * * - Only can be called by the current {defaultAdmin}. * * Emits a DefaultAdminRoleChangeStarted event. */ function beginDefaultAdminTransfer(address newAdmin) external; /** * @dev Cancels a {defaultAdmin} transfer previously started with {beginDefaultAdminTransfer}. * * A {pendingDefaultAdmin} not yet accepted can also be cancelled with this function. * * Requirements: * * - Only can be called by the current {defaultAdmin}. * * May emit a DefaultAdminTransferCanceled event. */ function cancelDefaultAdminTransfer() external; /** * @dev Completes a {defaultAdmin} transfer previously started with {beginDefaultAdminTransfer}. * * After calling the function: * * - `DEFAULT_ADMIN_ROLE` should be granted to the caller. * - `DEFAULT_ADMIN_ROLE` should be revoked from the previous holder. * - {pendingDefaultAdmin} should be reset to zero values. * * Requirements: * * - Only can be called by the {pendingDefaultAdmin}'s `newAdmin`. * - The {pendingDefaultAdmin}'s `acceptSchedule` should've passed. */ function acceptDefaultAdminTransfer() external; /** * @dev Initiates a {defaultAdminDelay} update by setting a {pendingDefaultAdminDelay} scheduled for getting * into effect after the current timestamp plus a {defaultAdminDelay}. * * This function guarantees that any call to {beginDefaultAdminTransfer} done between the timestamp this * method is called and the {pendingDefaultAdminDelay} effect schedule will use the current {defaultAdminDelay} * set before calling. * * The {pendingDefaultAdminDelay}'s effect schedule is defined in a way that waiting until the schedule and then * calling {beginDefaultAdminTransfer} with the new delay will take at least the same as another {defaultAdmin} * complete transfer (including acceptance). * * The schedule is designed for two scenarios: * * - When the delay is changed for a larger one the schedule is `block.timestamp + newDelay` capped by * {defaultAdminDelayIncreaseWait}. * - When the delay is changed for a shorter one, the schedule is `block.timestamp + (current delay - new delay)`. * * A {pendingDefaultAdminDelay} that never got into effect will be canceled in favor of a new scheduled change. * * Requirements: * * - Only can be called by the current {defaultAdmin}. * * Emits a DefaultAdminDelayChangeScheduled event and may emit a DefaultAdminDelayChangeCanceled event. */ function changeDefaultAdminDelay(uint48 newDelay) external; /** * @dev Cancels a scheduled {defaultAdminDelay} change. * * Requirements: * * - Only can be called by the current {defaultAdmin}. * * May emit a DefaultAdminDelayChangeCanceled event. */ function rollbackDefaultAdminDelay() external; /** * @dev Maximum time in seconds for an increase to {defaultAdminDelay} (that is scheduled using {changeDefaultAdminDelay}) * to take effect. Default to 5 days. * * When the {defaultAdminDelay} is scheduled to be increased, it goes into effect after the new delay has passed with * the purpose of giving enough time for reverting any accidental change (i.e. using milliseconds instead of seconds) * that may lock the contract. However, to avoid excessive schedules, the wait is capped by this function and it can * be overrode for a custom {defaultAdminDelay} increase scheduling. * * IMPORTANT: Make sure to add a reasonable amount of time while overriding this value, otherwise, * there's a risk of setting a high new delay that goes into effect almost immediately without the * possibility of human intervention in the case of an input error (eg. set milliseconds instead of seconds). */ function defaultAdminDelayIncreaseWait() external view returns (uint48); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/AccessControl.sol) pragma solidity ^0.8.20; import {IAccessControl} from "./IAccessControl.sol"; import {Context} from "../utils/Context.sol"; import {ERC165} from "../utils/introspection/ERC165.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ```solidity * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ```solidity * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules} * to enforce additional security measures for this role. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address account => bool) hasRole; bytes32 adminRole; } mapping(bytes32 role => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with an {AccessControlUnauthorizedAccount} error including the required role. */ modifier onlyRole(bytes32 role) { _checkRole(role); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view virtual returns (bool) { return _roles[role].hasRole[account]; } /** * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `_msgSender()` * is missing `role`. Overriding this function changes the behavior of the {onlyRole} modifier. */ function _checkRole(bytes32 role) internal view virtual { _checkRole(role, _msgSender()); } /** * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `account` * is missing `role`. */ function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { revert AccessControlUnauthorizedAccount(account, role); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view virtual returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleGranted} event. */ function grantRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleRevoked} event. */ function revokeRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `callerConfirmation`. * * May emit a {RoleRevoked} event. */ function renounceRole(bytes32 role, address callerConfirmation) public virtual { if (callerConfirmation != _msgSender()) { revert AccessControlBadConfirmation(); } _revokeRole(role, callerConfirmation); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Attempts to grant `role` to `account` and returns a boolean indicating if `role` was granted. * * Internal function without access restriction. * * May emit a {RoleGranted} event. */ function _grantRole(bytes32 role, address account) internal virtual returns (bool) { if (!hasRole(role, account)) { _roles[role].hasRole[account] = true; emit RoleGranted(role, account, _msgSender()); return true; } else { return false; } } /** * @dev Attempts to revoke `role` to `account` and returns a boolean indicating if `role` was revoked. * * Internal function without access restriction. * * May emit a {RoleRevoked} event. */ function _revokeRole(bytes32 role, address account) internal virtual returns (bool) { if (hasRole(role, account)) { _roles[role].hasRole[account] = false; emit RoleRevoked(role, account, _msgSender()); return true; } else { return false; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SafeCast.sol) // This file was procedurally generated from scripts/generate/templates/SafeCast.js. pragma solidity ^0.8.20; /** * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow * checks. * * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can * easily result in undesired exploitation or bugs, since developers usually * assume that overflows raise errors. `SafeCast` restores this intuition by * reverting the transaction when such an operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeCast { /** * @dev Value doesn't fit in an uint of `bits` size. */ error SafeCastOverflowedUintDowncast(uint8 bits, uint256 value); /** * @dev An int value doesn't fit in an uint of `bits` size. */ error SafeCastOverflowedIntToUint(int256 value); /** * @dev Value doesn't fit in an int of `bits` size. */ error SafeCastOverflowedIntDowncast(uint8 bits, int256 value); /** * @dev An uint value doesn't fit in an int of `bits` size. */ error SafeCastOverflowedUintToInt(uint256 value); /** * @dev Returns the downcasted uint248 from uint256, reverting on * overflow (when the input is greater than largest uint248). * * Counterpart to Solidity's `uint248` operator. * * Requirements: * * - input must fit into 248 bits */ function toUint248(uint256 value) internal pure returns (uint248) { if (value > type(uint248).max) { revert SafeCastOverflowedUintDowncast(248, value); } return uint248(value); } /** * @dev Returns the downcasted uint240 from uint256, reverting on * overflow (when the input is greater than largest uint240). * * Counterpart to Solidity's `uint240` operator. * * Requirements: * * - input must fit into 240 bits */ function toUint240(uint256 value) internal pure returns (uint240) { if (value > type(uint240).max) { revert SafeCastOverflowedUintDowncast(240, value); } return uint240(value); } /** * @dev Returns the downcasted uint232 from uint256, reverting on * overflow (when the input is greater than largest uint232). * * Counterpart to Solidity's `uint232` operator. * * Requirements: * * - input must fit into 232 bits */ function toUint232(uint256 value) internal pure returns (uint232) { if (value > type(uint232).max) { revert SafeCastOverflowedUintDowncast(232, value); } return uint232(value); } /** * @dev Returns the downcasted uint224 from uint256, reverting on * overflow (when the input is greater than largest uint224). * * Counterpart to Solidity's `uint224` operator. * * Requirements: * * - input must fit into 224 bits */ function toUint224(uint256 value) internal pure returns (uint224) { if (value > type(uint224).max) { revert SafeCastOverflowedUintDowncast(224, value); } return uint224(value); } /** * @dev Returns the downcasted uint216 from uint256, reverting on * overflow (when the input is greater than largest uint216). * * Counterpart to Solidity's `uint216` operator. * * Requirements: * * - input must fit into 216 bits */ function toUint216(uint256 value) internal pure returns (uint216) { if (value > type(uint216).max) { revert SafeCastOverflowedUintDowncast(216, value); } return uint216(value); } /** * @dev Returns the downcasted uint208 from uint256, reverting on * overflow (when the input is greater than largest uint208). * * Counterpart to Solidity's `uint208` operator. * * Requirements: * * - input must fit into 208 bits */ function toUint208(uint256 value) internal pure returns (uint208) { if (value > type(uint208).max) { revert SafeCastOverflowedUintDowncast(208, value); } return uint208(value); } /** * @dev Returns the downcasted uint200 from uint256, reverting on * overflow (when the input is greater than largest uint200). * * Counterpart to Solidity's `uint200` operator. * * Requirements: * * - input must fit into 200 bits */ function toUint200(uint256 value) internal pure returns (uint200) { if (value > type(uint200).max) { revert SafeCastOverflowedUintDowncast(200, value); } return uint200(value); } /** * @dev Returns the downcasted uint192 from uint256, reverting on * overflow (when the input is greater than largest uint192). * * Counterpart to Solidity's `uint192` operator. * * Requirements: * * - input must fit into 192 bits */ function toUint192(uint256 value) internal pure returns (uint192) { if (value > type(uint192).max) { revert SafeCastOverflowedUintDowncast(192, value); } return uint192(value); } /** * @dev Returns the downcasted uint184 from uint256, reverting on * overflow (when the input is greater than largest uint184). * * Counterpart to Solidity's `uint184` operator. * * Requirements: * * - input must fit into 184 bits */ function toUint184(uint256 value) internal pure returns (uint184) { if (value > type(uint184).max) { revert SafeCastOverflowedUintDowncast(184, value); } return uint184(value); } /** * @dev Returns the downcasted uint176 from uint256, reverting on * overflow (when the input is greater than largest uint176). * * Counterpart to Solidity's `uint176` operator. * * Requirements: * * - input must fit into 176 bits */ function toUint176(uint256 value) internal pure returns (uint176) { if (value > type(uint176).max) { revert SafeCastOverflowedUintDowncast(176, value); } return uint176(value); } /** * @dev Returns the downcasted uint168 from uint256, reverting on * overflow (when the input is greater than largest uint168). * * Counterpart to Solidity's `uint168` operator. * * Requirements: * * - input must fit into 168 bits */ function toUint168(uint256 value) internal pure returns (uint168) { if (value > type(uint168).max) { revert SafeCastOverflowedUintDowncast(168, value); } return uint168(value); } /** * @dev Returns the downcasted uint160 from uint256, reverting on * overflow (when the input is greater than largest uint160). * * Counterpart to Solidity's `uint160` operator. * * Requirements: * * - input must fit into 160 bits */ function toUint160(uint256 value) internal pure returns (uint160) { if (value > type(uint160).max) { revert SafeCastOverflowedUintDowncast(160, value); } return uint160(value); } /** * @dev Returns the downcasted uint152 from uint256, reverting on * overflow (when the input is greater than largest uint152). * * Counterpart to Solidity's `uint152` operator. * * Requirements: * * - input must fit into 152 bits */ function toUint152(uint256 value) internal pure returns (uint152) { if (value > type(uint152).max) { revert SafeCastOverflowedUintDowncast(152, value); } return uint152(value); } /** * @dev Returns the downcasted uint144 from uint256, reverting on * overflow (when the input is greater than largest uint144). * * Counterpart to Solidity's `uint144` operator. * * Requirements: * * - input must fit into 144 bits */ function toUint144(uint256 value) internal pure returns (uint144) { if (value > type(uint144).max) { revert SafeCastOverflowedUintDowncast(144, value); } return uint144(value); } /** * @dev Returns the downcasted uint136 from uint256, reverting on * overflow (when the input is greater than largest uint136). * * Counterpart to Solidity's `uint136` operator. * * Requirements: * * - input must fit into 136 bits */ function toUint136(uint256 value) internal pure returns (uint136) { if (value > type(uint136).max) { revert SafeCastOverflowedUintDowncast(136, value); } return uint136(value); } /** * @dev Returns the downcasted uint128 from uint256, reverting on * overflow (when the input is greater than largest uint128). * * Counterpart to Solidity's `uint128` operator. * * Requirements: * * - input must fit into 128 bits */ function toUint128(uint256 value) internal pure returns (uint128) { if (value > type(uint128).max) { revert SafeCastOverflowedUintDowncast(128, value); } return uint128(value); } /** * @dev Returns the downcasted uint120 from uint256, reverting on * overflow (when the input is greater than largest uint120). * * Counterpart to Solidity's `uint120` operator. * * Requirements: * * - input must fit into 120 bits */ function toUint120(uint256 value) internal pure returns (uint120) { if (value > type(uint120).max) { revert SafeCastOverflowedUintDowncast(120, value); } return uint120(value); } /** * @dev Returns the downcasted uint112 from uint256, reverting on * overflow (when the input is greater than largest uint112). * * Counterpart to Solidity's `uint112` operator. * * Requirements: * * - input must fit into 112 bits */ function toUint112(uint256 value) internal pure returns (uint112) { if (value > type(uint112).max) { revert SafeCastOverflowedUintDowncast(112, value); } return uint112(value); } /** * @dev Returns the downcasted uint104 from uint256, reverting on * overflow (when the input is greater than largest uint104). * * Counterpart to Solidity's `uint104` operator. * * Requirements: * * - input must fit into 104 bits */ function toUint104(uint256 value) internal pure returns (uint104) { if (value > type(uint104).max) { revert SafeCastOverflowedUintDowncast(104, value); } return uint104(value); } /** * @dev Returns the downcasted uint96 from uint256, reverting on * overflow (when the input is greater than largest uint96). * * Counterpart to Solidity's `uint96` operator. * * Requirements: * * - input must fit into 96 bits */ function toUint96(uint256 value) internal pure returns (uint96) { if (value > type(uint96).max) { revert SafeCastOverflowedUintDowncast(96, value); } return uint96(value); } /** * @dev Returns the downcasted uint88 from uint256, reverting on * overflow (when the input is greater than largest uint88). * * Counterpart to Solidity's `uint88` operator. * * Requirements: * * - input must fit into 88 bits */ function toUint88(uint256 value) internal pure returns (uint88) { if (value > type(uint88).max) { revert SafeCastOverflowedUintDowncast(88, value); } return uint88(value); } /** * @dev Returns the downcasted uint80 from uint256, reverting on * overflow (when the input is greater than largest uint80). * * Counterpart to Solidity's `uint80` operator. * * Requirements: * * - input must fit into 80 bits */ function toUint80(uint256 value) internal pure returns (uint80) { if (value > type(uint80).max) { revert SafeCastOverflowedUintDowncast(80, value); } return uint80(value); } /** * @dev Returns the downcasted uint72 from uint256, reverting on * overflow (when the input is greater than largest uint72). * * Counterpart to Solidity's `uint72` operator. * * Requirements: * * - input must fit into 72 bits */ function toUint72(uint256 value) internal pure returns (uint72) { if (value > type(uint72).max) { revert SafeCastOverflowedUintDowncast(72, value); } return uint72(value); } /** * @dev Returns the downcasted uint64 from uint256, reverting on * overflow (when the input is greater than largest uint64). * * Counterpart to Solidity's `uint64` operator. * * Requirements: * * - input must fit into 64 bits */ function toUint64(uint256 value) internal pure returns (uint64) { if (value > type(uint64).max) { revert SafeCastOverflowedUintDowncast(64, value); } return uint64(value); } /** * @dev Returns the downcasted uint56 from uint256, reverting on * overflow (when the input is greater than largest uint56). * * Counterpart to Solidity's `uint56` operator. * * Requirements: * * - input must fit into 56 bits */ function toUint56(uint256 value) internal pure returns (uint56) { if (value > type(uint56).max) { revert SafeCastOverflowedUintDowncast(56, value); } return uint56(value); } /** * @dev Returns the downcasted uint48 from uint256, reverting on * overflow (when the input is greater than largest uint48). * * Counterpart to Solidity's `uint48` operator. * * Requirements: * * - input must fit into 48 bits */ function toUint48(uint256 value) internal pure returns (uint48) { if (value > type(uint48).max) { revert SafeCastOverflowedUintDowncast(48, value); } return uint48(value); } /** * @dev Returns the downcasted uint40 from uint256, reverting on * overflow (when the input is greater than largest uint40). * * Counterpart to Solidity's `uint40` operator. * * Requirements: * * - input must fit into 40 bits */ function toUint40(uint256 value) internal pure returns (uint40) { if (value > type(uint40).max) { revert SafeCastOverflowedUintDowncast(40, value); } return uint40(value); } /** * @dev Returns the downcasted uint32 from uint256, reverting on * overflow (when the input is greater than largest uint32). * * Counterpart to Solidity's `uint32` operator. * * Requirements: * * - input must fit into 32 bits */ function toUint32(uint256 value) internal pure returns (uint32) { if (value > type(uint32).max) { revert SafeCastOverflowedUintDowncast(32, value); } return uint32(value); } /** * @dev Returns the downcasted uint24 from uint256, reverting on * overflow (when the input is greater than largest uint24). * * Counterpart to Solidity's `uint24` operator. * * Requirements: * * - input must fit into 24 bits */ function toUint24(uint256 value) internal pure returns (uint24) { if (value > type(uint24).max) { revert SafeCastOverflowedUintDowncast(24, value); } return uint24(value); } /** * @dev Returns the downcasted uint16 from uint256, reverting on * overflow (when the input is greater than largest uint16). * * Counterpart to Solidity's `uint16` operator. * * Requirements: * * - input must fit into 16 bits */ function toUint16(uint256 value) internal pure returns (uint16) { if (value > type(uint16).max) { revert SafeCastOverflowedUintDowncast(16, value); } return uint16(value); } /** * @dev Returns the downcasted uint8 from uint256, reverting on * overflow (when the input is greater than largest uint8). * * Counterpart to Solidity's `uint8` operator. * * Requirements: * * - input must fit into 8 bits */ function toUint8(uint256 value) internal pure returns (uint8) { if (value > type(uint8).max) { revert SafeCastOverflowedUintDowncast(8, value); } return uint8(value); } /** * @dev Converts a signed int256 into an unsigned uint256. * * Requirements: * * - input must be greater than or equal to 0. */ function toUint256(int256 value) internal pure returns (uint256) { if (value < 0) { revert SafeCastOverflowedIntToUint(value); } return uint256(value); } /** * @dev Returns the downcasted int248 from int256, reverting on * overflow (when the input is less than smallest int248 or * greater than largest int248). * * Counterpart to Solidity's `int248` operator. * * Requirements: * * - input must fit into 248 bits */ function toInt248(int256 value) internal pure returns (int248 downcasted) { downcasted = int248(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(248, value); } } /** * @dev Returns the downcasted int240 from int256, reverting on * overflow (when the input is less than smallest int240 or * greater than largest int240). * * Counterpart to Solidity's `int240` operator. * * Requirements: * * - input must fit into 240 bits */ function toInt240(int256 value) internal pure returns (int240 downcasted) { downcasted = int240(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(240, value); } } /** * @dev Returns the downcasted int232 from int256, reverting on * overflow (when the input is less than smallest int232 or * greater than largest int232). * * Counterpart to Solidity's `int232` operator. * * Requirements: * * - input must fit into 232 bits */ function toInt232(int256 value) internal pure returns (int232 downcasted) { downcasted = int232(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(232, value); } } /** * @dev Returns the downcasted int224 from int256, reverting on * overflow (when the input is less than smallest int224 or * greater than largest int224). * * Counterpart to Solidity's `int224` operator. * * Requirements: * * - input must fit into 224 bits */ function toInt224(int256 value) internal pure returns (int224 downcasted) { downcasted = int224(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(224, value); } } /** * @dev Returns the downcasted int216 from int256, reverting on * overflow (when the input is less than smallest int216 or * greater than largest int216). * * Counterpart to Solidity's `int216` operator. * * Requirements: * * - input must fit into 216 bits */ function toInt216(int256 value) internal pure returns (int216 downcasted) { downcasted = int216(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(216, value); } } /** * @dev Returns the downcasted int208 from int256, reverting on * overflow (when the input is less than smallest int208 or * greater than largest int208). * * Counterpart to Solidity's `int208` operator. * * Requirements: * * - input must fit into 208 bits */ function toInt208(int256 value) internal pure returns (int208 downcasted) { downcasted = int208(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(208, value); } } /** * @dev Returns the downcasted int200 from int256, reverting on * overflow (when the input is less than smallest int200 or * greater than largest int200). * * Counterpart to Solidity's `int200` operator. * * Requirements: * * - input must fit into 200 bits */ function toInt200(int256 value) internal pure returns (int200 downcasted) { downcasted = int200(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(200, value); } } /** * @dev Returns the downcasted int192 from int256, reverting on * overflow (when the input is less than smallest int192 or * greater than largest int192). * * Counterpart to Solidity's `int192` operator. * * Requirements: * * - input must fit into 192 bits */ function toInt192(int256 value) internal pure returns (int192 downcasted) { downcasted = int192(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(192, value); } } /** * @dev Returns the downcasted int184 from int256, reverting on * overflow (when the input is less than smallest int184 or * greater than largest int184). * * Counterpart to Solidity's `int184` operator. * * Requirements: * * - input must fit into 184 bits */ function toInt184(int256 value) internal pure returns (int184 downcasted) { downcasted = int184(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(184, value); } } /** * @dev Returns the downcasted int176 from int256, reverting on * overflow (when the input is less than smallest int176 or * greater than largest int176). * * Counterpart to Solidity's `int176` operator. * * Requirements: * * - input must fit into 176 bits */ function toInt176(int256 value) internal pure returns (int176 downcasted) { downcasted = int176(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(176, value); } } /** * @dev Returns the downcasted int168 from int256, reverting on * overflow (when the input is less than smallest int168 or * greater than largest int168). * * Counterpart to Solidity's `int168` operator. * * Requirements: * * - input must fit into 168 bits */ function toInt168(int256 value) internal pure returns (int168 downcasted) { downcasted = int168(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(168, value); } } /** * @dev Returns the downcasted int160 from int256, reverting on * overflow (when the input is less than smallest int160 or * greater than largest int160). * * Counterpart to Solidity's `int160` operator. * * Requirements: * * - input must fit into 160 bits */ function toInt160(int256 value) internal pure returns (int160 downcasted) { downcasted = int160(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(160, value); } } /** * @dev Returns the downcasted int152 from int256, reverting on * overflow (when the input is less than smallest int152 or * greater than largest int152). * * Counterpart to Solidity's `int152` operator. * * Requirements: * * - input must fit into 152 bits */ function toInt152(int256 value) internal pure returns (int152 downcasted) { downcasted = int152(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(152, value); } } /** * @dev Returns the downcasted int144 from int256, reverting on * overflow (when the input is less than smallest int144 or * greater than largest int144). * * Counterpart to Solidity's `int144` operator. * * Requirements: * * - input must fit into 144 bits */ function toInt144(int256 value) internal pure returns (int144 downcasted) { downcasted = int144(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(144, value); } } /** * @dev Returns the downcasted int136 from int256, reverting on * overflow (when the input is less than smallest int136 or * greater than largest int136). * * Counterpart to Solidity's `int136` operator. * * Requirements: * * - input must fit into 136 bits */ function toInt136(int256 value) internal pure returns (int136 downcasted) { downcasted = int136(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(136, value); } } /** * @dev Returns the downcasted int128 from int256, reverting on * overflow (when the input is less than smallest int128 or * greater than largest int128). * * Counterpart to Solidity's `int128` operator. * * Requirements: * * - input must fit into 128 bits */ function toInt128(int256 value) internal pure returns (int128 downcasted) { downcasted = int128(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(128, value); } } /** * @dev Returns the downcasted int120 from int256, reverting on * overflow (when the input is less than smallest int120 or * greater than largest int120). * * Counterpart to Solidity's `int120` operator. * * Requirements: * * - input must fit into 120 bits */ function toInt120(int256 value) internal pure returns (int120 downcasted) { downcasted = int120(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(120, value); } } /** * @dev Returns the downcasted int112 from int256, reverting on * overflow (when the input is less than smallest int112 or * greater than largest int112). * * Counterpart to Solidity's `int112` operator. * * Requirements: * * - input must fit into 112 bits */ function toInt112(int256 value) internal pure returns (int112 downcasted) { downcasted = int112(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(112, value); } } /** * @dev Returns the downcasted int104 from int256, reverting on * overflow (when the input is less than smallest int104 or * greater than largest int104). * * Counterpart to Solidity's `int104` operator. * * Requirements: * * - input must fit into 104 bits */ function toInt104(int256 value) internal pure returns (int104 downcasted) { downcasted = int104(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(104, value); } } /** * @dev Returns the downcasted int96 from int256, reverting on * overflow (when the input is less than smallest int96 or * greater than largest int96). * * Counterpart to Solidity's `int96` operator. * * Requirements: * * - input must fit into 96 bits */ function toInt96(int256 value) internal pure returns (int96 downcasted) { downcasted = int96(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(96, value); } } /** * @dev Returns the downcasted int88 from int256, reverting on * overflow (when the input is less than smallest int88 or * greater than largest int88). * * Counterpart to Solidity's `int88` operator. * * Requirements: * * - input must fit into 88 bits */ function toInt88(int256 value) internal pure returns (int88 downcasted) { downcasted = int88(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(88, value); } } /** * @dev Returns the downcasted int80 from int256, reverting on * overflow (when the input is less than smallest int80 or * greater than largest int80). * * Counterpart to Solidity's `int80` operator. * * Requirements: * * - input must fit into 80 bits */ function toInt80(int256 value) internal pure returns (int80 downcasted) { downcasted = int80(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(80, value); } } /** * @dev Returns the downcasted int72 from int256, reverting on * overflow (when the input is less than smallest int72 or * greater than largest int72). * * Counterpart to Solidity's `int72` operator. * * Requirements: * * - input must fit into 72 bits */ function toInt72(int256 value) internal pure returns (int72 downcasted) { downcasted = int72(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(72, value); } } /** * @dev Returns the downcasted int64 from int256, reverting on * overflow (when the input is less than smallest int64 or * greater than largest int64). * * Counterpart to Solidity's `int64` operator. * * Requirements: * * - input must fit into 64 bits */ function toInt64(int256 value) internal pure returns (int64 downcasted) { downcasted = int64(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(64, value); } } /** * @dev Returns the downcasted int56 from int256, reverting on * overflow (when the input is less than smallest int56 or * greater than largest int56). * * Counterpart to Solidity's `int56` operator. * * Requirements: * * - input must fit into 56 bits */ function toInt56(int256 value) internal pure returns (int56 downcasted) { downcasted = int56(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(56, value); } } /** * @dev Returns the downcasted int48 from int256, reverting on * overflow (when the input is less than smallest int48 or * greater than largest int48). * * Counterpart to Solidity's `int48` operator. * * Requirements: * * - input must fit into 48 bits */ function toInt48(int256 value) internal pure returns (int48 downcasted) { downcasted = int48(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(48, value); } } /** * @dev Returns the downcasted int40 from int256, reverting on * overflow (when the input is less than smallest int40 or * greater than largest int40). * * Counterpart to Solidity's `int40` operator. * * Requirements: * * - input must fit into 40 bits */ function toInt40(int256 value) internal pure returns (int40 downcasted) { downcasted = int40(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(40, value); } } /** * @dev Returns the downcasted int32 from int256, reverting on * overflow (when the input is less than smallest int32 or * greater than largest int32). * * Counterpart to Solidity's `int32` operator. * * Requirements: * * - input must fit into 32 bits */ function toInt32(int256 value) internal pure returns (int32 downcasted) { downcasted = int32(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(32, value); } } /** * @dev Returns the downcasted int24 from int256, reverting on * overflow (when the input is less than smallest int24 or * greater than largest int24). * * Counterpart to Solidity's `int24` operator. * * Requirements: * * - input must fit into 24 bits */ function toInt24(int256 value) internal pure returns (int24 downcasted) { downcasted = int24(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(24, value); } } /** * @dev Returns the downcasted int16 from int256, reverting on * overflow (when the input is less than smallest int16 or * greater than largest int16). * * Counterpart to Solidity's `int16` operator. * * Requirements: * * - input must fit into 16 bits */ function toInt16(int256 value) internal pure returns (int16 downcasted) { downcasted = int16(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(16, value); } } /** * @dev Returns the downcasted int8 from int256, reverting on * overflow (when the input is less than smallest int8 or * greater than largest int8). * * Counterpart to Solidity's `int8` operator. * * Requirements: * * - input must fit into 8 bits */ function toInt8(int256 value) internal pure returns (int8 downcasted) { downcasted = int8(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(8, value); } } /** * @dev Converts an unsigned uint256 into a signed int256. * * Requirements: * * - input must be less than or equal to maxInt256. */ function toInt256(uint256 value) internal pure returns (int256) { // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive if (value > uint256(type(int256).max)) { revert SafeCastOverflowedUintToInt(value); } return int256(value); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC5313.sol) pragma solidity ^0.8.20; /** * @dev Interface for the Light Contract Ownership Standard. * * A standardized minimal interface required to identify an account that controls a contract */ interface IERC5313 { /** * @dev Gets the address of the owner. */ function owner() external view returns (address); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the value of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the value of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves a `value` amount of tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 value) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets a `value` amount of tokens as the allowance of `spender` over the * caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the * allowance mechanism. `value` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 value) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Permit.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. * * ==== Security Considerations * * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be * considered as an intention to spend the allowance in any specific way. The second is that because permits have * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be * generally recommended is: * * ```solidity * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public { * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {} * doThing(..., value); * } * * function doThing(..., uint256 value) public { * token.safeTransferFrom(msg.sender, address(this), value); * ... * } * ``` * * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also * {SafeERC20-safeTransferFrom}). * * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so * contracts should have entry points that don't rely on permit. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. * * CAUTION: See Security Considerations above. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol) pragma solidity ^0.8.20; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev The ETH balance of the account is not enough to perform the operation. */ error AddressInsufficientBalance(address account); /** * @dev There's no code at `target` (it is not a contract). */ error AddressEmptyCode(address target); /** * @dev A call to an address target failed. The target may have reverted. */ error FailedInnerCall(); /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { if (address(this).balance < amount) { revert AddressInsufficientBalance(address(this)); } (bool success, ) = recipient.call{value: amount}(""); if (!success) { revert FailedInnerCall(); } } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason or custom error, it is bubbled * up by this function (like regular Solidity function calls). However, if * the call reverted with no returned reason, this function reverts with a * {FailedInnerCall} error. * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { if (address(this).balance < value) { revert AddressInsufficientBalance(address(this)); } (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target * was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an * unsuccessful call. */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata ) internal view returns (bytes memory) { if (!success) { _revert(returndata); } else { // only check if target is a contract if the call was successful and the return data is empty // otherwise we already know that it was a contract if (returndata.length == 0 && target.code.length == 0) { revert AddressEmptyCode(target); } return returndata; } } /** * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the * revert reason or with a default {FailedInnerCall} error. */ function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) { if (!success) { _revert(returndata); } else { return returndata; } } /** * @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}. */ function _revert(bytes memory returndata) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert FailedInnerCall(); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/IAccessControl.sol) pragma solidity ^0.8.20; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @dev The `account` is missing a role. */ error AccessControlUnauthorizedAccount(address account, bytes32 neededRole); /** * @dev The caller of a function is not the expected one. * * NOTE: Don't confuse with {AccessControlUnauthorizedAccount}. */ error AccessControlBadConfirmation(); /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `callerConfirmation`. */ function renounceRole(bytes32 role, address callerConfirmation) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol) pragma solidity ^0.8.20; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol) pragma solidity ^0.8.20; import {IERC165} from "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
{ "viaIR": false, "codegen": "yul", "remappings": [ "@openzeppelin/=node_modules/@openzeppelin/", "@erc721a/=deps/erc721a/contracts/", "forge-std/=lib/forge-std/src/", "@ethereum-attestation-service/=node_modules/@ethereum-attestation-service/", "forge-zksync-std/=lib/forge-zksync-std/src/" ], "evmVersion": "cancun", "outputSelection": { "*": { "*": [ "abi", "metadata" ], "": [ "ast" ] } }, "optimizer": { "enabled": true, "mode": "3", "fallback_to_optimizing_for_size": false, "disable_system_request_memoization": true }, "metadata": {}, "libraries": {}, "detectMissingLibraries": false, "enableEraVMExtensions": false, "forceEVMLA": false }
Contract ABI
API[{"inputs":[{"internalType":"address","name":"easContractAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AccessControlBadConfirmation","type":"error"},{"inputs":[{"internalType":"uint48","name":"schedule","type":"uint48"}],"name":"AccessControlEnforcedDefaultAdminDelay","type":"error"},{"inputs":[],"name":"AccessControlEnforcedDefaultAdminRules","type":"error"},{"inputs":[{"internalType":"address","name":"defaultAdmin","type":"address"}],"name":"AccessControlInvalidDefaultAdmin","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"neededRole","type":"bytes32"}],"name":"AccessControlUnauthorizedAccount","type":"error"},{"inputs":[],"name":"AccessDenied","type":"error"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"AddressInsufficientBalance","type":"error"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"FailedInnerCall","type":"error"},{"inputs":[],"name":"InsufficientValue","type":"error"},{"inputs":[],"name":"InvalidEAS","type":"error"},{"inputs":[],"name":"InvalidLength","type":"error"},{"inputs":[],"name":"InvalidQueryRange","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"NotCompatibleWithSpotMints","type":"error"},{"inputs":[],"name":"NotPayable","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[{"internalType":"uint8","name":"bits","type":"uint8"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"SafeCastOverflowedUintDowncast","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"inputs":[],"name":"SequentialMintExceedsLimit","type":"error"},{"inputs":[],"name":"SequentialUpToTooSmall","type":"error"},{"inputs":[],"name":"SpotMintTokenIdTooSmall","type":"error"},{"inputs":[],"name":"TokenAlreadyExists","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"badgeType","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"level","type":"uint256"}],"name":"BadgeAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"badgeType","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"level","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"BadgeClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"newBaseURI","type":"string"}],"name":"BaseURIUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","type":"event"},{"anonymous":false,"inputs":[],"name":"DefaultAdminDelayChangeCanceled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint48","name":"newDelay","type":"uint48"},{"indexed":false,"internalType":"uint48","name":"effectSchedule","type":"uint48"}],"name":"DefaultAdminDelayChangeScheduled","type":"event"},{"anonymous":false,"inputs":[],"name":"DefaultAdminTransferCanceled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newAdmin","type":"address"},{"indexed":false,"internalType":"uint48","name":"acceptSchedule","type":"uint48"}],"name":"DefaultAdminTransferScheduled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"IMPLEMENTATION_SLOT","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"acceptDefaultAdminTransfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"badgeType","type":"uint256"},{"internalType":"uint256","name":"level","type":"uint256"},{"internalType":"bool","name":"active","type":"bool"}],"name":"addBadge","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"bytes32","name":"uid","type":"bytes32"},{"internalType":"bytes32","name":"schema","type":"bytes32"},{"internalType":"uint64","name":"time","type":"uint64"},{"internalType":"uint64","name":"expirationTime","type":"uint64"},{"internalType":"uint64","name":"revocationTime","type":"uint64"},{"internalType":"bytes32","name":"refUID","type":"bytes32"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"address","name":"attester","type":"address"},{"internalType":"bool","name":"revocable","type":"bool"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct Attestation","name":"attestation","type":"tuple"}],"name":"attest","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"badgeInfos","outputs":[{"internalType":"uint256","name":"badgeType","type":"uint256"},{"internalType":"uint256","name":"level","type":"uint256"},{"internalType":"bool","name":"active","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newAdmin","type":"address"}],"name":"beginDefaultAdminTransfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"badgeType","type":"uint256"},{"internalType":"uint256","name":"level","type":"uint256"}],"name":"canClaim","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cancelDefaultAdminTransfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint48","name":"newDelay","type":"uint48"}],"name":"changeDefaultAdminDelay","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"claimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"defaultAdmin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"defaultAdminDelay","outputs":[{"internalType":"uint48","name":"","type":"uint48"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"defaultAdminDelayIncreaseWait","outputs":[{"internalType":"uint48","name":"","type":"uint48"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"eas","outputs":[{"internalType":"contract IEAS","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"explicitOwnershipOf","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"},{"internalType":"uint24","name":"extraData","type":"uint24"}],"internalType":"struct IERC721A.TokenOwnership","name":"ownership","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"explicitOwnershipsOf","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"},{"internalType":"uint24","name":"extraData","type":"uint24"}],"internalType":"struct IERC721A.TokenOwnership[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"implementation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isPayable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[{"components":[{"internalType":"bytes32","name":"uid","type":"bytes32"},{"internalType":"bytes32","name":"schema","type":"bytes32"},{"internalType":"uint64","name":"time","type":"uint64"},{"internalType":"uint64","name":"expirationTime","type":"uint64"},{"internalType":"uint64","name":"revocationTime","type":"uint64"},{"internalType":"bytes32","name":"refUID","type":"bytes32"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"address","name":"attester","type":"address"},{"internalType":"bool","name":"revocable","type":"bool"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct Attestation[]","name":"attestations","type":"tuple[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"multiAttest","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"bytes32","name":"uid","type":"bytes32"},{"internalType":"bytes32","name":"schema","type":"bytes32"},{"internalType":"uint64","name":"time","type":"uint64"},{"internalType":"uint64","name":"expirationTime","type":"uint64"},{"internalType":"uint64","name":"revocationTime","type":"uint64"},{"internalType":"bytes32","name":"refUID","type":"bytes32"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"address","name":"attester","type":"address"},{"internalType":"bool","name":"revocable","type":"bool"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct Attestation[]","name":"attestations","type":"tuple[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"multiRevoke","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingDefaultAdmin","outputs":[{"internalType":"address","name":"newAdmin","type":"address"},{"internalType":"uint48","name":"schedule","type":"uint48"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingDefaultAdminDelay","outputs":[{"internalType":"uint48","name":"newDelay","type":"uint48"},{"internalType":"uint48","name":"schedule","type":"uint48"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"impl_","type":"address"},{"internalType":"bytes","name":"initData_","type":"bytes"}],"name":"replaceImplementation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"}],"name":"rescue","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rescueEth","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"bytes32","name":"uid","type":"bytes32"},{"internalType":"bytes32","name":"schema","type":"bytes32"},{"internalType":"uint64","name":"time","type":"uint64"},{"internalType":"uint64","name":"expirationTime","type":"uint64"},{"internalType":"uint64","name":"revocationTime","type":"uint64"},{"internalType":"bytes32","name":"refUID","type":"bytes32"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"address","name":"attester","type":"address"},{"internalType":"bool","name":"revocable","type":"bool"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct Attestation","name":"attestation","type":"tuple"}],"name":"revoke","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rollbackDefaultAdminDelay","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"bool","name":"","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"string","name":"baseURI","type":"string"}],"name":"setBaseURI","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":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenToBadgeInfo","outputs":[{"internalType":"uint256","name":"badgeType","type":"uint256"},{"internalType":"uint256","name":"level","type":"uint256"},{"internalType":"bool","name":"active","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"stop","type":"uint256"}],"name":"tokensOfOwnerIn","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"result","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"userBadgeTokenIds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
9c4d535b0000000000000000000000000000000000000000000000000000000000000000010007038d224732cec6c0f8b0af0081d74361ab1dbfa3a8aacba8a7c9d3eb7300000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000020000000000000000000000000bae2f1f99eefa3a6e2ec649c5eb400c9c44d2bf8
Deployed Bytecode
0x000400000000000200140000000000020000006004100270000006350340019700030000003103550002000000010355000006350040019d00000001002001900000001e0000c13d0000008004000039000000400040043f000000040030008c000000510000413d000000000201043b000000e002200270000006490020009c000000570000a13d0000064a0020009c0000006c0000a13d0000064b0020009c000000c80000213d000006550020009c000001160000a13d000006560020009c0000026a0000213d000006590020009c000003b30000613d0000065a0020009c000000760000613d00000ff20000013d0000010004000039000000400040043f0000000002000416000000000002004b00000ff20000c13d0000001f0230003900000636022001970000010002200039000000400020043f0000001f0530018f00000637063001980000010002600039000000300000613d000000000701034f000000007807043c0000000004840436000000000024004b0000002c0000c13d000000000005004b0000003d0000613d000000000161034f0000000304500210000000000502043300000000054501cf000000000545022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000200030008c00000ff20000413d000001000300043d000006380030009c00000ff20000213d000000400600043d000006390060009c0000004b0000213d0000002007600039000000400070043f0000000000060435000000400400043d000006390040009c0000010b0000a13d000006d701000041000000000010043f0000004101000039000000040010043f0000064701000041000018d000010430000000000003004b00000ff20000c13d0000064801000041000000000010043f0000064501000041000018d0000104300000066f0020009c0000007c0000213d000006810020009c000000d80000a13d000006820020009c000001220000a13d000006830020009c000002780000213d000006860020009c000003dd0000613d000006870020009c00000ff20000c13d000000240030008c00000ff20000413d0000000002000416000000000002004b00000ff20000c13d0000000401100370000000000101043b18ce11f10000040f000005010000013d0000065e0020009c000000e90000a13d0000065f0020009c000001990000a13d000006600020009c000002c00000213d000006630020009c000003e20000613d000006640020009c00000ff20000c13d0000000001000416000000000001004b00000ff20000c13d000000800000043f000006b401000041000018cf0001042e000006700020009c000000f20000a13d000006710020009c000001bb0000a13d000006720020009c000002dc0000213d000006750020009c0000040e0000613d000006760020009c00000ff20000c13d000000240030008c00000ff20000413d0000000002000416000000000002004b00000ff20000c13d0000000401100370000000000101043b000800000001001d000006980010009c00000ff20000213d00000000010004110000063801100197000000000010043f0000063d01000041000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f000000010020019000000ff20000613d000000000101043b000000000101041a000000ff00100190000007640000613d0000069a0100004100000000001004430000000001000414000006350010009c0000063501008041000000c0011002100000069b011001c70000800b0200003918ce18c40000040f000000010020019000000d310000613d000000000201043b000006cd0020009c000001eb0000813d000700000002001d0000000201000039000000000101041a000500000001001d000600d00010027a00000b3b0000613d0000069a0100004100000000001004430000000001000414000006350010009c0000063501008041000000c0011002100000069b011001c70000800b0200003918ce18c40000040f000000010020019000000d310000613d000000000101043b000000060010006b00000b3b0000813d0000000501000029000000a001100270000006980110019700000b3e0000013d0000064c0020009c000001f20000a13d0000064d0020009c000003390000213d000006500020009c000004180000613d000006510020009c00000ff20000c13d000000000103001918ce10c70000040f000800000001001d18ce157a0000040f000000080100002918ce15940000040f0000000101000039000005010000013d0000068b0020009c000002110000213d0000068f0020009c000005080000613d000006900020009c0000051a0000613d000006910020009c00000ff20000c13d0000000001000416000000000001004b00000ff20000c13d000000c001000039000000400010043f0000000d01000039000000800010043f000006e1010000410000068e0000013d000006680020009c0000021e0000213d0000066c0020009c000005210000613d0000066d0020009c0000052f0000613d0000066e0020009c000003550000613d00000ff20000013d0000067a0020009c000002330000213d0000067e0020009c0000055b0000613d0000067f0020009c000005980000613d000006800020009c00000ff20000c13d000000000103001918ce10260000040f000800000001001d000700000002001d000600000003001d000000400100043d000500000001001d000000200200003918ce105b0000040f0000000504000029000000000004043500000008010000290000000702000029000000060300002918ce12480000040f0000000001000019000018cf0001042e0000002005400039000000400050043f00000000000404350000000008000411000000000008004b0000035a0000c13d0000064601000041000000000010043f000000040000043f0000064701000041000018d0000104300000065b0020009c000005b90000613d0000065c0020009c000005ca0000613d0000065d0020009c00000ff20000c13d0000000001000416000000000001004b00000ff20000c13d18ce14ad0000040f0000069801100197000005010000013d000006880020009c000005ec0000613d000006890020009c0000060c0000613d0000068a0020009c00000ff20000c13d000000640030008c00000ff20000413d0000000002000416000000000002004b00000ff20000c13d0000002402100370000000000202043b000800000002001d0000000402100370000000000202043b000700000002001d0000004401100370000000000201043b000000000002004b0000000001000039000000010100c039000600000002001d000000000012004b00000ff20000c13d00000000010004110000063801100197000000000010043f0000063d01000041000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f000000010020019000000ff20000613d000000000101043b000000000101041a000000ff00100190000007640000613d000000400200043d000006a50020009c0000004b0000213d0000006001200039000000400010043f0000004001200039000500000001001d0000000603000029000000000031043500000020032000390000000801000029000400000003001d00000000001304350000000701000029000600000002001d0000000000120435000000000010043f0000000d01000039000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f000000010020019000000ff20000613d000000000101043b0000000802000029000000000020043f000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f000000010020019000000ff20000613d00000006020000290000000002020433000000000101043b000000000021041b000000040200002900000000020204330000000103100039000000000023041b0000000201100039000000000201041a000006ea0220019700000005030000290000000003030433000000000003004b000000010220c1bf000000000021041b000000400100043d00000020021000390000000803000029000000000032043500000007020000290000000000210435000006350010009c000006350100804100000040011002100000000002000414000006350020009c0000063502008041000000c002200210000000000112019f0000063e011001c70000800d020000390000000103000039000006dc04000041000008f90000013d000006650020009c000006170000613d000006660020009c000006860000613d000006670020009c00000ff20000c13d000000640030008c00000ff20000413d0000000002000416000000000002004b00000ff20000c13d0000000402100370000000000202043b000300000002001d000006380020009c00000ff20000213d0000004402100370000000000202043b0000002401100370000000000301043b000000000023004b000008880000813d0000000304000039000000000104041a000000000012004b0000000002018019000200000002001d0000000301000029000000000001004b0000096e0000c13d000006b801000041000000000010043f0000064501000041000018d000010430000006770020009c0000069a0000613d000006780020009c000007340000613d000006790020009c00000ff20000c13d000000240030008c00000ff20000413d0000000002000416000000000002004b00000ff20000c13d0000000401100370000000000101043b000800000001001d000006380010009c00000ff20000213d00000000010004110000063801100197000000000010043f0000063d01000041000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f000000010020019000000ff20000613d000000000101043b000000000101041a000000ff00100190000007640000613d0000069a0100004100000000001004430000000001000414000006350010009c0000063501008041000000c0011002100000069b011001c70000800b0200003918ce18c40000040f000000010020019000000d310000613d000000000201043b000006cd0020009c00000adb0000413d000006d101000041000000000010043f0000003001000039000000040010043f000000240020043f0000069701000041000018d000010430000006520020009c0000073d0000613d000006530020009c0000074f0000613d000006540020009c00000ff20000c13d0000000001000416000000000001004b00000ff20000c13d000000000103001918ce10380000040f000700000002001d000800000003001d0000063801100197000000000010043f0000001001000039000000200010043f000000400100003918ce18900000040f0000000702000029000000000020043f000000200010043f000000400100003918ce18900000040f0000000802000029000000000020043f000000200010043f000000400100003918ce18900000040f000000000101041a000005010000013d0000068c0020009c0000076b0000613d0000068d0020009c000007920000613d0000068e0020009c00000ff20000c13d000000440030008c00000ff20000413d0000000401100370000000000101043b000006380010009c000004d10000a13d00000ff20000013d000006690020009c000007990000613d0000066a0020009c000003550000613d0000066b0020009c00000ff20000c13d000000440030008c00000ff20000413d0000000002000416000000000002004b00000ff20000c13d0000002402100370000000000202043b000800000002001d000006380020009c00000ff20000213d0000000401100370000000000101043b000000000010043f000000200000043f000004f90000013d0000067b0020009c000007e10000613d0000067c0020009c0000082d0000613d0000067d0020009c00000ff20000c13d000000640030008c00000ff20000413d0000000002000416000000000002004b00000ff20000c13d0000000402100370000000000202043b000800000002001d000006380020009c00000ff20000213d0000004402100370000000000202043b000700000002001d0000002401100370000000000101043b000600000001001d000000000010043f0000000d01000039000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f000000010020019000000ff20000613d000000000101043b0000000702000029000000000020043f000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f000000010020019000000ff20000613d000000000101043b0000000201100039000000000101041a000000ff001001900000000001000019000009e70000c13d000000010110018f000005010000013d000006570020009c000004220000613d000006580020009c00000ff20000c13d0000000001000416000000000001004b00000ff20000c13d18ce14cb0000040f0000063801100197000000800010043f0000069801200197000000a00010043f0000069901000041000018cf0001042e000006840020009c000004b70000613d000006850020009c00000ff20000c13d000000440030008c00000ff20000413d0000000002000416000000000002004b00000ff20000c13d0000000402100370000000000202043b000800000002001d0000002401100370000000000101043b000700000001001d000006380010009c00000ff20000213d0000000801000029000000000001004b0000074b0000613d000000000010043f000000200000043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f000000010020019000000ff20000613d000000000101043b0000000101100039000000000101041a000600000001001d000000000010043f000000200000043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f000000010020019000000ff20000613d0000000002000411000000000101043b0000063802200197000000000020043f000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f000000010020019000000ff20000613d000000000101043b000000000101041a000000ff0010019000000b460000c13d0000069601000041000000000010043f0000000001000411000000040010043f0000000601000029000000240010043f0000069701000041000018d000010430000006610020009c000004c10000613d000006620020009c00000ff20000c13d000000840030008c00000ff20000413d0000000402100370000000000202043b000800000002001d000006380020009c00000ff20000213d0000002402100370000000000202043b000700000002001d000006380020009c00000ff20000213d0000006402100370000000000202043b000006410020009c00000ff20000213d0000004401100370000000000101043b000600000001001d0000000401200039000000000203001918ce106d0000040f0000000004010019000001050000013d000006730020009c000004dd0000613d000006740020009c00000ff20000c13d000000440030008c00000ff20000413d0000000002000416000000000002004b00000ff20000c13d0000000402100370000000000202043b000800000002001d000006380020009c00000ff20000213d0000002402100370000000000402043b000006410040009c00000ff20000213d0000002302400039000000000032004b00000ff20000813d0000000405400039000000000251034f000000000202043b000006410020009c0000004b0000213d0000001f06200039000006eb066001970000003f06600039000006eb06600197000006b70060009c0000004b0000213d0000008006600039000000400060043f000000800020043f00000000042400190000002404400039000000000034004b00000ff20000213d0000002003500039000000000331034f000006eb042001980000001f0520018f000000a0014000390000030f0000613d000000a006000039000000000703034f000000007807043c0000000006860436000000000016004b0000030b0000c13d000000000005004b0000031c0000613d000000000343034f0000000304500210000000000501043300000000054501cf000000000545022f000000000303043b0000010004400089000000000343022f00000000034301cf000000000353019f0000000000310435000000a001200039000000000001043500000000010004110000063801100197000000000010043f0000063d01000041000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f000000010020019000000ff20000613d000000000101043b000000000101041a000000ff00100190000007640000613d000000080000006b00000d8f0000c13d000000400100043d0000004402100039000006cc0300004100000000003204350000002402100039000000150300003900000ad00000013d0000064e0020009c000004e80000613d0000064f0020009c00000ff20000c13d0000000001000416000000000001004b00000ff20000c13d000000000103001918ce10380000040f000700000002001d000800000003001d0000063801100197000000000010043f0000000f01000039000000200010043f000000400100003918ce18900000040f0000000702000029000000000020043f000000200010043f000000400100003918ce18900000040f0000000802000029000000000020043f000000200010043f000000400100003918ce18900000040f000004fd0000013d0000000001000416000000000001004b00000ff20000c13d0000000201000039000007380000013d0000000102000039000000000102041a0000063a011001970000063b011001c7000000000012041b0000000201000039000000000201041a00000638002001980000074b0000c13d000600000007001d000500000006001d000300000005001d000700000004001d0000063c02200197000000000282019f000000000021041b0000063801800197000800000001001d000000000010043f0000063d01000041000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c70000801002000039000400000003001d18ce18c40000040f000000010020019000000ff20000613d000000000101043b000000000101041a000000ff001001900000039d0000c13d0000000801000029000000000010043f0000063d01000041000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f000000010020019000000ff20000613d000000000101043b000000000201041a000006ea0220019700000001022001bf000000000021041b0000000001000414000006350010009c0000063501008041000000c0011002100000063f011001c70000800d020000390000000403000039000006400400004100000000050000190000000806000029000000000700041118ce18bf0000040f000000010020019000000ff20000613d00000005010000290000000006010433000006410060009c000000070300002900000006040000290000004b0000213d0000000505000039000000000105041a000000010210019000000001071002700000007f0770618f0000001f0070008c00000000010000390000000101002039000000000012004b000009360000613d000006d701000041000000000010043f0000002201000039000000040010043f0000064701000041000018d0000104300000000001000416000000000001004b00000ff20000c13d00000000010004110000063801100197000000000010043f0000063d01000041000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f000000010020019000000ff20000613d000000000101043b000000000101041a000000ff00100190000007640000613d0000069e010000410000000000100443000000000100041000000004001004430000000001000414000006350010009c0000063501008041000000c0011002100000069f011001c70000800a0200003918ce18c40000040f000000010020019000000d310000613d000000000301043b00000000010004140000000004000411000000040040008c000009e00000c13d0000000102000039000000010100003100000a9b0000013d000000000103001918ce10260000040f18ce10d90000040f0000000001000019000018cf0001042e0000000001000416000000000001004b00000ff20000c13d00000000020004150000000a0220008a00000005022002100000000201000039000000000301041a000000d001300272000004010000613d000700000003001d000800000001001d0000069a0100004100000000001004430000000001000414000006350010009c0000063501008041000000c0011002100000069b011001c70000800b0200003918ce18c40000040f000000010020019000000d310000613d0000000002000415000000090220008a0000000502200210000000000101043b0000000804000029000000000014004b00000007010000290000096b0000813d0000000501200270000000000100003f00000000010000190000000004000019000000400200043d000000200320003900000000004304350000000000120435000006350020009c00000635020080410000004001200210000006b5011001c7000018cf0001042e000000240030008c00000ff20000413d0000000002000416000000000002004b00000ff20000c13d0000000401100370000000000101043b18ce14fb0000040f0000063801100197000005010000013d000000000103001918ce10c70000040f18ce157a0000040f000000400100043d0000000000010435000006350010009c0000063501008041000000400110021000000692011001c7000018cf0001042e0000000001000416000000000001004b00000ff20000c13d0000000101000039000000000101041a00000638021001970000000003000411000000000023004b0000087e0000c13d000000a0011002700000069802100198000008830000613d000800000002001d0000069a0100004100000000001004430000000001000414000006350010009c0000063501008041000000c0011002100000069b011001c70000800b0200003918ce18c40000040f000000010020019000000d310000613d000000000101043b0000000802000029000000000012004b000008830000813d0000000202000039000000000102041a000800000001001d0000063c01100197000000000012041b000000000000043f000000200000043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f000000010020019000000ff20000613d00000008020000290000063802200197000000000101043b000800000002001d000000000020043f000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f000000010020019000000ff20000613d000000000101043b000000000101041a000000ff0010019000000c660000c13d0000000201000039000000000101041a00000638001001980000074b0000c13d0000063c011001970000000002000411000000000121019f0000000202000039000000000012041b000000000000043f000000200000043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f000000010020019000000ff20000613d000000000101043b0000000002000411000000000020043f000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f000000010020019000000ff20000613d000000000101043b000000000101041a000000ff00100190000004b10000c13d000000000000043f000000200000043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f000000010020019000000ff20000613d000000000101043b0000000002000411000000000020043f000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f000000010020019000000ff20000613d000000000101043b000000000201041a000006ea0220019700000001022001bf000000000021041b0000000001000414000006350010009c0000063501008041000000c0011002100000063f011001c70000800d020000390000000403000039000006400400004100000000050000190000000006000411000000000706001918ce18bf0000040f000000010020019000000ff20000613d0000000102000039000000000102041a0000069301100197000000000012041b0000000001000019000018cf0001042e000000240030008c00000ff20000413d0000000002000416000000000002004b00000ff20000c13d0000000401100370000000000101043b000000000010043f0000000e01000039000005a90000013d000000440030008c00000ff20000413d0000000002000416000000000002004b00000ff20000c13d0000000402100370000000000202043b000006380020009c00000ff20000213d0000002401100370000000000101043b000000000001004b0000000002000039000000010200c039000000000021004b00000ff20000c13d000006a101000041000000800010043f0000002001000039000000840010043f0000003601000039000000a40010043f000006dd01000041000000c40010043f000006de01000041000000e40010043f000006df01000041000018d000010430000000240030008c00000ff20000413d0000000002000416000000000002004b00000ff20000c13d0000000401100370000000000101043b000006380010009c00000ff20000213d18ce12300000040f000005010000013d000000440030008c00000ff20000413d0000000002000416000000000002004b00000ff20000c13d0000000402100370000000000202043b000006380020009c00000ff20000213d0000002401100370000000000101043b000800000001001d000006380010009c00000ff20000213d000000000020043f0000000a01000039000000200010043f000000400100003918ce18900000040f000000080200002918ce10b70000040f000000000101041a000000ff001001900000000001000039000000010100c039000000400200043d0000000000120435000006350020009c0000063502008041000000400120021000000692011001c7000018cf0001042e000000240030008c00000ff20000413d0000000002000416000000000002004b00000ff20000c13d0000000401100370000000000201043b000006e20020019800000ff20000c13d0000000101000039000006e302200197000006e40020009c0000088c0000213d000006e70020009c000008950000613d000006e80020009c000008950000613d000008900000013d0000000001000416000000000001004b00000ff20000c13d000006ce01000041000000800010043f000006b401000041000018cf0001042e0000000001000416000000000001004b00000ff20000c13d0000000001000412000e00000001001d000d00600000003d0000800501000039000000440300003900000000040004150000000e0440008a0000000504400210000006bb0200004118ce18a10000040f000007390000013d000000240030008c00000ff20000413d0000000002000416000000000002004b00000ff20000c13d0000000401100370000000000101043b000800000001001d000006380010009c00000ff20000213d00000000010004110000063801100197000700000001001d000000000010043f0000063d01000041000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f000000010020019000000ff20000613d000000000101043b000000000101041a000000ff00100190000007640000613d000000400b00043d000006c10100004100000000001b04350000000401b000390000000002000410000000000021043500000000010004140000000802000029000000040020008c00000a140000c13d0000000103000031000000200030008c0000002004000039000000000403401900000a400000013d000000440030008c00000ff20000413d0000000002000416000000000002004b00000ff20000c13d0000000402100370000000000202043b000800000002001d0000002401100370000000000101043b000700000001001d000006380010009c00000ff20000213d000000080000006b000008990000c13d0000000203000039000000000103041a00000638011001970000000702000029000000000012004b0000058e0000c13d0000000101000039000000000101041a000000a00210027000000698052001970000063800100198000009db0000c13d000000000005004b000009db0000613d000600000005001d0000069a0100004100000000001004430000000001000414000006350010009c0000063501008041000000c0011002100000069b011001c70000800b0200003918ce18c40000040f000000010020019000000d310000613d000000000101043b0000000605000029000000000015004b000000070200002900000002030000390000000104000039000009db0000813d000000000104041a000006d201100197000000000014041b0000000001000411000000000012004b000008fd0000c13d000000000203041a000000000112013f00000638001001980000089c0000c13d0000063c01200197000000000013041b0000089c0000013d000000440030008c00000ff20000413d0000000002000416000000000002004b00000ff20000c13d0000002402100370000000000202043b000800000002001d0000000401100370000000000101043b000000000010043f0000000d01000039000000200010043f000000400100003918ce18900000040f0000000802000029000000000020043f000000200010043f000000400100003918ce18900000040f0000000202100039000000000202041a0000000103100039000000000303041a000000000101041a000000800010043f000000a00030043f000000ff002001900000000001000039000000010100c039000000c00010043f000006d901000041000018cf0001042e000000240030008c00000ff20000413d0000000002000416000000000002004b00000ff20000c13d0000000401100370000000000101043b18ce14500000040f000000400200043d000800000002001d18ce10480000040f0000000801000029000006350010009c00000635010080410000004001100210000006b3011001c7000018cf0001042e000000240030008c00000ff20000413d0000000002000416000000000002004b00000ff20000c13d0000000401100370000000000201043b0000000301000039000000000101041a000000000021004b000009cb0000a13d000700000002001d000800000002001d000000000020043f0000000701000039000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f000000010020019000000ff20000613d000000000101043b000000000101041a000000000001004b000009010000c13d0000000802000029000000000002004b000000010220008a000005d60000c13d0000078c0000013d0000000001000416000000000001004b00000ff20000c13d00000000010004110000063801100197000000000010043f0000063d01000041000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f000000010020019000000ff20000613d000000000101043b000000000101041a000000ff00100190000007640000613d0000000201000039000000000101041a000700000001001d000800d00010027a000009b30000c13d0000000202000039000000000102041a0000063801100197000000000012041b0000000001000019000018cf0001042e0000000001000416000000000001004b00000ff20000c13d0000000401000039000000000101041a0000000302000039000000000202041a0000000001120049000000800010043f000006b401000041000018cf0001042e000000440030008c00000ff20000413d0000000402100370000000000202043b000600000002001d000006410020009c00000ff20000213d00000006020000290000002302200039000000000032004b00000ff20000813d00000006020000290000000402200039000000000221034f000000000202043b000500000002001d000006410020009c00000ff20000213d00000006020000290000002405200039000000050200002900000005022002100000000002520019000000000032004b00000ff20000213d0000002402100370000000000202043b000006410020009c00000ff20000213d0000002304200039000000000034004b00000ff20000813d0000000404200039000000000141034f000000000101043b000800000001001d000006410010009c00000ff20000213d000400240020003d000000080100002900000005011002100000000401100029000000000031004b00000ff20000213d000300000005001d000006bb01000041000000000010044300000000010004120000000400100443000000600100003900000024001004430000000001000414000006350010009c0000063501008041000000c001100210000006bc011001c7000080050200003918ce18c40000040f000000010020019000000d310000613d000000000101043b00000638011001970000000002000411000000000012004b00000c910000c13d0000000802000029000000050020006b00000dc50000c13d000000050000006b000006820000613d0000000001000416000800000001001d0000000002000019000700000002001d000000050120021000000004031000290000000202000367000000000332034f000000000303043b0008000800300073000000030600002900000fcf0000413d0000000001610019000000000112034f000000000101043b00000006020000290000000002200079000001630220008a000006bd03100197000006bd04200197000000000543013f000000000043004b0000000003000019000006bd03004041000000000021004b0000000002000019000006bd02008041000006bd0050009c000000000302c019000000000003004b00000ff20000c13d000000000161001918ce15940000040f00000007020000290000000102200039000000050020006c000006600000413d000000400100043d000000010200003900000000002104350000041d0000013d0000000001000416000000000001004b00000ff20000c13d000000c001000039000000400010043f0000000201000039000000800010043f000006b901000041000000a00010043f0000002001000039000000c00010043f0000008001000039000000e00200003918ce0ff40000040f000000c00110008a000006350010009c00000635010080410000006001100210000006ba011001c7000018cf0001042e000000240030008c00000ff20000413d0000000002000416000000000002004b00000ff20000c13d0000000402100370000000000202043b000006410020009c00000ff20000213d0000002304200039000000000034004b00000ff20000813d000700040020003d0000000701100360000000000101043b000006410010009c00000ff20000213d000000050410021000000000024200190000002402200039000000000032004b00000ff20000213d0000000005040019000000800010043f000000a002400039000000400020043f000000000001004b000006ef0000c13d00000020010000390000000001120436000000800300043d00000000003104350000004001200039000000000003004b000008240000613d000000800400003900000000050000190000002004400039000000000604043300000000870604340000063807700197000000000771043600000000080804330000064108800197000000000087043500000040076000390000000007070433000000000007004b0000000007000039000000010700c0390000004008100039000000000078043500000060066000390000000006060433000006d4066001970000006007100039000000000067043500000080011000390000000105500039000000000035004b000006bf0000413d000008240000013d000000000101043b000000000101041a0000008003200039000000400030043f0000006003200039000000e8041002700000000000430435000006a3001001980000000003000039000000010300c0390000004004200039000000000034043500000638031001970000000003320436000000a00110027000000641011001970000000000130435000000200150008c00000080035000390000000000230435000000400200043d0000000005010019000006b60000613d000006b70020009c0000004b0000213d00000007015000290000000201100367000000000301043b0000008001200039000000400010043f00000060012000390000000000010435000000400120003900000000000104350000002001200039000000000001043500000000000204350000000301000039000000000101041a000000000031004b000006e90000a13d000600000005001d000800000003001d000000000030043f0000000701000039000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f000000010020019000000ff20000613d000000000101043b000000000101041a000000000001004b000007160000c13d0000000803000029000000010330008a000007020000013d000000400100043d000006b70010009c00000008030000290000004b0000213d0000008002100039000000400020043f0000006002100039000000000002043500000040021000390000000000020435000000200210003900000000000204350000000000010435000000000030043f0000000701000039000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f000000010020019000000ff20000613d000000400200043d000006b70020009c0000000605000029000006d80000a13d0000004b0000013d0000000001000416000000000001004b00000ff20000c13d000006c901000041000000000101041a0000063801100197000000800010043f000006b401000041000018cf0001042e000000440030008c00000ff20000413d0000000002000416000000000002004b00000ff20000c13d0000000402100370000000000202043b0000002401100370000000000101043b000800000001001d000006380010009c00000ff20000213d000000000002004b000008e20000c13d000006db01000041000000000010043f0000064501000041000018d0000104300000000001000416000000000001004b00000ff20000c13d00000000010004110000063801100197000000000010043f0000063d01000041000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f000000010020019000000ff20000613d000000000101043b000000000101041a000000ff00100190000008eb0000c13d0000069601000041000000000010043f0000000001000411000000040010043f000000240000043f0000069701000041000018d000010430000000240030008c00000ff20000413d0000000002000416000000000002004b00000ff20000c13d0000000401100370000000000201043b0000000301000039000000000101041a000000000021004b000009320000a13d000700000002001d000800000002001d000000000020043f0000000701000039000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f000000010020019000000ff20000613d000000000101043b000000000101041a000000000001004b000009270000c13d0000000802000029000000000002004b000000010220008a000007770000c13d000006d701000041000000000010043f0000001101000039000000040010043f0000064701000041000018d0000104300000000001000416000000000001004b00000ff20000c13d000006c901000041000000800010043f000006b401000041000018cf0001042e000000440030008c00000ff20000413d0000000402100370000000000202043b000800000002001d000006410020009c00000ff20000213d00000008020000290000002302200039000000000032004b00000ff20000813d0000000802000029000600040020003d0000000602100360000000000202043b000700000002001d000006410020009c00000ff20000213d0000000702000029000000050220021000000008022000290000002402200039000000000032004b00000ff20000213d0000002402100370000000000202043b000006410020009c00000ff20000213d0000002304200039000000000034004b00000ff20000813d000400040020003d0000000401100360000000000101043b000500000001001d000006410010009c00000ff20000213d0000000501000029000000050110021000000000011200190000002401100039000000000031004b00000ff20000213d000006bb01000041000000000010044300000000010004120000000400100443000000600100003900000024001004430000000001000414000006350010009c0000063501008041000000c001100210000006bc011001c7000080050200003918ce18c40000040f000000010020019000000d310000613d000000000101043b00000638011001970000000002000411000000000012004b00000c910000c13d0000000502000029000000070020006b00000dc50000c13d000000070000006b00000fc70000c13d000000070000006b00000000010000390000000101006039000005010000013d0000000001000416000000000001004b00000ff20000c13d0000000001000412001400000001001d001300000000003d000080050100003900000044030000390000000004000415000000140440008a0000000504400210000006bb0200004118ce18a10000040f18ce152e0000040f0000000002000412001200000002001d001100200000003d000700000001001d0000000004000415000000120440008a00000005044002100000800501000039000006bb02000041000000440300003918ce18a10000040f18ce152e0000040f0000000002000412001000000002001d000f00400000003d000600000001001d0000000004000415000000100440008a00000005044002100000800501000039000006bb02000041000000440300003918ce18a10000040f18ce152e0000040f000500000001001d000000400100043d000800000001001d0000002002100039000000070100002918ce12020000040f000006d80200004100000000002104350000000102100039000000060100002918ce12020000040f000006d80200004100000000002104350000000102100039000000050100002918ce12020000040f00000008030000290000000002310049000000200120008a0000000000130435000000000103001918ce105b0000040f0000002001000039000000400200043d000700000002001d0000000002120436000000080100002918ce0ff40000040f00000007020000290000000001210049000006350010009c00000635010080410000006001100210000006350020009c00000635020080410000004002200210000000000121019f000018cf0001042e000000240030008c00000ff20000413d0000000002000416000000000002004b00000ff20000c13d0000000402100370000000000202043b000006410020009c00000ff20000213d0000002304200039000000000034004b00000ff20000813d000700040020003d0000000701100360000000000101043b000800000001001d000006410010009c00000ff20000213d0000002402200039000600000002001d0000000801200029000000000031004b00000ff20000213d00000000010004110000063801100197000000000010043f0000063d01000041000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f000000010020019000000ff20000613d000000000101043b000000000101041a000000ff00100190000007640000613d0000000c02000039000000000102041a000000010010019000000001031002700000007f0330618f0000001f0030008c00000000040000390000000104002039000000000141013f0000000100100190000003ad0000c13d000000200030008c00000008010000290000001f01100039000008740000413d000000000020043f0000000504100270000006d50440009a0000000805000029000000200050008c000006af040040410000001f033000390000000503300270000006d50330009a000000000034004b000008740000813d000000000004041b0000000104400039000000000034004b000008700000413d00000008030000290000001f0030008c00000c950000a13d000000000020043f000000200300008a000000080430018000000dc90000c13d000006af03000041000000000500001900000dd50000013d0000064601000041000000000010043f000000040030043f0000064701000041000018d0000104300000069d01000041000000000010043f000000040020043f0000064701000041000018d000010430000006b601000041000000000010043f0000064501000041000018d000010430000006e50020009c000008950000613d000006e60020009c000008950000613d000006e70020009c00000000010000390000000101006039000006e90020009c00000001011061bf000000010110018f000000800010043f000006b401000041000018cf0001042e0000000001000411000000070010006b000008fd0000c13d0000000801000029000000000010043f000000200000043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f000000010020019000000ff20000613d000000000101043b0000000702000029000000000020043f000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f000000010020019000000ff20000613d000000000101043b000000000101041a000000ff0010019000000a9f0000613d0000000801000029000000000010043f000000200000043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f000000010020019000000ff20000613d000000000101043b0000000702000029000000000020043f000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f000000010020019000000ff20000613d000000000101043b000000000201041a000006ea02200197000000000021041b0000000001000414000006350010009c0000063501008041000000c0011002100000063f011001c70000800d0200003900000004030000390000069c04000041000000080500002900000007060000290000000007060019000008f90000013d0000000001020019000700000002001d18ce11f10000040f18ce14d10000040f0000000701000029000000080200002918ce18370000040f0000000001000019000018cf0001042e0000000101000039000000000201041a0000069303200197000000000031041b000006940020019800000a9f0000613d0000000001000414000006350010009c0000063501008041000000c0011002100000063f011001c70000800d020000390000000103000039000006950400004118ce18bf0000040f000000010020019000000a9f0000c13d00000ff20000013d000006da01000041000000000010043f0000064501000041000018d000010430000006a3001001980000000701000029000009ca0000c13d000000000010043f0000000e01000039000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f000000010020019000000ff20000613d000000400200043d000006a50020009c0000004b0000213d000000000101043b0000006003200039000000400030043f000000000401041a00000000034204360000000105100039000000000505041a000000000053043500000040022000390000000201100039000000000101041a000000ff001001900000000001000039000000010100c0390000000000120435000006a60040009c00000c200000413d0000004005000039000006a60140012a00000c290000013d000006a3001001980000000701000029000009320000c13d000000000010043f0000000901000039000000200010043f000000400100003918ce18900000040f000000000101041a0000063801100197000005010000013d000006e001000041000000000010043f0000064501000041000018d000010430000000200070008c000009580000413d000200000007001d000800000006001d000000000050043f0000000001000414000006350010009c0000063501008041000000c00110021000000642011001c7000080100200003918ce18c40000040f000000010020019000000ff20000613d00000008060000290000001f026000390000000502200270000000200060008c0000000002004019000000000301043b00000002010000290000001f01100039000000050110027000000000011300190000000002230019000000000012004b000000070300002900000006040000290000000505000039000009580000813d000000000002041b0000000102200039000000000012004b000009540000413d000000200060008c00000a880000413d000800000006001d000000000050043f0000000001000414000006350010009c0000063501008041000000c00110021000000642011001c7000080100200003918ce18c40000040f000000010020019000000ff20000613d000000200200008a0000000802200180000000000101043b00000b9f0000c13d000000200300003900000bac0000013d000000a0011002700000069801100197000004050000013d000700000003001d000000000010043f0000000801000039000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f000000010020019000000ff20000613d0000006004000039000000000101043b0000000703000029000000020230006b00000f410000a13d000000000101041a000006410110019800000f410000613d000000000012004b0000000002018019000100000002001d0000000501200210000000400200043d000500000002001d00000000012100190000002001100039000000400010043f000600000001001d000006b70010009c0000004b0000213d00000006020000290000008001200039000000400010043f00000060012000390000000000010435000000400120003900000000000104350000002001200039000000000001043500000000000204350000000301000039000000000101041a000000000031004b000000000100001900000ca30000a13d0000000701000029000800000001001d000000000010043f0000000701000039000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f000000010020019000000ff20000613d000000000101043b000000000101041a000000000001004b00000e1a0000c13d0000000801000029000000010110008a0000099f0000013d0000069a0100004100000000001004430000000001000414000006350010009c0000063501008041000000c0011002100000069b011001c70000800b0200003918ce18c40000040f000000010020019000000d310000613d000000000101043b000000080010006b00000b110000813d0000000701000029000000300110021000000693011001970000000102000039000000000302041a0000063a03300197000000000113019f000000000012041b000006060000013d000000400400043d0000004401400039000006a4020000410000000000210435000000240140003900000014020000390000000000210435000006a1010000410000000000140435000000040140003900000020020000390000000000210435000006350040009c00000635040080410000004001400210000006a2011001c7000018d0000104300000069d01000041000000000010043f000000040050043f0000064701000041000018d000010430000006350010009c0000063501008041000000c001100210000000000003004b00000a930000c13d000000000204001900000a960000013d0000000801000029000000000010043f0000000f01000039000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f000000010020019000000ff20000613d000000000101043b0000000602000029000000000020043f000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f000000010020019000000ff20000613d000000000101043b0000000702000029000000000020043f000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f000000010020019000000ff20000613d000000000101043b000000000101041a000000ff0010019000000000010000390000000101006039000002680000013d0000063500b0009c000006350300004100000000030b40190000004003300210000006350010009c0000063501008041000000c001100210000000000131019f00000647011001c700060000000b001d18ce18c40000040f000000060b00002900000060031002700000063503300197000000200030008c000000200400003900000000040340190000001f0640018f000000200740019000000000057b001900000a2f0000613d000000000801034f00000000090b0019000000008a08043c0000000009a90436000000000059004b00000a2b0000c13d000000000006004b00000a3c0000613d000000000771034f0000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000100000003001f0003000000010355000000010020019000000b1d0000613d0000001f01400039000000600210018f0000000001b20019000000000021004b00000000020000390000000102004039000006410010009c0000004b0000213d00000001002001900000004b0000c13d000000400010043f000000200030008c00000ff20000413d00000000020b04330000000001000415000600000001001d000000400100043d000000440310003900000000002304350000002002100039000006c203000041000000000032043500000024031000390000000704000029000000000043043500000044030000390000000000310435000006b70010009c0000004b0000213d0000008003100039000700000003001d000000400030043f000000000401043300000000030004140000000805000029000000040050008c00000cff0000c13d000000010300003200000e4b0000c13d000700600000003d00000000020004150000000c0220008a000000050220021000000007010000290000000001010433000000000001004b00000e990000c13d000006c5010000410000000000100443000000040100003900000004001004430000000001000414000006350010009c0000063501008041000000c0011002100000069f011001c7000080020200003918ce18c40000040f000000010020019000000d310000613d00000000020004150000000c0220008a0000000502200210000000000101043b000000000001004b00000fd30000c13d000006c601000041000000000010043f0000000401000039000000040010043f0000064701000041000018d000010430000000000006004b000000000100001900000bbb0000613d0000000301600210000006ec0110027f000006ec011001670000000002040433000000000112016f0000000102600210000000000121019f00000bbb0000013d0000063f011001c70000800902000039000000000500001918ce18bf0000040f00030000000103550000006001100270000106350010019d0000063501100197000000000001004b00000aa10000c13d000000010020019000000aca0000613d0000000001000019000018cf0001042e000006410010009c0000004b0000213d0000001f04100039000006eb044001970000003f04400039000006eb05400197000000400400043d0000000005540019000000000045004b00000000060000390000000106004039000006410050009c0000004b0000213d00000001006001900000004b0000c13d000000400050043f0000000006140436000006eb031001980000001f0410018f0000000001360019000000030500036700000abc0000613d000000000705034f000000007807043c0000000006860436000000000016004b00000ab80000c13d000000000004004b00000a9d0000613d000000000335034f0000000304400210000000000501043300000000054501cf000000000545022f000000000303043b0000010004400089000000000343022f00000000034301cf000000000353019f000000000031043500000a9d0000013d000000400100043d0000004402100039000006a003000041000000000032043500000024021000390000000f030000390000000000320435000006a1020000410000000000210435000000040210003900000020030000390000000000320435000006350010009c00000635010080410000004001100210000006a2011001c7000018d000010430000700000002001d0000000201000039000000000101041a000500000001001d000600d00010027a00000b8d0000c13d0000000101000039000000000101041a000000d0011002700000000701100029000700000001001d000006980010009c0000078c0000213d0000000801000029000006d2011001970000000702000029000000a0022002100000069402200197000000000112019f0000000102000039000000000302041a0000069304300197000000000141019f000000000012041b000006940030019800000b000000613d0000000001000414000006350010009c0000063501008041000000c0011002100000063f011001c70000800d020000390000000103000039000006950400004118ce18bf0000040f000000010020019000000ff20000613d000000400100043d00000007020000290000000000210435000006350010009c000006350100804100000040011002100000000002000414000006350020009c0000063502008041000000c002200210000000000112019f00000642011001c70000800d020000390000000203000039000006d3040000410000000805000029000008f90000013d0000000001000414000006350010009c0000063501008041000000c0011002100000063f011001c70000800d020000390000000103000039000006cf0400004118ce18bf0000040f0000000100200190000006060000c13d00000ff20000013d0000001f0530018f0000063706300198000000400200043d000000000462001900000b280000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000048004b00000b240000c13d000000000005004b00000b350000613d000000000161034f0000000305500210000000000604043300000000065601cf000000000656022f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f00000000001404350000006001300210000006350020009c00000635020080410000004002200210000000000112019f000018d0000104300000000101000039000000000101041a000000d0011002700000000802000029000606980020019b000000060110006c00000bfe0000813d0000000601000029000006ce0010009c000006ce0100804100000c000000013d0000000801000029000000000010043f000000200000043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f000000010020019000000ff20000613d000000000101043b0000000702000029000000000020043f000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f000000010020019000000ff20000613d000000000101043b000000000101041a000000ff0010019000000a9f0000c13d0000000801000029000000000010043f000000200000043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f000000010020019000000ff20000613d000000000101043b0000000702000029000000000020043f000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f000000010020019000000ff20000613d000000000101043b000000000201041a000006ea0220019700000001022001bf000000000021041b0000000001000414000006350010009c0000063501008041000000c0011002100000063f011001c70000800d0200003900000004030000390000064004000041000000080500002900000007060000290000000007000411000008f90000013d0000069a0100004100000000001004430000000001000414000006350010009c0000063501008041000000c0011002100000069b011001c70000800b0200003918ce18c40000040f000000010020019000000d310000613d000000000101043b000000060010006b00000ae10000813d0000000501000029000000a001100270000006980110019700000ae40000013d000000010320008a0000000503300270000000000431001900000020030000390000000104400039000000050600002900000000056300190000000005050433000000000051041b00000020033000390000000101100039000000000041004b00000ba50000c13d0000000805000029000000000052004b00000bb70000813d0000000302500210000000f80220018f000006ec0220027f000006ec0220016700000005033000290000000003030433000000000223016f000000000021041b000000010150021000000001011001bf00000007030000290000000505000039000000000015041b0000000001030433000006410010009c0000004b0000213d000800000001001d0000000601000039000000000101041a000000010010019000000001031002700000007f0330618f0000001f0030008c00000000020000390000000102002039000000000121013f0000000100100190000003ad0000c13d000600000003001d000000200030008c00000bea0000413d0000000601000039000000000010043f0000000001000414000006350010009c0000063501008041000000c00110021000000642011001c7000080100200003918ce18c40000040f000000010020019000000ff20000613d00000008030000290000001f023000390000000502200270000000200030008c0000000002004019000000000301043b00000006010000290000001f01100039000000050110027000000000011300190000000002230019000000000012004b00000bea0000813d000000000002041b0000000102200039000000000012004b00000be60000413d0000000801000029000000200010008c00000cf20000413d0000000601000039000000000010043f0000000001000414000006350010009c0000063501008041000000c00110021000000642011001c7000080100200003918ce18c40000040f000000010020019000000ff20000613d000000200200008a0000000802200180000000000101043b00000eb50000c13d000000200300003900000ec20000013d000006980010009c0000078c0000213d0000000701100029000700000001001d000006980010009c0000078c0000213d0000000201000039000000000101041a000400000001001d000500d00010027a00000f650000613d0000069a0100004100000000001004430000000001000414000006350010009c0000063501008041000000c0011002100000069b011001c70000800b0200003918ce18c40000040f000000010020019000000d310000613d000000000101043b000000050010006b00000f5a0000813d0000000401000029000000300110021000000693011001970000000102000039000000000302041a0000063a03300197000000000113019f000000000012041b00000f650000013d000006a80040009c0000000001040019000006a70110212a00000000050000390000002005002039000006a90010009c00000010055081bf000006aa01108197000006a90110812a000006ab0010009c00000008055080390000064101108197000006ab0110812a000027100010008c00000004055080390000063501108197000027100110811a000000640010008c00000002055080390000ffff0110818f000000640110811a000000090010008c0000000105502039000006eb025001970000005f01200039000006eb07100197000000400100043d0000000006170019000000000076004b00000000070000390000000107004039000006410060009c0000004b0000213d00000001007001900000004b0000c13d000000400060043f000000010650003900000000066104360000002002200039000006eb082001980000001f0720018f0000000002000031000000020220036700000c520000613d0000000008860019000000000902034f000000009a09043c0000000006a60436000000000086004b00000c4e0000c13d000000000007004b00000000055100190000002105500039000000090040008c0000000a6440011a0000000306600210000000010550008a0000000007050433000006ac07700197000006ad0660021f000006ae06600197000000000676019f000000000065043500000c550000213d0000000003030433000006a60030009c00000d320000413d0000004004000039000006a60530012a00000d3b0000013d000000000000043f000000200000043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f000000010020019000000ff20000613d000000000101043b0000000802000029000000000020043f000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f000000010020019000000ff20000613d000000000101043b000000000201041a000006ea02200197000000000021041b0000000001000414000006350010009c0000063501008041000000c0011002100000063f011001c70000800d0200003900000004030000390000069c0400004100000000050000190000000806000029000000000700041118ce18bf0000040f0000000100200190000004610000c13d00000ff20000013d000006be01000041000000000010043f0000064501000041000018d000010430000000080000006b000000000300001900000c9b0000613d00000006030000290000000203300367000000000303043b00000008060000290000000304600210000006ec0440027f000006ec04400167000000000343016f0000000104600210000000000343019f00000de40000013d000800000001001d000400000000001d00000000010000190000000705000029000000050400002900000cae0000013d000800000000001d0000000601000029000000400010043f00000001055000390000000101000039000000010010019000000cb50000613d000000020050006c00000f3f0000613d0000000402000029000000010020006c00000f3f0000613d000000400100043d000006b70010009c0000004b0000213d0000008002100039000000400020043f0000006002100039000000000002043500000040021000390000000000020435000000200210003900000000000204350000000000010435000700000005001d000000000050043f0000000701000039000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f000000010020019000000ff20000613d000000400200043d000006b70020009c00000007050000290000004b0000213d000000000101043b000000000101041a0000006003200039000000e80410027000000000004304350000004003200039000006a3001001980000000004000039000000010400c0390000000000430435000000a00310027000000641033001970000002004200039000000000034043500000638011001970000000000120435000000050400002900000ca90000c13d000000000001004b00000000020100190000000802006029000800000002001d000000030120014f000006380010019800000caa0000c13d00000004010000290000000101100039000400000001001d00000005011002100000000001410019000000000051043500000caa0000013d000000080000006b000000000100001900000ed00000613d00000008030000290000000301300210000006ec0110027f000006ec0110016700000003020000290000000002020433000000000112016f0000000102300210000000000121019f00000ed00000013d000006350020009c00000635020080410000004001200210000006350040009c00000635040080410000006002400210000000000112019f000006350030009c0000063503008041000000c002300210000000000121019f000000080200002918ce18bf0000040f00030000000103550000006003100270000106350030019d000006350430019800000e700000c13d000700600000003d000000800300003900000007010000290000000001010433000000010020019000000eaf0000613d00000000020004150000000b0220008a0000000502200210000000000001004b00000e990000c13d000006c5010000410000000000100443000000080100002900000004001004430000000001000414000006350010009c0000063501008041000000c0011002100000069f011001c7000080020200003918ce18c40000040f000000010020019000000d310000613d00000000020004150000000b0220008a0000000502200210000000000101043b000000000001004b00000fd30000c13d000006c60100004100000eaa0000013d000000000001042f000006a80030009c0000000005030019000006a70550212a00000000040000390000002004002039000006a90050009c00000010044081bf000006aa05508197000006a90550812a000006ab0050009c00000008044080390000064105508197000006ab0550812a000027100050008c00000004044080390000063505508197000027100550811a000000640050008c00000002044080390000ffff0550818f000000640550811a000000090050008c0000000104402039000006eb064001970000005f05600039000006eb07500197000000400500043d000800000005001d0000000005570019000000000075004b00000000070000390000000107004039000006410050009c0000004b0000213d00000001007001900000004b0000c13d000000400050043f0000000105400039000000080700002900000000055704360000002006600039000006eb076001980000001f0660018f00000d630000613d0000000007750019000000002802043c0000000005850436000000000075004b00000d5f0000c13d000000000006004b00000008024000290000002102200039000000090030008c0000000a4330011a0000000304400210000000010220008a0000000005020433000006ac05500197000006ad0440021f000006ae04400197000000000454019f000000000042043500000d660000213d0000000c04000039000000000304041a000000010530019000000001023002700000007f0220618f0000001f0020008c00000000060000390000000106002039000000000663013f0000000100600190000003ad0000c13d000000400600043d000600000006001d000700200060003d000000000005004b00000ef10000613d000000000040043f000000000002004b000000070700002900000ef40000613d000006af0300004100000000040000190000000005740019000000000603041a000000000065043500000001033000390000002004400039000000000024004b00000d870000413d00000ef40000013d000006c9010000410000000802000029000000000021041b000000800100043d000000000001004b00000a9f0000613d00000000020004140000000803000029000000040030008c00000f8a0000c13d000000010100003200000a9f0000613d000006410010009c0000004b0000213d0000001f02100039000006eb022001970000003f02200039000006eb03200197000000400200043d0000000003320019000000000023004b00000000040000390000000104004039000006410030009c0000004b0000213d00000001004001900000004b0000c13d000000400030043f0000000005120436000006eb021001980000001f0310018f0000000001250019000000030400036700000db60000613d000000000604034f000000006706043c0000000005750436000000000015004b00000db20000c13d000000000003004b00000a9f0000613d000000000224034f0000000303300210000000000401043300000000043401cf000000000434022f000000000202043b0000010003300089000000000232022f00000000023201cf000000000242019f00000000002104350000000001000019000018cf0001042e000006bf01000041000000000010043f0000064501000041000018d000010430000006af030000410000000206000367000000000500001900000006080000290000000007850019000000000776034f000000000707043b000000000073041b00000001033000390000002005500039000000000045004b00000dcd0000413d000000080040006c00000de10000813d00000008040000290000000304400210000000f80440018f000006ec0440027f000006ec0440016700000006055000290000000205500367000000000505043b000000000445016f000000000043041b0000000803000029000000010330021000000001033001bf000000000032041b0000002003000039000000400200043d000000000332043600000008040000290000000000430435000006eb064001980000001f0740018f0000004004200039000000000564001900000007080000290000002008800039000000020880036700000df80000613d000000000908034f000000000a040019000000009b09043c000000000aba043600000000005a004b00000df40000c13d000000000007004b00000e050000613d000000000668034f0000000307700210000000000805043300000000087801cf000000000878022f000000000606043b0000010007700089000000000676022f00000000067601cf000000000686019f0000000000650435000006eb01100197000000080340002900000000000304350000004001100039000006350010009c00000635010080410000006001100210000006350020009c00000635020080410000004002200210000000000112019f0000000002000414000006350020009c0000063502008041000000c002200210000000000112019f0000063f011001c70000800d020000390000000103000039000006d604000041000008f90000013d000000400100043d000006b70010009c0000004b0000213d0000008002100039000000400020043f00000060021000390000000000020435000000400210003900000000000204350000002002100039000000000002043500000000000104350000000801000029000000000010043f0000000701000039000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f000000010020019000000ff20000613d000000400200043d000006b70020009c0000004b0000213d000000000101043b000000000101041a0000008003200039000000400030043f0000006003200039000000e80410027000000000004304350000004003200039000006a3001001980000000004000039000000010400c0390000000000430435000000a00310027000000641033001970000002004200039000000000034043500000638011001970000000000120435000800000000001d000800000001601d00000ca40000013d000006410030009c0000004b0000213d0000001f04300039000006eb044001970000003f04400039000006eb044001970000000704400029000006410040009c0000004b0000213d000000400040043f00000007040000290000000000340435000006eb023001980000001f0330018f000000a0051000390000000001250019000000030400036700000e620000613d000000000604034f000000006706043c0000000005750436000000000015004b00000e5e0000c13d000000000003004b00000a680000613d000000000224034f0000000303300210000000000401043300000000043401cf000000000434022f000000000202043b0000010003300089000000000232022f00000000023201cf000000000242019f000000000021043500000a680000013d0000001f0340003900000636033001970000003f03300039000006c303300197000000400500043d0000000003350019000700000005001d000000000053004b00000000050000390000000105004039000006410030009c0000004b0000213d00000001005001900000004b0000c13d000000400030043f0000001f0540018f000000070300002900000000034304360000063706400198000000000463001900000e8b0000613d000000000701034f0000000008030019000000007907043c0000000008980436000000000048004b00000e870000c13d000000000005004b00000d130000613d000000000161034f0000000305500210000000000604043300000000065601cf000000000656022f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f000000000014043500000d130000013d0000000502200270000000070200002f000006c70010009c00000ff20000213d000000200010008c00000ff20000413d000000070100002900000020011000390000000001010433000000000001004b0000000002000039000000010200c039000000000021004b00000ff20000c13d000000000001004b00000fd90000c13d000006c801000041000000000010043f0000000801000029000000040010043f0000064701000041000018d000010430000000000001004b00000f820000c13d000006c401000041000000000010043f0000064501000041000018d000010430000000010320008a0000000503300270000000000431001900000020030000390000000104400039000000070600002900000000056300190000000005050433000000000051041b00000020033000390000000101100039000000000041004b00000ebb0000c13d000000080020006c00000ecd0000813d00000008020000290000000302200210000000f80220018f000006ec0220027f000006ec0220016700000007033000290000000003030433000000000223016f000000000021041b0000000801000029000000010110021000000001011001bf0000000602000039000000000012041b0000000301000039000000000001041b0000000102000039000000800020043f000000a00010043f000000c00000043f000000040000006b00000ede0000c13d0000064401000041000000000010043f0000064501000041000018d0000104300000000403000029000000e00030043f00000140000004430000000102000039000001600020044300000020020000390000018000200443000001a0001004430000004001000039000001c000100443000001e0000004430000006001000039000002000010044300000220003004430000010000200443000000040100003900000120001004430000064301000041000018cf0001042e000006ea03300197000000070700002900000000003704350000000002720019000006b00300004100000000003204350000000b0220003918ce12020000040f000006b10200004100000000002104350000000702100039000000080100002918ce12020000040f000006b2020000410000000000210435000000060300002900000000013100490000001b0210008a00000000002304350000000502100039000000000103001918ce105b0000040f0000002002000039000000400100043d0000000003210436000000060200002900000000020204330000000000230435000006eb052001970000001f0420018f0000004003100039000000070030006b00000f220000813d000000000005004b00000f1e0000613d00000007074000290000000006430019000000200660008a000000200770008a0000000008560019000000000957001900000000090904330000000000980435000000200550008c00000f180000c13d000000000004004b00000f390000613d000000000603001900000f2e0000013d0000000006530019000000000005004b00000f2b0000613d0000000707000029000000000803001900000000790704340000000008980436000000000068004b00000f270000c13d000000000004004b00000f390000613d000700070050002d0000000304400210000000000506043300000000054501cf000000000545022f000000070700002900000000070704330000010004400089000000000747022f00000000044701cf000000000454019f00000000004604350000001f04200039000006eb0440019700000000023200190000000000020435000000400240003900000f520000013d00000004010000290000000000140435000000400100043d00000020020000390000000002210436000000000304043300000000003204350000004002100039000000000003004b00000f510000613d000000000604001900000000040000190000002006600039000000000506043300000000025204360000000104400039000000000034004b00000f4b0000413d0000000002120049000006350020009c00000635020080410000006002200210000006350010009c00000635010080410000004001100210000000000112019f000018cf0001042e0000000001000414000006350010009c0000063501008041000000c0011002100000063f011001c70000800d020000390000000103000039000006cf0400004118ce18bf0000040f000000010020019000000ff20000613d0000000203000039000000000103041a00000638011001970000000802000029000000a0022002100000069402200197000000000112019f0000000704000029000000d002400210000000000121019f000000000013041b000000400100043d0000002002100039000000000042043500000006020000290000000000210435000006350010009c000006350100804100000040011002100000000002000414000006350020009c0000063502008041000000c002200210000000000112019f0000063e011001c70000800d020000390000000103000039000006d004000041000008f90000013d000006350030009c00000635030080410000004002300210000006350010009c00000635010080410000006001100210000000000121019f000018d000010430000006350020009c0000063502008041000000c002200210000006350010009c00000635010080410000006001100210000000000121019f000006ca011001c7000000080200002918ce18c90000040f00030000000103550000006003100270000106350030019d000006350330019800000fbe0000613d0000001f0430003900000636044001970000003f04400039000006c304400197000000400500043d0000000004450019000000000054004b00000000060000390000000106004039000006410040009c0000004b0000213d00000001006001900000004b0000c13d000000400040043f0000001f0430018f00000000063504360000063705300198000000000356001900000fb10000613d000000000701034f000000007807043c0000000006860436000000000036004b00000fad0000c13d000000000004004b00000fbe0000613d000000000151034f0000000304400210000000000503043300000000054501cf000000000545022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000130435000000010020019000000a9f0000c13d000000400100043d0000004402100039000006cb03000041000000000032043500000024021000390000000b0300003900000ad00000013d000000040100002900000020021000390000000201000367000000000221034f000000000202043b0000000003000416000000000032004b00000fde0000a13d000006c001000041000000000010043f0000064501000041000018d000010430000000070300002900000000010304330000000502200270000000000203001f000000000001004b00000e9b0000c13d0000000001000415000000060110006900000000010000020000000001000019000018cf0001042e00000006020000290000002002200039000000000121034f000000000101043b00000008020000290000000002200079000001630220008a000000000021004b0000000003000019000006bd03008041000006bd01100197000006bd02200197000000000421013f000000000021004b0000000001000019000006bd01004041000006bd0040009c000000000103c019000000000001004b000007dd0000613d0000000001000019000018d00001043000000000430104340000000001320436000006eb063001970000001f0530018f000000000014004b0000100a0000813d000000000006004b000010060000613d00000000085400190000000007510019000000200770008a000000200880008a0000000009670019000000000a680019000000000a0a04330000000000a90435000000200660008c000010000000c13d000000000005004b000010200000613d0000000007010019000010160000013d0000000007610019000000000006004b000010130000613d00000000080400190000000009010019000000008a0804340000000009a90436000000000079004b0000100f0000c13d000000000005004b000010200000613d00000000046400190000000305500210000000000607043300000000065601cf000000000656022f00000000040404330000010005500089000000000454022f00000000045401cf000000000464019f0000000000470435000000000431001900000000000404350000001f03300039000006eb023001970000000001210019000000000001042d000006c70010009c000010360000213d000000630010008c000010360000a13d00000002030003670000000401300370000000000101043b000006380010009c000010360000213d0000002402300370000000000202043b000006380020009c000010360000213d0000004403300370000000000303043b000000000001042d0000000001000019000018d000010430000006c70010009c000010460000213d000000630010008c000010460000a13d00000002030003670000000401300370000000000101043b000006380010009c000010460000213d0000002402300370000000000202043b0000004403300370000000000303043b000000000001042d0000000001000019000018d00001043000000000430104340000063803300197000000000332043600000000040404330000064104400197000000000043043500000040031000390000000003030433000000000003004b0000000003000039000000010300c03900000040042000390000000000340435000000600220003900000060011000390000000001010433000006d4011001970000000000120435000000000001042d0000001f02200039000006eb022001970000000001120019000000000021004b00000000020000390000000102004039000006410010009c000010670000213d0000000100200190000010670000c13d000000400010043f000000000001042d000006d701000041000000000010043f0000004101000039000000040010043f0000064701000041000018d00001043000000000030100190000001f01100039000000000021004b0000000004000019000006bd04004041000006bd05200197000006bd01100197000000000651013f000000000051004b0000000001000019000006bd01002041000006bd0060009c000000000104c019000000000001004b000010b50000613d0000000206000367000000000136034f000000000401043b000006ed0040009c000010af0000813d0000001f01400039000006eb011001970000003f01100039000006eb05100197000000400100043d0000000005510019000000000015004b00000000080000390000000108004039000006410050009c000010af0000213d0000000100800190000010af0000c13d000000400050043f000000000541043600000020033000390000000008430019000000000028004b000010b50000213d000000000336034f000006eb064001980000001f0740018f00000000026500190000109f0000613d000000000803034f0000000009050019000000008a08043c0000000009a90436000000000029004b0000109b0000c13d000000000007004b000010ac0000613d000000000363034f0000000306700210000000000702043300000000076701cf000000000767022f000000000303043b0000010006600089000000000363022f00000000036301cf000000000373019f000000000032043500000000024500190000000000020435000000000001042d000006d701000041000000000010043f0000004101000039000000040010043f0000064701000041000018d0000104300000000001000019000018d0000104300000063802200197000000000020043f000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f0000000100200190000010c50000613d000000000101043b000000000001042d0000000001000019000018d000010430000006c70010009c000010d70000213d000000230010008c000010d70000a13d00000004020000390000000202200367000000000202043b000006410020009c000010d70000213d0000000001210049000006c70010009c000010d70000213d000001440010008c000010d70000413d0000000401200039000000000001042d0000000001000019000018d0000104300007000000000002000400000002001d000500000001001d000600000003001d000000000030043f0000000701000039000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f0000000100200190000011ca0000613d000000000101043b000000000101041a000000000001004b000011050000c13d0000000301000039000000000101041a000000060010006c000011cc0000a13d0000000602000029000000010220008a000700000002001d000000000020043f0000000701000039000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f0000000100200190000011ca0000613d000000000101043b000000000101041a000000000001004b0000000702000029000010f20000613d000006a300100198000011cc0000c13d00000005020000290000063802200197000500000001001d0000063801100197000700000002001d000000000021004b000011d00000c13d0000000601000029000000000010043f0000000901000039000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f0000000100200190000011ca0000613d000000000201043b000000000302041a000000000100041100000638041001970000000701000029000000000014004b000011470000613d000000000034004b000011470000613d000300000004001d000100000003001d000200000002001d000000000010043f0000000a01000039000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f0000000100200190000011ca0000613d000000000101043b0000000302000029000000000020043f000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f0000000100200190000011ca0000613d000000000101043b000000000101041a000000ff00100190000000070100002900000002020000290000000103000029000011ed0000613d000000000001004b000011d40000c13d000000000003004b0000114c0000613d000000000002041b000000000000043f0000000801000039000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f0000000100200190000011ca0000613d000000000101043b000000000201041a000000010220008a000000000021041b00000004010000290000063801100197000700000001001d000000000010043f0000000801000039000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f0000000100200190000011ca0000613d000000000101043b000000000201041a0000000102200039000000000021041b0000069a0100004100000000001004430000000001000414000006350010009c0000063501008041000000c0011002100000069b011001c70000800b0200003918ce18c40000040f0000000100200190000011e80000613d000000000101043b000400000001001d0000000601000029000000000010043f0000000701000039000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f0000000100200190000011ca0000613d0000000402000029000000a00220021000000007022001af000006f3022001c7000000000101043b000000000021041b0000000501000029000006f300100198000011b90000c13d00000006010000290000000101100039000400000001001d000000000010043f0000000701000039000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f0000000100200190000011ca0000613d000000000101043b000000000101041a000000000001004b000011b90000c13d0000000301000039000000000101041a000000040010006b000011b90000613d0000000401000029000000000010043f0000000701000039000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f0000000100200190000011ca0000613d000000000101043b0000000502000029000000000021041b0000000001000414000006350010009c0000063501008041000000c0011002100000063f011001c70000800d020000390000000403000039000006f40400004100000000050000190000000706000029000000060700002918ce18bf0000040f0000000100200190000011ca0000613d000000070000006b000011e90000613d000000000001042d0000000001000019000018d000010430000006ee01000041000000000010043f0000064501000041000018d000010430000006ef01000041000000000010043f0000064501000041000018d000010430000000400100043d0000006402100039000006f10300004100000000003204350000004402100039000006dd03000041000000000032043500000024021000390000002c030000390000000000320435000006a1020000410000000000210435000000040210003900000020030000390000000000320435000006350010009c00000635010080410000004001100210000006f2011001c7000018d000010430000000000001042f000006f501000041000000000010043f0000064501000041000018d000010430000006f001000041000000000010043f0000064501000041000018d000010430000000000010043f000000200000043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f0000000100200190000012000000613d000000000101043b0000000101100039000000000101041a000000000001042d0000000001000019000018d0000104300000000031010434000006eb051001970000001f0410018f000000000023004b000012170000813d000000000005004b000012130000613d00000000074300190000000006420019000000200660008a000000200770008a0000000008560019000000000957001900000000090904330000000000980435000000200550008c0000120d0000c13d000000000004004b0000122d0000613d0000000006020019000012230000013d0000000006520019000000000005004b000012200000613d0000000007030019000000000802001900000000790704340000000008980436000000000068004b0000121c0000c13d000000000004004b0000122d0000613d00000000035300190000000304400210000000000506043300000000054501cf000000000545022f00000000030304330000010004400089000000000343022f00000000034301cf000000000353019f000000000036043500000000012100190000000000010435000000000001042d0000063801100198000012420000613d000000000010043f0000000801000039000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f0000000100200190000012460000613d000000000101043b000000000101041a0000064101100197000000000001042d000006b801000041000000000010043f0000064501000041000018d0000104300000000001000019000018d000010430000a000000000002000200000004001d000600000002001d000500000001001d000700000003001d000000000030043f0000000701000039000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f0000000100200190000013e80000613d000000000101043b000000000101041a000000000001004b000012750000c13d0000000301000039000000000101041a000000070010006c000013eb0000a13d0000000702000029000000010220008a000800000002001d000000000020043f0000000701000039000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f0000000100200190000013e80000613d000000000101043b000000000101041a000000000001004b0000000802000029000012620000613d000006a300100198000013eb0000c13d00000005020000290000063802200197000400000001001d0000063801100197000800000002001d000000000021004b000013ef0000c13d0000000701000029000000000010043f0000000901000039000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f0000000100200190000013e80000613d000000000301043b000000000403041a0000000001000411000506380010019b0000000802000029000000050020006b000012b60000613d000000050040006b000012b60000613d000100000004001d000300000003001d000000000020043f0000000a01000039000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f0000000100200190000013e80000613d000000000101043b0000000502000029000000000020043f000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f0000000100200190000013e80000613d000000000101043b000000000101041a000000ff001001900000000802000029000000030300002900000001040000290000140b0000613d000000000002004b000013f30000c13d000000000004004b000012bb0000613d000000000003041b000000000000043f0000000801000039000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f0000000100200190000013e80000613d000000000101043b000000000201041a000000010220008a000000000021041b00000006010000290000063801100197000800000001001d000000000010043f0000000801000039000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f0000000100200190000013e80000613d000000000101043b000000000201041a0000000102200039000000000021041b0000069a0100004100000000001004430000000001000414000006350010009c0000063501008041000000c0011002100000069b011001c70000800b0200003918ce18c40000040f0000000100200190000013ea0000613d000000000101043b000300000001001d0000000701000029000000000010043f0000000701000039000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f0000000100200190000013e80000613d0000000302000029000000a0022002100000000806000029000000000262019f000006f3022001c7000000000101043b000000000021041b0000000401000029000006f3001001980000132b0000c13d00000007010000290000000101100039000300000001001d000000000010043f0000000701000039000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f0000000100200190000013e80000613d000000000101043b000000000101041a000000000001004b00000008060000290000132b0000c13d0000000301000039000000000101041a000000030010006b0000132b0000613d0000000301000029000000000010043f0000000701000039000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f0000000100200190000013e80000613d000000000101043b0000000402000029000000000021041b00000008060000290000000001000414000006350010009c0000063501008041000000c0011002100000063f011001c70000800d020000390000000403000039000006f4040000410000000005000019000000070700002918ce18bf0000040f0000000100200190000013e80000613d000000080000006b000014070000613d000006c5010000410000000000100443000000060100002900000004001004430000000001000414000006350010009c0000063501008041000000c0011002100000069f011001c7000080020200003918ce18c40000040f0000000100200190000013ea0000613d000000000101043b000000000001004b000013e70000613d000000000d000415000000400e00043d0000006401e00039000000800c0000390000000000c104350000004401e0003900000007020000290000000000210435000006f60100004100000000001e04350000000401e00039000000050200002900000000002104350000002401e0003900000000000104350000008402e00039000000020100002900000000410104340000000000120435000000200b00008a0000000006b1016f0000001f0510018f000000a403e00039000000000034004b000013730000813d000000000006004b0000136f0000613d00000000085400190000000007530019000000200770008a000000200880008a0000000009670019000000000a680019000000000a0a04330000000000a90435000000200660008c000013690000c13d000000000005004b000013890000613d00000000070300190000137f0000013d0000000007630019000000000006004b0000137c0000613d00000000080400190000000009030019000000008a0804340000000009a90436000000000079004b000013780000c13d000000000005004b000013890000613d00000000046400190000000305500210000000000607043300000000065601cf000000000656022f00000000040404330000010005500089000000000454022f00000000045401cf000000000464019f00000000004704350000000003310019000000000003043500000000030004140000000802000029000000040020008c000013970000c13d00000000050004150000000a0550008a00000005055002100000000103000031000000200030008c00000020040000390000000004034019000013cf0000013d00070000000d001d00060000000c001d0000001f011000390000000001b1016f000000a401100039000006350010009c000006350100804100000060011002100000063500e0009c000006350400004100000000040e40190000004004400210000000000141019f000006350030009c0000063503008041000000c003300210000000000131019f00080000000e001d18ce18bf0000040f000000080e00002900000060031002700000063503300197000000200030008c000000200400003900000000040340190000001f0640018f000000200740019000000000057e0019000013ba0000613d000000000801034f00000000090e0019000000008a08043c0000000009a90436000000000059004b000013b60000c13d000000000006004b000013c70000613d000000000771034f0000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000100000003001f00030000000103550000000005000415000000090550008a00000005055002100000000100200190000000070d0000290000140f0000613d0000001f01400039000000600210018f0000000001e20019000000000021004b00000000020000390000000102004039000006410010009c000014410000213d0000000100200190000014410000c13d000000400010043f000000200030008c000013e80000413d00000000010e0433000006e200100198000013e80000c13d0000000502500270000000000201001f000000000200041500000000022d00490000000002000002000006e301100197000006f60010009c0000143d0000c13d000000000001042d0000000001000019000018d000010430000000000001042f000006ee01000041000000000010043f0000064501000041000018d000010430000006ef01000041000000000010043f0000064501000041000018d000010430000000400100043d0000006402100039000006f10300004100000000003204350000004402100039000006dd03000041000000000032043500000024021000390000002c030000390000000000320435000006a1020000410000000000210435000000040210003900000020030000390000000000320435000006350010009c00000635010080410000004001100210000006f2011001c7000018d000010430000006f501000041000000000010043f0000064501000041000018d000010430000006f001000041000000000010043f0000064501000041000018d000010430000000000003004b000014130000c13d00000060020000390000143a0000013d0000001f0230003900000636022001970000003f02200039000006c304200197000000400200043d0000000004420019000000000024004b00000000050000390000000105004039000006410040009c000014410000213d0000000100500190000014410000c13d000000400040043f0000001f0430018f00000000063204360000063705300198000600000006001d00000000035600190000142d0000613d000000000601034f0000000607000029000000006806043c0000000007870436000000000037004b000014290000c13d000000000004004b0000143a0000613d000000000151034f0000000304400210000000000503043300000000054501cf000000000545022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f00000000001304350000000001020433000000000001004b000014470000c13d000006f701000041000000000010043f0000064501000041000018d000010430000006d701000041000000000010043f0000004101000039000000040010043f0000064701000041000018d0000104300000000602000029000006350020009c00000635020080410000004002200210000006350010009c00000635010080410000006001100210000000000121019f000018d00001043000010000000000020000000003010019000000400100043d000006f80010009c000014a70000813d0000008002100039000000400020043f00000060021000390000000000020435000000400210003900000000000204350000002002100039000000000002043500000000000104350000000302000039000000000202041a000000000032004b000014a40000a13d000100000003001d000000000030043f0000000701000039000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f0000000100200190000014a50000613d000000000101043b000000000101041a000000000001004b000014760000c13d0000000103000029000000010330008a000014620000013d000000400100043d000006b70010009c0000000103000029000014a70000213d0000008002100039000000400020043f0000006002100039000000000002043500000040021000390000000000020435000000200210003900000000000204350000000000010435000000000030043f0000000701000039000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f0000000100200190000014a50000613d000000000301034f000000400100043d000006b70010009c000014a70000213d000000000203043b000000000202041a0000008003100039000000400030043f0000006003100039000000e8042002700000000000430435000006a3002001980000000003000039000000010300c0390000004004100039000000000034043500000638032001970000000003310436000000a00220027000000641022001970000000000230435000000000001042d0000000001000019000018d000010430000006d701000041000000000010043f0000004101000039000000040010043f0000064701000041000018d00001043000020000000000020000000201000039000000000101041a000000d002100272000014c60000613d000100000002001d000200000001001d0000069a0100004100000000001004430000000001000414000006350010009c0000063501008041000000c0011002100000069b011001c70000800b0200003918ce18c40000040f0000000100200190000014ca0000613d000000000101043b000000010010006b0000000201000029000014c60000813d000000a0011002700000069801100197000000000001042d0000000101000039000000000101041a000000d001100270000000000001042d000000000001042f0000000101000039000000000201041a0000063801200197000000a0022002700000069802200197000000000001042d0001000000000002000100000001001d000000000010043f000000200000043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f0000000100200190000014f10000613d0000000002000411000000000101043b0000063802200197000000000020043f000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f0000000100200190000014f10000613d000000000101043b000000000101041a000000ff00100190000014f30000613d000000000001042d0000000001000019000018d0000104300000069601000041000000000010043f0000000001000411000000040010043f0000000101000029000000240010043f0000069701000041000018d0000104300001000000000002000100000001001d000000000010043f0000000701000039000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f0000000100200190000015280000613d000000000101043b000000000101041a000000000001004b000015250000c13d0000000301000039000000000101041a0000000102000029000000000021004b0000152a0000a13d000000010220008a000100000002001d000000000020043f0000000701000039000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f0000000100200190000015280000613d000000000101043b000000000101041a000000000001004b0000000102000029000015120000613d000006a3001001980000152a0000c13d000000000001042d0000000001000019000018d000010430000006ee01000041000000000010043f0000064501000041000018d000010430000006a60010009c000015330000413d0000004003000039000006a60210012a0000153c0000013d000006a80010009c0000000002010019000006a70220212a00000000030000390000002003002039000006a90020009c00000010033081bf000006aa02208197000006a90220812a000006ab0020009c00000008033080390000064102208197000006ab0220812a000027100020008c00000004033080390000063502208197000027100220811a000000640020008c00000002033080390000ffff0220818f000000640220811a000000090020008c0000000103302039000006eb063001970000005f02600039000006eb07200197000000400200043d0000000004270019000000000074004b00000000070000390000000107004039000006410040009c000015740000213d0000000100700190000015740000c13d000000400040043f000000010430003900000000044204360000002007600039000006eb067001980000001f0570018f000015640000613d000000000664001900000000070000310000000207700367000000007807043c0000000004840436000000000064004b000015600000c13d000000000005004b00000000033200190000002103300039000000090010008c0000000a4110011a0000000304400210000000010330008a0000000005030433000006ac05500197000006ad0440021f000006ae04400197000000000445019f0000000000430435000015670000213d0000000001020019000000000001042d000006d701000041000000000010043f0000004101000039000000040010043f0000064701000041000018d000010430000006bb01000041000000000010044300000000010004120000000400100443000000600100003900000024001004430000000001000414000006350010009c0000063501008041000000c001100210000006bc011001c7000080050200003918ce18c40000040f00000001002001900000158f0000613d000000000101043b00000638011001970000000002000411000000000012004b000015900000c13d000000000001042d000000000001042f000006be01000041000000000010043f0000064501000041000018d0000104300011000000000002000f01200010003d00000002020003670000000f03200360000000000403043b000000000300003100000000051300490000001f0550008a000006bd06500197000006bd07400197000000000867013f000000000067004b0000000006000019000006bd06002041000000000054004b0000000005000019000006bd05004041000006bd0080009c000000000605c019000000000006004b000016990000613d0000000004140019000000000142034f000000000101043b000006410010009c000016990000213d00000000051300490000002003400039000006bd04500197000006bd06300197000000000746013f000000000046004b0000000004000019000006bd04004041000000000053004b0000000005000019000006bd05002041000006bd0070009c000000000405c019000000000004004b000016990000c13d000000400010008c000016990000413d000000000132034f0000002003300039000000000232034f000000000202043b000600000002001d000000000101043b000400000001001d000000000010043f0000000d01000039000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f0000000100200190000016990000613d000000000101043b0000000602000029000000000020043f000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f0000000100200190000016990000613d000000000101043b0000000201100039000000000101041a000000ff001001900000181b0000613d0000000f01000029000000600110008a0000000201100367000000000101043b000e00000001001d000006380010009c000016990000213d0000000e01000029000000000010043f0000000f01000039000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f0000000100200190000016990000613d000000000101043b0000000402000029000000000020043f000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f0000000100200190000016990000613d000000000101043b0000000602000029000000000020043f000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f0000000100200190000016990000613d000000000101043b000000000101041a000000ff00100190000018220000c13d0000000e01000029000000000010043f0000000f01000039000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f0000000100200190000016990000613d000000000101043b0000000402000029000000000020043f000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f0000000100200190000016990000613d000000000101043b0000000602000029000000000020043f000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f0000000100200190000016990000613d000000000101043b000000000201041a000006ea0220019700000001022001bf000000000021041b0000000001000415000200000001001d000000400100043d000b00000001001d000006fa0010009c000018140000813d0000000302000039000000000102041a000300000001001d0000000b010000290000002003100039000d00000003001d000000400030043f0000000000010435000000000102041a000f00000001001d0000069a0100004100000000001004430000000001000414000006350010009c0000063501008041000000c0011002100000069b011001c70000800b0200003918ce18c40000040f00000001002001900000181a0000613d000000000101043b000c00000001001d0000000f01000029000000000010043f0000000701000039000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f0000000100200190000016990000613d0000000c02000029000000a0022002100000000e03000029000000000223019f000006f3022001c7000000000101043b000000000021041b000000000030043f0000000801000039000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f0000000100200190000016990000613d000000000101043b000000000201041a000006fb0220009a000000000021041b0000000e0000006b000018330000613d0000000f01000029000c00010010003d000000000100001900000001001001900000169b0000c13d0000000001000414000006350010009c0000063501008041000000c0011002100000063f011001c70000800d020000390000000403000039000006f40400004100000000050000190000000e060000290000000f0700002918ce18bf0000040f00000001002001900000000101000039000016880000c13d0000000001000019000018d00001043000000003010000390000000c02000029000000000021041b000006c50100004100000000001004430000000e0100002900000004001004430000000001000414000006350010009c0000063501008041000000c0011002100000069f011001c7000080020200003918ce18c40000040f00000001002001900000181a0000613d000000000101043b000000000001004b000017690000613d00000001010000390000000d0200002900050020002000920000000302000039000000000a02041a000000010ba0008a0000008009000039000006f60c0000410000000002000411000006380d200197000000200e00008a000100000009001d00080000000a001d00070000000d001d0000000000ab004b000000000f000039000000010f0040390000000100100190000017650000613d0000000001000415000c00000001001d000000400500043d000000640150003900000000009104350000000000c5043500000004015000390000000000d1043500000044015000390000000000b10435000000240150003900000000000104350000000b010000290000000001010433000000840250003900000000001204350000000004e1016f0000001f0310018f000f00000005001d000000a4025000390000000d0020006b000016e70000813d000000000004004b000016e20000613d00000005053000290000000006320019000000200660008a0000000007460019000000000845001900000000080804330000000000870435000000200440008c000016dc0000c13d000000000003004b000016fd0000613d0000000d040000290000000005020019000016f30000013d0000000005420019000000000004004b000016f00000613d0000000d06000029000000000702001900000000680604340000000007870436000000000057004b000016ec0000c13d000000000003004b000016fd0000613d0000000d044000290000000303300210000000000605043300000000063601cf000000000636022f00000000040404330000010003300089000000000434022f00000000033401cf000000000363019f00000000003504350000000002210019000000000002043500000000040004140000000e02000029000000040020008c0000170b0000c13d0000000005000415000000110550008a00000005055002100000000103000031000000200030008c00000020040000390000000004034019000017460000013d00090000000f001d000a0000000b001d0000001f011000390000000001e1016f000000a401100039000006350010009c000006350100804100000060011002100000000f03000029000006350030009c00000635030080410000004003300210000000000131019f000006350040009c0000063504008041000000c003400210000000000131019f18ce18bf0000040f00000060031002700000063503300197000000200030008c0000002004000039000000000403401900000020064001900000000f056000290000172b0000613d000000000701034f0000000f08000029000000007907043c0000000008980436000000000058004b000017270000c13d0000001f07400190000017380000613d000000000661034f0000000307700210000000000805043300000000087801cf000000000878022f000000000606043b0000010007700089000000000676022f00000000067601cf000000000686019f0000000000650435000100000003001f00030000000103550000000005000415000000100550008a000000050550021000000001002001900000008009000039000000080a0000290000000a0b000029000006f60c000041000000070d000029000000200e00008a000000090f000029000017dd0000613d0000001f01400039000000600210018f0000000f040000290000000001420019000000000021004b00000000020000390000000102004039000006410010009c000018140000213d0000000100200190000018140000c13d000000400010043f000000200030008c000016990000413d0000000001040433000006e200100198000016990000c13d000000010bb000390000000502500270000000000201001f00000000020004150000000c022000690000000002000002000006e301100197000006f60010009c00000000010f0019000016bc0000613d000006f701000041000000000010043f0000064501000041000018d0000104300000000301000039000000000101041a0000000000a1004b000016990000c13d000000000100041500000002011000690000000001000002000000400300043d000006a50030009c000018140000213d0000006001300039000000400010043f00000040023000390000000101000039000f00000002001d00000000001204350000000401000029000d00000003001d00000000021304360000000601000029000c00000002001d00000000001204350000000301000029000000000010043f0000000e01000039000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f0000000100200190000016990000613d0000000d020000290000000002020433000000000101043b000000000021041b0000000c0200002900000000020204330000000103100039000000000023041b0000000201100039000000000201041a000006ea022001970000000f030000290000000003030433000000000003004b000000010220c1bf000000000021041b0000000e010000290000063801100197000f00000001001d000000000010043f0000001001000039000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f0000000100200190000016990000613d000000000101043b0000000402000029000000000020043f000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f0000000100200190000016990000613d000000000101043b0000000602000029000000000020043f000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f0000000100200190000016990000613d000000000101043b0000000303000029000000000031041b000000400100043d0000004002100039000000000032043500000020021000390000000603000029000000000032043500000004020000290000000000210435000006350010009c000006350100804100000040011002100000000002000414000006350020009c0000063502008041000000c002200210000000000112019f000006fc011001c70000800d020000390000000203000039000006fd040000410000000f0500002918ce18bf0000040f0000000100200190000016990000613d000000000001042d000000000003004b000017e10000c13d0000006002000039000018080000013d0000001f0230003900000636022001970000003f02200039000006c304200197000000400200043d0000000004420019000000000024004b00000000050000390000000105004039000006410040009c000018140000213d0000000100500190000018140000c13d000000400040043f0000001f0430018f00000000063204360000063705300198000100000006001d0000000003560019000017fb0000613d000000000601034f0000000107000029000000006806043c0000000007870436000000000037004b000017f70000c13d000000000004004b000018080000613d000000000151034f0000000304400210000000000503043300000000054501cf000000000545022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f00000000001304350000000001020433000000000001004b0000000102000029000017610000613d000006350020009c00000635020080410000004002200210000006350010009c00000635010080410000006001100210000000000121019f000018d000010430000006d701000041000000000010043f0000004101000039000000040010043f0000064701000041000018d000010430000000000001042f000000400100043d0000004402100039000006ff03000041000000000032043500000024021000390000001003000039000018280000013d000000400100043d0000004402100039000006f9030000410000000000320435000000240210003900000015030000390000000000320435000006a1020000410000000000210435000000040210003900000020030000390000000000320435000006350010009c00000635010080410000004001100210000006a2011001c7000018d000010430000006fe01000041000000000010043f0000064501000041000018d0000104300002000000000002000000000001004b000018410000c13d0000000204000039000000000504041a000000000325013f0000063800300198000018410000c13d0000063c03500197000000000034041b000100000002001d000200000001001d000000000010043f000000200000043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f00000001002001900000188d0000613d000000000101043b00000001020000290000063802200197000100000002001d000000000020043f000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f00000001002001900000188d0000613d000000000101043b000000000101041a000000ff001001900000188c0000613d0000000201000029000000000010043f000000200000043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f00000001002001900000188d0000613d000000000101043b0000000102000029000000000020043f000000200010043f0000000001000414000006350010009c0000063501008041000000c0011002100000063e011001c7000080100200003918ce18c40000040f00000001002001900000188d0000613d000000000101043b000000000201041a000006ea02200197000000000021041b0000000001000414000006350010009c0000063501008041000000c0011002100000063f011001c70000800d02000039000000040300003900000000070004110000069c040000410000000205000029000000010600002918ce18bf0000040f00000001002001900000188d0000613d000000000001042d0000000001000019000018d000010430000000000001042f000006350010009c000006350100804100000060011002100000000002000414000006350020009c0000063502008041000000c002200210000000000112019f0000063f011001c7000080100200003918ce18c40000040f00000001002001900000189f0000613d000000000101043b000000000001042d0000000001000019000018d00001043000000000050100190000000000200443000000050030008c000018af0000413d000000040100003900000000020000190000000506200210000000000664001900000005066002700000000006060031000000000161043a0000000102200039000000000031004b000018a70000413d000006350030009c000006350300804100000060013002100000000002000414000006350020009c0000063502008041000000c002200210000000000112019f00000700011001c7000000000205001918ce18c40000040f0000000100200190000018be0000613d000000000101043b000000000001042d000000000001042f000018c2002104210000000102000039000000000001042d0000000002000019000000000001042d000018c7002104230000000102000039000000000001042d0000000002000019000000000001042d000018cc002104250000000102000039000000000001042d0000000002000019000000000001042d000018ce00000432000018cf0001042e000018d00001043000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffff00000000000000000000000000000000000000000000000000000001ffffffe000000000000000000000000000000000000000000000000000000000ffffffe0000000000000000000000000ffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000000000000000000000ffffffffffffffdf000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffff00000003f4800000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000ad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5020000000000000000000000000000000000004000000000000000000000000002000000000000000000000000000000000000000000000000000000000000002f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d000000000000000000000000000000000000000000000000ffffffffffffffff0200000000000000000000000000000000000020000000000000000000000000000000020000000000000000000000000000014000000100000000000000000083780ffe000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000c22c80220000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000240000000000000000000000001574f9f300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008150864c00000000000000000000000000000000000000000000000000000000c23dc68e00000000000000000000000000000000000000000000000000000000d547741e00000000000000000000000000000000000000000000000000000000e49617e000000000000000000000000000000000000000000000000000000000e985e9c400000000000000000000000000000000000000000000000000000000e985e9c500000000000000000000000000000000000000000000000000000000faf8ef9800000000000000000000000000000000000000000000000000000000e49617e100000000000000000000000000000000000000000000000000000000e60c350500000000000000000000000000000000000000000000000000000000d547741f00000000000000000000000000000000000000000000000000000000d602b9fd00000000000000000000000000000000000000000000000000000000e257792e00000000000000000000000000000000000000000000000000000000ce31a06a00000000000000000000000000000000000000000000000000000000cefc142800000000000000000000000000000000000000000000000000000000cefc142900000000000000000000000000000000000000000000000000000000cf6eefb700000000000000000000000000000000000000000000000000000000ce31a06b00000000000000000000000000000000000000000000000000000000ce46e04600000000000000000000000000000000000000000000000000000000c23dc68f00000000000000000000000000000000000000000000000000000000c87b56dd00000000000000000000000000000000000000000000000000000000cc8463c80000000000000000000000000000000000000000000000000000000091db0b7d00000000000000000000000000000000000000000000000000000000a1eda53b00000000000000000000000000000000000000000000000000000000a22cb46400000000000000000000000000000000000000000000000000000000a22cb46500000000000000000000000000000000000000000000000000000000b88d4fde00000000000000000000000000000000000000000000000000000000a1eda53c00000000000000000000000000000000000000000000000000000000a217fddf0000000000000000000000000000000000000000000000000000000091db0b7e0000000000000000000000000000000000000000000000000000000095d89b410000000000000000000000000000000000000000000000000000000099a2557a0000000000000000000000000000000000000000000000000000000088e5b2d80000000000000000000000000000000000000000000000000000000088e5b2d9000000000000000000000000000000000000000000000000000000008da5cb5b0000000000000000000000000000000000000000000000000000000091d14854000000000000000000000000000000000000000000000000000000008150864d00000000000000000000000000000000000000000000000000000000839006f20000000000000000000000000000000000000000000000000000000084ef8ffc0000000000000000000000000000000000000000000000000000000036568abd000000000000000000000000000000000000000000000000000000005bbb2176000000000000000000000000000000000000000000000000000000006352211d0000000000000000000000000000000000000000000000000000000070a082300000000000000000000000000000000000000000000000000000000070a08231000000000000000000000000000000000000000000000000000000007b743e6b000000000000000000000000000000000000000000000000000000006352211e00000000000000000000000000000000000000000000000000000000649a5ec7000000000000000000000000000000000000000000000000000000005bbb2177000000000000000000000000000000000000000000000000000000005c60da1b00000000000000000000000000000000000000000000000000000000634e93da0000000000000000000000000000000000000000000000000000000054fd4d4f0000000000000000000000000000000000000000000000000000000054fd4d500000000000000000000000000000000000000000000000000000000055f804b30000000000000000000000000000000000000000000000000000000056066f510000000000000000000000000000000000000000000000000000000036568abe00000000000000000000000000000000000000000000000000000000389a105b0000000000000000000000000000000000000000000000000000000042842e0e000000000000000000000000000000000000000000000000000000000aa6220a0000000000000000000000000000000000000000000000000000000023b872dc000000000000000000000000000000000000000000000000000000002aa7555d000000000000000000000000000000000000000000000000000000002aa7555e000000000000000000000000000000000000000000000000000000002f2ff15d0000000000000000000000000000000000000000000000000000000023b872dd00000000000000000000000000000000000000000000000000000000248a9ca3000000000000000000000000000000000000000000000000000000000aa6220b0000000000000000000000000000000000000000000000000000000018160ddd00000000000000000000000000000000000000000000000000000000194aa16500000000000000000000000000000000000000000000000000000000081812fb00000000000000000000000000000000000000000000000000000000081812fc00000000000000000000000000000000000000000000000000000000086fc0c700000000000000000000000000000000000000000000000000000000095ea7b30000000000000000000000000000000000000000000000000000000001ffc9a700000000000000000000000000000000000000000000000000000000022d63fb0000000000000000000000000000000000000000000000000000000006fdde030000000000000000000000000000000000000020000000000000000000000000ffffffffffff0000000000000000000000000000000000000000000000000000000000000000ffffffffffff00000000000000000000000000000000000000008886ebfc4259abdbc16601dd8fb5678e54878f47b3c34836cfc51154a9605109e2517d3f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000440000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffff0000000000000000000000000000000000000040000000800000000000000000796b89b91644bc98cd93958e4c9038275d622183e25ac5af08cc6b5d955391320200000200000000000000000000000000000004000000000000000000000000f6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b19ca5ebb000000000000000000000000000000000000000000000000000000009cc7f708afc65944829bd487b90b72536b1951864fbfc14e125fc972a6507f3902000002000000000000000000000000000000240000000000000000000000005472616e73666572206661696c6564000000000000000000000000000000000008c379a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000100000000000000000000000000000000000000000000000000000000546f6b656e20646f6573206e6f74206578697374000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffff9f0000000000184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000000000000000000000000000000000000000004ee2d6d415b85acef810000000000000000000000000000000000000000000004ee2d6d415b85acef80ffffffff000000000000000000000000000000000000000000000000002386f26fc1000000000000000000000000000000000000ffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000005f5e10000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff30313233343536373839616263646566000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000df6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c762616467652d747970652d0000000000000000000000000000000000000000002d6c6576656c2d000000000000000000000000000000000000000000000000002e6a736f6e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000020000000800000000000000000000000000000000000000000000000000000004000000000000000000000000032c1995a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffff7f8f4eb6040000000000000000000000000000000000000000000000000000000053420000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c00000000000000000310ab089e4439a4c15d089f94afb7896ff553aecb10793d0ab882de59d99a32e020000020000000000000000000000000000004400000000000000000000000080000000000000000000000000000000000000000000000000000000000000004ca8886700000000000000000000000000000000000000000000000000000000947d5a8400000000000000000000000000000000000000000000000000000000110112940000000000000000000000000000000000000000000000000000000070a0823100000000000000000000000000000000000000000000000000000000a9059cbb0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003ffffffe01425ea42000000000000000000000000000000000000000000000000000000001806aa1896bbf26568e884a7374b41e002500962caba6a15023a8d90e8508b839996b315000000000000000000000000000000000000000000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff5274afe700000000000000000000000000000000000000000000000000000000f603533e14e17222e047634a2b3457fe346d27e294cedf9d21d74e5feea4a0460000000000000000000000000000000000000000000000a00000000000000000696e6974206661696c6564000000000000000000000000000000000000000000696d706c5f206973207a65726f20616464726573730000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000697802b1fa2edafe6f7b9e97c1a9e0c3660e645beb2dcaa2d45bdbf9beaf5472e1ec5f1038c18cf84a56e432fdbfaf746924b7ea511dfe03a6506a0ceba4888788d9b6dfcc65000000000000000000000000000000000000000000000000000000000ffffffffffff000000000000ffffffffffffffffffffffffffffffffffffffff3377dc44241e779dd06afab5b788a35ca5f3b778836e2990bdb26a2a4b2e5ed60000000000000000000000000000000000000000000000000000000000ffffff209699368efae3c2ab13a6e9d9f9aceb6c5aebfb5ffd7bd0a9ff6281a30b57396741b2fc379fad678116fe3d4d4b9a1a184ab53ba36b86ad0fa66340b1ab41ad4e487b71000000000000000000000000000000000000000000000000000000002e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000008000000000000000006697b232000000000000000000000000000000000000000000000000000000003fc3c27a000000000000000000000000000000000000000000000000000000004294c680a6172231fe7d5503067c7f5df9160541cac197697fa530250cc02b4f426164676520697320736f756c626f756e6420616e642063616e6e6f7420626520617070726f76656420666f72207472616e73666572000000000000000000000000000000000000000000000000000000000084000000800000000000000000cf4700e400000000000000000000000000000000000000000000000000000000536f70686f6e204261646765730000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000000000000000000000000000005b5e139effffffffffffffffffffffffffffffffffffffffffffffffffffffff80ac58cd000000000000000000000000000000000000000000000000000000005b5e139f0000000000000000000000000000000000000000000000000000000001ffc9a70000000000000000000000000000000000000000000000000000000031498786000000000000000000000000000000000000000000000000000000007965db0b00000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000010000000000000000df2d9b4200000000000000000000000000000000000000000000000000000000a11481000000000000000000000000000000000000000000000000000000000059c896be00000000000000000000000000000000000000000000000000000000207472616e73666572726564000000000000000000000000000000000000000000000000000000000000000000000000000000840000000000000000000000000000000200000000000000000000000000000000000000000000000000000000ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efea553b3400000000000000000000000000000000000000000000000000000000150b7a0200000000000000000000000000000000000000000000000000000000d1a57ed600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffff80426164676520616c726561647920636c61696d65640000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffe0fffffffffffffffffffffffffffffffffffffffffffffffeffffffffffffffff02000000000000000000000000000000000000600000000000000000000000002829783e381f74160210e11f6812c2405c29bce79a9eeeee84eefdc8a5711eb72e076300000000000000000000000000000000000000000000000000000000004261646765206e6f742061637469766500000000000000000000000000000000020000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003bb44864192d17b7c5d2fc42c2bd44c759f12853b8f79f15b826aa10c3a4dddd
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000bae2f1f99eefa3a6e2ec649c5eb400c9c44d2bf8
-----Decoded View---------------
Arg [0] : easContractAddress (address): 0xbAE2F1F99eeFA3a6E2eC649C5Eb400C9C44D2bF8
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000bae2f1f99eefa3a6e2ec649c5eb400c9c44d2bf8
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.