From 76374362ef022f8e5090f7a510eb311a859bfd49 Mon Sep 17 00:00:00 2001 From: GopherDID <74898029+vmidyllic@users.noreply.github.com> Date: Tue, 11 Jun 2024 16:29:36 +0300 Subject: [PATCH] add artifacts for state 2.4.1 (#240) --- .openzeppelin/polygon.json | 364 +++++++++++++++++++++++++++++++ .openzeppelin/unknown-80002.json | 364 +++++++++++++++++++++++++++++++ package.json | 4 +- 3 files changed, 730 insertions(+), 2 deletions(-) diff --git a/.openzeppelin/polygon.json b/.openzeppelin/polygon.json index a56ab1bd..a2cd6c04 100644 --- a/.openzeppelin/polygon.json +++ b/.openzeppelin/polygon.json @@ -2157,6 +2157,370 @@ ] } } + }, + "f73d0cf05b23651c0b8ed68a328cda74045df4517c50f998fa9abc2409e18a62": { + "address": "0x878485eDC28F192c9A3c8A98D73C49a90fCc887B", + "txHash": "0x318bc41b44dc9a06c1a228b866372d8b68e81c023177a39b97c87df81255250d", + "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" + } + ] + } + } } } } diff --git a/.openzeppelin/unknown-80002.json b/.openzeppelin/unknown-80002.json index 31458ab9..322a7378 100644 --- a/.openzeppelin/unknown-80002.json +++ b/.openzeppelin/unknown-80002.json @@ -804,6 +804,370 @@ ] } } + }, + "54a6d4c4c9b4b89dc85d094255c88987a05483a26d992ba8e5be30ec3ac04e08": { + "address": "0xa6620f80cC105a3dfc0FC3DD579df74290a04C40", + "txHash": "0x288fb90ea53fffb8319b153d84fc08127457ca2df233aae7e946e0bc7b0458d3", + "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" + } + ] + } + } } } } diff --git a/package.json b/package.json index cd2319b2..d0e44a7f 100644 --- a/package.json +++ b/package.json @@ -54,8 +54,8 @@ "verify:polygon": "npx hardhat run scripts/verifyEtherescan.js --network polygon", "lint:contracts": "npx solhint contracts/**/*.sol", "prettier:contracts": "prettier --write --plugin=prettier-plugin-solidity 'contracts/**/*.sol'", - "upgrade:contracts:its:mumbai": "npx hardhat run scripts/upgrade/identitytreestore/identitytreestore-upgrade.ts --network mumbai", - "upgrade:contracts:state:mumbai": "npx hardhat run scripts/upgrade/state/state-upgrade.ts --network mumbai", + "upgrade:contracts:its:amoy": "npx hardhat run scripts/upgrade/identitytreestore/identitytreestore-upgrade.ts --network amoy", + "upgrade:contracts:state:amoy": "npx hardhat run scripts/upgrade/state/state-upgrade.ts --network amoy", "upgrade:contracts:its:polygon": "npx hardhat run scripts/upgrade/identitytreestore/identitytreestore-upgrade.ts --network polygon", "upgrade:contracts:state:polygon": "npx hardhat run scripts/upgrade/state/state-upgrade.ts --network polygon", "deploy:state:amoy": "npx hardhat run scripts/deployState.ts --network amoy",