Overview
ETH Balance
0 ETH
ETH Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 647,540 transactions (+14 Pending)
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
0x08246f818cf55de6b184b9b327f49c7d0aa312cf20e5f5c01b3c136310818b49 | - | (pending) | 1 hr ago | IN | 0 ETH | (Pending) | |||
0xc1e4f3bdf09b07ca0ee60cac07928fdaed94a51762916c65bd187a838e5aef24 | - | (pending) | 2 hrs ago | IN | 0 ETH | (Pending) | |||
0x83911ecc8b13b2e04d2df3f3fe41d3ecbd285e9f3ac2614aee39a364d51b0b8c | - | (pending) | 2 hrs ago | IN | 0 ETH | (Pending) | |||
0x1f0cd58f024058b8a1965b298bfc029f8a375079850047b70044c14422737a27 | - | (pending) | 2 hrs ago | IN | 0 ETH | (Pending) | |||
0x59cf7b692a6f17a1ab65bb2a7e9c9ebf81b02a833e46b5da1f3499dd27db13bf | - | (pending) | 40 hrs ago | IN | 0 ETH | (Pending) | |||
0x6a4a590372fb18ce3de23f25c1872e9031df50056a77251b4fb5eb6952b6f038 | - | (pending) | 40 hrs ago | IN | 0 ETH | (Pending) | |||
0x5b41baf59996bb0b2b1892e3b344329812bab6902837337306503eb239929e34 | - | (pending) | 40 hrs ago | IN | 0 ETH | (Pending) | |||
0x906ca179f2d0b51516deca17fcdab3f379cdddc803c690318b296db1f8dd61be | - | (pending) | 40 hrs ago | IN | 0 ETH | (Pending) | |||
0x6cd523d409dabe886e1030a2f37eb05c90a363269cf59bb157d1a02dd38bec11 | - | (pending) | 40 hrs ago | IN | 0 ETH | (Pending) | |||
0x9d86f7644a1a1a4f787d880133f4525c83ff55ca30ae77965f71a0aff3db20b1 | - | (pending) | 40 hrs ago | IN | 0 ETH | (Pending) | |||
0x944856fed2eaf75b789608e8943117aaddc0905634b20d69562e4dc53651294d | - | (pending) | 40 hrs ago | IN | 0 ETH | (Pending) | |||
0x4224ea061c050459bcc8661db6912be828d3606b7516fb04b9049354953ba2c2 | - | (pending) | 40 hrs ago | IN | 0 ETH | (Pending) | |||
0xbbe746c22566343cc41dd91dd0666033c7c2345b7a55e8521a867c9c260995c1 | - | (pending) | 40 hrs ago | IN | 0 ETH | (Pending) | |||
0xcd138ecafc88c96063227f4ab2fe5fc285fc5b8d6ed4807bd72d7ee82feff0dd | - | (pending) | 40 hrs ago | IN | 0 ETH | (Pending) | |||
Attest By Delega... | 10156911 | 6 secs ago | IN | 0 ETH | 0.00011714 | ||||
Attest By Delega... | 10156910 | 9 secs ago | IN | 0 ETH | 0.00004679 | ||||
Attest By Delega... | 10156908 | 14 secs ago | IN | 0 ETH | 0.00004644 | ||||
Attest By Delega... | 10156907 | 16 secs ago | IN | 0 ETH | 0.00011834 | ||||
Attest By Delega... | 10156906 | 19 secs ago | IN | 0 ETH | 0.00003907 | ||||
Attest By Delega... | 10156904 | 25 secs ago | IN | 0 ETH | 0.00004573 | ||||
Attest By Delega... | 10156902 | 31 secs ago | IN | 0 ETH | 0.00003784 | ||||
Attest By Delega... | 10156901 | 34 secs ago | IN | 0 ETH | 0.00004366 | ||||
Attest By Delega... | 10156901 | 34 secs ago | IN | 0 ETH | 0.0001131 | ||||
Attest By Delega... | 10156901 | 34 secs ago | IN | 0 ETH | 0.00011398 | ||||
Attest By Delega... | 10156897 | 46 secs ago | IN | 0 ETH | 0.00003933 |
Loading...
Loading
Contract Name:
AttesterProxy
Compiler Version
v0.8.19+commit.7dd6d404
Optimization Enabled:
Yes with 2000 runs
Other Settings:
default 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/eip712/proxy/EIP712Proxy.sol"; import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; import {AccessDenied} from "./eas/Common.sol"; import {IEAS, Attestation} from "./eas/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 // 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 // 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.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 // 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 // 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/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); } } }
// 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) (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/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; // 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.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 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 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 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 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)) ); } }
{ "optimizer": { "enabled": true, "runs": 2000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "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
6102006040523480156200001257600080fd5b506040516200310938038062003109833981016040819052620000359162000292565b604080518082018252600d81526c417474657374657250726f787960981b602080830191909152825180840190935260058352640312e332e360dc1b908301526001608052600360a052600060c08190528392829162000097908390620001b7565b61018052620000a8816001620001b7565b6101a052815160208084019190912061014052815190820120610160524661010052620001396101405161016051604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201529081019290925260608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b60e052505030610120526001600160a01b0382166200016b576040516341bc07ff60e11b815260040160405180910390fd5b6001600160a01b0382166101c052600262000187828262000369565b505050620001a46200019e620001f060201b60201c565b620001f4565b6001600160a01b03166101e052620004aa565b6000602083511015620001d757620001cf8362000246565b9050620001ea565b81620001e4848262000369565b5060ff90505b92915050565b3390565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600080829050601f815111156200027d578260405163305a27a960e01b815260040162000274919062000435565b60405180910390fd5b80516200028a8262000485565b179392505050565b600060208284031215620002a557600080fd5b81516001600160a01b0381168114620002bd57600080fd5b9392505050565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680620002ef57607f821691505b6020821081036200031057634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200036457600081815260208120601f850160051c810160208610156200033f5750805b601f850160051c820191505b8181101562000360578281556001016200034b565b5050505b505050565b81516001600160401b03811115620003855762000385620002c4565b6200039d81620003968454620002da565b8462000316565b602080601f831160018114620003d55760008415620003bc5750858301515b600019600386901b1c1916600185901b17855562000360565b600085815260208120601f198616915b828110156200040657888601518255948401946001909101908401620003e5565b5085821015620004255787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600060208083528351808285015260005b81811015620004645785810183015185820160400152820162000446565b506000604082860101526040601f19601f8301168501019250505092915050565b80516020808301519190811015620003105760001960209190910360031b1b16919050565b60805160a05160c05160e05161010051610120516101405161016051610180516101a0516101c0516101e051612baa6200055f600039600081816108020152610eae0152600081816102870152818161060d01528181610bf001528181610d8a0152611260015260006109580152600061092e015260006117e2015260006117ba015260006117150152600061173f01526000611769015260006108c201526000610899015260006108700152612baa6000f3fe6080604052600436106101445760003560e01c8063715018a6116100c0578063b6ebe53911610074578063ed24911d11610059578063ed24911d146103ac578063f17325e7146103c1578063f2fde38b146103e157600080fd5b8063b6ebe53914610339578063b83010d31461037957600080fd5b80638da5cb5b116100a55780638da5cb5b146102e85780639541152514610306578063a6d4dbc71461032657600080fd5b8063715018a6146102ab57806384b0196e146102c057600080fd5b806317d7de7c1161011757806346926267116100fc578063469262671461024357806354fd4d501461026357806365c40b9c1461027857600080fd5b806317d7de7c1461020e5780633c0427151461023057600080fd5b80630eabf660146101495780630ee489481461015e57806310d736d51461017e57806312b11a17146101d1575b600080fd5b61015c610157366004611d6a565b610401565b005b34801561016a57600080fd5b5061015c610179366004611dd8565b61067c565b34801561018a57600080fd5b506101b4610199366004611e0b565b6000908152600360205260409020546001600160a01b031690565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156101dd57600080fd5b507fea02ffba7dcb45f6fc649714d23f315eef12e3b27f9a7735d8d8bf41eb2b1af15b6040519081526020016101c8565b34801561021a57600080fd5b506102236106af565b6040516101c89190611e74565b61020061023e366004611e8e565b610741565b34801561024f57600080fd5b5061015c61025e366004611ec9565b6107b6565b34801561026f57600080fd5b50610223610869565b34801561028457600080fd5b507f00000000000000000000000000000000000000000000000000000000000000006101b4565b3480156102b757600080fd5b5061015c61090c565b3480156102cc57600080fd5b506102d5610920565b6040516101c89796959493929190611ee1565b3480156102f457600080fd5b506005546001600160a01b03166101b4565b610319610314366004611d6a565b6109c4565b6040516101c89190611f93565b61015c610334366004611fcb565b610d71565b34801561034557600080fd5b50610369610354366004611fde565b60066020526000908152604090205460ff1681565b60405190151581526020016101c8565b34801561038557600080fd5b507f78a69a78c1a55cdff5cbf949580b410778cd9e4d1ecbe6f06a7fa8dc2441b57d610200565b3480156103b857600080fd5b50610200610e64565b3480156103cd57600080fd5b506102006103dc366004611ff9565b610e73565b3480156103ed57600080fd5b5061015c6103fc366004611fde565b610f26565b8060008167ffffffffffffffff81111561041d5761041d612034565b60405190808252806020026020018201604052801561046357816020015b60408051808201909152600081526060602082015281526020019060019003908161043b5790505b50905060005b828110156105dc5760008585838181106104855761048561204a565b90506020028101906104979190612060565b6104a090612286565b60208101518051919250908015806104bd57508260400151518114155b156104f4576040517f947d5a8400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b818110156105915760008382815181106105135761051361204a565b602002602001015190506105886040518060a0016040528087600001518152602001838152602001876040015185815181106105515761055161204a565b6020026020010151815260200187606001516001600160a01b03168152602001876080015167ffffffffffffffff16815250610fbb565b506001016104f7565b50604051806040016040528084600001518152602001838152508585815181106105bd576105bd61204a565b60200260200101819052505050506105d58160010190565b9050610469565b506040517f4cb7e9e50000000000000000000000000000000000000000000000000000000081526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690634cb7e9e5903490610644908590600401612381565b6000604051808303818588803b15801561065d57600080fd5b505af1158015610671573d6000803e3d6000fd5b505050505050505050565b6106846111b6565b6001600160a01b03919091166000908152600660205260409020805460ff1916911515919091179055565b6060600280546106be90612432565b80601f01602080910402602001604051908101604052809291908181526020018280546106ea90612432565b80156107375780601f1061070c57610100808354040283529160200191610737565b820191906000526020600020905b81548152906001019060200180831161071a57829003601f168201915b5050505050905090565b600061075b61075660c0840160a08501611fde565b611210565b6107686020830183612466565b610776906020810190611fde565b6001600160a01b0316336001600160a01b0316146107a757604051634ca8886760e01b815260040160405180910390fd5b6107b082611249565b92915050565b6107bf33611210565b604080517f4692626700000000000000000000000000000000000000000000000000000000815282356004820152602083013560248201529082013560448201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690634692626790606401600060405180830381600087803b15801561084e57600080fd5b505af1158015610862573d6000803e3d6000fd5b5050505050565b60606108947f000000000000000000000000000000000000000000000000000000000000000061137a565b6108bd7f000000000000000000000000000000000000000000000000000000000000000061137a565b6108e67f000000000000000000000000000000000000000000000000000000000000000061137a565b6040516020016108f89392919061247c565b604051602081830303815290604052905090565b6109146111b6565b61091e6000611438565b565b6000606080828080836109537f0000000000000000000000000000000000000000000000000000000000000000836114a2565b61097e7f000000000000000000000000000000000000000000000000000000000000000060016114a2565b604080516000808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009b939a50919850469750309650945092509050565b60608160008167ffffffffffffffff8111156109e2576109e2612034565b604051908082528060200260200182016040528015610a2857816020015b604080518082019091526000815260606020820152815260200190600190039081610a005790505b50905060005b82811015610beb5736868683818110610a4957610a4961204a565b9050602002810190610a5b9190612060565b9050366000610a6d60208401846124f2565b909250905080801580610a8e5750610a88604085018561253c565b90508114155b15610ac5576040517f947d5a8400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b81811015610b9957610b916040518060a0016040528087600001358152602001868685818110610afa57610afa61204a565b9050602002810190610b0c9190612466565b610b159061266b565b8152602001610b27604089018961253c565b85818110610b3757610b3761204a565b905060600201803603810190610b4d9190612677565b8152602001610b626080890160608a01611fde565b6001600160a01b03168152602001610b8060a0890160808a01612693565b67ffffffffffffffff16905261154d565b600101610ac8565b50604080518082019091528435815260208101610bb684866126ae565b815250868681518110610bcb57610bcb61204a565b602002602001018190525050505050610be48160010190565b9050610a2e565b5060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166344adc90e34846040518363ffffffff1660e01b8152600401610c3b9190612788565b60006040518083038185885af1158015610c59573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f19168201604052610c82919081019061285d565b90506000805b84811015610d655736888883818110610ca357610ca361204a565b9050602002810190610cb59190612060565b9050366000610cc760208401846124f2565b90925090508060005b81811015610d4f57610ce86080860160608701611fde565b600360008a8a81518110610cfe57610cfe61204a565b6020026020010151815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b03160217905550866001019650610d488160010190565b9050610cd0565b5050505050610d5e8160010190565b9050610c88565b50909695505050505050565b610d88610d83368390038301836128ee565b610fbb565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663469262673460405180604001604052808560000135815260200185602001803603810190610de1919061295a565b90526040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815281516004820152602091820151805160248301529091015160448201526064016000604051808303818588803b158015610e4857600080fd5b505af1158015610e5c573d6000803e3d6000fd5b505050505050565b6000610e6e611708565b905090565b6000610e7e33611210565b6040517ff17325e70000000000000000000000000000000000000000000000000000000081526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063f17325e790610ee39085906004016129a1565b6020604051808303816000875af1158015610f02573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107b09190612a8d565b610f2e6111b6565b6001600160a01b038116610faf5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b610fb881611438565b50565b608081015167ffffffffffffffff1615801590610fef57504267ffffffffffffffff16816080015167ffffffffffffffff16105b15611026576040517f1ab7da6b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6020808201518051600090815260039092526040909120546001600160a01b03168061107e576040517fc5723b5100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b03811633146110a757604051634ca8886760e01b815260040160405180910390fd5b60408301516110b581611833565b606080850151855185516020808801516080808b0151604080517f78a69a78c1a55cdff5cbf949580b410778cd9e4d1ecbe6f06a7fa8dc2441b57d958101959095526001600160a01b0390971696840196909652958201939093529384015260a083015267ffffffffffffffff1660c082015260009061114e9060e0015b60405160208183030381529060405280519060200120611923565b905084606001516001600160a01b03166111768284600001518560200151866040015161196b565b6001600160a01b031614610862576040517f8baa579f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6005546001600160a01b0316331461091e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610fa6565b6001600160a01b03811660009081526006602052604090205460ff16610fb857604051634ca8886760e01b815260040160405180910390fd5b600061125c61125783612aa6565b61154d565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663f17325e7346040518060400160405280876000013581526020018780602001906112b39190612466565b6112bc9061266b565b8152506040518363ffffffff1660e01b81526004016112db9190612b1f565b60206040518083038185885af11580156112f9573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061131e9190612a8d565b905061133060c0840160a08501611fde565b600082815260036020526040902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b039290921691909117905592915050565b6060600061138783611993565b600101905060008167ffffffffffffffff8111156113a7576113a7612034565b6040519080825280601f01601f1916602001820160405280156113d1576020820181803683370190505b5090508181016020015b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85049450846113db57509392505050565b600580546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b606060ff83146114bc576114b583611a75565b90506107b0565b8180546114c890612432565b80601f01602080910402602001604051908101604052809291908181526020018280546114f490612432565b80156115415780601f1061151657610100808354040283529160200191611541565b820191906000526020600020905b81548152906001019060200180831161152457829003601f168201915b505050505090506107b0565b608081015167ffffffffffffffff161580159061158157504267ffffffffffffffff16816080015167ffffffffffffffff16105b156115b8576040517f1ab7da6b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b602081015160408201516115cb81611833565b600061169a7fea02ffba7dcb45f6fc649714d23f315eef12e3b27f9a7735d8d8bf41eb2b1af160001b8560600151866000015186600001518760200151886040015189606001518a60800151805190602001208b60a001518d608001516040516020016111339a99989796959493929190998a526001600160a01b0398891660208b015260408a019790975294909616606088015267ffffffffffffffff928316608088015290151560a087015260c086015260e0850193909352610100840152166101208201526101400190565b905083606001516001600160a01b03166116c28284600001518560200151866040015161196b565b6001600160a01b031614611702576040517f8baa579f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614801561176157507f000000000000000000000000000000000000000000000000000000000000000046145b1561178b57507f000000000000000000000000000000000000000000000000000000000000000090565b610e6e604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f0000000000000000000000000000000000000000000000000000000000000000918101919091527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b8051602080830151604080850151905160f89490941b7fff0000000000000000000000000000000000000000000000000000000000000016928401929092526021830152604182015260009060610160405160208183030381529060405290506004816040516118a39190612b4c565b9081526040519081900360200190205460ff16156118ed576040517fcce9a82400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60016004826040516118ff9190612b4c565b908152604051908190036020019020805491151560ff199092169190911790555050565b60006107b0611930611708565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b600080600061197c87878787611ab4565b9150915061198981611b78565b5095945050505050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106119dc577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef81000000008310611a08576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310611a2657662386f26fc10000830492506010015b6305f5e1008310611a3e576305f5e100830492506008015b6127108310611a5257612710830492506004015b60648310611a64576064830492506002015b600a83106107b05760010192915050565b60606000611a8283611cdd565b604080516020808252818301909252919250600091906020820181803683375050509182525060208101929092525090565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115611aeb5750600090506003611b6f565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611b3f573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116611b6857600060019250925050611b6f565b9150600090505b94509492505050565b6000816004811115611b8c57611b8c612b5e565b03611b945750565b6001816004811115611ba857611ba8612b5e565b03611bf55760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610fa6565b6002816004811115611c0957611c09612b5e565b03611c565760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610fa6565b6003816004811115611c6a57611c6a612b5e565b03610fb85760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401610fa6565b600060ff8216601f8111156107b0576040517fb3512b0c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008083601f840112611d3057600080fd5b50813567ffffffffffffffff811115611d4857600080fd5b6020830191508360208260051b8501011115611d6357600080fd5b9250929050565b60008060208385031215611d7d57600080fd5b823567ffffffffffffffff811115611d9457600080fd5b611da085828601611d1e565b90969095509350505050565b80356001600160a01b0381168114611dc357600080fd5b919050565b80358015158114611dc357600080fd5b60008060408385031215611deb57600080fd5b611df483611dac565b9150611e0260208401611dc8565b90509250929050565b600060208284031215611e1d57600080fd5b5035919050565b60005b83811015611e3f578181015183820152602001611e27565b50506000910152565b60008151808452611e60816020860160208601611e24565b601f01601f19169290920160200192915050565b602081526000611e876020830184611e48565b9392505050565b600060208284031215611ea057600080fd5b813567ffffffffffffffff811115611eb757600080fd5b820160e08185031215611e8757600080fd5b600060608284031215611edb57600080fd5b50919050565b7fff00000000000000000000000000000000000000000000000000000000000000881681526000602060e081840152611f1d60e084018a611e48565b8381036040850152611f2f818a611e48565b606085018990526001600160a01b038816608086015260a0850187905284810360c0860152855180825283870192509083019060005b81811015611f8157835183529284019291840191600101611f65565b50909c9b505050505050505050505050565b6020808252825182820181905260009190848201906040850190845b81811015610d6557835183529284019291840191600101611faf565b60006101008284031215611edb57600080fd5b600060208284031215611ff057600080fd5b611e8782611dac565b60006020828403121561200b57600080fd5b813567ffffffffffffffff81111561202257600080fd5b820160408185031215611e8757600080fd5b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6183360301811261209457600080fd5b9190910192915050565b60405160a0810167ffffffffffffffff811182821017156120c1576120c1612034565b60405290565b60405160c0810167ffffffffffffffff811182821017156120c1576120c1612034565b604051601f8201601f1916810167ffffffffffffffff8111828210171561211357612113612034565b604052919050565b600067ffffffffffffffff82111561213557612135612034565b5060051b60200190565b60006040828403121561215157600080fd5b6040516040810181811067ffffffffffffffff8211171561217457612174612034565b604052823581526020928301359281019290925250919050565b6000606082840312156121a057600080fd5b6040516060810181811067ffffffffffffffff821117156121c3576121c3612034565b604052905080823560ff811681146121da57600080fd5b8082525060208301356020820152604083013560408201525092915050565b600082601f83011261220a57600080fd5b8135602061221f61221a8361211b565b6120ea565b8281526060928302850182019282820191908785111561223e57600080fd5b8387015b8581101561226157612254898261218e565b8452928401928101612242565b5090979650505050505050565b803567ffffffffffffffff81168114611dc357600080fd5b600060a0823603121561229857600080fd5b6122a061209e565b8235815260208084013567ffffffffffffffff808211156122c057600080fd5b9085019036601f8301126122d357600080fd5b81356122e161221a8261211b565b81815260069190911b8301840190848101903683111561230057600080fd5b938501935b8285101561232957612317368661213f565b82528582019150604085019450612305565b8086880152505050604086013592508083111561234557600080fd5b5050612353368286016121f9565b60408301525061236560608401611dac565b60608201526123766080840161226e565b608082015292915050565b60006020808301818452808551808352604092508286019150828160051b8701018488016000805b8481101561242357898403603f19018652825180518552880151888501889052805188860181905290890190839060608701905b8083101561240e576123fa82855180518252602090810151910152565b928b019260019290920191908a01906123dd565b50978a019795505050918701916001016123a9565b50919998505050505050505050565b600181811c9082168061244657607f821691505b602082108103611edb57634e487b7160e01b600052602260045260246000fd5b6000823560be1983360301811261209457600080fd5b6000845161248e818460208901611e24565b80830190507f2e0000000000000000000000000000000000000000000000000000000000000080825285516124ca816001850160208a01611e24565b600192019182015283516124e5816002840160208801611e24565b0160020195945050505050565b6000808335601e1984360301811261250957600080fd5b83018035915067ffffffffffffffff82111561252457600080fd5b6020019150600581901b3603821315611d6357600080fd5b6000808335601e1984360301811261255357600080fd5b83018035915067ffffffffffffffff82111561256e57600080fd5b6020019150606081023603821315611d6357600080fd5b600060c0828403121561259757600080fd5b61259f6120c7565b90506125aa82611dac565b815260206125b981840161226e565b818301526125c960408401611dc8565b604083015260608301356060830152608083013567ffffffffffffffff808211156125f357600080fd5b818501915085601f83011261260757600080fd5b81358181111561261957612619612034565b61262b84601f19601f840116016120ea565b9150808252868482850101111561264157600080fd5b808484018584013760008482840101525080608085015250505060a082013560a082015292915050565b60006107b03683612585565b60006060828403121561268957600080fd5b611e87838361218e565b6000602082840312156126a557600080fd5b611e878261226e565b60006126bc61221a8461211b565b80848252602080830192508560051b8501368111156126da57600080fd5b855b8181101561271657803567ffffffffffffffff8111156126fc5760008081fd5b61270836828a01612585565b8652509382019382016126dc565b50919695505050505050565b6001600160a01b03815116825267ffffffffffffffff6020820151166020830152604081015115156040830152606081015160608301526000608082015160c0608085015261277460c0850182611e48565b60a093840151949093019390935250919050565b602080825282518282018190526000919060409081850190600581811b8701840188860187805b8581101561284d57603f198b85030187528251805185528901518985018990528051898601819052908a0190606081881b870181019190870190855b81811015612837577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa0898503018352612825848651612722565b948e01949350918d01916001016127eb565b505050978a0197945050918801916001016127af565b50919a9950505050505050505050565b6000602080838503121561287057600080fd5b825167ffffffffffffffff81111561288757600080fd5b8301601f8101851361289857600080fd5b80516128a661221a8261211b565b81815260059190911b820183019083810190878311156128c557600080fd5b928401925b828410156128e3578351825292840192908401906128ca565b979650505050505050565b6000610100828403121561290157600080fd5b61290961209e565b8235815261291a846020850161213f565b602082015261292c846060850161218e565b604082015261293d60c08401611dac565b606082015261294e60e0840161226e565b60808201529392505050565b60006040828403121561296c57600080fd5b611e87838361213f565b818352818160208501375060006020828401015260006020601f19601f840116840101905092915050565b60208152813560208201526000602083013560be198436030181126129c557600080fd5b60408381015283016001600160a01b036129de82611dac565b1660608401526129f06020820161226e565b67ffffffffffffffff8082166080860152612a0d60408401611dc8565b151560a0860152606083013560c086015260808301359150601e19833603018212612a3757600080fd5b6020918301918201913581811115612a4e57600080fd5b803603831315612a5d57600080fd5b60c060e0870152612a7361012087018285612976565b9250505060a0820135610100850152809250505092915050565b600060208284031215612a9f57600080fd5b5051919050565b600060e08236031215612ab857600080fd5b612ac061209e565b82358152602083013567ffffffffffffffff811115612ade57600080fd5b612aea36828601612585565b602083015250612afd366040850161218e565b6040820152612b0e60a08401611dac565b606082015261237660c0840161226e565b602081528151602082015260006020830151604080840152612b446060840182612722565b949350505050565b60008251612094818460208701611e24565b634e487b7160e01b600052602160045260246000fdfea26469706673582212200f4c12de6f07f87a77896f03a868d71978662addf74df8d8993bfbe6d81d5fa664736f6c63430008130033000000000000000000000000c47300428b6ad2c7d03bb76d05a176058b47e6b0
Deployed Bytecode
0x6080604052600436106101445760003560e01c8063715018a6116100c0578063b6ebe53911610074578063ed24911d11610059578063ed24911d146103ac578063f17325e7146103c1578063f2fde38b146103e157600080fd5b8063b6ebe53914610339578063b83010d31461037957600080fd5b80638da5cb5b116100a55780638da5cb5b146102e85780639541152514610306578063a6d4dbc71461032657600080fd5b8063715018a6146102ab57806384b0196e146102c057600080fd5b806317d7de7c1161011757806346926267116100fc578063469262671461024357806354fd4d501461026357806365c40b9c1461027857600080fd5b806317d7de7c1461020e5780633c0427151461023057600080fd5b80630eabf660146101495780630ee489481461015e57806310d736d51461017e57806312b11a17146101d1575b600080fd5b61015c610157366004611d6a565b610401565b005b34801561016a57600080fd5b5061015c610179366004611dd8565b61067c565b34801561018a57600080fd5b506101b4610199366004611e0b565b6000908152600360205260409020546001600160a01b031690565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156101dd57600080fd5b507fea02ffba7dcb45f6fc649714d23f315eef12e3b27f9a7735d8d8bf41eb2b1af15b6040519081526020016101c8565b34801561021a57600080fd5b506102236106af565b6040516101c89190611e74565b61020061023e366004611e8e565b610741565b34801561024f57600080fd5b5061015c61025e366004611ec9565b6107b6565b34801561026f57600080fd5b50610223610869565b34801561028457600080fd5b507f000000000000000000000000c47300428b6ad2c7d03bb76d05a176058b47e6b06101b4565b3480156102b757600080fd5b5061015c61090c565b3480156102cc57600080fd5b506102d5610920565b6040516101c89796959493929190611ee1565b3480156102f457600080fd5b506005546001600160a01b03166101b4565b610319610314366004611d6a565b6109c4565b6040516101c89190611f93565b61015c610334366004611fcb565b610d71565b34801561034557600080fd5b50610369610354366004611fde565b60066020526000908152604090205460ff1681565b60405190151581526020016101c8565b34801561038557600080fd5b507f78a69a78c1a55cdff5cbf949580b410778cd9e4d1ecbe6f06a7fa8dc2441b57d610200565b3480156103b857600080fd5b50610200610e64565b3480156103cd57600080fd5b506102006103dc366004611ff9565b610e73565b3480156103ed57600080fd5b5061015c6103fc366004611fde565b610f26565b8060008167ffffffffffffffff81111561041d5761041d612034565b60405190808252806020026020018201604052801561046357816020015b60408051808201909152600081526060602082015281526020019060019003908161043b5790505b50905060005b828110156105dc5760008585838181106104855761048561204a565b90506020028101906104979190612060565b6104a090612286565b60208101518051919250908015806104bd57508260400151518114155b156104f4576040517f947d5a8400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b818110156105915760008382815181106105135761051361204a565b602002602001015190506105886040518060a0016040528087600001518152602001838152602001876040015185815181106105515761055161204a565b6020026020010151815260200187606001516001600160a01b03168152602001876080015167ffffffffffffffff16815250610fbb565b506001016104f7565b50604051806040016040528084600001518152602001838152508585815181106105bd576105bd61204a565b60200260200101819052505050506105d58160010190565b9050610469565b506040517f4cb7e9e50000000000000000000000000000000000000000000000000000000081526001600160a01b037f000000000000000000000000c47300428b6ad2c7d03bb76d05a176058b47e6b01690634cb7e9e5903490610644908590600401612381565b6000604051808303818588803b15801561065d57600080fd5b505af1158015610671573d6000803e3d6000fd5b505050505050505050565b6106846111b6565b6001600160a01b03919091166000908152600660205260409020805460ff1916911515919091179055565b6060600280546106be90612432565b80601f01602080910402602001604051908101604052809291908181526020018280546106ea90612432565b80156107375780601f1061070c57610100808354040283529160200191610737565b820191906000526020600020905b81548152906001019060200180831161071a57829003601f168201915b5050505050905090565b600061075b61075660c0840160a08501611fde565b611210565b6107686020830183612466565b610776906020810190611fde565b6001600160a01b0316336001600160a01b0316146107a757604051634ca8886760e01b815260040160405180910390fd5b6107b082611249565b92915050565b6107bf33611210565b604080517f4692626700000000000000000000000000000000000000000000000000000000815282356004820152602083013560248201529082013560448201527f000000000000000000000000c47300428b6ad2c7d03bb76d05a176058b47e6b06001600160a01b031690634692626790606401600060405180830381600087803b15801561084e57600080fd5b505af1158015610862573d6000803e3d6000fd5b5050505050565b60606108947f000000000000000000000000000000000000000000000000000000000000000161137a565b6108bd7f000000000000000000000000000000000000000000000000000000000000000361137a565b6108e67f000000000000000000000000000000000000000000000000000000000000000061137a565b6040516020016108f89392919061247c565b604051602081830303815290604052905090565b6109146111b6565b61091e6000611438565b565b6000606080828080836109537f417474657374657250726f78790000000000000000000000000000000000000d836114a2565b61097e7f312e332e3000000000000000000000000000000000000000000000000000000560016114a2565b604080516000808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009b939a50919850469750309650945092509050565b60608160008167ffffffffffffffff8111156109e2576109e2612034565b604051908082528060200260200182016040528015610a2857816020015b604080518082019091526000815260606020820152815260200190600190039081610a005790505b50905060005b82811015610beb5736868683818110610a4957610a4961204a565b9050602002810190610a5b9190612060565b9050366000610a6d60208401846124f2565b909250905080801580610a8e5750610a88604085018561253c565b90508114155b15610ac5576040517f947d5a8400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b81811015610b9957610b916040518060a0016040528087600001358152602001868685818110610afa57610afa61204a565b9050602002810190610b0c9190612466565b610b159061266b565b8152602001610b27604089018961253c565b85818110610b3757610b3761204a565b905060600201803603810190610b4d9190612677565b8152602001610b626080890160608a01611fde565b6001600160a01b03168152602001610b8060a0890160808a01612693565b67ffffffffffffffff16905261154d565b600101610ac8565b50604080518082019091528435815260208101610bb684866126ae565b815250868681518110610bcb57610bcb61204a565b602002602001018190525050505050610be48160010190565b9050610a2e565b5060007f000000000000000000000000c47300428b6ad2c7d03bb76d05a176058b47e6b06001600160a01b03166344adc90e34846040518363ffffffff1660e01b8152600401610c3b9190612788565b60006040518083038185885af1158015610c59573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f19168201604052610c82919081019061285d565b90506000805b84811015610d655736888883818110610ca357610ca361204a565b9050602002810190610cb59190612060565b9050366000610cc760208401846124f2565b90925090508060005b81811015610d4f57610ce86080860160608701611fde565b600360008a8a81518110610cfe57610cfe61204a565b6020026020010151815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b03160217905550866001019650610d488160010190565b9050610cd0565b5050505050610d5e8160010190565b9050610c88565b50909695505050505050565b610d88610d83368390038301836128ee565b610fbb565b7f000000000000000000000000c47300428b6ad2c7d03bb76d05a176058b47e6b06001600160a01b031663469262673460405180604001604052808560000135815260200185602001803603810190610de1919061295a565b90526040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815281516004820152602091820151805160248301529091015160448201526064016000604051808303818588803b158015610e4857600080fd5b505af1158015610e5c573d6000803e3d6000fd5b505050505050565b6000610e6e611708565b905090565b6000610e7e33611210565b6040517ff17325e70000000000000000000000000000000000000000000000000000000081526001600160a01b037f000000000000000000000000c47300428b6ad2c7d03bb76d05a176058b47e6b0169063f17325e790610ee39085906004016129a1565b6020604051808303816000875af1158015610f02573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107b09190612a8d565b610f2e6111b6565b6001600160a01b038116610faf5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b610fb881611438565b50565b608081015167ffffffffffffffff1615801590610fef57504267ffffffffffffffff16816080015167ffffffffffffffff16105b15611026576040517f1ab7da6b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6020808201518051600090815260039092526040909120546001600160a01b03168061107e576040517fc5723b5100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b03811633146110a757604051634ca8886760e01b815260040160405180910390fd5b60408301516110b581611833565b606080850151855185516020808801516080808b0151604080517f78a69a78c1a55cdff5cbf949580b410778cd9e4d1ecbe6f06a7fa8dc2441b57d958101959095526001600160a01b0390971696840196909652958201939093529384015260a083015267ffffffffffffffff1660c082015260009061114e9060e0015b60405160208183030381529060405280519060200120611923565b905084606001516001600160a01b03166111768284600001518560200151866040015161196b565b6001600160a01b031614610862576040517f8baa579f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6005546001600160a01b0316331461091e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610fa6565b6001600160a01b03811660009081526006602052604090205460ff16610fb857604051634ca8886760e01b815260040160405180910390fd5b600061125c61125783612aa6565b61154d565b60007f000000000000000000000000c47300428b6ad2c7d03bb76d05a176058b47e6b06001600160a01b031663f17325e7346040518060400160405280876000013581526020018780602001906112b39190612466565b6112bc9061266b565b8152506040518363ffffffff1660e01b81526004016112db9190612b1f565b60206040518083038185885af11580156112f9573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061131e9190612a8d565b905061133060c0840160a08501611fde565b600082815260036020526040902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b039290921691909117905592915050565b6060600061138783611993565b600101905060008167ffffffffffffffff8111156113a7576113a7612034565b6040519080825280601f01601f1916602001820160405280156113d1576020820181803683370190505b5090508181016020015b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85049450846113db57509392505050565b600580546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b606060ff83146114bc576114b583611a75565b90506107b0565b8180546114c890612432565b80601f01602080910402602001604051908101604052809291908181526020018280546114f490612432565b80156115415780601f1061151657610100808354040283529160200191611541565b820191906000526020600020905b81548152906001019060200180831161152457829003601f168201915b505050505090506107b0565b608081015167ffffffffffffffff161580159061158157504267ffffffffffffffff16816080015167ffffffffffffffff16105b156115b8576040517f1ab7da6b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b602081015160408201516115cb81611833565b600061169a7fea02ffba7dcb45f6fc649714d23f315eef12e3b27f9a7735d8d8bf41eb2b1af160001b8560600151866000015186600001518760200151886040015189606001518a60800151805190602001208b60a001518d608001516040516020016111339a99989796959493929190998a526001600160a01b0398891660208b015260408a019790975294909616606088015267ffffffffffffffff928316608088015290151560a087015260c086015260e0850193909352610100840152166101208201526101400190565b905083606001516001600160a01b03166116c28284600001518560200151866040015161196b565b6001600160a01b031614611702576040517f8baa579f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050565b6000306001600160a01b037f0000000000000000000000007673f45e6e95373ba22651a4f5f594edec3006bc1614801561176157507f000000000000000000000000000000000000000000000000000000000008275046145b1561178b57507ffd7bbfdff49873a9870580eabed48e5c57ca6986c225f1f237c76d1bb0e264b290565b610e6e604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f97bb23b7039fbf807a19c2f6dd506213960f67136e67b18f347fb9a2b2931468918101919091527f6a08c3e203132c561752255a4d52ffae85bb9c5d33cb3291520dea1b8435638960608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b8051602080830151604080850151905160f89490941b7fff0000000000000000000000000000000000000000000000000000000000000016928401929092526021830152604182015260009060610160405160208183030381529060405290506004816040516118a39190612b4c565b9081526040519081900360200190205460ff16156118ed576040517fcce9a82400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60016004826040516118ff9190612b4c565b908152604051908190036020019020805491151560ff199092169190911790555050565b60006107b0611930611708565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b600080600061197c87878787611ab4565b9150915061198981611b78565b5095945050505050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106119dc577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef81000000008310611a08576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310611a2657662386f26fc10000830492506010015b6305f5e1008310611a3e576305f5e100830492506008015b6127108310611a5257612710830492506004015b60648310611a64576064830492506002015b600a83106107b05760010192915050565b60606000611a8283611cdd565b604080516020808252818301909252919250600091906020820181803683375050509182525060208101929092525090565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115611aeb5750600090506003611b6f565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611b3f573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116611b6857600060019250925050611b6f565b9150600090505b94509492505050565b6000816004811115611b8c57611b8c612b5e565b03611b945750565b6001816004811115611ba857611ba8612b5e565b03611bf55760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610fa6565b6002816004811115611c0957611c09612b5e565b03611c565760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610fa6565b6003816004811115611c6a57611c6a612b5e565b03610fb85760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401610fa6565b600060ff8216601f8111156107b0576040517fb3512b0c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008083601f840112611d3057600080fd5b50813567ffffffffffffffff811115611d4857600080fd5b6020830191508360208260051b8501011115611d6357600080fd5b9250929050565b60008060208385031215611d7d57600080fd5b823567ffffffffffffffff811115611d9457600080fd5b611da085828601611d1e565b90969095509350505050565b80356001600160a01b0381168114611dc357600080fd5b919050565b80358015158114611dc357600080fd5b60008060408385031215611deb57600080fd5b611df483611dac565b9150611e0260208401611dc8565b90509250929050565b600060208284031215611e1d57600080fd5b5035919050565b60005b83811015611e3f578181015183820152602001611e27565b50506000910152565b60008151808452611e60816020860160208601611e24565b601f01601f19169290920160200192915050565b602081526000611e876020830184611e48565b9392505050565b600060208284031215611ea057600080fd5b813567ffffffffffffffff811115611eb757600080fd5b820160e08185031215611e8757600080fd5b600060608284031215611edb57600080fd5b50919050565b7fff00000000000000000000000000000000000000000000000000000000000000881681526000602060e081840152611f1d60e084018a611e48565b8381036040850152611f2f818a611e48565b606085018990526001600160a01b038816608086015260a0850187905284810360c0860152855180825283870192509083019060005b81811015611f8157835183529284019291840191600101611f65565b50909c9b505050505050505050505050565b6020808252825182820181905260009190848201906040850190845b81811015610d6557835183529284019291840191600101611faf565b60006101008284031215611edb57600080fd5b600060208284031215611ff057600080fd5b611e8782611dac565b60006020828403121561200b57600080fd5b813567ffffffffffffffff81111561202257600080fd5b820160408185031215611e8757600080fd5b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6183360301811261209457600080fd5b9190910192915050565b60405160a0810167ffffffffffffffff811182821017156120c1576120c1612034565b60405290565b60405160c0810167ffffffffffffffff811182821017156120c1576120c1612034565b604051601f8201601f1916810167ffffffffffffffff8111828210171561211357612113612034565b604052919050565b600067ffffffffffffffff82111561213557612135612034565b5060051b60200190565b60006040828403121561215157600080fd5b6040516040810181811067ffffffffffffffff8211171561217457612174612034565b604052823581526020928301359281019290925250919050565b6000606082840312156121a057600080fd5b6040516060810181811067ffffffffffffffff821117156121c3576121c3612034565b604052905080823560ff811681146121da57600080fd5b8082525060208301356020820152604083013560408201525092915050565b600082601f83011261220a57600080fd5b8135602061221f61221a8361211b565b6120ea565b8281526060928302850182019282820191908785111561223e57600080fd5b8387015b8581101561226157612254898261218e565b8452928401928101612242565b5090979650505050505050565b803567ffffffffffffffff81168114611dc357600080fd5b600060a0823603121561229857600080fd5b6122a061209e565b8235815260208084013567ffffffffffffffff808211156122c057600080fd5b9085019036601f8301126122d357600080fd5b81356122e161221a8261211b565b81815260069190911b8301840190848101903683111561230057600080fd5b938501935b8285101561232957612317368661213f565b82528582019150604085019450612305565b8086880152505050604086013592508083111561234557600080fd5b5050612353368286016121f9565b60408301525061236560608401611dac565b60608201526123766080840161226e565b608082015292915050565b60006020808301818452808551808352604092508286019150828160051b8701018488016000805b8481101561242357898403603f19018652825180518552880151888501889052805188860181905290890190839060608701905b8083101561240e576123fa82855180518252602090810151910152565b928b019260019290920191908a01906123dd565b50978a019795505050918701916001016123a9565b50919998505050505050505050565b600181811c9082168061244657607f821691505b602082108103611edb57634e487b7160e01b600052602260045260246000fd5b6000823560be1983360301811261209457600080fd5b6000845161248e818460208901611e24565b80830190507f2e0000000000000000000000000000000000000000000000000000000000000080825285516124ca816001850160208a01611e24565b600192019182015283516124e5816002840160208801611e24565b0160020195945050505050565b6000808335601e1984360301811261250957600080fd5b83018035915067ffffffffffffffff82111561252457600080fd5b6020019150600581901b3603821315611d6357600080fd5b6000808335601e1984360301811261255357600080fd5b83018035915067ffffffffffffffff82111561256e57600080fd5b6020019150606081023603821315611d6357600080fd5b600060c0828403121561259757600080fd5b61259f6120c7565b90506125aa82611dac565b815260206125b981840161226e565b818301526125c960408401611dc8565b604083015260608301356060830152608083013567ffffffffffffffff808211156125f357600080fd5b818501915085601f83011261260757600080fd5b81358181111561261957612619612034565b61262b84601f19601f840116016120ea565b9150808252868482850101111561264157600080fd5b808484018584013760008482840101525080608085015250505060a082013560a082015292915050565b60006107b03683612585565b60006060828403121561268957600080fd5b611e87838361218e565b6000602082840312156126a557600080fd5b611e878261226e565b60006126bc61221a8461211b565b80848252602080830192508560051b8501368111156126da57600080fd5b855b8181101561271657803567ffffffffffffffff8111156126fc5760008081fd5b61270836828a01612585565b8652509382019382016126dc565b50919695505050505050565b6001600160a01b03815116825267ffffffffffffffff6020820151166020830152604081015115156040830152606081015160608301526000608082015160c0608085015261277460c0850182611e48565b60a093840151949093019390935250919050565b602080825282518282018190526000919060409081850190600581811b8701840188860187805b8581101561284d57603f198b85030187528251805185528901518985018990528051898601819052908a0190606081881b870181019190870190855b81811015612837577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa0898503018352612825848651612722565b948e01949350918d01916001016127eb565b505050978a0197945050918801916001016127af565b50919a9950505050505050505050565b6000602080838503121561287057600080fd5b825167ffffffffffffffff81111561288757600080fd5b8301601f8101851361289857600080fd5b80516128a661221a8261211b565b81815260059190911b820183019083810190878311156128c557600080fd5b928401925b828410156128e3578351825292840192908401906128ca565b979650505050505050565b6000610100828403121561290157600080fd5b61290961209e565b8235815261291a846020850161213f565b602082015261292c846060850161218e565b604082015261293d60c08401611dac565b606082015261294e60e0840161226e565b60808201529392505050565b60006040828403121561296c57600080fd5b611e87838361213f565b818352818160208501375060006020828401015260006020601f19601f840116840101905092915050565b60208152813560208201526000602083013560be198436030181126129c557600080fd5b60408381015283016001600160a01b036129de82611dac565b1660608401526129f06020820161226e565b67ffffffffffffffff8082166080860152612a0d60408401611dc8565b151560a0860152606083013560c086015260808301359150601e19833603018212612a3757600080fd5b6020918301918201913581811115612a4e57600080fd5b803603831315612a5d57600080fd5b60c060e0870152612a7361012087018285612976565b9250505060a0820135610100850152809250505092915050565b600060208284031215612a9f57600080fd5b5051919050565b600060e08236031215612ab857600080fd5b612ac061209e565b82358152602083013567ffffffffffffffff811115612ade57600080fd5b612aea36828601612585565b602083015250612afd366040850161218e565b6040820152612b0e60a08401611dac565b606082015261237660c0840161226e565b602081528151602082015260006020830151604080840152612b446060840182612722565b949350505050565b60008251612094818460208701611e24565b634e487b7160e01b600052602160045260246000fdfea26469706673582212200f4c12de6f07f87a77896f03a868d71978662addf74df8d8993bfbe6d81d5fa664736f6c63430008130033
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 | 27 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.