diff --git a/.openzeppelin/unknown-21001.json b/.openzeppelin/unknown-21001.json new file mode 100644 index 00000000..95fd813d --- /dev/null +++ b/.openzeppelin/unknown-21001.json @@ -0,0 +1,463 @@ +{ + "manifestVersion": "3.2", + "proxies": [ + { + "address": "0x975556428F077dB5877Ea2474D783D6C69233742", + "txHash": "0x26e46dc720bc01d4977197cbe2500322014c43ed301760ed8878dbad8b66b82f", + "kind": "transparent" + }, + { + "address": "0x58485809CfAc875B7E6F54E3fCb5f24614f202e9", + "txHash": "0x3bee1c762e020c1b79622e677e0d643b56ce4886bd589462b11017980ed80d54", + "kind": "transparent" + } + ], + "impls": { + "1a26f02b2d5ea8eba57fe8d8aa7553de55618a72afd54b4ef3e915099ff5e281": { + "address": "0xd6EdDbf024188254C4382a705BA4aCf24639a014", + "txHash": "0x8119f0bbfbe6545cde9215bd84cf535f1d1a6b5c26684d713d917ace55f8dcb0", + "layout": { + "solcVersion": "0.8.20", + "storage": [ + { + "label": "__gap", + "offset": 0, + "slot": "0", + "type": "t_array(t_uint256)651_storage", + "contract": "State", + "src": "contracts/state/State.sol:27" + }, + { + "label": "verifier", + "offset": 0, + "slot": "651", + "type": "t_contract(IStateTransitionVerifier)1639", + "contract": "State", + "src": "contracts/state/State.sol:32" + }, + { + "label": "_stateData", + "offset": 0, + "slot": "652", + "type": "t_struct(Data)6456_storage", + "contract": "State", + "src": "contracts/state/State.sol:37" + }, + { + "label": "_gistData", + "offset": 0, + "slot": "702", + "type": "t_struct(Data)4728_storage", + "contract": "State", + "src": "contracts/state/State.sol:42" + }, + { + "label": "_defaultIdType", + "offset": 0, + "slot": "752", + "type": "t_bytes2", + "contract": "State", + "src": "contracts/state/State.sol:47" + }, + { + "label": "_defaultIdTypeInitialized", + "offset": 2, + "slot": "752", + "type": "t_bool", + "contract": "State", + "src": "contracts/state/State.sol:52" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_struct(InitializableStorage)105_storage": { + "label": "struct Initializable.InitializableStorage", + "members": [ + { + "label": "_initialized", + "type": "t_uint64", + "offset": 0, + "slot": "0" + }, + { + "label": "_initializing", + "type": "t_bool", + "offset": 8, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(Ownable2StepStorage)14_storage": { + "label": "struct Ownable2StepUpgradeable.Ownable2StepStorage", + "members": [ + { + "label": "_pendingOwner", + "type": "t_address", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(OwnableStorage)55_storage": { + "label": "struct OwnableUpgradeable.OwnableStorage", + "members": [ + { + "label": "_owner", + "type": "t_address", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_uint64": { + "label": "uint64", + "numberOfBytes": "8" + }, + "t_array(t_struct(Entry)6437_storage)dyn_storage": { + "label": "struct StateLib.Entry[]", + "numberOfBytes": "32" + }, + "t_array(t_struct(RootEntry)4755_storage)dyn_storage": { + "label": "struct SmtLib.RootEntry[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)45_storage": { + "label": "uint256[45]", + "numberOfBytes": "1440" + }, + "t_array(t_uint256)48_storage": { + "label": "uint256[48]", + "numberOfBytes": "1536" + }, + "t_array(t_uint256)651_storage": { + "label": "uint256[651]", + "numberOfBytes": "20832" + }, + "t_array(t_uint256)dyn_storage": { + "label": "uint256[]", + "numberOfBytes": "32" + }, + "t_bytes2": { + "label": "bytes2", + "numberOfBytes": "2" + }, + "t_contract(IStateTransitionVerifier)1639": { + "label": "contract IStateTransitionVerifier", + "numberOfBytes": "20" + }, + "t_enum(NodeType)4704": { + "label": "enum SmtLib.NodeType", + "members": [ + "EMPTY", + "LEAF", + "MIDDLE" + ], + "numberOfBytes": "1" + }, + "t_mapping(t_uint256,t_array(t_struct(Entry)6437_storage)dyn_storage)": { + "label": "mapping(uint256 => struct StateLib.Entry[])", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_array(t_uint256)dyn_storage)": { + "label": "mapping(uint256 => uint256[])", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_mapping(t_uint256,t_array(t_uint256)dyn_storage))": { + "label": "mapping(uint256 => mapping(uint256 => uint256[]))", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_struct(Node)4782_storage)": { + "label": "mapping(uint256 => struct SmtLib.Node)", + "numberOfBytes": "32" + }, + "t_struct(Data)4728_storage": { + "label": "struct SmtLib.Data", + "members": [ + { + "label": "nodes", + "type": "t_mapping(t_uint256,t_struct(Node)4782_storage)", + "offset": 0, + "slot": "0" + }, + { + "label": "rootEntries", + "type": "t_array(t_struct(RootEntry)4755_storage)dyn_storage", + "offset": 0, + "slot": "1" + }, + { + "label": "rootIndexes", + "type": "t_mapping(t_uint256,t_array(t_uint256)dyn_storage)", + "offset": 0, + "slot": "2" + }, + { + "label": "maxDepth", + "type": "t_uint256", + "offset": 0, + "slot": "3" + }, + { + "label": "initialized", + "type": "t_bool", + "offset": 0, + "slot": "4" + }, + { + "label": "__gap", + "type": "t_array(t_uint256)45_storage", + "offset": 0, + "slot": "5" + } + ], + "numberOfBytes": "1600" + }, + "t_struct(Data)6456_storage": { + "label": "struct StateLib.Data", + "members": [ + { + "label": "stateEntries", + "type": "t_mapping(t_uint256,t_array(t_struct(Entry)6437_storage)dyn_storage)", + "offset": 0, + "slot": "0" + }, + { + "label": "stateIndexes", + "type": "t_mapping(t_uint256,t_mapping(t_uint256,t_array(t_uint256)dyn_storage))", + "offset": 0, + "slot": "1" + }, + { + "label": "__gap", + "type": "t_array(t_uint256)48_storage", + "offset": 0, + "slot": "2" + } + ], + "numberOfBytes": "1600" + }, + "t_struct(Entry)6437_storage": { + "label": "struct StateLib.Entry", + "members": [ + { + "label": "state", + "type": "t_uint256", + "offset": 0, + "slot": "0" + }, + { + "label": "timestamp", + "type": "t_uint256", + "offset": 0, + "slot": "1" + }, + { + "label": "block", + "type": "t_uint256", + "offset": 0, + "slot": "2" + } + ], + "numberOfBytes": "96" + }, + "t_struct(Node)4782_storage": { + "label": "struct SmtLib.Node", + "members": [ + { + "label": "nodeType", + "type": "t_enum(NodeType)4704", + "offset": 0, + "slot": "0" + }, + { + "label": "childLeft", + "type": "t_uint256", + "offset": 0, + "slot": "1" + }, + { + "label": "childRight", + "type": "t_uint256", + "offset": 0, + "slot": "2" + }, + { + "label": "index", + "type": "t_uint256", + "offset": 0, + "slot": "3" + }, + { + "label": "value", + "type": "t_uint256", + "offset": 0, + "slot": "4" + } + ], + "numberOfBytes": "160" + }, + "t_struct(RootEntry)4755_storage": { + "label": "struct SmtLib.RootEntry", + "members": [ + { + "label": "root", + "type": "t_uint256", + "offset": 0, + "slot": "0" + }, + { + "label": "createdAtTimestamp", + "type": "t_uint256", + "offset": 0, + "slot": "1" + }, + { + "label": "createdAtBlock", + "type": "t_uint256", + "offset": 0, + "slot": "2" + } + ], + "numberOfBytes": "96" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + } + }, + "namespaces": { + "erc7201:openzeppelin.storage.Ownable2Step": [ + { + "contract": "Ownable2StepUpgradeable", + "label": "_pendingOwner", + "type": "t_address", + "src": "@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol:23", + "offset": 0, + "slot": "0" + } + ], + "erc7201:openzeppelin.storage.Ownable": [ + { + "contract": "OwnableUpgradeable", + "label": "_owner", + "type": "t_address", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:24", + "offset": 0, + "slot": "0" + } + ], + "erc7201:openzeppelin.storage.Initializable": [ + { + "contract": "Initializable", + "label": "_initialized", + "type": "t_uint64", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:69", + "offset": 0, + "slot": "0" + }, + { + "contract": "Initializable", + "label": "_initializing", + "type": "t_bool", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:73", + "offset": 8, + "slot": "0" + } + ] + } + } + }, + "9e2999e6b98c9406d66bfd5d4ff0ccb7f2c1856014721814bce92d9e6e2f3954": { + "address": "0x880145dc1386207c0dfc1088650B7ff9a81E67CB", + "txHash": "0xea620b4a34e24615eb8d1d55093914e11970d5c7d451a1cfdf81e04674beaf58", + "layout": { + "solcVersion": "0.8.20", + "storage": [], + "types": { + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(IState)464": { + "label": "contract IState", + "numberOfBytes": "20" + }, + "t_struct(IdentityTreeStoreMainStorage)226_storage": { + "label": "struct IdentityTreeStore.IdentityTreeStoreMainStorage", + "members": [ + { + "label": "_state", + "type": "t_contract(IState)464", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(InitializableStorage)105_storage": { + "label": "struct Initializable.InitializableStorage", + "members": [ + { + "label": "_initialized", + "type": "t_uint64", + "offset": 0, + "slot": "0" + }, + { + "label": "_initializing", + "type": "t_bool", + "offset": 8, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_uint64": { + "label": "uint64", + "numberOfBytes": "8" + } + }, + "namespaces": { + "erc7201:iden3.storage.IdentityTreeStore.Main": [ + { + "contract": "IdentityTreeStore", + "label": "_state", + "type": "t_contract(IState)464", + "src": "contracts/identitytreestore/IdentityTreeStore.sol:50", + "offset": 0, + "slot": "0" + } + ], + "erc7201:openzeppelin.storage.Initializable": [ + { + "contract": "Initializable", + "label": "_initialized", + "type": "t_uint64", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:69", + "offset": 0, + "slot": "0" + }, + { + "contract": "Initializable", + "label": "_initializing", + "type": "t_bool", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:73", + "offset": 8, + "slot": "0" + } + ] + } + } + } + } +} diff --git a/README.md b/README.md index a242de9b..ac58a7de 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,8 @@ |:--------------------------:|:------------------------------------------:| | **Polygon Mainnet** | 0x624ce98D2d27b20b8f8d521723Df8fC4db71D79D | | **Polygon Amoy testnet** | 0x1a4cC30f2aA0377b0c3bc9848766D90cb4404124 | +| **Privado Main** | 0x975556428F077dB5877Ea2474D783D6C69233742 | +| **Privado testnet** | 0x975556428F077dB5877Ea2474D783D6C69233742 | | Polygon Mumbai testnet | 0x134B1BE34911E39A8397ec6289782989729807a4 | ## IdentityTreeStore contract (On-chain RHS) @@ -17,6 +19,8 @@ |:--------------------------:|:------------------------------------------:| | **Polygon Mainnet** | 0xbEeB6bB53504E8C872023451fd0D23BeF01d320B | | **Polygon Amoy testnet** | 0x3d3763eC0a50CE1AdF83d0b5D99FBE0e3fEB43fb | +| **Privado Main** | 0x58485809CfAc875B7E6F54E3fCb5f24614f202e9 | +| **Privado testnet** | 0x58485809CfAc875B7E6F54E3fCb5f24614f202e9 | | Polygon Mumbai testnet | 0x16A1ae4c460C0a42f0a87e69c526c61599B28BC9 | diff --git a/hardhat.config.ts b/hardhat.config.ts index 2ee92448..eae2fd71 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -44,6 +44,16 @@ const config: HardhatUserConfig = { // url: `${process.env.MUMBAI_RPC_URL}`, // accounts: [`0x${process.env.MUMBAI_PRIVATE_KEY}`], // }, + // 'privado-main': { + // chainId: 21000, + // url: `${process.env.PRIVADO_MAIN_RPC_URL}`, + // accounts: [`0x${process.env.PRIVADO_MAIN_PRIVATE_KEY}`], + // }, + // 'privado-test': { + // chainId: 21001, + // url: `${process.env.PRIVADO_TEST_RPC_URL}`, + // accounts: [`0x${process.env.PRIVADO_TEST_PRIVATE_KEY}`], + // }, // amoy: { // chainId: 80002, // url: `${process.env.AMOY_RPC_URL}`, diff --git a/helpers/ChainIdDefTypeMap.ts b/helpers/ChainIdDefTypeMap.ts index b6fef3ac..1af6630e 100644 --- a/helpers/ChainIdDefTypeMap.ts +++ b/helpers/ChainIdDefTypeMap.ts @@ -5,4 +5,6 @@ export const chainIdDefaultIdTypeMap = new Map() .set(137, "0x0211") // polygon main .set(80001, "0x0212") // polygon mumbai .set(80002, "0x0213") // polygon amoy - .set(11155111, "0x0223"); // ethereum sepolia + .set(11155111, "0x0223") // ethereum sepolia + .set(21000, '0x01A1') // privado-main + .set(21001, '0x01A2'); // privado-test