From 5ac01bbc03bb514ec8ebd4bf9a79065ac362afa0 Mon Sep 17 00:00:00 2001 From: Simon Brown Date: Thu, 20 Jun 2024 15:35:39 +0100 Subject: [PATCH] chore(explorer): Add Hapi to explorer dashboard (#636) Co-authored-by: Alain Nicolas --- README.md | 36 + contracts/.openzeppelin/bsc-testnet.json | 995 ++++++++++++++++++ contracts/.openzeppelin/bsc.json | 849 +++++++++++++++ contracts/env/.env.bsc | 16 + contracts/env/.env.bsc-testnet | 16 + contracts/hardhat.config.ts | 26 + contracts/script/utils.ts | 4 + explorer/package.json | 2 +- .../src/assets/issuers/Hapi_logo_square.svg | 47 + .../src/assets/networks/arbitrum-goerli.svg | 36 - explorer/src/assets/networks/base-mainnet.svg | 7 + explorer/src/assets/networks/base.svg | 16 - explorer/src/assets/networks/bsc-dark.svg | 6 + explorer/src/assets/networks/bsc-mainnet.svg | 6 + explorer/src/assets/networks/bsc-testnet.svg | 6 + explorer/src/config/index.tsx | 34 +- explorer/src/pages/Home/data.tsx | 11 + pnpm-lock.yaml | 16 +- sdk/package.json | 2 +- sdk/src/VeraxSdk.ts | 32 + subgraph/networks.json | 36 + subgraph/package.json | 8 + subgraph/subgraph-v1.bsc-mainnet.yaml | 96 ++ subgraph/subgraph-v1.bsc-testnet.yaml | 96 ++ subgraph/subgraph.bsc-mainnet.yaml | 96 ++ subgraph/subgraph.bsc-testnet.yaml | 96 ++ 26 files changed, 2526 insertions(+), 65 deletions(-) create mode 100644 contracts/.openzeppelin/bsc-testnet.json create mode 100644 contracts/.openzeppelin/bsc.json create mode 100644 contracts/env/.env.bsc create mode 100644 contracts/env/.env.bsc-testnet create mode 100644 explorer/src/assets/issuers/Hapi_logo_square.svg delete mode 100644 explorer/src/assets/networks/arbitrum-goerli.svg create mode 100644 explorer/src/assets/networks/base-mainnet.svg delete mode 100644 explorer/src/assets/networks/base.svg create mode 100644 explorer/src/assets/networks/bsc-dark.svg create mode 100644 explorer/src/assets/networks/bsc-mainnet.svg create mode 100644 explorer/src/assets/networks/bsc-testnet.svg create mode 100644 subgraph/subgraph-v1.bsc-mainnet.yaml create mode 100644 subgraph/subgraph-v1.bsc-testnet.yaml create mode 100644 subgraph/subgraph.bsc-mainnet.yaml create mode 100644 subgraph/subgraph.bsc-testnet.yaml diff --git a/README.md b/README.md index 55455068..e1593c0d 100644 --- a/README.md +++ b/README.md @@ -75,6 +75,8 @@ The main contracts (i.e. the "registries") and the helpers contracts are deploye - Arbitrum Nova - Base Sepolia - Base Mainnet +- BSC Testnet +- BSC Mainnet Here are the addresses on those networks: @@ -214,6 +216,36 @@ Here are the addresses on those networks: - SchemaRegistry = [0x8081dCd745f160c148Eb5be510F78628A0951c31](https://basescan.org/address/0x8081dCd745f160c148Eb5be510F78628A0951c31) +
+ BSC Testnet + +- Router = + [0x90b8542d7288a83EC887229A7C727989C3b56209](https://testnet.bscscan.com/address/0x90b8542d7288a83EC887229A7C727989C3b56209) +- AttestationRegistry = + [0x5Cc4029f0dDae1FFE527385459D06d81DFD50EEe](https://testnet.bscscan.com/address/0x5Cc4029f0dDae1FFE527385459D06d81DFD50EEe) +- ModuleRegistry = + [0x6c46c245918d4fcfC13F0a9e2e49d4E2739A353a](https://testnet.bscscan.com/address/0x6c46c245918d4fcfC13F0a9e2e49d4E2739A353a) +- PortalRegistry = + [0xA4a7517F62216BD42e42a67dF09C25adc72A5897](https://testnet.bscscan.com/address/0xA4a7517F62216BD42e42a67dF09C25adc72A5897) +- SchemaRegistry = + [0x51929da151eC2C5a5881C750E5b9941eACC46c1d](https://testnet.bscscan.com/address/0x51929da151eC2C5a5881C750E5b9941eACC46c1d) + +
+ +
+ BSC + +- Router = + [0x7a5C1fAC7fF9908a8b2ED479e060619213116A47](https://bscscan.com/address/0x7a5C1fAC7fF9908a8b2ED479e060619213116A47) +- AttestationRegistry = + [0x3D8A3a8FF21bD295dbBD5319C399e2C4FD27F261](https://bscscan.com/address/0x3D8A3a8FF21bD295dbBD5319C399e2C4FD27F261) +- ModuleRegistry = + [0xD70a06f7A0f197D55Fa841fcF668782b2B8266eB](https://bscscan.com/address/0xD70a06f7A0f197D55Fa841fcF668782b2B8266eB) +- PortalRegistry = + [0xb2553A7E443DFA7C9dEc01D327FdDff1A5eF59b0](https://bscscan.com/address/0xb2553A7E443DFA7C9dEc01D327FdDff1A5eF59b0) +- SchemaRegistry = + [0x29205492435E1b06B20CeAeEC4AC41bcF595DFFd](https://bscscan.com/address/0x29205492435E1b06B20CeAeEC4AC41bcF595DFFd) +
## Subgraphs URLs @@ -227,6 +259,8 @@ Here are the addresses on those networks: - [Arbitrum Nova](https://api.goldsky.com/api/public/project_clwsa54350ydv01wjbq5r17v1/subgraphs/verax-v1-arbitrum-nova/0.0.4/gn) - [Base Sepolia](https://api.studio.thegraph.com/query/67521/verax-v1-base-sepolia/v0.0.2) - [Base Mainnet](https://api.studio.thegraph.com/query/67521/verax-v1-base/v0.0.2) +- [BSC Testnet](https://api.studio.thegraph.com/query/67521/verax-v1-bsc-testnet/v0.0.1) +- [BSC Mainnet](https://api.studio.thegraph.com/query/67521/verax-v1-bsc/v0.0.1) ## Network Prefixes @@ -241,6 +275,8 @@ ID. This prefix is defined in the `contracts/script/utils.ts` file. - Arbitrum Nova - `0x0002` - Base Sepolia - `0x0005` - Base Mainnet - `0x0005` +- BSC Testnet - `0x0006` +- BSC Mainnet - `0x0006` ## License diff --git a/contracts/.openzeppelin/bsc-testnet.json b/contracts/.openzeppelin/bsc-testnet.json new file mode 100644 index 00000000..fbd5f2dc --- /dev/null +++ b/contracts/.openzeppelin/bsc-testnet.json @@ -0,0 +1,995 @@ +{ + "manifestVersion": "3.2", + "admin": { + "address": "0x582Ca0f4482166A01b19FE1D0abeF0b9b236228f", + "txHash": "0xf68ec843ab2e4d66829d472ffb8a528d82019ea16767126eb842444ee6b668fc" + }, + "proxies": [ + { + "address": "0xB3311B3CfF2752cd26B9964D3d7CB0FeB0b0d215", + "txHash": "0x9bd8a157b93520cdf47d802c6450c409a43339526958abd8d9584bb1f490ad0b", + "kind": "transparent" + }, + { + "address": "0xFd3b9e9C60e9E7694751CfA8B10dE5850bC78C2F", + "txHash": "0x666c2a3c7cab139579fa4a74ef22673eeec98341eac75a9842800ac56af8bc6a", + "kind": "transparent" + }, + { + "address": "0xAfA952790492DDeB474012cEA12ba34B788ab39F", + "txHash": "0x04d166d850dcb874852f23e633109ae52276bbc7092449ccef15996a99c6cbd6", + "kind": "transparent" + }, + { + "address": "0xDaf3C3632327343f7df0Baad2dc9144fa4e1001F", + "txHash": "0x9483b71fbd9ad4c875d1a7fce45537c2e7272251d46303513bea80f43db39a26", + "kind": "transparent" + }, + { + "address": "0x3C443B9f0c8ed3A3270De7A4815487BA3223C2Fa", + "txHash": "0xa61610ef300dba8074ba84ecaeb13f82bc3c53a649d4a8a26e7cd0f623f37e1f", + "kind": "transparent" + }, + { + "address": "0x4594A8DA79F6bb2C75E548F185B5BDbE5fEdb759", + "txHash": "0x1879c3ecc9ba05525db00b0ee4e0719efb5273bba4f1f9720b65e354f1d65df2", + "kind": "transparent" + }, + { + "address": "0xF35fe79104e157703dbCC3Baa72a81A99591744D", + "txHash": "0xa1a897f79c822f53c8cb349430639484c886419fe085ba704651572257c4d750", + "kind": "transparent" + }, + { + "address": "0x4371Cc5C503e1285875016C9B65c7278f1EDFc56", + "txHash": "0xee61fba5e88c7ac420f068561cb0466023c6a4f6be9a900f6a10ef303f44a490", + "kind": "transparent" + }, + { + "address": "0x90b8542d7288a83EC887229A7C727989C3b56209", + "txHash": "0x3a4db96c2e991f9c8d00404238f93147492c7f5ac91f007ed01c53c93492e7ff", + "kind": "transparent" + }, + { + "address": "0x5Cc4029f0dDae1FFE527385459D06d81DFD50EEe", + "txHash": "0x087165f7d7774ff691163cef0564abc2026c5eeb7685fae2cca519414e5155f7", + "kind": "transparent" + }, + { + "address": "0x6c46c245918d4fcfC13F0a9e2e49d4E2739A353a", + "txHash": "0xc37a33589c23c5d1838c0955188efbb65be668190013b72cbfb63c4dd1c3e30c", + "kind": "transparent" + }, + { + "address": "0xA4a7517F62216BD42e42a67dF09C25adc72A5897", + "txHash": "0x63cd5af366a6fbd61564b0b408ec51b76ef02896ddb8b265ebe1158c14a2d323", + "kind": "transparent" + }, + { + "address": "0x51929da151eC2C5a5881C750E5b9941eACC46c1d", + "txHash": "0x8dfbd565c5a25391ce1708e84caec4cd17ef1961d43860e14914c8b662eabd80", + "kind": "transparent" + }, + { + "address": "0xee5e23492bf49C1F4CF0676b3bF49d78A6dD61c5", + "txHash": "0xff272155a5350b9d76aca9e72b020bead769115a2cd4cc7ed03f80b2278ae3b6", + "kind": "transparent" + } + ], + "impls": { + "4353fbe787c13443291bba3d18e906853909285ba948d10f4d95994940b68c97": { + "address": "0x79E25CD672032F3a7A315312d54F28ce3aBE3847", + "txHash": "0x5d6de329f55dd3ea66e79bd3b38eb66a953f691c3eb2773bb9b2ec6fe542362f", + "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": "0xe3c36DEB0Ce1444fc8c847d6865217A6B2133765", + "txHash": "0xa77409f906309a0e127e2a0bdbbfd3bca44ab21f7254ab98da37f287f8ac7c71", + "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": "0x73B98ad14694f879D89e8D73D90583AB0D0f804d", + "txHash": "0x93c7c09f23e15f6cd5d93dba7a28a1bdfee463a7dec36b63660844412841ad9b", + "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": "0x6BEb40d8fF2D9c9F4c434825F2c84B40Cbc4a6A4", + "txHash": "0xd32e09820015f246c77b6350b87418bdec811bacdfc04c3873d4218c03e5222d", + "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": "0xE235826514945186227918325D3E5b5f873861A6", + "txHash": "0xdedf80e9bba16c34fea212c2ac682d27a6b7ff43381166bc7abd5f689c0c52b7", + "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": {} + } + }, + "cc3bd5ce0f70ee7ad8fd47bda375d640dc7035da4746a94f0ccf30df96358f53": { + "address": "0x374B686137eC0DB442a8d833451f8C12cD4B5De4", + "txHash": "0xb481336a8453b60a636385c103781e4c453b17f45dba1183a32e77af2ea7a2a3", + "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": "AttestationReader", + "src": "src/AttestationReader.sol:17" + }, + { + "label": "easRegistry", + "offset": 0, + "slot": "102", + "type": "t_contract(IEAS)7764", + "contract": "AttestationReader", + "src": "src/AttestationReader.sol:18" + } + ], + "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_contract(IEAS)7764": { + "label": "contract IEAS", + "numberOfBytes": "20" + }, + "t_contract(IRouter)7813": { + "label": "contract IRouter", + "numberOfBytes": "20" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": {} + } + } + } +} diff --git a/contracts/.openzeppelin/bsc.json b/contracts/.openzeppelin/bsc.json new file mode 100644 index 00000000..9ec3a297 --- /dev/null +++ b/contracts/.openzeppelin/bsc.json @@ -0,0 +1,849 @@ +{ + "manifestVersion": "3.2", + "admin": { + "address": "0x38Cb61dF213DA0Cf4C77c165De198b24Aa57da74", + "txHash": "0x7ab8f9b066de144d529249bd30d29c3ee724c190db32d0a2c7d5d92a54b804b4" + }, + "proxies": [ + { + "address": "0x7a5C1fAC7fF9908a8b2ED479e060619213116A47", + "txHash": "0x360087a37fa84d4eabe54a93766881789bed4536d7a44e2d05fc032e51b3d503", + "kind": "transparent" + }, + { + "address": "0x3D8A3a8FF21bD295dbBD5319C399e2C4FD27F261", + "txHash": "0x289e0b206fe780331e16052fa2be0e048cf0880e0846895f378ff31f27d0ef06", + "kind": "transparent" + }, + { + "address": "0xD70a06f7A0f197D55Fa841fcF668782b2B8266eB", + "txHash": "0xc8c30f1b5cd691434ce60bff426dbc1870c36f7d73cf2a7fd892a062e60e44f0", + "kind": "transparent" + }, + { + "address": "0xb2553A7E443DFA7C9dEc01D327FdDff1A5eF59b0", + "txHash": "0x444e6e717789f8d32737f030eaf216ff65c7ea24531e211745996d5400d6517d", + "kind": "transparent" + }, + { + "address": "0x29205492435E1b06B20CeAeEC4AC41bcF595DFFd", + "txHash": "0x7058bc1ed379face51393533e68f846c960a1f967cee2fa13497c87f575c4db0", + "kind": "transparent" + } + ], + "impls": { + "4353fbe787c13443291bba3d18e906853909285ba948d10f4d95994940b68c97": { + "address": "0xF4C9BDF63e79fc5415226F9652853c7a9A336e2d", + "txHash": "0x48e48005e22a3e32afe2f65648e913455e28885e12ef70c950cf76025fba97bd", + "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": "0x93A7103314cf4fB0A7B05c4cF176E7C5d3Bdf562", + "txHash": "0x4747b74a7265a57fdb63654c8927a09f65365407e68668c69ac44975c4dd76b0", + "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": "0x8d7faF0337770fa30bEaE83D5b7ed3D081963987", + "txHash": "0x347dd36f073585d76e896980be5871f4f4e830b2a6eb8d5b20de1ddcb0773fb1", + "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": "0x2878bdc6A7615600e9b6Aa04f7802267891FFAE5", + "txHash": "0xa80b88cb8c843f23d1a55952fcac789d9626af0fa100d59906b2a498a7da0054", + "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": "0xD2B60076a83C6f6fad2506aF51b297a8725e8E0b", + "txHash": "0xdf50fee2c52b4f714aeca415fdaa64a458b595171ec8bda993b1de765f145884", + "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.bsc b/contracts/env/.env.bsc new file mode 100644 index 00000000..dcb61b6d --- /dev/null +++ b/contracts/env/.env.bsc @@ -0,0 +1,16 @@ +# Config +INFURA_KEY= + +PRIVATE_KEY_LINEA_MAINNET=0000000000000000000000000000000000000000000000000000000000000001 + +LINEASCAN_API_KEY= + +# Contracts +ROUTER_ADDRESS=0x7a5C1fAC7fF9908a8b2ED479e060619213116A47 +PORTAL_REGISTRY_ADDRESS=0xb2553A7E443DFA7C9dEc01D327FdDff1A5eF59b0 +SCHEMA_REGISTRY_ADDRESS=0x29205492435E1b06B20CeAeEC4AC41bcF595DFFd +MODULE_REGISTRY_ADDRESS=0xD70a06f7A0f197D55Fa841fcF668782b2B8266eB +ATTESTATION_REGISTRY_ADDRESS=0x3D8A3a8FF21bD295dbBD5319C399e2C4FD27F261 +ATTESTATION_READER_ADDRESS= +EAS_REGISTRY_ADDRESS= + diff --git a/contracts/env/.env.bsc-testnet b/contracts/env/.env.bsc-testnet new file mode 100644 index 00000000..48d40e1e --- /dev/null +++ b/contracts/env/.env.bsc-testnet @@ -0,0 +1,16 @@ +# Config +INFURA_KEY= + +PRIVATE_KEY_LINEA_TESTNET=0000000000000000000000000000000000000000000000000000000000000001 + +LINEASCAN_API_KEY= + +# Contracts +ROUTER_ADDRESS=0x90b8542d7288a83EC887229A7C727989C3b56209 +PORTAL_REGISTRY_ADDRESS=0xA4a7517F62216BD42e42a67dF09C25adc72A5897 +SCHEMA_REGISTRY_ADDRESS=0x51929da151eC2C5a5881C750E5b9941eACC46c1d +MODULE_REGISTRY_ADDRESS=0x6c46c245918d4fcfC13F0a9e2e49d4E2739A353a +ATTESTATION_REGISTRY_ADDRESS=0x5Cc4029f0dDae1FFE527385459D06d81DFD50EEe +ATTESTATION_READER_ADDRESS= +EAS_REGISTRY_ADDRESS= + diff --git a/contracts/hardhat.config.ts b/contracts/hardhat.config.ts index eb751d49..40b4dc18 100644 --- a/contracts/hardhat.config.ts +++ b/contracts/hardhat.config.ts @@ -42,6 +42,14 @@ const config: HardhatUserConfig = { url: `https://mainnet.base.org`, accounts: process.env.PRIVATE_KEY_LINEA_MAINNET !== undefined ? [process.env.PRIVATE_KEY_LINEA_MAINNET] : [], }, + "bsc-testnet": { + url: `https://data-seed-prebsc-1-s1.binance.org:8545`, + accounts: process.env.PRIVATE_KEY_LINEA_TESTNET !== undefined ? [process.env.PRIVATE_KEY_LINEA_TESTNET] : [], + }, + bsc: { + url: `https://rpc.ankr.com/bsc`, + accounts: process.env.PRIVATE_KEY_LINEA_MAINNET !== undefined ? [process.env.PRIVATE_KEY_LINEA_MAINNET] : [], + }, "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] : [], @@ -70,6 +78,8 @@ const config: HardhatUserConfig = { "arbitrum-nova": process.env.ARBISCAN_NOVA_API_KEY ?? "", "base-sepolia": process.env.BASESCAN_API_KEY ?? "", base: process.env.BASESCAN_API_KEY ?? "", + "bsc-testnet": process.env.BSCSCAN_API_KEY ?? "", + bsc: process.env.BSCSCAN_API_KEY ?? "", "linea-goerli": process.env.LINEASCAN_API_KEY ?? "", "linea-sepolia": process.env.LINEASCAN_API_KEY ?? "", linea: process.env.LINEASCAN_API_KEY ?? "", @@ -124,6 +134,22 @@ const config: HardhatUserConfig = { browserURL: "https://basescan.org", }, }, + { + network: "bsc-testnet", + chainId: 97, + urls: { + apiURL: "https://api-testnet.bscscan.com/api", + browserURL: "https://testnet.bscscan.com", + }, + }, + { + network: "bsc", + chainId: 56, + urls: { + apiURL: "https://api.bscscan.com/api", + browserURL: "https://bscscan.com", + }, + }, { network: "linea-goerli", chainId: 59140, diff --git a/contracts/script/utils.ts b/contracts/script/utils.ts index fb7180f4..b2669bf6 100644 --- a/contracts/script/utils.ts +++ b/contracts/script/utils.ts @@ -18,6 +18,10 @@ export const getChainPrefix = (chainId: bigint): `0x${string}` => { return "0x0005000000000000000000000000000000000000000000000000000000000000"; case 8453n: // Base mainnet return "0x0005000000000000000000000000000000000000000000000000000000000000"; + case 97n: // BSC testnet + return "0x0006000000000000000000000000000000000000000000000000000000000000"; + case 56n: // BSC mainnet + return "0x0006000000000000000000000000000000000000000000000000000000000000"; default: throw new Error("Unknown network"); } diff --git a/explorer/package.json b/explorer/package.json index 23fa4ad8..749965cb 100644 --- a/explorer/package.json +++ b/explorer/package.json @@ -26,7 +26,7 @@ "dependencies": { "@radix-ui/react-dropdown-menu": "^2.0.6", "@tanstack/react-table": "^8.10.7", - "@verax-attestation-registry/verax-sdk": "1.8.0", + "@verax-attestation-registry/verax-sdk": "1.9.0", "@wagmi/core": "^1.4.7", "abitype": "^0.10.3", "class-variance-authority": "^0.7.0", diff --git a/explorer/src/assets/issuers/Hapi_logo_square.svg b/explorer/src/assets/issuers/Hapi_logo_square.svg new file mode 100644 index 00000000..18576cb3 --- /dev/null +++ b/explorer/src/assets/issuers/Hapi_logo_square.svg @@ -0,0 +1,47 @@ + + + + + + + + + + + + + diff --git a/explorer/src/assets/networks/arbitrum-goerli.svg b/explorer/src/assets/networks/arbitrum-goerli.svg deleted file mode 100644 index ea09a8cc..00000000 --- a/explorer/src/assets/networks/arbitrum-goerli.svg +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - diff --git a/explorer/src/assets/networks/base-mainnet.svg b/explorer/src/assets/networks/base-mainnet.svg new file mode 100644 index 00000000..c0733b2b --- /dev/null +++ b/explorer/src/assets/networks/base-mainnet.svg @@ -0,0 +1,7 @@ + + + + + diff --git a/explorer/src/assets/networks/base.svg b/explorer/src/assets/networks/base.svg deleted file mode 100644 index b12932f8..00000000 --- a/explorer/src/assets/networks/base.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - diff --git a/explorer/src/assets/networks/bsc-dark.svg b/explorer/src/assets/networks/bsc-dark.svg new file mode 100644 index 00000000..d9e85347 --- /dev/null +++ b/explorer/src/assets/networks/bsc-dark.svg @@ -0,0 +1,6 @@ + + + diff --git a/explorer/src/assets/networks/bsc-mainnet.svg b/explorer/src/assets/networks/bsc-mainnet.svg new file mode 100644 index 00000000..7726719a --- /dev/null +++ b/explorer/src/assets/networks/bsc-mainnet.svg @@ -0,0 +1,6 @@ + + + diff --git a/explorer/src/assets/networks/bsc-testnet.svg b/explorer/src/assets/networks/bsc-testnet.svg new file mode 100644 index 00000000..ba7b2d88 --- /dev/null +++ b/explorer/src/assets/networks/bsc-testnet.svg @@ -0,0 +1,6 @@ + + + diff --git a/explorer/src/config/index.tsx b/explorer/src/config/index.tsx index 27d51e3c..79a2a453 100644 --- a/explorer/src/config/index.tsx +++ b/explorer/src/config/index.tsx @@ -1,7 +1,17 @@ import { VeraxSdk } from "@verax-attestation-registry/verax-sdk"; import { getDefaultConfig } from "connectkit"; import { Chain, createConfig } from "wagmi"; -import { arbitrum, arbitrumNova, arbitrumSepolia, base, baseSepolia, linea, lineaTestnet } from "wagmi/chains"; +import { + arbitrum, + arbitrumNova, + arbitrumSepolia, + base, + baseSepolia, + bsc, + bscTestnet, + linea, + lineaTestnet, +} from "wagmi/chains"; import veraxColoredIcon from "@/assets/logo/verax-colored-icon.svg"; import ArbitrumIconDark from "@/assets/networks/arbitrum-dark.svg?react"; @@ -10,8 +20,11 @@ import ArbitrumNovaIcon from "@/assets/networks/arbitrum-nova.svg?react"; import ArbitrumSepoliaIcon from "@/assets/networks/arbitrum-sepolia.svg?react"; import ArbitrumIcon from "@/assets/networks/arbitrum.svg?react"; import BaseIconDark from "@/assets/networks/base-dark.svg?react"; +import BaseMainnetIcon from "@/assets/networks/base-mainnet.svg?react"; import BaseSepoliaIcon from "@/assets/networks/base-sepolia.svg?react"; -import BaseIcon from "@/assets/networks/base.svg?react"; +import BscMainnetIconDark from "@/assets/networks/bsc-dark.svg?react"; +import BscMainnetIcon from "@/assets/networks/bsc-mainnet.svg?react"; +import BscTestnetIcon from "@/assets/networks/bsc-testnet.svg?react"; import LineaMainnetIconDark from "@/assets/networks/linea-mainnet-dark.svg?react"; import LineaMainnetIcon from "@/assets/networks/linea-mainnet.svg?react"; import LineaSepoliaIcon from "@/assets/networks/linea-sepolia.svg?react"; @@ -98,7 +111,7 @@ const chains: INetwork[] = [ name: "Base Mainnet", chain: base, veraxEnv: VeraxSdk.DEFAULT_BASE_FRONTEND, - img: , + img: , imgDark: , network: "base-mainnet", }, @@ -109,6 +122,21 @@ const chains: INetwork[] = [ img: , network: "base-sepolia", }, + { + name: "BSC Mainnet", + chain: bsc, + veraxEnv: VeraxSdk.DEFAULT_BSC_FRONTEND, + img: , + imgDark: , + network: "bsc-mainnet", + }, + { + name: "BSC Testnet", + chain: bscTestnet, + veraxEnv: VeraxSdk.DEFAULT_BSC_TESTNET_FRONTEND, + img: , + network: "bsc-testnet", + }, ]; const config = createConfig( diff --git a/explorer/src/pages/Home/data.tsx b/explorer/src/pages/Home/data.tsx index 51e3df90..c84a1997 100644 --- a/explorer/src/pages/Home/data.tsx +++ b/explorer/src/pages/Home/data.tsx @@ -3,6 +3,7 @@ import Aspecta from "@/assets/issuers/aspecta.svg?react"; import Automata from "@/assets/issuers/automata.svg?react"; import Clique from "@/assets/issuers/clique.svg?react"; import Gitcoin from "@/assets/issuers/gitcoin.svg?react"; +import Hapi from "@/assets/issuers/Hapi_logo_square.svg?react"; import Nomis from "@/assets/issuers/nomis.svg?react"; import OpenId3 from "@/assets/issuers/openid3.svg?react"; import Orange from "@/assets/issuers/orange.svg?react"; @@ -161,4 +162,14 @@ export const issuersData: IIssuer[] = [ CTATitle: "Go To Holonym", address: "0xdca2e9ae8423d7b0f94d7f9fc09e698a45f3c851", }, + { + name: "Hapi", + logo: Hapi, + keywords: ["Proof of Personhood", "Trust Score", "Security"], + description: + "HAPI ID is a digital identification of a user’s on-chain activity, created to simplify the interpretation of user’s action on the blockchain. Created for users, protocols, DApps, and businesses, HAPI ID serves as a one-stop unique solution against Sybils and for Users!", + CTALink: "https://hapi.one", + CTATitle: "Go To Hapi", + address: "0x0000000000000000000000000000000000000000", + }, ]; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 834b66f1..026828c2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -90,8 +90,8 @@ importers: specifier: ^8.10.7 version: 8.17.3(react-dom@18.3.1)(react@18.3.1) '@verax-attestation-registry/verax-sdk': - specifier: 1.8.0 - version: 1.8.0(@envelop/core@5.0.1)(@graphql-mesh/types@0.95.8)(@graphql-tools/delegate@10.0.10)(@graphql-tools/merge@9.0.4)(@graphql-tools/utils@10.2.0)(@graphql-tools/wrap@10.0.5)(@types/node@20.12.12)(@types/react@18.3.2)(graphql-tag@2.12.6)(graphql-yoga@5.3.1)(react-dom@18.3.1)(react@18.3.1)(tslib@2.6.2)(typescript@5.2.2) + specifier: 1.9.0 + version: 1.9.0(@envelop/core@5.0.1)(@graphql-mesh/types@0.95.8)(@graphql-tools/delegate@10.0.10)(@graphql-tools/merge@9.0.4)(@graphql-tools/utils@10.2.0)(@graphql-tools/wrap@10.0.5)(@types/node@20.12.12)(@types/react@18.3.2)(graphql-tag@2.12.6)(graphql-yoga@5.3.1)(react-dom@18.3.1)(react@18.3.1)(tslib@2.6.2)(typescript@5.2.2) '@wagmi/core': specifier: ^1.4.7 version: 1.4.13(@types/react@18.3.2)(react@18.3.1)(typescript@5.2.2)(viem@1.18.9) @@ -3559,7 +3559,7 @@ packages: tsconfig-paths: 4.2.0 tslib: 2.6.2 typescript: 5.4.5 - uWebSockets.js: github.com/uNetworking/uWebSockets.js/1977b5039938ad863d42fc4958d48c17e5a1fa06 + uWebSockets.js: github.com/uNetworking/uWebSockets.js/8fa05571bf6ea95be8966ad313d9d39453e381ae yargs: 17.7.2 optionalDependencies: node-libcurl: 4.0.0 @@ -9879,8 +9879,8 @@ packages: resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} dev: true - /@verax-attestation-registry/verax-sdk@1.8.0(@envelop/core@5.0.1)(@graphql-mesh/types@0.95.8)(@graphql-tools/delegate@10.0.10)(@graphql-tools/merge@9.0.4)(@graphql-tools/utils@10.2.0)(@graphql-tools/wrap@10.0.5)(@types/node@20.12.12)(@types/react@18.3.2)(graphql-tag@2.12.6)(graphql-yoga@5.3.1)(react-dom@18.3.1)(react@18.3.1)(tslib@2.6.2)(typescript@5.2.2): - resolution: {integrity: sha512-VGDnpGTNIt9IXBjmPjltegITXXTG72FWASA9Thebyk3SYHpm3rYuBCID7yd3QKv3pKXq+0nBRYcquFyyU1QSwA==} + /@verax-attestation-registry/verax-sdk@1.9.0(@envelop/core@5.0.1)(@graphql-mesh/types@0.95.8)(@graphql-tools/delegate@10.0.10)(@graphql-tools/merge@9.0.4)(@graphql-tools/utils@10.2.0)(@graphql-tools/wrap@10.0.5)(@types/node@20.12.12)(@types/react@18.3.2)(graphql-tag@2.12.6)(graphql-yoga@5.3.1)(react-dom@18.3.1)(react@18.3.1)(tslib@2.6.2)(typescript@5.2.2): + resolution: {integrity: sha512-w1vIY2PlnNNZwFul0Feyk/EENEkp4vHGnf9G9Zhdi1PHUSSTgoTubmi5nKSys9t88nKUqSsBUCqMErPewfwpzw==} dependencies: '@graphprotocol/client-cli': 3.0.3(@envelop/core@5.0.1)(@graphql-mesh/cross-helpers@0.4.2)(@graphql-mesh/store@0.95.8)(@graphql-mesh/types@0.95.8)(@graphql-mesh/utils@0.95.8)(@graphql-tools/delegate@10.0.10)(@graphql-tools/merge@9.0.4)(@graphql-tools/utils@10.2.0)(@graphql-tools/wrap@10.0.5)(@types/node@20.12.12)(@types/react@18.3.2)(graphql-tag@2.12.6)(graphql-yoga@5.3.1)(graphql@16.8.1)(react-dom@18.3.1)(react@18.3.1) '@graphql-mesh/cache-localforage': 0.95.8(@graphql-mesh/types@0.95.8)(@graphql-mesh/utils@0.95.8)(graphql@16.8.1)(tslib@2.6.2) @@ -26461,8 +26461,8 @@ packages: use-sync-external-store: 1.2.0(react@18.3.1) dev: false - github.com/uNetworking/uWebSockets.js/1977b5039938ad863d42fc4958d48c17e5a1fa06: - resolution: {tarball: https://codeload.github.com/uNetworking/uWebSockets.js/tar.gz/1977b5039938ad863d42fc4958d48c17e5a1fa06} + github.com/uNetworking/uWebSockets.js/8fa05571bf6ea95be8966ad313d9d39453e381ae: + resolution: {tarball: https://codeload.github.com/uNetworking/uWebSockets.js/tar.gz/8fa05571bf6ea95be8966ad313d9d39453e381ae} name: uWebSockets.js - version: 20.43.0 + version: 20.44.0 dev: false diff --git a/sdk/package.json b/sdk/package.json index 9c038787..bdea5e05 100644 --- a/sdk/package.json +++ b/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@verax-attestation-registry/verax-sdk", - "version": "1.8.2", + "version": "1.9.1", "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 4e36a2eb..7b7b96e2 100644 --- a/sdk/src/VeraxSdk.ts +++ b/sdk/src/VeraxSdk.ts @@ -4,6 +4,8 @@ import { arbitrumSepolia, base, baseSepolia, + bsc, + bscTestnet, linea, lineaSepolia, lineaTestnet, @@ -145,6 +147,36 @@ export class VeraxSdk { mode: SDKMode.FRONTEND, }; + static DEFAULT_BSC_TESTNET: Conf = { + chain: bscTestnet, + mode: SDKMode.BACKEND, + subgraphUrl: "https://api.studio.thegraph.com/query/67521/verax-v1-bsc-testnet/v0.0.1", + portalRegistryAddress: "0xA4a7517F62216BD42e42a67dF09C25adc72A5897", + moduleRegistryAddress: "0x6c46c245918d4fcfC13F0a9e2e49d4E2739A353a", + schemaRegistryAddress: "0x51929da151eC2C5a5881C750E5b9941eACC46c1d", + attestationRegistryAddress: "0x5Cc4029f0dDae1FFE527385459D06d81DFD50EEe", + }; + + static DEFAULT_BSC_TESTNET_FRONTEND: Conf = { + ...VeraxSdk.DEFAULT_BSC_TESTNET, + mode: SDKMode.FRONTEND, + }; + + static DEFAULT_BSC: Conf = { + chain: bsc, + mode: SDKMode.BACKEND, + subgraphUrl: "https://api.studio.thegraph.com/query/67521/verax-v1-bsc/v0.0.1", + portalRegistryAddress: "0xb2553A7E443DFA7C9dEc01D327FdDff1A5eF59b0", + moduleRegistryAddress: "0xD70a06f7A0f197D55Fa841fcF668782b2B8266eB", + schemaRegistryAddress: "0x29205492435E1b06B20CeAeEC4AC41bcF595DFFd", + attestationRegistryAddress: "0x3D8A3a8FF21bD295dbBD5319C399e2C4FD27F261", + }; + + static DEFAULT_BSC_FRONTEND: Conf = { + ...VeraxSdk.DEFAULT_BSC, + mode: SDKMode.FRONTEND, + }; + private readonly web3Client: PublicClient; private readonly walletClient: WalletClient | undefined; diff --git a/subgraph/networks.json b/subgraph/networks.json index 1a53db93..6b7101e1 100644 --- a/subgraph/networks.json +++ b/subgraph/networks.json @@ -160,5 +160,41 @@ "address": "0x8081dCd745f160c148Eb5be510F78628A0951c31", "startBlock": 13666866 } + }, + "bsc-testnet": { + "AttestationRegistry": { + "address": "0x5Cc4029f0dDae1FFE527385459D06d81DFD50EEe", + "startBlock": 41312659 + }, + "ModuleRegistry": { + "address": "0x6c46c245918d4fcfC13F0a9e2e49d4E2739A353a", + "startBlock": 41312659 + }, + "PortalRegistry": { + "address": "0xA4a7517F62216BD42e42a67dF09C25adc72A5897", + "startBlock": 41312659 + }, + "SchemaRegistry": { + "address": "0x51929da151eC2C5a5881C750E5b9941eACC46c1d", + "startBlock": 41312659 + } + }, + "bsc": { + "AttestationRegistry": { + "address": "0x3D8A3a8FF21bD295dbBD5319C399e2C4FD27F261", + "startBlock": 39759713 + }, + "ModuleRegistry": { + "address": "0xD70a06f7A0f197D55Fa841fcF668782b2B8266eB", + "startBlock": 39759713 + }, + "PortalRegistry": { + "address": "0xb2553A7E443DFA7C9dEc01D327FdDff1A5eF59b0", + "startBlock": 39759713 + }, + "SchemaRegistry": { + "address": "0x29205492435E1b06B20CeAeEC4AC41bcF595DFFd", + "startBlock": 39759713 + } } } diff --git a/subgraph/package.json b/subgraph/package.json index 69747e01..fa17b9d0 100644 --- a/subgraph/package.json +++ b/subgraph/package.json @@ -25,6 +25,10 @@ "build:base-mainnet:v2": "pnpm run codegen:v2 && graph build subgraph.base-mainnet.yaml", "build:base-sepolia:v1": "pnpm run codegen:v1 && graph build subgraph-v1.base-sepolia.yaml", "build:base-sepolia:v2": "pnpm run codegen:v2 && graph build subgraph.base-sepolia.yaml", + "build:bsc-testnet:v1": "pnpm run codegen:v1 && graph build subgraph-v1.bsc-testnet.yaml", + "build:bsc-testnet:v2": "pnpm run codegen:v2 && graph build subgraph.bsc-testnet.yaml", + "build:bsc-mainnet:v1": "pnpm run codegen:v1 && graph build subgraph-v1.bsc-mainnet.yaml", + "build:bsc-mainnet:v2": "pnpm run codegen:v2 && graph build subgraph.bsc-mainnet.yaml", "build:linea-mainnet:v1": "pnpm run codegen:v1 && graph build subgraph-v1.linea-mainnet.yaml", "build:linea-mainnet:v2": "pnpm run codegen:v2 && graph build subgraph.linea-mainnet.yaml", "build:linea-sepolia:v1": "pnpm run codegen:v1 && graph build subgraph-v1.linea-sepolia.yaml", @@ -45,6 +49,10 @@ "deploy:linea-mainnet:v2": "graph deploy --version-label v0.0.1 --studio verax-v2-linea subgraph.linea-mainnet.yaml", "deploy:linea-sepolia:v1": "graph deploy --version-label v0.0.1 --studio verax-v1-linea-sepolia subgraph-v1.linea-sepolia.yaml", "deploy:linea-sepolia:v2": "graph deploy --version-label v0.0.1 --studio verax-v2-linea-sepolia subgraph.linea-sepolia.yaml", + "deploy:bsc-mainnet:v1": "graph deploy --version-label v0.0.1 --studio verax-v1-bsc subgraph-v1.bsc-mainnet.yaml", + "deploy:bsc-mainnet:v2": "graph deploy --version-label v0.0.1 --studio verax-v2-bsc subgraph.bsc-mainnet.yaml", + "deploy:bsc-testnet:v1": "graph deploy --version-label v0.0.1 --studio verax-v1-bsc-testnet subgraph-v1.bsc-testnet.yaml", + "deploy:bsc-testnet:v2": "graph deploy --version-label v0.0.1 --studio verax-v2-bsc-testnet subgraph.bsc-testnet.yaml", "test": "cp schema-v2.graphql schema.graphql && cp subgraph.linea-sepolia.yaml subgraph.yaml && pnpm run codegen:v2 && graph test && rm -Rf schema.graphql", "test:coverage": "graph test -c", "test:docker": "graph test -d" diff --git a/subgraph/subgraph-v1.bsc-mainnet.yaml b/subgraph/subgraph-v1.bsc-mainnet.yaml new file mode 100644 index 00000000..b6939524 --- /dev/null +++ b/subgraph/subgraph-v1.bsc-mainnet.yaml @@ -0,0 +1,96 @@ +specVersion: 0.0.5 +schema: + file: ./schema-v1.graphql +dataSources: + - kind: ethereum + name: AttestationRegistry + network: bsc + source: + abi: AttestationRegistry + address: "0x3D8A3a8FF21bD295dbBD5319C399e2C4FD27F261" + startBlock: 39759713 + 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-v1.ts + - kind: ethereum + name: ModuleRegistry + network: bsc + source: + abi: ModuleRegistry + address: "0xD70a06f7A0f197D55Fa841fcF668782b2B8266eB" + startBlock: 39759713 + 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-v1.ts + - kind: ethereum + name: PortalRegistry + network: bsc + source: + abi: PortalRegistry + address: "0xb2553A7E443DFA7C9dEc01D327FdDff1A5eF59b0" + startBlock: 39759713 + 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: IssuerAdded(address) + handler: handleIssuerAdded + - event: IssuerRemoved(address) + handler: handleIssuerRemoved + file: ./src/portal-registry-v1.ts + - kind: ethereum + name: SchemaRegistry + network: bsc + source: + abi: SchemaRegistry + address: "0x29205492435E1b06B20CeAeEC4AC41bcF595DFFd" + startBlock: 39759713 + mapping: + kind: ethereum/events + apiVersion: 0.0.7 + language: wasm/assemblyscript + entities: + - Schema + 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-v1.ts diff --git a/subgraph/subgraph-v1.bsc-testnet.yaml b/subgraph/subgraph-v1.bsc-testnet.yaml new file mode 100644 index 00000000..0ed32e65 --- /dev/null +++ b/subgraph/subgraph-v1.bsc-testnet.yaml @@ -0,0 +1,96 @@ +specVersion: 0.0.5 +schema: + file: ./schema-v1.graphql +dataSources: + - kind: ethereum + name: AttestationRegistry + network: chapel + source: + abi: AttestationRegistry + address: "0x5Cc4029f0dDae1FFE527385459D06d81DFD50EEe" + startBlock: 39759713 + 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-v1.ts + - kind: ethereum + name: ModuleRegistry + network: chapel + source: + abi: ModuleRegistry + address: "0x6c46c245918d4fcfC13F0a9e2e49d4E2739A353a" + startBlock: 39759713 + 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-v1.ts + - kind: ethereum + name: PortalRegistry + network: chapel + source: + abi: PortalRegistry + address: "0xA4a7517F62216BD42e42a67dF09C25adc72A5897" + startBlock: 39759713 + 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: IssuerAdded(address) + handler: handleIssuerAdded + - event: IssuerRemoved(address) + handler: handleIssuerRemoved + file: ./src/portal-registry-v1.ts + - kind: ethereum + name: SchemaRegistry + network: chapel + source: + abi: SchemaRegistry + address: "0x51929da151eC2C5a5881C750E5b9941eACC46c1d" + startBlock: 39759713 + mapping: + kind: ethereum/events + apiVersion: 0.0.7 + language: wasm/assemblyscript + entities: + - Schema + 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-v1.ts diff --git a/subgraph/subgraph.bsc-mainnet.yaml b/subgraph/subgraph.bsc-mainnet.yaml new file mode 100644 index 00000000..4f1b16ab --- /dev/null +++ b/subgraph/subgraph.bsc-mainnet.yaml @@ -0,0 +1,96 @@ +specVersion: 0.0.5 +schema: + file: ./schema-v2.graphql +dataSources: + - kind: ethereum + name: AttestationRegistry + network: bsc + source: + abi: AttestationRegistry + address: "0x3D8A3a8FF21bD295dbBD5319C399e2C4FD27F261" + startBlock: 39759713 + 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: bsc + source: + abi: ModuleRegistry + address: "0xD70a06f7A0f197D55Fa841fcF668782b2B8266eB" + startBlock: 39759713 + 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: bsc + source: + abi: PortalRegistry + address: "0xb2553A7E443DFA7C9dEc01D327FdDff1A5eF59b0" + startBlock: 39759713 + 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: IssuerAdded(address) + handler: handleIssuerAdded + - event: IssuerRemoved(address) + handler: handleIssuerRemoved + file: ./src/portal-registry.ts + - kind: ethereum + name: SchemaRegistry + network: bsc + source: + abi: SchemaRegistry + address: "0x29205492435E1b06B20CeAeEC4AC41bcF595DFFd" + startBlock: 39759713 + mapping: + kind: ethereum/events + apiVersion: 0.0.7 + language: wasm/assemblyscript + entities: + - Schema + 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 diff --git a/subgraph/subgraph.bsc-testnet.yaml b/subgraph/subgraph.bsc-testnet.yaml new file mode 100644 index 00000000..6879317a --- /dev/null +++ b/subgraph/subgraph.bsc-testnet.yaml @@ -0,0 +1,96 @@ +specVersion: 0.0.5 +schema: + file: ./schema-v2.graphql +dataSources: + - kind: ethereum + name: AttestationRegistry + network: chapel + source: + abi: AttestationRegistry + address: "0x5Cc4029f0dDae1FFE527385459D06d81DFD50EEe" + startBlock: 41312659 + 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: chapel + source: + abi: ModuleRegistry + address: "0x6c46c245918d4fcfC13F0a9e2e49d4E2739A353a" + startBlock: 41312659 + 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: chapel + source: + abi: PortalRegistry + address: "0xA4a7517F62216BD42e42a67dF09C25adc72A5897" + startBlock: 41312659 + 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: IssuerAdded(address) + handler: handleIssuerAdded + - event: IssuerRemoved(address) + handler: handleIssuerRemoved + file: ./src/portal-registry.ts + - kind: ethereum + name: SchemaRegistry + network: chapel + source: + abi: SchemaRegistry + address: "0x51929da151eC2C5a5881C750E5b9941eACC46c1d" + startBlock: 41312659 + mapping: + kind: ethereum/events + apiVersion: 0.0.7 + language: wasm/assemblyscript + entities: + - Schema + 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