Overview
ETH Balance
0 ETH
ETH Value
$0.00More Info
Private Name Tags
ContractCreator
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
0xb88890c8c3edc9c2a2f4aff72113c2bbdc2d5c7aa8e75cff98055c3f4eed7d58 | - | (pending) | 42 days ago | IN | 0 ETH | (Pending) | |||
0xdc4cece08b3955b57e051e69021254db9894ca243558411f33173930e9f817d1 | - | (pending) | 42 days ago | IN | 0 ETH | (Pending) | |||
0x87426ed7ad00d7038d213b793a96095158b675d25044706ca432e6473270ac9c | - | (pending) | 42 days ago | IN | 0 ETH | (Pending) | |||
0x95abb59795b41f87618e59247b557e310747bbf43d3f9a132d3852a6a6360158 | - | (pending) | 42 days ago | IN | 0 ETH | (Pending) | |||
0xf521ad0442bd147a469660374f95f5ac0627ce7268f5f26de670cb05931f98f2 | - | (pending) | 42 days ago | IN | 0 ETH | (Pending) | |||
Attest By Delega... | 11627812 | 8 hrs ago | IN | 0 ETH | 0.00002947 | ||||
Attest By Delega... | 11616735 | 18 hrs ago | IN | 0 ETH | 0.00003858 | ||||
Attest By Delega... | 11613936 | 20 hrs ago | IN | 0 ETH | 0.00004402 | ||||
Attest By Delega... | 11609756 | 24 hrs ago | IN | 0 ETH | 0.00002828 | ||||
Attest By Delega... | 11605617 | 27 hrs ago | IN | 0 ETH | 0.00002531 | ||||
Attest By Delega... | 11595372 | 37 hrs ago | IN | 0 ETH | 0.00003556 | ||||
Attest By Delega... | 11590064 | 41 hrs ago | IN | 0 ETH | 0.00001781 | ||||
Attest By Delega... | 11587362 | 43 hrs ago | IN | 0 ETH | 0.00004388 | ||||
Attest By Delega... | 11586364 | 44 hrs ago | IN | 0 ETH | 0.00001715 | ||||
Attest By Delega... | 11586359 | 44 hrs ago | IN | 0 ETH | 0.00001723 | ||||
Attest By Delega... | 11585276 | 45 hrs ago | IN | 0 ETH | 0.00001463 | ||||
Attest By Delega... | 11585276 | 45 hrs ago | IN | 0 ETH | 0.00001465 | ||||
Attest By Delega... | 11585275 | 45 hrs ago | IN | 0 ETH | 0.00001455 | ||||
Attest By Delega... | 11585275 | 45 hrs ago | IN | 0 ETH | 0.00001465 | ||||
Attest By Delega... | 11585247 | 45 hrs ago | IN | 0 ETH | 0.00001595 | ||||
Attest By Delega... | 11585245 | 45 hrs ago | IN | 0 ETH | 0.0000159 | ||||
Attest By Delega... | 11585238 | 45 hrs ago | IN | 0 ETH | 0.00001598 | ||||
Attest By Delega... | 11585237 | 45 hrs ago | IN | 0 ETH | 0.00001515 | ||||
Attest By Delega... | 11585235 | 45 hrs ago | IN | 0 ETH | 0.00001491 | ||||
Attest By Delega... | 11585234 | 45 hrs ago | IN | 0 ETH | 0.00001526 |
Loading...
Loading
Contract Name:
AttesterProxy
Compiler Version
v0.8.19+commit.7dd6d404
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.19; import { EIP712Proxy, AttestationRequest, RevocationRequest, DelegatedProxyAttestationRequest } from "@eas/contracts/eip712/proxy/EIP712Proxy.sol"; import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; import {AccessDenied} from "@eas/contracts/Common.sol"; import {IEAS, Attestation} from "@eas/contracts/IEAS.sol"; /// @title AttesterProxy /// @notice An EIP712 proxy that allows only specific addresses to attest. /// Based on PermissionedEIP712Proxy in the EAS repo. contract AttesterProxy is EIP712Proxy, Ownable { // The global EAS contract. IEAS private immutable _eas; // Authorized badge attester accounts. mapping(address => bool) public isAttester; /// @dev Creates a new PermissionedEIP712Proxy instance. /// @param eas The address of the global EAS contract. constructor(IEAS eas) EIP712Proxy(eas, "AttesterProxy") { _eas = eas; } /// @notice Enables or disables a given attester. /// @param attester The attester address. /// @param enable True if enable, false if disable. function toggleAttester(address attester, bool enable) external onlyOwner { isAttester[attester] = enable; } /// @inheritdoc EIP712Proxy function attestByDelegation(DelegatedProxyAttestationRequest calldata delegatedRequest) public payable override returns (bytes32) { // Ensure that only the owner is allowed to delegate attestations. _verifyAttester(delegatedRequest.attester); // Ensure that only the recipient can submit delegated attestation transactions. if (msg.sender != delegatedRequest.data.recipient) { revert AccessDenied(); } return super.attestByDelegation(delegatedRequest); } /// @notice Create attestation through the proxy. /// @param request The arguments of the attestation request. /// @return The UID of the new attestation. function attest(AttestationRequest calldata request) external returns (bytes32) { _verifyAttester(msg.sender); return _eas.attest(request); } /// @notice Revoke attestation through the proxy. /// @param request The arguments of the revocation request. function revoke(RevocationRequest calldata request) external { _verifyAttester(msg.sender); _eas.revoke(request); } /// @dev Ensures that only the allowed attester can attest. /// @param attester The attester to verify. function _verifyAttester(address attester) private view { if (!isAttester[attester]) { revert AccessDenied(); } } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.19; import { EIP712 } from "@openzeppelin/contracts/utils/cryptography/EIP712.sol"; import { ECDSA } from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; // prettier-ignore import { AccessDenied, DeadlineExpired, Signature, InvalidEAS, InvalidLength, InvalidSignature, NotFound, NO_EXPIRATION_TIME, uncheckedInc } from "../../Common.sol"; // prettier-ignore import { AttestationRequest, AttestationRequestData, DelegatedAttestationRequest, DelegatedRevocationRequest, IEAS, MultiAttestationRequest, MultiDelegatedAttestationRequest, MultiDelegatedRevocationRequest, MultiRevocationRequest, RevocationRequest, RevocationRequestData } from "../../IEAS.sol"; import { Semver } from "../../Semver.sol"; /// @notice A struct representing the full arguments of the full delegated attestation request. struct DelegatedProxyAttestationRequest { bytes32 schema; // The unique identifier of the schema. AttestationRequestData data; // The arguments of the attestation request. Signature signature; // The EIP712 signature data. address attester; // The attesting account. uint64 deadline; // The deadline of the signature/request. } /// @notice A struct representing the full arguments of the delegated multi attestation request. struct MultiDelegatedProxyAttestationRequest { bytes32 schema; // The unique identifier of the schema. AttestationRequestData[] data; // The arguments of the attestation requests. Signature[] signatures; // The EIP712 signatures data. Please note that the signatures are assumed to be signed with increasing nonces. address attester; // The attesting account. uint64 deadline; // The deadline of the signature/request. } /// @notice A struct representing the arguments of the full delegated revocation request. struct DelegatedProxyRevocationRequest { bytes32 schema; // The unique identifier of the schema. RevocationRequestData data; // The arguments of the revocation request. Signature signature; // The EIP712 signature data. address revoker; // The revoking account. uint64 deadline; // The deadline of the signature/request. } /// @notice A struct representing the full arguments of the delegated multi revocation request. struct MultiDelegatedProxyRevocationRequest { bytes32 schema; // The unique identifier of the schema. RevocationRequestData[] data; // The arguments of the revocation requests. Signature[] signatures; // The EIP712 signatures data. Please note that the signatures are assumed to be signed with increasing nonces. address revoker; // The revoking account. uint64 deadline; // The deadline of the signature/request. } /// @title EIP712Proxy /// @notice This utility contract an be used to aggregate delegated attestations without requiring a specific order via /// nonces. The contract doesn't request nonces and implements replay protection by storing ***immalleable*** /// signatures. contract EIP712Proxy is Semver, EIP712 { error UsedSignature(); // The hash of the data type used to relay calls to the attest function. It's the value of // keccak256("Attest(address attester,bytes32 schema,address recipient,uint64 expirationTime,bool revocable,bytes32 refUID,bytes data,uint256 value,uint64 deadline)"). bytes32 private constant ATTEST_PROXY_TYPEHASH = 0xea02ffba7dcb45f6fc649714d23f315eef12e3b27f9a7735d8d8bf41eb2b1af1; // The hash of the data type used to relay calls to the revoke function. It's the value of // keccak256("Revoke(address revoker,bytes32 schema,bytes32 uid,uint256 value,uint64 deadline)"). bytes32 private constant REVOKE_PROXY_TYPEHASH = 0x78a69a78c1a55cdff5cbf949580b410778cd9e4d1ecbe6f06a7fa8dc2441b57d; // The global EAS contract. IEAS private immutable _eas; // The user readable name of the signing domain. string private _name; // The global mapping between proxy attestations and their attesters, so that we can verify that only the original // attester is able to revert attestations by proxy. mapping(bytes32 uid => address attester) private _attesters; // Replay protection signatures. mapping(bytes signature => bool used) private _signatures; /// @dev Creates a new EIP1271Verifier instance. /// @param eas The address of the global EAS contract. /// @param name The user readable name of the signing domain. constructor(IEAS eas, string memory name) Semver(1, 3, 0) EIP712(name, "1.3.0") { if (address(eas) == address(0)) { revert InvalidEAS(); } _eas = eas; _name = name; } /// @notice Returns the EAS. function getEAS() external view returns (IEAS) { return _eas; } /// @notice Returns the domain separator used in the encoding of the signatures for attest, and revoke. function getDomainSeparator() external view returns (bytes32) { return _domainSeparatorV4(); } /// Returns the EIP712 type hash for the attest function. function getAttestTypeHash() external pure returns (bytes32) { return ATTEST_PROXY_TYPEHASH; } /// Returns the EIP712 type hash for the revoke function. function getRevokeTypeHash() external pure returns (bytes32) { return REVOKE_PROXY_TYPEHASH; } /// Returns the EIP712 name. function getName() external view returns (string memory) { return _name; } /// Returns the attester for a given uid. function getAttester(bytes32 uid) external view returns (address) { return _attesters[uid]; } /// @notice Attests to a specific schema via the provided EIP712 signature. /// @param delegatedRequest The arguments of the delegated attestation request. /// @return The UID of the new attestation. /// /// Example: /// attestByDelegation({ /// schema: '0x8e72f5bc0a8d4be6aa98360baa889040c50a0e51f32dbf0baa5199bd93472ebc', /// data: { /// recipient: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266', /// expirationTime: 1673891048, /// revocable: true, /// refUID: '0x0000000000000000000000000000000000000000000000000000000000000000', /// data: '0x1234', /// value: 0 /// }, /// signature: { /// v: 28, /// r: '0x148c...b25b', /// s: '0x5a72...be22' /// }, /// attester: '0xc5E8740aD971409492b1A63Db8d83025e0Fc427e', /// deadline: 1673891048 /// }) function attestByDelegation( DelegatedProxyAttestationRequest calldata delegatedRequest ) public payable virtual returns (bytes32) { _verifyAttest(delegatedRequest); bytes32 uid = _eas.attest{ value: msg.value }( AttestationRequest({ schema: delegatedRequest.schema, data: delegatedRequest.data }) ); _attesters[uid] = delegatedRequest.attester; return uid; } /// @notice Attests to multiple schemas using via provided EIP712 signatures. /// @param multiDelegatedRequests The arguments of the delegated multi attestation requests. The requests should be /// grouped by distinct schema ids to benefit from the best batching optimization. /// @return The UIDs of the new attestations. /// /// Example: /// multiAttestByDelegation([{ /// schema: '0x8e72f5bc0a8d4be6aa98360baa889040c50a0e51f32dbf0baa5199bd93472ebc', /// data: [{ /// recipient: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266', /// expirationTime: 1673891048, /// revocable: true, /// refUID: '0x0000000000000000000000000000000000000000000000000000000000000000', /// data: '0x1234', /// value: 0 /// }, /// { /// recipient: '0xdEADBeAFdeAdbEafdeadbeafDeAdbEAFdeadbeaf', /// expirationTime: 0, /// revocable: false, /// refUID: '0x0000000000000000000000000000000000000000000000000000000000000000', /// data: '0x00', /// value: 0 /// }], /// signatures: [{ /// v: 28, /// r: '0x148c...b25b', /// s: '0x5a72...be22' /// }, /// { /// v: 28, /// r: '0x487s...67bb', /// s: '0x12ad...2366' /// }], /// attester: '0x1D86495b2A7B524D747d2839b3C645Bed32e8CF4', /// deadline: 1673891048 /// }]) function multiAttestByDelegation( MultiDelegatedProxyAttestationRequest[] calldata multiDelegatedRequests ) public payable virtual returns (bytes32[] memory) { uint256 length = multiDelegatedRequests.length; MultiAttestationRequest[] memory multiRequests = new MultiAttestationRequest[](length); for (uint256 i = 0; i < length; i = uncheckedInc(i)) { MultiDelegatedProxyAttestationRequest calldata multiDelegatedRequest = multiDelegatedRequests[i]; AttestationRequestData[] calldata data = multiDelegatedRequest.data; // Ensure that no inputs are missing. uint256 dataLength = data.length; if (dataLength == 0 || dataLength != multiDelegatedRequest.signatures.length) { revert InvalidLength(); } // Verify EIP712 signatures. Please note that the signatures are assumed to be signed with increasing nonces. for (uint256 j = 0; j < dataLength; j = uncheckedInc(j)) { _verifyAttest( DelegatedProxyAttestationRequest({ schema: multiDelegatedRequest.schema, data: data[j], signature: multiDelegatedRequest.signatures[j], attester: multiDelegatedRequest.attester, deadline: multiDelegatedRequest.deadline }) ); } multiRequests[i] = MultiAttestationRequest({ schema: multiDelegatedRequest.schema, data: data }); } bytes32[] memory uids = _eas.multiAttest{ value: msg.value }(multiRequests); // Store all attesters, according to the order of the attestation requests. uint256 uidCounter = 0; for (uint256 i = 0; i < length; i = uncheckedInc(i)) { MultiDelegatedProxyAttestationRequest calldata multiDelegatedRequest = multiDelegatedRequests[i]; AttestationRequestData[] calldata data = multiDelegatedRequest.data; uint256 dataLength = data.length; for (uint256 j = 0; j < dataLength; j = uncheckedInc(j)) { _attesters[uids[uidCounter]] = multiDelegatedRequest.attester; unchecked { ++uidCounter; } } } return uids; } /// @notice Revokes an existing attestation to a specific schema via the provided EIP712 signature. /// @param delegatedRequest The arguments of the delegated revocation request. /// /// Example: /// revokeByDelegation({ /// schema: '0x8e72f5bc0a8d4be6aa98360baa889040c50a0e51f32dbf0baa5199bd93472ebc', /// data: { /// uid: '0xcbbc12102578c642a0f7b34fe7111e41afa25683b6cd7b5a14caf90fa14d24ba', /// value: 0 /// }, /// signature: { /// v: 27, /// r: '0xb593...7142', /// s: '0x0f5b...2cce' /// }, /// revoker: '0x244934dd3e31bE2c81f84ECf0b3E6329F5381992', /// deadline: 1673891048 /// }) function revokeByDelegation(DelegatedProxyRevocationRequest calldata delegatedRequest) public payable virtual { _verifyRevoke(delegatedRequest); return _eas.revoke{ value: msg.value }( RevocationRequest({ schema: delegatedRequest.schema, data: delegatedRequest.data }) ); } /// @notice Revokes existing attestations to multiple schemas via provided EIP712 signatures. /// @param multiDelegatedRequests The arguments of the delegated multi revocation attestation requests. The requests /// should be grouped by distinct schema ids to benefit from the best batching optimization. /// /// Example: /// multiRevokeByDelegation([{ /// schema: '0x8e72f5bc0a8d4be6aa98360baa889040c50a0e51f32dbf0baa5199bd93472ebc', /// data: [{ /// uid: '0x211296a1ca0d7f9f2cfebf0daaa575bea9b20e968d81aef4e743d699c6ac4b25', /// value: 1000 /// }, /// { /// uid: '0xe160ac1bd3606a287b4d53d5d1d6da5895f65b4b4bab6d93aaf5046e48167ade', /// value: 0 /// }], /// signatures: [{ /// v: 28, /// r: '0x148c...b25b', /// s: '0x5a72...be22' /// }, /// { /// v: 28, /// r: '0x487s...67bb', /// s: '0x12ad...2366' /// }], /// revoker: '0x244934dd3e31bE2c81f84ECf0b3E6329F5381992', /// deadline: 1673891048 /// }]) function multiRevokeByDelegation( MultiDelegatedProxyRevocationRequest[] calldata multiDelegatedRequests ) public payable virtual { uint256 length = multiDelegatedRequests.length; MultiRevocationRequest[] memory multiRequests = new MultiRevocationRequest[](length); for (uint256 i = 0; i < length; i = uncheckedInc(i)) { MultiDelegatedProxyRevocationRequest memory multiDelegatedRequest = multiDelegatedRequests[i]; RevocationRequestData[] memory data = multiDelegatedRequest.data; // Ensure that no inputs are missing. uint256 dataLength = data.length; if (dataLength == 0 || dataLength != multiDelegatedRequest.signatures.length) { revert InvalidLength(); } // Verify EIP712 signatures. Please note that the signatures are assumed to be signed with increasing nonces. for (uint256 j = 0; j < dataLength; j = uncheckedInc(j)) { RevocationRequestData memory requestData = data[j]; _verifyRevoke( DelegatedProxyRevocationRequest({ schema: multiDelegatedRequest.schema, data: requestData, signature: multiDelegatedRequest.signatures[j], revoker: multiDelegatedRequest.revoker, deadline: multiDelegatedRequest.deadline }) ); } multiRequests[i] = MultiRevocationRequest({ schema: multiDelegatedRequest.schema, data: data }); } _eas.multiRevoke{ value: msg.value }(multiRequests); } /// @dev Verifies delegated attestation request. /// @param request The arguments of the delegated attestation request. function _verifyAttest(DelegatedProxyAttestationRequest memory request) internal { if (request.deadline != NO_EXPIRATION_TIME && request.deadline < _time()) { revert DeadlineExpired(); } AttestationRequestData memory data = request.data; Signature memory signature = request.signature; _verifyUnusedSignature(signature); bytes32 digest = _hashTypedDataV4( keccak256( abi.encode( ATTEST_PROXY_TYPEHASH, request.attester, request.schema, data.recipient, data.expirationTime, data.revocable, data.refUID, keccak256(data.data), data.value, request.deadline ) ) ); if (ECDSA.recover(digest, signature.v, signature.r, signature.s) != request.attester) { revert InvalidSignature(); } } /// @dev Verifies delegated revocation request. /// @param request The arguments of the delegated revocation request. function _verifyRevoke(DelegatedProxyRevocationRequest memory request) internal { if (request.deadline != NO_EXPIRATION_TIME && request.deadline < _time()) { revert DeadlineExpired(); } RevocationRequestData memory data = request.data; // Allow only original attesters to revoke their attestations. address attester = _attesters[data.uid]; if (attester == address(0)) { revert NotFound(); } if (attester != msg.sender) { revert AccessDenied(); } Signature memory signature = request.signature; _verifyUnusedSignature(signature); bytes32 digest = _hashTypedDataV4( keccak256( abi.encode( REVOKE_PROXY_TYPEHASH, request.revoker, request.schema, data.uid, data.value, request.deadline ) ) ); if (ECDSA.recover(digest, signature.v, signature.r, signature.s) != request.revoker) { revert InvalidSignature(); } } /// @dev Ensures that the provided EIP712 signature wasn't already used. /// @param signature The EIP712 signature data. function _verifyUnusedSignature(Signature memory signature) internal { bytes memory packedSignature = abi.encodePacked(signature.v, signature.r, signature.s); if (_signatures[packedSignature]) { revert UsedSignature(); } _signatures[packedSignature] = true; } /// @dev Returns the current's block timestamp. This method is overridden during tests and used to simulate the /// current block time. function _time() internal view virtual returns (uint64) { return uint64(block.timestamp); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; // A representation of an empty/uninitialized UID. bytes32 constant EMPTY_UID = 0; // A zero expiration represents an non-expiring attestation. uint64 constant NO_EXPIRATION_TIME = 0; error AccessDenied(); error DeadlineExpired(); error InvalidEAS(); error InvalidLength(); error InvalidSignature(); error NotFound(); /// @notice A struct representing ECDSA signature data. struct Signature { uint8 v; // The recovery ID. bytes32 r; // The x-coordinate of the nonce R. bytes32 s; // The signature data. } /// @notice A struct representing a single attestation. struct Attestation { bytes32 uid; // A unique identifier of the attestation. bytes32 schema; // The unique identifier of the schema. uint64 time; // The time when the attestation was created (Unix timestamp). uint64 expirationTime; // The time when the attestation expires (Unix timestamp). uint64 revocationTime; // The time when the attestation was revoked (Unix timestamp). bytes32 refUID; // The UID of the related attestation. address recipient; // The recipient of the attestation. address attester; // The attester/sender of the attestation. bool revocable; // Whether the attestation is revocable. bytes data; // Custom attestation data. } /// @notice A helper function to work with unchecked iterators in loops. function uncheckedInc(uint256 i) pure returns (uint256 j) { unchecked { j = i + 1; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import { ISchemaRegistry } from "./ISchemaRegistry.sol"; import { Attestation, Signature } from "./Common.sol"; /// @notice A struct representing the arguments of the attestation request. struct AttestationRequestData { address recipient; // The recipient of the attestation. uint64 expirationTime; // The time when the attestation expires (Unix timestamp). bool revocable; // Whether the attestation is revocable. bytes32 refUID; // The UID of the related attestation. bytes data; // Custom attestation data. uint256 value; // An explicit ETH amount to send to the resolver. This is important to prevent accidental user errors. } /// @notice A struct representing the full arguments of the attestation request. struct AttestationRequest { bytes32 schema; // The unique identifier of the schema. AttestationRequestData data; // The arguments of the attestation request. } /// @notice A struct representing the full arguments of the full delegated attestation request. struct DelegatedAttestationRequest { bytes32 schema; // The unique identifier of the schema. AttestationRequestData data; // The arguments of the attestation request. Signature signature; // The ECDSA signature data. address attester; // The attesting account. uint64 deadline; // The deadline of the signature/request. } /// @notice A struct representing the full arguments of the multi attestation request. struct MultiAttestationRequest { bytes32 schema; // The unique identifier of the schema. AttestationRequestData[] data; // The arguments of the attestation request. } /// @notice A struct representing the full arguments of the delegated multi attestation request. struct MultiDelegatedAttestationRequest { bytes32 schema; // The unique identifier of the schema. AttestationRequestData[] data; // The arguments of the attestation requests. Signature[] signatures; // The ECDSA signatures data. Please note that the signatures are assumed to be signed with increasing nonces. address attester; // The attesting account. uint64 deadline; // The deadline of the signature/request. } /// @notice A struct representing the arguments of the revocation request. struct RevocationRequestData { bytes32 uid; // The UID of the attestation to revoke. uint256 value; // An explicit ETH amount to send to the resolver. This is important to prevent accidental user errors. } /// @notice A struct representing the full arguments of the revocation request. struct RevocationRequest { bytes32 schema; // The unique identifier of the schema. RevocationRequestData data; // The arguments of the revocation request. } /// @notice A struct representing the arguments of the full delegated revocation request. struct DelegatedRevocationRequest { bytes32 schema; // The unique identifier of the schema. RevocationRequestData data; // The arguments of the revocation request. Signature signature; // The ECDSA signature data. address revoker; // The revoking account. uint64 deadline; // The deadline of the signature/request. } /// @notice A struct representing the full arguments of the multi revocation request. struct MultiRevocationRequest { bytes32 schema; // The unique identifier of the schema. RevocationRequestData[] data; // The arguments of the revocation request. } /// @notice A struct representing the full arguments of the delegated multi revocation request. struct MultiDelegatedRevocationRequest { bytes32 schema; // The unique identifier of the schema. RevocationRequestData[] data; // The arguments of the revocation requests. Signature[] signatures; // The ECDSA signatures data. Please note that the signatures are assumed to be signed with increasing nonces. address revoker; // The revoking account. uint64 deadline; // The deadline of the signature/request. } /// @title IEAS /// @notice EAS - Ethereum Attestation Service interface. interface IEAS { /// @notice Emitted when an attestation has been made. /// @param recipient The recipient of the attestation. /// @param attester The attesting account. /// @param uid The UID the revoked attestation. /// @param schemaUID The UID of the schema. event Attested(address indexed recipient, address indexed attester, bytes32 uid, bytes32 indexed schemaUID); /// @notice Emitted when an attestation has been revoked. /// @param recipient The recipient of the attestation. /// @param attester The attesting account. /// @param schemaUID The UID of the schema. /// @param uid The UID the revoked attestation. event Revoked(address indexed recipient, address indexed attester, bytes32 uid, bytes32 indexed schemaUID); /// @notice Emitted when a data has been timestamped. /// @param data The data. /// @param timestamp The timestamp. event Timestamped(bytes32 indexed data, uint64 indexed timestamp); /// @notice Emitted when a data has been revoked. /// @param revoker The address of the revoker. /// @param data The data. /// @param timestamp The timestamp. event RevokedOffchain(address indexed revoker, bytes32 indexed data, uint64 indexed timestamp); /// @notice Returns the address of the global schema registry. /// @return The address of the global schema registry. function getSchemaRegistry() external view returns (ISchemaRegistry); /// @notice Attests to a specific schema. /// @param request The arguments of the attestation request. /// @return The UID of the new attestation. /// /// Example: /// attest({ /// schema: "0facc36681cbe2456019c1b0d1e7bedd6d1d40f6f324bf3dd3a4cef2999200a0", /// data: { /// recipient: "0xdEADBeAFdeAdbEafdeadbeafDeAdbEAFdeadbeaf", /// expirationTime: 0, /// revocable: true, /// refUID: "0x0000000000000000000000000000000000000000000000000000000000000000", /// data: "0xF00D", /// value: 0 /// } /// }) function attest(AttestationRequest calldata request) external payable returns (bytes32); /// @notice Attests to a specific schema via the provided ECDSA signature. /// @param delegatedRequest The arguments of the delegated attestation request. /// @return The UID of the new attestation. /// /// Example: /// attestByDelegation({ /// schema: '0x8e72f5bc0a8d4be6aa98360baa889040c50a0e51f32dbf0baa5199bd93472ebc', /// data: { /// recipient: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266', /// expirationTime: 1673891048, /// revocable: true, /// refUID: '0x0000000000000000000000000000000000000000000000000000000000000000', /// data: '0x1234', /// value: 0 /// }, /// signature: { /// v: 28, /// r: '0x148c...b25b', /// s: '0x5a72...be22' /// }, /// attester: '0xc5E8740aD971409492b1A63Db8d83025e0Fc427e', /// deadline: 1673891048 /// }) function attestByDelegation( DelegatedAttestationRequest calldata delegatedRequest ) external payable returns (bytes32); /// @notice Attests to multiple schemas. /// @param multiRequests The arguments of the multi attestation requests. The requests should be grouped by distinct /// schema ids to benefit from the best batching optimization. /// @return The UIDs of the new attestations. /// /// Example: /// multiAttest([{ /// schema: '0x33e9094830a5cba5554d1954310e4fbed2ef5f859ec1404619adea4207f391fd', /// data: [{ /// recipient: '0xdEADBeAFdeAdbEafdeadbeafDeAdbEAFdeadbeaf', /// expirationTime: 1673891048, /// revocable: true, /// refUID: '0x0000000000000000000000000000000000000000000000000000000000000000', /// data: '0x1234', /// value: 1000 /// }, /// { /// recipient: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266', /// expirationTime: 0, /// revocable: false, /// refUID: '0x480df4a039efc31b11bfdf491b383ca138b6bde160988222a2a3509c02cee174', /// data: '0x00', /// value: 0 /// }], /// }, /// { /// schema: '0x5ac273ce41e3c8bfa383efe7c03e54c5f0bff29c9f11ef6ffa930fc84ca32425', /// data: [{ /// recipient: '0xdEADBeAFdeAdbEafdeadbeafDeAdbEAFdeadbeaf', /// expirationTime: 0, /// revocable: true, /// refUID: '0x75bf2ed8dca25a8190c50c52db136664de25b2449535839008ccfdab469b214f', /// data: '0x12345678', /// value: 0 /// }, /// }]) function multiAttest(MultiAttestationRequest[] calldata multiRequests) external payable returns (bytes32[] memory); /// @notice Attests to multiple schemas using via provided ECDSA signatures. /// @param multiDelegatedRequests The arguments of the delegated multi attestation requests. The requests should be /// grouped by distinct schema ids to benefit from the best batching optimization. /// @return The UIDs of the new attestations. /// /// Example: /// multiAttestByDelegation([{ /// schema: '0x8e72f5bc0a8d4be6aa98360baa889040c50a0e51f32dbf0baa5199bd93472ebc', /// data: [{ /// recipient: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266', /// expirationTime: 1673891048, /// revocable: true, /// refUID: '0x0000000000000000000000000000000000000000000000000000000000000000', /// data: '0x1234', /// value: 0 /// }, /// { /// recipient: '0xdEADBeAFdeAdbEafdeadbeafDeAdbEAFdeadbeaf', /// expirationTime: 0, /// revocable: false, /// refUID: '0x0000000000000000000000000000000000000000000000000000000000000000', /// data: '0x00', /// value: 0 /// }], /// signatures: [{ /// v: 28, /// r: '0x148c...b25b', /// s: '0x5a72...be22' /// }, /// { /// v: 28, /// r: '0x487s...67bb', /// s: '0x12ad...2366' /// }], /// attester: '0x1D86495b2A7B524D747d2839b3C645Bed32e8CF4', /// deadline: 1673891048 /// }]) function multiAttestByDelegation( MultiDelegatedAttestationRequest[] calldata multiDelegatedRequests ) external payable returns (bytes32[] memory); /// @notice Revokes an existing attestation to a specific schema. /// @param request The arguments of the revocation request. /// /// Example: /// revoke({ /// schema: '0x8e72f5bc0a8d4be6aa98360baa889040c50a0e51f32dbf0baa5199bd93472ebc', /// data: { /// uid: '0x101032e487642ee04ee17049f99a70590c735b8614079fc9275f9dd57c00966d', /// value: 0 /// } /// }) function revoke(RevocationRequest calldata request) external payable; /// @notice Revokes an existing attestation to a specific schema via the provided ECDSA signature. /// @param delegatedRequest The arguments of the delegated revocation request. /// /// Example: /// revokeByDelegation({ /// schema: '0x8e72f5bc0a8d4be6aa98360baa889040c50a0e51f32dbf0baa5199bd93472ebc', /// data: { /// uid: '0xcbbc12102578c642a0f7b34fe7111e41afa25683b6cd7b5a14caf90fa14d24ba', /// value: 0 /// }, /// signature: { /// v: 27, /// r: '0xb593...7142', /// s: '0x0f5b...2cce' /// }, /// revoker: '0x244934dd3e31bE2c81f84ECf0b3E6329F5381992', /// deadline: 1673891048 /// }) function revokeByDelegation(DelegatedRevocationRequest calldata delegatedRequest) external payable; /// @notice Revokes existing attestations to multiple schemas. /// @param multiRequests The arguments of the multi revocation requests. The requests should be grouped by distinct /// schema ids to benefit from the best batching optimization. /// /// Example: /// multiRevoke([{ /// schema: '0x8e72f5bc0a8d4be6aa98360baa889040c50a0e51f32dbf0baa5199bd93472ebc', /// data: [{ /// uid: '0x211296a1ca0d7f9f2cfebf0daaa575bea9b20e968d81aef4e743d699c6ac4b25', /// value: 1000 /// }, /// { /// uid: '0xe160ac1bd3606a287b4d53d5d1d6da5895f65b4b4bab6d93aaf5046e48167ade', /// value: 0 /// }], /// }, /// { /// schema: '0x5ac273ce41e3c8bfa383efe7c03e54c5f0bff29c9f11ef6ffa930fc84ca32425', /// data: [{ /// uid: '0x053d42abce1fd7c8fcddfae21845ad34dae287b2c326220b03ba241bc5a8f019', /// value: 0 /// }, /// }]) function multiRevoke(MultiRevocationRequest[] calldata multiRequests) external payable; /// @notice Revokes existing attestations to multiple schemas via provided ECDSA signatures. /// @param multiDelegatedRequests The arguments of the delegated multi revocation attestation requests. The requests /// should be grouped by distinct schema ids to benefit from the best batching optimization. /// /// Example: /// multiRevokeByDelegation([{ /// schema: '0x8e72f5bc0a8d4be6aa98360baa889040c50a0e51f32dbf0baa5199bd93472ebc', /// data: [{ /// uid: '0x211296a1ca0d7f9f2cfebf0daaa575bea9b20e968d81aef4e743d699c6ac4b25', /// value: 1000 /// }, /// { /// uid: '0xe160ac1bd3606a287b4d53d5d1d6da5895f65b4b4bab6d93aaf5046e48167ade', /// value: 0 /// }], /// signatures: [{ /// v: 28, /// r: '0x148c...b25b', /// s: '0x5a72...be22' /// }, /// { /// v: 28, /// r: '0x487s...67bb', /// s: '0x12ad...2366' /// }], /// revoker: '0x244934dd3e31bE2c81f84ECf0b3E6329F5381992', /// deadline: 1673891048 /// }]) function multiRevokeByDelegation( MultiDelegatedRevocationRequest[] calldata multiDelegatedRequests ) external payable; /// @notice Timestamps the specified bytes32 data. /// @param data The data to timestamp. /// @return The timestamp the data was timestamped with. function timestamp(bytes32 data) external returns (uint64); /// @notice Timestamps the specified multiple bytes32 data. /// @param data The data to timestamp. /// @return The timestamp the data was timestamped with. function multiTimestamp(bytes32[] calldata data) external returns (uint64); /// @notice Revokes the specified bytes32 data. /// @param data The data to timestamp. /// @return The timestamp the data was revoked with. function revokeOffchain(bytes32 data) external returns (uint64); /// @notice Revokes the specified multiple bytes32 data. /// @param data The data to timestamp. /// @return The timestamp the data was revoked with. function multiRevokeOffchain(bytes32[] calldata data) external returns (uint64); /// @notice Returns an existing attestation by UID. /// @param uid The UID of the attestation to retrieve. /// @return The attestation data members. function getAttestation(bytes32 uid) external view returns (Attestation memory); /// @notice Checks whether an attestation exists. /// @param uid The UID of the attestation to retrieve. /// @return Whether an attestation exists. function isAttestationValid(bytes32 uid) external view returns (bool); /// @notice Returns the timestamp that the specified data was timestamped with. /// @param data The data to query. /// @return The timestamp the data was timestamped with. function getTimestamp(bytes32 data) external view returns (uint64); /// @notice Returns the timestamp that the specified data was timestamped with. /// @param data The data to query. /// @return The timestamp the data was timestamped with. function getRevokeOffchain(address revoker, bytes32 data) external view returns (uint64); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/EIP712.sol) pragma solidity ^0.8.8; import "./ECDSA.sol"; import "../ShortStrings.sol"; import "../../interfaces/IERC5267.sol"; /** * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data. * * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible, * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding * they need in their contracts using a combination of `abi.encode` and `keccak256`. * * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA * ({_hashTypedDataV4}). * * The implementation of the domain separator was designed to be as efficient as possible while still properly updating * the chain id to protect against replay attacks on an eventual fork of the chain. * * NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask]. * * NOTE: In the upgradeable version of this contract, the cached values will correspond to the address, and the domain * separator of the implementation contract. This will cause the `_domainSeparatorV4` function to always rebuild the * separator from the immutable values, which is cheaper than accessing a cached version in cold storage. * * _Available since v3.4._ * * @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment */ abstract contract EIP712 is IERC5267 { using ShortStrings for *; bytes32 private constant _TYPE_HASH = keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"); // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to // invalidate the cached domain separator if the chain id changes. bytes32 private immutable _cachedDomainSeparator; uint256 private immutable _cachedChainId; address private immutable _cachedThis; bytes32 private immutable _hashedName; bytes32 private immutable _hashedVersion; ShortString private immutable _name; ShortString private immutable _version; string private _nameFallback; string private _versionFallback; /** * @dev Initializes the domain separator and parameter caches. * * The meaning of `name` and `version` is specified in * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]: * * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol. * - `version`: the current major version of the signing domain. * * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart * contract upgrade]. */ constructor(string memory name, string memory version) { _name = name.toShortStringWithFallback(_nameFallback); _version = version.toShortStringWithFallback(_versionFallback); _hashedName = keccak256(bytes(name)); _hashedVersion = keccak256(bytes(version)); _cachedChainId = block.chainid; _cachedDomainSeparator = _buildDomainSeparator(); _cachedThis = address(this); } /** * @dev Returns the domain separator for the current chain. */ function _domainSeparatorV4() internal view returns (bytes32) { if (address(this) == _cachedThis && block.chainid == _cachedChainId) { return _cachedDomainSeparator; } else { return _buildDomainSeparator(); } } function _buildDomainSeparator() private view returns (bytes32) { return keccak256(abi.encode(_TYPE_HASH, _hashedName, _hashedVersion, block.chainid, address(this))); } /** * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this * function returns the hash of the fully encoded EIP712 message for this domain. * * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example: * * ```solidity * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode( * keccak256("Mail(address to,string contents)"), * mailTo, * keccak256(bytes(mailContents)) * ))); * address signer = ECDSA.recover(digest, signature); * ``` */ function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) { return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash); } /** * @dev See {EIP-5267}. * * _Available since v4.9._ */ function eip712Domain() public view virtual override returns ( bytes1 fields, string memory name, string memory version, uint256 chainId, address verifyingContract, bytes32 salt, uint256[] memory extensions ) { return ( hex"0f", // 01111 _name.toStringWithFallback(_nameFallback), _version.toStringWithFallback(_versionFallback), block.chainid, address(this), bytes32(0), new uint256[](0) ); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../Strings.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV // Deprecated in v4.8 } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. /// @solidity memory-safe-assembly assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError) { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); uint8 v = uint8((uint256(vs) >> 255) + 27); return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 message) { // 32 is the length in bytes of hash, // enforced by the type signature above /// @solidity memory-safe-assembly assembly { mstore(0x00, "\x19Ethereum Signed Message:\n32") mstore(0x1c, hash) message := keccak256(0x00, 0x3c) } } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 data) { /// @solidity memory-safe-assembly assembly { let ptr := mload(0x40) mstore(ptr, "\x19\x01") mstore(add(ptr, 0x02), domainSeparator) mstore(add(ptr, 0x22), structHash) data := keccak256(ptr, 0x42) } } /** * @dev Returns an Ethereum Signed Data with intended validator, created from a * `validator` and `data` according to the version 0 of EIP-191. * * See {recover}. */ function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x00", validator, data)); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import { Strings } from "@openzeppelin/contracts/utils/Strings.sol"; /// @title Semver /// @notice A simple contract for managing contract versions. contract Semver { // Contract's major version number. uint256 private immutable _major; // Contract's minor version number. uint256 private immutable _minor; // Contract's patch version number. uint256 private immutable _path; /// @dev Create a new Semver instance. /// @param major Major version number. /// @param minor Minor version number. /// @param patch Patch version number. constructor(uint256 major, uint256 minor, uint256 patch) { _major = major; _minor = minor; _path = patch; } /// @notice Returns the full semver contract version. /// @return Semver contract version as a string. function version() external view returns (string memory) { return string( abi.encodePacked(Strings.toString(_major), ".", Strings.toString(_minor), ".", Strings.toString(_path)) ); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import { ISchemaResolver } from "./resolver/ISchemaResolver.sol"; /// @notice A struct representing a record for a submitted schema. struct SchemaRecord { bytes32 uid; // The unique identifier of the schema. ISchemaResolver resolver; // Optional schema resolver. bool revocable; // Whether the schema allows revocations explicitly. string schema; // Custom specification of the schema (e.g., an ABI). } /// @title ISchemaRegistry /// @notice The interface of global attestation schemas for the Ethereum Attestation Service protocol. interface ISchemaRegistry { /// @notice Emitted when a new schema has been registered /// @param uid The schema UID. /// @param registerer The address of the account used to register the schema. /// @param schema The schema data. event Registered(bytes32 indexed uid, address indexed registerer, SchemaRecord schema); /// @notice Submits and reserves a new schema /// @param schema The schema data schema. /// @param resolver An optional schema resolver. /// @param revocable Whether the schema allows revocations explicitly. /// @return The UID of the new schema. function register(string calldata schema, ISchemaResolver resolver, bool revocable) external returns (bytes32); /// @notice Returns an existing schema by UID /// @param uid The UID of the schema to retrieve. /// @return The schema data members. function getSchema(bytes32 uid) external view returns (SchemaRecord memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/ShortStrings.sol) pragma solidity ^0.8.8; import "./StorageSlot.sol"; // | string | 0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | // | length | 0x BB | type ShortString is bytes32; /** * @dev This library provides functions to convert short memory strings * into a `ShortString` type that can be used as an immutable variable. * * Strings of arbitrary length can be optimized using this library if * they are short enough (up to 31 bytes) by packing them with their * length (1 byte) in a single EVM word (32 bytes). Additionally, a * fallback mechanism can be used for every other case. * * Usage example: * * ```solidity * contract Named { * using ShortStrings for *; * * ShortString private immutable _name; * string private _nameFallback; * * constructor(string memory contractName) { * _name = contractName.toShortStringWithFallback(_nameFallback); * } * * function name() external view returns (string memory) { * return _name.toStringWithFallback(_nameFallback); * } * } * ``` */ library ShortStrings { // Used as an identifier for strings longer than 31 bytes. bytes32 private constant _FALLBACK_SENTINEL = 0x00000000000000000000000000000000000000000000000000000000000000FF; error StringTooLong(string str); error InvalidShortString(); /** * @dev Encode a string of at most 31 chars into a `ShortString`. * * This will trigger a `StringTooLong` error is the input string is too long. */ function toShortString(string memory str) internal pure returns (ShortString) { bytes memory bstr = bytes(str); if (bstr.length > 31) { revert StringTooLong(str); } return ShortString.wrap(bytes32(uint256(bytes32(bstr)) | bstr.length)); } /** * @dev Decode a `ShortString` back to a "normal" string. */ function toString(ShortString sstr) internal pure returns (string memory) { uint256 len = byteLength(sstr); // using `new string(len)` would work locally but is not memory safe. string memory str = new string(32); /// @solidity memory-safe-assembly assembly { mstore(str, len) mstore(add(str, 0x20), sstr) } return str; } /** * @dev Return the length of a `ShortString`. */ function byteLength(ShortString sstr) internal pure returns (uint256) { uint256 result = uint256(ShortString.unwrap(sstr)) & 0xFF; if (result > 31) { revert InvalidShortString(); } return result; } /** * @dev Encode a string into a `ShortString`, or write it to storage if it is too long. */ function toShortStringWithFallback(string memory value, string storage store) internal returns (ShortString) { if (bytes(value).length < 32) { return toShortString(value); } else { StorageSlot.getStringSlot(store).value = value; return ShortString.wrap(_FALLBACK_SENTINEL); } } /** * @dev Decode a string that was encoded to `ShortString` or written to storage using {setWithFallback}. */ function toStringWithFallback(ShortString value, string storage store) internal pure returns (string memory) { if (ShortString.unwrap(value) != _FALLBACK_SENTINEL) { return toString(value); } else { return store; } } /** * @dev Return the length of a string that was encoded to `ShortString` or written to storage using {setWithFallback}. * * WARNING: This will return the "byte length" of the string. This may not reflect the actual length in terms of * actual characters as the UTF-8 encoding of a single character can span over multiple bytes. */ function byteLengthWithFallback(ShortString value, string storage store) internal view returns (uint256) { if (ShortString.unwrap(value) != _FALLBACK_SENTINEL) { return byteLength(value); } else { return bytes(store).length; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC5267.sol) pragma solidity ^0.8.0; interface IERC5267 { /** * @dev MAY be emitted to signal that the domain could have changed. */ event EIP712DomainChanged(); /** * @dev returns the fields and values that describe the domain separator used by this contract for EIP-712 * signature. */ function eip712Domain() external view returns ( bytes1 fields, string memory name, string memory version, uint256 chainId, address verifyingContract, bytes32 salt, uint256[] memory extensions ); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; import "./math/SignedMath.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `int256` to its ASCII `string` decimal representation. */ function toString(int256 value) internal pure returns (string memory) { return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMath.abs(value)))); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } /** * @dev Returns true if the two strings are equal. */ function equal(string memory a, string memory b) internal pure returns (bool) { return keccak256(bytes(a)) == keccak256(bytes(b)); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import { Attestation } from "../Common.sol"; /// @title ISchemaResolver /// @notice The interface of an optional schema resolver. interface ISchemaResolver { /// @notice Checks if the resolver can be sent ETH. /// @return Whether the resolver supports ETH transfers. function isPayable() external pure returns (bool); /// @notice Processes an attestation and verifies whether it's valid. /// @param attestation The new attestation. /// @return Whether the attestation is valid. function attest(Attestation calldata attestation) external payable returns (bool); /// @notice Processes multiple attestations and verifies whether they are valid. /// @param attestations The new attestations. /// @param values Explicit ETH amounts which were sent with each attestation. /// @return Whether all the attestations are valid. function multiAttest( Attestation[] calldata attestations, uint256[] calldata values ) external payable returns (bool); /// @notice Processes an attestation revocation and verifies if it can be revoked. /// @param attestation The existing attestation to be revoked. /// @return Whether the attestation can be revoked. function revoke(Attestation calldata attestation) external payable returns (bool); /// @notice Processes revocation of multiple attestation and verifies they can be revoked. /// @param attestations The existing attestations to be revoked. /// @param values Explicit ETH amounts which were sent with each revocation. /// @return Whether the attestations can be revoked. function multiRevoke( Attestation[] calldata attestations, uint256[] calldata values ) external payable returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/StorageSlot.sol) // This file was procedurally generated from scripts/generate/templates/StorageSlot.js. pragma solidity ^0.8.0; /** * @dev Library for reading and writing primitive types to specific storage slots. * * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts. * This library helps with reading and writing to such slots without the need for inline assembly. * * The functions in this library return Slot structs that contain a `value` member that can be used to read or write. * * Example usage to set ERC1967 implementation slot: * ```solidity * contract ERC1967 { * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; * * function _getImplementation() internal view returns (address) { * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; * } * * function _setImplementation(address newImplementation) internal { * require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract"); * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; * } * } * ``` * * _Available since v4.1 for `address`, `bool`, `bytes32`, `uint256`._ * _Available since v4.9 for `string`, `bytes`._ */ library StorageSlot { struct AddressSlot { address value; } struct BooleanSlot { bool value; } struct Bytes32Slot { bytes32 value; } struct Uint256Slot { uint256 value; } struct StringSlot { string value; } struct BytesSlot { bytes value; } /** * @dev Returns an `AddressSlot` with member `value` located at `slot`. */ function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BooleanSlot` with member `value` located at `slot`. */ function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Bytes32Slot` with member `value` located at `slot`. */ function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Uint256Slot` with member `value` located at `slot`. */ function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `StringSlot` with member `value` located at `slot`. */ function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `StringSlot` representation of the string storage pointer `store`. */ function getStringSlot(string storage store) internal pure returns (StringSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := store.slot } } /** * @dev Returns an `BytesSlot` with member `value` located at `slot`. */ function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`. */ function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := store.slot } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { // Solidity will revert if denominator == 0, unlike the div opcode on its own. // The surrounding unchecked block does not change this fact. // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic. return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1, "Math: mulDiv overflow"); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10 ** 64) { value /= 10 ** 64; result += 64; } if (value >= 10 ** 32) { value /= 10 ** 32; result += 32; } if (value >= 10 ** 16) { value /= 10 ** 16; result += 16; } if (value >= 10 ** 8) { value /= 10 ** 8; result += 8; } if (value >= 10 ** 4) { value /= 10 ** 4; result += 4; } if (value >= 10 ** 2) { value /= 10 ** 2; result += 2; } if (value >= 10 ** 1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 256, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol) pragma solidity ^0.8.0; /** * @dev Standard signed math utilities missing in the Solidity language. */ library SignedMath { /** * @dev Returns the largest of two signed numbers. */ function max(int256 a, int256 b) internal pure returns (int256) { return a > b ? a : b; } /** * @dev Returns the smallest of two signed numbers. */ function min(int256 a, int256 b) internal pure returns (int256) { return a < b ? a : b; } /** * @dev Returns the average of two signed numbers without overflow. * The result is rounded towards zero. */ function average(int256 a, int256 b) internal pure returns (int256) { // Formula from the book "Hacker's Delight" int256 x = (a & b) + ((a ^ b) >> 1); return x + (int256(uint256(x) >> 255) & (a ^ b)); } /** * @dev Returns the absolute unsigned value of a signed value. */ function abs(int256 n) internal pure returns (uint256) { unchecked { // must be unchecked in order to support `n = type(int256).min` return uint256(n >= 0 ? n : -n); } } }
{ "remappings": [ "@/=src/", "@forge/std/=lib/forge-std/src/", "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/", "@canvas/=lib/canvas-contracts/src/", "@eas/contracts/=lib/eas-contracts/contracts/", "canvas-contracts/=lib/canvas-contracts/", "ds-test/=lib/openzeppelin-contracts/lib/forge-std/lib/ds-test/src/", "eas-contracts/=lib/eas-contracts/contracts/", "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/", "forge-std/=lib/forge-std/src/", "openzeppelin-contracts/=lib/openzeppelin-contracts/", "openzeppelin/=lib/openzeppelin-contracts/contracts/", "solmate/=lib/canvas-contracts/node_modules/solmate/src/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "paris", "viaIR": true, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"contract IEAS","name":"eas","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AccessDenied","type":"error"},{"inputs":[],"name":"DeadlineExpired","type":"error"},{"inputs":[],"name":"InvalidEAS","type":"error"},{"inputs":[],"name":"InvalidLength","type":"error"},{"inputs":[],"name":"InvalidShortString","type":"error"},{"inputs":[],"name":"InvalidSignature","type":"error"},{"inputs":[],"name":"NotFound","type":"error"},{"inputs":[{"internalType":"string","name":"str","type":"string"}],"name":"StringTooLong","type":"error"},{"inputs":[],"name":"UsedSignature","type":"error"},{"anonymous":false,"inputs":[],"name":"EIP712DomainChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"components":[{"internalType":"bytes32","name":"schema","type":"bytes32"},{"components":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint64","name":"expirationTime","type":"uint64"},{"internalType":"bool","name":"revocable","type":"bool"},{"internalType":"bytes32","name":"refUID","type":"bytes32"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"uint256","name":"value","type":"uint256"}],"internalType":"struct AttestationRequestData","name":"data","type":"tuple"}],"internalType":"struct AttestationRequest","name":"request","type":"tuple"}],"name":"attest","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"bytes32","name":"schema","type":"bytes32"},{"components":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint64","name":"expirationTime","type":"uint64"},{"internalType":"bool","name":"revocable","type":"bool"},{"internalType":"bytes32","name":"refUID","type":"bytes32"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"uint256","name":"value","type":"uint256"}],"internalType":"struct AttestationRequestData","name":"data","type":"tuple"},{"components":[{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"internalType":"struct Signature","name":"signature","type":"tuple"},{"internalType":"address","name":"attester","type":"address"},{"internalType":"uint64","name":"deadline","type":"uint64"}],"internalType":"struct DelegatedProxyAttestationRequest","name":"delegatedRequest","type":"tuple"}],"name":"attestByDelegation","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"eip712Domain","outputs":[{"internalType":"bytes1","name":"fields","type":"bytes1"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"version","type":"string"},{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"verifyingContract","type":"address"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"uint256[]","name":"extensions","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAttestTypeHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes32","name":"uid","type":"bytes32"}],"name":"getAttester","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDomainSeparator","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getEAS","outputs":[{"internalType":"contract IEAS","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getName","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRevokeTypeHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isAttester","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"bytes32","name":"schema","type":"bytes32"},{"components":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint64","name":"expirationTime","type":"uint64"},{"internalType":"bool","name":"revocable","type":"bool"},{"internalType":"bytes32","name":"refUID","type":"bytes32"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"uint256","name":"value","type":"uint256"}],"internalType":"struct AttestationRequestData[]","name":"data","type":"tuple[]"},{"components":[{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"internalType":"struct Signature[]","name":"signatures","type":"tuple[]"},{"internalType":"address","name":"attester","type":"address"},{"internalType":"uint64","name":"deadline","type":"uint64"}],"internalType":"struct MultiDelegatedProxyAttestationRequest[]","name":"multiDelegatedRequests","type":"tuple[]"}],"name":"multiAttestByDelegation","outputs":[{"internalType":"bytes32[]","name":"","type":"bytes32[]"}],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"bytes32","name":"schema","type":"bytes32"},{"components":[{"internalType":"bytes32","name":"uid","type":"bytes32"},{"internalType":"uint256","name":"value","type":"uint256"}],"internalType":"struct RevocationRequestData[]","name":"data","type":"tuple[]"},{"components":[{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"internalType":"struct Signature[]","name":"signatures","type":"tuple[]"},{"internalType":"address","name":"revoker","type":"address"},{"internalType":"uint64","name":"deadline","type":"uint64"}],"internalType":"struct MultiDelegatedProxyRevocationRequest[]","name":"multiDelegatedRequests","type":"tuple[]"}],"name":"multiRevokeByDelegation","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"bytes32","name":"schema","type":"bytes32"},{"components":[{"internalType":"bytes32","name":"uid","type":"bytes32"},{"internalType":"uint256","name":"value","type":"uint256"}],"internalType":"struct RevocationRequestData","name":"data","type":"tuple"}],"internalType":"struct RevocationRequest","name":"request","type":"tuple"}],"name":"revoke","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"bytes32","name":"schema","type":"bytes32"},{"components":[{"internalType":"bytes32","name":"uid","type":"bytes32"},{"internalType":"uint256","name":"value","type":"uint256"}],"internalType":"struct RevocationRequestData","name":"data","type":"tuple"},{"components":[{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"internalType":"struct Signature","name":"signature","type":"tuple"},{"internalType":"address","name":"revoker","type":"address"},{"internalType":"uint64","name":"deadline","type":"uint64"}],"internalType":"struct DelegatedProxyRevocationRequest","name":"delegatedRequest","type":"tuple"}],"name":"revokeByDelegation","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"attester","type":"address"},{"internalType":"bool","name":"enable","type":"bool"}],"name":"toggleAttester","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
61020034620003f057601f62002a9f38819003918201601f19168301916001600160401b03831184841017620003cb57808492602094604052833981010312620003f057516001600160a01b0381168103620003f0576040516200006381620003f5565b600d815260208101916c417474657374657250726f787960981b8352604051916200008e83620003f5565b600583526020830193640312e332e360dc1b85526001608052600360a052600060c052620000bc8262000411565b610180908152620000cd85620005e4565b916101a0928352835190209561014095878752519020956101609087825246610100526040519760208901917f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f835260408a015260608901524660808901523060a089015260a0885260c088019780891060018060401b038a1117620003cb57604089905251902060e05230610120908152966001600160a01b03861615620003e157506101c0858152845190946001600160401b038211620003cb5760025490600182811c92168015620003c0575b6020831014620003aa5781601f84931162000346575b50602090601f8311600114620002cc57600092620002c0575b50508160011b916000199060031b1c1916176002555b60058054336001600160a01b0319821681179092556040519791906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a36101e095865261230397886200077c893960805188610c16015260a05188610c3f015260c05188610c6e015260e05188612004015261010051886120cf01525187611fce015251866120530152518561207901525184610a5301525183610a7d0152518281816104b30152818161061401528181610bd101528181610edd015261119d0152518181816102e60152610d2c0152f35b015190503880620001cc565b6002600090815260008051602062002a7f8339815191529350601f198516905b8181106200032d575090846001959493921062000313575b505050811b01600255620001e2565b015160001960f88460031b161c1916905538808062000304565b92936020600181928786015181550195019301620002ec565b600260005290915060008051602062002a7f833981519152601f840160051c810191602085106200039f575b90601f859493920160051c01905b8181106200038f5750620001b3565b6000815584935060010162000380565b909150819062000372565b634e487b7160e01b600052602260045260246000fd5b91607f16916200019d565b634e487b7160e01b600052604160045260246000fd5b6341bc07ff60e11b8152600490fd5b600080fd5b604081019081106001600160401b03821117620003cb57604052565b80516020919082811015620004b0575090601f8251116200044f57808251920151908083106200044057501790565b82600019910360031b1b161790565b90604051809263305a27a960e01b82528060048301528251908160248401526000935b82851062000496575050604492506000838284010152601f80199101168101030190fd5b848101820151868601604401529381019385935062000472565b6001600160401b038111620003cb576000928354926001938481811c91168015620005d9575b83821014620005c557601f81116200058f575b5081601f841160011462000528575092829391839286946200051c575b50501b916000199060031b1c191617905560ff90565b01519250388062000506565b919083601f1981168780528488209488905b888383106200057457505050106200055a575b505050811b01905560ff90565b015160001960f88460031b161c191690553880806200054d565b8587015188559096019594850194879350908101906200053a565b85805284601f848820920160051c820191601f860160051c015b828110620005b9575050620004e9565b878155018590620005a9565b634e487b7160e01b86526022600452602486fd5b90607f1690620004d6565b805160209081811015620006725750601f8251116200061157808251920151908083106200044057501790565b90604051809263305a27a960e01b82528060048301528251908160248401526000935b82851062000658575050604492506000838284010152601f80199101168101030190fd5b848101820151868601604401529381019385935062000634565b9192916001600160401b038111620003cb5760019182548381811c9116801562000770575b82821014620003aa57601f811162000737575b5080601f8311600114620006ea575081929394600092620006de575b5050600019600383901b1c191690821b17905560ff90565b015190503880620006c6565b90601f198316958460005282600020926000905b8882106200071f57505083859697106200055a57505050811b01905560ff90565b808785968294968601518155019501930190620006fe565b8360005283601f83600020920160051c820191601f850160051c015b82811062000763575050620006aa565b6000815501849062000753565b90607f16906200069756fe6080604052600436101561001257600080fd5b6000803560e01c80630eabf660146111325780630ee48948146110df57806310d736d5146110ac57806312b11a171461107157806317d7de7c14610f8f5780633c04271514610d9b5780634692626714610d0e57806354fd4d5014610c0057806365c40b9c14610bbb578063715018a614610b5d57806384b0196e14610a3d5780638da5cb5b14610a14578063954115251461055a578063a6d4dbc714610409578063b6ebe539146103ca578063b83010d31461038f578063ed24911d1461036c578063f17325e7146101b65763f2fde38b146100ee57600080fd5b346101b35760203660031901126101b357610107611526565b61010f611c62565b6001600160a01b0390811690811561015f57600554826001600160601b0360a01b821617600555167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a380f35b60405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608490fd5b80fd5b50346101b3576020906003198281360112610368576001600160401b0360043581811161036457604081360393840112610364576101f333611667565b6040519263f17325e760e01b84528560048501528160040135602485015260248201359060c2190181121561036057604060448501526001600160a01b03929101826102416004830161153c565b1660648501528161025460248301611653565b16608485015261026660448201611550565b151560a4850152606481013560c485015260848101356022198236030181121561035c5781019060246004830135920192821161035c57813603831361035c578585938489969460a4829560c060e48501528261012485015282610144958686013783830185018690520135610104830152601f01601f191681010301927f0000000000000000000000000000000000000000000000000000000000000000165af1918215610350579161031e575b50604051908152f35b90508181813d8311610349575b6103358183611632565b81010312610344575138610315565b600080fd5b503d61032b565b604051903d90823e3d90fd5b8580fd5b8480fd5b8380fd5b5080fd5b50346101b357806003193601126101b3576020610387611fcb565b604051908152f35b50346101b357806003193601126101b35760206040517f78a69a78c1a55cdff5cbf949580b410778cd9e4d1ecbe6f06a7fa8dc2441b57d8152f35b50346101b35760203660031901126101b35760209060ff906040906001600160a01b036103f5611526565b168152600684522054166040519015158152f35b506101003660031901126101b357604051610423816115ce565b60043580825261043236611924565b602083015260603660631901126103445760405161044f81611617565b60643560ff81168103610344578152608435602082015260a4356040808301919091528301526001600160a01b0360c435818116810361034457606084015260e4356001600160401b038116810361034457836104b191608087960152611aa1565b7f00000000000000000000000000000000000000000000000000000000000000001690604051906104e1826115e9565b81526104ec36611924565b60208201908152823b1561055557604051634692626760e01b81529151600483015251805160248301526020015160448201529082908290606490829034905af1801561054a5761053a5750f35b61054390611604565b6101b35780f35b6040513d84823e3d90fd5b505050fd5b5060203660031901126101b3576004356001600160401b038111610368576105869036906004016114f6565b906105908261183d565b9161059e6040519384611632565b808352601f196105ad8261183d565b01845b8181106109fd575050835b818110610842575060405192632256e48760e11b845260248401602060048601528151809152604485016005916020604482851b89010194019188905b8282106107b9575050505085858060018060a01b0394038134867f0000000000000000000000000000000000000000000000000000000000000000165af19485156107ae578695610713575b50508491855b818110610697578587604051918291602083016020845282518091526020604085019301915b81811061067e575050500390f35b8251845285945060209384019390920191600101610670565b6106a281838761186e565b6106af60208201826118a6565b905060608992015b888a8385106106cd57505050505060010161064a565b976001929394989188604085946106ed856106e78a6115a5565b95611910565b51815260036020522091166001600160601b0360a01b82541617905501960191906106b7565b909194503d8087833e6107268183611632565b8101906020818303126107aa578051906001600160401b0382116107a657019181601f840112156107aa57825192602061075f8561183d565b9461076d6040519687611632565b808652818601931b8201019283116107a657602001905b82821061079657505050923880610644565b8151815260209182019101610784565b8780fd5b8680fd5b6040513d88823e3d90fd5b909192946043198982030182528551906020604082019280518352015191604060208301528251809152606090602082840192828a1b8501019401928d5b8281106108175750505050506020806001929701920192019092916105f8565b9091929394602080610835600193605f1987820301895289516117e2565b97019501939291016107f7565b61084d81838561186e565b61085a60208201826118a6565b90811580156109e5575b6109d3576080830135885b83811061091957505060405192610885846115e9565b3583526108918261183d565b9161089f6040519384611632565b80835260051b8101602083013682116109155782905b8282106108e557505050506020820152600191906108d38287611910565b526108de8186611910565b50016105bb565b81356001600160401b038111610911576020916109068392369088016116de565b8152019101906108b5565b8b80fd5b8980fd5b6109288160051b8401846115b9565b9061093660408701876118db565b8210156109bf57610949606088016115a5565b926001600160401b03851685036109bb576001936109906109b59361097f60405194610974866115ce565b8c35865236906116de565b6020850152369060608702016117a4565b6040830152848060a01b031660608201526001600160401b038516608082015261194c565b0161086f565b8c80fd5b634e487b7160e01b8c52603260045260248cfd5b60405163251f56a160e21b8152600490fd5b506109f360408401846118db565b9050821415610864565b602090610a08611854565b828288010152016105b0565b50346101b357806003193601126101b3576005546040516001600160a01b039091168152602090f35b50346101b357806003193601126101b357610a777f000000000000000000000000000000000000000000000000000000000000000061211b565b90610aa17f0000000000000000000000000000000000000000000000000000000000000000612215565b9060405190602090818301938385106001600160401b03861117610b475792828593610afd8896610aef98604052858552604051988998600f60f81b8a5260e0858b015260e08a0190611580565b9088820360408a0152611580565b924660608801523060808801528460a088015286840360c088015251928381520193925b828110610b3057505050500390f35b835185528695509381019392810192600101610b21565b634e487b7160e01b600052604160045260246000fd5b50346101b357806003193601126101b357610b76611c62565b600580546001600160a01b031981169091556000906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b50346101b357806003193601126101b3576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b50346101b357806003193601126101b357610c3a7f0000000000000000000000000000000000000000000000000000000000000000611cba565b610c637f0000000000000000000000000000000000000000000000000000000000000000611cba565b90610cf66022610c927f0000000000000000000000000000000000000000000000000000000000000000611cba565b936040519485918551610cad8160209889808801910161155d565b830190601760f91b918288820152610cce825180938a60218501910161155d565b01906021820152610ce78251809388878501910161155d565b01036002810185520183611632565b610d0a604051928284938452830190611580565b0390f35b50346101b35760603660031901126101b357610d2933611667565b807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316803b15610d9857818091606460405180948193634692626760e01b83526004356004840152602435602484015260443560448401525af1801561054a5761053a5750f35b50fd5b5060206003199181833601126101b3576004356001600160401b0393848211610f8b5760e082600401918336030112610f8b5760a4820190610de4610ddf836115a5565b611667565b6001600160a01b039260248101919084610e06610e0185856115b9565b6115a5565b163303610f795760405190610e1a826115ce565b82359889835284359081116107a65793889993610e85610ea094610e7b60c4610e8a96610e51610ed79f9b600436918401016116de565b8b850152610e6236604483016117a4565b6040850152610e708c61153c565b606085015201611653565b608082015261194c565b6115b9565b60405192610e97846115e9565b835236906116de565b90828101918252604051968792839263f17325e760e01b8452856004850152516024840152516040604484015260648301906117e2565b038134867f0000000000000000000000000000000000000000000000000000000000000000165af1938415610f6e578394610f3d575b50610f196040916115a5565b92848152600386522091166001600160601b0360a01b825416179055604051908152f35b9093508481813d8311610f67575b610f558183611632565b81010312610344575192610f19610f0d565b503d610f4b565b6040513d85823e3d90fd5b604051634ca8886760e01b8152600490fd5b8280fd5b50346101b357806003193601126101b3576040516000600254610fb181611689565b8084529060019081811690811561104a5750600114610fef575b610d0a84610fdb81860382611632565b604051918291602083526020830190611580565b6002600090815292507f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace5b828410611032575050508101602001610fdb82610fcb565b8054602085870181019190915290930192810161101a565b60ff191660208087019190915292151560051b85019092019250610fdb9150839050610fcb565b50346101b357806003193601126101b35760206040517fea02ffba7dcb45f6fc649714d23f315eef12e3b27f9a7735d8d8bf41eb2b1af18152f35b50346101b35760203660031901126101b357602090600435815260038252604060018060a01b0391205416604051908152f35b50346101b35760403660031901126101b3576110f9611526565b602435908115158092036103445761110f611c62565b60018060a01b031682526006602052604082209060ff8019835416911617905580f35b5060203660031901126101b3576004356001600160401b0381116103685761115e9036906004016114f6565b6111678161183d565b906111756040519283611632565b808252601f196111848261183d565b01845b8181106114df575050835b8181106112ad5784837f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316803b15610f8b57908290604051928391634cb7e9e560e01b8352602483016020600485015281518091526044840190602060448260051b87010193019186905b8282106112335750505050828091039134905af1801561054a57611227575080f35b61123090611604565b80f35b92955092909395506043198782030182528451602060608160408501938051865201519360408382015284518094520192019089905b80821061128b5750505060208060019296019201920192879593879593611205565b9091926020604060019282875180518352015183820152019401920190611269565b6112b881838661186e565b60a08136031261035c576040516112ce816115ce565b8135815260208201356001600160401b0381116107a6578201601f923684830112156114aa5781356112ff8161183d565b9261130d6040519485611632565b81845260208085019260061b8201019036821161091157602001915b8183106114ae575050506020830191825260408101356001600160401b038111610915578101933690850112156114aa578335936113668561183d565b946113746040519687611632565b8086526020606081880192028301019136831161091157602001905b8282106114905750505060806113bd918560408601526113b26060820161153c565b606086015201611653565b608083015251918251908115908115611484575b506109d357875b818110611417575050516040516001939290916113f4836115e9565b825260208201526114058286611910565b526114108185611910565b5001611192565b8061147e61142760019387611910565b51855190611439846040890151611910565b51858060a01b03606089015116906001600160401b0360808a0151169260405194611463866115ce565b85526020850152604084015260608301526080820152611aa1565b016113d8565b905051811415386113d1565b602060609161149f36856117a4565b815201910190611390565b8880fd5b60408336031261091157602060409182516114c8816115e9565b853581528286013583820152815201920191611329565b6020906114ea611854565b82828701015201611187565b9181601f84011215610344578235916001600160401b038311610344576020808501948460051b01011161034457565b600435906001600160a01b038216820361034457565b35906001600160a01b038216820361034457565b3590811515820361034457565b60005b8381106115705750506000910152565b8181015183820152602001611560565b906020916115998151809281855285808601910161155d565b601f01601f1916010190565b356001600160a01b03811681036103445790565b90359060be1981360301821215610344570190565b60a081019081106001600160401b03821117610b4757604052565b604081019081106001600160401b03821117610b4757604052565b6001600160401b038111610b4757604052565b606081019081106001600160401b03821117610b4757604052565b90601f801991011681019081106001600160401b03821117610b4757604052565b35906001600160401b038216820361034457565b6001600160a01b031660009081526006602052604090205460ff1615610f7957565b90600182811c921680156116b9575b60208310146116a357565b634e487b7160e01b600052602260045260246000fd5b91607f1691611698565b6001600160401b038111610b4757601f01601f191660200190565b919060c08382031261034457604051906001600160401b039060c0830182811184821017610b475760405282946117148161153c565b8452602092611724848301611653565b8486015261173460408301611550565b60408601526060820135606086015260808201359081116103445781019180601f8401121561034457823592611769846116c3565b916117776040519384611632565b84835285858301011161034457848460a09695879660009401838601378301015260808501520135910152565b9190826060910312610344576040516117bc81611617565b8092803560ff811681036103445760409182918452602081013560208501520135910152565b9060018060a01b0382511681526001600160401b0360208301511660208201526040820151151560408201526060820151606082015260a080611834608085015160c0608086015260c0850190611580565b93015191015290565b6001600160401b038111610b475760051b60200190565b60405190611861826115e9565b6060602083600081520152565b91908110156118905760051b81013590609e1981360301821215610344570190565b634e487b7160e01b600052603260045260246000fd5b903590601e198136030182121561034457018035906001600160401b03821161034457602001918160051b3603831361034457565b903590601e198136030182121561034457018035906001600160401b0382116103445760200191606082023603831361034457565b80518210156118905760209160051b010190565b6040906023190112610344576040519061193d826115e9565b60243582526044356020830152565b608081016001600160401b0390818151168015159081611a95575b50611a83577fea02ffba7dcb45f6fc649714d23f315eef12e3b27f9a7735d8d8bf41eb2b1af16020840151916040858180970151906119a582611bb1565b606081019360018060a01b0396878651169251888251168a602084015116878401511515916060850151938d60a0608088015160208151910120970151975116978a519a60208c019d8e528b015260608a0152608089015260a088015260c087015260e08601526101008501526101208401526101409081840152825261016082019582871090871117610b4757611a4a8594611a5f93611a67988a525190206120f5565b9060ff81511688602083015192015192611f3c565b949094611e22565b5116911603611a735750565b51638baa579f60e01b8152600490fd5b604051631ab7da6b60e01b8152600490fd5b90508242161138611967565b60808101906001600160401b0390818351168015159081611ba5575b50611a83576020810151908151600052600360205260018060a01b0391604094838660002054168015611b94573303611b835785830151611afd81611bb1565b60608401928584511694519287602083519301519151169189519460208601977f78a69a78c1a55cdff5cbf949580b410778cd9e4d1ecbe6f06a7fa8dc2441b57d89528b8701526060860152608085015260a084015260c083015260c0825260e082019582871090871117610b4757611a4a8594611a5f93611a67988a525190206120f5565b8551634ca8886760e01b8152600490fd5b865163c5723b5160e01b8152600490fd5b90508242161138611abd565b8051906040602082015191015160405191602083019360ff60f81b9060f81b1684526021830152604182015260418152608081018181106001600160401b03821117610b47578060ff916040526020838051611c0e81858961155d565b810160046080820152030190205416611c5057611c399160209160405193849283925192839161155d565b81016004815203019020600160ff19825416179055565b60405163333a6a0960e21b8152600490fd5b6005546001600160a01b03163303611c7657565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b806000917a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000080821015611e14575b506d04ee2d6d415b85acef810000000080831015611e05575b50662386f26fc1000080831015611df6575b506305f5e10080831015611de7575b5061271080831015611dd8575b506064821015611dc8575b600a80921015611dbe575b60019081602181860195611d53876116c3565b96611d616040519889611632565b808852611d70601f19916116c3565b01366020890137860101905b611d88575b5050505090565b600019019083906f181899199a1a9b1b9c1cb0b131b232b360811b8282061a835304918215611db957919082611d7c565b611d81565b9160010191611d40565b9190606460029104910191611d35565b60049193920491019138611d2a565b60089193920491019138611d1d565b60109193920491019138611d0e565b60209193920491019138611cfc565b604093508104915038611ce3565b6005811015611f265780611e335750565b60018103611e805760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606490fd5b60028103611ecd5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606490fd5b600314611ed657565b60405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608490fd5b634e487b7160e01b600052602160045260246000fd5b9291907f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311611fbf5791608094939160ff602094604051948552168484015260408301526060820152600093849182805260015afa15611fb25781516001600160a01b03811615611fac579190565b50600190565b50604051903d90823e3d90fd5b50505050600090600390565b307f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614806120cc575b15612026577f000000000000000000000000000000000000000000000000000000000000000090565b60405160208101907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f82527f000000000000000000000000000000000000000000000000000000000000000060408201527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a082015260a0815260c081018181106001600160401b03821117610b475760405251902090565b507f00000000000000000000000000000000000000000000000000000000000000004614611ffd565b604290612100611fcb565b906040519161190160f01b8352600283015260228201522090565b60ff81146121595760ff811690601f8211612147576040519161213d836115e9565b8252602082015290565b604051632cd44ac360e21b8152600490fd5b5060405160008181549161216c83611689565b808352926001908181169081156121f35750600114612196575b5061219392500382611632565b90565b600080805291507f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5635b8483106121d85750612193935050810160200138612186565b819350908160209254838589010152019101909184926121bf565b90506020925061219394915060ff191682840152151560051b82010138612186565b60ff81146122375760ff811690601f8211612147576040519161213d836115e9565b5060405160008160019182549261224d84611689565b808452938181169081156121f35750600114612270575061219392500382611632565b600081815291507fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf65b8483106122b25750612193935050810160200138612186565b8193509081602092548385890101520191019091849261229956fea2646970667358221220be4c3e6776674f3daae8b907e45082908bb502e7b37128fc24464bdd845499ba64736f6c63430008130033405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace000000000000000000000000c47300428b6ad2c7d03bb76d05a176058b47e6b0
Deployed Bytecode
0x6080604052600436101561001257600080fd5b6000803560e01c80630eabf660146111325780630ee48948146110df57806310d736d5146110ac57806312b11a171461107157806317d7de7c14610f8f5780633c04271514610d9b5780634692626714610d0e57806354fd4d5014610c0057806365c40b9c14610bbb578063715018a614610b5d57806384b0196e14610a3d5780638da5cb5b14610a14578063954115251461055a578063a6d4dbc714610409578063b6ebe539146103ca578063b83010d31461038f578063ed24911d1461036c578063f17325e7146101b65763f2fde38b146100ee57600080fd5b346101b35760203660031901126101b357610107611526565b61010f611c62565b6001600160a01b0390811690811561015f57600554826001600160601b0360a01b821617600555167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a380f35b60405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608490fd5b80fd5b50346101b3576020906003198281360112610368576001600160401b0360043581811161036457604081360393840112610364576101f333611667565b6040519263f17325e760e01b84528560048501528160040135602485015260248201359060c2190181121561036057604060448501526001600160a01b03929101826102416004830161153c565b1660648501528161025460248301611653565b16608485015261026660448201611550565b151560a4850152606481013560c485015260848101356022198236030181121561035c5781019060246004830135920192821161035c57813603831361035c578585938489969460a4829560c060e48501528261012485015282610144958686013783830185018690520135610104830152601f01601f191681010301927f000000000000000000000000c47300428b6ad2c7d03bb76d05a176058b47e6b0165af1918215610350579161031e575b50604051908152f35b90508181813d8311610349575b6103358183611632565b81010312610344575138610315565b600080fd5b503d61032b565b604051903d90823e3d90fd5b8580fd5b8480fd5b8380fd5b5080fd5b50346101b357806003193601126101b3576020610387611fcb565b604051908152f35b50346101b357806003193601126101b35760206040517f78a69a78c1a55cdff5cbf949580b410778cd9e4d1ecbe6f06a7fa8dc2441b57d8152f35b50346101b35760203660031901126101b35760209060ff906040906001600160a01b036103f5611526565b168152600684522054166040519015158152f35b506101003660031901126101b357604051610423816115ce565b60043580825261043236611924565b602083015260603660631901126103445760405161044f81611617565b60643560ff81168103610344578152608435602082015260a4356040808301919091528301526001600160a01b0360c435818116810361034457606084015260e4356001600160401b038116810361034457836104b191608087960152611aa1565b7f000000000000000000000000c47300428b6ad2c7d03bb76d05a176058b47e6b01690604051906104e1826115e9565b81526104ec36611924565b60208201908152823b1561055557604051634692626760e01b81529151600483015251805160248301526020015160448201529082908290606490829034905af1801561054a5761053a5750f35b61054390611604565b6101b35780f35b6040513d84823e3d90fd5b505050fd5b5060203660031901126101b3576004356001600160401b038111610368576105869036906004016114f6565b906105908261183d565b9161059e6040519384611632565b808352601f196105ad8261183d565b01845b8181106109fd575050835b818110610842575060405192632256e48760e11b845260248401602060048601528151809152604485016005916020604482851b89010194019188905b8282106107b9575050505085858060018060a01b0394038134867f000000000000000000000000c47300428b6ad2c7d03bb76d05a176058b47e6b0165af19485156107ae578695610713575b50508491855b818110610697578587604051918291602083016020845282518091526020604085019301915b81811061067e575050500390f35b8251845285945060209384019390920191600101610670565b6106a281838761186e565b6106af60208201826118a6565b905060608992015b888a8385106106cd57505050505060010161064a565b976001929394989188604085946106ed856106e78a6115a5565b95611910565b51815260036020522091166001600160601b0360a01b82541617905501960191906106b7565b909194503d8087833e6107268183611632565b8101906020818303126107aa578051906001600160401b0382116107a657019181601f840112156107aa57825192602061075f8561183d565b9461076d6040519687611632565b808652818601931b8201019283116107a657602001905b82821061079657505050923880610644565b8151815260209182019101610784565b8780fd5b8680fd5b6040513d88823e3d90fd5b909192946043198982030182528551906020604082019280518352015191604060208301528251809152606090602082840192828a1b8501019401928d5b8281106108175750505050506020806001929701920192019092916105f8565b9091929394602080610835600193605f1987820301895289516117e2565b97019501939291016107f7565b61084d81838561186e565b61085a60208201826118a6565b90811580156109e5575b6109d3576080830135885b83811061091957505060405192610885846115e9565b3583526108918261183d565b9161089f6040519384611632565b80835260051b8101602083013682116109155782905b8282106108e557505050506020820152600191906108d38287611910565b526108de8186611910565b50016105bb565b81356001600160401b038111610911576020916109068392369088016116de565b8152019101906108b5565b8b80fd5b8980fd5b6109288160051b8401846115b9565b9061093660408701876118db565b8210156109bf57610949606088016115a5565b926001600160401b03851685036109bb576001936109906109b59361097f60405194610974866115ce565b8c35865236906116de565b6020850152369060608702016117a4565b6040830152848060a01b031660608201526001600160401b038516608082015261194c565b0161086f565b8c80fd5b634e487b7160e01b8c52603260045260248cfd5b60405163251f56a160e21b8152600490fd5b506109f360408401846118db565b9050821415610864565b602090610a08611854565b828288010152016105b0565b50346101b357806003193601126101b3576005546040516001600160a01b039091168152602090f35b50346101b357806003193601126101b357610a777f417474657374657250726f78790000000000000000000000000000000000000d61211b565b90610aa17f312e332e30000000000000000000000000000000000000000000000000000005612215565b9060405190602090818301938385106001600160401b03861117610b475792828593610afd8896610aef98604052858552604051988998600f60f81b8a5260e0858b015260e08a0190611580565b9088820360408a0152611580565b924660608801523060808801528460a088015286840360c088015251928381520193925b828110610b3057505050500390f35b835185528695509381019392810192600101610b21565b634e487b7160e01b600052604160045260246000fd5b50346101b357806003193601126101b357610b76611c62565b600580546001600160a01b031981169091556000906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b50346101b357806003193601126101b3576040517f000000000000000000000000c47300428b6ad2c7d03bb76d05a176058b47e6b06001600160a01b03168152602090f35b50346101b357806003193601126101b357610c3a7f0000000000000000000000000000000000000000000000000000000000000001611cba565b610c637f0000000000000000000000000000000000000000000000000000000000000003611cba565b90610cf66022610c927f0000000000000000000000000000000000000000000000000000000000000000611cba565b936040519485918551610cad8160209889808801910161155d565b830190601760f91b918288820152610cce825180938a60218501910161155d565b01906021820152610ce78251809388878501910161155d565b01036002810185520183611632565b610d0a604051928284938452830190611580565b0390f35b50346101b35760603660031901126101b357610d2933611667565b807f000000000000000000000000c47300428b6ad2c7d03bb76d05a176058b47e6b06001600160a01b0316803b15610d9857818091606460405180948193634692626760e01b83526004356004840152602435602484015260443560448401525af1801561054a5761053a5750f35b50fd5b5060206003199181833601126101b3576004356001600160401b0393848211610f8b5760e082600401918336030112610f8b5760a4820190610de4610ddf836115a5565b611667565b6001600160a01b039260248101919084610e06610e0185856115b9565b6115a5565b163303610f795760405190610e1a826115ce565b82359889835284359081116107a65793889993610e85610ea094610e7b60c4610e8a96610e51610ed79f9b600436918401016116de565b8b850152610e6236604483016117a4565b6040850152610e708c61153c565b606085015201611653565b608082015261194c565b6115b9565b60405192610e97846115e9565b835236906116de565b90828101918252604051968792839263f17325e760e01b8452856004850152516024840152516040604484015260648301906117e2565b038134867f000000000000000000000000c47300428b6ad2c7d03bb76d05a176058b47e6b0165af1938415610f6e578394610f3d575b50610f196040916115a5565b92848152600386522091166001600160601b0360a01b825416179055604051908152f35b9093508481813d8311610f67575b610f558183611632565b81010312610344575192610f19610f0d565b503d610f4b565b6040513d85823e3d90fd5b604051634ca8886760e01b8152600490fd5b8280fd5b50346101b357806003193601126101b3576040516000600254610fb181611689565b8084529060019081811690811561104a5750600114610fef575b610d0a84610fdb81860382611632565b604051918291602083526020830190611580565b6002600090815292507f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace5b828410611032575050508101602001610fdb82610fcb565b8054602085870181019190915290930192810161101a565b60ff191660208087019190915292151560051b85019092019250610fdb9150839050610fcb565b50346101b357806003193601126101b35760206040517fea02ffba7dcb45f6fc649714d23f315eef12e3b27f9a7735d8d8bf41eb2b1af18152f35b50346101b35760203660031901126101b357602090600435815260038252604060018060a01b0391205416604051908152f35b50346101b35760403660031901126101b3576110f9611526565b602435908115158092036103445761110f611c62565b60018060a01b031682526006602052604082209060ff8019835416911617905580f35b5060203660031901126101b3576004356001600160401b0381116103685761115e9036906004016114f6565b6111678161183d565b906111756040519283611632565b808252601f196111848261183d565b01845b8181106114df575050835b8181106112ad5784837f000000000000000000000000c47300428b6ad2c7d03bb76d05a176058b47e6b06001600160a01b0316803b15610f8b57908290604051928391634cb7e9e560e01b8352602483016020600485015281518091526044840190602060448260051b87010193019186905b8282106112335750505050828091039134905af1801561054a57611227575080f35b61123090611604565b80f35b92955092909395506043198782030182528451602060608160408501938051865201519360408382015284518094520192019089905b80821061128b5750505060208060019296019201920192879593879593611205565b9091926020604060019282875180518352015183820152019401920190611269565b6112b881838661186e565b60a08136031261035c576040516112ce816115ce565b8135815260208201356001600160401b0381116107a6578201601f923684830112156114aa5781356112ff8161183d565b9261130d6040519485611632565b81845260208085019260061b8201019036821161091157602001915b8183106114ae575050506020830191825260408101356001600160401b038111610915578101933690850112156114aa578335936113668561183d565b946113746040519687611632565b8086526020606081880192028301019136831161091157602001905b8282106114905750505060806113bd918560408601526113b26060820161153c565b606086015201611653565b608083015251918251908115908115611484575b506109d357875b818110611417575050516040516001939290916113f4836115e9565b825260208201526114058286611910565b526114108185611910565b5001611192565b8061147e61142760019387611910565b51855190611439846040890151611910565b51858060a01b03606089015116906001600160401b0360808a0151169260405194611463866115ce565b85526020850152604084015260608301526080820152611aa1565b016113d8565b905051811415386113d1565b602060609161149f36856117a4565b815201910190611390565b8880fd5b60408336031261091157602060409182516114c8816115e9565b853581528286013583820152815201920191611329565b6020906114ea611854565b82828701015201611187565b9181601f84011215610344578235916001600160401b038311610344576020808501948460051b01011161034457565b600435906001600160a01b038216820361034457565b35906001600160a01b038216820361034457565b3590811515820361034457565b60005b8381106115705750506000910152565b8181015183820152602001611560565b906020916115998151809281855285808601910161155d565b601f01601f1916010190565b356001600160a01b03811681036103445790565b90359060be1981360301821215610344570190565b60a081019081106001600160401b03821117610b4757604052565b604081019081106001600160401b03821117610b4757604052565b6001600160401b038111610b4757604052565b606081019081106001600160401b03821117610b4757604052565b90601f801991011681019081106001600160401b03821117610b4757604052565b35906001600160401b038216820361034457565b6001600160a01b031660009081526006602052604090205460ff1615610f7957565b90600182811c921680156116b9575b60208310146116a357565b634e487b7160e01b600052602260045260246000fd5b91607f1691611698565b6001600160401b038111610b4757601f01601f191660200190565b919060c08382031261034457604051906001600160401b039060c0830182811184821017610b475760405282946117148161153c565b8452602092611724848301611653565b8486015261173460408301611550565b60408601526060820135606086015260808201359081116103445781019180601f8401121561034457823592611769846116c3565b916117776040519384611632565b84835285858301011161034457848460a09695879660009401838601378301015260808501520135910152565b9190826060910312610344576040516117bc81611617565b8092803560ff811681036103445760409182918452602081013560208501520135910152565b9060018060a01b0382511681526001600160401b0360208301511660208201526040820151151560408201526060820151606082015260a080611834608085015160c0608086015260c0850190611580565b93015191015290565b6001600160401b038111610b475760051b60200190565b60405190611861826115e9565b6060602083600081520152565b91908110156118905760051b81013590609e1981360301821215610344570190565b634e487b7160e01b600052603260045260246000fd5b903590601e198136030182121561034457018035906001600160401b03821161034457602001918160051b3603831361034457565b903590601e198136030182121561034457018035906001600160401b0382116103445760200191606082023603831361034457565b80518210156118905760209160051b010190565b6040906023190112610344576040519061193d826115e9565b60243582526044356020830152565b608081016001600160401b0390818151168015159081611a95575b50611a83577fea02ffba7dcb45f6fc649714d23f315eef12e3b27f9a7735d8d8bf41eb2b1af16020840151916040858180970151906119a582611bb1565b606081019360018060a01b0396878651169251888251168a602084015116878401511515916060850151938d60a0608088015160208151910120970151975116978a519a60208c019d8e528b015260608a0152608089015260a088015260c087015260e08601526101008501526101208401526101409081840152825261016082019582871090871117610b4757611a4a8594611a5f93611a67988a525190206120f5565b9060ff81511688602083015192015192611f3c565b949094611e22565b5116911603611a735750565b51638baa579f60e01b8152600490fd5b604051631ab7da6b60e01b8152600490fd5b90508242161138611967565b60808101906001600160401b0390818351168015159081611ba5575b50611a83576020810151908151600052600360205260018060a01b0391604094838660002054168015611b94573303611b835785830151611afd81611bb1565b60608401928584511694519287602083519301519151169189519460208601977f78a69a78c1a55cdff5cbf949580b410778cd9e4d1ecbe6f06a7fa8dc2441b57d89528b8701526060860152608085015260a084015260c083015260c0825260e082019582871090871117610b4757611a4a8594611a5f93611a67988a525190206120f5565b8551634ca8886760e01b8152600490fd5b865163c5723b5160e01b8152600490fd5b90508242161138611abd565b8051906040602082015191015160405191602083019360ff60f81b9060f81b1684526021830152604182015260418152608081018181106001600160401b03821117610b47578060ff916040526020838051611c0e81858961155d565b810160046080820152030190205416611c5057611c399160209160405193849283925192839161155d565b81016004815203019020600160ff19825416179055565b60405163333a6a0960e21b8152600490fd5b6005546001600160a01b03163303611c7657565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b806000917a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000080821015611e14575b506d04ee2d6d415b85acef810000000080831015611e05575b50662386f26fc1000080831015611df6575b506305f5e10080831015611de7575b5061271080831015611dd8575b506064821015611dc8575b600a80921015611dbe575b60019081602181860195611d53876116c3565b96611d616040519889611632565b808852611d70601f19916116c3565b01366020890137860101905b611d88575b5050505090565b600019019083906f181899199a1a9b1b9c1cb0b131b232b360811b8282061a835304918215611db957919082611d7c565b611d81565b9160010191611d40565b9190606460029104910191611d35565b60049193920491019138611d2a565b60089193920491019138611d1d565b60109193920491019138611d0e565b60209193920491019138611cfc565b604093508104915038611ce3565b6005811015611f265780611e335750565b60018103611e805760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606490fd5b60028103611ecd5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606490fd5b600314611ed657565b60405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608490fd5b634e487b7160e01b600052602160045260246000fd5b9291907f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311611fbf5791608094939160ff602094604051948552168484015260408301526060820152600093849182805260015afa15611fb25781516001600160a01b03811615611fac579190565b50600190565b50604051903d90823e3d90fd5b50505050600090600390565b307f0000000000000000000000003aaa7472fb317fabc12aa0463b803d5f4f42c9f36001600160a01b031614806120cc575b15612026577f3fd978d45742cf44882cae4ad5b96867409136c48e94fbd85987c68785c14f8690565b60405160208101907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f82527f97bb23b7039fbf807a19c2f6dd506213960f67136e67b18f347fb9a2b293146860408201527f6a08c3e203132c561752255a4d52ffae85bb9c5d33cb3291520dea1b8435638960608201524660808201523060a082015260a0815260c081018181106001600160401b03821117610b475760405251902090565b507f00000000000000000000000000000000000000000000000000000000000827504614611ffd565b604290612100611fcb565b906040519161190160f01b8352600283015260228201522090565b60ff81146121595760ff811690601f8211612147576040519161213d836115e9565b8252602082015290565b604051632cd44ac360e21b8152600490fd5b5060405160008181549161216c83611689565b808352926001908181169081156121f35750600114612196575b5061219392500382611632565b90565b600080805291507f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5635b8483106121d85750612193935050810160200138612186565b819350908160209254838589010152019101909184926121bf565b90506020925061219394915060ff191682840152151560051b82010138612186565b60ff81146122375760ff811690601f8211612147576040519161213d836115e9565b5060405160008160019182549261224d84611689565b808452938181169081156121f35750600114612270575061219392500382611632565b600081815291507fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf65b8483106122b25750612193935050810160200138612186565b8193509081602092548385890101520191019091849261229956fea2646970667358221220be4c3e6776674f3daae8b907e45082908bb502e7b37128fc24464bdd845499ba64736f6c63430008130033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000c47300428b6ad2c7d03bb76d05a176058b47e6b0
-----Decoded View---------------
Arg [0] : eas (address): 0xC47300428b6AD2c7D03BB76D05A176058b47E6B0
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000c47300428b6ad2c7d03bb76d05a176058b47e6b0
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 29 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.