{ "address": "0x0a7E2Ff54e76B8E6659aedc9103FB21c038050D0", "abi": [ { "inputs": [], "name": "AlreadyExists", "type": "error" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "bytes32", "name": "uid", "type": "bytes32" }, { "indexed": false, "internalType": "address", "name": "registerer", "type": "address" } ], "name": "Registered", "type": "event" }, { "inputs": [], "name": "VERSION", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "bytes32", "name": "uid", "type": "bytes32" } ], "name": "getSchema", "outputs": [ { "components": [ { "internalType": "bytes32", "name": "uid", "type": "bytes32" }, { "internalType": "contract ISchemaResolver", "name": "resolver", "type": "address" }, { "internalType": "bool", "name": "revocable", "type": "bool" }, { "internalType": "string", "name": "schema", "type": "string" } ], "internalType": "struct SchemaRecord", "name": "", "type": "tuple" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "string", "name": "schema", "type": "string" }, { "internalType": "contract ISchemaResolver", "name": "resolver", "type": "address" }, { "internalType": "bool", "name": "revocable", "type": "bool" } ], "name": "register", "outputs": [ { "internalType": "bytes32", "name": "", "type": "bytes32" } ], "stateMutability": "nonpayable", "type": "function" } ], "transactionHash": "0x731c2d25800a3e44a5f080d9acf8079949991271a9ae52c470662fe96835d667", "receipt": { "to": null, "from": "0x01a93612f26100B6E18a2e3dd57df5c3ccaFeca1", "contractAddress": "0x0a7E2Ff54e76B8E6659aedc9103FB21c038050D0", "transactionIndex": 3, "gasUsed": "477737", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "blockHash": "0x931e77b81f334ea2fa8cc283b0637457523379a317555dfddad312996fac0c85", "transactionHash": "0x731c2d25800a3e44a5f080d9acf8079949991271a9ae52c470662fe96835d667", "logs": [], "blockNumber": 2958569, "cumulativeGasUsed": "29612372", "status": 1, "byzantium": true }, "args": [], "numDeployments": 1, "solcInputHash": "78891d974a28827b8f023101fe409776", "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"AlreadyExists\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"uid\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"registerer\",\"type\":\"address\"}],\"name\":\"Registered\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"VERSION\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"uid\",\"type\":\"bytes32\"}],\"name\":\"getSchema\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"uid\",\"type\":\"bytes32\"},{\"internalType\":\"contract ISchemaResolver\",\"name\":\"resolver\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"revocable\",\"type\":\"bool\"},{\"internalType\":\"string\",\"name\":\"schema\",\"type\":\"string\"}],\"internalType\":\"struct SchemaRecord\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"schema\",\"type\":\"string\"},{\"internalType\":\"contract ISchemaResolver\",\"name\":\"resolver\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"revocable\",\"type\":\"bool\"}],\"name\":\"register\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"Registered(bytes32,address)\":{\"details\":\"Emitted when a new schema has been registered\",\"params\":{\"registerer\":\"The address of the account used to register the schema.\",\"uid\":\"The schema UID.\"}}},\"kind\":\"dev\",\"methods\":{\"getSchema(bytes32)\":{\"details\":\"Returns an existing schema by UID\",\"params\":{\"uid\":\"The UID of the schema to retrieve.\"},\"returns\":{\"_0\":\"The schema data members.\"}},\"register(string,address,bool)\":{\"details\":\"Submits and reserves a new schema\",\"params\":{\"resolver\":\"An optional schema resolver.\",\"revocable\":\"Whether the schema allows revocations explicitly.\",\"schema\":\"The schema data schema.\"},\"returns\":{\"_0\":\"The UID of the new schema.\"}}},\"title\":\"The global schema registry.\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/SchemaRegistry.sol\":\"SchemaRegistry\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000000},\"remappings\":[],\"viaIR\":true},\"sources\":{\"contracts/ISchemaRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport { ISchemaResolver } from \\\"./resolver/ISchemaResolver.sol\\\";\\n\\n/**\\n * @title A struct representing a record for a submitted schema.\\n */\\nstruct SchemaRecord {\\n bytes32 uid; // The unique identifier of the schema.\\n ISchemaResolver resolver; // Optional schema resolver.\\n bool revocable; // Whether the schema allows revocations explicitly.\\n string schema; // Custom specification of the schema (e.g., an ABI).\\n}\\n\\n/**\\n * @title The global schema registry interface.\\n */\\ninterface ISchemaRegistry {\\n /**\\n * @dev Emitted when a new schema has been registered\\n *\\n * @param uid The schema UID.\\n * @param registerer The address of the account used to register the schema.\\n */\\n event Registered(bytes32 indexed uid, address registerer);\\n\\n /**\\n * @dev Submits and reserves a new schema\\n *\\n * @param schema The schema data schema.\\n * @param resolver An optional schema resolver.\\n * @param revocable Whether the schema allows revocations explicitly.\\n *\\n * @return The UID of the new schema.\\n */\\n function register(string calldata schema, ISchemaResolver resolver, bool revocable) external returns (bytes32);\\n\\n /**\\n * @dev Returns an existing schema by UID\\n *\\n * @param uid The UID of the schema to retrieve.\\n *\\n * @return The schema data members.\\n */\\n function getSchema(bytes32 uid) external view returns (SchemaRecord memory);\\n}\\n\",\"keccak256\":\"0xef47e449dd02bd034e26b1dea505ce533906f8462fc674c938ed0e872a68d640\",\"license\":\"MIT\"},\"contracts/SchemaRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.19;\\n\\nimport { EMPTY_UID } from \\\"./Types.sol\\\";\\nimport { ISchemaRegistry, SchemaRecord } from \\\"./ISchemaRegistry.sol\\\";\\n\\nimport { ISchemaResolver } from \\\"./resolver/ISchemaResolver.sol\\\";\\n\\n/**\\n * @title The global schema registry.\\n */\\ncontract SchemaRegistry is ISchemaRegistry {\\n error AlreadyExists();\\n\\n // The version of the contract.\\n string public constant VERSION = \\\"0.26\\\";\\n\\n // The global mapping between schema records and their IDs.\\n mapping(bytes32 uid => SchemaRecord schemaRecord) private _registry;\\n\\n /**\\n * @inheritdoc ISchemaRegistry\\n */\\n function register(string calldata schema, ISchemaResolver resolver, bool revocable) external returns (bytes32) {\\n SchemaRecord memory schemaRecord = SchemaRecord({\\n uid: EMPTY_UID,\\n schema: schema,\\n resolver: resolver,\\n revocable: revocable\\n });\\n\\n bytes32 uid = _getUID(schemaRecord);\\n if (_registry[uid].uid != EMPTY_UID) {\\n revert AlreadyExists();\\n }\\n\\n schemaRecord.uid = uid;\\n _registry[uid] = schemaRecord;\\n\\n emit Registered(uid, msg.sender);\\n\\n return uid;\\n }\\n\\n /**\\n * @inheritdoc ISchemaRegistry\\n */\\n function getSchema(bytes32 uid) external view returns (SchemaRecord memory) {\\n return _registry[uid];\\n }\\n\\n /**\\n * @dev Calculates a UID for a given schema.\\n *\\n * @param schemaRecord The input schema.\\n *\\n * @return schema UID.\\n */\\n function _getUID(SchemaRecord memory schemaRecord) private pure returns (bytes32) {\\n return keccak256(abi.encodePacked(schemaRecord.schema, schemaRecord.resolver, schemaRecord.revocable));\\n }\\n}\\n\",\"keccak256\":\"0x11ca856573f1b53530d27d40b0a5629a5c591957e221a1b4b8eae2b2053f168b\",\"license\":\"MIT\"},\"contracts/Types.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.19;\\n\\n// A representation of an empty/uninitialized UID.\\nbytes32 constant EMPTY_UID = 0;\\n\\n/**\\n * @dev A struct representing EIP712 signature data.\\n */\\nstruct EIP712Signature {\\n uint8 v; // The recovery ID.\\n bytes32 r; // The x-coordinate of the nonce R.\\n bytes32 s; // The signature data.\\n}\\n\\n/**\\n * @dev A struct representing a single attestation.\\n */\\nstruct Attestation {\\n bytes32 uid; // A unique identifier of the attestation.\\n bytes32 schema; // The unique identifier of the schema.\\n uint64 time; // The time when the attestation was created (Unix timestamp).\\n uint64 expirationTime; // The time when the attestation expires (Unix timestamp).\\n uint64 revocationTime; // The time when the attestation was revoked (Unix timestamp).\\n bytes32 refUID; // The UID of the related attestation.\\n address recipient; // The recipient of the attestation.\\n address attester; // The attester/sender of the attestation.\\n bool revocable; // Whether the attestation is revocable.\\n bytes data; // Custom attestation data.\\n}\\n\",\"keccak256\":\"0x547096b5cb7bfad9591bdc520705f8110534cd040ed0f7a0ba8d83ea4a565b45\",\"license\":\"MIT\"},\"contracts/resolver/ISchemaResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport { Attestation } from \\\"../Types.sol\\\";\\n\\n/**\\n * @title The interface of an optional schema resolver.\\n */\\ninterface ISchemaResolver {\\n /**\\n * @dev Returns whether the resolver supports ETH transfers.\\n */\\n function isPayable() external pure returns (bool);\\n\\n /**\\n * @dev Processes an attestation and verifies whether it's valid.\\n *\\n * @param attestation The new attestation.\\n *\\n * @return Whether the attestation is valid.\\n */\\n function attest(Attestation calldata attestation) external payable returns (bool);\\n\\n /**\\n * @dev Processes multiple attestations and verifies whether they are valid.\\n *\\n * @param attestations The new attestations.\\n * @param values Explicit ETH amounts which were sent with each attestation.\\n *\\n * @return Whether all the attestations are valid.\\n */\\n function multiAttest(\\n Attestation[] calldata attestations,\\n uint256[] calldata values\\n ) external payable returns (bool);\\n\\n /**\\n * @dev Processes an attestation revocation and verifies if it can be revoked.\\n *\\n * @param attestation The existing attestation to be revoked.\\n *\\n * @return Whether the attestation can be revoked.\\n */\\n function revoke(Attestation calldata attestation) external payable returns (bool);\\n\\n /**\\n * @dev Processes revocation of multiple attestation and verifies they can be revoked.\\n *\\n * @param attestations The existing attestations to be revoked.\\n * @param values Explicit ETH amounts which were sent with each revocation.\\n *\\n * @return Whether the attestations can be revoked.\\n */\\n function multiRevoke(\\n Attestation[] calldata attestations,\\n uint256[] calldata values\\n ) external payable returns (bool);\\n}\\n\",\"keccak256\":\"0x0f3a75c28cdb91fa9227a6eef183379ecea2b6bf38db52795b5c4e6af79299e8\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x60808060405234610016576107b8908161001c8239f35b600080fdfe60806040908082526004918236101561001757600080fd5b600091823560e01c90816360d7a2781461029757508063a2ea7c6e146101045763ffa1ad741461004657600080fd5b3461010057817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610100578051918183019083821067ffffffffffffffff8311176100d45750926100d093825282527f302e323600000000000000000000000000000000000000000000000000000000602083015251918291602083526020830190610689565b0390f35b806041867f4e487b71000000000000000000000000000000000000000000000000000000006024945252fd5b5080fd5b503461010057602092837ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610293576060808351610144816106cc565b85815285878201528585820152015235825281835280822090805191610169836106cc565b805483526001918282015491868501600273ffffffffffffffffffffffffffffffffffffffff92838616835260ff8589019660a01c16151586520188845196898354936101b585610758565b808b52948381169081156102505750600114610214575b50505050506101e1856100d097980386610717565b606087019485528251978897818952519088015251169085015251151560608401525160808084015260a0830190610689565b908094939b50528983205b82841061023d575050508501909601956101e1886100d087386101cc565b80548985018c0152928a0192810161021f565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016858c01525050505090151560051b86010196506101e1886100d087386101cc565b8280fd5b92939050346106625760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126106625780359067ffffffffffffffff80831161065e573660238401121561065e57828201359181831161065a57366024848601011161065a576024359673ffffffffffffffffffffffffffffffffffffffff9182891680990361010057604435978815158099036102935761033b816106cc565b8281526020998a8201908152888201998a52885197848c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe099818b601f83011601610386908d610717565b808c5280828d019460240185378b0101528b6060840199808b5283518d5115158d519384938185019687915180926103bd92610666565b84019260601b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000169083015260f81b6034820152036015810182526035016104059082610717565b519020998a8552848c5289852054610632579082918b600294528b8652858d528a8620925183556001968784019251167fffffffffffffffffffffff00000000000000000000000000000000000000000074ff000000000000000000000000000000000000000084549351151560a01b1692161717905501955190815194851161060657506104948654610758565b601f81116105c0575b508891601f8511600114610545578495509084939492919361051a575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff91921b9260031b1c19161790555b817f7d917fcbc9a29a9705ff9936ffa599500e4fd902e4486bae317414fe967b307c848351338152a251908152f35b015191507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff386104ba565b9294849081168785528a8520945b8b888383106105a95750505010610572575b505050811b0190556104eb565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c19169055388080610565565b868601518855909601959485019487935001610553565b868352898320601f860160051c8101918b87106105fc575b601f0160051c019084905b8281106105f157505061049d565b8481550184906105e3565b90915081906105d8565b8260416024927f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b838a517f23369fa6000000000000000000000000000000000000000000000000000000008152fd5b8680fd5b8580fd5b8380fd5b60005b8381106106795750506000910152565b8181015183820152602001610669565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f6020936106c581518092818752878088019101610666565b0116010190565b6080810190811067ffffffffffffffff8211176106e857604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176106e857604052565b90600182811c921680156107a1575b602083101461077257565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b91607f169161076756fea164736f6c6343000812000a", "deployedBytecode": "0x60806040908082526004918236101561001757600080fd5b600091823560e01c90816360d7a2781461029757508063a2ea7c6e146101045763ffa1ad741461004657600080fd5b3461010057817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610100578051918183019083821067ffffffffffffffff8311176100d45750926100d093825282527f302e323600000000000000000000000000000000000000000000000000000000602083015251918291602083526020830190610689565b0390f35b806041867f4e487b71000000000000000000000000000000000000000000000000000000006024945252fd5b5080fd5b503461010057602092837ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610293576060808351610144816106cc565b85815285878201528585820152015235825281835280822090805191610169836106cc565b805483526001918282015491868501600273ffffffffffffffffffffffffffffffffffffffff92838616835260ff8589019660a01c16151586520188845196898354936101b585610758565b808b52948381169081156102505750600114610214575b50505050506101e1856100d097980386610717565b606087019485528251978897818952519088015251169085015251151560608401525160808084015260a0830190610689565b908094939b50528983205b82841061023d575050508501909601956101e1886100d087386101cc565b80548985018c0152928a0192810161021f565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016858c01525050505090151560051b86010196506101e1886100d087386101cc565b8280fd5b92939050346106625760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126106625780359067ffffffffffffffff80831161065e573660238401121561065e57828201359181831161065a57366024848601011161065a576024359673ffffffffffffffffffffffffffffffffffffffff9182891680990361010057604435978815158099036102935761033b816106cc565b8281526020998a8201908152888201998a52885197848c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe099818b601f83011601610386908d610717565b808c5280828d019460240185378b0101528b6060840199808b5283518d5115158d519384938185019687915180926103bd92610666565b84019260601b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000169083015260f81b6034820152036015810182526035016104059082610717565b519020998a8552848c5289852054610632579082918b600294528b8652858d528a8620925183556001968784019251167fffffffffffffffffffffff00000000000000000000000000000000000000000074ff000000000000000000000000000000000000000084549351151560a01b1692161717905501955190815194851161060657506104948654610758565b601f81116105c0575b508891601f8511600114610545578495509084939492919361051a575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff91921b9260031b1c19161790555b817f7d917fcbc9a29a9705ff9936ffa599500e4fd902e4486bae317414fe967b307c848351338152a251908152f35b015191507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff386104ba565b9294849081168785528a8520945b8b888383106105a95750505010610572575b505050811b0190556104eb565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c19169055388080610565565b868601518855909601959485019487935001610553565b868352898320601f860160051c8101918b87106105fc575b601f0160051c019084905b8281106105f157505061049d565b8481550184906105e3565b90915081906105d8565b8260416024927f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b838a517f23369fa6000000000000000000000000000000000000000000000000000000008152fd5b8680fd5b8580fd5b8380fd5b60005b8381106106795750506000910152565b8181015183820152602001610669565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f6020936106c581518092818752878088019101610666565b0116010190565b6080810190811067ffffffffffffffff8211176106e857604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176106e857604052565b90600182811c921680156107a1575b602083101461077257565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b91607f169161076756fea164736f6c6343000812000a", "devdoc": { "events": { "Registered(bytes32,address)": { "details": "Emitted when a new schema has been registered", "params": { "registerer": "The address of the account used to register the schema.", "uid": "The schema UID." } } }, "kind": "dev", "methods": { "getSchema(bytes32)": { "details": "Returns an existing schema by UID", "params": { "uid": "The UID of the schema to retrieve." }, "returns": { "_0": "The schema data members." } }, "register(string,address,bool)": { "details": "Submits and reserves a new schema", "params": { "resolver": "An optional schema resolver.", "revocable": "Whether the schema allows revocations explicitly.", "schema": "The schema data schema." }, "returns": { "_0": "The UID of the new schema." } } }, "title": "The global schema registry.", "version": 1 }, "userdoc": { "kind": "user", "methods": {}, "version": 1 }, "storageLayout": { "storage": [ { "astId": 5366, "contract": "contracts/SchemaRegistry.sol:SchemaRegistry", "label": "_registry", "offset": 0, "slot": "0", "type": "t_mapping(t_bytes32,t_struct(SchemaRecord)5313_storage)" } ], "types": { "t_bool": { "encoding": "inplace", "label": "bool", "numberOfBytes": "1" }, "t_bytes32": { "encoding": "inplace", "label": "bytes32", "numberOfBytes": "32" }, "t_contract(ISchemaResolver)5553": { "encoding": "inplace", "label": "contract ISchemaResolver", "numberOfBytes": "20" }, "t_mapping(t_bytes32,t_struct(SchemaRecord)5313_storage)": { "encoding": "mapping", "key": "t_bytes32", "label": "mapping(bytes32 => struct SchemaRecord)", "numberOfBytes": "32", "value": "t_struct(SchemaRecord)5313_storage" }, "t_string_storage": { "encoding": "bytes", "label": "string", "numberOfBytes": "32" }, "t_struct(SchemaRecord)5313_storage": { "encoding": "inplace", "label": "struct SchemaRecord", "members": [ { "astId": 5305, "contract": "contracts/SchemaRegistry.sol:SchemaRegistry", "label": "uid", "offset": 0, "slot": "0", "type": "t_bytes32" }, { "astId": 5308, "contract": "contracts/SchemaRegistry.sol:SchemaRegistry", "label": "resolver", "offset": 0, "slot": "1", "type": "t_contract(ISchemaResolver)5553" }, { "astId": 5310, "contract": "contracts/SchemaRegistry.sol:SchemaRegistry", "label": "revocable", "offset": 20, "slot": "1", "type": "t_bool" }, { "astId": 5312, "contract": "contracts/SchemaRegistry.sol:SchemaRegistry", "label": "schema", "offset": 0, "slot": "2", "type": "t_string_storage" } ], "numberOfBytes": "96" } } } }