diff --git a/README.md b/README.md index c71ae391..b3ed809f 100644 --- a/README.md +++ b/README.md @@ -216,6 +216,22 @@ Here are the addresses on those networks: +
+ Base Sepolia + +- Router = + [0xE235826514945186227918325D3E5b5f873861A6](https://sepolia.basescan.org/address/0xE235826514945186227918325D3E5b5f873861A6) +- AttestationRegistry = + [0x374B686137eC0DB442a8d833451f8C12cD4B5De4](https://sepolia.basescan.org/address/0x374B686137eC0DB442a8d833451f8C12cD4B5De4) +- ModuleRegistry = + [0xEC572277d4E87a64DcfA774ED219Dd4E69E4BDc6](https://sepolia.basescan.org/address/0xEC572277d4E87a64DcfA774ED219Dd4E69E4BDc6) +- PortalRegistry = + [0x025531b655D9EE335B8E6cc4C118b313f26ACc8F](https://sepolia.basescan.org/address/0x025531b655D9EE335B8E6cc4C118b313f26ACc8F) +- SchemaRegistry = + [0x66D2F3DCc970343b83a6263E20832184fa71CFe7](https://sepolia.basescan.org/address/0x66D2F3DCc970343b83a6263E20832184fa71CFe7) + +
+ ## Subgraphs Addresses - [Linea Goerli](https://api.goldsky.com/api/public/project_clqghnrbp9nx201wtgylv8748/subgraphs/verax/subgraph-testnet/gn) @@ -224,6 +240,7 @@ Here are the addresses on those networks: - [Arbitrum Goerli](https://api.thegraph.com/subgraphs/name/cliqueofficial/verax-arbitrum-goerli) - [Arbitrum Mainnet](https://api.thegraph.com/subgraphs/name/cliqueofficial/verax-arbitrum) - [Arbitrum Nova](https://api.goldsky.com/api/public/project_clr9aj9alwgwg01q7ci1rh781/subgraphs/verax-arbitrum-nova/0.0.5/gn) +- [Base Sepolia](https://api.studio.thegraph.com/query/67946/verax-v1-base-sepolia/v0.0.1) ## License diff --git a/contracts/.openzeppelin/unknown-84532.json b/contracts/.openzeppelin/unknown-84532.json new file mode 100644 index 00000000..540c6151 --- /dev/null +++ b/contracts/.openzeppelin/unknown-84532.json @@ -0,0 +1,849 @@ +{ + "manifestVersion": "3.2", + "admin": { + "address": "0xA4a7517F62216BD42e42a67dF09C25adc72A5897", + "txHash": "0x75f8e1cc7f0baeed65ae21e0347df03f013262857139add0f0cc3625fddd81d0" + }, + "proxies": [ + { + "address": "0xE235826514945186227918325D3E5b5f873861A6", + "txHash": "0xece646880c516e2c80a0f56300939b9503870629193d28d42f8b296949510617", + "kind": "transparent" + }, + { + "address": "0x374B686137eC0DB442a8d833451f8C12cD4B5De4", + "txHash": "0x71313463a1bc7a75dfbb19a976c8743181239e5324cbee56eb055e9357f39430", + "kind": "transparent" + }, + { + "address": "0xEC572277d4E87a64DcfA774ED219Dd4E69E4BDc6", + "txHash": "0x0514ad8636e72e1adec2a329852e3c802d328fa7d7b8a95f20a23727d149be63", + "kind": "transparent" + }, + { + "address": "0x025531b655D9EE335B8E6cc4C118b313f26ACc8F", + "txHash": "0x96929d2c945be815be13ffb307f6b35ed1fe79193109415b956257f2c485ee84", + "kind": "transparent" + }, + { + "address": "0x66D2F3DCc970343b83a6263E20832184fa71CFe7", + "txHash": "0x4d8a4152f77a9fd3424b87f58733eaafbfb0ed6f47179830ed893842839c652e", + "kind": "transparent" + } + ], + "impls": { + "4353fbe787c13443291bba3d18e906853909285ba948d10f4d95994940b68c97": { + "address": "0x6c46c245918d4fcfC13F0a9e2e49d4E2739A353a", + "txHash": "0x25063ec837814e5dda2cb0142471bb783ee91de48608912f3487e0870961150c", + "layout": { + "solcVersion": "0.8.21", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + }, + { + "label": "ATTESTATION_REGISTRY", + "offset": 0, + "slot": "101", + "type": "t_address", + "contract": "Router", + "src": "src/Router.sol:13" + }, + { + "label": "MODULE_REGISTRY", + "offset": 0, + "slot": "102", + "type": "t_address", + "contract": "Router", + "src": "src/Router.sol:14" + }, + { + "label": "PORTAL_REGISTRY", + "offset": 0, + "slot": "103", + "type": "t_address", + "contract": "Router", + "src": "src/Router.sol:15" + }, + { + "label": "SCHEMA_REGISTRY", + "offset": 0, + "slot": "104", + "type": "t_address", + "contract": "Router", + "src": "src/Router.sol:16" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": {} + } + }, + "afc9287c19cb1b830999d2016348e104b2143101ed97ea26cf1c1b48849ca551": { + "address": "0x51929da151eC2C5a5881C750E5b9941eACC46c1d", + "txHash": "0x6abced8a4fbfdad2e6055f7105419834f58616574339e191ebcebd0510c0f643", + "layout": { + "solcVersion": "0.8.21", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + }, + { + "label": "router", + "offset": 0, + "slot": "101", + "type": "t_contract(IRouter)7813", + "contract": "AttestationRegistry", + "src": "src/AttestationRegistry.sol:17" + }, + { + "label": "version", + "offset": 20, + "slot": "101", + "type": "t_uint16", + "contract": "AttestationRegistry", + "src": "src/AttestationRegistry.sol:19" + }, + { + "label": "attestationIdCounter", + "offset": 22, + "slot": "101", + "type": "t_uint32", + "contract": "AttestationRegistry", + "src": "src/AttestationRegistry.sol:20" + }, + { + "label": "attestations", + "offset": 0, + "slot": "102", + "type": "t_mapping(t_bytes32,t_struct(Attestation)9314_storage)", + "contract": "AttestationRegistry", + "src": "src/AttestationRegistry.sol:22" + }, + { + "label": "chainPrefix", + "offset": 0, + "slot": "103", + "type": "t_uint256", + "contract": "AttestationRegistry", + "src": "src/AttestationRegistry.sol:24" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_bytes_storage": { + "label": "bytes", + "numberOfBytes": "32" + }, + "t_contract(IRouter)7813": { + "label": "contract IRouter", + "numberOfBytes": "20" + }, + "t_mapping(t_bytes32,t_struct(Attestation)9314_storage)": { + "label": "mapping(bytes32 => struct Attestation)", + "numberOfBytes": "32" + }, + "t_struct(Attestation)9314_storage": { + "label": "struct Attestation", + "members": [ + { + "label": "attestationId", + "type": "t_bytes32", + "offset": 0, + "slot": "0" + }, + { + "label": "schemaId", + "type": "t_bytes32", + "offset": 0, + "slot": "1" + }, + { + "label": "replacedBy", + "type": "t_bytes32", + "offset": 0, + "slot": "2" + }, + { + "label": "attester", + "type": "t_address", + "offset": 0, + "slot": "3" + }, + { + "label": "portal", + "type": "t_address", + "offset": 0, + "slot": "4" + }, + { + "label": "attestedDate", + "type": "t_uint64", + "offset": 20, + "slot": "4" + }, + { + "label": "expirationDate", + "type": "t_uint64", + "offset": 0, + "slot": "5" + }, + { + "label": "revocationDate", + "type": "t_uint64", + "offset": 8, + "slot": "5" + }, + { + "label": "version", + "type": "t_uint16", + "offset": 16, + "slot": "5" + }, + { + "label": "revoked", + "type": "t_bool", + "offset": 18, + "slot": "5" + }, + { + "label": "subject", + "type": "t_bytes_storage", + "offset": 0, + "slot": "6" + }, + { + "label": "attestationData", + "type": "t_bytes_storage", + "offset": 0, + "slot": "7" + } + ], + "numberOfBytes": "256" + }, + "t_uint16": { + "label": "uint16", + "numberOfBytes": "2" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "label": "uint32", + "numberOfBytes": "4" + }, + "t_uint64": { + "label": "uint64", + "numberOfBytes": "8" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": {} + } + }, + "855a9f1d8e96c2bd24b6a929c90e3681a27dfdf6e80bf08bdaf0de5f33e7accf": { + "address": "0xee5e23492bf49C1F4CF0676b3bF49d78A6dD61c5", + "txHash": "0xa25bded572ec67144109228cb5ebd05304aecf55b7735f177b52c1336c6731bf", + "layout": { + "solcVersion": "0.8.21", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + }, + { + "label": "router", + "offset": 0, + "slot": "101", + "type": "t_contract(IRouter)7813", + "contract": "ModuleRegistry", + "src": "src/ModuleRegistry.sol:19" + }, + { + "label": "modules", + "offset": 0, + "slot": "102", + "type": "t_mapping(t_address,t_struct(Module)9346_storage)", + "contract": "ModuleRegistry", + "src": "src/ModuleRegistry.sol:21" + }, + { + "label": "moduleAddresses", + "offset": 0, + "slot": "103", + "type": "t_array(t_address)dyn_storage", + "contract": "ModuleRegistry", + "src": "src/ModuleRegistry.sol:23" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_address)dyn_storage": { + "label": "address[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(IRouter)7813": { + "label": "contract IRouter", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_struct(Module)9346_storage)": { + "label": "mapping(address => struct Module)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Module)9346_storage": { + "label": "struct Module", + "members": [ + { + "label": "moduleAddress", + "type": "t_address", + "offset": 0, + "slot": "0" + }, + { + "label": "name", + "type": "t_string_storage", + "offset": 0, + "slot": "1" + }, + { + "label": "description", + "type": "t_string_storage", + "offset": 0, + "slot": "2" + } + ], + "numberOfBytes": "96" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": {} + } + }, + "4354fba979d8af67ae201159e1b7f7c6048ac523a759db0e2d448b58a54cde2a": { + "address": "0x1ceb52584B6C45C7049dc7fDC476bC138E4beaDE", + "txHash": "0xa094dfeb0673be1418c4adf3bb7ce33e959643d631655562b290c95b7f8a1844", + "layout": { + "solcVersion": "0.8.21", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + }, + { + "label": "router", + "offset": 0, + "slot": "101", + "type": "t_contract(IRouter)7813", + "contract": "PortalRegistry", + "src": "src/PortalRegistry.sol:21" + }, + { + "label": "portals", + "offset": 0, + "slot": "102", + "type": "t_mapping(t_address,t_struct(Portal)9339_storage)", + "contract": "PortalRegistry", + "src": "src/PortalRegistry.sol:23" + }, + { + "label": "issuers", + "offset": 0, + "slot": "103", + "type": "t_mapping(t_address,t_bool)", + "contract": "PortalRegistry", + "src": "src/PortalRegistry.sol:25" + }, + { + "label": "portalAddresses", + "offset": 0, + "slot": "104", + "type": "t_array(t_address)dyn_storage", + "contract": "PortalRegistry", + "src": "src/PortalRegistry.sol:27" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_address)dyn_storage": { + "label": "address[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(IRouter)7813": { + "label": "contract IRouter", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_struct(Portal)9339_storage)": { + "label": "mapping(address => struct Portal)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Portal)9339_storage": { + "label": "struct Portal", + "members": [ + { + "label": "id", + "type": "t_address", + "offset": 0, + "slot": "0" + }, + { + "label": "ownerAddress", + "type": "t_address", + "offset": 0, + "slot": "1" + }, + { + "label": "modules", + "type": "t_array(t_address)dyn_storage", + "offset": 0, + "slot": "2" + }, + { + "label": "isRevocable", + "type": "t_bool", + "offset": 0, + "slot": "3" + }, + { + "label": "name", + "type": "t_string_storage", + "offset": 0, + "slot": "4" + }, + { + "label": "description", + "type": "t_string_storage", + "offset": 0, + "slot": "5" + }, + { + "label": "ownerName", + "type": "t_string_storage", + "offset": 0, + "slot": "6" + } + ], + "numberOfBytes": "224" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": {} + } + }, + "68d0630cb0ae02e0e7d37f7e07193d62999ecb9070d3ca38b245f3954a34b089": { + "address": "0xBdC45324AB9A7e82Ae15324a3d8352b513Ee2788", + "txHash": "0x0e2a0e5b600e7ead95ccdeb85ac42e83c5ba293afdd529f10280064bc6ba2ac2", + "layout": { + "solcVersion": "0.8.21", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + }, + { + "label": "router", + "offset": 0, + "slot": "101", + "type": "t_contract(IRouter)7813", + "contract": "SchemaRegistry", + "src": "src/SchemaRegistry.sol:16" + }, + { + "label": "schemas", + "offset": 0, + "slot": "102", + "type": "t_mapping(t_bytes32,t_struct(Schema)9323_storage)", + "contract": "SchemaRegistry", + "src": "src/SchemaRegistry.sol:18" + }, + { + "label": "schemaIds", + "offset": 0, + "slot": "103", + "type": "t_array(t_bytes32)dyn_storage", + "contract": "SchemaRegistry", + "src": "src/SchemaRegistry.sol:20" + }, + { + "label": "schemasIssuers", + "offset": 0, + "slot": "104", + "type": "t_mapping(t_bytes32,t_address)", + "contract": "SchemaRegistry", + "src": "src/SchemaRegistry.sol:22" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_contract(IRouter)7813": { + "label": "contract IRouter", + "numberOfBytes": "20" + }, + "t_mapping(t_bytes32,t_address)": { + "label": "mapping(bytes32 => address)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_struct(Schema)9323_storage)": { + "label": "mapping(bytes32 => struct Schema)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Schema)9323_storage": { + "label": "struct Schema", + "members": [ + { + "label": "name", + "type": "t_string_storage", + "offset": 0, + "slot": "0" + }, + { + "label": "description", + "type": "t_string_storage", + "offset": 0, + "slot": "1" + }, + { + "label": "context", + "type": "t_string_storage", + "offset": 0, + "slot": "2" + }, + { + "label": "schema", + "type": "t_string_storage", + "offset": 0, + "slot": "3" + } + ], + "numberOfBytes": "128" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": {} + } + } + } +} diff --git a/contracts/env/.env.base-sepolia b/contracts/env/.env.base-sepolia new file mode 100644 index 00000000..70457123 --- /dev/null +++ b/contracts/env/.env.base-sepolia @@ -0,0 +1,16 @@ +# Config +INFURA_KEY= + +PRIVATE_KEY_LINEA_TESTNET=0000000000000000000000000000000000000000000000000000000000000001 + +LINEASCAN_API_KEY= + +# Contracts +ROUTER_ADDRESS=0xE235826514945186227918325D3E5b5f873861A6 +PORTAL_REGISTRY_ADDRESS=0x025531b655D9EE335B8E6cc4C118b313f26ACc8F +SCHEMA_REGISTRY_ADDRESS=0x66D2F3DCc970343b83a6263E20832184fa71CFe7 +MODULE_REGISTRY_ADDRESS=0xEC572277d4E87a64DcfA774ED219Dd4E69E4BDc6 +ATTESTATION_REGISTRY_ADDRESS=0x374B686137eC0DB442a8d833451f8C12cD4B5De4 +ATTESTATION_READER_ADDRESS= +EAS_REGISTRY_ADDRESS= + diff --git a/contracts/hardhat.config.ts b/contracts/hardhat.config.ts index e030b29d..f3c3566c 100644 --- a/contracts/hardhat.config.ts +++ b/contracts/hardhat.config.ts @@ -34,6 +34,10 @@ const config: HardhatUserConfig = { url: "https://arbitrum-nova.publicnode.com", accounts: process.env.PRIVATE_KEY_NOVA !== undefined ? [process.env.PRIVATE_KEY_NOVA] : [], }, + "base-sepolia": { + url: `https://sepolia.base.org`, + accounts: process.env.PRIVATE_KEY_LINEA_TESTNET !== undefined ? [process.env.PRIVATE_KEY_LINEA_TESTNET] : [], + }, "linea-goerli": { url: `https://linea-goerli.infura.io/v3/${process.env.INFURA_KEY ?? ""}`, accounts: process.env.PRIVATE_KEY_LINEA_TESTNET !== undefined ? [process.env.PRIVATE_KEY_LINEA_TESTNET] : [], @@ -60,6 +64,7 @@ const config: HardhatUserConfig = { "arbitrum-sepolia": process.env.ARBISCAN_API_KEY ?? "", arbitrum: process.env.ARBISCAN_API_KEY ?? "", "arbitrum-nova": process.env.ARBISCAN_NOVA_API_KEY ?? "", + "base-sepolia": process.env.BASESCAN_API_KEY ?? "", "linea-goerli": process.env.LINEASCAN_API_KEY ?? "", "linea-sepolia": process.env.LINEASCAN_API_KEY ?? "", linea: process.env.LINEASCAN_API_KEY ?? "", @@ -98,6 +103,14 @@ const config: HardhatUserConfig = { browserURL: "https://nova.arbiscan.io/", }, }, + { + network: "base-sepolia", + chainId: 84532, + urls: { + apiURL: "https://api-sepolia.basescan.org/api", + browserURL: "https://sepolia.basescan.org/", + }, + }, { network: "linea-goerli", chainId: 59140, diff --git a/contracts/script/utils.ts b/contracts/script/utils.ts index 78bdc53b..fc899bf5 100644 --- a/contracts/script/utils.ts +++ b/contracts/script/utils.ts @@ -14,6 +14,8 @@ export const getChainPrefix = (chainId: bigint): `0x${string}` => { return "0x0001000000000000000000000000000000000000000000000000000000000000"; case 42170n: // Arbitrum nova return "0x0002000000000000000000000000000000000000000000000000000000000000"; + case 84532n: // Base Sepolia + return "0x0005000000000000000000000000000000000000000000000000000000000000"; default: throw new Error("Unknown network"); } diff --git a/sdk/package.json b/sdk/package.json index cd77780c..793e1458 100644 --- a/sdk/package.json +++ b/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@verax-attestation-registry/verax-sdk", - "version": "1.4.0", + "version": "1.5.0", "description": "Verax Attestation Registry SDK to interact with the subgraph and the contracts", "keywords": [ "linea-attestation-registry", diff --git a/sdk/src/VeraxSdk.ts b/sdk/src/VeraxSdk.ts index 29248fab..4bc9d2f8 100644 --- a/sdk/src/VeraxSdk.ts +++ b/sdk/src/VeraxSdk.ts @@ -3,6 +3,7 @@ import { arbitrumGoerli, arbitrumNova, arbitrumSepolia, + baseSepolia, linea, lineaSepolia, lineaTestnet, @@ -127,6 +128,21 @@ export class VeraxSdk { mode: SDKMode.FRONTEND, }; + static DEFAULT_BASE_SEPOLIA: Conf = { + chain: baseSepolia, + mode: SDKMode.BACKEND, + subgraphUrl: "https://api.studio.thegraph.com/query/67946/verax-v1-base-sepolia/v0.0.1", + portalRegistryAddress: "0x025531b655D9EE335B8E6cc4C118b313f26ACc8F", + moduleRegistryAddress: "0xEC572277d4E87a64DcfA774ED219Dd4E69E4BDc6", + schemaRegistryAddress: "0x66D2F3DCc970343b83a6263E20832184fa71CFe7", + attestationRegistryAddress: "0x374B686137eC0DB442a8d833451f8C12cD4B5De4", + }; + + static DEFAULT_BASE_SEPOLIA_FRONTEND: Conf = { + ...VeraxSdk.DEFAULT_BASE_SEPOLIA, + mode: SDKMode.FRONTEND, + }; + private readonly web3Client: PublicClient; private readonly walletClient: WalletClient | undefined; diff --git a/subgraph/networks.json b/subgraph/networks.json index ebd149d8..ad973d7f 100644 --- a/subgraph/networks.json +++ b/subgraph/networks.json @@ -124,5 +124,23 @@ "address": "0x9b5BABcEbf0E8550da1eCDe5674783179B6557FB", "startBlock": 38935000 } + }, + "base-sepolia": { + "AttestationRegistry": { + "address": "0x374B686137eC0DB442a8d833451f8C12cD4B5De4", + "startBlock": 9174253 + }, + "ModuleRegistry": { + "address": "0xEC572277d4E87a64DcfA774ED219Dd4E69E4BDc6", + "startBlock": 9174253 + }, + "PortalRegistry": { + "address": "0x025531b655D9EE335B8E6cc4C118b313f26ACc8F", + "startBlock": 9174253 + }, + "SchemaRegistry": { + "address": "0x66D2F3DCc970343b83a6263E20832184fa71CFe7", + "startBlock": 9174253 + } } } diff --git a/subgraph/package.json b/subgraph/package.json index 22308a50..6530fef1 100644 --- a/subgraph/package.json +++ b/subgraph/package.json @@ -18,6 +18,7 @@ "build:linea-mainnet": "cp subgraph.linea-mainnet.yaml subgraph.yaml && pnpm run codegen:linea-mainnet && graph build --network linea", "build:linea-goerli": "cp subgraph.linea-goerli.yaml subgraph.yaml && pnpm run codegen:linea-goerli && graph build --network linea-goerli", "build:linea-sepolia": "cp subgraph.linea-sepolia.yaml subgraph.yaml && pnpm run codegen:linea-sepolia && graph build --network linea-sepolia", + "build:base-sepolia": "cp subgraph.base-sepolia.yaml subgraph.yaml && pnpm run codegen:base-sepolia && graph build --network base-sepolia", "build:arbitrum-goerli": "cp subgraph.arbitrum-goerli.yaml subgraph.yaml && pnpm run codegen:arbitrum-goerli && graph build --network arbitrum-goerli", "build:arbitrum-sepolia": "cp subgraph.arbitrum-sepolia.yaml subgraph.yaml && pnpm run codegen:arbitrum-sepolia && graph build --network arbitrum-sepolia", "build:arbitrum-mainnet": "cp subgraph.arbitrum-mainnet.yaml subgraph.yaml && pnpm run codegen:arbitrum-mainnet && graph build --network arbitrum-mainnet", @@ -25,6 +26,7 @@ "codegen:linea-mainnet": "cp subgraph.linea-mainnet.yaml subgraph.yaml && graph codegen", "codegen:linea-goerli": "cp subgraph.linea-goerli.yaml subgraph.yaml && graph codegen", "codegen:linea-sepolia": "cp subgraph.linea-sepolia.yaml subgraph.yaml && graph codegen", + "codegen:base-sepolia": "cp subgraph.base-sepolia.yaml subgraph.yaml && graph codegen", "codegen:arbitrum-goerli": "cp subgraph.arbitrum-goerli.yaml subgraph.yaml && graph codegen", "codegen:arbitrum-sepolia": "cp subgraph.arbitrum-sepolia.yaml subgraph.yaml && graph codegen", "codegen:arbitrum-mainnet": "cp subgraph.arbitrum-mainnet.yaml subgraph.yaml && graph codegen", @@ -32,12 +34,14 @@ "create:linea-mainnet": "source .env && graph create --node $DEPLOY_ENDPOINT_LINEA_MAINNET $SUBGRAPH_NAME_LINEA_MAINNET", "create:linea-goerli": "source .env && graph create --node $DEPLOY_ENDPOINT_LINEA_GOERLI $SUBGRAPH_NAME_LINEA_GOERLI", "create:linea-sepolia": "source .env && graph create --node $DEPLOY_ENDPOINT_LINEA_SEPOLIA $SUBGRAPH_NAME_LINEA_SEPOLIA", + "create:base-sepolia": "source .env && graph create --node $DEPLOY_ENDPOINT_BASE_SEPOLIA $SUBGRAPH_NAME_BASE_SEPOLIA", "create:arbitrum-goerli": "source .env && graph create --node $DEPLOY_ENDPOINT_ARBITRUM_GOERLI Consensys/verax-arbitrum-goerli", "create:arbitrum-sepolia": "source .env && graph create --node $DEPLOY_ENDPOINT_ARBITRUM_SEPOLIA $SUBGRAPH_NAME_ARBITRUM_SEPOLIA", "create:arbitrum-one": "source .env && graph create --node $DEPLOY_ENDPOINT_ARBITRUM_GOERLI Consensys/verax-arbitrum", "deploy:linea-mainnet": "source .env && cp subgraph.linea-mainnet.yaml subgraph.yaml && graph deploy --studio $SUBGRAPH_NAME_LINEA_MAINNET", "deploy:linea-goerli": "source .env && cp subgraph.linea-goerli.yaml subgraph.yaml && graph deploy --studio $SUBGRAPH_NAME_LINEA_GOERLI", "deploy:linea-sepolia": "source .env && cp subgraph.linea-sepolia.yaml subgraph.yaml && graph deploy --studio $SUBGRAPH_NAME_LINEA_SEPOLIA", + "deploy:base-sepolia": "source .env && cp subgraph.base-sepolia.yaml subgraph.yaml && graph deploy --studio $SUBGRAPH_NAME_BASE_SEPOLIA", "deploy:arbitrum-goerli": "source .env && cp subgraph.arbitrum-goerli.yaml subgraph.yaml && graph deploy --network arbitrum-goerli --node $DEPLOY_ENDPOINT_ARBITRUM_GOERLI --headers \"{\\\"Authorization\\\": \\\"Basic $IPFS_IDENTIFIERS\\\"}\" --ipfs $IPFS_ENDPOINT --version-label v0.0.5 Consensys/verax-arbitrum-goerli", "deploy:arbitrum-sepolia": "source .env && cp subgraph.arbitrum-sepolia.yaml subgraph.yaml && pnpm run build:arbitrum-sepolia && graph deploy --studio $SUBGRAPH_NAME_ARBITRUM_SEPOLIA", "deploy:arbitrum-mainnet": "source .env && cp subgraph.arbitrum-mainnet.yaml subgraph.yaml && pnpm run build:arbitrum-mainnet && graph deploy --network arbitrum-mainnet --node $DEPLOY_ENDPOINT_ARBITRUM_MAINNET --headers \"{\\\"Authorization\\\": \\\"Basic $IPFS_IDENTIFIERS\\\"}\" --ipfs $IPFS_ENDPOINT --version-label v0.0.5 Consensys/verax-arbitrum", diff --git a/subgraph/subgraph.base-sepolia.yaml b/subgraph/subgraph.base-sepolia.yaml new file mode 100644 index 00000000..6aeb8bdf --- /dev/null +++ b/subgraph/subgraph.base-sepolia.yaml @@ -0,0 +1,98 @@ +specVersion: 0.0.5 +schema: + file: ./schema.graphql +dataSources: + - kind: ethereum + name: AttestationRegistry + network: linea-sepolia + source: + abi: AttestationRegistry + address: "0x374B686137eC0DB442a8d833451f8C12cD4B5De4" + startBlock: 9174253 + mapping: + kind: ethereum/events + apiVersion: 0.0.7 + language: wasm/assemblyscript + entities: + - Attestation + abis: + - name: AttestationRegistry + file: ./abis/AttestationRegistry.json + eventHandlers: + - event: AttestationRegistered(indexed bytes32) + handler: handleAttestationRegistered + - event: AttestationRevoked(bytes32) + handler: handleAttestationRevoked + - event: AttestationReplaced(bytes32,bytes32) + handler: handleAttestationReplaced + - event: VersionUpdated(uint16) + handler: handleVersionUpdated + file: ./src/attestation-registry.ts + - kind: ethereum + name: ModuleRegistry + network: linea-sepolia + source: + abi: ModuleRegistry + address: "0xEC572277d4E87a64DcfA774ED219Dd4E69E4BDc6" + startBlock: 9174253 + mapping: + kind: ethereum/events + apiVersion: 0.0.7 + language: wasm/assemblyscript + entities: + - Module + abis: + - name: ModuleRegistry + file: ./abis/ModuleRegistry.json + eventHandlers: + - event: ModuleRegistered(string,string,address) + handler: handleModuleRegistered + file: ./src/module-registry.ts + - kind: ethereum + name: PortalRegistry + network: linea-sepolia + source: + abi: PortalRegistry + address: "0x025531b655D9EE335B8E6cc4C118b313f26ACc8F" + startBlock: 9174253 + mapping: + kind: ethereum/events + apiVersion: 0.0.7 + language: wasm/assemblyscript + entities: + - Portal + abis: + - name: PortalRegistry + file: ./abis/PortalRegistry.json + eventHandlers: + - event: PortalRegistered(string,string,address) + handler: handlePortalRegistered + - event: PortalRevoked(address) + handler: handlePortalRevoked + - event: IssuerAdded(address) + handler: handleIssuerAdded + - event: IssuerRemoved(address) + handler: handleIssuerRemoved + file: ./src/portal-registry.ts + - kind: ethereum + name: SchemaRegistry + network: linea-sepolia + source: + abi: SchemaRegistry + address: "0x66D2F3DCc970343b83a6263E20832184fa71CFe7" + startBlock: 9174253 + mapping: + kind: ethereum/events + apiVersion: 0.0.7 + language: wasm/assemblyscript + entities: + - Portal + abis: + - name: SchemaRegistry + file: ./abis/SchemaRegistry.json + eventHandlers: + - event: SchemaCreated(indexed bytes32,string,string,string,string) + handler: handleSchemaCreated + - event: SchemaContextUpdated(indexed bytes32) + handler: handleSchemaContextUpdated + file: ./src/schema-registry.ts