Source Code
Overview
APE Balance
More Info
ContractCreator
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
SignedZoneControllerSub1
Compiler Version
v0.8.24+commit.e11b9ed9
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.24; import { SignedZone } from "../SignedZone.sol"; import { SignedZoneInterface } from "../../interfaces/SignedZoneInterface.sol"; import { SignedZoneControllerSub1Interface } from "./interfaces/SignedZoneControllerSub1Interface.sol"; import { SignedZoneControllerEventsAndErrors } from "../../interfaces/SignedZoneControllerEventsAndErrors.sol"; import "../lib/SignedZoneConstants.sol"; /** * @title SignedZoneControllerSub1 * @author BCLeFevre * @notice SignedZoneController enables the deploying of SignedZones and * managing new SignedZone. * SignedZones are an implementation of SIP-7 that requires orders to * be signed by an approved signer. * https://github.com/ProjectOpenSea/SIPs/blob/main/SIPS/sip-7.md */ contract SignedZoneControllerSub1 is SignedZoneControllerSub1Interface, SignedZoneControllerEventsAndErrors { /** * @dev The struct for storing signer info. */ struct SignerInfo { /// @dev If the signer is currently active. bool active; /// @dev If the signer has been active before. bool previouslyActive; } // Properties used by the signed zone, stored on the controller. struct SignedZoneProperties { /// @dev Owner of the signed zone (used for permissioned functions) address owner; /// @dev Potential owner of the signed zone address potentialOwner; /// @dev The name for this zone returned in getSeaportMetadata(). string zoneName; /// @dev The API endpoint where orders for this zone can be signed. /// Request and response payloads are defined in SIP-7. string apiEndpoint; /// @dev The URI to the documentation describing the behavior of the /// contract. string documentationURI; /// @dev The substandards supported by this zone. /// Substandards are defined in SIP-7. uint256[] substandards; /// @dev Mapping of signer information keyed by signer Address mapping(address => SignerInfo) signers; /// @dev List of active signers address[] activeSignerList; } /// @dev Mapping of signed zone properties keyed by the Signed Zone /// address. mapping(address => SignedZoneProperties) internal _signedZones; /// @dev The EIP-712 digest parameters for the SignedZone. bytes32 internal immutable _VERSION_HASH = keccak256(bytes("2.0")); // prettier-ignore bytes32 internal immutable _EIP_712_DOMAIN_TYPEHASH = keccak256( abi.encodePacked( "EIP712Domain(", "string name,", "string version,", "uint256 chainId,", "address verifyingContract", ")" ) ); uint256 internal immutable _CHAIN_ID = block.chainid; /** * @dev Initialize contract */ constructor() {} /** * @notice Deploy a SignedZone to a precomputed address. * * @param zoneName The name for the zone returned in * getSeaportMetadata(). * @param apiEndpoint The API endpoint where orders for this zone can * be signed. * @param documentationURI The URI to the documentation describing the * behavior of the contract. Request and response * payloads are defined in SIP-7. * @param salt The salt to be used to derive the zone address * @param initialOwner The initial owner to set for the new zone. * * @return signedZone The derived address for the zone. */ function createZone( string memory zoneName, string memory apiEndpoint, string memory documentationURI, address initialOwner, bytes32 salt ) external override returns (address signedZone) { // Ensure that an initial owner has been supplied. if (initialOwner == address(0)) { revert InvalidInitialOwner(); } // Ensure the first 20 bytes of the salt are the same as the msg.sender. if ((address(uint160(bytes20(salt))) != msg.sender)) { // Revert with an error indicating that the creator is invalid. revert InvalidCreator(); } // Get the creation code for the signed zone. bytes memory _SIGNED_ZONE_CREATION_CODE = abi.encodePacked( type(SignedZone).creationCode, abi.encode(zoneName) ); // Using assembly try to deploy the zone. assembly { signedZone := create2( 0, add(0x20, _SIGNED_ZONE_CREATION_CODE), mload(_SIGNED_ZONE_CREATION_CODE), salt ) if iszero(extcodesize(signedZone)) { revert(0, 0) } } // Initialize storage variable referencing signed zone properties. SignedZoneProperties storage signedZoneProperties = _signedZones[ signedZone ]; // Set the supplied intial owner as the owner of the zone. signedZoneProperties.owner = initialOwner; // Set the zone name. signedZoneProperties.zoneName = zoneName; // Set the API endpoint. signedZoneProperties.apiEndpoint = apiEndpoint; // Set the documentation URI. signedZoneProperties.documentationURI = documentationURI; // Set the substandard. signedZoneProperties.substandards = [1, 7, 8, 9]; // Emit an event signifying that the zone was created. emit ZoneCreated( signedZone, zoneName, apiEndpoint, documentationURI, salt ); // Emit an event indicating that zone ownership has been assigned. emit OwnershipTransferred(signedZone, address(0), initialOwner); } /** * @notice Initiate zone ownership transfer by assigning a new potential * owner for the given zone. Once set, the new potential owner * may call `acceptOwnership` to claim ownership of the zone. * Only the owner of the zone in question may call this function. * * @param zone The zone for which to initiate ownership * transfer. * @param newPotentialOwner The new potential owner of the zone. */ function transferOwnership( address zone, address newPotentialOwner ) external override { // Ensure the caller is the current owner of the zone in question. _assertCallerIsZoneOwner(zone); // Ensure the new potential owner is not an invalid address. if (newPotentialOwner == address(0)) { revert NewPotentialOwnerIsNullAddress(zone); } // Ensure the new potential owner is not already set. if (newPotentialOwner == _signedZones[zone].potentialOwner) { revert NewPotentialOwnerAlreadySet(zone, newPotentialOwner); } // Emit an event indicating that the potential owner has been updated. emit PotentialOwnerUpdated(newPotentialOwner); // Set the new potential owner as the potential owner of the zone. _signedZones[zone].potentialOwner = newPotentialOwner; } /** * @notice Clear the currently set potential owner, if any, from a zone. * Only the owner of the zone in question may call this function. * * @param zone The zone for which to cancel ownership transfer. */ function cancelOwnershipTransfer(address zone) external override { // Ensure the caller is the current owner of the zone in question. _assertCallerIsZoneOwner(zone); // Ensure that ownership transfer is currently possible. if (_signedZones[zone].potentialOwner == address(0)) { revert NoPotentialOwnerCurrentlySet(zone); } // Emit an event indicating that the potential owner has been cleared. emit PotentialOwnerUpdated(address(0)); // Clear the current new potential owner from the zone. _signedZones[zone].potentialOwner = address(0); } /** * @notice Accept ownership of a supplied zone. Only accounts that the * current owner has set as the new potential owner may call this * function. * * @param zone The zone for which to accept ownership. */ function acceptOwnership(address zone) external override { // Ensure that the zone in question exists. _assertZoneExists(zone); // If caller does not match current potential owner of the zone... if (msg.sender != _signedZones[zone].potentialOwner) { // Revert, indicating that caller is not current potential owner. revert CallerIsNotNewPotentialOwner(zone); } // Emit an event indicating that the potential owner has been cleared. emit PotentialOwnerUpdated(address(0)); // Clear the current new potential owner from the zone. _signedZones[zone].potentialOwner = address(0); // Emit an event indicating zone ownership has been transferred. emit OwnershipTransferred(zone, _signedZones[zone].owner, msg.sender); // Set the caller as the owner of the zone. _signedZones[zone].owner = msg.sender; } /** * @notice Update the API endpoint returned by a zone. * Only the owner or an active signer of the supplied zone can call * this function. * * @param zone The signed zone to update the API endpoint for. * @param newApiEndpoint The new API endpoint. */ function updateAPIEndpoint( address zone, string calldata newApiEndpoint ) external override { // Ensure the caller is the owner of the signed zone. _assertCallerIsZoneOwner(zone); // Retrieve storage region where the singers for the signedZone are // stored. SignedZoneProperties storage signedZoneProperties = _signedZones[zone]; // Update the API endpoint on the signed zone. signedZoneProperties.apiEndpoint = newApiEndpoint; } /** * @notice Update the documentationURI returned by a zone. * Only the owner or an active signer of the supplied zone can call * this function. * * @param zone The signed zone to update the documentationURI * for. * @param documentationURI The new documentation URI. */ function updateDocumentationURI( address zone, string calldata documentationURI ) external override { // Ensure the caller is the owner of the signed zone. _assertCallerIsZoneOwner(zone); // Retrieve storage region where the singers for the signedZone are // stored. SignedZoneProperties storage signedZoneProperties = _signedZones[zone]; // Update the documentationURI on the signed zone. signedZoneProperties.documentationURI = documentationURI; } /** * @notice Add or remove a signer from the supplied zone. * Only the owner or an active signer of the supplied zone can call * this function. * * @param zone The signed zone to update the signer permissions for. * @param signer The signer to update the permissions for. * @param active Whether the signer should be active or not. */ function updateSigner( address zone, address signer, bool active ) external override { // Ensure the caller is the owner of the signed zone. _assertCallerIsZoneOwner(zone); // Retrieve storage region where the singers for the signedZone are // stored. SignedZoneProperties storage signedZoneProperties = _signedZones[zone]; // Validate signer permissions. _assertSignerPermissions(signedZoneProperties, signer, active); // Update the signer on the signed zone. SignedZoneInterface(zone).updateSigner(signer, active); // Update the signer information. signedZoneProperties.signers[signer].active = active; signedZoneProperties.signers[signer].previouslyActive = true; // Add the signer to the list of signers if they are active. if (active) { signedZoneProperties.activeSignerList.push(signer); } else { // Remove the signer from the list of signers. for ( uint256 i = 0; i < signedZoneProperties.activeSignerList.length; ) { if (signedZoneProperties.activeSignerList[i] == signer) { signedZoneProperties.activeSignerList[ i ] = signedZoneProperties.activeSignerList[ signedZoneProperties.activeSignerList.length - 1 ]; signedZoneProperties.activeSignerList.pop(); break; } unchecked { ++i; } } } // Emit an event signifying that the signer was updated. emit SignerUpdated(zone, signer, active); } /** * @notice Retrieve the current owner of a deployed zone. * * @param zone The zone for which to retrieve the associated owner. * * @return owner The owner of the supplied zone. */ function ownerOf( address zone ) external view override returns (address owner) { // Ensure that the zone in question exists. _assertZoneExists(zone); // Retrieve the current owner of the zone in question. owner = _signedZones[zone].owner; } /** * @notice Retrieve the potential owner, if any, for a given zone. The * current owner may set a new potential owner via * `transferOwnership` and that owner may then accept ownership of * the zone in question via `acceptOwnership`. * * @param zone The zone for which to retrieve the potential owner. * * @return potentialOwner The potential owner, if any, for the zone. */ function getPotentialOwner( address zone ) external view override returns (address potentialOwner) { // Ensure that the zone in question exists. _assertZoneExists(zone); // Retrieve the current potential owner of the zone in question. potentialOwner = _signedZones[zone].potentialOwner; } /** * @notice Returns the active signers for the zone. Note that the array of * active signers could grow to a size that this function could not * return, the array of active signers is expected to be small, * and is managed by the controller. * * @param zone The zone to return the active signers for. * * @return signers The active signers. */ function getActiveSigners( address zone ) external view override returns (address[] memory signers) { // Ensure that the zone in question exists. _assertZoneExists(zone); // Retrieve storage region where the singers for the signedZone are // stored. SignedZoneProperties storage signedZoneProperties = _signedZones[zone]; // Return the active signers for the zone. signers = signedZoneProperties.activeSignerList; } /** * @notice Returns if the given address is an active signer for the zone. * * @param zone The zone to return the active signers for. * @param signer The address to check if it is an active signer. * * @return The address is an active signer, false otherwise. */ function isActiveSigner( address zone, address signer ) external view override returns (bool) { // Ensure that the zone in question exists. _assertZoneExists(zone); // Retrieve storage region where the singers for the signedZone are // stored. SignedZoneProperties storage signedZoneProperties = _signedZones[zone]; // Return whether the signer is an active signer for the zone. return signedZoneProperties.signers[signer].active; } /** * @notice Derive the zone address associated with a salt. * * @param zoneName The name of the zone. * @param salt The salt to be used to derive the zone address. * * @return derivedAddress The derived address of the signed zone. */ function getZone( string memory zoneName, bytes32 salt ) external view override returns (address derivedAddress) { // Get the zone creation code hash. bytes32 _SIGNED_ZONE_CREATION_CODE_HASH = keccak256( abi.encodePacked( type(SignedZone).creationCode, abi.encode(zoneName) ) ); // Derive the SignedZone address from deployer, salt and creation code // hash. derivedAddress = address( uint160( uint256( keccak256( abi.encodePacked( bytes1(0xff), address(this), salt, _SIGNED_ZONE_CREATION_CODE_HASH ) ) ) ) ); } /** * @notice External call to return the signing information, substandards, * and documentation about the zone. * * @return domainSeparator The domain separator used for signing. * @return zoneName The name of the zone. * @return apiEndpoint The API endpoint for the zone. * @return substandards The substandards supported by the zone. * @return documentationURI The documentation URI for the zone. */ function getAdditionalZoneInformation( address zone ) external view override returns ( bytes32 domainSeparator, string memory zoneName, string memory apiEndpoint, uint256[] memory substandards, string memory documentationURI ) { // Ensure the zone exists. _assertZoneExists(zone); // Return the zone's additional information. return _additionalZoneInformation(zone); } /** * @notice Internal call to return the signing information, substandards, * and documentation about the zone. * * @return domainSeparator The domain separator used for signing. * @return zoneName The name of the zone. * @return apiEndpoint The API endpoint for the zone. * @return substandards The substandards supported by the zone. * @return documentationURI The documentation URI for the zone. */ function _additionalZoneInformation( address zone ) internal view returns ( bytes32 domainSeparator, string memory zoneName, string memory apiEndpoint, uint256[] memory substandards, string memory documentationURI ) { // Get the zone properties. SignedZoneProperties storage signedZoneProperties = _signedZones[zone]; // Return the SIP-7 information. domainSeparator = _domainSeparator(zone); zoneName = signedZoneProperties.zoneName; apiEndpoint = signedZoneProperties.apiEndpoint; substandards = signedZoneProperties.substandards; documentationURI = signedZoneProperties.documentationURI; } /** * @dev Internal view function to get the EIP-712 domain separator. If the * chainId matches the chainId set on deployment, the cached domain * separator will be returned; otherwise, it will be derived from * scratch. * * @return The domain separator. */ function _domainSeparator(address zone) internal view returns (bytes32) { // prettier-ignore return _deriveDomainSeparator(zone); } /** * @dev Internal view function to derive the EIP-712 domain separator. * * @return domainSeparator The derived domain separator. */ function _deriveDomainSeparator( address zone ) internal view returns (bytes32 domainSeparator) { bytes32 typehash = _EIP_712_DOMAIN_TYPEHASH; // Get the name hash from the zone properties. SignedZoneProperties storage signedZoneProperties = _signedZones[zone]; bytes32 nameHash = keccak256(bytes(signedZoneProperties.zoneName)); bytes32 versionHash = _VERSION_HASH; // Leverage scratch space and other memory to perform an efficient hash. assembly { // Retrieve the free memory pointer; it will be replaced afterwards. let freeMemoryPointer := mload(FreeMemoryPointerSlot) // Retrieve value at 0x80; it will also be replaced afterwards. let slot0x80 := mload(Slot0x80) // Place typehash, name hash, and version hash at start of memory. mstore(0, typehash) mstore(OneWord, nameHash) mstore(TwoWords, versionHash) // Place chainId in the next memory location. mstore(ThreeWords, chainid()) // Place the address of the signed zone contract in the next memory location. mstore(FourWords, zone) // Hash relevant region of memory to derive the domain separator. domainSeparator := keccak256(0, FiveWords) // Restore the free memory pointer. mstore(FreeMemoryPointerSlot, freeMemoryPointer) // Restore the zero slot to zero. mstore(ZeroSlot, 0) // Restore the value at 0x80. mstore(Slot0x80, slot0x80) } } /** * @dev Private view function to revert if the caller is not the owner of a * given zone. * * @param zone The zone for which to assert ownership. */ function _assertCallerIsZoneOwner(address zone) private view { // Ensure that the zone in question exists. _assertZoneExists(zone); // If the caller does not match the current owner of the zone... if (msg.sender != _signedZones[zone].owner) { // Revert, indicating that the caller is not the owner. revert CallerIsNotOwner(zone); } } /** * @dev Private view function to revert if a given zone does not exist. * * @param zone The zone for which to assert existence. */ function _assertZoneExists(address zone) private view { // Attempt to retrieve a the owner for the zone in question. if (_signedZones[zone].owner == address(0)) { // Revert if no ownerwas located. revert NoZone(); } } /** * @dev Private view function to revert if a signer being added to a zone * is the null address or the signer already exists, or the signer was * previously authorized. If the signer is being removed, the * function will revert if the signer is not active. * * @param signedZoneProperties The signed zone properties for the zone. * @param signer The signer to add or remove. * @param active Whether the signer is being added or * removed. */ function _assertSignerPermissions( SignedZoneProperties storage signedZoneProperties, address signer, bool active ) private view { // Do not allow the null address to be added as a signer. if (signer == address(0)) { revert SignerCannotBeNullAddress(); } // If the signer is being added... if (active) { // Revert if the signer is already added. if (signedZoneProperties.signers[signer].active) { revert SignerAlreadyAdded(signer); } // Revert if the signer was previously authorized. if (signedZoneProperties.signers[signer].previouslyActive) { revert SignerCannotBeReauthorized(signer); } } else { // Revert if the signer is not active. if (!signedZoneProperties.signers[signer].active) { revert SignerNotPresent(signer); } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.24; import { ZoneParameters, Schema } from "../../../../types/lib/ConsiderationStructs.sol"; import { ZoneInterface } from "../../../interfaces/ZoneInterface.sol"; import { SignedZoneEventsAndErrors } from "../interfaces/SignedZoneEventsAndErrors.sol"; import { SIP5Interface } from "../../interfaces/SIP5Interface.sol"; import { SignedZoneControllerInterface } from "../interfaces/SignedZoneControllerInterface.sol"; import { IAuthorizedTransferSecurityRegistry } from "lib/erc721c-seaport/src/interfaces/IAuthorizedTransferSecurityRegistry.sol"; import "./lib/SignedZoneConstants.sol"; /** * @title SignedZone * @author ryanio, BCLeFevre * @notice SignedZone is an implementation of SIP-7 that requires orders * to be signed by an approved signer. * https://github.com/ProjectOpenSea/SIPs/blob/main/SIPS/sip-7.md */ contract SignedZone is SignedZoneEventsAndErrors, ZoneInterface, SIP5Interface { /// @dev The zone's controller that is set during deployment. address private immutable _controller; /// @dev The authorized signers, and if they are active. mapping(address => bool) private _signers; /// @dev The EIP-712 digest parameters. bytes32 internal immutable _NAME_HASH; bytes32 internal immutable _VERSION_HASH = keccak256(bytes("2.0")); // prettier-ignore bytes32 internal immutable _EIP_712_DOMAIN_TYPEHASH = keccak256( abi.encodePacked( "EIP712Domain(", "string name,", "string version,", "uint256 chainId,", "address verifyingContract", ")" ) ); // prettier-ignore bytes32 internal immutable _SIGNED_ORDER_TYPEHASH = keccak256( abi.encodePacked( "SignedOrder(", "address fulfiller,", "uint64 expiration,", "bytes32 orderHash,", "bytes context", ")" ) ); uint256 internal immutable _CHAIN_ID = block.chainid; bytes32 internal immutable _DOMAIN_SEPARATOR; address private immutable SEAPORT = 0x0000000000000068F116a894984e2DB1123eB395; /** * @notice Constructor to deploy the contract. * * @param zoneName The name for the zone used in the domain separator * derivation. */ constructor(string memory zoneName) { // Set the deployer as the controller. _controller = msg.sender; // Set the name hash. _NAME_HASH = keccak256(bytes(zoneName)); // Derive and set the domain separator. _DOMAIN_SEPARATOR = _deriveDomainSeparator(); // Emit an event to signal a SIP-5 contract has been deployed. emit SeaportCompatibleContractDeployed(); } /** * @notice The fallback function is used as a dispatcher for the * `updateSigner`, `isActiveSigner`, `getActiveSigners` and * `supportsInterface` functions. */ // prettier-ignore fallback(bytes calldata) external returns (bytes memory output) { // Get the function selector. bytes4 selector = msg.sig; if (selector == UPDATE_SIGNER_SELECTOR) { // abi.encodeWithSignature("updateSigner(address,bool)", signer, // active) // Get the signer, and active status. address signer = abi.decode(msg.data[4:], (address)); bool active = abi.decode(msg.data[36:], (bool)); // Call to update the signer. _updateSigner(signer, active); } else if (selector == GET_ACTIVE_SIGNERS_SELECTOR) { // abi.encodeWithSignature("getActiveSigners()") // Call the internal function to get the active signers. return abi.encode(_getActiveSigners()); } else if (selector == IS_ACTIVE_SIGNER_SELECTOR) { // abi.encodeWithSignature("isActiveSigner(address)", signer) // Get the signer. address signer = abi.decode(msg.data[4:], (address)); // Call the internal function to determine if the signer is active. return abi.encode(_isActiveSigner(signer)); } else { // Revert if the function selector is not supported. assembly { // Store left-padded selector with push4 (reduces bytecode), // mem[28:32] = selector mstore(0, UnsupportedFunctionSelector_error_selector) // revert(abi.encodeWithSignature( // "UnsupportedFunctionSelector()" // )) revert(0x1c, UnsupportedFunctionSelector_error_length) } } } /** * @notice Check if a given order including extraData is currently valid. * * @dev This function is called by Seaport whenever any extraData is * provided by the caller. * * @return authorizedOrderMagicValue A magic value indicating if the order * is currently valid. */ function authorizeOrder( ZoneParameters calldata zoneParameters ) external override returns (bytes4 authorizedOrderMagicValue) { if (msg.sender != SEAPORT) { // Revert if the caller is not Seaport. revert CallerNotSeaport(); } // Check Zone Parameters validity. _assertValidZoneParameters(); // Put the extraData and orderHash on the stack for cheaper access. bytes calldata extraData = zoneParameters.extraData; bytes32 orderHash = zoneParameters.orderHash; // Declare a variable to hold the expiration. uint64 expiration; // Declare a variable to hold the substandard version byte. uint256 subStandardVersionByte; // Validate the extraData. assembly { // Get the length of the extraData. let extraDataPtr := add(0x24, calldataload(Zone_extraData_cdPtr)) let extraDataLength := calldataload(extraDataPtr) // Validate the extra data length. if lt( extraDataLength, InvalidExtraDataLength_expected_length_substandard_1 ) { // Store left-padded selector with push4, mem[28:32] = selector mstore(0, InvalidExtraDataLength_error_selector) mstore(InvalidExtraDataLength_error_orderHash_ptr, orderHash) // revert(abi.encodeWithSignature( // "InvalidExtraDataLength(bytes32)", orderHash) // ) revert(0x1c, InvalidExtraDataLength_error_length) } // extraData bytes 0-1: SIP-6 version byte (MUST be 0x00) let versionByte := shr(248, calldataload(add(extraDataPtr, 0x20))) // Validate the SIP6 Version byte. if iszero(eq(versionByte, 0x00)) { // Store left-padded selector with push4, mem[28:32] = selector mstore(0, InvalidSIP6Version_error_selector) mstore(InvalidSIP6Version_error_orderHash_ptr, orderHash) // revert(abi.encodeWithSignature( // "InvalidSIP6Version(bytes32)", orderHash) // ) revert(0x1c, InvalidSIP6Version_error_length) } // extraData bytes 93-94: Substandard #1 // (MUST be 0x00, 0x01, 0x07, 0x08, or 0x09) subStandardVersionByte := shr( 248, calldataload( add(extraDataPtr, ExtraData_substandard_version_byte_offset) ) ) // Validate the substandard version byte. if or( gt(subStandardVersionByte, 0x09), and( gt(subStandardVersionByte, 0x01), lt(subStandardVersionByte, 0x07) ) ) { // Store left-padded selector with push4, mem[28:32] = selector mstore(0, InvalidSubstandardVersion_error_selector) mstore(InvalidSubstandardVersion_error_orderHash_ptr, orderHash) // revert(abi.encodeWithSignature( // "InvalidSubstandardVersion(bytes32)", orderHash) // ) revert(0x1c, InvalidSubstandardVersion_error_length) } // extraData bytes 21-29: expiration timestamp (uint64) expiration := shr( 192, calldataload(add(extraDataPtr, ExtraData_expiration_offset)) ) // Revert if expired. if lt(expiration, timestamp()) { // Store left-padded selector with push4, mem[28:32] = selector mstore(0, SignatureExpired_error_selector) mstore(SignatureExpired_error_expiration_ptr, expiration) mstore(SignatureExpired_error_orderHash_ptr, orderHash) // revert(abi.encodeWithSignature( // "SignatureExpired(uint256,bytes32)", expiration, orderHash) // ) revert(0x1c, SignatureExpired_error_length) } // Get the length of the consideration array. let considerationLength := calldataload( add(0x24, calldataload(Zone_consideration_head_cdPtr)) ) // Revert if the order does not have any consideration items due to // the Substandard #1 requirement. if iszero(considerationLength) { // Store left-padded selector with push4, mem[28:32] = selector mstore(0, InvalidSubstandardSupport_error_selector) mstore(InvalidSubstandardSupport_error_reason_offset_ptr, 0x60) mstore( InvalidSubstandardSupport_error_substandard_version_ptr, 1 ) mstore(InvalidSubstandardSupport_error_orderHash_ptr, orderHash) mstore(InvalidSubstandardSupport_error_reason_length_ptr, 0x2a) mstore( InvalidSubstandardSupport_error_reason_ptr, "Consideration must have at least" ) mstore( InvalidSubstandardSupport_error_reason_2_ptr, " one item." ) // revert(abi.encodeWithSignature( // "InvalidSubstandardSupport(string,uint256,bytes32)", // reason, // substandardVersion, // orderHash // )) revert(0x1c, InvalidSubstandardSupport_error_length) } } // Check the validity of the Substandard #1 extraData and get the // expected fulfiller address. address expectedFulfiller = ( _assertValidSubstandardAndGetExpectedFulfiller(orderHash) ); // extraData bytes 29-93: signature // (strictly requires 64 byte compact sig, EIP-2098) bytes calldata signature = extraData[29:93]; // extraData bytes 93-126: context (fixed length, 32 bytes + 1 byte) bytes calldata context; if (subStandardVersionByte < 2) { context = extraData[93:126]; } else if (subStandardVersionByte == 7) { if (extraData.length < 166) { assembly { // Store left-padded selector with push4, mem[28:32] = selector mstore(0, InvalidExtraDataLength_error_selector) mstore( InvalidExtraDataLength_error_orderHash_ptr, orderHash ) // revert(abi.encodeWithSignature( // "InvalidExtraDataLength(bytes32)", orderHash) // ) revert(0x1c, InvalidExtraDataLength_error_length) } } context = extraData[93:166]; } else { if (extraData.length < 146) { assembly { // Store left-padded selector with push4, mem[28:32] = selector mstore(0, InvalidExtraDataLength_error_selector) mstore( InvalidExtraDataLength_error_orderHash_ptr, orderHash ) // revert(abi.encodeWithSignature( // "InvalidExtraDataLength(bytes32)", orderHash) // ) revert(0x1c, InvalidExtraDataLength_error_length) } } context = extraData[93:146]; } // Derive the signedOrder hash. bytes32 signedOrderHash = _deriveSignedOrderHash( expectedFulfiller, expiration, orderHash, context ); // Derive the EIP-712 digest using the domain separator and signedOrder // hash. bytes32 digest = _deriveEIP712Digest( _domainSeparator(), signedOrderHash ); // Recover the signer address from the digest and signature. address recoveredSigner = _recoverSigner(digest, signature); // Revert if the signer is not active. if (!_signers[recoveredSigner]) { revert SignerNotActive(recoveredSigner, orderHash); } // Set the transfer status of the tokens to true. _setTransferStatus(zoneParameters, true); // Return the selector of authorizeOrder as the magic value. authorizedOrderMagicValue = ZoneInterface.authorizeOrder.selector; } /** * @notice Check if a given order including extraData is currently valid. * * @dev This function is called by Seaport whenever any extraData is * provided by the caller. * * @return validOrderMagicValue A magic value indicating if the order is * currently valid. */ function validateOrder( ZoneParameters calldata zoneParameters ) external override returns (bytes4 validOrderMagicValue) { if (msg.sender != SEAPORT) { // Revert if the caller is not Seaport. revert CallerNotSeaport(); } // Set the transfer status of the tokens to false. _setTransferStatus(zoneParameters, false); // Return the selector of validateOrder as the magic value. validOrderMagicValue = ZoneInterface.validateOrder.selector; } /** * @dev Returns Seaport metadata for this contract, returning the * contract name and supported schemas. * * @return name The contract name * @return schemas The supported SIPs */ function getSeaportMetadata() external view override(SIP5Interface, ZoneInterface) returns (string memory name, Schema[] memory schemas) { // Return the supported SIPs. schemas = new Schema[](1); schemas[0].id = 7; // Get the SIP-7 information. ( bytes32 domainSeparator, string memory zoneName, string memory apiEndpoint, uint256[] memory substandards, string memory documentationURI ) = _sip7Information(); // Return the zone name. name = zoneName; // Encode the SIP-7 information. schemas[0].metadata = abi.encode( domainSeparator, apiEndpoint, substandards, documentationURI ); } /** * @dev Returns if the zone supports the interfaceId. * * @param interfaceId The interface identifier, as specified in ERC-165. * * @return supportsInterface True if the zone supports interfaceId, false */ function supportsInterface( bytes4 interfaceId ) external view override returns (bool) { // Call the internal function to determine if the interface is supported. return _supportsInterface(interfaceId); } /** * @dev Sets the transfer status of the token based on the consideration * items or offer items. * * @param zoneParameters The zone parameters. * @param active The transfer status of the token. */ function _setTransferStatus( ZoneParameters calldata zoneParameters, bool active ) internal { uint8 subStandardVersionByte = uint8( bytes1(zoneParameters.extraData[93]) ); if (subStandardVersionByte < 2) { return; } address registry = address(bytes20(zoneParameters.extraData[126:146])); address token; uint256 identifier; uint256 amount; if (uint256(zoneParameters.consideration[0].itemType) > 1) { // Call on first consideration token = zoneParameters.consideration[0].token; identifier = zoneParameters.consideration[0].identifier; amount = zoneParameters.consideration[0].amount; } else { // Call on first offer token = zoneParameters.offer[0].token; identifier = zoneParameters.offer[0].identifier; amount = zoneParameters.offer[0].amount; } if (subStandardVersionByte == 7) { address operator = address( bytes20(zoneParameters.extraData[146:166]) ); if (active) { IAuthorizedTransferSecurityRegistry(registry) .beforeAuthorizedTransfer(operator, token); } else { IAuthorizedTransferSecurityRegistry(registry) .afterAuthorizedTransfer(token); } } else if (subStandardVersionByte == 8) { if (active) { IAuthorizedTransferSecurityRegistry(registry) .beforeAuthorizedTransfer(token, identifier); } else { IAuthorizedTransferSecurityRegistry(registry) .afterAuthorizedTransfer(token, identifier); } } /* subStandardVersionByte == 9 */ else { if (active) { IAuthorizedTransferSecurityRegistry(registry) .beforeAuthorizedTransferWithAmount( token, identifier, amount ); } else { IAuthorizedTransferSecurityRegistry(registry) .afterAuthorizedTransferWithAmount(token, identifier); } } } /** * @notice Add or remove a signer to the zone. * Only the controller can call this function. * * @param signer The signer address to add or remove. */ function _updateSigner(address signer, bool active) internal { // Only the controller can call this function. _assertCallerIsController(); // Add or remove the signer. active ? _addSigner(signer) : _removeSigner(signer); } /** * @notice Add a new signer to the zone. * Only the controller or an active signer can call this function. * * @param signer The new signer address to add. */ function _addSigner(address signer) internal { // Set the signer's active status to true. _signers[signer] = true; // Emit an event that the signer was added. emit SignerAdded(signer); } /** * @notice Remove an active signer from the zone. * Only the controller or an active signer can call this function. * * @param signer The signer address to remove. */ function _removeSigner(address signer) internal { // Set the signer's active status to false. _signers[signer] = false; // Emit an event that the signer was removed. emit SignerRemoved(signer); } /** * @notice Returns the active signers for the zone. Note that the array of * active signers could grow to a size that this function could not * return, the array of active signers is expected to be small, * and is managed by the controller. * * @return signers The active signers. */ function _getActiveSigners() internal view returns (address[] memory signers) { // Return the active signers for the zone by calling the controller. signers = SignedZoneControllerInterface(_controller).getActiveSigners( address(this) ); } /** * @notice Returns if the given address is an active signer for the zone. * * @param signer The address to check if it is an active signer. * * @return The address is an active signer, false otherwise. */ function _isActiveSigner(address signer) internal view returns (bool) { // Return the active status of the caller. return _signers[signer]; } /** * @notice Returns whether the interface is supported. * * @param interfaceId The interface id to check against. */ function _supportsInterface( bytes4 interfaceId ) internal pure returns (bool) { // Determine if the interface is supported. return (interfaceId == type(SIP5Interface).interfaceId || // SIP-5 interfaceId == type(ZoneInterface).interfaceId || // ZoneInterface interfaceId == 0x01ffc9a7); // ERC-165 } /** * @notice Internal call to return the signing information, substandards, * and documentation about the zone. * * @return domainSeparator The domain separator used for signing. * @return zoneName The zone name. * @return apiEndpoint The API endpoint for the zone. * @return substandards The substandards supported by the zone. * @return documentationURI The documentation URI for the zone. */ function _sip7Information() internal view returns ( bytes32 domainSeparator, string memory zoneName, string memory apiEndpoint, uint256[] memory substandards, string memory documentationURI ) { // Return the SIP-7 information. domainSeparator = _domainSeparator(); // Get the SIP-7 information from the controller. ( , zoneName, apiEndpoint, substandards, documentationURI ) = SignedZoneControllerInterface(_controller) .getAdditionalZoneInformation(address(this)); } /** * @dev Derive the signedOrder hash from the orderHash and expiration. * * @param fulfiller The expected fulfiller address. * @param expiration The signature expiration timestamp. * @param orderHash The order hash. * @param context The optional variable-length context. * * @return signedOrderHash The signedOrder hash. * */ function _deriveSignedOrderHash( address fulfiller, uint64 expiration, bytes32 orderHash, bytes calldata context ) internal view returns (bytes32 signedOrderHash) { // Derive the signed order hash. signedOrderHash = keccak256( abi.encode( _SIGNED_ORDER_TYPEHASH, fulfiller, expiration, orderHash, keccak256(context) ) ); } /** * @dev Internal view function to return the signer of a signature. * * @param digest The digest to verify the signature against. * @param signature A signature from the signer indicating that the order * has been approved. * * @return recoveredSigner The recovered signer. */ function _recoverSigner( bytes32 digest, bytes memory signature ) internal view returns (address recoveredSigner) { // Utilize assembly to perform optimized signature verification check. assembly { // Ensure that first word of scratch space is empty. mstore(0, 0) // Declare value for v signature parameter. let v // Get the length of the signature. let signatureLength := mload(signature) // Get the pointer to the value preceding the signature length. // This will be used for temporary memory overrides - either the // signature head for isValidSignature or the digest for ecrecover. let wordBeforeSignaturePtr := sub(signature, OneWord) // Cache the current value behind the signature to restore it later. let cachedWordBeforeSignature := mload(wordBeforeSignaturePtr) // Declare lenDiff + recoveredSigner scope to manage stack pressure. { // Take the difference between the max ECDSA signature length // and the actual signature length. Overflow desired for any // values > 65. If the diff is not 0 or 1, it is not a valid // ECDSA signature - move on to EIP1271 check. let lenDiff := sub(ECDSA_MaxLength, signatureLength) // If diff is 0 or 1, it may be an ECDSA signature. // Try to recover signer. if iszero(gt(lenDiff, 1)) { // Read the signature `s` value. let originalSignatureS := mload( add(signature, ECDSA_signature_s_offset) ) // Read the first byte of the word after `s`. If the // signature is 65 bytes, this will be the real `v` value. // If not, it will need to be modified - doing it this way // saves an extra condition. v := byte( 0, mload(add(signature, ECDSA_signature_v_offset)) ) // If lenDiff is 1, parse 64-byte signature as ECDSA. if lenDiff { // Extract yParity from highest bit of vs and add 27 to // get v. v := add( shr(MaxUint8, originalSignatureS), Signature_lower_v ) // Extract canonical s from vs, all but the highest bit. // Temporarily overwrite the original `s` value in the // signature. mstore( add(signature, ECDSA_signature_s_offset), and( originalSignatureS, EIP2098_allButHighestBitMask ) ) } // Temporarily overwrite the signature length with `v` to // conform to the expected input for ecrecover. mstore(signature, v) // Temporarily overwrite the word before the length with // `digest` to conform to the expected input for ecrecover. mstore(wordBeforeSignaturePtr, digest) // Attempt to recover the signer for the given signature. Do // not check the call status as ecrecover will return a null // address if the signature is invalid. pop( staticcall( gas(), Ecrecover_precompile, // Call ecrecover precompile. wordBeforeSignaturePtr, // Use data memory location. Ecrecover_args_size, // Size of digest, v, r, and s. 0, // Write result to scratch space. OneWord // Provide size of returned result. ) ) // Restore cached word before signature. mstore(wordBeforeSignaturePtr, cachedWordBeforeSignature) // Restore cached signature length. mstore(signature, signatureLength) // Restore cached signature `s` value. mstore( add(signature, ECDSA_signature_s_offset), originalSignatureS ) // Read the recovered signer from the buffer given as return // space for ecrecover. recoveredSigner := mload(0) } } // Restore the cached values overwritten by selector, digest and // signature head. mstore(wordBeforeSignaturePtr, cachedWordBeforeSignature) } } /** * @dev Internal view function to get the EIP-712 domain separator. If the * chainId matches the chainId set on deployment, the cached domain * separator will be returned; otherwise, it will be derived from * scratch. * * @return The domain separator. */ function _domainSeparator() internal view returns (bytes32) { // prettier-ignore return block.chainid == _CHAIN_ID ? _DOMAIN_SEPARATOR : _deriveDomainSeparator(); } /** * @dev Internal view function to derive the EIP-712 domain separator. * * @return domainSeparator The derived domain separator. */ function _deriveDomainSeparator() internal view returns (bytes32 domainSeparator) { bytes32 typehash = _EIP_712_DOMAIN_TYPEHASH; bytes32 nameHash = _NAME_HASH; bytes32 versionHash = _VERSION_HASH; // Leverage scratch space and other memory to perform an efficient hash. assembly { // Retrieve the free memory pointer; it will be replaced afterwards. let freeMemoryPointer := mload(FreeMemoryPointerSlot) // Retrieve value at 0x80; it will also be replaced afterwards. let slot0x80 := mload(Slot0x80) // Place typehash, name hash, and version hash at start of memory. mstore(0, typehash) mstore(OneWord, nameHash) mstore(TwoWords, versionHash) // Place chainId in the next memory location. mstore(ThreeWords, chainid()) // Place the address of this contract in the next memory location. mstore(FourWords, address()) // Hash relevant region of memory to derive the domain separator. domainSeparator := keccak256(0, FiveWords) // Restore the free memory pointer. mstore(FreeMemoryPointerSlot, freeMemoryPointer) // Restore the zero slot to zero. mstore(ZeroSlot, 0) // Restore the value at 0x80. mstore(Slot0x80, slot0x80) } } /** * @dev Internal pure function to efficiently derive an digest to sign for * an order in accordance with EIP-712. * * @param domainSeparator The domain separator. * @param signedOrderHash The signedOrder hash. * * @return digest The digest hash. */ function _deriveEIP712Digest( bytes32 domainSeparator, bytes32 signedOrderHash ) internal pure returns (bytes32 digest) { // Leverage scratch space to perform an efficient hash. assembly { // Place the EIP-712 prefix at the start of scratch space. mstore(0, EIP_712_PREFIX) // Place the domain separator in the next region of scratch space. mstore(EIP712_DomainSeparator_offset, domainSeparator) // Place the signed order hash in scratch space, spilling into the // first two bytes of the free memory pointer — this should never be // set as memory cannot be expanded to that size, and will be // zeroed out after the hash is performed. mstore(EIP712_SignedOrderHash_offset, signedOrderHash) // Hash the relevant region digest := keccak256(0, EIP712_DigestPayload_size) // Clear out the dirtied bits in the memory pointer. mstore(EIP712_SignedOrderHash_offset, 0) } } /** * @dev Internal view function to revert if the caller is not the * controller. */ function _assertCallerIsController() internal view { // Get the controller address to use in the assembly block. address controller = _controller; assembly { // Revert if the caller is not the controller. if iszero(eq(caller(), controller)) { // Store left-padded selector with push4, mem[28:32] = selector mstore(0, InvalidController_error_selector) // revert(abi.encodeWithSignature( // "InvalidController()") // ) revert(0x1c, InvalidController_error_length) } } } /** * @dev Internal pure function to validate calldata offsets for the * dyanamic type in ZoneParameters. This ensures that functions using * the calldata object normally will be using the same data as the * assembly functions and that values that are bound to a given range * are within that range. */ function _assertValidZoneParameters() internal pure { // Utilize assembly in order to read offset data directly from calldata. assembly { /* * Checks: * 1. Zone parameters struct offset == 0x20 */ // Zone parameters at calldata 0x04 must have offset of 0x20. if iszero( eq(calldataload(Zone_parameters_cdPtr), Zone_parameters_ptr) ) { // Store left-padded selector with push4 (reduces bytecode), // mem[28:32] = selector mstore(0, InvalidZoneParameterEncoding_error_selector) // revert(abi.encodeWithSignature( // "InvalidZoneParameterEncoding()" // )) revert(0x1c, InvalidZoneParameterEncoding_error_length) } } } /** * @dev Internal pure function to ensure that the context argument for the * supplied extra data follows the substandard #1 format. Returns the * expected fulfiller of the order for deriving the signed order hash. * * @param orderHash The order hash. * * @return expectedFulfiller The expected fulfiller of the order. */ function _assertValidSubstandardAndGetExpectedFulfiller( bytes32 orderHash ) internal pure returns (address expectedFulfiller) { // Revert if the expected fulfiller is not the zero address and does // not match the actual fulfiller or if the expected received // identifier does not match the actual received identifier. assembly { // Get the actual fulfiller. let actualFulfiller := calldataload(Zone_parameters_fulfiller_cdPtr) let extraDataPtr := calldataload(Zone_extraData_cdPtr) let considerationPtr := calldataload(Zone_consideration_head_cdPtr) // Get the expected fulfiller. expectedFulfiller := shr( 96, calldataload(add(expectedFulfiller_offset, extraDataPtr)) ) // Get the actual received identifier. let actualReceivedIdentifier := calldataload( add(actualReceivedIdentifier_offset, considerationPtr) ) // Get the expected received identifier. let expectedReceivedIdentifier := calldataload( add(expectedReceivedIdentifier_offset, extraDataPtr) ) // Revert if expected fulfiller is not the zero address and does // not match the actual fulfiller. if and( iszero(iszero(expectedFulfiller)), iszero(eq(expectedFulfiller, actualFulfiller)) ) { // Store left-padded selector with push4, mem[28:32] = selector mstore(0, InvalidFulfiller_error_selector) mstore( InvalidFulfiller_error_expectedFulfiller_ptr, expectedFulfiller ) mstore( InvalidFulfiller_error_actualFulfiller_ptr, actualFulfiller ) mstore(InvalidFulfiller_error_orderHash_ptr, orderHash) // revert(abi.encodeWithSignature( // "InvalidFulfiller(address,address,bytes32)", // expectedFulfiller, // actualFulfiller, // orderHash // )) revert(0x1c, InvalidFulfiller_error_length) } // Revert if expected received item does not match the actual // received item. if iszero( eq(expectedReceivedIdentifier, actualReceivedIdentifier) ) { // Store left-padded selector with push4, mem[28:32] = selector mstore(0, InvalidReceivedItem_error_selector) mstore( InvalidReceivedItem_error_expectedReceivedItem_ptr, expectedReceivedIdentifier ) mstore( InvalidReceivedItem_error_actualReceivedItem_ptr, actualReceivedIdentifier ) mstore(InvalidReceivedItem_error_orderHash_ptr, orderHash) // revert(abi.encodeWithSignature( // "InvalidReceivedItem(uint256,uint256,bytes32)", // expectedReceivedIdentifier, // actualReceievedIdentifier, // orderHash // )) revert(0x1c, InvalidReceivedItem_error_length) } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.24; /** * @title SignedZone * @author ryanio, BCLeFevre * @notice SignedZone is an implementation of SIP-7 that requires orders * to be signed by an approved signer. * https://github.com/ProjectOpenSea/SIPs/blob/main/SIPS/sip-7.md * */ interface SignedZoneInterface { /** * @notice Update the active status of a signer. * * @param signer The signer address to update. * @param active The new active status of the signer. */ function updateSigner(address signer, bool active) external; /** * @notice Returns the active signers for the zone. * * @return signers The active signers. */ function getActiveSigners() external view returns (address[] memory signers); /** * @notice Returns the transfer status of a token. * * @param caller The caller address. * @param token The token address. * @return status The transfer status of the token. */ function isValidated( address caller, address token ) external view returns (bool); /** * @notice Validate the token transfer status with the token's id. * * @param caller The caller address. * @param token The token address. * @param tokenId The token id. */ function isValidatedWithId( address caller, address token, uint256 tokenId ) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.24; import { SignedZoneControllerInterface } from "../../../interfaces/SignedZoneControllerInterface.sol"; /** * @title SignedZoneControllerSub1Interface * @author BCLeFevre * @notice SignedZoneControllerSub1Interface enables the deploying of SignedZones. * SignedZones are an implementation of SIP-7 that requires orders * to be signed by an approved signer. * https://github.com/ProjectOpenSea/SIPs/blob/main/SIPS/sip-7.md * */ interface SignedZoneControllerSub1Interface is SignedZoneControllerInterface { /** * @notice Deploy a SignedZone to a precomputed address. * * @param zoneName The name for the zone returned in * getSeaportMetadata(). * @param apiEndpoint The API endpoint where orders for this zone can * be signed. * @param documentationURI The URI to the documentation describing the * behavior of the contract. Request and response * payloads are defined in SIP-7. * @param salt The salt to be used to derive the zone address * @param initialOwner The initial owner to set for the new zone. * * @return signedZone The derived address for the zone. */ function createZone( string memory zoneName, string memory apiEndpoint, string memory documentationURI, address initialOwner, bytes32 salt ) external returns (address signedZone); /** * @notice Derive the zone address associated with a salt. * * @param zoneName The name of the zone. * @param salt The salt to be used to derive the zone address. * * @return derivedAddress The derived address of the signed zone. */ function getZone( string memory zoneName, bytes32 salt ) external view returns (address derivedAddress); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.24; /** * @notice SignedZoneControllerEventsAndErrors contains errors and events * related to deploying and managing new signed zones. */ interface SignedZoneControllerEventsAndErrors { /** * @dev Emit an event whenever a new zone is created. * * @param zoneAddress The address of the zone. * @param zoneName The name for the zone returned in * getSeaportMetadata(). * @param apiEndpoint The API endpoint where orders for this zone can * be signed. * @param documentationURI The URI to the documentation describing the * behavior of the contract. * Request and response payloads are defined in * SIP-7. * @param salt The salt used to deploy the zone. */ event ZoneCreated( address zoneAddress, string zoneName, string apiEndpoint, string documentationURI, bytes32 salt ); /** * @dev Emit an event whenever zone ownership is transferred. * * @param zone The zone for which ownership has been * transferred. * @param previousOwner The previous owner of the zone. * @param newOwner The new owner of the zone. */ event OwnershipTransferred( address indexed zone, address indexed previousOwner, address indexed newOwner ); /** * @dev Emit an event whenever a zone owner registers a new potential * owner for that zone. * * @param newPotentialOwner The new potential owner of the zone. */ event PotentialOwnerUpdated(address indexed newPotentialOwner); /** * @dev Emit an event when a signer has been updated. */ event SignerUpdated(address signedZone, address signer, bool active); /** * @dev Revert with an error when attempting to update zone information or * transfer ownership of a zone when the caller is not the owner of * the zone in question. */ error CallerIsNotOwner(address zone); /** * @dev Revert with an error when attempting to claim ownership of a zone * with a caller that is not the current potential owner for the * zone in question. */ error CallerIsNotNewPotentialOwner(address zone); /** * @dev Revert with an error when attempting to create a new signed zone * using a salt where the first twenty bytes do not match the address * of the caller or are not set to zero. */ error InvalidCreator(); /** * @dev Revert with an error when attempting to create a new zone when no * initial owner address is supplied. */ error InvalidInitialOwner(); /** * @dev Revert with an error when attempting to set a new potential owner * that is already set. */ error NewPotentialOwnerAlreadySet(address zone, address newPotentialOwner); /** * @dev Revert with an error when attempting to cancel ownership transfer * when no new potential owner is currently set. */ error NoPotentialOwnerCurrentlySet(address zone); /** * @dev Revert with an error when attempting to register a new potential * owner and supplying the null address. */ error NewPotentialOwnerIsNullAddress(address zone); /** * @dev Revert with an error when attempting to interact with a zone that * does not yet exist. */ error NoZone(); /** * @dev Revert with an error if trying to add a signer that is * already active. */ error SignerAlreadyAdded(address signer); /** * @dev Revert with an error if a new signer is the null address. */ error SignerCannotBeNullAddress(); /** * @dev Revert with an error if a removed signer is trying to be * reauthorized. */ error SignerCannotBeReauthorized(address signer); /** * @dev Revert with an error if trying to remove a signer that is * not present. */ error SignerNotPresent(address signer); /** * @dev Revert with an error when attempting to deploy a zone that is * currently deployed. */ error ZoneAlreadyExists(address zone); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.19; /// @dev ECDSA signature offsets. uint256 constant ECDSA_MaxLength = 65; uint256 constant ECDSA_signature_s_offset = 0x40; uint256 constant ECDSA_signature_v_offset = 0x60; /// @dev Helpers for memory offsets. uint256 constant OneWord = 0x20; uint256 constant TwoWords = 0x40; uint256 constant ThreeWords = 0x60; uint256 constant FourWords = 0x80; uint256 constant FiveWords = 0xa0; uint256 constant Signature_lower_v = 27; uint256 constant MaxUint8 = 0xff; bytes32 constant EIP2098_allButHighestBitMask = ( 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ); uint256 constant Ecrecover_precompile = 1; uint256 constant Ecrecover_args_size = 0x80; uint256 constant FreeMemoryPointerSlot = 0x40; uint256 constant ZeroSlot = 0x60; uint256 constant Slot0x80 = 0x80; /// @dev The EIP-712 digest offsets. uint256 constant EIP712_DomainSeparator_offset = 0x02; uint256 constant EIP712_SignedOrderHash_offset = 0x22; uint256 constant EIP712_DigestPayload_size = 0x42; uint256 constant EIP_712_PREFIX = ( 0x1901000000000000000000000000000000000000000000000000000000000000 ); // @dev Function selectors used in the fallback function.. bytes4 constant UPDATE_SIGNER_SELECTOR = 0xf460590b; bytes4 constant GET_ACTIVE_SIGNERS_SELECTOR = 0xa784b80c; bytes4 constant IS_ACTIVE_SIGNER_SELECTOR = 0x7dff5a79; bytes4 constant SUPPORTS_INTERFACE_SELECTOR = 0x01ffc9a7; /* * error InvalidController() * - Defined in SignedZoneEventsAndErrors.sol * Memory layout: * - 0x00: Left-padded selector (data begins at 0x1c) * Revert buffer is memory[0x1c:0x20] */ uint256 constant InvalidController_error_selector = 0x6d5769be; uint256 constant InvalidController_error_length = 0x04; /* * error InvalidFulfiller(address expectedFulfiller, address actualFulfiller, bytes32 orderHash) * - Defined in SignedZoneEventsAndErrors.sol * Memory layout: * - 0x00: Left-padded selector (data begins at 0x1c) * - 0x20: expectedFulfiller * - 0x40: actualFullfiller * - 0x60: orderHash * Revert buffer is memory[0x1c:0x80] */ uint256 constant InvalidFulfiller_error_selector = 0x1bcf9bb7; uint256 constant InvalidFulfiller_error_expectedFulfiller_ptr = 0x20; uint256 constant InvalidFulfiller_error_actualFulfiller_ptr = 0x40; uint256 constant InvalidFulfiller_error_orderHash_ptr = 0x60; uint256 constant InvalidFulfiller_error_length = 0x64; /* * error InvalidReceivedItem(uint256 expectedReceivedIdentifier, uint256 actualReceievedIdentifier, bytes32 orderHash) * - Defined in SignedZoneEventsAndErrors.sol * Memory layout: * - 0x00: Left-padded selector (data begins at 0x1c) * - 0x20: expectedReceivedIdentifier * - 0x40: actualReceievedIdentifier * - 0x60: orderHash * Revert buffer is memory[0x1c:0x80] */ uint256 constant InvalidReceivedItem_error_selector = 0xb36c03e8; uint256 constant InvalidReceivedItem_error_expectedReceivedItem_ptr = 0x20; uint256 constant InvalidReceivedItem_error_actualReceivedItem_ptr = 0x40; uint256 constant InvalidReceivedItem_error_orderHash_ptr = 0x60; uint256 constant InvalidReceivedItem_error_length = 0x64; /* * error InvalidZoneParameterEncoding() * - Defined in SignedZoneEventsAndErrors.sol * Memory layout: * - 0x00: Left-padded selector (data begins at 0x1c) * Revert buffer is memory[0x1c:0x20] */ uint256 constant InvalidZoneParameterEncoding_error_selector = 0x46d5d895; uint256 constant InvalidZoneParameterEncoding_error_length = 0x04; /* * error InvalidExtraDataLength() * - Defined in SignedZoneEventsAndErrors.sol * Memory layout: * - 0x00: Left-padded selector (data begins at 0x1c) * - 0x20: orderHash * Revert buffer is memory[0x1c:0x40] */ uint256 constant InvalidExtraDataLength_error_selector = 0xd232fd2c; uint256 constant InvalidExtraDataLength_error_orderHash_ptr = 0x20; uint256 constant InvalidExtraDataLength_error_length = 0x24; uint256 constant InvalidExtraDataLength_expected_length_substandard_1 = 0x7e; // 126 uint256 constant InvalidExtraDataLength_expected_length_substandard_7 = 0xa6; // 166 uint256 constant InvalidExtraDataLength_expected_length_substandard_8_or_9 = 0x92; // 146 uint256 constant ExtraData_expiration_offset = 0x35; uint256 constant ExtraData_substandard_version_byte_offset = 0x7d; /* * error InvalidSIP6Version() * - Defined in SignedZoneEventsAndErrors.sol * Memory layout: * - 0x00: Left-padded selector (data begins at 0x1c) * - 0x20: orderHash * Revert buffer is memory[0x1c:0x40] */ uint256 constant InvalidSIP6Version_error_selector = 0x64115774; uint256 constant InvalidSIP6Version_error_orderHash_ptr = 0x20; uint256 constant InvalidSIP6Version_error_length = 0x24; /* * error InvalidSubstandardVersion() * - Defined in SignedZoneEventsAndErrors.sol * Memory layout: * - 0x00: Left-padded selector (data begins at 0x1c) * - 0x20: orderHash * Revert buffer is memory[0x1c:0x40] */ uint256 constant InvalidSubstandardVersion_error_selector = 0x26787999; uint256 constant InvalidSubstandardVersion_error_orderHash_ptr = 0x20; uint256 constant InvalidSubstandardVersion_error_length = 0x24; /* * error InvalidSubstandardSupport() * - Defined in SignedZoneEventsAndErrors.sol * Memory layout: * - 0x00: Left-padded selector (data begins at 0x1c) * - 0x20: reason * - 0x40: substandardVersion * - 0x60: orderHash * Revert buffer is memory[0x1c:0xe0] */ uint256 constant InvalidSubstandardSupport_error_selector = 0x2be76224; uint256 constant InvalidSubstandardSupport_error_reason_offset_ptr = 0x20; uint256 constant InvalidSubstandardSupport_error_substandard_version_ptr = 0x40; uint256 constant InvalidSubstandardSupport_error_orderHash_ptr = 0x60; uint256 constant InvalidSubstandardSupport_error_reason_length_ptr = 0x80; uint256 constant InvalidSubstandardSupport_error_reason_ptr = 0xa0; uint256 constant InvalidSubstandardSupport_error_reason_2_ptr = 0xc0; uint256 constant InvalidSubstandardSupport_error_length = 0xc4; /* * error SignatureExpired() * - Defined in SignedZoneEventsAndErrors.sol * Memory layout: * - 0x00: Left-padded selector (data begins at 0x1c) * - 0x20: expiration * - 0x40: orderHash * Revert buffer is memory[0x1c:0x60] */ uint256 constant SignatureExpired_error_selector = 0x16546071; uint256 constant SignatureExpired_error_expiration_ptr = 0x20; uint256 constant SignatureExpired_error_orderHash_ptr = 0x40; uint256 constant SignatureExpired_error_length = 0x44; /* * error UnsupportedFunctionSelector() * - Defined in SignedZoneEventsAndErrors.sol * Memory layout: * - 0x00: Left-padded selector (data begins at 0x1c) * Revert buffer is memory[0x1c:0x20] */ uint256 constant UnsupportedFunctionSelector_error_selector = 0x54c91b87; uint256 constant UnsupportedFunctionSelector_error_length = 0x04; // Zone parameter calldata pointers uint256 constant Zone_parameters_cdPtr = 0x04; uint256 constant Zone_parameters_fulfiller_cdPtr = 0x44; uint256 constant Zone_consideration_head_cdPtr = 0xa4; uint256 constant Zone_extraData_cdPtr = 0xc4; // Zone parameter memory pointers uint256 constant Zone_parameters_ptr = 0x20; // Zone parameter offsets uint256 constant Zone_parameters_offset = 0x24; uint256 constant expectedFulfiller_offset = 0x45; uint256 constant actualReceivedIdentifier_offset = 0x84; uint256 constant expectedReceivedIdentifier_offset = 0xa2; // Spent Item Size uint256 constant SpentItem_size = 0x80; // Received Item Size uint256 constant ReceivedItem_size = 0xa0;
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import { BasicOrderType, ItemType, OrderType, Side } from "./ConsiderationEnums.sol"; import { CalldataPointer, MemoryPointer } from "../helpers/PointerLibraries.sol"; /** * @dev An order contains eleven components: an offerer, a zone (or account that * can cancel the order or restrict who can fulfill the order depending on * the type), the order type (specifying partial fill support as well as * restricted order status), the start and end time, a hash that will be * provided to the zone when validating restricted orders, a salt, a key * corresponding to a given conduit, a counter, and an arbitrary number of * offer items that can be spent along with consideration items that must * be received by their respective recipient. */ struct OrderComponents { address offerer; address zone; OfferItem[] offer; ConsiderationItem[] consideration; OrderType orderType; uint256 startTime; uint256 endTime; bytes32 zoneHash; uint256 salt; bytes32 conduitKey; uint256 counter; } /** * @dev An offer item has five components: an item type (ETH or other native * tokens, ERC20, ERC721, and ERC1155, as well as criteria-based ERC721 and * ERC1155), a token address, a dual-purpose "identifierOrCriteria" * component that will either represent a tokenId or a merkle root * depending on the item type, and a start and end amount that support * increasing or decreasing amounts over the duration of the respective * order. */ struct OfferItem { ItemType itemType; address token; uint256 identifierOrCriteria; uint256 startAmount; uint256 endAmount; } /** * @dev A consideration item has the same five components as an offer item and * an additional sixth component designating the required recipient of the * item. */ struct ConsiderationItem { ItemType itemType; address token; uint256 identifierOrCriteria; uint256 startAmount; uint256 endAmount; address payable recipient; } /** * @dev A spent item is translated from a utilized offer item and has four * components: an item type (ETH or other native tokens, ERC20, ERC721, and * ERC1155), a token address, a tokenId, and an amount. */ struct SpentItem { ItemType itemType; address token; uint256 identifier; uint256 amount; } /** * @dev A received item is translated from a utilized consideration item and has * the same four components as a spent item, as well as an additional fifth * component designating the required recipient of the item. */ struct ReceivedItem { ItemType itemType; address token; uint256 identifier; uint256 amount; address payable recipient; } /** * @dev For basic orders involving ETH / native / ERC20 <=> ERC721 / ERC1155 * matching, a group of six functions may be called that only requires a * subset of the usual order arguments. Note the use of a "basicOrderType" * enum; this represents both the usual order type as well as the "route" * of the basic order (a simple derivation function for the basic order * type is `basicOrderType = orderType + (4 * basicOrderRoute)`.) */ struct BasicOrderParameters { // calldata offset address considerationToken; // 0x24 uint256 considerationIdentifier; // 0x44 uint256 considerationAmount; // 0x64 address payable offerer; // 0x84 address zone; // 0xa4 address offerToken; // 0xc4 uint256 offerIdentifier; // 0xe4 uint256 offerAmount; // 0x104 BasicOrderType basicOrderType; // 0x124 uint256 startTime; // 0x144 uint256 endTime; // 0x164 bytes32 zoneHash; // 0x184 uint256 salt; // 0x1a4 bytes32 offererConduitKey; // 0x1c4 bytes32 fulfillerConduitKey; // 0x1e4 uint256 totalOriginalAdditionalRecipients; // 0x204 AdditionalRecipient[] additionalRecipients; // 0x224 bytes signature; // 0x244 // Total length, excluding dynamic array data: 0x264 (580) } /** * @dev Basic orders can supply any number of additional recipients, with the * implied assumption that they are supplied from the offered ETH (or other * native token) or ERC20 token for the order. */ struct AdditionalRecipient { uint256 amount; address payable recipient; } /** * @dev The full set of order components, with the exception of the counter, * must be supplied when fulfilling more sophisticated orders or groups of * orders. The total number of original consideration items must also be * supplied, as the caller may specify additional consideration items. */ struct OrderParameters { address offerer; // 0x00 address zone; // 0x20 OfferItem[] offer; // 0x40 ConsiderationItem[] consideration; // 0x60 OrderType orderType; // 0x80 uint256 startTime; // 0xa0 uint256 endTime; // 0xc0 bytes32 zoneHash; // 0xe0 uint256 salt; // 0x100 bytes32 conduitKey; // 0x120 uint256 totalOriginalConsiderationItems; // 0x140 // offer.length // 0x160 } /** * @dev Orders require a signature in addition to the other order parameters. */ struct Order { OrderParameters parameters; bytes signature; } /** * @dev Advanced orders include a numerator (i.e. a fraction to attempt to fill) * and a denominator (the total size of the order) in addition to the * signature and other order parameters. It also supports an optional field * for supplying extra data; this data will be provided to the zone if the * order type is restricted and the zone is not the caller, or will be * provided to the offerer as context for contract order types. */ struct AdvancedOrder { OrderParameters parameters; uint120 numerator; uint120 denominator; bytes signature; bytes extraData; } /** * @dev Orders can be validated (either explicitly via `validate`, or as a * consequence of a full or partial fill), specifically cancelled (they can * also be cancelled in bulk via incrementing a per-zone counter), and * partially or fully filled (with the fraction filled represented by a * numerator and denominator). */ struct OrderStatus { bool isValidated; bool isCancelled; uint120 numerator; uint120 denominator; } /** * @dev A criteria resolver specifies an order, side (offer vs. consideration), * and item index. It then provides a chosen identifier (i.e. tokenId) * alongside a merkle proof demonstrating the identifier meets the required * criteria. */ struct CriteriaResolver { uint256 orderIndex; Side side; uint256 index; uint256 identifier; bytes32[] criteriaProof; } /** * @dev A fulfillment is applied to a group of orders. It decrements a series of * offer and consideration items, then generates a single execution * element. A given fulfillment can be applied to as many offer and * consideration items as desired, but must contain at least one offer and * at least one consideration that match. The fulfillment must also remain * consistent on all key parameters across all offer items (same offerer, * token, type, tokenId, and conduit preference) as well as across all * consideration items (token, type, tokenId, and recipient). */ struct Fulfillment { FulfillmentComponent[] offerComponents; FulfillmentComponent[] considerationComponents; } /** * @dev Each fulfillment component contains one index referencing a specific * order and another referencing a specific offer or consideration item. */ struct FulfillmentComponent { uint256 orderIndex; uint256 itemIndex; } /** * @dev An execution is triggered once all consideration items have been zeroed * out. It sends the item in question from the offerer to the item's * recipient, optionally sourcing approvals from either this contract * directly or from the offerer's chosen conduit if one is specified. An * execution is not provided as an argument, but rather is derived via * orders, criteria resolvers, and fulfillments (where the total number of * executions will be less than or equal to the total number of indicated * fulfillments) and returned as part of `matchOrders`. */ struct Execution { ReceivedItem item; address offerer; bytes32 conduitKey; } /** * @dev Restricted orders are validated post-execution by calling validateOrder * on the zone. This struct provides context about the order fulfillment * and any supplied extraData, as well as all order hashes fulfilled in a * call to a match or fulfillAvailable method. */ struct ZoneParameters { bytes32 orderHash; address fulfiller; address offerer; SpentItem[] offer; ReceivedItem[] consideration; bytes extraData; bytes32[] orderHashes; uint256 startTime; uint256 endTime; bytes32 zoneHash; } /** * @dev Zones and contract offerers can communicate which schemas they implement * along with any associated metadata related to each schema. */ struct Schema { uint256 id; bytes metadata; } using StructPointers for OrderComponents global; using StructPointers for OfferItem global; using StructPointers for ConsiderationItem global; using StructPointers for SpentItem global; using StructPointers for ReceivedItem global; using StructPointers for BasicOrderParameters global; using StructPointers for AdditionalRecipient global; using StructPointers for OrderParameters global; using StructPointers for Order global; using StructPointers for AdvancedOrder global; using StructPointers for OrderStatus global; using StructPointers for CriteriaResolver global; using StructPointers for Fulfillment global; using StructPointers for FulfillmentComponent global; using StructPointers for Execution global; using StructPointers for ZoneParameters global; /** * @dev This library provides a set of functions for converting structs to * pointers. */ library StructPointers { /** * @dev Get a MemoryPointer from OrderComponents. * * @param obj The OrderComponents object. * * @return ptr The MemoryPointer. */ function toMemoryPointer(OrderComponents memory obj) internal pure returns (MemoryPointer ptr) { assembly { ptr := obj } } /** * @dev Get a CalldataPointer from OrderComponents. * * @param obj The OrderComponents object. * * @return ptr The CalldataPointer. */ function toCalldataPointer(OrderComponents calldata obj) internal pure returns (CalldataPointer ptr) { assembly { ptr := obj } } /** * @dev Get a MemoryPointer from OfferItem. * * @param obj The OfferItem object. * * @return ptr The MemoryPointer. */ function toMemoryPointer(OfferItem memory obj) internal pure returns (MemoryPointer ptr) { assembly { ptr := obj } } /** * @dev Get a CalldataPointer from OfferItem. * * @param obj The OfferItem object. * * @return ptr The CalldataPointer. */ function toCalldataPointer(OfferItem calldata obj) internal pure returns (CalldataPointer ptr) { assembly { ptr := obj } } /** * @dev Get a MemoryPointer from ConsiderationItem. * * @param obj The ConsiderationItem object. * * @return ptr The MemoryPointer. */ function toMemoryPointer(ConsiderationItem memory obj) internal pure returns (MemoryPointer ptr) { assembly { ptr := obj } } /** * @dev Get a CalldataPointer from ConsiderationItem. * * @param obj The ConsiderationItem object. * * @return ptr The CalldataPointer. */ function toCalldataPointer(ConsiderationItem calldata obj) internal pure returns (CalldataPointer ptr) { assembly { ptr := obj } } /** * @dev Get a MemoryPointer from SpentItem. * * @param obj The SpentItem object. * * @return ptr The MemoryPointer. */ function toMemoryPointer(SpentItem memory obj) internal pure returns (MemoryPointer ptr) { assembly { ptr := obj } } /** * @dev Get a CalldataPointer from SpentItem. * * @param obj The SpentItem object. * * @return ptr The CalldataPointer. */ function toCalldataPointer(SpentItem calldata obj) internal pure returns (CalldataPointer ptr) { assembly { ptr := obj } } /** * @dev Get a MemoryPointer from ReceivedItem. * * @param obj The ReceivedItem object. * * @return ptr The MemoryPointer. */ function toMemoryPointer(ReceivedItem memory obj) internal pure returns (MemoryPointer ptr) { assembly { ptr := obj } } /** * @dev Get a CalldataPointer from ReceivedItem. * * @param obj The ReceivedItem object. * * @return ptr The CalldataPointer. */ function toCalldataPointer(ReceivedItem calldata obj) internal pure returns (CalldataPointer ptr) { assembly { ptr := obj } } /** * @dev Get a MemoryPointer from BasicOrderParameters. * * @param obj The BasicOrderParameters object. * * @return ptr The MemoryPointer. */ function toMemoryPointer(BasicOrderParameters memory obj) internal pure returns (MemoryPointer ptr) { assembly { ptr := obj } } /** * @dev Get a CalldataPointer from BasicOrderParameters. * * @param obj The BasicOrderParameters object. * * @return ptr The CalldataPointer. */ function toCalldataPointer(BasicOrderParameters calldata obj) internal pure returns (CalldataPointer ptr) { assembly { ptr := obj } } /** * @dev Get a MemoryPointer from AdditionalRecipient. * * @param obj The AdditionalRecipient object. * * @return ptr The MemoryPointer. */ function toMemoryPointer(AdditionalRecipient memory obj) internal pure returns (MemoryPointer ptr) { assembly { ptr := obj } } /** * @dev Get a CalldataPointer from AdditionalRecipient. * * @param obj The AdditionalRecipient object. * * @return ptr The CalldataPointer. */ function toCalldataPointer(AdditionalRecipient calldata obj) internal pure returns (CalldataPointer ptr) { assembly { ptr := obj } } /** * @dev Get a MemoryPointer from OrderParameters. * * @param obj The OrderParameters object. * * @return ptr The MemoryPointer. */ function toMemoryPointer(OrderParameters memory obj) internal pure returns (MemoryPointer ptr) { assembly { ptr := obj } } /** * @dev Get a CalldataPointer from OrderParameters. * * @param obj The OrderParameters object. * * @return ptr The CalldataPointer. */ function toCalldataPointer(OrderParameters calldata obj) internal pure returns (CalldataPointer ptr) { assembly { ptr := obj } } /** * @dev Get a MemoryPointer from Order. * * @param obj The Order object. * * @return ptr The MemoryPointer. */ function toMemoryPointer(Order memory obj) internal pure returns (MemoryPointer ptr) { assembly { ptr := obj } } /** * @dev Get a CalldataPointer from Order. * * @param obj The Order object. * * @return ptr The CalldataPointer. */ function toCalldataPointer(Order calldata obj) internal pure returns (CalldataPointer ptr) { assembly { ptr := obj } } /** * @dev Get a MemoryPointer from AdvancedOrder. * * @param obj The AdvancedOrder object. * * @return ptr The MemoryPointer. */ function toMemoryPointer(AdvancedOrder memory obj) internal pure returns (MemoryPointer ptr) { assembly { ptr := obj } } /** * @dev Get a CalldataPointer from AdvancedOrder. * * @param obj The AdvancedOrder object. * * @return ptr The CalldataPointer. */ function toCalldataPointer(AdvancedOrder calldata obj) internal pure returns (CalldataPointer ptr) { assembly { ptr := obj } } /** * @dev Get a MemoryPointer from OrderStatus. * * @param obj The OrderStatus object. * * @return ptr The MemoryPointer. */ function toMemoryPointer(OrderStatus memory obj) internal pure returns (MemoryPointer ptr) { assembly { ptr := obj } } /** * @dev Get a CalldataPointer from OrderStatus. * * @param obj The OrderStatus object. * * @return ptr The CalldataPointer. */ function toCalldataPointer(OrderStatus calldata obj) internal pure returns (CalldataPointer ptr) { assembly { ptr := obj } } /** * @dev Get a MemoryPointer from CriteriaResolver. * * @param obj The CriteriaResolver object. * * @return ptr The MemoryPointer. */ function toMemoryPointer(CriteriaResolver memory obj) internal pure returns (MemoryPointer ptr) { assembly { ptr := obj } } /** * @dev Get a CalldataPointer from CriteriaResolver. * * @param obj The CriteriaResolver object. * * @return ptr The CalldataPointer. */ function toCalldataPointer(CriteriaResolver calldata obj) internal pure returns (CalldataPointer ptr) { assembly { ptr := obj } } /** * @dev Get a MemoryPointer from Fulfillment. * * @param obj The Fulfillment object. * * @return ptr The MemoryPointer. */ function toMemoryPointer(Fulfillment memory obj) internal pure returns (MemoryPointer ptr) { assembly { ptr := obj } } /** * @dev Get a CalldataPointer from Fulfillment. * * @param obj The Fulfillment object. * * @return ptr The CalldataPointer. */ function toCalldataPointer(Fulfillment calldata obj) internal pure returns (CalldataPointer ptr) { assembly { ptr := obj } } /** * @dev Get a MemoryPointer from FulfillmentComponent. * * @param obj The FulfillmentComponent object. * * @return ptr The MemoryPointer. */ function toMemoryPointer(FulfillmentComponent memory obj) internal pure returns (MemoryPointer ptr) { assembly { ptr := obj } } /** * @dev Get a CalldataPointer from FulfillmentComponent. * * @param obj The FulfillmentComponent object. * * @return ptr The CalldataPointer. */ function toCalldataPointer(FulfillmentComponent calldata obj) internal pure returns (CalldataPointer ptr) { assembly { ptr := obj } } /** * @dev Get a MemoryPointer from Execution. * * @param obj The Execution object. * * @return ptr The MemoryPointer. */ function toMemoryPointer(Execution memory obj) internal pure returns (MemoryPointer ptr) { assembly { ptr := obj } } /** * @dev Get a CalldataPointer from Execution. * * @param obj The Execution object. * * @return ptr The CalldataPointer. */ function toCalldataPointer(Execution calldata obj) internal pure returns (CalldataPointer ptr) { assembly { ptr := obj } } /** * @dev Get a MemoryPointer from ZoneParameters. * * @param obj The ZoneParameters object. * * @return ptr The MemoryPointer. */ function toMemoryPointer(ZoneParameters memory obj) internal pure returns (MemoryPointer ptr) { assembly { ptr := obj } } /** * @dev Get a CalldataPointer from ZoneParameters. * * @param obj The ZoneParameters object. * * @return ptr The CalldataPointer. */ function toCalldataPointer(ZoneParameters calldata obj) internal pure returns (CalldataPointer ptr) { assembly { ptr := obj } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import { ZoneInterface } from "seaport-types/src/interfaces/ZoneInterface.sol"; interface LocalZoneInterface is ZoneInterface { }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.24; /** * @notice SignedZoneEventsAndErrors contains errors and events * related to zone interaction. */ interface SignedZoneEventsAndErrors { /** * @dev Emit an event when a new signer is added. */ event SignerAdded(address signer); /** * @dev Emit an event when a signer is removed. */ event SignerRemoved(address signer); /** * @dev Revert with an error when the signature has expired. */ error SignatureExpired(uint256 expiration, bytes32 orderHash); /** * @dev Revert with an error when the caller is not seaport. */ error CallerNotSeaport(); /** * @dev Revert with an error when attempting to update the signers of a * the zone from a caller that is not the zone's controller. */ error InvalidController(); /** * @dev Revert with an error if supplied order extraData is an invalid * length. */ error InvalidExtraDataLength(bytes32 orderHash); /** * @dev Revert with an error if the supplied order extraData does not * support the zone's SIP6 version. */ error InvalidSIP6Version(bytes32 orderHash); /** * @dev Revert with an error if the supplied order extraData does not * support the zone's substandard requirements. */ error InvalidSubstandardSupport( string reason, uint256 substandardVersion, bytes32 orderHash ); /** * @dev Revert with an error if the supplied order extraData does not * support the zone's substandard version. */ error InvalidSubstandardVersion(bytes32 orderHash); /** * @dev Revert with an error if the fulfiller does not match. */ error InvalidFulfiller( address expectedFulfiller, address actualFulfiller, bytes32 orderHash ); /** * @dev Revert with an error if the received item does not match. */ error InvalidReceivedItem( uint256 expectedReceivedIdentifier, uint256 actualReceievedIdentifier, bytes32 orderHash ); /** * @dev Revert with an error if the zone parameter encoding is invalid. */ error InvalidZoneParameterEncoding(); /** * @dev Revert with an error when an order is signed with a signer * that is not active. */ error SignerNotActive(address signer, bytes32 orderHash); /** * @dev Revert when an unsupported function selector is found. */ error UnsupportedFunctionSelector(); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.24; import { Schema } from "../../../types/lib/ConsiderationStructs.sol"; /** * @dev SIP-5: Contract Metadata Interface for Seaport Contracts * https://github.com/ProjectOpenSea/SIPs/blob/main/SIPS/sip-5.md */ interface SIP5Interface { /** * @dev An event that is emitted when a SIP-5 compatible contract is deployed. */ event SeaportCompatibleContractDeployed(); /** * @dev Returns Seaport metadata for this contract, returning the * contract name and supported schemas. * * @return name The contract name * @return schemas The supported SIPs */ function getSeaportMetadata() external view returns (string memory name, Schema[] memory schemas); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.24; /** * @title SignedZoneControllerInterface * @author BCLeFevre * @notice SignedZoneControllerInterface enables the deploying of SignedZones. * SignedZones are an implementation of SIP-7 that requires orders * to be signed by an approved signer. * https://github.com/ProjectOpenSea/SIPs/blob/main/SIPS/sip-7.md * */ interface SignedZoneControllerInterface { /** * @notice Returns the active signers for the zone. * * @param signedZone The signed zone to get the active signers for. * * @return signers The active signers. */ function getActiveSigners( address signedZone ) external view returns (address[] memory signers); /** * @notice Returns additional information about the zone. * * @param zone The zone to get the additional information for. * * @return domainSeparator The domain separator used for signing. * @return zoneName The name of the zone. * @return apiEndpoint The API endpoint for the zone. * @return substandards The substandards supported by the zone. * @return documentationURI The documentation URI for the zone. */ function getAdditionalZoneInformation( address zone ) external view returns ( bytes32 domainSeparator, string memory zoneName, string memory apiEndpoint, uint256[] memory substandards, string memory documentationURI ); /** * @notice Update the API endpoint returned by the supplied zone. * Only the owner or an active signer can call this function. * * @param signedZone The signed zone to update the API endpoint for. * @param newApiEndpoint The new API endpoint. */ function updateAPIEndpoint( address signedZone, string calldata newApiEndpoint ) external; /** * @notice Update the documentationURI returned by a zone. * Only the owner or an active signer of the supplied zone can call * this function. * * @param zone The signed zone to update the API endpoint for. * @param documentationURI The new documentation URI. */ function updateDocumentationURI( address zone, string calldata documentationURI ) external; /** * @notice Update the signer for a given signed zone. * * @param signedZone The signed zone to update the signer for. * @param signer The signer to update. * @param active If the signer should be active or not. */ function updateSigner( address signedZone, address signer, bool active ) external; /** * @notice Initiate zone ownership transfer by assigning a new potential * owner for the given zone. Once set, the new potential owner * may call `acceptOwnership` to claim ownership of the zone. * Only the owner of the zone in question may call this function. * * @param zone The zone for which to initiate ownership * transfer. * @param newPotentialOwner The new potential owner of the zone. */ function transferOwnership( address zone, address newPotentialOwner ) external; /** * @notice Clear the currently set potential owner, if any, from a zone. * Only the owner of the zone in question may call this function. * * @param zone The zone for which to cancel ownership transfer. */ function cancelOwnershipTransfer(address zone) external; /** * @notice Accept ownership of a supplied zone. Only accounts that the * current owner has set as the new potential owner may call this * function. * * @param zone The zone for which to accept ownership. */ function acceptOwnership(address zone) external; /** * @notice Retrieve the current owner of a deployed zone. * * @param zone The zone for which to retrieve the associated owner. * * @return owner The owner of the supplied zone. */ function ownerOf(address zone) external view returns (address owner); /** * @notice Retrieve the potential owner, if any, for a given zone. The * current owner may set a new potential owner via * `transferOwnership` and that owner may then accept ownership of * the zone in question via `acceptOwnership`. * * @param zone The zone for which to retrieve the potential owner. * * @return potentialOwner The potential owner, if any, for the zone. */ function getPotentialOwner( address zone ) external view returns (address potentialOwner); /** * @notice Returns whether or not the supplied address is an active signer * for the supplied zone. * * @param zone The zone to check if the supplied address is an active * signer for. * @param signer The address to check if it is an active signer for * * @return active If the supplied address is an active signer for the * supplied zone. */ function isActiveSigner( address zone, address signer ) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; enum ListTypes { AuthorizerList, OperatorList } /// @title IAuthorizedTransferSecurityRegistry /// @dev Interface for the Authorized Transfer Security Registry, a simplified version of the Transfer /// Security Registry that only supports authorizers and whitelisted operators, and assumes a /// security level of OperatorWhitelistEnableOTC + authorizers for all collections that use it. /// Note that a number of view functions on collections that add this validator will not work. interface IAuthorizedTransferSecurityRegistry { event CreatedList(uint256 indexed id, string name); event AppliedListToCollection(address indexed collection, uint120 indexed id); event ReassignedListOwnership(uint256 indexed id, address indexed newOwner); event AddedAccountToList(ListTypes indexed kind, uint256 indexed id, address indexed account); event RemovedAccountFromList(ListTypes indexed kind, uint256 indexed id, address indexed account); error AuthorizedTransferSecurityRegistry__ListDoesNotExist(); error AuthorizedTransferSecurityRegistry__CallerDoesNotOwnList(); error AuthorizedTransferSecurityRegistry__ArrayLengthCannotBeZero(); error AuthorizedTransferSecurityRegistry__CallerMustHaveElevatedPermissionsForSpecifiedNFT(); error AuthorizedTransferSecurityRegistry__ListOwnershipCannotBeTransferredToZeroAddress(); error AuthorizedTransferSecurityRegistry__ZeroAddressNotAllowed(); error AuthorizedTransferSecurityRegistry__UnauthorizedTransfer(); error AuthorizedTransferSecurityRegistry__CallerIsNotValidAuthorizer(); /// Manage lists of authorizers & operators that can be applied to collections function createList(string calldata name) external returns (uint120); function createListCopy(string calldata name, uint120 sourceListId) external returns (uint120); function reassignOwnershipOfList(uint120 id, address newOwner) external; function renounceOwnershipOfList(uint120 id) external; function applyListToCollection(address collection, uint120 id) external; function listOwners(uint120 id) external view returns (address); /// Manage and query for authorizers on lists function addAuthorizers(uint120 id, address[] calldata accounts) external; function removeAuthorizers(uint120 id, address[] calldata accounts) external; function getAuthorizers(uint120 id) external view returns (address[] memory); function isAuthorizer(uint120 id, address account) external view returns (bool); function getAuthorizersByCollection(address collection) external view returns (address[] memory); function isAuthorizerByCollection(address collection, address account) external view returns (bool); /// Manage and query for operators on lists function addOperators(uint120 id, address[] calldata accounts) external; function removeOperators(uint120 id, address[] calldata accounts) external; function getOperators(uint120 id) external view returns (address[] memory); function isOperator(uint120 id, address account) external view returns (bool); function getOperatorsByCollection(address collection) external view returns (address[] memory); function isOperatorByCollection(address collection, address account) external view returns (bool); /// Ensure that a specific operator has been authorized to transfer tokens function validateTransfer(address caller, address from, address to) external view; /// Ensure that a transfer has been authorized for a specific tokenId function validateTransfer(address caller, address from, address to, uint256 tokenId) external view; /// Ensure that a transfer has been authorized for a specific amount of a specific tokenId, and /// reduce the transferable amount remaining function validateTransfer(address caller, address from, address to, uint256 tokenId, uint256 amount) external; /// Legacy alias for validateTransfer (address caller, address from, address to) function applyCollectionTransferPolicy(address caller, address from, address to) external view; /// Temporarily assign a specific allowed operator for a given collection function beforeAuthorizedTransfer(address operator, address token) external; /// Clear assignment of a specific allowed operator for a given collection function afterAuthorizedTransfer(address token) external; /// Temporarily allow a specific tokenId from a given collection to be transferred function beforeAuthorizedTransfer(address token, uint256 tokenId) external; /// Clear assignment of an specific tokenId's transfer allowance function afterAuthorizedTransfer(address token, uint256 tokenId) external; /// Temporarily allow a specific amount of a specific tokenId from a given collection to be transferred function beforeAuthorizedTransferWithAmount(address token, uint256 tokenId, uint256 amount) external; /// Clear assignment of a tokenId's transfer allowance for a specific amount function afterAuthorizedTransferWithAmount(address token, uint256 tokenId) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; enum OrderType // 0: no partial fills, anyone can execute { FULL_OPEN, // 1: partial fills supported, anyone can execute PARTIAL_OPEN, // 2: no partial fills, only offerer or zone can execute FULL_RESTRICTED, // 3: partial fills supported, only offerer or zone can execute PARTIAL_RESTRICTED, // 4: contract order type CONTRACT } enum BasicOrderType // 0: no partial fills, anyone can execute { ETH_TO_ERC721_FULL_OPEN, // 1: partial fills supported, anyone can execute ETH_TO_ERC721_PARTIAL_OPEN, // 2: no partial fills, only offerer or zone can execute ETH_TO_ERC721_FULL_RESTRICTED, // 3: partial fills supported, only offerer or zone can execute ETH_TO_ERC721_PARTIAL_RESTRICTED, // 4: no partial fills, anyone can execute ETH_TO_ERC1155_FULL_OPEN, // 5: partial fills supported, anyone can execute ETH_TO_ERC1155_PARTIAL_OPEN, // 6: no partial fills, only offerer or zone can execute ETH_TO_ERC1155_FULL_RESTRICTED, // 7: partial fills supported, only offerer or zone can execute ETH_TO_ERC1155_PARTIAL_RESTRICTED, // 8: no partial fills, anyone can execute ERC20_TO_ERC721_FULL_OPEN, // 9: partial fills supported, anyone can execute ERC20_TO_ERC721_PARTIAL_OPEN, // 10: no partial fills, only offerer or zone can execute ERC20_TO_ERC721_FULL_RESTRICTED, // 11: partial fills supported, only offerer or zone can execute ERC20_TO_ERC721_PARTIAL_RESTRICTED, // 12: no partial fills, anyone can execute ERC20_TO_ERC1155_FULL_OPEN, // 13: partial fills supported, anyone can execute ERC20_TO_ERC1155_PARTIAL_OPEN, // 14: no partial fills, only offerer or zone can execute ERC20_TO_ERC1155_FULL_RESTRICTED, // 15: partial fills supported, only offerer or zone can execute ERC20_TO_ERC1155_PARTIAL_RESTRICTED, // 16: no partial fills, anyone can execute ERC721_TO_ERC20_FULL_OPEN, // 17: partial fills supported, anyone can execute ERC721_TO_ERC20_PARTIAL_OPEN, // 18: no partial fills, only offerer or zone can execute ERC721_TO_ERC20_FULL_RESTRICTED, // 19: partial fills supported, only offerer or zone can execute ERC721_TO_ERC20_PARTIAL_RESTRICTED, // 20: no partial fills, anyone can execute ERC1155_TO_ERC20_FULL_OPEN, // 21: partial fills supported, anyone can execute ERC1155_TO_ERC20_PARTIAL_OPEN, // 22: no partial fills, only offerer or zone can execute ERC1155_TO_ERC20_FULL_RESTRICTED, // 23: partial fills supported, only offerer or zone can execute ERC1155_TO_ERC20_PARTIAL_RESTRICTED } enum BasicOrderRouteType // 0: provide Ether (or other native token) to receive offered ERC721 item. { ETH_TO_ERC721, // 1: provide Ether (or other native token) to receive offered ERC1155 item. ETH_TO_ERC1155, // 2: provide ERC20 item to receive offered ERC721 item. ERC20_TO_ERC721, // 3: provide ERC20 item to receive offered ERC1155 item. ERC20_TO_ERC1155, // 4: provide ERC721 item to receive offered ERC20 item. ERC721_TO_ERC20, // 5: provide ERC1155 item to receive offered ERC20 item. ERC1155_TO_ERC20 } enum ItemType // 0: ETH on mainnet, MATIC on polygon, etc. { NATIVE, // 1: ERC20 items (ERC777 and ERC20 analogues could also technically work) ERC20, // 2: ERC721 items ERC721, // 3: ERC1155 items ERC1155, // 4: ERC721 items where a number of tokenIds are supported ERC721_WITH_CRITERIA, // 5: ERC1155 items where a number of ids are supported ERC1155_WITH_CRITERIA } enum Side // 0: Items that can be spent { OFFER, // 1: Items that must be received CONSIDERATION }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; type CalldataPointer is uint256; type ReturndataPointer is uint256; type MemoryPointer is uint256; using CalldataPointerLib for CalldataPointer global; using MemoryPointerLib for MemoryPointer global; using ReturndataPointerLib for ReturndataPointer global; using CalldataReaders for CalldataPointer global; using ReturndataReaders for ReturndataPointer global; using MemoryReaders for MemoryPointer global; using MemoryWriters for MemoryPointer global; CalldataPointer constant CalldataStart = CalldataPointer.wrap(0x04); MemoryPointer constant FreeMemoryPPtr = MemoryPointer.wrap(0x40); MemoryPointer constant ZeroSlotPtr = MemoryPointer.wrap(0x60); uint256 constant IdentityPrecompileAddress = 0x4; uint256 constant OffsetOrLengthMask = 0xffffffff; uint256 constant _OneWord = 0x20; uint256 constant _FreeMemoryPointerSlot = 0x40; /// @dev Allocates `size` bytes in memory by increasing the free memory pointer /// and returns the memory pointer to the first byte of the allocated region. // (Free functions cannot have visibility.) // solhint-disable-next-line func-visibility function malloc(uint256 size) pure returns (MemoryPointer mPtr) { assembly { mPtr := mload(_FreeMemoryPointerSlot) mstore(_FreeMemoryPointerSlot, add(mPtr, size)) } } // (Free functions cannot have visibility.) // solhint-disable-next-line func-visibility function getFreeMemoryPointer() pure returns (MemoryPointer mPtr) { mPtr = FreeMemoryPPtr.readMemoryPointer(); } // (Free functions cannot have visibility.) // solhint-disable-next-line func-visibility function setFreeMemoryPointer(MemoryPointer mPtr) pure { FreeMemoryPPtr.write(mPtr); } library CalldataPointerLib { function lt(CalldataPointer a, CalldataPointer b) internal pure returns (bool c) { assembly { c := lt(a, b) } } function gt(CalldataPointer a, CalldataPointer b) internal pure returns (bool c) { assembly { c := gt(a, b) } } function eq(CalldataPointer a, CalldataPointer b) internal pure returns (bool c) { assembly { c := eq(a, b) } } function isNull(CalldataPointer a) internal pure returns (bool b) { assembly { b := iszero(a) } } /// @dev Resolves an offset stored at `cdPtr + headOffset` to a calldata. /// pointer `cdPtr` must point to some parent object with a dynamic /// type's head stored at `cdPtr + headOffset`. function pptrOffset(CalldataPointer cdPtr, uint256 headOffset) internal pure returns (CalldataPointer cdPtrChild) { cdPtrChild = cdPtr.offset( cdPtr.offset(headOffset).readUint256() & OffsetOrLengthMask ); } /// @dev Resolves an offset stored at `cdPtr` to a calldata pointer. /// `cdPtr` must point to some parent object with a dynamic type as its /// first member, e.g. `struct { bytes data; }` function pptr(CalldataPointer cdPtr) internal pure returns (CalldataPointer cdPtrChild) { cdPtrChild = cdPtr.offset(cdPtr.readUint256() & OffsetOrLengthMask); } /// @dev Returns the calldata pointer one word after `cdPtr`. function next(CalldataPointer cdPtr) internal pure returns (CalldataPointer cdPtrNext) { assembly { cdPtrNext := add(cdPtr, _OneWord) } } /// @dev Returns the calldata pointer `_offset` bytes after `cdPtr`. function offset(CalldataPointer cdPtr, uint256 _offset) internal pure returns (CalldataPointer cdPtrNext) { assembly { cdPtrNext := add(cdPtr, _offset) } } /// @dev Copies `size` bytes from calldata starting at `src` to memory at /// `dst`. function copy(CalldataPointer src, MemoryPointer dst, uint256 size) internal pure { assembly { calldatacopy(dst, src, size) } } } library ReturndataPointerLib { function lt(ReturndataPointer a, ReturndataPointer b) internal pure returns (bool c) { assembly { c := lt(a, b) } } function gt(ReturndataPointer a, ReturndataPointer b) internal pure returns (bool c) { assembly { c := gt(a, b) } } function eq(ReturndataPointer a, ReturndataPointer b) internal pure returns (bool c) { assembly { c := eq(a, b) } } function isNull(ReturndataPointer a) internal pure returns (bool b) { assembly { b := iszero(a) } } /// @dev Resolves an offset stored at `rdPtr + headOffset` to a returndata /// pointer. `rdPtr` must point to some parent object with a dynamic /// type's head stored at `rdPtr + headOffset`. function pptrOffset(ReturndataPointer rdPtr, uint256 headOffset) internal pure returns (ReturndataPointer rdPtrChild) { rdPtrChild = rdPtr.offset( rdPtr.offset(headOffset).readUint256() & OffsetOrLengthMask ); } /// @dev Resolves an offset stored at `rdPtr` to a returndata pointer. /// `rdPtr` must point to some parent object with a dynamic type as its /// first member, e.g. `struct { bytes data; }` function pptr(ReturndataPointer rdPtr) internal pure returns (ReturndataPointer rdPtrChild) { rdPtrChild = rdPtr.offset(rdPtr.readUint256() & OffsetOrLengthMask); } /// @dev Returns the returndata pointer one word after `cdPtr`. function next(ReturndataPointer rdPtr) internal pure returns (ReturndataPointer rdPtrNext) { assembly { rdPtrNext := add(rdPtr, _OneWord) } } /// @dev Returns the returndata pointer `_offset` bytes after `cdPtr`. function offset(ReturndataPointer rdPtr, uint256 _offset) internal pure returns (ReturndataPointer rdPtrNext) { assembly { rdPtrNext := add(rdPtr, _offset) } } /// @dev Copies `size` bytes from returndata starting at `src` to memory at /// `dst`. function copy(ReturndataPointer src, MemoryPointer dst, uint256 size) internal pure { assembly { returndatacopy(dst, src, size) } } } library MemoryPointerLib { function copy(MemoryPointer src, MemoryPointer dst, uint256 size) internal view { assembly { let success := staticcall(gas(), IdentityPrecompileAddress, src, size, dst, size) if or(iszero(returndatasize()), iszero(success)) { revert(0, 0) } } } function lt(MemoryPointer a, MemoryPointer b) internal pure returns (bool c) { assembly { c := lt(a, b) } } function gt(MemoryPointer a, MemoryPointer b) internal pure returns (bool c) { assembly { c := gt(a, b) } } function eq(MemoryPointer a, MemoryPointer b) internal pure returns (bool c) { assembly { c := eq(a, b) } } function isNull(MemoryPointer a) internal pure returns (bool b) { assembly { b := iszero(a) } } function hash(MemoryPointer ptr, uint256 length) internal pure returns (bytes32 _hash) { assembly { _hash := keccak256(ptr, length) } } /// @dev Returns the memory pointer one word after `mPtr`. function next(MemoryPointer mPtr) internal pure returns (MemoryPointer mPtrNext) { assembly { mPtrNext := add(mPtr, _OneWord) } } /// @dev Returns the memory pointer `_offset` bytes after `mPtr`. function offset(MemoryPointer mPtr, uint256 _offset) internal pure returns (MemoryPointer mPtrNext) { assembly { mPtrNext := add(mPtr, _offset) } } /// @dev Resolves a pointer at `mPtr + headOffset` to a memory /// pointer. `mPtr` must point to some parent object with a dynamic /// type's pointer stored at `mPtr + headOffset`. function pptrOffset(MemoryPointer mPtr, uint256 headOffset) internal pure returns (MemoryPointer mPtrChild) { mPtrChild = mPtr.offset(headOffset).readMemoryPointer(); } /// @dev Resolves a pointer stored at `mPtr` to a memory pointer. /// `mPtr` must point to some parent object with a dynamic type as its /// first member, e.g. `struct { bytes data; }` function pptr(MemoryPointer mPtr) internal pure returns (MemoryPointer mPtrChild) { mPtrChild = mPtr.readMemoryPointer(); } } library CalldataReaders { /// @dev Reads the value at `cdPtr` and applies a mask to return only the /// last 4 bytes. function readMaskedUint256(CalldataPointer cdPtr) internal pure returns (uint256 value) { value = cdPtr.readUint256() & OffsetOrLengthMask; } /// @dev Reads the bool at `cdPtr` in calldata. function readBool(CalldataPointer cdPtr) internal pure returns (bool value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the address at `cdPtr` in calldata. function readAddress(CalldataPointer cdPtr) internal pure returns (address value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the bytes1 at `cdPtr` in calldata. function readBytes1(CalldataPointer cdPtr) internal pure returns (bytes1 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the bytes2 at `cdPtr` in calldata. function readBytes2(CalldataPointer cdPtr) internal pure returns (bytes2 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the bytes3 at `cdPtr` in calldata. function readBytes3(CalldataPointer cdPtr) internal pure returns (bytes3 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the bytes4 at `cdPtr` in calldata. function readBytes4(CalldataPointer cdPtr) internal pure returns (bytes4 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the bytes5 at `cdPtr` in calldata. function readBytes5(CalldataPointer cdPtr) internal pure returns (bytes5 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the bytes6 at `cdPtr` in calldata. function readBytes6(CalldataPointer cdPtr) internal pure returns (bytes6 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the bytes7 at `cdPtr` in calldata. function readBytes7(CalldataPointer cdPtr) internal pure returns (bytes7 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the bytes8 at `cdPtr` in calldata. function readBytes8(CalldataPointer cdPtr) internal pure returns (bytes8 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the bytes9 at `cdPtr` in calldata. function readBytes9(CalldataPointer cdPtr) internal pure returns (bytes9 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the bytes10 at `cdPtr` in calldata. function readBytes10(CalldataPointer cdPtr) internal pure returns (bytes10 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the bytes11 at `cdPtr` in calldata. function readBytes11(CalldataPointer cdPtr) internal pure returns (bytes11 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the bytes12 at `cdPtr` in calldata. function readBytes12(CalldataPointer cdPtr) internal pure returns (bytes12 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the bytes13 at `cdPtr` in calldata. function readBytes13(CalldataPointer cdPtr) internal pure returns (bytes13 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the bytes14 at `cdPtr` in calldata. function readBytes14(CalldataPointer cdPtr) internal pure returns (bytes14 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the bytes15 at `cdPtr` in calldata. function readBytes15(CalldataPointer cdPtr) internal pure returns (bytes15 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the bytes16 at `cdPtr` in calldata. function readBytes16(CalldataPointer cdPtr) internal pure returns (bytes16 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the bytes17 at `cdPtr` in calldata. function readBytes17(CalldataPointer cdPtr) internal pure returns (bytes17 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the bytes18 at `cdPtr` in calldata. function readBytes18(CalldataPointer cdPtr) internal pure returns (bytes18 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the bytes19 at `cdPtr` in calldata. function readBytes19(CalldataPointer cdPtr) internal pure returns (bytes19 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the bytes20 at `cdPtr` in calldata. function readBytes20(CalldataPointer cdPtr) internal pure returns (bytes20 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the bytes21 at `cdPtr` in calldata. function readBytes21(CalldataPointer cdPtr) internal pure returns (bytes21 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the bytes22 at `cdPtr` in calldata. function readBytes22(CalldataPointer cdPtr) internal pure returns (bytes22 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the bytes23 at `cdPtr` in calldata. function readBytes23(CalldataPointer cdPtr) internal pure returns (bytes23 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the bytes24 at `cdPtr` in calldata. function readBytes24(CalldataPointer cdPtr) internal pure returns (bytes24 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the bytes25 at `cdPtr` in calldata. function readBytes25(CalldataPointer cdPtr) internal pure returns (bytes25 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the bytes26 at `cdPtr` in calldata. function readBytes26(CalldataPointer cdPtr) internal pure returns (bytes26 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the bytes27 at `cdPtr` in calldata. function readBytes27(CalldataPointer cdPtr) internal pure returns (bytes27 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the bytes28 at `cdPtr` in calldata. function readBytes28(CalldataPointer cdPtr) internal pure returns (bytes28 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the bytes29 at `cdPtr` in calldata. function readBytes29(CalldataPointer cdPtr) internal pure returns (bytes29 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the bytes30 at `cdPtr` in calldata. function readBytes30(CalldataPointer cdPtr) internal pure returns (bytes30 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the bytes31 at `cdPtr` in calldata. function readBytes31(CalldataPointer cdPtr) internal pure returns (bytes31 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the bytes32 at `cdPtr` in calldata. function readBytes32(CalldataPointer cdPtr) internal pure returns (bytes32 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the uint8 at `cdPtr` in calldata. function readUint8(CalldataPointer cdPtr) internal pure returns (uint8 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the uint16 at `cdPtr` in calldata. function readUint16(CalldataPointer cdPtr) internal pure returns (uint16 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the uint24 at `cdPtr` in calldata. function readUint24(CalldataPointer cdPtr) internal pure returns (uint24 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the uint32 at `cdPtr` in calldata. function readUint32(CalldataPointer cdPtr) internal pure returns (uint32 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the uint40 at `cdPtr` in calldata. function readUint40(CalldataPointer cdPtr) internal pure returns (uint40 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the uint48 at `cdPtr` in calldata. function readUint48(CalldataPointer cdPtr) internal pure returns (uint48 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the uint56 at `cdPtr` in calldata. function readUint56(CalldataPointer cdPtr) internal pure returns (uint56 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the uint64 at `cdPtr` in calldata. function readUint64(CalldataPointer cdPtr) internal pure returns (uint64 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the uint72 at `cdPtr` in calldata. function readUint72(CalldataPointer cdPtr) internal pure returns (uint72 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the uint80 at `cdPtr` in calldata. function readUint80(CalldataPointer cdPtr) internal pure returns (uint80 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the uint88 at `cdPtr` in calldata. function readUint88(CalldataPointer cdPtr) internal pure returns (uint88 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the uint96 at `cdPtr` in calldata. function readUint96(CalldataPointer cdPtr) internal pure returns (uint96 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the uint104 at `cdPtr` in calldata. function readUint104(CalldataPointer cdPtr) internal pure returns (uint104 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the uint112 at `cdPtr` in calldata. function readUint112(CalldataPointer cdPtr) internal pure returns (uint112 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the uint120 at `cdPtr` in calldata. function readUint120(CalldataPointer cdPtr) internal pure returns (uint120 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the uint128 at `cdPtr` in calldata. function readUint128(CalldataPointer cdPtr) internal pure returns (uint128 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the uint136 at `cdPtr` in calldata. function readUint136(CalldataPointer cdPtr) internal pure returns (uint136 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the uint144 at `cdPtr` in calldata. function readUint144(CalldataPointer cdPtr) internal pure returns (uint144 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the uint152 at `cdPtr` in calldata. function readUint152(CalldataPointer cdPtr) internal pure returns (uint152 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the uint160 at `cdPtr` in calldata. function readUint160(CalldataPointer cdPtr) internal pure returns (uint160 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the uint168 at `cdPtr` in calldata. function readUint168(CalldataPointer cdPtr) internal pure returns (uint168 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the uint176 at `cdPtr` in calldata. function readUint176(CalldataPointer cdPtr) internal pure returns (uint176 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the uint184 at `cdPtr` in calldata. function readUint184(CalldataPointer cdPtr) internal pure returns (uint184 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the uint192 at `cdPtr` in calldata. function readUint192(CalldataPointer cdPtr) internal pure returns (uint192 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the uint200 at `cdPtr` in calldata. function readUint200(CalldataPointer cdPtr) internal pure returns (uint200 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the uint208 at `cdPtr` in calldata. function readUint208(CalldataPointer cdPtr) internal pure returns (uint208 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the uint216 at `cdPtr` in calldata. function readUint216(CalldataPointer cdPtr) internal pure returns (uint216 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the uint224 at `cdPtr` in calldata. function readUint224(CalldataPointer cdPtr) internal pure returns (uint224 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the uint232 at `cdPtr` in calldata. function readUint232(CalldataPointer cdPtr) internal pure returns (uint232 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the uint240 at `cdPtr` in calldata. function readUint240(CalldataPointer cdPtr) internal pure returns (uint240 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the uint248 at `cdPtr` in calldata. function readUint248(CalldataPointer cdPtr) internal pure returns (uint248 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the uint256 at `cdPtr` in calldata. function readUint256(CalldataPointer cdPtr) internal pure returns (uint256 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the int8 at `cdPtr` in calldata. function readInt8(CalldataPointer cdPtr) internal pure returns (int8 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the int16 at `cdPtr` in calldata. function readInt16(CalldataPointer cdPtr) internal pure returns (int16 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the int24 at `cdPtr` in calldata. function readInt24(CalldataPointer cdPtr) internal pure returns (int24 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the int32 at `cdPtr` in calldata. function readInt32(CalldataPointer cdPtr) internal pure returns (int32 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the int40 at `cdPtr` in calldata. function readInt40(CalldataPointer cdPtr) internal pure returns (int40 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the int48 at `cdPtr` in calldata. function readInt48(CalldataPointer cdPtr) internal pure returns (int48 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the int56 at `cdPtr` in calldata. function readInt56(CalldataPointer cdPtr) internal pure returns (int56 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the int64 at `cdPtr` in calldata. function readInt64(CalldataPointer cdPtr) internal pure returns (int64 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the int72 at `cdPtr` in calldata. function readInt72(CalldataPointer cdPtr) internal pure returns (int72 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the int80 at `cdPtr` in calldata. function readInt80(CalldataPointer cdPtr) internal pure returns (int80 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the int88 at `cdPtr` in calldata. function readInt88(CalldataPointer cdPtr) internal pure returns (int88 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the int96 at `cdPtr` in calldata. function readInt96(CalldataPointer cdPtr) internal pure returns (int96 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the int104 at `cdPtr` in calldata. function readInt104(CalldataPointer cdPtr) internal pure returns (int104 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the int112 at `cdPtr` in calldata. function readInt112(CalldataPointer cdPtr) internal pure returns (int112 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the int120 at `cdPtr` in calldata. function readInt120(CalldataPointer cdPtr) internal pure returns (int120 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the int128 at `cdPtr` in calldata. function readInt128(CalldataPointer cdPtr) internal pure returns (int128 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the int136 at `cdPtr` in calldata. function readInt136(CalldataPointer cdPtr) internal pure returns (int136 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the int144 at `cdPtr` in calldata. function readInt144(CalldataPointer cdPtr) internal pure returns (int144 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the int152 at `cdPtr` in calldata. function readInt152(CalldataPointer cdPtr) internal pure returns (int152 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the int160 at `cdPtr` in calldata. function readInt160(CalldataPointer cdPtr) internal pure returns (int160 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the int168 at `cdPtr` in calldata. function readInt168(CalldataPointer cdPtr) internal pure returns (int168 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the int176 at `cdPtr` in calldata. function readInt176(CalldataPointer cdPtr) internal pure returns (int176 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the int184 at `cdPtr` in calldata. function readInt184(CalldataPointer cdPtr) internal pure returns (int184 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the int192 at `cdPtr` in calldata. function readInt192(CalldataPointer cdPtr) internal pure returns (int192 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the int200 at `cdPtr` in calldata. function readInt200(CalldataPointer cdPtr) internal pure returns (int200 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the int208 at `cdPtr` in calldata. function readInt208(CalldataPointer cdPtr) internal pure returns (int208 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the int216 at `cdPtr` in calldata. function readInt216(CalldataPointer cdPtr) internal pure returns (int216 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the int224 at `cdPtr` in calldata. function readInt224(CalldataPointer cdPtr) internal pure returns (int224 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the int232 at `cdPtr` in calldata. function readInt232(CalldataPointer cdPtr) internal pure returns (int232 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the int240 at `cdPtr` in calldata. function readInt240(CalldataPointer cdPtr) internal pure returns (int240 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the int248 at `cdPtr` in calldata. function readInt248(CalldataPointer cdPtr) internal pure returns (int248 value) { assembly { value := calldataload(cdPtr) } } /// @dev Reads the int256 at `cdPtr` in calldata. function readInt256(CalldataPointer cdPtr) internal pure returns (int256 value) { assembly { value := calldataload(cdPtr) } } } library ReturndataReaders { /// @dev Reads value at `rdPtr` & applies a mask to return only last 4 bytes function readMaskedUint256(ReturndataPointer rdPtr) internal pure returns (uint256 value) { value = rdPtr.readUint256() & OffsetOrLengthMask; } /// @dev Reads the bool at `rdPtr` in returndata. function readBool(ReturndataPointer rdPtr) internal pure returns (bool value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the address at `rdPtr` in returndata. function readAddress(ReturndataPointer rdPtr) internal pure returns (address value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the bytes1 at `rdPtr` in returndata. function readBytes1(ReturndataPointer rdPtr) internal pure returns (bytes1 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the bytes2 at `rdPtr` in returndata. function readBytes2(ReturndataPointer rdPtr) internal pure returns (bytes2 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the bytes3 at `rdPtr` in returndata. function readBytes3(ReturndataPointer rdPtr) internal pure returns (bytes3 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the bytes4 at `rdPtr` in returndata. function readBytes4(ReturndataPointer rdPtr) internal pure returns (bytes4 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the bytes5 at `rdPtr` in returndata. function readBytes5(ReturndataPointer rdPtr) internal pure returns (bytes5 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the bytes6 at `rdPtr` in returndata. function readBytes6(ReturndataPointer rdPtr) internal pure returns (bytes6 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the bytes7 at `rdPtr` in returndata. function readBytes7(ReturndataPointer rdPtr) internal pure returns (bytes7 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the bytes8 at `rdPtr` in returndata. function readBytes8(ReturndataPointer rdPtr) internal pure returns (bytes8 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the bytes9 at `rdPtr` in returndata. function readBytes9(ReturndataPointer rdPtr) internal pure returns (bytes9 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the bytes10 at `rdPtr` in returndata. function readBytes10(ReturndataPointer rdPtr) internal pure returns (bytes10 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the bytes11 at `rdPtr` in returndata. function readBytes11(ReturndataPointer rdPtr) internal pure returns (bytes11 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the bytes12 at `rdPtr` in returndata. function readBytes12(ReturndataPointer rdPtr) internal pure returns (bytes12 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the bytes13 at `rdPtr` in returndata. function readBytes13(ReturndataPointer rdPtr) internal pure returns (bytes13 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the bytes14 at `rdPtr` in returndata. function readBytes14(ReturndataPointer rdPtr) internal pure returns (bytes14 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the bytes15 at `rdPtr` in returndata. function readBytes15(ReturndataPointer rdPtr) internal pure returns (bytes15 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the bytes16 at `rdPtr` in returndata. function readBytes16(ReturndataPointer rdPtr) internal pure returns (bytes16 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the bytes17 at `rdPtr` in returndata. function readBytes17(ReturndataPointer rdPtr) internal pure returns (bytes17 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the bytes18 at `rdPtr` in returndata. function readBytes18(ReturndataPointer rdPtr) internal pure returns (bytes18 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the bytes19 at `rdPtr` in returndata. function readBytes19(ReturndataPointer rdPtr) internal pure returns (bytes19 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the bytes20 at `rdPtr` in returndata. function readBytes20(ReturndataPointer rdPtr) internal pure returns (bytes20 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the bytes21 at `rdPtr` in returndata. function readBytes21(ReturndataPointer rdPtr) internal pure returns (bytes21 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the bytes22 at `rdPtr` in returndata. function readBytes22(ReturndataPointer rdPtr) internal pure returns (bytes22 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the bytes23 at `rdPtr` in returndata. function readBytes23(ReturndataPointer rdPtr) internal pure returns (bytes23 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the bytes24 at `rdPtr` in returndata. function readBytes24(ReturndataPointer rdPtr) internal pure returns (bytes24 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the bytes25 at `rdPtr` in returndata. function readBytes25(ReturndataPointer rdPtr) internal pure returns (bytes25 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the bytes26 at `rdPtr` in returndata. function readBytes26(ReturndataPointer rdPtr) internal pure returns (bytes26 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the bytes27 at `rdPtr` in returndata. function readBytes27(ReturndataPointer rdPtr) internal pure returns (bytes27 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the bytes28 at `rdPtr` in returndata. function readBytes28(ReturndataPointer rdPtr) internal pure returns (bytes28 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the bytes29 at `rdPtr` in returndata. function readBytes29(ReturndataPointer rdPtr) internal pure returns (bytes29 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the bytes30 at `rdPtr` in returndata. function readBytes30(ReturndataPointer rdPtr) internal pure returns (bytes30 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the bytes31 at `rdPtr` in returndata. function readBytes31(ReturndataPointer rdPtr) internal pure returns (bytes31 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the bytes32 at `rdPtr` in returndata. function readBytes32(ReturndataPointer rdPtr) internal pure returns (bytes32 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the uint8 at `rdPtr` in returndata. function readUint8(ReturndataPointer rdPtr) internal pure returns (uint8 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the uint16 at `rdPtr` in returndata. function readUint16(ReturndataPointer rdPtr) internal pure returns (uint16 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the uint24 at `rdPtr` in returndata. function readUint24(ReturndataPointer rdPtr) internal pure returns (uint24 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the uint32 at `rdPtr` in returndata. function readUint32(ReturndataPointer rdPtr) internal pure returns (uint32 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the uint40 at `rdPtr` in returndata. function readUint40(ReturndataPointer rdPtr) internal pure returns (uint40 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the uint48 at `rdPtr` in returndata. function readUint48(ReturndataPointer rdPtr) internal pure returns (uint48 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the uint56 at `rdPtr` in returndata. function readUint56(ReturndataPointer rdPtr) internal pure returns (uint56 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the uint64 at `rdPtr` in returndata. function readUint64(ReturndataPointer rdPtr) internal pure returns (uint64 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the uint72 at `rdPtr` in returndata. function readUint72(ReturndataPointer rdPtr) internal pure returns (uint72 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the uint80 at `rdPtr` in returndata. function readUint80(ReturndataPointer rdPtr) internal pure returns (uint80 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the uint88 at `rdPtr` in returndata. function readUint88(ReturndataPointer rdPtr) internal pure returns (uint88 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the uint96 at `rdPtr` in returndata. function readUint96(ReturndataPointer rdPtr) internal pure returns (uint96 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the uint104 at `rdPtr` in returndata. function readUint104(ReturndataPointer rdPtr) internal pure returns (uint104 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the uint112 at `rdPtr` in returndata. function readUint112(ReturndataPointer rdPtr) internal pure returns (uint112 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the uint120 at `rdPtr` in returndata. function readUint120(ReturndataPointer rdPtr) internal pure returns (uint120 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the uint128 at `rdPtr` in returndata. function readUint128(ReturndataPointer rdPtr) internal pure returns (uint128 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the uint136 at `rdPtr` in returndata. function readUint136(ReturndataPointer rdPtr) internal pure returns (uint136 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the uint144 at `rdPtr` in returndata. function readUint144(ReturndataPointer rdPtr) internal pure returns (uint144 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the uint152 at `rdPtr` in returndata. function readUint152(ReturndataPointer rdPtr) internal pure returns (uint152 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the uint160 at `rdPtr` in returndata. function readUint160(ReturndataPointer rdPtr) internal pure returns (uint160 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the uint168 at `rdPtr` in returndata. function readUint168(ReturndataPointer rdPtr) internal pure returns (uint168 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the uint176 at `rdPtr` in returndata. function readUint176(ReturndataPointer rdPtr) internal pure returns (uint176 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the uint184 at `rdPtr` in returndata. function readUint184(ReturndataPointer rdPtr) internal pure returns (uint184 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the uint192 at `rdPtr` in returndata. function readUint192(ReturndataPointer rdPtr) internal pure returns (uint192 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the uint200 at `rdPtr` in returndata. function readUint200(ReturndataPointer rdPtr) internal pure returns (uint200 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the uint208 at `rdPtr` in returndata. function readUint208(ReturndataPointer rdPtr) internal pure returns (uint208 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the uint216 at `rdPtr` in returndata. function readUint216(ReturndataPointer rdPtr) internal pure returns (uint216 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the uint224 at `rdPtr` in returndata. function readUint224(ReturndataPointer rdPtr) internal pure returns (uint224 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the uint232 at `rdPtr` in returndata. function readUint232(ReturndataPointer rdPtr) internal pure returns (uint232 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the uint240 at `rdPtr` in returndata. function readUint240(ReturndataPointer rdPtr) internal pure returns (uint240 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the uint248 at `rdPtr` in returndata. function readUint248(ReturndataPointer rdPtr) internal pure returns (uint248 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the uint256 at `rdPtr` in returndata. function readUint256(ReturndataPointer rdPtr) internal pure returns (uint256 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the int8 at `rdPtr` in returndata. function readInt8(ReturndataPointer rdPtr) internal pure returns (int8 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the int16 at `rdPtr` in returndata. function readInt16(ReturndataPointer rdPtr) internal pure returns (int16 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the int24 at `rdPtr` in returndata. function readInt24(ReturndataPointer rdPtr) internal pure returns (int24 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the int32 at `rdPtr` in returndata. function readInt32(ReturndataPointer rdPtr) internal pure returns (int32 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the int40 at `rdPtr` in returndata. function readInt40(ReturndataPointer rdPtr) internal pure returns (int40 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the int48 at `rdPtr` in returndata. function readInt48(ReturndataPointer rdPtr) internal pure returns (int48 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the int56 at `rdPtr` in returndata. function readInt56(ReturndataPointer rdPtr) internal pure returns (int56 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the int64 at `rdPtr` in returndata. function readInt64(ReturndataPointer rdPtr) internal pure returns (int64 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the int72 at `rdPtr` in returndata. function readInt72(ReturndataPointer rdPtr) internal pure returns (int72 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the int80 at `rdPtr` in returndata. function readInt80(ReturndataPointer rdPtr) internal pure returns (int80 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the int88 at `rdPtr` in returndata. function readInt88(ReturndataPointer rdPtr) internal pure returns (int88 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the int96 at `rdPtr` in returndata. function readInt96(ReturndataPointer rdPtr) internal pure returns (int96 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the int104 at `rdPtr` in returndata. function readInt104(ReturndataPointer rdPtr) internal pure returns (int104 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the int112 at `rdPtr` in returndata. function readInt112(ReturndataPointer rdPtr) internal pure returns (int112 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the int120 at `rdPtr` in returndata. function readInt120(ReturndataPointer rdPtr) internal pure returns (int120 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the int128 at `rdPtr` in returndata. function readInt128(ReturndataPointer rdPtr) internal pure returns (int128 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the int136 at `rdPtr` in returndata. function readInt136(ReturndataPointer rdPtr) internal pure returns (int136 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the int144 at `rdPtr` in returndata. function readInt144(ReturndataPointer rdPtr) internal pure returns (int144 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the int152 at `rdPtr` in returndata. function readInt152(ReturndataPointer rdPtr) internal pure returns (int152 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the int160 at `rdPtr` in returndata. function readInt160(ReturndataPointer rdPtr) internal pure returns (int160 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the int168 at `rdPtr` in returndata. function readInt168(ReturndataPointer rdPtr) internal pure returns (int168 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the int176 at `rdPtr` in returndata. function readInt176(ReturndataPointer rdPtr) internal pure returns (int176 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the int184 at `rdPtr` in returndata. function readInt184(ReturndataPointer rdPtr) internal pure returns (int184 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the int192 at `rdPtr` in returndata. function readInt192(ReturndataPointer rdPtr) internal pure returns (int192 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the int200 at `rdPtr` in returndata. function readInt200(ReturndataPointer rdPtr) internal pure returns (int200 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the int208 at `rdPtr` in returndata. function readInt208(ReturndataPointer rdPtr) internal pure returns (int208 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the int216 at `rdPtr` in returndata. function readInt216(ReturndataPointer rdPtr) internal pure returns (int216 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the int224 at `rdPtr` in returndata. function readInt224(ReturndataPointer rdPtr) internal pure returns (int224 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the int232 at `rdPtr` in returndata. function readInt232(ReturndataPointer rdPtr) internal pure returns (int232 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the int240 at `rdPtr` in returndata. function readInt240(ReturndataPointer rdPtr) internal pure returns (int240 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the int248 at `rdPtr` in returndata. function readInt248(ReturndataPointer rdPtr) internal pure returns (int248 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } /// @dev Reads the int256 at `rdPtr` in returndata. function readInt256(ReturndataPointer rdPtr) internal pure returns (int256 value) { assembly { returndatacopy(0, rdPtr, _OneWord) value := mload(0) } } } library MemoryReaders { /// @dev Reads the memory pointer at `mPtr` in memory. function readMemoryPointer(MemoryPointer mPtr) internal pure returns (MemoryPointer value) { assembly { value := mload(mPtr) } } /// @dev Reads value at `mPtr` & applies a mask to return only last 4 bytes function readMaskedUint256(MemoryPointer mPtr) internal pure returns (uint256 value) { value = mPtr.readUint256() & OffsetOrLengthMask; } /// @dev Reads the bool at `mPtr` in memory. function readBool(MemoryPointer mPtr) internal pure returns (bool value) { assembly { value := mload(mPtr) } } /// @dev Reads the address at `mPtr` in memory. function readAddress(MemoryPointer mPtr) internal pure returns (address value) { assembly { value := mload(mPtr) } } /// @dev Reads the bytes1 at `mPtr` in memory. function readBytes1(MemoryPointer mPtr) internal pure returns (bytes1 value) { assembly { value := mload(mPtr) } } /// @dev Reads the bytes2 at `mPtr` in memory. function readBytes2(MemoryPointer mPtr) internal pure returns (bytes2 value) { assembly { value := mload(mPtr) } } /// @dev Reads the bytes3 at `mPtr` in memory. function readBytes3(MemoryPointer mPtr) internal pure returns (bytes3 value) { assembly { value := mload(mPtr) } } /// @dev Reads the bytes4 at `mPtr` in memory. function readBytes4(MemoryPointer mPtr) internal pure returns (bytes4 value) { assembly { value := mload(mPtr) } } /// @dev Reads the bytes5 at `mPtr` in memory. function readBytes5(MemoryPointer mPtr) internal pure returns (bytes5 value) { assembly { value := mload(mPtr) } } /// @dev Reads the bytes6 at `mPtr` in memory. function readBytes6(MemoryPointer mPtr) internal pure returns (bytes6 value) { assembly { value := mload(mPtr) } } /// @dev Reads the bytes7 at `mPtr` in memory. function readBytes7(MemoryPointer mPtr) internal pure returns (bytes7 value) { assembly { value := mload(mPtr) } } /// @dev Reads the bytes8 at `mPtr` in memory. function readBytes8(MemoryPointer mPtr) internal pure returns (bytes8 value) { assembly { value := mload(mPtr) } } /// @dev Reads the bytes9 at `mPtr` in memory. function readBytes9(MemoryPointer mPtr) internal pure returns (bytes9 value) { assembly { value := mload(mPtr) } } /// @dev Reads the bytes10 at `mPtr` in memory. function readBytes10(MemoryPointer mPtr) internal pure returns (bytes10 value) { assembly { value := mload(mPtr) } } /// @dev Reads the bytes11 at `mPtr` in memory. function readBytes11(MemoryPointer mPtr) internal pure returns (bytes11 value) { assembly { value := mload(mPtr) } } /// @dev Reads the bytes12 at `mPtr` in memory. function readBytes12(MemoryPointer mPtr) internal pure returns (bytes12 value) { assembly { value := mload(mPtr) } } /// @dev Reads the bytes13 at `mPtr` in memory. function readBytes13(MemoryPointer mPtr) internal pure returns (bytes13 value) { assembly { value := mload(mPtr) } } /// @dev Reads the bytes14 at `mPtr` in memory. function readBytes14(MemoryPointer mPtr) internal pure returns (bytes14 value) { assembly { value := mload(mPtr) } } /// @dev Reads the bytes15 at `mPtr` in memory. function readBytes15(MemoryPointer mPtr) internal pure returns (bytes15 value) { assembly { value := mload(mPtr) } } /// @dev Reads the bytes16 at `mPtr` in memory. function readBytes16(MemoryPointer mPtr) internal pure returns (bytes16 value) { assembly { value := mload(mPtr) } } /// @dev Reads the bytes17 at `mPtr` in memory. function readBytes17(MemoryPointer mPtr) internal pure returns (bytes17 value) { assembly { value := mload(mPtr) } } /// @dev Reads the bytes18 at `mPtr` in memory. function readBytes18(MemoryPointer mPtr) internal pure returns (bytes18 value) { assembly { value := mload(mPtr) } } /// @dev Reads the bytes19 at `mPtr` in memory. function readBytes19(MemoryPointer mPtr) internal pure returns (bytes19 value) { assembly { value := mload(mPtr) } } /// @dev Reads the bytes20 at `mPtr` in memory. function readBytes20(MemoryPointer mPtr) internal pure returns (bytes20 value) { assembly { value := mload(mPtr) } } /// @dev Reads the bytes21 at `mPtr` in memory. function readBytes21(MemoryPointer mPtr) internal pure returns (bytes21 value) { assembly { value := mload(mPtr) } } /// @dev Reads the bytes22 at `mPtr` in memory. function readBytes22(MemoryPointer mPtr) internal pure returns (bytes22 value) { assembly { value := mload(mPtr) } } /// @dev Reads the bytes23 at `mPtr` in memory. function readBytes23(MemoryPointer mPtr) internal pure returns (bytes23 value) { assembly { value := mload(mPtr) } } /// @dev Reads the bytes24 at `mPtr` in memory. function readBytes24(MemoryPointer mPtr) internal pure returns (bytes24 value) { assembly { value := mload(mPtr) } } /// @dev Reads the bytes25 at `mPtr` in memory. function readBytes25(MemoryPointer mPtr) internal pure returns (bytes25 value) { assembly { value := mload(mPtr) } } /// @dev Reads the bytes26 at `mPtr` in memory. function readBytes26(MemoryPointer mPtr) internal pure returns (bytes26 value) { assembly { value := mload(mPtr) } } /// @dev Reads the bytes27 at `mPtr` in memory. function readBytes27(MemoryPointer mPtr) internal pure returns (bytes27 value) { assembly { value := mload(mPtr) } } /// @dev Reads the bytes28 at `mPtr` in memory. function readBytes28(MemoryPointer mPtr) internal pure returns (bytes28 value) { assembly { value := mload(mPtr) } } /// @dev Reads the bytes29 at `mPtr` in memory. function readBytes29(MemoryPointer mPtr) internal pure returns (bytes29 value) { assembly { value := mload(mPtr) } } /// @dev Reads the bytes30 at `mPtr` in memory. function readBytes30(MemoryPointer mPtr) internal pure returns (bytes30 value) { assembly { value := mload(mPtr) } } /// @dev Reads the bytes31 at `mPtr` in memory. function readBytes31(MemoryPointer mPtr) internal pure returns (bytes31 value) { assembly { value := mload(mPtr) } } /// @dev Reads the bytes32 at `mPtr` in memory. function readBytes32(MemoryPointer mPtr) internal pure returns (bytes32 value) { assembly { value := mload(mPtr) } } /// @dev Reads the uint8 at `mPtr` in memory. function readUint8(MemoryPointer mPtr) internal pure returns (uint8 value) { assembly { value := mload(mPtr) } } /// @dev Reads the uint16 at `mPtr` in memory. function readUint16(MemoryPointer mPtr) internal pure returns (uint16 value) { assembly { value := mload(mPtr) } } /// @dev Reads the uint24 at `mPtr` in memory. function readUint24(MemoryPointer mPtr) internal pure returns (uint24 value) { assembly { value := mload(mPtr) } } /// @dev Reads the uint32 at `mPtr` in memory. function readUint32(MemoryPointer mPtr) internal pure returns (uint32 value) { assembly { value := mload(mPtr) } } /// @dev Reads the uint40 at `mPtr` in memory. function readUint40(MemoryPointer mPtr) internal pure returns (uint40 value) { assembly { value := mload(mPtr) } } /// @dev Reads the uint48 at `mPtr` in memory. function readUint48(MemoryPointer mPtr) internal pure returns (uint48 value) { assembly { value := mload(mPtr) } } /// @dev Reads the uint56 at `mPtr` in memory. function readUint56(MemoryPointer mPtr) internal pure returns (uint56 value) { assembly { value := mload(mPtr) } } /// @dev Reads the uint64 at `mPtr` in memory. function readUint64(MemoryPointer mPtr) internal pure returns (uint64 value) { assembly { value := mload(mPtr) } } /// @dev Reads the uint72 at `mPtr` in memory. function readUint72(MemoryPointer mPtr) internal pure returns (uint72 value) { assembly { value := mload(mPtr) } } /// @dev Reads the uint80 at `mPtr` in memory. function readUint80(MemoryPointer mPtr) internal pure returns (uint80 value) { assembly { value := mload(mPtr) } } /// @dev Reads the uint88 at `mPtr` in memory. function readUint88(MemoryPointer mPtr) internal pure returns (uint88 value) { assembly { value := mload(mPtr) } } /// @dev Reads the uint96 at `mPtr` in memory. function readUint96(MemoryPointer mPtr) internal pure returns (uint96 value) { assembly { value := mload(mPtr) } } /// @dev Reads the uint104 at `mPtr` in memory. function readUint104(MemoryPointer mPtr) internal pure returns (uint104 value) { assembly { value := mload(mPtr) } } /// @dev Reads the uint112 at `mPtr` in memory. function readUint112(MemoryPointer mPtr) internal pure returns (uint112 value) { assembly { value := mload(mPtr) } } /// @dev Reads the uint120 at `mPtr` in memory. function readUint120(MemoryPointer mPtr) internal pure returns (uint120 value) { assembly { value := mload(mPtr) } } /// @dev Reads the uint128 at `mPtr` in memory. function readUint128(MemoryPointer mPtr) internal pure returns (uint128 value) { assembly { value := mload(mPtr) } } /// @dev Reads the uint136 at `mPtr` in memory. function readUint136(MemoryPointer mPtr) internal pure returns (uint136 value) { assembly { value := mload(mPtr) } } /// @dev Reads the uint144 at `mPtr` in memory. function readUint144(MemoryPointer mPtr) internal pure returns (uint144 value) { assembly { value := mload(mPtr) } } /// @dev Reads the uint152 at `mPtr` in memory. function readUint152(MemoryPointer mPtr) internal pure returns (uint152 value) { assembly { value := mload(mPtr) } } /// @dev Reads the uint160 at `mPtr` in memory. function readUint160(MemoryPointer mPtr) internal pure returns (uint160 value) { assembly { value := mload(mPtr) } } /// @dev Reads the uint168 at `mPtr` in memory. function readUint168(MemoryPointer mPtr) internal pure returns (uint168 value) { assembly { value := mload(mPtr) } } /// @dev Reads the uint176 at `mPtr` in memory. function readUint176(MemoryPointer mPtr) internal pure returns (uint176 value) { assembly { value := mload(mPtr) } } /// @dev Reads the uint184 at `mPtr` in memory. function readUint184(MemoryPointer mPtr) internal pure returns (uint184 value) { assembly { value := mload(mPtr) } } /// @dev Reads the uint192 at `mPtr` in memory. function readUint192(MemoryPointer mPtr) internal pure returns (uint192 value) { assembly { value := mload(mPtr) } } /// @dev Reads the uint200 at `mPtr` in memory. function readUint200(MemoryPointer mPtr) internal pure returns (uint200 value) { assembly { value := mload(mPtr) } } /// @dev Reads the uint208 at `mPtr` in memory. function readUint208(MemoryPointer mPtr) internal pure returns (uint208 value) { assembly { value := mload(mPtr) } } /// @dev Reads the uint216 at `mPtr` in memory. function readUint216(MemoryPointer mPtr) internal pure returns (uint216 value) { assembly { value := mload(mPtr) } } /// @dev Reads the uint224 at `mPtr` in memory. function readUint224(MemoryPointer mPtr) internal pure returns (uint224 value) { assembly { value := mload(mPtr) } } /// @dev Reads the uint232 at `mPtr` in memory. function readUint232(MemoryPointer mPtr) internal pure returns (uint232 value) { assembly { value := mload(mPtr) } } /// @dev Reads the uint240 at `mPtr` in memory. function readUint240(MemoryPointer mPtr) internal pure returns (uint240 value) { assembly { value := mload(mPtr) } } /// @dev Reads the uint248 at `mPtr` in memory. function readUint248(MemoryPointer mPtr) internal pure returns (uint248 value) { assembly { value := mload(mPtr) } } /// @dev Reads the uint256 at `mPtr` in memory. function readUint256(MemoryPointer mPtr) internal pure returns (uint256 value) { assembly { value := mload(mPtr) } } /// @dev Reads the int8 at `mPtr` in memory. function readInt8(MemoryPointer mPtr) internal pure returns (int8 value) { assembly { value := mload(mPtr) } } /// @dev Reads the int16 at `mPtr` in memory. function readInt16(MemoryPointer mPtr) internal pure returns (int16 value) { assembly { value := mload(mPtr) } } /// @dev Reads the int24 at `mPtr` in memory. function readInt24(MemoryPointer mPtr) internal pure returns (int24 value) { assembly { value := mload(mPtr) } } /// @dev Reads the int32 at `mPtr` in memory. function readInt32(MemoryPointer mPtr) internal pure returns (int32 value) { assembly { value := mload(mPtr) } } /// @dev Reads the int40 at `mPtr` in memory. function readInt40(MemoryPointer mPtr) internal pure returns (int40 value) { assembly { value := mload(mPtr) } } /// @dev Reads the int48 at `mPtr` in memory. function readInt48(MemoryPointer mPtr) internal pure returns (int48 value) { assembly { value := mload(mPtr) } } /// @dev Reads the int56 at `mPtr` in memory. function readInt56(MemoryPointer mPtr) internal pure returns (int56 value) { assembly { value := mload(mPtr) } } /// @dev Reads the int64 at `mPtr` in memory. function readInt64(MemoryPointer mPtr) internal pure returns (int64 value) { assembly { value := mload(mPtr) } } /// @dev Reads the int72 at `mPtr` in memory. function readInt72(MemoryPointer mPtr) internal pure returns (int72 value) { assembly { value := mload(mPtr) } } /// @dev Reads the int80 at `mPtr` in memory. function readInt80(MemoryPointer mPtr) internal pure returns (int80 value) { assembly { value := mload(mPtr) } } /// @dev Reads the int88 at `mPtr` in memory. function readInt88(MemoryPointer mPtr) internal pure returns (int88 value) { assembly { value := mload(mPtr) } } /// @dev Reads the int96 at `mPtr` in memory. function readInt96(MemoryPointer mPtr) internal pure returns (int96 value) { assembly { value := mload(mPtr) } } /// @dev Reads the int104 at `mPtr` in memory. function readInt104(MemoryPointer mPtr) internal pure returns (int104 value) { assembly { value := mload(mPtr) } } /// @dev Reads the int112 at `mPtr` in memory. function readInt112(MemoryPointer mPtr) internal pure returns (int112 value) { assembly { value := mload(mPtr) } } /// @dev Reads the int120 at `mPtr` in memory. function readInt120(MemoryPointer mPtr) internal pure returns (int120 value) { assembly { value := mload(mPtr) } } /// @dev Reads the int128 at `mPtr` in memory. function readInt128(MemoryPointer mPtr) internal pure returns (int128 value) { assembly { value := mload(mPtr) } } /// @dev Reads the int136 at `mPtr` in memory. function readInt136(MemoryPointer mPtr) internal pure returns (int136 value) { assembly { value := mload(mPtr) } } /// @dev Reads the int144 at `mPtr` in memory. function readInt144(MemoryPointer mPtr) internal pure returns (int144 value) { assembly { value := mload(mPtr) } } /// @dev Reads the int152 at `mPtr` in memory. function readInt152(MemoryPointer mPtr) internal pure returns (int152 value) { assembly { value := mload(mPtr) } } /// @dev Reads the int160 at `mPtr` in memory. function readInt160(MemoryPointer mPtr) internal pure returns (int160 value) { assembly { value := mload(mPtr) } } /// @dev Reads the int168 at `mPtr` in memory. function readInt168(MemoryPointer mPtr) internal pure returns (int168 value) { assembly { value := mload(mPtr) } } /// @dev Reads the int176 at `mPtr` in memory. function readInt176(MemoryPointer mPtr) internal pure returns (int176 value) { assembly { value := mload(mPtr) } } /// @dev Reads the int184 at `mPtr` in memory. function readInt184(MemoryPointer mPtr) internal pure returns (int184 value) { assembly { value := mload(mPtr) } } /// @dev Reads the int192 at `mPtr` in memory. function readInt192(MemoryPointer mPtr) internal pure returns (int192 value) { assembly { value := mload(mPtr) } } /// @dev Reads the int200 at `mPtr` in memory. function readInt200(MemoryPointer mPtr) internal pure returns (int200 value) { assembly { value := mload(mPtr) } } /// @dev Reads the int208 at `mPtr` in memory. function readInt208(MemoryPointer mPtr) internal pure returns (int208 value) { assembly { value := mload(mPtr) } } /// @dev Reads the int216 at `mPtr` in memory. function readInt216(MemoryPointer mPtr) internal pure returns (int216 value) { assembly { value := mload(mPtr) } } /// @dev Reads the int224 at `mPtr` in memory. function readInt224(MemoryPointer mPtr) internal pure returns (int224 value) { assembly { value := mload(mPtr) } } /// @dev Reads the int232 at `mPtr` in memory. function readInt232(MemoryPointer mPtr) internal pure returns (int232 value) { assembly { value := mload(mPtr) } } /// @dev Reads the int240 at `mPtr` in memory. function readInt240(MemoryPointer mPtr) internal pure returns (int240 value) { assembly { value := mload(mPtr) } } /// @dev Reads the int248 at `mPtr` in memory. function readInt248(MemoryPointer mPtr) internal pure returns (int248 value) { assembly { value := mload(mPtr) } } /// @dev Reads the int256 at `mPtr` in memory. function readInt256(MemoryPointer mPtr) internal pure returns (int256 value) { assembly { value := mload(mPtr) } } } library MemoryWriters { /// @dev Writes `valuePtr` to memory at `mPtr`. function write(MemoryPointer mPtr, MemoryPointer valuePtr) internal pure { assembly { mstore(mPtr, valuePtr) } } /// @dev Writes a boolean `value` to `mPtr` in memory. function write(MemoryPointer mPtr, bool value) internal pure { assembly { mstore(mPtr, value) } } /// @dev Writes an address `value` to `mPtr` in memory. function write(MemoryPointer mPtr, address value) internal pure { assembly { mstore(mPtr, value) } } /// @dev Writes a bytes32 `value` to `mPtr` in memory. /// Separate name to disambiguate literal write parameters. function writeBytes32(MemoryPointer mPtr, bytes32 value) internal pure { assembly { mstore(mPtr, value) } } /// @dev Writes a uint256 `value` to `mPtr` in memory. function write(MemoryPointer mPtr, uint256 value) internal pure { assembly { mstore(mPtr, value) } } /// @dev Writes an int256 `value` to `mPtr` in memory. /// Separate name to disambiguate literal write parameters. function writeInt(MemoryPointer mPtr, int256 value) internal pure { assembly { mstore(mPtr, value) } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import { ZoneParameters, Schema } from "../lib/ConsiderationStructs.sol"; import { IERC165 } from "./IERC165.sol"; /** * @title ZoneInterface * @notice Contains functions exposed by a zone. */ interface ZoneInterface is IERC165 { /** * @dev Authorizes an order before any token fulfillments from any order have been executed by Seaport. * * @param zoneParameters The context about the order fulfillment and any * supplied extraData. * * @return authorizedOrderMagicValue The magic value that indicates a valid * order. */ function authorizeOrder(ZoneParameters calldata zoneParameters) external returns (bytes4 authorizedOrderMagicValue); /** * @dev Validates an order after all token fulfillments for all orders have been executed by Seaport. * * @param zoneParameters The context about the order fulfillment and any * supplied extraData. * * @return validOrderMagicValue The magic value that indicates a valid * order. */ function validateOrder(ZoneParameters calldata zoneParameters) external returns (bytes4 validOrderMagicValue); /** * @dev Returns the metadata for this zone. * * @return name The name of the zone. * @return schemas The schemas that the zone implements. */ function getSeaportMetadata() external view returns (string memory name, Schema[] memory schemas); // map to Seaport Improvement Proposal IDs /** * @dev Returns if the zone supports the interfaceId. * * @param interfaceId The interface identifier, as specified in ERC-165. * * @return supportsInterface True if the zone supports interfaceId, false */ function supportsInterface(bytes4 interfaceId) external view override returns (bool supportsInterface); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.7; /** * @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`. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
{ "remappings": [ "@rari-capital/solmate/=lib/solmate/", "ds-test/=lib/ds-test/src/", "forge-std/=lib/forge-std/src/", "murky/=lib/murky/src/", "@openzeppelin/=lib/openzeppelin-contracts/", "solarray/=lib/solarray/src/", "solady/=lib/solady/", "seaport-sol/src/=src/sol/", "seaport-sol/=src/sol/", "seaport-types/src/=src/types/", "seaport-types/=src/types/", "seaport-core/src/=src/core/", "seaport-core/=src/core/", "seaport/=src/main/", "@limitbreak/creator-token-standards/=lib/erc721c-seaport/lib/creator-token-standards/src/", "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/", "ERC721A/=lib/erc721c-seaport/lib/creator-token-standards/lib/ERC721A/contracts/", "creator-token-standards/=lib/erc721c-seaport/lib/creator-token-standards/", "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/", "erc721a/=lib/erc721c-seaport/lib/creator-token-standards/lib/ERC721A/", "erc721c-seaport/=lib/erc721c-seaport/src/", "openzeppelin-contracts/=lib/openzeppelin-contracts/", "seaport-deploy/=lib/erc721c-seaport/lib/seaport-deploy/", "solmate/=lib/solmate/src/" ], "optimizer": { "enabled": true, "runs": 9999999 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } }, "evmVersion": "cancun", "viaIR": false, "libraries": {} }
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"zone","type":"address"}],"name":"CallerIsNotNewPotentialOwner","type":"error"},{"inputs":[{"internalType":"address","name":"zone","type":"address"}],"name":"CallerIsNotOwner","type":"error"},{"inputs":[],"name":"InvalidCreator","type":"error"},{"inputs":[],"name":"InvalidInitialOwner","type":"error"},{"inputs":[{"internalType":"address","name":"zone","type":"address"},{"internalType":"address","name":"newPotentialOwner","type":"address"}],"name":"NewPotentialOwnerAlreadySet","type":"error"},{"inputs":[{"internalType":"address","name":"zone","type":"address"}],"name":"NewPotentialOwnerIsNullAddress","type":"error"},{"inputs":[{"internalType":"address","name":"zone","type":"address"}],"name":"NoPotentialOwnerCurrentlySet","type":"error"},{"inputs":[],"name":"NoZone","type":"error"},{"inputs":[{"internalType":"address","name":"signer","type":"address"}],"name":"SignerAlreadyAdded","type":"error"},{"inputs":[],"name":"SignerCannotBeNullAddress","type":"error"},{"inputs":[{"internalType":"address","name":"signer","type":"address"}],"name":"SignerCannotBeReauthorized","type":"error"},{"inputs":[{"internalType":"address","name":"signer","type":"address"}],"name":"SignerNotPresent","type":"error"},{"inputs":[{"internalType":"address","name":"zone","type":"address"}],"name":"ZoneAlreadyExists","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"zone","type":"address"},{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newPotentialOwner","type":"address"}],"name":"PotentialOwnerUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"signedZone","type":"address"},{"indexed":false,"internalType":"address","name":"signer","type":"address"},{"indexed":false,"internalType":"bool","name":"active","type":"bool"}],"name":"SignerUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"zoneAddress","type":"address"},{"indexed":false,"internalType":"string","name":"zoneName","type":"string"},{"indexed":false,"internalType":"string","name":"apiEndpoint","type":"string"},{"indexed":false,"internalType":"string","name":"documentationURI","type":"string"},{"indexed":false,"internalType":"bytes32","name":"salt","type":"bytes32"}],"name":"ZoneCreated","type":"event"},{"inputs":[{"internalType":"address","name":"zone","type":"address"}],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"zone","type":"address"}],"name":"cancelOwnershipTransfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"zoneName","type":"string"},{"internalType":"string","name":"apiEndpoint","type":"string"},{"internalType":"string","name":"documentationURI","type":"string"},{"internalType":"address","name":"initialOwner","type":"address"},{"internalType":"bytes32","name":"salt","type":"bytes32"}],"name":"createZone","outputs":[{"internalType":"address","name":"signedZone","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"zone","type":"address"}],"name":"getActiveSigners","outputs":[{"internalType":"address[]","name":"signers","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"zone","type":"address"}],"name":"getAdditionalZoneInformation","outputs":[{"internalType":"bytes32","name":"domainSeparator","type":"bytes32"},{"internalType":"string","name":"zoneName","type":"string"},{"internalType":"string","name":"apiEndpoint","type":"string"},{"internalType":"uint256[]","name":"substandards","type":"uint256[]"},{"internalType":"string","name":"documentationURI","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"zone","type":"address"}],"name":"getPotentialOwner","outputs":[{"internalType":"address","name":"potentialOwner","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"zoneName","type":"string"},{"internalType":"bytes32","name":"salt","type":"bytes32"}],"name":"getZone","outputs":[{"internalType":"address","name":"derivedAddress","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"zone","type":"address"},{"internalType":"address","name":"signer","type":"address"}],"name":"isActiveSigner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"zone","type":"address"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"owner","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"zone","type":"address"},{"internalType":"address","name":"newPotentialOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"zone","type":"address"},{"internalType":"string","name":"newApiEndpoint","type":"string"}],"name":"updateAPIEndpoint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"zone","type":"address"},{"internalType":"string","name":"documentationURI","type":"string"}],"name":"updateDocumentationURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"zone","type":"address"},{"internalType":"address","name":"signer","type":"address"},{"internalType":"bool","name":"active","type":"bool"}],"name":"updateSigner","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
600360e052620322e360ec1b610100527f88f72b566ae0c96f6fffac4bc8ac74909f61512ac0c06a8124d5ed420d306f906080526c08a92a06e626488dedac2d2dc5609b1b6101409081526b1cdd1c9a5b99c81b985b594b60a21b61014d526e1cdd1c9a5b99c81d995c9cda5bdb8b608a1b610159526f1d5a5b9d0c8d4d8818da185a5b92590b60821b610168527f6164647265737320766572696679696e67436f6e74726163740000000000000061017852602960f81b610191526052610120819052610192604052902060a0524660c0523480156100dd575f80fd5b5060805160a05160c051613e626101055f395f50505f61154601525f6115930152613e625ff3fe608060405234801562000010575f80fd5b5060043610620000ec575f3560e01c806366a2489f1162000093578063906c87cc116200006b578063906c87cc1462000223578063ad07dd7e146200023a578063dca093831462000251578063e89fad581462000268575f80fd5b806366a2489f14620001cf5780636d43542114620001f55780637b37e561146200020c575f80fd5b8063515cf7ec11620000c7578063515cf7ec146200017757806351710e45146200019f578063541bbd3214620001b8575f80fd5b806304789c9814620000f05780630eb92516146200012357806314afd79e1462000160575b5f80fd5b620001076200010136600462001674565b6200027f565b6040516200011a95949392919062001706565b60405180910390f35b6200013a620001343660046200186e565b620002ae565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016200011a565b6200013a6200017136600462001674565b62000545565b6200018e6200018836600462001914565b6200057c565b60405190151581526020016200011a565b620001b6620001b036600462001674565b620005c7565b005b620001b6620001c93660046200194a565b62000747565b620001e6620001e036600462001674565b6200078e565b6040516200011a9190620019cd565b620001b66200020636600462001914565b6200082f565b620001b66200021d36600462001674565b620009bd565b6200013a6200023436600462001674565b62000aba565b6200013a6200024b36600462001a28565b62000af4565b620001b66200026236600462001a6e565b62000c40565b620001b6620002793660046200194a565b62000fcb565b5f60608060608062000291866200100b565b6200029c866200106c565b939a9299509097509550909350915050565b5f73ffffffffffffffffffffffffffffffffffffffff8316620002fd576040517f99faaa0400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606082901c33146200033b576040517fcb6e534400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f604051806020016200034e90620015d4565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082820381018352601f9091011660408190526200039190899060200162001abc565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815290829052620003cf929160200162001ad0565b6040516020818303038152906040529050828151826020015ff59150813b620003f6575f80fd5b73ffffffffffffffffffffffffffffffffffffffff8281165f90815260208190526040902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169186169190911781556002810162000458898262001b9d565b506003810162000469888262001b9d565b50600481016200047a878262001b9d565b5060408051608081018252600181526007602082015260089181019190915260096060820152620004b29060058301906004620015e2565b507f106160dca18b77e6926325d074dd8328fbec25f496d6fd313ef44f3e581e2afe8389898988604051620004ec95949392919062001cc6565b60405180910390a160405173ffffffffffffffffffffffffffffffffffffffff808716915f918616907fc8894f26f396ce8c004245c8b7cd1b92103a6e4302fcbab883987149ac01b7ec908390a4505095945050505050565b5f62000551826200100b565b5073ffffffffffffffffffffffffffffffffffffffff9081165f908152602081905260409020541690565b5f62000588836200100b565b5073ffffffffffffffffffffffffffffffffffffffff8083165f90815260208181526040808320938516835260069093019052205460ff165b92915050565b620005d2816200100b565b73ffffffffffffffffffffffffffffffffffffffff8181165f9081526020819052604090206001015416331462000652576040517f88c3a11500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024015b60405180910390fd5b6040515f907f11a3cf439fb225bfe74225716b6774765670ec1060e3796802e62139d69974da908290a273ffffffffffffffffffffffffffffffffffffffff8082165f818152602081905260408082206001810180547fffffffffffffffffffffffff000000000000000000000000000000000000000016905554905133949190911692917fc8894f26f396ce8c004245c8b7cd1b92103a6e4302fcbab883987149ac01b7ec91a473ffffffffffffffffffffffffffffffffffffffff165f90815260208190526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001633179055565b6200075283620012c4565b73ffffffffffffffffffffffffffffffffffffffff83165f908152602081905260409020600481016200078783858362001d33565b5050505050565b60606200079b826200100b565b73ffffffffffffffffffffffffffffffffffffffff82165f90815260208181526040918290206007810180548451818502810185019095528085529193929091908301828280156200082257602002820191905f5260205f20905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311620007f6575b5050505050915050919050565b6200083a82620012c4565b73ffffffffffffffffffffffffffffffffffffffff8116620008a1576040517f3dfa446b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8316600482015260240162000649565b73ffffffffffffffffffffffffffffffffffffffff8083165f9081526020819052604090206001015481169082160362000928576040517fcbc080ca00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff80841660048301528216602482015260440162000649565b60405173ffffffffffffffffffffffffffffffffffffffff8216907f11a3cf439fb225bfe74225716b6774765670ec1060e3796802e62139d69974da905f90a273ffffffffffffffffffffffffffffffffffffffff9182165f90815260208190526040902060010180547fffffffffffffffffffffffff00000000000000000000000000000000000000001691909216179055565b620009c881620012c4565b73ffffffffffffffffffffffffffffffffffffffff8181165f908152602081905260409020600101541662000a42576040517f6b01361600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8216600482015260240162000649565b6040515f907f11a3cf439fb225bfe74225716b6774765670ec1060e3796802e62139d69974da908290a273ffffffffffffffffffffffffffffffffffffffff165f90815260208190526040902060010180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b5f62000ac6826200100b565b5073ffffffffffffffffffffffffffffffffffffffff9081165f908152602081905260409020600101541690565b5f806040518060200162000b0890620015d4565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082820381018352601f90910116604081905262000b4b90869060200162001abc565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529082905262000b89929160200162001ad0565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815282825280516020918201207fff00000000000000000000000000000000000000000000000000000000000000828501523060601b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001660218501526035840196909652605580840196909652815180840390960186526075909201905283519301929092209392505050565b62000c4b83620012c4565b73ffffffffffffffffffffffffffffffffffffffff83165f90815260208190526040902062000c7c81848462001348565b6040517ff460590b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152831515602483015285169063f460590b906044015f604051808303815f87803b15801562000ceb575f80fd5b505af115801562000cfe573d5f803e3d5ffd5b5050505073ffffffffffffffffffffffffffffffffffffffff83165f908152600682016020526040902080546101007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000909116841580157fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16919091179190911790915562000de1576007810180546001810182555f91825260209091200180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff851617905562000f6d565b5f5b600782015481101562000f6b578373ffffffffffffffffffffffffffffffffffffffff1682600701828154811062000e1f5762000e1f62001e56565b5f9182526020909120015473ffffffffffffffffffffffffffffffffffffffff160362000f625760078201805462000e5a9060019062001e83565b8154811062000e6d5762000e6d62001e56565b5f9182526020909120015460078301805473ffffffffffffffffffffffffffffffffffffffff909216918390811062000eaa5762000eaa62001e56565b905f5260205f20015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508160070180548062000f055762000f0562001ebc565b5f8281526020902081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff000000000000000000000000000000000000000016905501905562000f6b565b60010162000de3565b505b6040805173ffffffffffffffffffffffffffffffffffffffff8681168252851660208201528315158183015290517fb658b57f3a8d73a4f3bb96789edcebed831f44d5cc4a513d4416c6bb25ea0e8b9181900360600190a150505050565b62000fd683620012c4565b73ffffffffffffffffffffffffffffffffffffffff83165f908152602081905260409020600381016200078783858362001d33565b73ffffffffffffffffffffffffffffffffffffffff8181165f908152602081905260409020541662001069576040517fb1a69e4800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50565b73ffffffffffffffffffffffffffffffffffffffff81165f908152602081905260408120606090819081908190620010a48762001517565b9550806002018054620010b79062001b02565b80601f0160208091040260200160405190810160405280929190818152602001828054620010e59062001b02565b8015620011345780601f106200110a5761010080835404028352916020019162001134565b820191905f5260205f20905b8154815290600101906020018083116200111657829003601f168201915b505050505094508060030180546200114c9062001b02565b80601f01602080910402602001604051908101604052809291908181526020018280546200117a9062001b02565b8015620011c95780601f106200119f57610100808354040283529160200191620011c9565b820191905f5260205f20905b815481529060010190602001808311620011ab57829003601f168201915b50505050509350806005018054806020026020016040519081016040528092919081815260200182805480156200121e57602002820191905f5260205f20905b81548152602001906001019080831162001209575b50505050509250806004018054620012369062001b02565b80601f0160208091040260200160405190810160405280929190818152602001828054620012649062001b02565b8015620012b35780601f106200128957610100808354040283529160200191620012b3565b820191905f5260205f20905b8154815290600101906020018083116200129557829003601f168201915b505050505091505091939590929450565b620012cf816200100b565b73ffffffffffffffffffffffffffffffffffffffff8181165f9081526020819052604090205416331462001069576040517fd4ed9a1700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8216600482015260240162000649565b73ffffffffffffffffffffffffffffffffffffffff821662001396576040517fb7474e0100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80156200149d5773ffffffffffffffffffffffffffffffffffffffff82165f90815260068401602052604090205460ff161562001418576040517f9fb0d64c00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8316600482015260240162000649565b73ffffffffffffffffffffffffffffffffffffffff82165f908152600684016020526040902054610100900460ff161562001498576040517f9d066d5a00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8316600482015260240162000649565b505050565b73ffffffffffffffffffffffffffffffffffffffff82165f90815260068401602052604090205460ff1662001498576040517fde0cce5000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8316600482015260240162000649565b5f620005c18273ffffffffffffffffffffffffffffffffffffffff81165f9081526020819052604080822090517f0000000000000000000000000000000000000000000000000000000000000000919083906200157990600284019062001ee9565b60408051918290038220608080515f9788526020929092527f0000000000000000000000000000000000000000000000000000000000000000835246606090815298815260a087209390925294909652929094525092915050565b611eab8062001f8283390190565b828054828255905f5260205f2090810192821562001623579160200282015b8281111562001623578251829060ff1690559160200191906001019062001601565b506200163192915062001635565b5090565b5b8082111562001631575f815560010162001636565b803573ffffffffffffffffffffffffffffffffffffffff811681146200166f575f80fd5b919050565b5f6020828403121562001685575f80fd5b62001690826200164b565b9392505050565b5f5b83811015620016b357818101518382015260200162001699565b50505f910152565b5f8151808452620016d481602086016020860162001697565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b8581525f602060a060208401526200172260a0840188620016bb565b8381036040850152620017368188620016bb565b8481036060860152865180825260208089019350909101905f5b818110156200176e5783518352928401929184019160010162001750565b50508481036080860152620017848187620016bb565b9a9950505050505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f82601f830112620017cf575f80fd5b813567ffffffffffffffff80821115620017ed57620017ed62001792565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190828211818310171562001836576200183662001792565b816040528381528660208588010111156200184f575f80fd5b836020870160208301375f602085830101528094505050505092915050565b5f805f805f60a0868803121562001883575f80fd5b853567ffffffffffffffff808211156200189b575f80fd5b620018a989838a01620017bf565b96506020880135915080821115620018bf575f80fd5b620018cd89838a01620017bf565b95506040880135915080821115620018e3575f80fd5b50620018f288828901620017bf565b93505062001903606087016200164b565b949793965091946080013592915050565b5f806040838503121562001926575f80fd5b62001931836200164b565b915062001941602084016200164b565b90509250929050565b5f805f604084860312156200195d575f80fd5b62001968846200164b565b9250602084013567ffffffffffffffff8082111562001985575f80fd5b818601915086601f83011262001999575f80fd5b813581811115620019a8575f80fd5b876020828501011115620019ba575f80fd5b6020830194508093505050509250925092565b602080825282518282018190525f9190848201906040850190845b8181101562001a1c57835173ffffffffffffffffffffffffffffffffffffffff1683529284019291840191600101620019e8565b50909695505050505050565b5f806040838503121562001a3a575f80fd5b823567ffffffffffffffff81111562001a51575f80fd5b62001a5f85828601620017bf565b95602094909401359450505050565b5f805f6060848603121562001a81575f80fd5b62001a8c846200164b565b925062001a9c602085016200164b565b91506040840135801515811462001ab1575f80fd5b809150509250925092565b602081525f620016906020830184620016bb565b5f835162001ae381846020880162001697565b83519083019062001af981836020880162001697565b01949350505050565b600181811c9082168062001b1757607f821691505b60208210810362001b4f577f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b50919050565b601f8211156200149857805f5260205f20601f840160051c8101602085101562001b7c5750805b601f840160051c820191505b8181101562000787575f815560010162001b88565b815167ffffffffffffffff81111562001bba5762001bba62001792565b62001bd28162001bcb845462001b02565b8462001b55565b602080601f83116001811462001c27575f841562001bf05750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b17855562001cbe565b5f858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b8281101562001c755788860151825594840194600190910190840162001c54565b508582101562001cb257878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b505060018460011b0185555b505050505050565b73ffffffffffffffffffffffffffffffffffffffff8616815260a060208201525f62001cf660a0830187620016bb565b828103604084015262001d0a8187620016bb565b9050828103606084015262001d208186620016bb565b9150508260808301529695505050505050565b67ffffffffffffffff83111562001d4e5762001d4e62001792565b62001d668362001d5f835462001b02565b8362001b55565b5f601f84116001811462001db9575f851562001d825750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b17835562000787565b5f838152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08716915b8281101562001e08578685013582556020948501946001909201910162001de6565b508682101562001e44577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b81810381811115620005c1577f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603160045260245ffd5b5f80835462001ef88162001b02565b6001828116801562001f13576001811462001f475762001f75565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008416875282151583028701945062001f75565b875f526020805f205f5b8581101562001f6c5781548a82015290840190820162001f51565b50505082870194505b5092969550505050505056fe600361018052620322e360ec1b6101a0527f88f72b566ae0c96f6fffac4bc8ac74909f61512ac0c06a8124d5ed420d306f9060c0526c08a92a06e626488dedac2d2dc5609b1b6101e09081526b1cdd1c9a5b99c81b985b594b60a21b6101ed526e1cdd1c9a5b99c81d995c9cda5bdb8b608a1b6101f9526f1d5a5b9d0c8d4d8818da185a5b92590b60821b610208527f6164647265737320766572696679696e67436f6e74726163740000000000000061021852602960f81b61023181905260526101c081905290912060e0526b0a6d2cedccac89ee4c8cae4560a31b610252908152711859191c995cdcc8199d5b199a5b1b195c8b60721b61025e52711d5a5b9d0d8d08195e1c1a5c985d1a5bdb8b60721b6102705271189e5d195ccccc881bdc99195c92185cda0b60721b610282526c189e5d195cc818dbdb9d195e1d609a1b610294526102a19190915260506102328190526102a260405290206101005246610120526c68f116a894984e2db1123eb3956101605234801562000183575f80fd5b5060405162001eab38038062001eab833981016040819052620001a69162000235565b336080528051602082012060a052620001ee60e05160a0805160c05160408051608080515f978852602095909552928252466060908152308452948620915293909252905290565b610140526040517f98a7ac23945182ac62b68fbe5ba35cc0bf5c4c34b3a410ce94a4c2270282d6b5905f90a15062000303565b634e487b7160e01b5f52604160045260245ffd5b5f602080838503121562000247575f80fd5b82516001600160401b03808211156200025e575f80fd5b818501915085601f83011262000272575f80fd5b81518181111562000287576200028762000221565b604051601f8201601f19908116603f01168101908382118183101715620002b257620002b262000221565b816040528281528886848701011115620002ca575f80fd5b5f93505b82841015620002ed5784840186015181850187015292850192620002ce565b5f86848301015280965050505050505092915050565b60805160a05160c05160e05161010051610120516101405161016051611b37620003745f395f81816103d4015261077a01525f610bed01525f610b3501525f610a8801525f610b6501525f610bae01525f610b8a01525f8181610318015281816108d101526112bd0152611b375ff3fe608060405234801561000f575f80fd5b506004361061004a575f3560e01c806301e4d72a1461022f57806301ffc9a71461027857806317b1f9421461029b5780632e778efc146102ae575b5f3660607fffffffff000000000000000000000000000000000000000000000000000000008335167f0b9fa6f50000000000000000000000000000000000000000000000000000000081016100e4575f6100a7366004818461136b565b8101906100b491906113b3565b90505f6100c4366024818461136b565b8101906100d191906113d5565b90506100dd82826102c4565b5050610222565b7f587b47f4000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000082160161015c576101356102e7565b60405160200161014591906113f4565b604051602081830303815290604052915050610224565b7f8200a587000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000821601610215575f6101b3366004818461136b565b8101906101c091906113b3565b90506101f08173ffffffffffffffffffffffffffffffffffffffff165f9081526020819052604090205460ff1690565b6040805191151560208301520160405160208183030381529060405292505050610224565b6354c91b875f526004601cfd5b505b915050805190602001f35b61024261023d36600461144d565b6103bb565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020015b60405180910390f35b61028b610286366004611485565b610751565b604051901515815260200161026f565b6102426102a936600461144d565b610761565b6102b6610802565b60405161026f92919061152f565b6102cc6108cf565b806102de576102da82610907565b5050565b6102da82610987565b6040517f66a2489f0000000000000000000000000000000000000000000000000000000081523060048201526060907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906366a2489f906024015f60405180830381865afa158015610371573d5f803e3d5ffd5b505050506040513d5f823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526103b6919081019061166f565b905090565b5f3373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161461042b576040517f979a7ba000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610433610a03565b365f61044260a0850185611709565b909250905083355f80602460c435018035607e81101561046d5763d232fd2c5f52846020526024601cfd5b50602081013560f81c801561048d5763641157745f52846020526024601cfd5b50607d81013560f81c91506007821060018311166009831117156104bc5763267879995f52836020526024601cfd5b6035013560c01c9150428210156104e25763165460715f5281602052826040526044601cfd5b60a435602401358061055657632be762245f526060602052600160405283606052602a6080527f436f6e73696465726174696f6e206d7573742068617665206174206c6561737460a0527f206f6e65206974656d2e0000000000000000000000000000000000000000000060c05260c4601cfd5b505f61056184610a1c565b9050365f610573605d601d898b61136b565b91509150365f600286101561059957610590607e605d8b8d61136b565b915091506105f6565b856007036105c95760a68910156105bb5763d232fd2c5f52876020526024601cfd5b61059060a6605d8b8d61136b565b60928910156105e35763d232fd2c5f52876020526024601cfd5b6105f16092605d8b8d61136b565b915091505b5f61060486898b8686610a85565b90505f61064c610612610b32565b7f19010000000000000000000000000000000000000000000000000000000000005f90815260029190915260228481526042822091905290565b90505f61068e8288888080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250610c0f92505050565b73ffffffffffffffffffffffffffffffffffffffff81165f9081526020819052604090205490915060ff16610712576040517f17c3008900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152602481018c905260440160405180910390fd5b61071d8f6001610c9b565b507f01e4d72a000000000000000000000000000000000000000000000000000000009e9d5050505050505050505050505050565b5f61075b8261119d565b92915050565b5f3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016146107d1576040517f979a7ba000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6107db825f610c9b565b507f17b1f94200000000000000000000000000000000000000000000000000000000919050565b604080516001808252818301909252606091829190816020015b604080518082019091525f81526060602082015281526020019060019003908161081c5790505090506007815f8151811061085957610859611771565b6020908102919091010151525f8080808061087261127d565b9450945094509450945083965084838383604051602001610896949392919061179e565b604051602081830303815290604052865f815181106108b7576108b7611771565b60200260200101516020018190525050505050509091565b7f000000000000000000000000000000000000000000000000000000000000000033811461090457636d5769be5f526004601cfd5b50565b73ffffffffffffffffffffffffffffffffffffffff81165f818152602081815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905590519182527f3525e22824a8a7df2c9a6029941c824cf95b6447f1e13d5128fd3826d35afe8b91015b60405180910390a150565b73ffffffffffffffffffffffffffffffffffffffff81165f818152602081815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905590519182527f47d1c22a25bb3a5d4e481b9b1e6944c2eade3181a0a20b495ed61d35b5323f24910161097c565b602060043514610a1a576346d5d8955f526004601cfd5b565b60c435604581013560601c906044359060a2013560a43560840135828414158415151615610a5d57631bcf9bb75f528360205282604052846060526064601cfd5b808214610a7d5763b36c03e85f528160205280604052846060526064601cfd5b505050919050565b5f7f00000000000000000000000000000000000000000000000000000000000000008686868686604051610aba92919061180c565b604051908190038120610b11959493929160200194855273ffffffffffffffffffffffffffffffffffffffff93909316602085015267ffffffffffffffff9190911660408401526060830152608082015260a00190565b60405160208183030381529060405280519060200120905095945050505050565b5f7f00000000000000000000000000000000000000000000000000000000000000004614610bea575060408051608080517f00000000000000000000000000000000000000000000000000000000000000005f9081527f00000000000000000000000000000000000000000000000000000000000000006020527f0000000000000000000000000000000000000000000000000000000000000000855246606090815230845260a08220949095529093529190915290565b507f000000000000000000000000000000000000000000000000000000000000000090565b5f805f525f82516020840380518260410360018111610c8f57604087015160608801515f1a95508115610c6e57601b8160ff1c0195507f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811660408901525b85885288845260205f60808660015afa5082845284885260408801525f5195505b50905250909392505050565b5f610ca960a0840184611709565b605d818110610cba57610cba611771565b919091013560f81c9150506002811015610cd357505050565b5f610ce160a0850185611709565b610cf091609291607e9161136b565b610cf99161181b565b60601c90505f80806001610d106080890189611863565b5f818110610d2057610d20611771565b610d3692602060a09092020190810191506118c6565b6005811115610d4757610d476118e4565b1115610dde57610d5a6080880188611863565b5f818110610d6a57610d6a611771565b905060a002016020016020810190610d8291906113b3565b9250610d916080880188611863565b5f818110610da157610da1611771565b905060a00201604001359150868060800190610dbd9190611863565b5f818110610dcd57610dcd611771565b905060a00201606001359050610e6b565b610deb6060880188611911565b5f818110610dfb57610dfb611771565b9050608002016020016020810190610e1391906113b3565b9250610e226060880188611911565b5f818110610e3257610e32611771565b905060800201604001359150868060600190610e4e9190611911565b5f818110610e5e57610e5e611771565b9050608002016060013590505b8460ff16600703610fb3575f610e8460a0890189611709565b610e939160a69160929161136b565b610e9c9161181b565b60601c90508615610f30576040517f5079331500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff828116600483015285811660248301528616906350793315906044015f604051808303815f87803b158015610f15575f80fd5b505af1158015610f27573d5f803e3d5ffd5b50505050610fad565b6040517f0ad3889900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152861690630ad38899906024015f604051808303815f87803b158015610f96575f80fd5b505af1158015610fa8573d5f803e3d5ffd5b505050505b50611194565b8460ff166008036110a857851561104d576040517f3a0e316000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff848116600483015260248201849052851690633a0e3160906044015b5f604051808303815f87803b158015611032575f80fd5b505af1158015611044573d5f803e3d5ffd5b50505050611194565b6040517fb89c4b0d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301526024820184905285169063b89c4b0d9060440161101b565b8515611110576040517f28cc113100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff848116600483015260248201849052604482018390528516906328cc11319060640161101b565b6040517fb6e39ba100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301526024820184905285169063b6e39ba1906044015f604051808303815f87803b15801561117d575f80fd5b505af115801561118f573d5f803e3d5ffd5b505050505b50505050505050565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f2e778efc00000000000000000000000000000000000000000000000000000000148061122f57507fffffffff0000000000000000000000000000000000000000000000000000000082167f39dd693300000000000000000000000000000000000000000000000000000000145b8061075b5750507fffffffff00000000000000000000000000000000000000000000000000000000167f01ffc9a7000000000000000000000000000000000000000000000000000000001490565b5f60608060608061128c610b32565b6040517f04789c980000000000000000000000000000000000000000000000000000000081523060048201529095507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906304789c98906024015f60405180830381865afa158015611316573d5f803e3d5ffd5b505050506040513d5f823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820160405261135b91908101906119fc565b9899929891975095509350915050565b5f8085851115611379575f80fd5b83861115611385575f80fd5b5050820193919092039150565b73ffffffffffffffffffffffffffffffffffffffff81168114610904575f80fd5b5f602082840312156113c3575f80fd5b81356113ce81611392565b9392505050565b5f602082840312156113e5575f80fd5b813580151581146113ce575f80fd5b602080825282518282018190525f9190848201906040850190845b8181101561144157835173ffffffffffffffffffffffffffffffffffffffff168352928401929184019160010161140f565b50909695505050505050565b5f6020828403121561145d575f80fd5b813567ffffffffffffffff811115611473575f80fd5b820161014081850312156113ce575f80fd5b5f60208284031215611495575f80fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146113ce575f80fd5b5f5b838110156114de5781810151838201526020016114c6565b50505f910152565b5f81518084526114fd8160208601602086016114c4565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b5f604080835261154260408401866114e6565b6020848203818601528186518084528284019150828160051b8501018389015f5b838110156115c0578683037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe00185528151805184528601518684018990526115ad898501826114e6565b9587019593505090850190600101611563565b50909a9950505050505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715611644576116446115d0565b604052919050565b5f67ffffffffffffffff821115611665576116656115d0565b5060051b60200190565b5f6020808385031215611680575f80fd5b825167ffffffffffffffff811115611696575f80fd5b8301601f810185136116a6575f80fd5b80516116b96116b48261164c565b6115fd565b81815260059190911b820183019083810190878311156116d7575f80fd5b928401925b828410156116fe5783516116ef81611392565b825292840192908401906116dc565b979650505050505050565b5f8083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261173c575f80fd5b83018035915067ffffffffffffffff821115611756575f80fd5b60200191503681900382131561176a575f80fd5b9250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b8481525f6020608060208401526117b860808401876114e6565b8381036040850152855180825260208088019201905f5b818110156117eb578351835292840192918401916001016117cf565b505084810360608601526117ff81876114e6565b9998505050505050505050565b818382375f9101908152919050565b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000813581811691601485101561185b5780818660140360031b1b83161692505b505092915050565b5f8083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112611896575f80fd5b83018035915067ffffffffffffffff8211156118b0575f80fd5b602001915060a08102360382131561176a575f80fd5b5f602082840312156118d6575f80fd5b8135600681106113ce575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b5f8083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112611944575f80fd5b83018035915067ffffffffffffffff82111561195e575f80fd5b6020019150600781901b360382131561176a575f80fd5b5f82601f830112611984575f80fd5b815167ffffffffffffffff81111561199e5761199e6115d0565b6119cf60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116016115fd565b8181528460208386010111156119e3575f80fd5b6119f48260208301602087016114c4565b949350505050565b5f805f805f60a08688031215611a10575f80fd5b8551945060208087015167ffffffffffffffff80821115611a2f575f80fd5b611a3b8a838b01611975565b96506040890151915080821115611a50575f80fd5b611a5c8a838b01611975565b95506060890151915080821115611a71575f80fd5b818901915089601f830112611a84575f80fd5b8151611a926116b48261164c565b81815260059190911b8301840190848101908c831115611ab0575f80fd5b938501935b82851015611ace57845182529385019390850190611ab5565b60808c01519097509450505080831115611ae6575f80fd5b5050611af488828901611975565b915050929550929590935056fea26469706673582212208cf0e76ef76b2bee85dd5f1436a047bf9c87ae5f888e0b194385b99aece78a8664736f6c63430008180033a264697066735822122027405892b69988a0aa1712d639b794ae59695744d701c54a9192918feda50f8264736f6c63430008180033
Deployed Bytecode
0x608060405234801562000010575f80fd5b5060043610620000ec575f3560e01c806366a2489f1162000093578063906c87cc116200006b578063906c87cc1462000223578063ad07dd7e146200023a578063dca093831462000251578063e89fad581462000268575f80fd5b806366a2489f14620001cf5780636d43542114620001f55780637b37e561146200020c575f80fd5b8063515cf7ec11620000c7578063515cf7ec146200017757806351710e45146200019f578063541bbd3214620001b8575f80fd5b806304789c9814620000f05780630eb92516146200012357806314afd79e1462000160575b5f80fd5b620001076200010136600462001674565b6200027f565b6040516200011a95949392919062001706565b60405180910390f35b6200013a620001343660046200186e565b620002ae565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016200011a565b6200013a6200017136600462001674565b62000545565b6200018e6200018836600462001914565b6200057c565b60405190151581526020016200011a565b620001b6620001b036600462001674565b620005c7565b005b620001b6620001c93660046200194a565b62000747565b620001e6620001e036600462001674565b6200078e565b6040516200011a9190620019cd565b620001b66200020636600462001914565b6200082f565b620001b66200021d36600462001674565b620009bd565b6200013a6200023436600462001674565b62000aba565b6200013a6200024b36600462001a28565b62000af4565b620001b66200026236600462001a6e565b62000c40565b620001b6620002793660046200194a565b62000fcb565b5f60608060608062000291866200100b565b6200029c866200106c565b939a9299509097509550909350915050565b5f73ffffffffffffffffffffffffffffffffffffffff8316620002fd576040517f99faaa0400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606082901c33146200033b576040517fcb6e534400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f604051806020016200034e90620015d4565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082820381018352601f9091011660408190526200039190899060200162001abc565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815290829052620003cf929160200162001ad0565b6040516020818303038152906040529050828151826020015ff59150813b620003f6575f80fd5b73ffffffffffffffffffffffffffffffffffffffff8281165f90815260208190526040902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169186169190911781556002810162000458898262001b9d565b506003810162000469888262001b9d565b50600481016200047a878262001b9d565b5060408051608081018252600181526007602082015260089181019190915260096060820152620004b29060058301906004620015e2565b507f106160dca18b77e6926325d074dd8328fbec25f496d6fd313ef44f3e581e2afe8389898988604051620004ec95949392919062001cc6565b60405180910390a160405173ffffffffffffffffffffffffffffffffffffffff808716915f918616907fc8894f26f396ce8c004245c8b7cd1b92103a6e4302fcbab883987149ac01b7ec908390a4505095945050505050565b5f62000551826200100b565b5073ffffffffffffffffffffffffffffffffffffffff9081165f908152602081905260409020541690565b5f62000588836200100b565b5073ffffffffffffffffffffffffffffffffffffffff8083165f90815260208181526040808320938516835260069093019052205460ff165b92915050565b620005d2816200100b565b73ffffffffffffffffffffffffffffffffffffffff8181165f9081526020819052604090206001015416331462000652576040517f88c3a11500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024015b60405180910390fd5b6040515f907f11a3cf439fb225bfe74225716b6774765670ec1060e3796802e62139d69974da908290a273ffffffffffffffffffffffffffffffffffffffff8082165f818152602081905260408082206001810180547fffffffffffffffffffffffff000000000000000000000000000000000000000016905554905133949190911692917fc8894f26f396ce8c004245c8b7cd1b92103a6e4302fcbab883987149ac01b7ec91a473ffffffffffffffffffffffffffffffffffffffff165f90815260208190526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001633179055565b6200075283620012c4565b73ffffffffffffffffffffffffffffffffffffffff83165f908152602081905260409020600481016200078783858362001d33565b5050505050565b60606200079b826200100b565b73ffffffffffffffffffffffffffffffffffffffff82165f90815260208181526040918290206007810180548451818502810185019095528085529193929091908301828280156200082257602002820191905f5260205f20905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311620007f6575b5050505050915050919050565b6200083a82620012c4565b73ffffffffffffffffffffffffffffffffffffffff8116620008a1576040517f3dfa446b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8316600482015260240162000649565b73ffffffffffffffffffffffffffffffffffffffff8083165f9081526020819052604090206001015481169082160362000928576040517fcbc080ca00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff80841660048301528216602482015260440162000649565b60405173ffffffffffffffffffffffffffffffffffffffff8216907f11a3cf439fb225bfe74225716b6774765670ec1060e3796802e62139d69974da905f90a273ffffffffffffffffffffffffffffffffffffffff9182165f90815260208190526040902060010180547fffffffffffffffffffffffff00000000000000000000000000000000000000001691909216179055565b620009c881620012c4565b73ffffffffffffffffffffffffffffffffffffffff8181165f908152602081905260409020600101541662000a42576040517f6b01361600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8216600482015260240162000649565b6040515f907f11a3cf439fb225bfe74225716b6774765670ec1060e3796802e62139d69974da908290a273ffffffffffffffffffffffffffffffffffffffff165f90815260208190526040902060010180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b5f62000ac6826200100b565b5073ffffffffffffffffffffffffffffffffffffffff9081165f908152602081905260409020600101541690565b5f806040518060200162000b0890620015d4565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082820381018352601f90910116604081905262000b4b90869060200162001abc565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529082905262000b89929160200162001ad0565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815282825280516020918201207fff00000000000000000000000000000000000000000000000000000000000000828501523060601b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001660218501526035840196909652605580840196909652815180840390960186526075909201905283519301929092209392505050565b62000c4b83620012c4565b73ffffffffffffffffffffffffffffffffffffffff83165f90815260208190526040902062000c7c81848462001348565b6040517ff460590b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152831515602483015285169063f460590b906044015f604051808303815f87803b15801562000ceb575f80fd5b505af115801562000cfe573d5f803e3d5ffd5b5050505073ffffffffffffffffffffffffffffffffffffffff83165f908152600682016020526040902080546101007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000909116841580157fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16919091179190911790915562000de1576007810180546001810182555f91825260209091200180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff851617905562000f6d565b5f5b600782015481101562000f6b578373ffffffffffffffffffffffffffffffffffffffff1682600701828154811062000e1f5762000e1f62001e56565b5f9182526020909120015473ffffffffffffffffffffffffffffffffffffffff160362000f625760078201805462000e5a9060019062001e83565b8154811062000e6d5762000e6d62001e56565b5f9182526020909120015460078301805473ffffffffffffffffffffffffffffffffffffffff909216918390811062000eaa5762000eaa62001e56565b905f5260205f20015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508160070180548062000f055762000f0562001ebc565b5f8281526020902081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff000000000000000000000000000000000000000016905501905562000f6b565b60010162000de3565b505b6040805173ffffffffffffffffffffffffffffffffffffffff8681168252851660208201528315158183015290517fb658b57f3a8d73a4f3bb96789edcebed831f44d5cc4a513d4416c6bb25ea0e8b9181900360600190a150505050565b62000fd683620012c4565b73ffffffffffffffffffffffffffffffffffffffff83165f908152602081905260409020600381016200078783858362001d33565b73ffffffffffffffffffffffffffffffffffffffff8181165f908152602081905260409020541662001069576040517fb1a69e4800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50565b73ffffffffffffffffffffffffffffffffffffffff81165f908152602081905260408120606090819081908190620010a48762001517565b9550806002018054620010b79062001b02565b80601f0160208091040260200160405190810160405280929190818152602001828054620010e59062001b02565b8015620011345780601f106200110a5761010080835404028352916020019162001134565b820191905f5260205f20905b8154815290600101906020018083116200111657829003601f168201915b505050505094508060030180546200114c9062001b02565b80601f01602080910402602001604051908101604052809291908181526020018280546200117a9062001b02565b8015620011c95780601f106200119f57610100808354040283529160200191620011c9565b820191905f5260205f20905b815481529060010190602001808311620011ab57829003601f168201915b50505050509350806005018054806020026020016040519081016040528092919081815260200182805480156200121e57602002820191905f5260205f20905b81548152602001906001019080831162001209575b50505050509250806004018054620012369062001b02565b80601f0160208091040260200160405190810160405280929190818152602001828054620012649062001b02565b8015620012b35780601f106200128957610100808354040283529160200191620012b3565b820191905f5260205f20905b8154815290600101906020018083116200129557829003601f168201915b505050505091505091939590929450565b620012cf816200100b565b73ffffffffffffffffffffffffffffffffffffffff8181165f9081526020819052604090205416331462001069576040517fd4ed9a1700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8216600482015260240162000649565b73ffffffffffffffffffffffffffffffffffffffff821662001396576040517fb7474e0100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80156200149d5773ffffffffffffffffffffffffffffffffffffffff82165f90815260068401602052604090205460ff161562001418576040517f9fb0d64c00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8316600482015260240162000649565b73ffffffffffffffffffffffffffffffffffffffff82165f908152600684016020526040902054610100900460ff161562001498576040517f9d066d5a00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8316600482015260240162000649565b505050565b73ffffffffffffffffffffffffffffffffffffffff82165f90815260068401602052604090205460ff1662001498576040517fde0cce5000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8316600482015260240162000649565b5f620005c18273ffffffffffffffffffffffffffffffffffffffff81165f9081526020819052604080822090517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f919083906200157990600284019062001ee9565b60408051918290038220608080515f9788526020929092527f88f72b566ae0c96f6fffac4bc8ac74909f61512ac0c06a8124d5ed420d306f90835246606090815298815260a087209390925294909652929094525092915050565b611eab8062001f8283390190565b828054828255905f5260205f2090810192821562001623579160200282015b8281111562001623578251829060ff1690559160200191906001019062001601565b506200163192915062001635565b5090565b5b8082111562001631575f815560010162001636565b803573ffffffffffffffffffffffffffffffffffffffff811681146200166f575f80fd5b919050565b5f6020828403121562001685575f80fd5b62001690826200164b565b9392505050565b5f5b83811015620016b357818101518382015260200162001699565b50505f910152565b5f8151808452620016d481602086016020860162001697565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b8581525f602060a060208401526200172260a0840188620016bb565b8381036040850152620017368188620016bb565b8481036060860152865180825260208089019350909101905f5b818110156200176e5783518352928401929184019160010162001750565b50508481036080860152620017848187620016bb565b9a9950505050505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f82601f830112620017cf575f80fd5b813567ffffffffffffffff80821115620017ed57620017ed62001792565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190828211818310171562001836576200183662001792565b816040528381528660208588010111156200184f575f80fd5b836020870160208301375f602085830101528094505050505092915050565b5f805f805f60a0868803121562001883575f80fd5b853567ffffffffffffffff808211156200189b575f80fd5b620018a989838a01620017bf565b96506020880135915080821115620018bf575f80fd5b620018cd89838a01620017bf565b95506040880135915080821115620018e3575f80fd5b50620018f288828901620017bf565b93505062001903606087016200164b565b949793965091946080013592915050565b5f806040838503121562001926575f80fd5b62001931836200164b565b915062001941602084016200164b565b90509250929050565b5f805f604084860312156200195d575f80fd5b62001968846200164b565b9250602084013567ffffffffffffffff8082111562001985575f80fd5b818601915086601f83011262001999575f80fd5b813581811115620019a8575f80fd5b876020828501011115620019ba575f80fd5b6020830194508093505050509250925092565b602080825282518282018190525f9190848201906040850190845b8181101562001a1c57835173ffffffffffffffffffffffffffffffffffffffff1683529284019291840191600101620019e8565b50909695505050505050565b5f806040838503121562001a3a575f80fd5b823567ffffffffffffffff81111562001a51575f80fd5b62001a5f85828601620017bf565b95602094909401359450505050565b5f805f6060848603121562001a81575f80fd5b62001a8c846200164b565b925062001a9c602085016200164b565b91506040840135801515811462001ab1575f80fd5b809150509250925092565b602081525f620016906020830184620016bb565b5f835162001ae381846020880162001697565b83519083019062001af981836020880162001697565b01949350505050565b600181811c9082168062001b1757607f821691505b60208210810362001b4f577f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b50919050565b601f8211156200149857805f5260205f20601f840160051c8101602085101562001b7c5750805b601f840160051c820191505b8181101562000787575f815560010162001b88565b815167ffffffffffffffff81111562001bba5762001bba62001792565b62001bd28162001bcb845462001b02565b8462001b55565b602080601f83116001811462001c27575f841562001bf05750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b17855562001cbe565b5f858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b8281101562001c755788860151825594840194600190910190840162001c54565b508582101562001cb257878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b505060018460011b0185555b505050505050565b73ffffffffffffffffffffffffffffffffffffffff8616815260a060208201525f62001cf660a0830187620016bb565b828103604084015262001d0a8187620016bb565b9050828103606084015262001d208186620016bb565b9150508260808301529695505050505050565b67ffffffffffffffff83111562001d4e5762001d4e62001792565b62001d668362001d5f835462001b02565b8362001b55565b5f601f84116001811462001db9575f851562001d825750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b17835562000787565b5f838152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08716915b8281101562001e08578685013582556020948501946001909201910162001de6565b508682101562001e44577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b81810381811115620005c1577f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603160045260245ffd5b5f80835462001ef88162001b02565b6001828116801562001f13576001811462001f475762001f75565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008416875282151583028701945062001f75565b875f526020805f205f5b8581101562001f6c5781548a82015290840190820162001f51565b50505082870194505b5092969550505050505056fe600361018052620322e360ec1b6101a0527f88f72b566ae0c96f6fffac4bc8ac74909f61512ac0c06a8124d5ed420d306f9060c0526c08a92a06e626488dedac2d2dc5609b1b6101e09081526b1cdd1c9a5b99c81b985b594b60a21b6101ed526e1cdd1c9a5b99c81d995c9cda5bdb8b608a1b6101f9526f1d5a5b9d0c8d4d8818da185a5b92590b60821b610208527f6164647265737320766572696679696e67436f6e74726163740000000000000061021852602960f81b61023181905260526101c081905290912060e0526b0a6d2cedccac89ee4c8cae4560a31b610252908152711859191c995cdcc8199d5b199a5b1b195c8b60721b61025e52711d5a5b9d0d8d08195e1c1a5c985d1a5bdb8b60721b6102705271189e5d195ccccc881bdc99195c92185cda0b60721b610282526c189e5d195cc818dbdb9d195e1d609a1b610294526102a19190915260506102328190526102a260405290206101005246610120526c68f116a894984e2db1123eb3956101605234801562000183575f80fd5b5060405162001eab38038062001eab833981016040819052620001a69162000235565b336080528051602082012060a052620001ee60e05160a0805160c05160408051608080515f978852602095909552928252466060908152308452948620915293909252905290565b610140526040517f98a7ac23945182ac62b68fbe5ba35cc0bf5c4c34b3a410ce94a4c2270282d6b5905f90a15062000303565b634e487b7160e01b5f52604160045260245ffd5b5f602080838503121562000247575f80fd5b82516001600160401b03808211156200025e575f80fd5b818501915085601f83011262000272575f80fd5b81518181111562000287576200028762000221565b604051601f8201601f19908116603f01168101908382118183101715620002b257620002b262000221565b816040528281528886848701011115620002ca575f80fd5b5f93505b82841015620002ed5784840186015181850187015292850192620002ce565b5f86848301015280965050505050505092915050565b60805160a05160c05160e05161010051610120516101405161016051611b37620003745f395f81816103d4015261077a01525f610bed01525f610b3501525f610a8801525f610b6501525f610bae01525f610b8a01525f8181610318015281816108d101526112bd0152611b375ff3fe608060405234801561000f575f80fd5b506004361061004a575f3560e01c806301e4d72a1461022f57806301ffc9a71461027857806317b1f9421461029b5780632e778efc146102ae575b5f3660607fffffffff000000000000000000000000000000000000000000000000000000008335167f0b9fa6f50000000000000000000000000000000000000000000000000000000081016100e4575f6100a7366004818461136b565b8101906100b491906113b3565b90505f6100c4366024818461136b565b8101906100d191906113d5565b90506100dd82826102c4565b5050610222565b7f587b47f4000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000082160161015c576101356102e7565b60405160200161014591906113f4565b604051602081830303815290604052915050610224565b7f8200a587000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000821601610215575f6101b3366004818461136b565b8101906101c091906113b3565b90506101f08173ffffffffffffffffffffffffffffffffffffffff165f9081526020819052604090205460ff1690565b6040805191151560208301520160405160208183030381529060405292505050610224565b6354c91b875f526004601cfd5b505b915050805190602001f35b61024261023d36600461144d565b6103bb565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020015b60405180910390f35b61028b610286366004611485565b610751565b604051901515815260200161026f565b6102426102a936600461144d565b610761565b6102b6610802565b60405161026f92919061152f565b6102cc6108cf565b806102de576102da82610907565b5050565b6102da82610987565b6040517f66a2489f0000000000000000000000000000000000000000000000000000000081523060048201526060907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906366a2489f906024015f60405180830381865afa158015610371573d5f803e3d5ffd5b505050506040513d5f823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526103b6919081019061166f565b905090565b5f3373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161461042b576040517f979a7ba000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610433610a03565b365f61044260a0850185611709565b909250905083355f80602460c435018035607e81101561046d5763d232fd2c5f52846020526024601cfd5b50602081013560f81c801561048d5763641157745f52846020526024601cfd5b50607d81013560f81c91506007821060018311166009831117156104bc5763267879995f52836020526024601cfd5b6035013560c01c9150428210156104e25763165460715f5281602052826040526044601cfd5b60a435602401358061055657632be762245f526060602052600160405283606052602a6080527f436f6e73696465726174696f6e206d7573742068617665206174206c6561737460a0527f206f6e65206974656d2e0000000000000000000000000000000000000000000060c05260c4601cfd5b505f61056184610a1c565b9050365f610573605d601d898b61136b565b91509150365f600286101561059957610590607e605d8b8d61136b565b915091506105f6565b856007036105c95760a68910156105bb5763d232fd2c5f52876020526024601cfd5b61059060a6605d8b8d61136b565b60928910156105e35763d232fd2c5f52876020526024601cfd5b6105f16092605d8b8d61136b565b915091505b5f61060486898b8686610a85565b90505f61064c610612610b32565b7f19010000000000000000000000000000000000000000000000000000000000005f90815260029190915260228481526042822091905290565b90505f61068e8288888080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250610c0f92505050565b73ffffffffffffffffffffffffffffffffffffffff81165f9081526020819052604090205490915060ff16610712576040517f17c3008900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152602481018c905260440160405180910390fd5b61071d8f6001610c9b565b507f01e4d72a000000000000000000000000000000000000000000000000000000009e9d5050505050505050505050505050565b5f61075b8261119d565b92915050565b5f3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016146107d1576040517f979a7ba000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6107db825f610c9b565b507f17b1f94200000000000000000000000000000000000000000000000000000000919050565b604080516001808252818301909252606091829190816020015b604080518082019091525f81526060602082015281526020019060019003908161081c5790505090506007815f8151811061085957610859611771565b6020908102919091010151525f8080808061087261127d565b9450945094509450945083965084838383604051602001610896949392919061179e565b604051602081830303815290604052865f815181106108b7576108b7611771565b60200260200101516020018190525050505050509091565b7f000000000000000000000000000000000000000000000000000000000000000033811461090457636d5769be5f526004601cfd5b50565b73ffffffffffffffffffffffffffffffffffffffff81165f818152602081815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905590519182527f3525e22824a8a7df2c9a6029941c824cf95b6447f1e13d5128fd3826d35afe8b91015b60405180910390a150565b73ffffffffffffffffffffffffffffffffffffffff81165f818152602081815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905590519182527f47d1c22a25bb3a5d4e481b9b1e6944c2eade3181a0a20b495ed61d35b5323f24910161097c565b602060043514610a1a576346d5d8955f526004601cfd5b565b60c435604581013560601c906044359060a2013560a43560840135828414158415151615610a5d57631bcf9bb75f528360205282604052846060526064601cfd5b808214610a7d5763b36c03e85f528160205280604052846060526064601cfd5b505050919050565b5f7f00000000000000000000000000000000000000000000000000000000000000008686868686604051610aba92919061180c565b604051908190038120610b11959493929160200194855273ffffffffffffffffffffffffffffffffffffffff93909316602085015267ffffffffffffffff9190911660408401526060830152608082015260a00190565b60405160208183030381529060405280519060200120905095945050505050565b5f7f00000000000000000000000000000000000000000000000000000000000000004614610bea575060408051608080517f00000000000000000000000000000000000000000000000000000000000000005f9081527f00000000000000000000000000000000000000000000000000000000000000006020527f0000000000000000000000000000000000000000000000000000000000000000855246606090815230845260a08220949095529093529190915290565b507f000000000000000000000000000000000000000000000000000000000000000090565b5f805f525f82516020840380518260410360018111610c8f57604087015160608801515f1a95508115610c6e57601b8160ff1c0195507f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811660408901525b85885288845260205f60808660015afa5082845284885260408801525f5195505b50905250909392505050565b5f610ca960a0840184611709565b605d818110610cba57610cba611771565b919091013560f81c9150506002811015610cd357505050565b5f610ce160a0850185611709565b610cf091609291607e9161136b565b610cf99161181b565b60601c90505f80806001610d106080890189611863565b5f818110610d2057610d20611771565b610d3692602060a09092020190810191506118c6565b6005811115610d4757610d476118e4565b1115610dde57610d5a6080880188611863565b5f818110610d6a57610d6a611771565b905060a002016020016020810190610d8291906113b3565b9250610d916080880188611863565b5f818110610da157610da1611771565b905060a00201604001359150868060800190610dbd9190611863565b5f818110610dcd57610dcd611771565b905060a00201606001359050610e6b565b610deb6060880188611911565b5f818110610dfb57610dfb611771565b9050608002016020016020810190610e1391906113b3565b9250610e226060880188611911565b5f818110610e3257610e32611771565b905060800201604001359150868060600190610e4e9190611911565b5f818110610e5e57610e5e611771565b9050608002016060013590505b8460ff16600703610fb3575f610e8460a0890189611709565b610e939160a69160929161136b565b610e9c9161181b565b60601c90508615610f30576040517f5079331500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff828116600483015285811660248301528616906350793315906044015f604051808303815f87803b158015610f15575f80fd5b505af1158015610f27573d5f803e3d5ffd5b50505050610fad565b6040517f0ad3889900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152861690630ad38899906024015f604051808303815f87803b158015610f96575f80fd5b505af1158015610fa8573d5f803e3d5ffd5b505050505b50611194565b8460ff166008036110a857851561104d576040517f3a0e316000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff848116600483015260248201849052851690633a0e3160906044015b5f604051808303815f87803b158015611032575f80fd5b505af1158015611044573d5f803e3d5ffd5b50505050611194565b6040517fb89c4b0d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301526024820184905285169063b89c4b0d9060440161101b565b8515611110576040517f28cc113100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff848116600483015260248201849052604482018390528516906328cc11319060640161101b565b6040517fb6e39ba100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301526024820184905285169063b6e39ba1906044015f604051808303815f87803b15801561117d575f80fd5b505af115801561118f573d5f803e3d5ffd5b505050505b50505050505050565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f2e778efc00000000000000000000000000000000000000000000000000000000148061122f57507fffffffff0000000000000000000000000000000000000000000000000000000082167f39dd693300000000000000000000000000000000000000000000000000000000145b8061075b5750507fffffffff00000000000000000000000000000000000000000000000000000000167f01ffc9a7000000000000000000000000000000000000000000000000000000001490565b5f60608060608061128c610b32565b6040517f04789c980000000000000000000000000000000000000000000000000000000081523060048201529095507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906304789c98906024015f60405180830381865afa158015611316573d5f803e3d5ffd5b505050506040513d5f823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820160405261135b91908101906119fc565b9899929891975095509350915050565b5f8085851115611379575f80fd5b83861115611385575f80fd5b5050820193919092039150565b73ffffffffffffffffffffffffffffffffffffffff81168114610904575f80fd5b5f602082840312156113c3575f80fd5b81356113ce81611392565b9392505050565b5f602082840312156113e5575f80fd5b813580151581146113ce575f80fd5b602080825282518282018190525f9190848201906040850190845b8181101561144157835173ffffffffffffffffffffffffffffffffffffffff168352928401929184019160010161140f565b50909695505050505050565b5f6020828403121561145d575f80fd5b813567ffffffffffffffff811115611473575f80fd5b820161014081850312156113ce575f80fd5b5f60208284031215611495575f80fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146113ce575f80fd5b5f5b838110156114de5781810151838201526020016114c6565b50505f910152565b5f81518084526114fd8160208601602086016114c4565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b5f604080835261154260408401866114e6565b6020848203818601528186518084528284019150828160051b8501018389015f5b838110156115c0578683037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe00185528151805184528601518684018990526115ad898501826114e6565b9587019593505090850190600101611563565b50909a9950505050505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715611644576116446115d0565b604052919050565b5f67ffffffffffffffff821115611665576116656115d0565b5060051b60200190565b5f6020808385031215611680575f80fd5b825167ffffffffffffffff811115611696575f80fd5b8301601f810185136116a6575f80fd5b80516116b96116b48261164c565b6115fd565b81815260059190911b820183019083810190878311156116d7575f80fd5b928401925b828410156116fe5783516116ef81611392565b825292840192908401906116dc565b979650505050505050565b5f8083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261173c575f80fd5b83018035915067ffffffffffffffff821115611756575f80fd5b60200191503681900382131561176a575f80fd5b9250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b8481525f6020608060208401526117b860808401876114e6565b8381036040850152855180825260208088019201905f5b818110156117eb578351835292840192918401916001016117cf565b505084810360608601526117ff81876114e6565b9998505050505050505050565b818382375f9101908152919050565b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000813581811691601485101561185b5780818660140360031b1b83161692505b505092915050565b5f8083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112611896575f80fd5b83018035915067ffffffffffffffff8211156118b0575f80fd5b602001915060a08102360382131561176a575f80fd5b5f602082840312156118d6575f80fd5b8135600681106113ce575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b5f8083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112611944575f80fd5b83018035915067ffffffffffffffff82111561195e575f80fd5b6020019150600781901b360382131561176a575f80fd5b5f82601f830112611984575f80fd5b815167ffffffffffffffff81111561199e5761199e6115d0565b6119cf60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116016115fd565b8181528460208386010111156119e3575f80fd5b6119f48260208301602087016114c4565b949350505050565b5f805f805f60a08688031215611a10575f80fd5b8551945060208087015167ffffffffffffffff80821115611a2f575f80fd5b611a3b8a838b01611975565b96506040890151915080821115611a50575f80fd5b611a5c8a838b01611975565b95506060890151915080821115611a71575f80fd5b818901915089601f830112611a84575f80fd5b8151611a926116b48261164c565b81815260059190911b8301840190848101908c831115611ab0575f80fd5b938501935b82851015611ace57845182529385019390850190611ab5565b60808c01519097509450505080831115611ae6575f80fd5b5050611af488828901611975565b915050929550929590935056fea26469706673582212208cf0e76ef76b2bee85dd5f1436a047bf9c87ae5f888e0b194385b99aece78a8664736f6c63430008180033a264697066735822122027405892b69988a0aa1712d639b794ae59695744d701c54a9192918feda50f8264736f6c63430008180033
Deployed Bytecode Sourcemap
826:24019:8:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;18216:521;;;;;;:::i;:::-;;:::i;:::-;;;;;;;;;;;:::i;:::-;;;;;;;;3770:2272;;;;;;:::i;:::-;;:::i;:::-;;;4172:42:16;4160:55;;;4142:74;;4130:2;4115:18;3770:2272:8;3996:226:16;13724:290:8;;;;;;:::i;:::-;;:::i;16033:514::-;;;;;;:::i;:::-;;:::i;:::-;;;4657:14:16;;4650:22;4632:41;;4620:2;4605:18;16033:514:8;4492:187:16;8611:933:8;;;;;;:::i;:::-;;:::i;:::-;;10757:531;;;;;;:::i;:::-;;:::i;15232:489::-;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;6559:904::-;;;;;;:::i;:::-;;:::i;7715:630::-;;;;;;:::i;:::-;;:::i;14470:337::-;;;;;;:::i;:::-;;:::i;16829:903::-;;;;;;:::i;:::-;;:::i;11698:1803::-;;;;;;:::i;:::-;;:::i;9870:513::-;;;;;;:::i;:::-;;:::i;18216:521::-;18359:23;18396:22;18432:25;18471:29;18514:30;18604:23;18622:4;18604:17;:23::i;:::-;18698:32;18725:4;18698:26;:32::i;:::-;18691:39;;;;-1:-1:-1;18691:39:8;;-1:-1:-1;18691:39:8;-1:-1:-1;18691:39:8;;-1:-1:-1;18216:521:8;-1:-1:-1;;18216:521:8:o;3770:2272::-;3982:18;4075:26;;;4071:85;;4124:21;;;;;;;;;;;;;;4071:85;4260:22;;;;4287:10;4252:45;4247:177;;4397:16;;;;;;;;;;;;;;4247:177;4488:39;4560:29;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;4603:20;;4614:8;;4560:29;4603:20;;:::i;:::-;;;;;;;;;;;;;;;4530:103;;;4603:20;4530:103;;:::i;:::-;;;;;;;;;;;;;4488:145;;4881:4;4836:26;4830:33;4785:26;4779:4;4775:37;4756:1;4731:168;4717:182;;4935:10;4923:23;4913:79;;4976:1;4973;4966:12;4913:79;5139:46;;;;5087:49;5139:46;;;;;;;;;;5263:41;;;;;;;;;;;;;5344:29;;;:40;5376:8;5344:29;:40;:::i;:::-;-1:-1:-1;5427:32:8;;;:46;5462:11;5427:32;:46;:::i;:::-;-1:-1:-1;5521:37:8;;;:56;5561:16;5521:37;:56;:::i;:::-;-1:-1:-1;5619:48:8;;;;;;;;5656:1;5619:48;;5659:1;5619:48;;;;5662:1;5619:48;;;;;;;5665:1;5619:48;;;;;;:33;;;;:48;;:::i;:::-;;5746:140;5771:10;5795:8;5817:11;5842:16;5872:4;5746:140;;;;;;;;;;:::i;:::-;;;;;;;;5977:58;;;;;;;6018:1;;5977:58;;;;;6018:1;;5977:58;4002:2040;;3770:2272;;;;;;;:::o;13724:290::-;13801:13;13878:23;13896:4;13878:17;:23::i;:::-;-1:-1:-1;13983:18:8;;;;:12;:18;;;;;;;;;;:24;;;13724:290::o;16033:514::-;16141:4;16209:23;16227:4;16209:17;:23::i;:::-;-1:-1:-1;16390:18:8;;;;16338:49;16390:18;;;;;;;;;;;16497:36;;;;;:28;;;;:36;;;:43;;;16033:514;;;;;:::o;8611:933::-;8730:23;8748:4;8730:17;:23::i;:::-;8857:18;;;;:12;:18;;;;;;;;;;:33;;;;8843:10;:47;8839:197;;8991:34;;;;;4172:42:16;4160:55;;8991:34:8;;;4142:74:16;4115:18;;8991:34:8;;;;;;;;8839:197;9130:33;;9160:1;;9130:33;;9160:1;;9130:33;9238:18;;;;9282:1;9238:18;;;;;;;;;;;:33;;;:46;;;;;;9400:24;9373:64;;9426:10;;9400:24;;;;;9238:18;9373:64;;;9500:18;;:12;:18;;;;;;;;;;:37;;;;9527:10;9500:37;;;8611:933::o;10757:531::-;10949:30;10974:4;10949:24;:30::i;:::-;11137:18;;;11085:49;11137:18;;;;;;;;;;11225:37;;;:56;11265:16;;11225:37;:56;:::i;:::-;;10877:411;10757:531;;;:::o;15232:489::-;15318:24;15406:23;15424:4;15406:17;:23::i;:::-;15587:18;;;15535:49;15587:18;;;;;;;;;;;;15677:37;;;15667:47;;;;;;;;;;;;;;;;;15587:18;;15667:47;15677:37;;15667:47;;;15677:37;15667:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;15344:377;15232:489;;;:::o;6559:904::-;6752:30;6777:4;6752:24;:30::i;:::-;6866:31;;;6862:105;;6920:36;;;;;4172:42:16;4160:55;;6920:36:8;;;4142:74:16;4115:18;;6920:36:8;3996:226:16;6862:105:8;7064:18;;;;:12;:18;;;;;;;;;;:33;;;;;7043:54;;;;7039:144;;7120:52;;;;;12626:42:16;12695:15;;;7120:52:8;;;12677:34:16;12747:15;;12727:18;;;12720:43;12589:18;;7120:52:8;12442:327:16;7039:144:8;7277:40;;;;;;;;;;;7403:18;;;;:12;:18;;;;;;;;;;:33;;:53;;;;;;;;;;;6559:904::o;7715:630::-;7865:30;7890:4;7865:24;:30::i;:::-;7975:47;:18;;;8020:1;7975:18;;;;;;;;;;:33;;;;7971:119;;8045:34;;;;;4172:42:16;4160:55;;8045:34:8;;;4142:74:16;4115:18;;8045:34:8;3996:226:16;7971:119:8;8184:33;;8214:1;;8184:33;;8214:1;;8184:33;8292:18;;8336:1;8292:18;;;;;;;;;;:33;;:46;;;;;;7715:630::o;14470:337::-;14557:22;14643:23;14661:4;14643:17;:23::i;:::-;-1:-1:-1;14767:18:8;;;;:12;:18;;;;;;;;;;:33;;;;;14470:337::o;16829:903::-;16938:22;17016:39;17115:29;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;17162:20;;17173:8;;17115:29;17162:20;;:::i;:::-;;;;;;;;;;;;;;;17081:115;;;17162:20;17081:115;;:::i;:::-;;;;;;;;;;;;;;17058:148;;17081:115;17058:148;;;;17485:12;17439:222;;;12985:92:16;17535:4:8;13114:2:16;13110:15;13127:66;13106:88;13093:11;;;13086:109;13211:12;;;13204:28;;;;13248:12;;;;13241:28;;;;17439:222:8;;;;;;;;;;13285:12:16;;;;17439:222:8;;17404:279;;;;;;;;;;-1:-1:-1;;;16829:903:8:o;11698:1803::-;11883:30;11908:4;11883:24;:30::i;:::-;12071:18;;;12019:49;12071:18;;;;;;;;;;12140:62;12071:18;12187:6;12195;12140:24;:62::i;:::-;12262:54;;;;;:38;13494:55:16;;;12262:54:8;;;13476:74:16;13593:14;;13586:22;13566:18;;;13559:50;12262:38:8;;;;;13449:18:16;;12262:54:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;12369:36:8;;;;;;;:28;;;:36;;;;;:52;;;12431:60;;;;12369:52;;;;12431:60;;;;;;;;;;;;;12570:809;;12596:37;;;:50;;;;;;;-1:-1:-1;12596:50:8;;;;;;;;;;;;;;;;;;12570:809;;;12758:9;12736:633;12793:37;;;:44;12789:48;;12736:633;;;12920:6;12876:50;;:20;:37;;12914:1;12876:40;;;;;;;;:::i;:::-;;;;;;;;;;;;;:50;12872:411;;13039:37;;;13102:44;;:48;;13149:1;;13102:48;:::i;:::-;13039:133;;;;;;;;:::i;:::-;;;;;;;;;;;12950:37;;;:86;;13039:133;;;;;13013:1;;12950:86;;;;;;:::i;:::-;;;;;;;;;:222;;;;;;;;;;;;;;;;;;13194:20;:37;;:43;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;13259:5;;12872:411;13333:3;;12736:633;;;;12570:809;13459:35;;;14491:42:16;14560:15;;;14542:34;;14612:15;;14607:2;14592:18;;14585:43;14671:14;;14664:22;14644:18;;;14637:50;13459:35:8;;;;;;;14469:2:16;13459:35:8;;;11811:1690;11698:1803;;;:::o;9870:513::-;10055:30;10080:4;10055:24;:30::i;:::-;10243:18;;;10191:49;10243:18;;;;;;;;;;10327:32;;;:49;10362:14;;10327:32;:49;:::i;23010:269::-;23147:38;:18;;;23183:1;23147:18;;;;;;;;;;:24;;23143:130;;23254:8;;;;;;;;;;;;;;23143:130;23010:269;:::o;19221:769::-;19643:18;;;19345:23;19643:18;;;;;;;;;;19382:22;;;;;;;;19731;19656:4;19731:16;:22::i;:::-;19713:40;;19774:20;:29;;19763:40;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;19827:20;:32;;19813:46;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;19884:20;:33;;19869:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;19946:20;:37;;19927:56;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;19545:445;19221:769;;;;;;;:::o;22444:402::-;22567:23;22585:4;22567:17;:23::i;:::-;22692:18;;;;:12;:18;;;;;;;;;;:24;;22678:10;:38;22674:166;;22807:22;;;;;4172:42:16;4160:55;;22807:22:8;;;4142:74:16;4115:18;;22807:22:8;3996:226:16;23856:987:8;24093:20;;;24089:85;;24136:27;;;;;;;;;;;;;;24089:85;24231:6;24227:610;;;24311:36;;;;;;;:28;;;:36;;;;;:43;;;24307:115;;;24381:26;;;;;4172:42:16;4160:55;;24381:26:8;;;4142:74:16;4115:18;;24381:26:8;3996:226:16;24307:115:8;24503:36;;;;;;;:28;;;:36;;;;;:53;;;;;;24499:133;;;24583:34;;;;;4172:42:16;4160:55;;24583:34:8;;;4142:74:16;4115:18;;24583:34:8;3996:226:16;24499:133:8;23856:987;;;:::o;24227:610::-;24718:36;;;;;;;:28;;;:36;;;;;:43;;;24713:114;;24788:24;;;;;4172:42:16;4160:55;;24788:24:8;;;4142:74:16;4115:18;;24788:24:8;3996:226:16;20308:151:8;20371:7;20424:28;20447:4;20902:18;;;20707:23;20902:18;;;;;;;;;;;20949:47;;20761:24;;20902:18;20707:23;;20949:47;;20965:29;;;;20949:47;:::i;:::-;;;;;;;;;;21402:8;21396:15;;21006:19;21504;;;21543:7;21536:25;;;;21028:13;21574:29;;21694:9;-1:-1:-1;21675:29:8;;;21808:23;;;21955:9;21942:23;;22027:48;;;;22135:19;;;;22210:26;;;;-1:-1:-1;21942:23:8;20624:1628;-1:-1:-1;;20624:1628:8:o;-1:-1:-1:-;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;14:196:16;82:20;;142:42;131:54;;121:65;;111:93;;200:1;197;190:12;111:93;14:196;;;:::o;215:186::-;274:6;327:2;315:9;306:7;302:23;298:32;295:52;;;343:1;340;333:12;295:52;366:29;385:9;366:29;:::i;:::-;356:39;215:186;-1:-1:-1;;;215:186:16:o;406:250::-;491:1;501:113;515:6;512:1;509:13;501:113;;;591:11;;;585:18;572:11;;;565:39;537:2;530:10;501:113;;;-1:-1:-1;;648:1:16;630:16;;623:27;406:250::o;661:330::-;703:3;741:5;735:12;768:6;763:3;756:19;784:76;853:6;846:4;841:3;837:14;830:4;823:5;819:16;784:76;:::i;:::-;905:2;893:15;910:66;889:88;880:98;;;;980:4;876:109;;661:330;-1:-1:-1;;661:330:16:o;996:1131::-;1347:6;1336:9;1329:25;1310:4;1373:2;1411:3;1406:2;1395:9;1391:18;1384:31;1438:46;1479:3;1468:9;1464:19;1456:6;1438:46;:::i;:::-;1532:9;1524:6;1520:22;1515:2;1504:9;1500:18;1493:50;1566:33;1592:6;1584;1566:33;:::i;:::-;1635:22;;;1630:2;1615:18;;1608:50;1707:13;;1729:22;;;1779:2;1805:15;;;;-1:-1:-1;1767:15:16;;;;1838:1;1848:169;1862:6;1859:1;1856:13;1848:169;;;1923:13;;1911:26;;1992:15;;;;1957:12;;;;1884:1;1877:9;1848:169;;;1852:3;;2063:9;2058:3;2054:19;2048:3;2037:9;2033:19;2026:48;2091:30;2117:3;2109:6;2091:30;:::i;:::-;2083:38;996:1131;-1:-1:-1;;;;;;;;;;996:1131:16:o;2132:184::-;2184:77;2181:1;2174:88;2281:4;2278:1;2271:15;2305:4;2302:1;2295:15;2321:778;2364:5;2417:3;2410:4;2402:6;2398:17;2394:27;2384:55;;2435:1;2432;2425:12;2384:55;2471:6;2458:20;2497:18;2534:2;2530;2527:10;2524:36;;;2540:18;;:::i;:::-;2674:2;2668:9;2736:4;2728:13;;2579:66;2724:22;;;2748:2;2720:31;2716:40;2704:53;;;2772:18;;;2792:22;;;2769:46;2766:72;;;2818:18;;:::i;:::-;2858:10;2854:2;2847:22;2893:2;2885:6;2878:18;2939:3;2932:4;2927:2;2919:6;2915:15;2911:26;2908:35;2905:55;;;2956:1;2953;2946:12;2905:55;3020:2;3013:4;3005:6;3001:17;2994:4;2986:6;2982:17;2969:54;3067:1;3060:4;3055:2;3047:6;3043:15;3039:26;3032:37;3087:6;3078:15;;;;;;2321:778;;;;:::o;3104:887::-;3229:6;3237;3245;3253;3261;3314:3;3302:9;3293:7;3289:23;3285:33;3282:53;;;3331:1;3328;3321:12;3282:53;3371:9;3358:23;3400:18;3441:2;3433:6;3430:14;3427:34;;;3457:1;3454;3447:12;3427:34;3480:50;3522:7;3513:6;3502:9;3498:22;3480:50;:::i;:::-;3470:60;;3583:2;3572:9;3568:18;3555:32;3539:48;;3612:2;3602:8;3599:16;3596:36;;;3628:1;3625;3618:12;3596:36;3651:52;3695:7;3684:8;3673:9;3669:24;3651:52;:::i;:::-;3641:62;;3756:2;3745:9;3741:18;3728:32;3712:48;;3785:2;3775:8;3772:16;3769:36;;;3801:1;3798;3791:12;3769:36;;3824:52;3868:7;3857:8;3846:9;3842:24;3824:52;:::i;:::-;3814:62;;;3895:38;3929:2;3918:9;3914:18;3895:38;:::i;:::-;3104:887;;;;-1:-1:-1;3104:887:16;;3980:3;3965:19;3952:33;;3104:887;-1:-1:-1;;3104:887:16:o;4227:260::-;4295:6;4303;4356:2;4344:9;4335:7;4331:23;4327:32;4324:52;;;4372:1;4369;4362:12;4324:52;4395:29;4414:9;4395:29;:::i;:::-;4385:39;;4443:38;4477:2;4466:9;4462:18;4443:38;:::i;:::-;4433:48;;4227:260;;;;;:::o;4684:666::-;4764:6;4772;4780;4833:2;4821:9;4812:7;4808:23;4804:32;4801:52;;;4849:1;4846;4839:12;4801:52;4872:29;4891:9;4872:29;:::i;:::-;4862:39;;4952:2;4941:9;4937:18;4924:32;4975:18;5016:2;5008:6;5005:14;5002:34;;;5032:1;5029;5022:12;5002:34;5070:6;5059:9;5055:22;5045:32;;5115:7;5108:4;5104:2;5100:13;5096:27;5086:55;;5137:1;5134;5127:12;5086:55;5177:2;5164:16;5203:2;5195:6;5192:14;5189:34;;;5219:1;5216;5209:12;5189:34;5264:7;5259:2;5250:6;5246:2;5242:15;5238:24;5235:37;5232:57;;;5285:1;5282;5275:12;5232:57;5316:2;5312;5308:11;5298:21;;5338:6;5328:16;;;;;4684:666;;;;;:::o;5355:681::-;5526:2;5578:21;;;5648:13;;5551:18;;;5670:22;;;5497:4;;5526:2;5749:15;;;;5723:2;5708:18;;;5497:4;5792:218;5806:6;5803:1;5800:13;5792:218;;;5871:13;;5886:42;5867:62;5855:75;;5985:15;;;;5950:12;;;;5828:1;5821:9;5792:218;;;-1:-1:-1;6027:3:16;;5355:681;-1:-1:-1;;;;;;5355:681:16:o;6041:390::-;6119:6;6127;6180:2;6168:9;6159:7;6155:23;6151:32;6148:52;;;6196:1;6193;6186:12;6148:52;6236:9;6223:23;6269:18;6261:6;6258:30;6255:50;;;6301:1;6298;6291:12;6255:50;6324;6366:7;6357:6;6346:9;6342:22;6324:50;:::i;:::-;6314:60;6421:2;6406:18;;;;6393:32;;-1:-1:-1;;;;6041:390:16:o;6436:421::-;6510:6;6518;6526;6579:2;6567:9;6558:7;6554:23;6550:32;6547:52;;;6595:1;6592;6585:12;6547:52;6618:29;6637:9;6618:29;:::i;:::-;6608:39;;6666:38;6700:2;6689:9;6685:18;6666:38;:::i;:::-;6656:48;;6754:2;6743:9;6739:18;6726:32;6801:5;6794:13;6787:21;6780:5;6777:32;6767:60;;6823:1;6820;6813:12;6767:60;6846:5;6836:15;;;6436:421;;;;;:::o;6862:220::-;7011:2;7000:9;6993:21;6974:4;7031:45;7072:2;7061:9;7057:18;7049:6;7031:45;:::i;7087:492::-;7262:3;7300:6;7294:13;7316:66;7375:6;7370:3;7363:4;7355:6;7351:17;7316:66;:::i;:::-;7445:13;;7404:16;;;;7467:70;7445:13;7404:16;7514:4;7502:17;;7467:70;:::i;:::-;7553:20;;7087:492;-1:-1:-1;;;;7087:492:16:o;7584:437::-;7663:1;7659:12;;;;7706;;;7727:61;;7781:4;7773:6;7769:17;7759:27;;7727:61;7834:2;7826:6;7823:14;7803:18;7800:38;7797:218;;7871:77;7868:1;7861:88;7972:4;7969:1;7962:15;8000:4;7997:1;7990:15;7797:218;;7584:437;;;:::o;8152:518::-;8254:2;8249:3;8246:11;8243:421;;;8290:5;8287:1;8280:16;8334:4;8331:1;8321:18;8404:2;8392:10;8388:19;8385:1;8381:27;8375:4;8371:38;8440:4;8428:10;8425:20;8422:47;;;-1:-1:-1;8463:4:16;8422:47;8518:2;8513:3;8509:12;8506:1;8502:20;8496:4;8492:31;8482:41;;8573:81;8591:2;8584:5;8581:13;8573:81;;;8650:1;8636:16;;8617:1;8606:13;8573:81;;8906:1464;9032:3;9026:10;9059:18;9051:6;9048:30;9045:56;;;9081:18;;:::i;:::-;9110:97;9200:6;9160:38;9192:4;9186:11;9160:38;:::i;:::-;9154:4;9110:97;:::i;:::-;9262:4;;9319:2;9308:14;;9336:1;9331:782;;;;10157:1;10174:6;10171:89;;;-1:-1:-1;10226:19:16;;;10220:26;10171:89;8812:66;8803:1;8799:11;;;8795:84;8791:89;8781:100;8887:1;8883:11;;;8778:117;10273:81;;9301:1063;;9331:782;8099:1;8092:14;;;8136:4;8123:18;;9379:66;9367:79;;;9544:236;9558:7;9555:1;9552:14;9544:236;;;9647:19;;;9641:26;9626:42;;9739:27;;;;9707:1;9695:14;;;;9574:19;;9544:236;;;9548:3;9808:6;9799:7;9796:19;9793:261;;;9869:19;;;9863:26;9970:66;9952:1;9948:14;;;9964:3;9944:24;9940:97;9936:102;9921:118;9906:134;;9793:261;;;10100:1;10091:6;10088:1;10084:14;10080:22;10074:4;10067:36;9301:1063;;;;;8906:1464;;:::o;10375:740::-;10688:42;10680:6;10676:55;10665:9;10658:74;10768:3;10763:2;10752:9;10748:18;10741:31;10639:4;10795:46;10836:3;10825:9;10821:19;10813:6;10795:46;:::i;:::-;10889:9;10881:6;10877:22;10872:2;10861:9;10857:18;10850:50;10923:33;10949:6;10941;10923:33;:::i;:::-;10909:47;;11004:9;10996:6;10992:22;10987:2;10976:9;10972:18;10965:50;11032:33;11058:6;11050;11032:33;:::i;:::-;11024:41;;;11102:6;11096:3;11085:9;11081:19;11074:35;10375:740;;;;;;;;:::o;11120:1317::-;11244:18;11239:3;11236:27;11233:53;;;11266:18;;:::i;:::-;11295:94;11385:3;11345:38;11377:4;11371:11;11345:38;:::i;:::-;11339:4;11295:94;:::i;:::-;11415:1;11440:2;11435:3;11432:11;11457:1;11452:727;;;;12223:1;12240:3;12237:93;;;-1:-1:-1;12296:19:16;;;12283:33;12237:93;8812:66;8803:1;8799:11;;;8795:84;8791:89;8781:100;8887:1;8883:11;;;8778:117;12343:78;;11425:1006;;11452:727;8099:1;8092:14;;;8136:4;8123:18;;11497:66;11488:76;;;11662:229;11676:7;11673:1;11670:14;11662:229;;;11765:19;;;11752:33;11737:49;;11872:4;11857:20;;;;11825:1;11813:14;;;;11692:12;11662:229;;;11666:3;11919;11910:7;11907:16;11904:219;;;12039:66;12033:3;12027;12024:1;12020:11;12016:21;12012:94;12008:99;11995:9;11990:3;11986:19;11973:33;11969:139;11961:6;11954:155;11904:219;;;12166:1;12160:3;12157:1;12153:11;12149:19;12143:4;12136:33;11425:1006;;11120:1317;;;:::o;13620:184::-;13672:77;13669:1;13662:88;13769:4;13766:1;13759:15;13793:4;13790:1;13783:15;13809:282;13876:9;;;13897:11;;;13894:191;;;13941:77;13938:1;13931:88;14042:4;14039:1;14032:15;14070:4;14067:1;14060:15;14096:184;14148:77;14145:1;14138:88;14245:4;14242:1;14235:15;14269:4;14266:1;14259:15;14698:903;14828:3;14857:1;14890:6;14884:13;14920:36;14946:9;14920:36;:::i;:::-;14975:1;14992:17;;;15018:191;;;;15223:1;15218:358;;;;14985:591;;15018:191;15066:66;15055:9;15051:82;15046:3;15039:95;15189:6;15182:14;15175:22;15167:6;15163:35;15158:3;15154:45;15147:52;;15018:191;;15218:358;15249:6;15246:1;15239:17;15279:4;15324;15321:1;15311:18;15351:1;15365:165;15379:6;15376:1;15373:13;15365:165;;;15457:14;;15444:11;;;15437:35;15500:16;;;;15394:10;;15365:165;;;15369:3;;;15559:6;15554:3;15550:16;15543:23;;14985:591;-1:-1:-1;15592:3:16;;14698:903;-1:-1:-1;;;;;;14698:903:16:o
Swarm Source
ipfs://27405892b69988a0aa1712d639b794ae59695744d701c54a9192918feda50f82
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.