From 56d5ece2e352fe8d7a72e890c0c5868ae9e26c32 Mon Sep 17 00:00:00 2001 From: Alain Nicolas Date: Mon, 18 Sep 2023 14:32:37 +0200 Subject: [PATCH] chore: minor fixes on the scripts (#197) --- .openzeppelin/unknown-59140.json | 1364 +++++++++++++++++++++- .openzeppelin/unknown-59144.json | 686 +++++++++++ README.md | 21 +- package.json | 8 +- script/upgrade/forceUpgradeEverything.ts | 163 +++ 5 files changed, 2229 insertions(+), 13 deletions(-) create mode 100644 script/upgrade/forceUpgradeEverything.ts diff --git a/.openzeppelin/unknown-59140.json b/.openzeppelin/unknown-59140.json index c62d79cf..78d21b58 100644 --- a/.openzeppelin/unknown-59140.json +++ b/.openzeppelin/unknown-59140.json @@ -5,19 +5,19 @@ }, "proxies": [ { - "address": "0xC765F28096F6121C2F2b82D35A4346280164428b", + "address": "0x736c78b2f2cBf4F921E8551b2acB6A5Edc9177D5", "kind": "transparent" }, { - "address": "0x1a20b2CFA134686306436D2c9f778D7eC6c43A43", + "address": "0xC765F28096F6121C2F2b82D35A4346280164428b", "kind": "transparent" }, { - "address": "0x506f88a5Ca8D5F001f2909b029738A40042e42a6", + "address": "0x1a20b2CFA134686306436D2c9f778D7eC6c43A43", "kind": "transparent" }, { - "address": "0x736c78b2f2cBf4F921E8551b2acB6A5Edc9177D5", + "address": "0x506f88a5Ca8D5F001f2909b029738A40042e42a6", "kind": "transparent" }, { @@ -1552,6 +1552,1362 @@ } } } + }, + "3354397cdd6b936261be9fe704079273a944f9c472090d34c4caf5377f5779b1": { + "address": "0x2ff05A30f2CC53754E44b2CdCD7deAe2A5585d4f", + "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)3800", + "contract": "AttestationRegistry", + "src": "src/AttestationRegistry.sol:16" + }, + { + "label": "version", + "offset": 20, + "slot": "101", + "type": "t_uint16", + "contract": "AttestationRegistry", + "src": "src/AttestationRegistry.sol:18" + }, + { + "label": "attestationIdCounter", + "offset": 22, + "slot": "101", + "type": "t_uint32", + "contract": "AttestationRegistry", + "src": "src/AttestationRegistry.sol:19" + }, + { + "label": "attestations", + "offset": 0, + "slot": "102", + "type": "t_mapping(t_bytes32,t_struct(Attestation)3853_storage)", + "contract": "AttestationRegistry", + "src": "src/AttestationRegistry.sol:21" + } + ], + "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)3800": { + "label": "contract IRouter", + "numberOfBytes": "20" + }, + "t_mapping(t_bytes32,t_struct(Attestation)3853_storage)": { + "label": "mapping(bytes32 => struct Attestation)", + "numberOfBytes": "32" + }, + "t_struct(Attestation)3853_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" + } + } + } + }, + "d3839952abe24ccc6cd8803a91942cfbedf96e5be08d5c3ab72758d5edd7a91d": { + "address": "0xC4A1f3553f4bE4C07be7d70Ecbb9Cd67ee22A299", + "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)3800", + "contract": "ModuleRegistry", + "src": "src/ModuleRegistry.sol:18" + }, + { + "label": "modules", + "offset": 0, + "slot": "102", + "type": "t_mapping(t_address,t_struct(Module)3885_storage)", + "contract": "ModuleRegistry", + "src": "src/ModuleRegistry.sol:20" + }, + { + "label": "moduleAddresses", + "offset": 0, + "slot": "103", + "type": "t_array(t_address)dyn_storage", + "contract": "ModuleRegistry", + "src": "src/ModuleRegistry.sol:22" + } + ], + "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)3800": { + "label": "contract IRouter", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_struct(Module)3885_storage)": { + "label": "mapping(address => struct Module)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Module)3885_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" + } + } + } + }, + "d99b3b345be3281a62d350dd3f4b0dbee11a149a42369670b897db21539dad09": { + "address": "0x2fcCfC76566621A3c1F424970c89a7Cd2D603989", + "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)3800", + "contract": "PortalRegistry", + "src": "src/PortalRegistry.sol:18" + }, + { + "label": "portals", + "offset": 0, + "slot": "102", + "type": "t_mapping(t_address,t_struct(Portal)3878_storage)", + "contract": "PortalRegistry", + "src": "src/PortalRegistry.sol:20" + }, + { + "label": "issuers", + "offset": 0, + "slot": "103", + "type": "t_mapping(t_address,t_bool)", + "contract": "PortalRegistry", + "src": "src/PortalRegistry.sol:22" + }, + { + "label": "portalAddresses", + "offset": 0, + "slot": "104", + "type": "t_array(t_address)dyn_storage", + "contract": "PortalRegistry", + "src": "src/PortalRegistry.sol:24" + } + ], + "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)3800": { + "label": "contract IRouter", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_struct(Portal)3878_storage)": { + "label": "mapping(address => struct Portal)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Portal)3878_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" + } + } + } + }, + "7cb0f5d61af565dfb5f94a78e471d8d9ed42c8ee97eddcd926d395437ca8b435": { + "address": "0x4423F69F699B63456DdeB97e46F909c08D61029a", + "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)3800", + "contract": "SchemaRegistry", + "src": "src/SchemaRegistry.sol:15" + }, + { + "label": "schemas", + "offset": 0, + "slot": "102", + "type": "t_mapping(t_bytes32,t_struct(Schema)3862_storage)", + "contract": "SchemaRegistry", + "src": "src/SchemaRegistry.sol:17" + }, + { + "label": "schemaIds", + "offset": 0, + "slot": "103", + "type": "t_array(t_bytes32)dyn_storage", + "contract": "SchemaRegistry", + "src": "src/SchemaRegistry.sol:19" + } + ], + "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)3800": { + "label": "contract IRouter", + "numberOfBytes": "20" + }, + "t_mapping(t_bytes32,t_struct(Schema)3862_storage)": { + "label": "mapping(bytes32 => struct Schema)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Schema)3862_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" + } + } + } + }, + "3354397cdd6b936261be9fe704079273a944f9c472090d34c4caf5377f5779b1": { + "address": "0x2ff05A30f2CC53754E44b2CdCD7deAe2A5585d4f", + "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)3800", + "contract": "AttestationRegistry", + "src": "src/AttestationRegistry.sol:16" + }, + { + "label": "version", + "offset": 20, + "slot": "101", + "type": "t_uint16", + "contract": "AttestationRegistry", + "src": "src/AttestationRegistry.sol:18" + }, + { + "label": "attestationIdCounter", + "offset": 22, + "slot": "101", + "type": "t_uint32", + "contract": "AttestationRegistry", + "src": "src/AttestationRegistry.sol:19" + }, + { + "label": "attestations", + "offset": 0, + "slot": "102", + "type": "t_mapping(t_bytes32,t_struct(Attestation)3853_storage)", + "contract": "AttestationRegistry", + "src": "src/AttestationRegistry.sol:21" + } + ], + "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)3800": { + "label": "contract IRouter", + "numberOfBytes": "20" + }, + "t_mapping(t_bytes32,t_struct(Attestation)3853_storage)": { + "label": "mapping(bytes32 => struct Attestation)", + "numberOfBytes": "32" + }, + "t_struct(Attestation)3853_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" + } + } + }, + "allAddresses": ["0x2ff05A30f2CC53754E44b2CdCD7deAe2A5585d4f", "0x69Ae216B5CE47Fe5Ff48F36367F0A4d5c9C6C581"] + }, + "d3839952abe24ccc6cd8803a91942cfbedf96e5be08d5c3ab72758d5edd7a91d": { + "address": "0xC4A1f3553f4bE4C07be7d70Ecbb9Cd67ee22A299", + "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)3800", + "contract": "ModuleRegistry", + "src": "src/ModuleRegistry.sol:18" + }, + { + "label": "modules", + "offset": 0, + "slot": "102", + "type": "t_mapping(t_address,t_struct(Module)3885_storage)", + "contract": "ModuleRegistry", + "src": "src/ModuleRegistry.sol:20" + }, + { + "label": "moduleAddresses", + "offset": 0, + "slot": "103", + "type": "t_array(t_address)dyn_storage", + "contract": "ModuleRegistry", + "src": "src/ModuleRegistry.sol:22" + } + ], + "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)3800": { + "label": "contract IRouter", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_struct(Module)3885_storage)": { + "label": "mapping(address => struct Module)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Module)3885_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" + } + } + }, + "allAddresses": ["0xC4A1f3553f4bE4C07be7d70Ecbb9Cd67ee22A299", "0xc70a8a53bB389b1FDD2d4a0CF0f865c7866175b4"] + }, + "d99b3b345be3281a62d350dd3f4b0dbee11a149a42369670b897db21539dad09": { + "address": "0x2fcCfC76566621A3c1F424970c89a7Cd2D603989", + "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)3800", + "contract": "PortalRegistry", + "src": "src/PortalRegistry.sol:18" + }, + { + "label": "portals", + "offset": 0, + "slot": "102", + "type": "t_mapping(t_address,t_struct(Portal)3878_storage)", + "contract": "PortalRegistry", + "src": "src/PortalRegistry.sol:20" + }, + { + "label": "issuers", + "offset": 0, + "slot": "103", + "type": "t_mapping(t_address,t_bool)", + "contract": "PortalRegistry", + "src": "src/PortalRegistry.sol:22" + }, + { + "label": "portalAddresses", + "offset": 0, + "slot": "104", + "type": "t_array(t_address)dyn_storage", + "contract": "PortalRegistry", + "src": "src/PortalRegistry.sol:24" + } + ], + "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)3800": { + "label": "contract IRouter", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_struct(Portal)3878_storage)": { + "label": "mapping(address => struct Portal)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Portal)3878_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" + } + } + }, + "allAddresses": ["0x2fcCfC76566621A3c1F424970c89a7Cd2D603989", "0xbcbD81b00033FFCEd2AbFaf6DfA8c3f68CE0e67e"] + }, + "7cb0f5d61af565dfb5f94a78e471d8d9ed42c8ee97eddcd926d395437ca8b435": { + "address": "0x4423F69F699B63456DdeB97e46F909c08D61029a", + "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)3333", + "contract": "SchemaRegistry", + "src": "src/SchemaRegistry.sol:15" + }, + { + "label": "schemas", + "offset": 0, + "slot": "102", + "type": "t_mapping(t_bytes32,t_struct(Schema)3395_storage)", + "contract": "SchemaRegistry", + "src": "src/SchemaRegistry.sol:17" + }, + { + "label": "schemaIds", + "offset": 0, + "slot": "103", + "type": "t_array(t_bytes32)dyn_storage", + "contract": "SchemaRegistry", + "src": "src/SchemaRegistry.sol:19" + } + ], + "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)3333": { + "label": "contract IRouter", + "numberOfBytes": "20" + }, + "t_mapping(t_bytes32,t_struct(Schema)3395_storage)": { + "label": "mapping(bytes32 => struct Schema)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Schema)3395_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" + } + } + }, + "allAddresses": ["0x4423F69F699B63456DdeB97e46F909c08D61029a", "0x2aF74120BD6078F6641d63aD69Eb5e63eC692874"] } } } diff --git a/.openzeppelin/unknown-59144.json b/.openzeppelin/unknown-59144.json index 6f7d0205..1c593aa1 100644 --- a/.openzeppelin/unknown-59144.json +++ b/.openzeppelin/unknown-59144.json @@ -1209,6 +1209,692 @@ } } } + }, + "3354397cdd6b936261be9fe704079273a944f9c472090d34c4caf5377f5779b1": { + "address": "0x4c5A945c0b2B61dcdae8eb273fBA9bAF80Bd7b3F", + "txHash": "0x00dcf3f5efe5a2c956f527df528c0073907c01a5db169fd54807f5fcbdd93dc3", + "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)3333", + "contract": "AttestationRegistry", + "src": "src/AttestationRegistry.sol:16" + }, + { + "label": "version", + "offset": 20, + "slot": "101", + "type": "t_uint16", + "contract": "AttestationRegistry", + "src": "src/AttestationRegistry.sol:18" + }, + { + "label": "attestationIdCounter", + "offset": 22, + "slot": "101", + "type": "t_uint32", + "contract": "AttestationRegistry", + "src": "src/AttestationRegistry.sol:19" + }, + { + "label": "attestations", + "offset": 0, + "slot": "102", + "type": "t_mapping(t_bytes32,t_struct(Attestation)3386_storage)", + "contract": "AttestationRegistry", + "src": "src/AttestationRegistry.sol:21" + } + ], + "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)3333": { + "label": "contract IRouter", + "numberOfBytes": "20" + }, + "t_mapping(t_bytes32,t_struct(Attestation)3386_storage)": { + "label": "mapping(bytes32 => struct Attestation)", + "numberOfBytes": "32" + }, + "t_struct(Attestation)3386_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" + } + } + }, + "allAddresses": [ + "0x4c5A945c0b2B61dcdae8eb273fBA9bAF80Bd7b3F", + "0xd835587924c763e9A9Ee5867Bc5644FDBa7aD0f9", + "0xe5D42F8EE8CC0E9bbC25A58FA09AD723d9C92A38" + ] + }, + "d3839952abe24ccc6cd8803a91942cfbedf96e5be08d5c3ab72758d5edd7a91d": { + "address": "0x9b207fD880EBe1e19b90f3DFd84652e05f1Af524", + "txHash": "0xdbd5490198bb982c238fa9304a0881cba159011c8d0e1ac75e4cb66b0136931a", + "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)3333", + "contract": "ModuleRegistry", + "src": "src/ModuleRegistry.sol:18" + }, + { + "label": "modules", + "offset": 0, + "slot": "102", + "type": "t_mapping(t_address,t_struct(Module)3418_storage)", + "contract": "ModuleRegistry", + "src": "src/ModuleRegistry.sol:20" + }, + { + "label": "moduleAddresses", + "offset": 0, + "slot": "103", + "type": "t_array(t_address)dyn_storage", + "contract": "ModuleRegistry", + "src": "src/ModuleRegistry.sol:22" + } + ], + "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)3333": { + "label": "contract IRouter", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_struct(Module)3418_storage)": { + "label": "mapping(address => struct Module)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Module)3418_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" + } + } + }, + "allAddresses": ["0x9b207fD880EBe1e19b90f3DFd84652e05f1Af524", "0xB6a628b775F56AC649064479acAEECA76ccfc21C"] + }, + "d99b3b345be3281a62d350dd3f4b0dbee11a149a42369670b897db21539dad09": { + "address": "0xa8Fa37CB5a883f885c8E2392784995452F85651A", + "txHash": "0x1a18bb2a39aefe94a6275f37344756df10b350027b46a358fc9e35796f8d85a0", + "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)3333", + "contract": "PortalRegistry", + "src": "src/PortalRegistry.sol:18" + }, + { + "label": "portals", + "offset": 0, + "slot": "102", + "type": "t_mapping(t_address,t_struct(Portal)3411_storage)", + "contract": "PortalRegistry", + "src": "src/PortalRegistry.sol:20" + }, + { + "label": "issuers", + "offset": 0, + "slot": "103", + "type": "t_mapping(t_address,t_bool)", + "contract": "PortalRegistry", + "src": "src/PortalRegistry.sol:22" + }, + { + "label": "portalAddresses", + "offset": 0, + "slot": "104", + "type": "t_array(t_address)dyn_storage", + "contract": "PortalRegistry", + "src": "src/PortalRegistry.sol:24" + } + ], + "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)3333": { + "label": "contract IRouter", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_struct(Portal)3411_storage)": { + "label": "mapping(address => struct Portal)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Portal)3411_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" + } + } + } + }, + "7cb0f5d61af565dfb5f94a78e471d8d9ed42c8ee97eddcd926d395437ca8b435": { + "address": "0x55C006227f819268F935441Db245b39a108aB95c", + "txHash": "0xaeed4f9c7de515b134912a1d5946fd31beccd040ace2177de3c801db218ca0b3", + "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)3333", + "contract": "SchemaRegistry", + "src": "src/SchemaRegistry.sol:15" + }, + { + "label": "schemas", + "offset": 0, + "slot": "102", + "type": "t_mapping(t_bytes32,t_struct(Schema)3395_storage)", + "contract": "SchemaRegistry", + "src": "src/SchemaRegistry.sol:17" + }, + { + "label": "schemaIds", + "offset": 0, + "slot": "103", + "type": "t_array(t_bytes32)dyn_storage", + "contract": "SchemaRegistry", + "src": "src/SchemaRegistry.sol:19" + } + ], + "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)3333": { + "label": "contract IRouter", + "numberOfBytes": "20" + }, + "t_mapping(t_bytes32,t_struct(Schema)3395_storage)": { + "label": "mapping(bytes32 => struct Schema)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Schema)3395_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" + } + } + } } } } diff --git a/README.md b/README.md index 6b759bfd..972f475a 100644 --- a/README.md +++ b/README.md @@ -213,6 +213,9 @@ upgradable to the new local versions. ### Recreate the network files +:warning: Note: this script must only be run on a branch/commit corresponding to the version of the contracts deployed +on the targeted network!. + Run `pnpm run check:upgradeable:goerli` or `pnpm run check:upgradeable` to re-generate the network files describing the deployed contracts. This can be useful if the file was lost/modified since the last upgrade or the first deployment. @@ -220,15 +223,21 @@ deployed contracts. This can be useful if the file was lost/modified since the l ### On the Linea Goerli testnet: -1. Check your `.env` file contains the address of the proxy for the contract you want to upgrade -2. Run `pnpm run upgrade:ContractName:goerli`, replacing `ContractName` with the contract you want to upgrade -3. Alternatively, you can upgrade all contracts at once via `pnpm run upgrade:all:goerli` +1. Check that your `.env` file contains the address of all the proxies +2. Upgrade only the implementations that changed since the last upgrade via the `pnpm run upgrade:all:goerli` command +3. _Optional_: Upgrade all the implementations by forcing their re-deployment via the + `pnpm run upgrade:all:goerli:force` command + +:warning: Note: Forcing the redeployment of all the implementations is more expensive! ### On the Linea mainnet: -1. Check your `.env` file contains the address of the proxy for the contract you want to upgrade -2. Run `pnpm run upgrade:ContractName`, replacing `ContractName` with the contract you want to upgrade -3. Alternatively, you can upgrade all contracts at once via `pnpm run upgrade:all` +1. Check that your `.env` file contains the address of all the proxies +2. Upgrade only the implementations that changed since the last upgrade via the `pnpm run upgrade:all` command +3. _Optional_: Upgrade all the implementations by forcing their re-deployment via the `pnpm run upgrade:all:force` + command + +:warning: Note: Forcing the redeployment of all the implementations is more expensive! ## Contracts addresses diff --git a/package.json b/package.json index af950128..58c0adeb 100644 --- a/package.json +++ b/package.json @@ -39,11 +39,13 @@ "prepare": "husky install", "prettier:check": "prettier --check \"**/*.{json,md,svg,yml,sol,ts}\"", "prettier:write": "prettier --write \"**/*.{json,md,svg,yml,sol,ts}\"", - "reimport": "npx hardhat run --network linea script/upgrade/upgradeEverything.ts", - "reimport:goerli": "npx hardhat run --network linea-goerli script/upgrade/upgradeEverything.ts", + "reimport": "npx hardhat run --network linea script/recreateNetworkFile.ts", + "reimport:goerli": "npx hardhat run --network linea-goerli script/recreateNetworkFile.ts", "test": "forge test", "upgrade:all": "npx hardhat run --network linea script/upgrade/upgradeEverything.ts", - "upgrade:all:goerli": "npx hardhat run --network linea-goerli script/upgrade/upgradeEverything.ts" + "upgrade:all:force": "npx hardhat run --network linea script/upgrade/forceUgradeEverything.ts", + "upgrade:all:goerli": "npx hardhat run --network linea-goerli script/upgrade/upgradeEverything.ts", + "upgrade:all:goerli:force": "npx hardhat run --network linea-goerli script/upgrade/forceUgradeEverything.ts" }, "devDependencies": { "@nomicfoundation/hardhat-ethers": "^3.0.4", diff --git a/script/upgrade/forceUpgradeEverything.ts b/script/upgrade/forceUpgradeEverything.ts new file mode 100644 index 00000000..4f51d027 --- /dev/null +++ b/script/upgrade/forceUpgradeEverything.ts @@ -0,0 +1,163 @@ +import { ethers, run, upgrades } from "hardhat"; +import dotenv from "dotenv"; + +dotenv.config({ path: "../.env" }); + +async function main() { + console.log(`START SCRIPT`); + + const routerProxyAddress = process.env.ROUTER_ADDRESS; + if (!routerProxyAddress) { + throw new Error("Router proxy address not found"); + } + + const attestationProxyAddress = process.env.ATTESTATION_REGISTRY_ADDRESS ?? ""; + if (!attestationProxyAddress) { + throw new Error("Attestation proxy address not found"); + } + + const moduleProxyAddress = process.env.MODULE_REGISTRY_ADDRESS ?? ""; + if (!moduleProxyAddress) { + throw new Error("Module proxy address not found"); + } + + const portalProxyAddress = process.env.PORTAL_REGISTRY_ADDRESS ?? ""; + if (!portalProxyAddress) { + throw new Error("Portal proxy address not found"); + } + + const schemaProxyAddress = process.env.SCHEMA_REGISTRY_ADDRESS ?? ""; + if (!schemaProxyAddress) { + throw new Error("Schema proxy address not found"); + } + + console.log("Upgrading Router, with proxy at", routerProxyAddress); + const Router = await ethers.getContractFactory("Router"); + await upgrades.upgradeProxy(routerProxyAddress, Router, { + redeployImplementation: "always", + }); + + console.log(`Router successfully upgraded!`); + + console.log(`\n----\n`); + + console.log("Upgrading AttestationRegistry, with proxy at", attestationProxyAddress); + const AttestationRegistry = await ethers.getContractFactory("AttestationRegistry"); + const attestationRegistry = await upgrades.upgradeProxy(attestationProxyAddress, AttestationRegistry, { + redeployImplementation: "always", + }); + + await attestationRegistry.incrementVersionNumber(); + + console.log(`AttestationRegistry successfully upgraded!`); + + console.log(`\n----\n`); + + console.log("Upgrading ModuleRegistry, with proxy at", moduleProxyAddress); + const ModuleRegistry = await ethers.getContractFactory("ModuleRegistry"); + await upgrades.upgradeProxy(moduleProxyAddress, ModuleRegistry, { + redeployImplementation: "always", + }); + + console.log(`ModuleRegistry successfully upgraded!`); + + console.log(`\n----\n`); + + console.log("Upgrading PortalRegistry, with proxy at", portalProxyAddress); + const PortalRegistry = await ethers.getContractFactory("PortalRegistry"); + await upgrades.upgradeProxy(portalProxyAddress, PortalRegistry, { + redeployImplementation: "always", + }); + + console.log(`PortalRegistry successfully upgraded!`); + + console.log(`\n----\n`); + + console.log("Upgrading SchemaRegistry, with proxy at", schemaProxyAddress); + const SchemaRegistry = await ethers.getContractFactory("SchemaRegistry"); + await upgrades.upgradeProxy(schemaProxyAddress, SchemaRegistry, { + redeployImplementation: "always", + }); + + console.log(`SchemaRegistry successfully upgraded!`); + + console.log(`\n----\n`); + + const routerImplementationAddress = await upgrades.erc1967.getImplementationAddress(routerProxyAddress); + + await run("verify:verify", { + address: routerProxyAddress, + }); + + console.log(`Router successfully upgraded and verified!`); + console.log(`Proxy is at ${routerProxyAddress}`); + console.log(`Implementation is at ${routerImplementationAddress}`); + + console.log(`\n----\n`); + + const attestationImplementationAddress = await upgrades.erc1967.getImplementationAddress(attestationProxyAddress); + + await run("verify:verify", { + address: attestationProxyAddress, + }); + + const newVersion = await attestationRegistry.getVersionNumber(); + + console.log(`AttestationRegistry successfully upgraded to version ${newVersion} and verified!`); + console.log(`Proxy is at ${attestationProxyAddress}`); + console.log(`Implementation is at ${attestationImplementationAddress}`); + + console.log(`\n----\n`); + + const moduleImplementationAddress = await upgrades.erc1967.getImplementationAddress(moduleProxyAddress); + + await run("verify:verify", { + address: moduleProxyAddress, + }); + + console.log(`ModuleRegistry successfully upgraded and verified!`); + console.log(`Proxy is at ${moduleProxyAddress}`); + console.log(`Implementation is at ${moduleImplementationAddress}`); + + console.log(`\n----\n`); + + const portalImplementationAddress = await upgrades.erc1967.getImplementationAddress(portalProxyAddress); + + await run("verify:verify", { + address: portalProxyAddress, + }); + + console.log(`PortalRegistry successfully upgraded and verified!`); + console.log(`Proxy is at ${portalProxyAddress}`); + console.log(`Implementation is at ${portalImplementationAddress}`); + + console.log(`\n----\n`); + + const schemaImplementationAddress = await upgrades.erc1967.getImplementationAddress(schemaProxyAddress); + + await run("verify:verify", { + address: schemaProxyAddress, + }); + + console.log(`SchemaRegistry successfully upgraded and verified!`); + console.log(`Proxy is at ${schemaProxyAddress}`); + console.log(`Implementation is at ${schemaImplementationAddress}`); + + console.log(`\n----\n`); + + console.log(`** SUMMARY **`); + console.log(`Router = ${routerProxyAddress}`); + console.log(`AttestationRegistry = ${attestationProxyAddress}`); + console.log(`ModuleRegistry = ${moduleProxyAddress}`); + console.log(`PortalRegistry = ${portalProxyAddress}`); + console.log(`SchemaRegistry = ${schemaProxyAddress}`); + + console.log(`END SCRIPT`); +} + +// We recommend this pattern to be able to use async/await everywhere +// and properly handle errors. +main().catch((error) => { + console.error(error); + process.exitCode = 1; +});