Source Code
Overview
ETH Balance
More Info
ContractCreator
Multichain Info
N/A
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x882977D7...D887e6bA0 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
Resolver
Compiler Version
v0.8.25+commit.b61c2a91
Optimization Enabled:
Yes with 10000 runs
Other Settings:
shanghai EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import { IEAS, Attestation } from "../interfaces/IEAS.sol"; import { IResolver } from "../interfaces/IResolver.sol"; import { AccessControl } from "@openzeppelin/contracts/access/AccessControl.sol"; import { AccessDenied, InvalidEAS, InvalidLength, uncheckedInc, EMPTY_UID, NO_EXPIRATION_TIME, Session, slice } from "../Common.sol"; error AlreadyHasResponse(); error InsufficientValue(); error InvalidAttestationTitle(); error InvalidExpiration(); error InvalidRefUID(); error InvalidRevocability(); error InvalidRole(); error InvalidWithdraw(); error NotPayable(); error Unauthorized(); error InvalidSession(); error NotHostOfTheSession(); error SessionAlreadyEnded(); /// @author Blockful | 0xneves /// @notice ZuVillage Resolver contract for Ethereum Attestation Service. contract Resolver is IResolver, AccessControl { // The global EAS contract. IEAS internal immutable _eas; // Roles bytes32 public constant ROOT_ROLE = keccak256("ROOT_ROLE"); bytes32 public constant MANAGER_ROLE = keccak256("MANAGER_ROLE"); bytes32 public constant VILLAGER_ROLE = keccak256("VILLAGER_ROLE"); // Maps addresses to booleans to check if a Manager has been revoked mapping(address => bool) private _receivedManagerBadge; // Maps allowed attestations (Hashed titles that can be attested) mapping(bytes32 => bool) private _allowedAttestationTitles; // Maps attestation IDs to boolans (each attestation can only have one active response) mapping(bytes32 => bool) private _cannotReply; // Maps schemas ID and role ID to action mapping(bytes32 => Action) private _allowedSchemas; // Maps session ids and sessions Structures mapping(bytes32 => Session) private _session; // Maps all attestation titles (badge titles) to be retrieved by the frontend string[] private _attestationTitles; // Define a constant for default SESSION_DURATION (30 days in seconds) uint256 private constant DEFAULT_SESSION_DURATION = 30 days; /// @notice Emitted when a new session is created /// @param sessionId The unique identifier of the session /// @param host The address of the session host /// @param title The title of the session /// @param startTime The timestamp when the session starts /// @param endTime The timestamp when the session ends event sessionCreated( bytes32 indexed sessionId, address indexed host, string title, uint256 startTime, uint256 endTime ); /// @notice Emitted when a session is closed /// @param sessionId The unique identifier of the closed session /// @param host The address of the session host /// @param title The title of the closed session /// @param startTime The timestamp when the session started /// @param endTime The timestamp when the session ended event sessionClosed( bytes32 indexed sessionId, address indexed host, string title, uint256 startTime, uint256 endTime ); /// @notice Emitted when a session is removed /// @param sessionId The unique identifier of the removed session event sessionRemoved(bytes32 indexed sessionId); /// @dev Creates a new resolver. /// @param eas The address of the global EAS contract. constructor(IEAS eas) { if (address(eas) == address(0)) revert InvalidEAS(); _eas = eas; // Assigns ROOT_ROLE as the admin of all roles _setRoleAdmin(ROOT_ROLE, ROOT_ROLE); _setRoleAdmin(MANAGER_ROLE, ROOT_ROLE); _setRoleAdmin(VILLAGER_ROLE, ROOT_ROLE); // Assigns all roles to the deployer _grantRole(ROOT_ROLE, msg.sender); _grantRole(MANAGER_ROLE, msg.sender); _grantRole(VILLAGER_ROLE, msg.sender); } /// @dev Ensures that only the EAS contract can make this call. modifier onlyEAS() { if (msg.sender != address(_eas)) revert AccessDenied(); _; } /// @inheritdoc IResolver function isPayable() public pure virtual returns (bool) { return false; } /// @inheritdoc IResolver function allowedAttestationTitles(string memory title) public view returns (bool) { return _allowedAttestationTitles[keccak256(abi.encode(title))]; } /// @inheritdoc IResolver function cannotReply(bytes32 uid) public view returns (bool) { return _cannotReply[uid]; } /// @inheritdoc IResolver function allowedSchemas(bytes32 uid) public view returns (Action) { return _allowedSchemas[uid]; } /// @dev Validates if the `action` is allowed for the given `role` and `schema`. function isActionAllowed(bytes32 uid, Action action) internal view returns (bool) { return _allowedSchemas[uid] == action; } /// @inheritdoc IResolver function attest(Attestation calldata attestation) external payable onlyEAS returns (bool) { return onAttest(attestation); } /// @inheritdoc IResolver function revoke(Attestation calldata attestation) external payable onlyEAS returns (bool) { // Schema to revoke managers if (isActionAllowed(attestation.schema, Action.ASSIGN_MANAGER)) { _checkRole(ROOT_ROLE, attestation.attester); _checkRole(MANAGER_ROLE, attestation.recipient); _revokeRole(MANAGER_ROLE, attestation.recipient); return true; } // Schema to revoke a response ( true / false ) if (isActionAllowed(attestation.schema, Action.REPLY)) { _checkRole(VILLAGER_ROLE, attestation.attester); _cannotReply[attestation.refUID] = false; return true; } return false; } /// @dev Assign new managers to the contract. function assignManager(Attestation calldata attestation) internal returns (bool) { if (hasRole(ROOT_ROLE, attestation.attester) || hasRole(MANAGER_ROLE, attestation.attester)) { if ( hasRole(MANAGER_ROLE, attestation.recipient) || _receivedManagerBadge[attestation.recipient] ) revert InvalidRole(); if (!attestation.revocable) revert InvalidRevocability(); string memory role = abi.decode(attestation.data, (string)); if (keccak256(abi.encode(role)) != keccak256(abi.encode("Manager"))) revert InvalidRole(); _receivedManagerBadge[attestation.recipient] = true; _grantRole(MANAGER_ROLE, attestation.recipient); return true; } return false; } /// @dev Assign new villagers by checking in or revoke them by checking out. function assignVillager(Attestation calldata attestation) internal returns (bool) { if (attestation.revocable) revert InvalidRevocability(); string memory status = abi.decode(attestation.data, (string)); // Check if recipient doesn't have Villager Role (check-in) if ( !hasRole(VILLAGER_ROLE, attestation.recipient) && keccak256(abi.encode(status)) == keccak256(abi.encode("Check-in")) ) { _checkRole(MANAGER_ROLE, attestation.attester); _grantRole(VILLAGER_ROLE, attestation.recipient); return true; } // Check if recipient has Villager Role (check-out) if ( hasRole(VILLAGER_ROLE, attestation.recipient) && keccak256(abi.encode(status)) == keccak256(abi.encode("Check-out")) && (attestation.recipient == attestation.attester || hasRole(MANAGER_ROLE, attestation.attester)) ) { // Checks if the attestation has a non empty reference if (attestation.refUID == EMPTY_UID) revert InvalidRefUID(); Attestation memory attesterRef = _eas.getAttestation(attestation.refUID); // Match the attester of this attestation with the recipient of the reference attestation // The check-out is designed to be a reply to a previous check-in if (attesterRef.recipient != attestation.recipient) revert InvalidRefUID(); _revokeRole(VILLAGER_ROLE, attestation.recipient); return true; } return false; } /// @dev Attest an event badge. function attestEvent(Attestation calldata attestation) internal view returns (bool) { if (attestation.revocable) revert InvalidRevocability(); _checkRole(VILLAGER_ROLE, attestation.attester); _checkRole(VILLAGER_ROLE, attestation.recipient); // Titles for attestations must be included in this contract by the managers // via the {setAttestationTitle} function (string memory title, ) = abi.decode(attestation.data, (string, string)); if (!_allowedAttestationTitles[keccak256(abi.encode(title))]) revert InvalidAttestationTitle(); // Check if it is a host-only attestation and if the attester is the host if (isHostOnlyAttestation(title)) { if (!isAttesterHost(attestation.attester, title)) revert NotHostOfTheSession(); } return true; } /// @dev Checks if the attestation is a host-only attestation function isHostOnlyAttestation(string memory title) internal pure returns (bool) { bytes memory titleBytes = bytes(title); return titleBytes.length >= 5 && (keccak256(abi.encodePacked(slice(titleBytes, 0, 5))) == keccak256("Host_") || keccak256(abi.encodePacked(slice(titleBytes, 0, 9))) == keccak256("Attendee_")); } /// @dev Checks if the attester is the host of the session function isAttesterHost(address attester, string memory title) internal view returns (bool) { bytes memory titleBytes = bytes(title); string memory sessionTitle = string(slice(titleBytes, 5, titleBytes.length - 5)); bytes32 sessionId = keccak256(abi.encodePacked(attester, sessionTitle)); return _session[sessionId].host == attester; } /// @dev Attest a response to an event badge emitted by {attestEvent}. function attestResponse(Attestation calldata attestation) internal returns (bool) { if (!attestation.revocable) revert InvalidRevocability(); if (_cannotReply[attestation.refUID]) revert AlreadyHasResponse(); _checkRole(VILLAGER_ROLE, attestation.attester); // Checks if the attestation has a non empty reference if (attestation.refUID == EMPTY_UID) revert InvalidRefUID(); Attestation memory attesterRef = _eas.getAttestation(attestation.refUID); // Match the attester of this attestation with the recipient of the reference attestation // The response is designed to be a reply to a previous attestation if (attesterRef.recipient != attestation.attester) revert InvalidRefUID(); // Cannot create new responses until this attestation is revoked _cannotReply[attestation.refUID] = true; return true; } /// @inheritdoc IResolver function getAllAttestationTitles() public view returns (string[] memory) { string[] memory titles = new string[](_attestationTitles.length); uint256 j = 0; for (uint256 i = 0; i < _attestationTitles.length; ) { if (_allowedAttestationTitles[keccak256(abi.encode(_attestationTitles[i]))]) { titles[j] = _attestationTitles[i]; assembly { j := add(j, 1) } } assembly { i := add(i, 1) } } assembly { mstore(titles, j) } return titles; } /// @inheritdoc IResolver function setAttestationTitle(string memory title, bool isValid) public onlyRole(MANAGER_ROLE) { _allowedAttestationTitles[keccak256(abi.encode(title))] = isValid; if (isValid) _attestationTitles.push(title); } /// @inheritdoc IResolver function setSchema(bytes32 uid, uint256 action) public onlyRole(ROOT_ROLE) { _allowedSchemas[uid] = Action(action); } /// @inheritdoc IResolver function multiAttest( Attestation[] calldata attestations, uint256[] calldata values ) external payable onlyEAS returns (bool) { for (uint256 i = 0; i < attestations.length; i = uncheckedInc(i)) { if (!onAttest(attestations[i])) { revert("Attestation failed"); } } return true; } /// @dev Internal function to handle attestation logic function onAttest(Attestation calldata attestation) internal returns (bool) { // Prohibits the attestation expiration to be finite if (attestation.expirationTime != NO_EXPIRATION_TIME) revert InvalidExpiration(); // Schema to assign managers if (isActionAllowed(attestation.schema, Action.ASSIGN_MANAGER)) return assignManager(attestation); // Schema to checkIn / checkOut villagers if (isActionAllowed(attestation.schema, Action.ASSIGN_VILLAGER)) { return assignVillager(attestation); } // Schema to create event attestations (Attestations) if (isActionAllowed(attestation.schema, Action.ATTEST)) { return attestEvent(attestation); } // Schema to create a response ( true / false ) if (isActionAllowed(attestation.schema, Action.REPLY)) { return attestResponse(attestation); } return false; } /// @dev creates a new session function createSession( uint256 duration, string memory sessionTitle ) public returns (bytes32 sessionId) { if (!hasRole(VILLAGER_ROLE, msg.sender)) revert InvalidRole(); if (duration == 0) revert InvalidSession(); if (bytes(sessionTitle).length == 0) revert InvalidSession(); // Generate a unique session ID sessionId = keccak256(abi.encodePacked(msg.sender, sessionTitle)); // Check if the session already exists if (_session[sessionId].host != address(0)) { revert InvalidSession(); } uint256 sessionDuration = duration > 0 ? duration : DEFAULT_SESSION_DURATION; Session memory session = Session({ host: msg.sender, title: sessionTitle, startTime: block.timestamp, endTime: block.timestamp + sessionDuration }); //Store the session _session[sessionId] = session; emit sessionCreated(sessionId, msg.sender, sessionTitle, session.startTime, session.endTime); //Enable the host and attendee attestation related to the session string memory hostAttestationTitle = string(abi.encodePacked("Host_", sessionTitle)); _allowedAttestationTitles[keccak256(abi.encode(hostAttestationTitle))] = true; string memory attendeeAttestationTitle = string(abi.encodePacked("Attendee_", sessionTitle)); _allowedAttestationTitles[keccak256(abi.encode(attendeeAttestationTitle))] = true; return sessionId; } /// @dev Remove a session. function removeSesison( string memory sessionTitle, address sessionOwner ) external onlyRole(ROOT_ROLE) { bytes32 sessionId = keccak256(abi.encodePacked(sessionOwner, sessionTitle)); delete _session[sessionId]; emit sessionRemoved(sessionId); } /// @dev Get a session. function getSession( string memory sessionTitle, address sessionOwner ) external view returns (Session memory) { bytes32 sessionId = keccak256(abi.encodePacked(sessionOwner, sessionTitle)); return _session[sessionId]; } /// @dev Close a session. function closeSession(bytes32 sessionId) public onlyRole(VILLAGER_ROLE) { Session storage session = _session[sessionId]; if (session.endTime < block.timestamp) { revert SessionAlreadyEnded(); } if ((session.host != msg.sender) && !hasRole(MANAGER_ROLE, msg.sender)) { revert Unauthorized(); } session.endTime = block.timestamp; emit sessionClosed(sessionId, msg.sender, session.title, session.startTime, session.endTime); } /// @dev ETH callback. receive() external payable virtual { if (!isPayable()) { revert NotPayable(); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import { ISchemaRegistry } from "./ISchemaRegistry.sol"; import { ISemver } from "./ISemver.sol"; import { Attestation, Signature } from "../Common.sol"; /// @notice A struct representing the arguments of the attestation request. struct AttestationRequestData { address recipient; // The recipient of the attestation. uint64 expirationTime; // The time when the attestation expires (Unix timestamp). bool revocable; // Whether the attestation is revocable. bytes32 refUID; // The UID of the related attestation. bytes data; // Custom attestation data. uint256 value; // An explicit ETH amount to send to the resolver. This is important to prevent accidental user errors. } /// @notice A struct representing the full arguments of the attestation request. struct AttestationRequest { bytes32 schema; // The unique identifier of the schema. AttestationRequestData data; // The arguments of the attestation request. } /// @notice A struct representing the full arguments of the full delegated attestation request. struct DelegatedAttestationRequest { bytes32 schema; // The unique identifier of the schema. AttestationRequestData data; // The arguments of the attestation request. Signature signature; // The ECDSA signature data. address attester; // The attesting account. uint64 deadline; // The deadline of the signature/request. } /// @notice A struct representing the full arguments of the multi attestation request. struct MultiAttestationRequest { bytes32 schema; // The unique identifier of the schema. AttestationRequestData[] data; // The arguments of the attestation request. } /// @notice A struct representing the full arguments of the delegated multi attestation request. struct MultiDelegatedAttestationRequest { bytes32 schema; // The unique identifier of the schema. AttestationRequestData[] data; // The arguments of the attestation requests. Signature[] signatures; // The ECDSA signatures data. Please note that the signatures are assumed to be signed with increasing nonces. address attester; // The attesting account. uint64 deadline; // The deadline of the signature/request. } /// @notice A struct representing the arguments of the revocation request. struct RevocationRequestData { bytes32 uid; // The UID of the attestation to revoke. uint256 value; // An explicit ETH amount to send to the resolver. This is important to prevent accidental user errors. } /// @notice A struct representing the full arguments of the revocation request. struct RevocationRequest { bytes32 schema; // The unique identifier of the schema. RevocationRequestData data; // The arguments of the revocation request. } /// @notice A struct representing the arguments of the full delegated revocation request. struct DelegatedRevocationRequest { bytes32 schema; // The unique identifier of the schema. RevocationRequestData data; // The arguments of the revocation request. Signature signature; // The ECDSA signature data. address revoker; // The revoking account. uint64 deadline; // The deadline of the signature/request. } /// @notice A struct representing the full arguments of the multi revocation request. struct MultiRevocationRequest { bytes32 schema; // The unique identifier of the schema. RevocationRequestData[] data; // The arguments of the revocation request. } /// @notice A struct representing the full arguments of the delegated multi revocation request. struct MultiDelegatedRevocationRequest { bytes32 schema; // The unique identifier of the schema. RevocationRequestData[] data; // The arguments of the revocation requests. Signature[] signatures; // The ECDSA signatures data. Please note that the signatures are assumed to be signed with increasing nonces. address revoker; // The revoking account. uint64 deadline; // The deadline of the signature/request. } /// @title IEAS /// @notice EAS - Ethereum Attestation Service interface. interface IEAS is ISemver { /// @notice Emitted when an attestation has been made. /// @param recipient The recipient of the attestation. /// @param attester The attesting account. /// @param uid The UID of the new attestation. /// @param schemaUID The UID of the schema. event Attested(address indexed recipient, address indexed attester, bytes32 uid, bytes32 indexed schemaUID); /// @notice Emitted when an attestation has been revoked. /// @param recipient The recipient of the attestation. /// @param attester The attesting account. /// @param schemaUID The UID of the schema. /// @param uid The UID the revoked attestation. event Revoked(address indexed recipient, address indexed attester, bytes32 uid, bytes32 indexed schemaUID); /// @notice Emitted when a data has been timestamped. /// @param data The data. /// @param timestamp The timestamp. event Timestamped(bytes32 indexed data, uint64 indexed timestamp); /// @notice Emitted when a data has been revoked. /// @param revoker The address of the revoker. /// @param data The data. /// @param timestamp The timestamp. event RevokedOffchain(address indexed revoker, bytes32 indexed data, uint64 indexed timestamp); /// @notice Returns the address of the global schema registry. /// @return The address of the global schema registry. function getSchemaRegistry() external view returns (ISchemaRegistry); /// @notice Attests to a specific schema. /// @param request The arguments of the attestation request. /// @return The UID of the new attestation. /// /// Example: /// attest({ /// schema: "0facc36681cbe2456019c1b0d1e7bedd6d1d40f6f324bf3dd3a4cef2999200a0", /// data: { /// recipient: "0xdEADBeAFdeAdbEafdeadbeafDeAdbEAFdeadbeaf", /// expirationTime: 0, /// revocable: true, /// refUID: "0x0000000000000000000000000000000000000000000000000000000000000000", /// data: "0xF00D", /// value: 0 /// } /// }) function attest(AttestationRequest calldata request) external payable returns (bytes32); /// @notice Attests to a specific schema via the provided ECDSA signature. /// @param delegatedRequest The arguments of the delegated attestation request. /// @return The UID of the new attestation. /// /// Example: /// attestByDelegation({ /// schema: '0x8e72f5bc0a8d4be6aa98360baa889040c50a0e51f32dbf0baa5199bd93472ebc', /// data: { /// recipient: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266', /// expirationTime: 1673891048, /// revocable: true, /// refUID: '0x0000000000000000000000000000000000000000000000000000000000000000', /// data: '0x1234', /// value: 0 /// }, /// signature: { /// v: 28, /// r: '0x148c...b25b', /// s: '0x5a72...be22' /// }, /// attester: '0xc5E8740aD971409492b1A63Db8d83025e0Fc427e', /// deadline: 1673891048 /// }) function attestByDelegation(DelegatedAttestationRequest calldata delegatedRequest) external payable returns (bytes32); /// @notice Attests to multiple schemas. /// @param multiRequests The arguments of the multi attestation requests. The requests should be grouped by distinct /// schema ids to benefit from the best batching optimization. /// @return The UIDs of the new attestations. /// /// Example: /// multiAttest([{ /// schema: '0x33e9094830a5cba5554d1954310e4fbed2ef5f859ec1404619adea4207f391fd', /// data: [{ /// recipient: '0xdEADBeAFdeAdbEafdeadbeafDeAdbEAFdeadbeaf', /// expirationTime: 1673891048, /// revocable: true, /// refUID: '0x0000000000000000000000000000000000000000000000000000000000000000', /// data: '0x1234', /// value: 1000 /// }, /// { /// recipient: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266', /// expirationTime: 0, /// revocable: false, /// refUID: '0x480df4a039efc31b11bfdf491b383ca138b6bde160988222a2a3509c02cee174', /// data: '0x00', /// value: 0 /// }], /// }, /// { /// schema: '0x5ac273ce41e3c8bfa383efe7c03e54c5f0bff29c9f11ef6ffa930fc84ca32425', /// data: [{ /// recipient: '0xdEADBeAFdeAdbEafdeadbeafDeAdbEAFdeadbeaf', /// expirationTime: 0, /// revocable: true, /// refUID: '0x75bf2ed8dca25a8190c50c52db136664de25b2449535839008ccfdab469b214f', /// data: '0x12345678', /// value: 0 /// }, /// }]) function multiAttest(MultiAttestationRequest[] calldata multiRequests) external payable returns (bytes32[] memory); /// @notice Attests to multiple schemas using via provided ECDSA signatures. /// @param multiDelegatedRequests The arguments of the delegated multi attestation requests. The requests should be /// grouped by distinct schema ids to benefit from the best batching optimization. /// @return The UIDs of the new attestations. /// /// Example: /// multiAttestByDelegation([{ /// schema: '0x8e72f5bc0a8d4be6aa98360baa889040c50a0e51f32dbf0baa5199bd93472ebc', /// data: [{ /// recipient: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266', /// expirationTime: 1673891048, /// revocable: true, /// refUID: '0x0000000000000000000000000000000000000000000000000000000000000000', /// data: '0x1234', /// value: 0 /// }, /// { /// recipient: '0xdEADBeAFdeAdbEafdeadbeafDeAdbEAFdeadbeaf', /// expirationTime: 0, /// revocable: false, /// refUID: '0x0000000000000000000000000000000000000000000000000000000000000000', /// data: '0x00', /// value: 0 /// }], /// signatures: [{ /// v: 28, /// r: '0x148c...b25b', /// s: '0x5a72...be22' /// }, /// { /// v: 28, /// r: '0x487s...67bb', /// s: '0x12ad...2366' /// }], /// attester: '0x1D86495b2A7B524D747d2839b3C645Bed32e8CF4', /// deadline: 1673891048 /// }]) function multiAttestByDelegation( MultiDelegatedAttestationRequest[] calldata multiDelegatedRequests ) external payable returns (bytes32[] memory); /// @notice Revokes an existing attestation to a specific schema. /// @param request The arguments of the revocation request. /// /// Example: /// revoke({ /// schema: '0x8e72f5bc0a8d4be6aa98360baa889040c50a0e51f32dbf0baa5199bd93472ebc', /// data: { /// uid: '0x101032e487642ee04ee17049f99a70590c735b8614079fc9275f9dd57c00966d', /// value: 0 /// } /// }) function revoke(RevocationRequest calldata request) external payable; /// @notice Revokes an existing attestation to a specific schema via the provided ECDSA signature. /// @param delegatedRequest The arguments of the delegated revocation request. /// /// Example: /// revokeByDelegation({ /// schema: '0x8e72f5bc0a8d4be6aa98360baa889040c50a0e51f32dbf0baa5199bd93472ebc', /// data: { /// uid: '0xcbbc12102578c642a0f7b34fe7111e41afa25683b6cd7b5a14caf90fa14d24ba', /// value: 0 /// }, /// signature: { /// v: 27, /// r: '0xb593...7142', /// s: '0x0f5b...2cce' /// }, /// revoker: '0x244934dd3e31bE2c81f84ECf0b3E6329F5381992', /// deadline: 1673891048 /// }) function revokeByDelegation(DelegatedRevocationRequest calldata delegatedRequest) external payable; /// @notice Revokes existing attestations to multiple schemas. /// @param multiRequests The arguments of the multi revocation requests. The requests should be grouped by distinct /// schema ids to benefit from the best batching optimization. /// /// Example: /// multiRevoke([{ /// schema: '0x8e72f5bc0a8d4be6aa98360baa889040c50a0e51f32dbf0baa5199bd93472ebc', /// data: [{ /// uid: '0x211296a1ca0d7f9f2cfebf0daaa575bea9b20e968d81aef4e743d699c6ac4b25', /// value: 1000 /// }, /// { /// uid: '0xe160ac1bd3606a287b4d53d5d1d6da5895f65b4b4bab6d93aaf5046e48167ade', /// value: 0 /// }], /// }, /// { /// schema: '0x5ac273ce41e3c8bfa383efe7c03e54c5f0bff29c9f11ef6ffa930fc84ca32425', /// data: [{ /// uid: '0x053d42abce1fd7c8fcddfae21845ad34dae287b2c326220b03ba241bc5a8f019', /// value: 0 /// }, /// }]) function multiRevoke(MultiRevocationRequest[] calldata multiRequests) external payable; /// @notice Revokes existing attestations to multiple schemas via provided ECDSA signatures. /// @param multiDelegatedRequests The arguments of the delegated multi revocation attestation requests. The requests /// should be grouped by distinct schema ids to benefit from the best batching optimization. /// /// Example: /// multiRevokeByDelegation([{ /// schema: '0x8e72f5bc0a8d4be6aa98360baa889040c50a0e51f32dbf0baa5199bd93472ebc', /// data: [{ /// uid: '0x211296a1ca0d7f9f2cfebf0daaa575bea9b20e968d81aef4e743d699c6ac4b25', /// value: 1000 /// }, /// { /// uid: '0xe160ac1bd3606a287b4d53d5d1d6da5895f65b4b4bab6d93aaf5046e48167ade', /// value: 0 /// }], /// signatures: [{ /// v: 28, /// r: '0x148c...b25b', /// s: '0x5a72...be22' /// }, /// { /// v: 28, /// r: '0x487s...67bb', /// s: '0x12ad...2366' /// }], /// revoker: '0x244934dd3e31bE2c81f84ECf0b3E6329F5381992', /// deadline: 1673891048 /// }]) function multiRevokeByDelegation(MultiDelegatedRevocationRequest[] calldata multiDelegatedRequests) external payable; /// @notice Timestamps the specified bytes32 data. /// @param data The data to timestamp. /// @return The timestamp the data was timestamped with. function timestamp(bytes32 data) external returns (uint64); /// @notice Timestamps the specified multiple bytes32 data. /// @param data The data to timestamp. /// @return The timestamp the data was timestamped with. function multiTimestamp(bytes32[] calldata data) external returns (uint64); /// @notice Revokes the specified bytes32 data. /// @param data The data to timestamp. /// @return The timestamp the data was revoked with. function revokeOffchain(bytes32 data) external returns (uint64); /// @notice Revokes the specified multiple bytes32 data. /// @param data The data to timestamp. /// @return The timestamp the data was revoked with. function multiRevokeOffchain(bytes32[] calldata data) external returns (uint64); /// @notice Returns an existing attestation by UID. /// @param uid The UID of the attestation to retrieve. /// @return The attestation data members. function getAttestation(bytes32 uid) external view returns (Attestation memory); /// @notice Checks whether an attestation exists. /// @param uid The UID of the attestation to retrieve. /// @return Whether an attestation exists. function isAttestationValid(bytes32 uid) external view returns (bool); /// @notice Returns the timestamp that the specified data was timestamped with. /// @param data The data to query. /// @return The timestamp the data was timestamped with. function getTimestamp(bytes32 data) external view returns (uint64); /// @notice Returns the timestamp that the specified data was timestamped with. /// @param data The data to query. /// @return The timestamp the data was timestamped with. function getRevokeOffchain(address revoker, bytes32 data) external view returns (uint64); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import { Attestation } from "../Common.sol"; /// @notice The interface of the {Resolver} contract. interface IResolver { /// @notice Actions that can be performed by the resolver. enum Action { NONE, ASSIGN_MANAGER, ASSIGN_VILLAGER, ATTEST, REPLY } /// @notice A struct representing a single Session. struct Session { address host; // Host of the session string title; // Title of the session uint256 startTime; // The time when the session was created (Unix timestamp). uint256 endTime; // The time when the session was ended (Unix timestamp). } /// @notice Checks if the resolver can be sent ETH. /// @return Whether the resolver supports ETH transfers. function isPayable() external pure returns (bool); /// @dev Checks if a title is allowed to be attested. function allowedAttestationTitles(string memory title) external view returns (bool); /// @dev Validates if an attestation can have a response. function cannotReply(bytes32 uid) external view returns (bool); /// @dev Checks which action a role can perform on a schema. function allowedSchemas(bytes32 uid) external view returns (Action); /// @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 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 This function will retrieve all titles allowed in the resolver. /// It was designed to aid the frontend in displaying the current badges available. /// NOTE: Only the badges marked as valid will be returned. /// @return An array of all attestation titles. function getAllAttestationTitles() external view returns (string[] memory); /// @dev Sets the attestation for a given title that will be attested. /// When creating attestions, the title must match to the desired configuration saved /// on the resolver. /// @param title The title of the attestation. /// @param isValid Whether the title for the attestation is valid or not. Defaults to false. function setAttestationTitle(string memory title, bool isValid) external; /// @dev Sets the action ID that schema can perform. /// The schema determines the data layout for the attestation, while the attestation /// determines the data that will fill the schema data. /// @param uid The UID of the schema. /// @param action The action that the role can perform on the schema. function setSchema(bytes32 uid, uint256 action) external; function multiAttest( Attestation[] calldata attestations, uint256[] calldata values ) external payable returns (bool); /// @notice Creates a new session with a specified duration and title. /// @param duration The duration of the session in seconds. /// @param sessionTitle The title of the session. /// @return sessionId The unique identifier of the created session. function createSession( uint256 duration, string memory sessionTitle ) external returns (bytes32 sessionId); /// @notice Removes an existing session. /// @param sessionTitle The title of the session to be removed. /// @param sessionOwner The address of the owner of the session. function removeSesison(string memory sessionTitle, address sessionOwner) external; /// @notice Retrieves session details by session ID. /// @param sessionTitle The title of the session. /// @param sessionOwner The address of the owner of the session. /// @return The session details. function getSession( string memory sessionTitle, address sessionOwner ) external view returns (Session memory); /// @notice Closes an existing session. /// @param sessionId The id of the session to be closed. function closeSession(bytes32 sessionId) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/AccessControl.sol) pragma solidity ^0.8.20; import {IAccessControl} from "./IAccessControl.sol"; import {Context} from "../utils/Context.sol"; import {ERC165} from "../utils/introspection/ERC165.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ```solidity * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ```solidity * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules} * to enforce additional security measures for this role. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address account => bool) hasRole; bytes32 adminRole; } mapping(bytes32 role => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with an {AccessControlUnauthorizedAccount} error including the required role. */ modifier onlyRole(bytes32 role) { _checkRole(role); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view virtual returns (bool) { return _roles[role].hasRole[account]; } /** * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `_msgSender()` * is missing `role`. Overriding this function changes the behavior of the {onlyRole} modifier. */ function _checkRole(bytes32 role) internal view virtual { _checkRole(role, _msgSender()); } /** * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `account` * is missing `role`. */ function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { revert AccessControlUnauthorizedAccount(account, role); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view virtual returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleGranted} event. */ function grantRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleRevoked} event. */ function revokeRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `callerConfirmation`. * * May emit a {RoleRevoked} event. */ function renounceRole(bytes32 role, address callerConfirmation) public virtual { if (callerConfirmation != _msgSender()) { revert AccessControlBadConfirmation(); } _revokeRole(role, callerConfirmation); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Attempts to grant `role` to `account` and returns a boolean indicating if `role` was granted. * * Internal function without access restriction. * * May emit a {RoleGranted} event. */ function _grantRole(bytes32 role, address account) internal virtual returns (bool) { if (!hasRole(role, account)) { _roles[role].hasRole[account] = true; emit RoleGranted(role, account, _msgSender()); return true; } else { return false; } } /** * @dev Attempts to revoke `role` to `account` and returns a boolean indicating if `role` was revoked. * * Internal function without access restriction. * * May emit a {RoleRevoked} event. */ function _revokeRole(bytes32 role, address account) internal virtual returns (bool) { if (hasRole(role, account)) { _roles[role].hasRole[account] = false; emit RoleRevoked(role, account, _msgSender()); return true; } else { return false; } } }
// SPDX-License-Identifier: MIT 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 struct representing a single Session. struct Session { address host; // Host of the session string title; // Title of the session uint256 startTime; // The time when the session was created (Unix timestamp). uint256 endTime; // The time when the session was ended (Unix timestamp). } /// @notice A helper function to work with unchecked iterators in loops. function uncheckedInc(uint256 i) pure returns (uint256 j) { unchecked { j = i + 1; } } /// @dev Helper function to slice a byte array function slice(bytes memory data, uint256 start, uint256 length) pure returns (bytes memory) { bytes memory result = new bytes(length); for (uint i = 0; i < length; i++) { result[i] = data[start + i]; } return result; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import { ISemver } from "./ISemver.sol"; import { IResolver } from "./IResolver.sol"; /// @notice A struct representing a record for a submitted schema. struct SchemaRecord { bytes32 uid; // The unique identifier of the schema. IResolver resolver; // Optional schema resolver. bool revocable; // Whether the schema allows revocations explicitly. string schema; // Custom specification of the schema (e.g., an ABI). } /// @title ISchemaRegistry /// @notice The interface of global attestation schemas for the Ethereum Attestation Service protocol. interface ISchemaRegistry is ISemver { /// @notice Emitted when a new schema has been registered /// @param uid The schema UID. /// @param registerer The address of the account used to register the schema. /// @param schema The schema data. event Registered(bytes32 indexed uid, address indexed registerer, SchemaRecord schema); /// @notice Submits and reserves a new schema /// @param schema The schema data schema. /// @param resolver An optional schema resolver. /// @param revocable Whether the schema allows revocations explicitly. /// @return The UID of the new schema. function register(string calldata schema, IResolver resolver, bool revocable) external returns (bytes32); /// @notice Returns an existing schema by UID /// @param uid The UID of the schema to retrieve. /// @return The schema data members. function getSchema(bytes32 uid) external view returns (SchemaRecord memory); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /// @title ISemver /// @notice A semver interface. interface ISemver { /// @notice Returns the full semver contract version. /// @return Semver contract version as a string. function version() external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (access/IAccessControl.sol) pragma solidity ^0.8.20; /** * @dev External interface of AccessControl declared to support ERC-165 detection. */ interface IAccessControl { /** * @dev The `account` is missing a role. */ error AccessControlUnauthorizedAccount(address account, bytes32 neededRole); /** * @dev The caller of a function is not the expected one. * * NOTE: Don't confuse with {AccessControlUnauthorizedAccount}. */ error AccessControlBadConfirmation(); /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call. This account bears the admin role (for the granted role). * Expected in cases where the role was granted using the internal {AccessControl-_grantRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `callerConfirmation`. */ function renounceRole(bytes32 role, address callerConfirmation) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol) pragma solidity ^0.8.20; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/ERC165.sol) pragma solidity ^0.8.20; import {IERC165} from "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC-165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/IERC165.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC-165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[ERC]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
{ "remappings": [ "@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/", "forge-std/=node_modules/forge-std/" ], "optimizer": { "enabled": true, "runs": 10000 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "none", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "shanghai", "viaIR": false, "libraries": {} }
Contract ABI
API[{"inputs":[{"internalType":"contract IEAS","name":"eas","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AccessControlBadConfirmation","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"neededRole","type":"bytes32"}],"name":"AccessControlUnauthorizedAccount","type":"error"},{"inputs":[],"name":"AccessDenied","type":"error"},{"inputs":[],"name":"AlreadyHasResponse","type":"error"},{"inputs":[],"name":"InvalidAttestationTitle","type":"error"},{"inputs":[],"name":"InvalidEAS","type":"error"},{"inputs":[],"name":"InvalidExpiration","type":"error"},{"inputs":[],"name":"InvalidRefUID","type":"error"},{"inputs":[],"name":"InvalidRevocability","type":"error"},{"inputs":[],"name":"InvalidRole","type":"error"},{"inputs":[],"name":"InvalidSession","type":"error"},{"inputs":[],"name":"NotHostOfTheSession","type":"error"},{"inputs":[],"name":"NotPayable","type":"error"},{"inputs":[],"name":"SessionAlreadyEnded","type":"error"},{"inputs":[],"name":"Unauthorized","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"sessionId","type":"bytes32"},{"indexed":true,"internalType":"address","name":"host","type":"address"},{"indexed":false,"internalType":"string","name":"title","type":"string"},{"indexed":false,"internalType":"uint256","name":"startTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endTime","type":"uint256"}],"name":"sessionClosed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"sessionId","type":"bytes32"},{"indexed":true,"internalType":"address","name":"host","type":"address"},{"indexed":false,"internalType":"string","name":"title","type":"string"},{"indexed":false,"internalType":"uint256","name":"startTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endTime","type":"uint256"}],"name":"sessionCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"sessionId","type":"bytes32"}],"name":"sessionRemoved","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MANAGER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ROOT_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"VILLAGER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"title","type":"string"}],"name":"allowedAttestationTitles","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"uid","type":"bytes32"}],"name":"allowedSchemas","outputs":[{"internalType":"enum IResolver.Action","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"bytes32","name":"uid","type":"bytes32"},{"internalType":"bytes32","name":"schema","type":"bytes32"},{"internalType":"uint64","name":"time","type":"uint64"},{"internalType":"uint64","name":"expirationTime","type":"uint64"},{"internalType":"uint64","name":"revocationTime","type":"uint64"},{"internalType":"bytes32","name":"refUID","type":"bytes32"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"address","name":"attester","type":"address"},{"internalType":"bool","name":"revocable","type":"bool"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct Attestation","name":"attestation","type":"tuple"}],"name":"attest","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"uid","type":"bytes32"}],"name":"cannotReply","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"sessionId","type":"bytes32"}],"name":"closeSession","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"duration","type":"uint256"},{"internalType":"string","name":"sessionTitle","type":"string"}],"name":"createSession","outputs":[{"internalType":"bytes32","name":"sessionId","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getAllAttestationTitles","outputs":[{"internalType":"string[]","name":"","type":"string[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"sessionTitle","type":"string"},{"internalType":"address","name":"sessionOwner","type":"address"}],"name":"getSession","outputs":[{"components":[{"internalType":"address","name":"host","type":"address"},{"internalType":"string","name":"title","type":"string"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"}],"internalType":"struct IResolver.Session","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isPayable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[{"components":[{"internalType":"bytes32","name":"uid","type":"bytes32"},{"internalType":"bytes32","name":"schema","type":"bytes32"},{"internalType":"uint64","name":"time","type":"uint64"},{"internalType":"uint64","name":"expirationTime","type":"uint64"},{"internalType":"uint64","name":"revocationTime","type":"uint64"},{"internalType":"bytes32","name":"refUID","type":"bytes32"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"address","name":"attester","type":"address"},{"internalType":"bool","name":"revocable","type":"bool"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct Attestation[]","name":"attestations","type":"tuple[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"multiAttest","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"string","name":"sessionTitle","type":"string"},{"internalType":"address","name":"sessionOwner","type":"address"}],"name":"removeSesison","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"callerConfirmation","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"bytes32","name":"uid","type":"bytes32"},{"internalType":"bytes32","name":"schema","type":"bytes32"},{"internalType":"uint64","name":"time","type":"uint64"},{"internalType":"uint64","name":"expirationTime","type":"uint64"},{"internalType":"uint64","name":"revocationTime","type":"uint64"},{"internalType":"bytes32","name":"refUID","type":"bytes32"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"address","name":"attester","type":"address"},{"internalType":"bool","name":"revocable","type":"bool"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct Attestation","name":"attestation","type":"tuple"}],"name":"revoke","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"title","type":"string"},{"internalType":"bool","name":"isValid","type":"bool"}],"name":"setAttestationTitle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"uid","type":"bytes32"},{"internalType":"uint256","name":"action","type":"uint256"}],"name":"setSchema","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]
Deployed Bytecode
0x608060405260043610610186575f3560e01c80637e8c7f08116100d1578063ce46e0461161007c578063e60c350511610057578063e60c3505146104c5578063ec87621c146104d8578063ee43013d1461050b575f80fd5b8063ce46e04614610481578063d547741f14610493578063e49617e1146104b2575f80fd5b806391db0b7e116100ac57806391db0b7e1461043c578063a217fddf1461044f578063c1d1f4b914610462575f80fd5b80637e8c7f081461039b57806384580698146103ce57806391d14854146103ed575f80fd5b80633ade240b1161013157806354b4043c1161010c57806354b4043c1461033e578063614ad4aa1461035d57806363351c511461037c575f80fd5b80633ade240b146102cb5780634314a40d146102ea5780634971d5051461030b575f80fd5b8063248a9ca311610161578063248a9ca3146102515780632f2ff15d1461028d57806336568abe146102ac575f80fd5b806301ffc9a7146101c35780630758a760146101f75780631dac899b14610225575f80fd5b366101bf576040517f1574f9f300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b005b5f80fd5b3480156101ce575f80fd5b506101e26101dd366004612481565b610546565b60405190151581526020015b60405180910390f35b348015610202575f80fd5b506101e26102113660046124c0565b5f9081526003602052604090205460ff1690565b348015610230575f80fd5b5061024461023f3660046125f9565b6105de565b6040516101ee9190612695565b34801561025c575f80fd5b5061027f61026b3660046124c0565b5f9081526020819052604090206001015490565b6040519081526020016101ee565b348015610298575f80fd5b506101bd6102a73660046126f0565b610728565b3480156102b7575f80fd5b506101bd6102c63660046126f0565b610752565b3480156102d6575f80fd5b506101bd6102e53660046124c0565b6107b0565b3480156102f5575f80fd5b506102fe610903565b6040516101ee9190612713565b348015610316575f80fd5b5061027f7f7e8ac59880745312f8754f56b69cccc1c6b2112d567ccf50e4e6dc2e39a7c67a81565b348015610349575f80fd5b506101bd6103583660046127a0565b610a97565b348015610368575f80fd5b506101bd6103773660046125f9565b610b4a565b348015610387575f80fd5b5061027f6103963660046127e4565b610c22565b3480156103a6575f80fd5b5061027f7f79e553c6f53701daa99614646285e66adb98ff0fcc1ef165dd2718e5c873bee681565b3480156103d9575f80fd5b506101bd6103e8366004612828565b610f9f565b3480156103f8575f80fd5b506101e26104073660046126f0565b5f9182526020828152604080842073ffffffffffffffffffffffffffffffffffffffff93909316845291905290205460ff1690565b6101e261044a366004612890565b611014565b34801561045a575f80fd5b5061027f5f81565b34801561046d575f80fd5b506101e261047c3660046128f7565b611139565b34801561048c575f80fd5b505f6101e2565b34801561049e575f80fd5b506101bd6104ad3660046126f0565b61117c565b6101e26104c0366004612931565b6111a0565b6101e26104d3366004612931565b611344565b3480156104e3575f80fd5b5061027f7f241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b0881565b348015610516575f80fd5b506105396105253660046124c0565b5f9081526004602052604090205460ff1690565b6040516101ee9190612996565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b0000000000000000000000000000000000000000000000000000000014806105d857507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b61061c60405180608001604052805f73ffffffffffffffffffffffffffffffffffffffff168152602001606081526020015f81526020015f81525090565b5f82846040516020016106309291906129d5565b60408051601f1981840301815282825280516020918201205f8181526005835283902060808501909352825473ffffffffffffffffffffffffffffffffffffffff168452600183018054919550918401919061068b90612a1f565b80601f01602080910402602001604051908101604052809291908181526020018280546106b790612a1f565b80156107025780601f106106d957610100808354040283529160200191610702565b820191905f5260205f20905b8154815290600101906020018083116106e557829003601f168201915b505050505081526020016002820154815260200160038201548152505091505092915050565b5f82815260208190526040902060010154610742816113bd565b61074c83836113ca565b50505050565b73ffffffffffffffffffffffffffffffffffffffff811633146107a1576040517f6697b23200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6107ab82826114a5565b505050565b7f7e8ac59880745312f8754f56b69cccc1c6b2112d567ccf50e4e6dc2e39a7c67a6107da816113bd565b5f8281526005602052604090206003810154421115610825576040517fe7a7ee3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805473ffffffffffffffffffffffffffffffffffffffff16331480159061087a5750335f9081527fe84508f2c7fa9c351146748b3025cb78b45df37d868e48c6a75102fecdeee645602052604090205460ff16155b156108b1576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b42600382018190556002820154604051339286927f84d7a22000dcc2dc4146ec97ba16d89752106c48fcb2b6e19e28f2af1752cd77926108f692600188019291612ae9565b60405180910390a3505050565b6006546060905f9067ffffffffffffffff811115610923576109236124d7565b60405190808252806020026020018201604052801561095657816020015b60608152602001906001900390816109415790505b5090505f805b600654811015610a8f5760025f6006838154811061097c5761097c612b0d565b905f5260205f20016040516020016109949190612b3a565b60408051601f198184030181529181528151602092830120835290820192909252015f205460ff1615610a8757600681815481106109d4576109d4612b0d565b905f5260205f200180546109e790612a1f565b80601f0160208091040260200160405190810160405280929190818152602001828054610a1390612a1f565b8015610a5e5780601f10610a3557610100808354040283529160200191610a5e565b820191905f5260205f20905b815481529060010190602001808311610a4157829003601f168201915b5050505050838381518110610a7557610a75612b0d565b60200260200101819052506001820191505b60010161095c565b508152919050565b7f241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b08610ac1816113bd565b8160025f85604051602001610ad69190612b4c565b60408051808303601f190181529181528151602092830120835290820192909252015f20805460ff191691151591909117905581156107ab57600680546001810182555f919091527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f0161074c8482612ba9565b7f79e553c6f53701daa99614646285e66adb98ff0fcc1ef165dd2718e5c873bee6610b74816113bd565b5f8284604051602001610b889291906129d5565b60408051601f1981840301815291815281516020928301205f818152600590935290822080547fffffffffffffffffffffffff000000000000000000000000000000000000000016815590925090610be36001830182612437565b505f60028201819055600390910181905560405182917f43899d6261997faebc331da5ae670a459f7db00ee7443e321632ee2a9fbce5ea91a250505050565b335f9081527f0d19f43d5634f924169285f04cd1f61c13d1d75d800a8ce828fd495b05a66b1c602052604081205460ff16610c89576040517fd954416a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b825f03610cc2576040517f2def1a7600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81515f03610cfc576040517f2def1a7600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3382604051602001610d0f9291906129d5565b60408051601f1981840301815291815281516020928301205f818152600590935291205490915073ffffffffffffffffffffffffffffffffffffffff1615610d83576040517f2def1a7600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f808411610d945762278d00610d96565b835b90505f60405180608001604052803373ffffffffffffffffffffffffffffffffffffffff1681526020018581526020014281526020018342610dd89190612cd4565b90525f848152600560209081526040909120825181547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9091161781559082015191925082916001820190610e439082612ba9565b5060408201518160020155606082015181600301559050503373ffffffffffffffffffffffffffffffffffffffff16837f7412ee6ec322f5b32fbaf6d46f962a876648abe9d777340e64158568229cec3b8684604001518560600151604051610eae93929190612ce7565b60405180910390a35f84604051602001610ec89190612cf9565b6040516020818303038152906040529050600160025f83604051602001610eef9190612b4c565b6040516020818303038152906040528051906020012081526020019081526020015f205f6101000a81548160ff0219169083151502179055505f85604051602001610f3a9190612d3d565b6040516020818303038152906040529050600160025f83604051602001610f619190612b4c565b60408051808303601f190181529181528151602092830120835290820192909252015f20805460ff1916911515919091179055509295945050505050565b7f79e553c6f53701daa99614646285e66adb98ff0fcc1ef165dd2718e5c873bee6610fc9816113bd565b816004811115610fdb57610fdb612969565b5f8481526004602081905260409091208054909160ff1990911690600190849081111561100a5761100a612969565b0217905550505050565b5f3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000aef4103a04090071165f78d45d83a0c0782c2b2a1614611084576040517f4ca8886700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b8481101561112d576110ba8686838181106110a3576110a3612b0d565b90506020028101906110b59190612d81565b611540565b611125576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f4174746573746174696f6e206661696c6564000000000000000000000000000060448201526064015b60405180910390fd5b600101611086565b50600195945050505050565b5f60025f8360405160200161114e9190612b4c565b60408051601f198184030181529181528151602092830120835290820192909252015f205460ff1692915050565b5f82815260208190526040902060010154611196816113bd565b61074c83836114a5565b5f3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000aef4103a04090071165f78d45d83a0c0782c2b2a1614611210576040517f4ca8886700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61121f82602001356001611607565b156112d45761125e7f79e553c6f53701daa99614646285e66adb98ff0fcc1ef165dd2718e5c873bee6611259610100850160e08601612dbd565b611646565b6112927f241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b0861125960e0850160c08601612dbd565b6112cb7f241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b086112c660e0850160c08601612dbd565b6114a5565b50600192915050565b6112e382602001356004611607565b1561133c5761131d7f7e8ac59880745312f8754f56b69cccc1c6b2112d567ccf50e4e6dc2e39a7c67a611259610100850160e08601612dbd565b5060a001355f908152600360205260409020805460ff19169055600190565b505f5b919050565b5f3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000aef4103a04090071165f78d45d83a0c0782c2b2a16146113b4576040517f4ca8886700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6105d882611540565b6113c78133611646565b50565b5f8281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915281205460ff1661149e575f8381526020818152604080832073ffffffffffffffffffffffffffffffffffffffff861684529091529020805460ff1916600117905561143c3390565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45060016105d8565b505f6105d8565b5f8281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915281205460ff161561149e575f8381526020818152604080832073ffffffffffffffffffffffffffffffffffffffff86168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45060016105d8565b5f806115526080840160608501612ded565b67ffffffffffffffff1614611593576040517ffb2a675200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6115a282602001356001611607565b156115b0576105d8826116cf565b6115bf82602001356002611607565b156115cd576105d882611999565b6115dc82602001356003611607565b156115ea576105d882611e2b565b6115f982602001356004611607565b1561133c576105d882611fcd565b5f81600481111561161a5761161a612969565b5f8481526004602081905260409091205460ff169081111561163e5761163e612969565b149392505050565b5f8281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff166116cb576040517fe2517d3f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024810183905260440161111c565b5050565b5f6117057f79e553c6f53701daa99614646285e66adb98ff0fcc1ef165dd2718e5c873bee6610407610100850160e08601612dbd565b8061174057506117407f241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b08610407610100850160e08601612dbd565b1561133c576117797f241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b0861040760e0850160c08601612dbd565b806117bc575060015f61179260e0850160c08601612dbd565b73ffffffffffffffffffffffffffffffffffffffff16815260208101919091526040015f205460ff165b156117f3576040517fd954416a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61180561012083016101008401612e08565b61183b576040517f84b3e17500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61184a610120840184612e23565b81019061185791906128f7565b905060405160200161189a9060208082526007908201527f4d616e6167657200000000000000000000000000000000000000000000000000604082015260600190565b60405160208183030381529060405280519060200120816040516020016118c19190612b4c565b604051602081830303815290604052805190602001201461190e576040517fd954416a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001805f61192260e0870160c08801612dbd565b73ffffffffffffffffffffffffffffffffffffffff16815260208101919091526040015f20805460ff191691151591909117905561198f7f241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b0861198a60e0860160c08701612dbd565b6113ca565b5060019392505050565b5f6119ac61012083016101008401612e08565b156119e3576040517f84b3e17500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f6119f2610120840184612e23565b8101906119ff91906128f7565b9050611a357f7e8ac59880745312f8754f56b69cccc1c6b2112d567ccf50e4e6dc2e39a7c67a61040760e0860160c08701612dbd565b158015611abd5750604051602001611a7e9060208082526008908201527f436865636b2d696e000000000000000000000000000000000000000000000000604082015260600190565b6040516020818303038152906040528051906020012081604051602001611aa59190612b4c565b60405160208183030381529060405280519060200120145b15611b2b57611af77f241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b08611259610100860160e08701612dbd565b61198f7f7e8ac59880745312f8754f56b69cccc1c6b2112d567ccf50e4e6dc2e39a7c67a61198a60e0860160c08701612dbd565b611b5f7f7e8ac59880745312f8754f56b69cccc1c6b2112d567ccf50e4e6dc2e39a7c67a61040760e0860160c08701612dbd565b8015611be65750604051602001611ba79060208082526009908201527f436865636b2d6f75740000000000000000000000000000000000000000000000604082015260600190565b6040516020818303038152906040528051906020012081604051602001611bce9190612b4c565b60405160208183030381529060405280519060200120145b8015611c765750611bfe610100840160e08501612dbd565b73ffffffffffffffffffffffffffffffffffffffff16611c2460e0850160c08601612dbd565b73ffffffffffffffffffffffffffffffffffffffff161480611c765750611c767f241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b08610407610100860160e08701612dbd565b15611e235760a0830135611cb6576040517fefcf836900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517fa3112a6400000000000000000000000000000000000000000000000000000000815260a084013560048201525f907f000000000000000000000000aef4103a04090071165f78d45d83a0c0782c2b2a73ffffffffffffffffffffffffffffffffffffffff169063a3112a64906024015f60405180830381865afa158015611d43573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052611d6a9190810190612ee7565b9050611d7c60e0850160c08601612dbd565b73ffffffffffffffffffffffffffffffffffffffff168160c0015173ffffffffffffffffffffffffffffffffffffffff1614611de4576040517fefcf836900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611e187f7e8ac59880745312f8754f56b69cccc1c6b2112d567ccf50e4e6dc2e39a7c67a6112c660e0870160c08801612dbd565b506001949350505050565b505f92915050565b5f611e3e61012083016101008401612e08565b15611e75576040517f84b3e17500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611eaa7f7e8ac59880745312f8754f56b69cccc1c6b2112d567ccf50e4e6dc2e39a7c67a611259610100850160e08601612dbd565b611ede7f7e8ac59880745312f8754f56b69cccc1c6b2112d567ccf50e4e6dc2e39a7c67a61125960e0850160c08601612dbd565b5f611eed610120840184612e23565b810190611efa9190612fd9565b50905060025f82604051602001611f119190612b4c565b60408051601f198184030181529181528151602092830120835290820192909252015f205460ff16611f6f576040517f7e47508b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611f7881612226565b156112cb57611f97611f91610100850160e08601612dbd565b826122ee565b6112cb576040517f9f96a9be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f611fe061012083016101008401612e08565b612016576040517f84b3e17500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60a08201355f9081526003602052604090205460ff1615612063576040517fd49e9ccd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6120987f7e8ac59880745312f8754f56b69cccc1c6b2112d567ccf50e4e6dc2e39a7c67a611259610100850160e08601612dbd565b60a08201356120d3576040517fefcf836900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517fa3112a6400000000000000000000000000000000000000000000000000000000815260a083013560048201525f907f000000000000000000000000aef4103a04090071165f78d45d83a0c0782c2b2a73ffffffffffffffffffffffffffffffffffffffff169063a3112a64906024015f60405180830381865afa158015612160573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526121879190810190612ee7565b905061219a610100840160e08501612dbd565b73ffffffffffffffffffffffffffffffffffffffff168160c0015173ffffffffffffffffffffffffffffffffffffffff1614612202576040517fefcf836900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505060a001355f908152600360205260409020805460ff1916600190811790915590565b5f8082905060058151101580156122e757507f89011003dc2ad2337d961c4e333b9150020949d637994c13005da6693e4fde01612265825f600561236d565b604051602001612275919061302f565b6040516020818303038152906040528051906020012014806122e757507f62dbae9ff00309cd64007aa76a8cab492a31e09d66bdf2d26247427f9cee7c546122bf825f600961236d565b6040516020016122cf919061302f565b60405160208183030381529060405280519060200120145b9392505050565b5f808290505f61230c8260058085516123079190613040565b61236d565b90505f85826040516020016123229291906129d5565b60408051601f1981840301815291815281516020928301205f908152600590925290205473ffffffffffffffffffffffffffffffffffffffff90811690871614935050505092915050565b60605f8267ffffffffffffffff811115612389576123896124d7565b6040519080825280601f01601f1916602001820160405280156123b3576020820181803683370190505b5090505f5b8381101561242e57856123cb8287612cd4565b815181106123db576123db612b0d565b602001015160f81c60f81b8282815181106123f8576123f8612b0d565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690815f1a9053506001016123b8565b50949350505050565b50805461244390612a1f565b5f825580601f10612452575050565b601f0160209004905f5260205f20908101906113c791905b8082111561247d575f815560010161246a565b5090565b5f60208284031215612491575f80fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146122e7575f80fd5b5f602082840312156124d0575f80fd5b5035919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b604051610140810167ffffffffffffffff81118282101715612528576125286124d7565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715612557576125576124d7565b604052919050565b5f67ffffffffffffffff821115612578576125786124d7565b50601f01601f191660200190565b5f82601f830112612595575f80fd5b81356125a86125a38261255f565b61252e565b8181528460208386010111156125bc575f80fd5b816020850160208301375f918101602001919091529392505050565b73ffffffffffffffffffffffffffffffffffffffff811681146113c7575f80fd5b5f806040838503121561260a575f80fd5b823567ffffffffffffffff811115612620575f80fd5b61262c85828601612586565b925050602083013561263d816125d8565b809150509250929050565b5f5b8381101561266257818101518382015260200161264a565b50505f910152565b5f8151808452612681816020860160208601612648565b601f01601f19169290920160200192915050565b6020815273ffffffffffffffffffffffffffffffffffffffff82511660208201525f6020830151608060408401526126d060a084018261266a565b905060408401516060840152606084015160808401528091505092915050565b5f8060408385031215612701575f80fd5b82359150602083013561263d816125d8565b5f60208083016020845280855180835260408601915060408160051b8701019250602087015f5b82811015612786577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc088860301845261277485835161266a565b9450928501929085019060010161273a565b5092979650505050505050565b80151581146113c7575f80fd5b5f80604083850312156127b1575f80fd5b823567ffffffffffffffff8111156127c7575f80fd5b6127d385828601612586565b925050602083013561263d81612793565b5f80604083850312156127f5575f80fd5b82359150602083013567ffffffffffffffff811115612812575f80fd5b61281e85828601612586565b9150509250929050565b5f8060408385031215612839575f80fd5b50508035926020909101359150565b5f8083601f840112612858575f80fd5b50813567ffffffffffffffff81111561286f575f80fd5b6020830191508360208260051b8501011115612889575f80fd5b9250929050565b5f805f80604085870312156128a3575f80fd5b843567ffffffffffffffff808211156128ba575f80fd5b6128c688838901612848565b909650945060208701359150808211156128de575f80fd5b506128eb87828801612848565b95989497509550505050565b5f60208284031215612907575f80fd5b813567ffffffffffffffff81111561291d575f80fd5b61292984828501612586565b949350505050565b5f60208284031215612941575f80fd5b813567ffffffffffffffff811115612957575f80fd5b820161014081850312156122e7575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b60208101600583106129cf577f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b91905290565b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000008360601b1681525f8251612a11816014850160208701612648565b919091016014019392505050565b600181811c90821680612a3357607f821691505b602082108103612a6a577f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b50919050565b5f8154612a7c81612a1f565b808552602060018381168015612a995760018114612ab357612ade565b60ff198516838901528284151560051b8901019550612ade565b865f52825f205f5b85811015612ad65781548a8201860152908301908401612abb565b890184019650505b505050505092915050565b606081525f612afb6060830186612a70565b60208301949094525060400152919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b602081525f6122e76020830184612a70565b602081525f6122e7602083018461266a565b601f8211156107ab57805f5260205f20601f840160051c81016020851015612b835750805b601f840160051c820191505b81811015612ba2575f8155600101612b8f565b5050505050565b815167ffffffffffffffff811115612bc357612bc36124d7565b612bd781612bd18454612a1f565b84612b5e565b602080601f831160018114612c29575f8415612bf35750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555612c9f565b5f85815260208120601f198616915b82811015612c5757888601518255948401946001909101908401612c38565b5085821015612c9357878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b505060018460011b0185555b505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b808201808211156105d8576105d8612ca7565b606081525f612afb606083018661266a565b7f486f73745f00000000000000000000000000000000000000000000000000000081525f8251612d30816005850160208701612648565b9190910160050192915050565b7f417474656e6465655f000000000000000000000000000000000000000000000081525f8251612d74816009850160208701612648565b9190910160090192915050565b5f82357ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec1833603018112612db3575f80fd5b9190910192915050565b5f60208284031215612dcd575f80fd5b81356122e7816125d8565b67ffffffffffffffff811681146113c7575f80fd5b5f60208284031215612dfd575f80fd5b81356122e781612dd8565b5f60208284031215612e18575f80fd5b81356122e781612793565b5f8083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112612e56575f80fd5b83018035915067ffffffffffffffff821115612e70575f80fd5b602001915036819003821315612889575f80fd5b805161133f81612dd8565b805161133f816125d8565b805161133f81612793565b5f82601f830112612eb4575f80fd5b8151612ec26125a38261255f565b818152846020838601011115612ed6575f80fd5b612929826020830160208701612648565b5f60208284031215612ef7575f80fd5b815167ffffffffffffffff80821115612f0e575f80fd5b908301906101408286031215612f22575f80fd5b612f2a612504565b8251815260208301516020820152612f4460408401612e84565b6040820152612f5560608401612e84565b6060820152612f6660808401612e84565b608082015260a083015160a0820152612f8160c08401612e8f565b60c0820152612f9260e08401612e8f565b60e0820152610100612fa5818501612e9a565b908201526101208381015183811115612fbc575f80fd5b612fc888828701612ea5565b918301919091525095945050505050565b5f8060408385031215612fea575f80fd5b823567ffffffffffffffff80821115613001575f80fd5b61300d86838701612586565b93506020850135915080821115613022575f80fd5b5061281e85828601612586565b5f8251612db3818460208701612648565b818103818111156105d8576105d8612ca756fea164736f6c6343000819000a
Loading...
Loading
Loading...
Loading
Loading...
Loading
Loading...
Loading
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.