From 14faed6b67b692cd22da9568eeeafb6e4092cf9e Mon Sep 17 00:00:00 2001 From: Juuso Takalainen Date: Wed, 30 Oct 2024 14:09:12 +0200 Subject: [PATCH 1/6] deployment: iotex testnet also touched up deployment scripts so that the testnet deployment went nicely in one go. Next up: figure out a way to test if the deployment works! At least add the network to hub and test a happy path manually. --- packages/config/src/index.ts | 35 + .../.openzeppelin/unknown-4690.json | 1578 +++++++++++++++++ packages/network-contracts/build.sh | 3 +- packages/network-contracts/hardhat.config.ts | 45 +- .../2024-10-30-deploy-to-iotex-testnet.txt | 527 ++++++ packages/network-contracts/package.json | 1 + ...oyToAmoy.sh => 2024-05-03-deployToAmoy.sh} | 0 .../2024-10-30-deploy-to-iotex-testnet.sh | 16 + .../scripts/deployStreamrContracts.ts | 7 +- .../scripts/deployTokenomicsContracts.ts | 1 + .../tasks/copyFilesAfterCompilation.ts | 32 + 11 files changed, 2237 insertions(+), 8 deletions(-) create mode 100644 packages/network-contracts/.openzeppelin/unknown-4690.json create mode 100644 packages/network-contracts/logs/2024-10-30-deploy-to-iotex-testnet.txt rename packages/network-contracts/scripts/{2024-05-deployToAmoy.sh => 2024-05-03-deployToAmoy.sh} (100%) create mode 100755 packages/network-contracts/scripts/2024-10-30-deploy-to-iotex-testnet.sh create mode 100644 packages/network-contracts/tasks/copyFilesAfterCompilation.ts diff --git a/packages/config/src/index.ts b/packages/config/src/index.ts index 5411b3b52..22478cdff 100644 --- a/packages/config/src/index.ts +++ b/packages/config/src/index.ts @@ -461,5 +461,40 @@ export const config = { } } ] + }, + "iotexTestnet": { + "id": 4690, + "name": "IoTeX Testnet", + "nativeCurrency": { + "symbol": "IOTEX", + "name": "IOTEX", + "decimals": 18 + }, + "rpcEndpoints": [ + { + "url": "https://babel-api.testnet.iotex.io" + } + ], + "contracts": { + "DATA": "0x5ABD469031d2B5f939808565EAB8562d7Cbaa939", + "StreamRegistry": "0xDC695780959aa5aEe9B28dfED7332032e3045210", + "ENSCacheV2": "0xDDf8FB60f8c3ffb1C20375A30f6D8CFB0C48Bd38", + "StorageNodeRegistry": "0xc0F9666fbF16B2ac5726697237BcdF79096e3FA7", + "StreamStorageRegistry": "0xd0C3A69762Bd920C1cAfBE91612a4600429f02f1", + "StreamrConfig": "0x6d201374D7c28EF1c3cc1b6FA300f06110B597A3", + "SponsorshipOperatorContractOnlyJoinPolicy": "0xAd24077505d3584F1AC8d78719F9d31F7Da0E264", + "SponsorshipMaxOperatorsJoinPolicy": "0x78d13aaBA657F448933Bb469E4E549Dee88cB78B", + "SponsorshipStakeWeightedAllocationPolicy": "0xB14205AE3D7672B937B972EBdf2b986fB0B8CfaA", + "SponsorshipDefaultLeavePolicy": "0xfC9C1886EAd9a757039Edbee16Bea0183344D2BA", + "SponsorshipVoteKickPolicy": "0xd1cBD6b1Be710C41c01A9613802209843407b8b9", + "SponsorshipFactory": "0x84c8d8f9760639e159350e5d2Bfaada99b670114", + "OperatorDefaultDelegationPolicy": "0x67352e3F7dBA907aF877020aE7E9450C0029C70c", + "OperatorDefaultExchangeRatePolicy": "0xE41439BF434F9CfBF0153f5231C205d4ae0C22e3", + "OperatorDefaultUndelegationPolicy": "0xF655955dc561356851e95a6D0febeB0BAc955Ab5", + "OperatorFactory": "0xdaF0905e19C45b9Fea7E60D232061edF78E9F570" + }, + "blockExplorerUrl": "https://testnet.iotexscan.io", + "entryPoints": [ + ] } } diff --git a/packages/network-contracts/.openzeppelin/unknown-4690.json b/packages/network-contracts/.openzeppelin/unknown-4690.json new file mode 100644 index 000000000..5d3f6aab3 --- /dev/null +++ b/packages/network-contracts/.openzeppelin/unknown-4690.json @@ -0,0 +1,1578 @@ +{ + "manifestVersion": "3.2", + "proxies": [ + { + "address": "0xDC695780959aa5aEe9B28dfED7332032e3045210", + "txHash": "0x368c7e9e366d24caf8cca013bc7ec0de32799fd836d433bde208ad5d20b10479", + "kind": "uups" + }, + { + "address": "0xDDf8FB60f8c3ffb1C20375A30f6D8CFB0C48Bd38", + "txHash": "0x7ff8e9814ddf24b8bb450dfc8c17a0e92427b369b78e722280695b0d4cbe7776", + "kind": "uups" + }, + { + "address": "0xc0F9666fbF16B2ac5726697237BcdF79096e3FA7", + "txHash": "0xb3af40252387ab529373c77986bbe2575f6efffd36b2aa9649a8aa90bdfd4e2d", + "kind": "uups" + }, + { + "address": "0xd0C3A69762Bd920C1cAfBE91612a4600429f02f1", + "txHash": "0x6703880f299a477bb29f13316986ab5fe35cacf0a9c93c4b57e84385fcf2915f", + "kind": "uups" + }, + { + "address": "0x6d201374D7c28EF1c3cc1b6FA300f06110B597A3", + "txHash": "0x3d0aab91e7cc4958532d9a2c46ee4f0c383321140f8fa3b11bbd5c3ae19ed011", + "kind": "uups" + }, + { + "address": "0xdaF0905e19C45b9Fea7E60D232061edF78E9F570", + "txHash": "0xc98982bb7fadb329284e201ba51778fd3e726a4095af61f8d1cadb6403dc9551", + "kind": "uups" + }, + { + "address": "0x84c8d8f9760639e159350e5d2Bfaada99b670114", + "txHash": "0x9546bd068a91863e8550423d89026da808c6812b8b1e7a6006846116abbecb5b", + "kind": "uups" + } + ], + "impls": { + "ab73bf38ac788178f15970227a96e5f4a7e5bd31198a9f882c328a984b8dc8da": { + "address": "0xB36CF8ee4219a3Ac9FBC3865C35E9a99353c26db", + "txHash": "0x45d033d09a3dc78a7682245b372df0b864aa404aa2df274b78e3cd26cdda63c3", + "layout": { + "solcVersion": "0.8.9", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable-4.4.2/proxy/utils/Initializable.sol:39" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable-4.4.2/proxy/utils/Initializable.sol:44" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC1967UpgradeUpgradeable", + "src": "@openzeppelin/contracts-upgradeable-4.4.2/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:215" + }, + { + "label": "__gap", + "offset": 0, + "slot": "51", + "type": "t_array(t_uint256)50_storage", + "contract": "UUPSUpgradeable", + "src": "@openzeppelin/contracts-upgradeable-4.4.2/proxy/utils/UUPSUpgradeable.sol:81" + }, + { + "label": "__gap", + "offset": 0, + "slot": "101", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable-4.4.2/utils/ContextUpgradeable.sol:31" + }, + { + "label": "_trustedForwarder", + "offset": 0, + "slot": "151", + "type": "t_address", + "contract": "ERC2771ContextUpgradeable", + "src": "contracts/StreamRegistry/ERC2771ContextUpgradeable.sol:15" + }, + { + "label": "__gap", + "offset": 0, + "slot": "152", + "type": "t_array(t_uint256)49_storage", + "contract": "ERC2771ContextUpgradeable", + "src": "contracts/StreamRegistry/ERC2771ContextUpgradeable.sol:51" + }, + { + "label": "__gap", + "offset": 0, + "slot": "201", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC165Upgradeable", + "src": "@openzeppelin/contracts-upgradeable-4.4.2/utils/introspection/ERC165Upgradeable.sol:36" + }, + { + "label": "_roles", + "offset": 0, + "slot": "251", + "type": "t_mapping(t_bytes32,t_struct(RoleData)2219_storage)", + "contract": "AccessControlUpgradeable", + "src": "@openzeppelin/contracts-upgradeable-4.4.2/access/AccessControlUpgradeable.sol:64" + }, + { + "label": "__gap", + "offset": 0, + "slot": "252", + "type": "t_array(t_uint256)49_storage", + "contract": "AccessControlUpgradeable", + "src": "@openzeppelin/contracts-upgradeable-4.4.2/access/AccessControlUpgradeable.sol:232" + }, + { + "label": "streamIdToPermissions", + "offset": 0, + "slot": "301", + "type": "t_mapping(t_string_memory_ptr,t_mapping(t_bytes32,t_struct(Permission)18416_storage))", + "contract": "StreamRegistryV5", + "src": "contracts/StreamRegistry/StreamRegistryV5.sol:61" + }, + { + "label": "streamIdToMetadata", + "offset": 0, + "slot": "302", + "type": "t_mapping(t_string_memory_ptr,t_string_storage)", + "contract": "StreamRegistryV5", + "src": "contracts/StreamRegistry/StreamRegistryV5.sol:62" + }, + { + "label": "ensCache", + "offset": 0, + "slot": "303", + "type": "t_contract(ENSCache)24342", + "contract": "StreamRegistryV5", + "src": "contracts/StreamRegistry/StreamRegistryV5.sol:63" + }, + { + "label": "streamIdToVersion", + "offset": 0, + "slot": "304", + "type": "t_mapping(t_string_memory_ptr,t_uint32)", + "contract": "StreamRegistryV5", + "src": "contracts/StreamRegistry/StreamRegistryV5.sol:66" + } + ], + "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_contract(ENSCache)24342": { + "label": "contract ENSCache", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_struct(Permission)18416_storage)": { + "label": "mapping(bytes32 => struct StreamRegistryV5.Permission)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_struct(RoleData)2219_storage)": { + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32" + }, + "t_mapping(t_string_memory_ptr,t_mapping(t_bytes32,t_struct(Permission)18416_storage))": { + "label": "mapping(string => mapping(bytes32 => struct StreamRegistryV5.Permission))", + "numberOfBytes": "32" + }, + "t_mapping(t_string_memory_ptr,t_string_storage)": { + "label": "mapping(string => string)", + "numberOfBytes": "32" + }, + "t_mapping(t_string_memory_ptr,t_uint32)": { + "label": "mapping(string => uint32)", + "numberOfBytes": "32" + }, + "t_string_memory_ptr": { + "label": "string", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Permission)18416_storage": { + "label": "struct StreamRegistryV5.Permission", + "members": [ + { + "label": "canEdit", + "type": "t_bool", + "offset": 0, + "slot": "0" + }, + { + "label": "canDelete", + "type": "t_bool", + "offset": 1, + "slot": "0" + }, + { + "label": "publishExpiration", + "type": "t_uint256", + "offset": 0, + "slot": "1" + }, + { + "label": "subscribeExpiration", + "type": "t_uint256", + "offset": 0, + "slot": "2" + }, + { + "label": "canGrant", + "type": "t_bool", + "offset": 0, + "slot": "3" + } + ], + "numberOfBytes": "128" + }, + "t_struct(RoleData)2219_storage": { + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "label": "members", + "type": "t_mapping(t_address,t_bool)", + "offset": 0, + "slot": "0" + }, + { + "label": "adminRole", + "type": "t_bytes32", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "label": "uint32", + "numberOfBytes": "4" + } + } + } + }, + "d4db542646b11d24d6eb916bd37f55cf41377f4f0f7f7aa52461369a77c057ef": { + "address": "0xc81Fa3Cc3E81dF24D21bfc608f8FB06262Da4F8c", + "txHash": "0xe11f483133e9cf060f8f73072ef91c470b0a43f90e36453a4f637870637b2fec", + "layout": { + "solcVersion": "0.8.9", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC1967UpgradeUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:211" + }, + { + "label": "__gap", + "offset": 0, + "slot": "51", + "type": "t_array(t_uint256)50_storage", + "contract": "UUPSUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol:107" + }, + { + "label": "__gap", + "offset": 0, + "slot": "101", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_owner", + "offset": 0, + "slot": "151", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "152", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" + }, + { + "label": "owners", + "offset": 0, + "slot": "201", + "type": "t_mapping(t_string_memory_ptr,t_address)", + "contract": "ENSCacheV2Streamr", + "src": "contracts/chainlinkClient/ENSCacheV2Streamr.sol:17" + }, + { + "label": "streamrScript", + "offset": 0, + "slot": "202", + "type": "t_address", + "contract": "ENSCacheV2Streamr", + "src": "contracts/chainlinkClient/ENSCacheV2Streamr.sol:18" + }, + { + "label": "streamRegistry", + "offset": 0, + "slot": "203", + "type": "t_contract(IStreamRegistry)24359", + "contract": "ENSCacheV2Streamr", + "src": "contracts/chainlinkClient/ENSCacheV2Streamr.sol:19" + }, + { + "label": "ensCacheV1", + "offset": 0, + "slot": "204", + "type": "t_contract(ENSCacheV1)24717", + "contract": "ENSCacheV2Streamr", + "src": "contracts/chainlinkClient/ENSCacheV2Streamr.sol:20" + } + ], + "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(ENSCacheV1)24717": { + "label": "contract ENSCacheV1", + "numberOfBytes": "20" + }, + "t_contract(IStreamRegistry)24359": { + "label": "contract IStreamRegistry", + "numberOfBytes": "20" + }, + "t_mapping(t_string_memory_ptr,t_address)": { + "label": "mapping(string => address)", + "numberOfBytes": "32" + }, + "t_string_memory_ptr": { + "label": "string", + "numberOfBytes": "32" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + }, + "t_string_storage": { + "label": "string" + } + } + } + }, + "5bca47f3befc568da3109ac56dec6e408046e7e9ed2ebdd5180523e64ecb5fe8": { + "address": "0xB6a625339eCb9755348964434A2DD088D008Dc2B", + "txHash": "0xe5d7dd6571515b3a93d0ec5db00addfcbfe9d99c80f79fa4958000a47bc2c2ec", + "layout": { + "solcVersion": "0.8.9", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable-4.4.2/proxy/utils/Initializable.sol:39" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable-4.4.2/proxy/utils/Initializable.sol:44" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC1967UpgradeUpgradeable", + "src": "@openzeppelin/contracts-upgradeable-4.4.2/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:215" + }, + { + "label": "__gap", + "offset": 0, + "slot": "51", + "type": "t_array(t_uint256)50_storage", + "contract": "UUPSUpgradeable", + "src": "@openzeppelin/contracts-upgradeable-4.4.2/proxy/utils/UUPSUpgradeable.sol:81" + }, + { + "label": "__gap", + "offset": 0, + "slot": "101", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable-4.4.2/utils/ContextUpgradeable.sol:31" + }, + { + "label": "_owner", + "offset": 0, + "slot": "151", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable-4.4.2/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "152", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable-4.4.2/access/OwnableUpgradeable.sol:82" + }, + { + "label": "nodeCount", + "offset": 0, + "slot": "201", + "type": "t_uint64", + "contract": "NodeRegistry", + "src": "contracts/NodeRegistry/NodeRegistry.sol:49" + }, + { + "label": "tailNode", + "offset": 8, + "slot": "201", + "type": "t_address", + "contract": "NodeRegistry", + "src": "contracts/NodeRegistry/NodeRegistry.sol:50" + }, + { + "label": "headNode", + "offset": 0, + "slot": "202", + "type": "t_address", + "contract": "NodeRegistry", + "src": "contracts/NodeRegistry/NodeRegistry.sol:51" + }, + { + "label": "requiresWhitelist", + "offset": 20, + "slot": "202", + "type": "t_bool", + "contract": "NodeRegistry", + "src": "contracts/NodeRegistry/NodeRegistry.sol:52" + }, + { + "label": "nodes", + "offset": 0, + "slot": "203", + "type": "t_mapping(t_address,t_struct(NodeLinkedListItem)6229_storage)", + "contract": "NodeRegistry", + "src": "contracts/NodeRegistry/NodeRegistry.sol:53" + }, + { + "label": "whitelist", + "offset": 0, + "slot": "204", + "type": "t_mapping(t_address,t_enum(WhitelistState)6214)", + "contract": "NodeRegistry", + "src": "contracts/NodeRegistry/NodeRegistry.sol:54" + } + ], + "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_enum(WhitelistState)6214": { + "label": "enum NodeRegistry.WhitelistState", + "members": [ + "None", + "Approved", + "Rejected" + ], + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_enum(WhitelistState)6214)": { + "label": "mapping(address => enum NodeRegistry.WhitelistState)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_struct(NodeLinkedListItem)6229_storage)": { + "label": "mapping(address => struct NodeRegistry.NodeLinkedListItem)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Node)6221_storage": { + "label": "struct NodeRegistry.Node", + "members": [ + { + "label": "nodeAddress", + "type": "t_address", + "offset": 0, + "slot": "0" + }, + { + "label": "metadata", + "type": "t_string_storage", + "offset": 0, + "slot": "1" + }, + { + "label": "lastSeen", + "type": "t_uint256", + "offset": 0, + "slot": "2" + } + ], + "numberOfBytes": "96" + }, + "t_struct(NodeLinkedListItem)6229_storage": { + "label": "struct NodeRegistry.NodeLinkedListItem", + "members": [ + { + "label": "node", + "type": "t_struct(Node)6221_storage", + "offset": 0, + "slot": "0" + }, + { + "label": "next", + "type": "t_address", + "offset": 0, + "slot": "3" + }, + { + "label": "prev", + "type": "t_address", + "offset": 0, + "slot": "4" + } + ], + "numberOfBytes": "160" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint64": { + "label": "uint64", + "numberOfBytes": "8" + } + } + } + }, + "66db4b0ef2108abc988b52ec3204b6f10a684681043dc8d85e19cd83a7756704": { + "address": "0xd06D236590F22EEf21583A757Afe27F6AcaC2AA1", + "txHash": "0x53084fcb35158d1fff306e1270559be513d0eb80a280541099ac795f064a2c8d", + "layout": { + "solcVersion": "0.8.9", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable-4.4.2/proxy/utils/Initializable.sol:39" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable-4.4.2/proxy/utils/Initializable.sol:44" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC1967UpgradeUpgradeable", + "src": "@openzeppelin/contracts-upgradeable-4.4.2/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:215" + }, + { + "label": "__gap", + "offset": 0, + "slot": "51", + "type": "t_array(t_uint256)50_storage", + "contract": "UUPSUpgradeable", + "src": "@openzeppelin/contracts-upgradeable-4.4.2/proxy/utils/UUPSUpgradeable.sol:81" + }, + { + "label": "__gap", + "offset": 0, + "slot": "101", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable-4.4.2/utils/ContextUpgradeable.sol:31" + }, + { + "label": "_trustedForwarder", + "offset": 0, + "slot": "151", + "type": "t_address", + "contract": "ERC2771ContextUpgradeable", + "src": "contracts/StreamRegistry/ERC2771ContextUpgradeable.sol:15" + }, + { + "label": "__gap", + "offset": 0, + "slot": "152", + "type": "t_array(t_uint256)49_storage", + "contract": "ERC2771ContextUpgradeable", + "src": "contracts/StreamRegistry/ERC2771ContextUpgradeable.sol:51" + }, + { + "label": "streamRegistry", + "offset": 0, + "slot": "201", + "type": "t_contract(StreamRegistryV4)16016", + "contract": "StreamStorageRegistryV2", + "src": "contracts/StreamStorageRegistry/StreamStorageRegistryV2.sol:19" + }, + { + "label": "nodeRegistry", + "offset": 0, + "slot": "202", + "type": "t_contract(NodeRegistry)6818", + "contract": "StreamStorageRegistryV2", + "src": "contracts/StreamStorageRegistry/StreamStorageRegistryV2.sol:20" + }, + { + "label": "pairs", + "offset": 0, + "slot": "203", + "type": "t_mapping(t_string_memory_ptr,t_mapping(t_address,t_struct(StreamNodePair)23547_storage))", + "contract": "StreamStorageRegistryV2", + "src": "contracts/StreamStorageRegistry/StreamStorageRegistryV2.sol:25" + } + ], + "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(NodeRegistry)6818": { + "label": "contract NodeRegistry", + "numberOfBytes": "20" + }, + "t_contract(StreamRegistryV4)16016": { + "label": "contract StreamRegistryV4", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_struct(StreamNodePair)23547_storage)": { + "label": "mapping(address => struct StreamStorageRegistryV2.StreamNodePair)", + "numberOfBytes": "32" + }, + "t_mapping(t_string_memory_ptr,t_mapping(t_address,t_struct(StreamNodePair)23547_storage))": { + "label": "mapping(string => mapping(address => struct StreamStorageRegistryV2.StreamNodePair))", + "numberOfBytes": "32" + }, + "t_string_memory_ptr": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(StreamNodePair)23547_storage": { + "label": "struct StreamStorageRegistryV2.StreamNodePair", + "members": [ + { + "label": "dateCreated", + "type": "t_uint256", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string" + } + } + } + }, + "da14434f272fc45b859d7c1bd0a7e850a40a79669069fa09af9592b13bcb4060": { + "address": "0x93965Af01C326F2308AAcB778EF96d7e29dEf515", + "txHash": "0xa862442ea66d801e95f37057ea0b229d538029933b45f5b33f8a423861cfc31d", + "layout": { + "solcVersion": "0.8.13", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "__gap", + "offset": 0, + "slot": "51", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC165Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol:41" + }, + { + "label": "_roles", + "offset": 0, + "slot": "101", + "type": "t_mapping(t_bytes32,t_struct(RoleData)7024_storage)", + "contract": "AccessControlUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:61" + }, + { + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage", + "contract": "AccessControlUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:259" + }, + { + "label": "__gap", + "offset": 0, + "slot": "151", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC1967UpgradeUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:211" + }, + { + "label": "__gap", + "offset": 0, + "slot": "201", + "type": "t_array(t_uint256)50_storage", + "contract": "UUPSUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol:107" + }, + { + "label": "slashingFraction", + "offset": 0, + "slot": "251", + "type": "t_uint256", + "contract": "StreamrConfigV1_1", + "src": "contracts/OperatorTokenomics/StreamrConfigV1_1.sol:46" + }, + { + "label": "minimumSelfDelegationFraction", + "offset": 0, + "slot": "252", + "type": "t_uint256", + "contract": "StreamrConfigV1_1", + "src": "contracts/OperatorTokenomics/StreamrConfigV1_1.sol:52" + }, + { + "label": "minimumDelegationWei", + "offset": 0, + "slot": "253", + "type": "t_uint256", + "contract": "StreamrConfigV1_1", + "src": "contracts/OperatorTokenomics/StreamrConfigV1_1.sol:55" + }, + { + "label": "maxQueueSeconds", + "offset": 0, + "slot": "254", + "type": "t_uint256", + "contract": "StreamrConfigV1_1", + "src": "contracts/OperatorTokenomics/StreamrConfigV1_1.sol:61" + }, + { + "label": "maxPenaltyPeriodSeconds", + "offset": 0, + "slot": "255", + "type": "t_uint256", + "contract": "StreamrConfigV1_1", + "src": "contracts/OperatorTokenomics/StreamrConfigV1_1.sol:68" + }, + { + "label": "earlyLeaverPenaltyWei", + "offset": 0, + "slot": "256", + "type": "t_uint256", + "contract": "StreamrConfigV1_1", + "src": "contracts/OperatorTokenomics/StreamrConfigV1_1.sol:73" + }, + { + "label": "maxAllowedEarningsFraction", + "offset": 0, + "slot": "257", + "type": "t_uint256", + "contract": "StreamrConfigV1_1", + "src": "contracts/OperatorTokenomics/StreamrConfigV1_1.sol:84" + }, + { + "label": "fishermanRewardFraction", + "offset": 0, + "slot": "258", + "type": "t_uint256", + "contract": "StreamrConfigV1_1", + "src": "contracts/OperatorTokenomics/StreamrConfigV1_1.sol:92" + }, + { + "label": "protocolFeeFraction", + "offset": 0, + "slot": "259", + "type": "t_uint256", + "contract": "StreamrConfigV1_1", + "src": "contracts/OperatorTokenomics/StreamrConfigV1_1.sol:95" + }, + { + "label": "protocolFeeBeneficiary", + "offset": 0, + "slot": "260", + "type": "t_address", + "contract": "StreamrConfigV1_1", + "src": "contracts/OperatorTokenomics/StreamrConfigV1_1.sol:98" + }, + { + "label": "minEligibleVoterFractionOfAllStake", + "offset": 0, + "slot": "261", + "type": "t_uint256", + "contract": "StreamrConfigV1_1", + "src": "contracts/OperatorTokenomics/StreamrConfigV1_1.sol:101" + }, + { + "label": "minEligibleVoterAge", + "offset": 0, + "slot": "262", + "type": "t_uint256", + "contract": "StreamrConfigV1_1", + "src": "contracts/OperatorTokenomics/StreamrConfigV1_1.sol:104" + }, + { + "label": "flagReviewerCount", + "offset": 0, + "slot": "263", + "type": "t_uint256", + "contract": "StreamrConfigV1_1", + "src": "contracts/OperatorTokenomics/StreamrConfigV1_1.sol:107" + }, + { + "label": "flagReviewerRewardWei", + "offset": 0, + "slot": "264", + "type": "t_uint256", + "contract": "StreamrConfigV1_1", + "src": "contracts/OperatorTokenomics/StreamrConfigV1_1.sol:110" + }, + { + "label": "flaggerRewardWei", + "offset": 0, + "slot": "265", + "type": "t_uint256", + "contract": "StreamrConfigV1_1", + "src": "contracts/OperatorTokenomics/StreamrConfigV1_1.sol:113" + }, + { + "label": "flagReviewerSelectionIterations", + "offset": 0, + "slot": "266", + "type": "t_uint256", + "contract": "StreamrConfigV1_1", + "src": "contracts/OperatorTokenomics/StreamrConfigV1_1.sol:116" + }, + { + "label": "flagStakeWei", + "offset": 0, + "slot": "267", + "type": "t_uint256", + "contract": "StreamrConfigV1_1", + "src": "contracts/OperatorTokenomics/StreamrConfigV1_1.sol:119" + }, + { + "label": "reviewPeriodSeconds", + "offset": 0, + "slot": "268", + "type": "t_uint256", + "contract": "StreamrConfigV1_1", + "src": "contracts/OperatorTokenomics/StreamrConfigV1_1.sol:126" + }, + { + "label": "votingPeriodSeconds", + "offset": 0, + "slot": "269", + "type": "t_uint256", + "contract": "StreamrConfigV1_1", + "src": "contracts/OperatorTokenomics/StreamrConfigV1_1.sol:131" + }, + { + "label": "flagProtectionSeconds", + "offset": 0, + "slot": "270", + "type": "t_uint256", + "contract": "StreamrConfigV1_1", + "src": "contracts/OperatorTokenomics/StreamrConfigV1_1.sol:137" + }, + { + "label": "sponsorshipFactory", + "offset": 0, + "slot": "271", + "type": "t_address", + "contract": "StreamrConfigV1_1", + "src": "contracts/OperatorTokenomics/StreamrConfigV1_1.sol:139" + }, + { + "label": "operatorFactory", + "offset": 0, + "slot": "272", + "type": "t_address", + "contract": "StreamrConfigV1_1", + "src": "contracts/OperatorTokenomics/StreamrConfigV1_1.sol:140" + }, + { + "label": "voterRegistry", + "offset": 0, + "slot": "273", + "type": "t_address", + "contract": "StreamrConfigV1_1", + "src": "contracts/OperatorTokenomics/StreamrConfigV1_1.sol:141" + }, + { + "label": "trustedForwarder", + "offset": 0, + "slot": "274", + "type": "t_address", + "contract": "StreamrConfigV1_1", + "src": "contracts/OperatorTokenomics/StreamrConfigV1_1.sol:143" + }, + { + "label": "operatorContractOnlyJoinPolicy", + "offset": 0, + "slot": "275", + "type": "t_address", + "contract": "StreamrConfigV1_1", + "src": "contracts/OperatorTokenomics/StreamrConfigV1_1.sol:148" + }, + { + "label": "streamRegistryAddress", + "offset": 0, + "slot": "276", + "type": "t_address", + "contract": "StreamrConfigV1_1", + "src": "contracts/OperatorTokenomics/StreamrConfigV1_1.sol:150" + }, + { + "label": "randomOracle", + "offset": 0, + "slot": "277", + "type": "t_address", + "contract": "StreamrConfigV1_1", + "src": "contracts/OperatorTokenomics/StreamrConfigV1_1.sol:156" + }, + { + "label": "minimumDelegationSeconds", + "offset": 0, + "slot": "278", + "type": "t_uint256", + "contract": "StreamrConfigV1_1", + "src": "contracts/OperatorTokenomics/StreamrConfigV1_1.sol:159" + } + ], + "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_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_struct(RoleData)7024_storage)": { + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32" + }, + "t_struct(RoleData)7024_storage": { + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "label": "members", + "type": "t_mapping(t_address,t_bool)", + "offset": 0, + "slot": "0" + }, + { + "label": "adminRole", + "type": "t_bytes32", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } + }, + "e1a910407f5a4f597e47aec026988f63100d0410e1347c4ed7877610e6cbfde0": { + "address": "0x81813040658742Ef6c3B3E67175fe29674F67dF1", + "txHash": "0x895c10074a4290ef06f430e4e34f996871c9a0df9b2ab5fadaa01554f3068f96", + "layout": { + "solcVersion": "0.8.13", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC1967UpgradeUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:211" + }, + { + "label": "__gap", + "offset": 0, + "slot": "51", + "type": "t_array(t_uint256)50_storage", + "contract": "UUPSUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol:107" + }, + { + "label": "__gap", + "offset": 0, + "slot": "101", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "__gap", + "offset": 0, + "slot": "151", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC165Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol:41" + }, + { + "label": "_roles", + "offset": 0, + "slot": "201", + "type": "t_mapping(t_bytes32,t_struct(RoleData)7024_storage)", + "contract": "AccessControlUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:61" + }, + { + "label": "__gap", + "offset": 0, + "slot": "202", + "type": "t_array(t_uint256)49_storage", + "contract": "AccessControlUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:259" + }, + { + "label": "__gap", + "offset": 0, + "slot": "251", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC2771ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/metatx/ERC2771ContextUpgradeable.sol:50" + }, + { + "label": "operatorTemplate", + "offset": 0, + "slot": "301", + "type": "t_address", + "contract": "OperatorFactory", + "src": "contracts/OperatorTokenomics/OperatorFactory.sol:41" + }, + { + "label": "nodeModuleTemplate", + "offset": 0, + "slot": "302", + "type": "t_address", + "contract": "OperatorFactory", + "src": "contracts/OperatorTokenomics/OperatorFactory.sol:42" + }, + { + "label": "queueModuleTemplate", + "offset": 0, + "slot": "303", + "type": "t_address", + "contract": "OperatorFactory", + "src": "contracts/OperatorTokenomics/OperatorFactory.sol:43" + }, + { + "label": "stakeModuleTemplate", + "offset": 0, + "slot": "304", + "type": "t_address", + "contract": "OperatorFactory", + "src": "contracts/OperatorTokenomics/OperatorFactory.sol:44" + }, + { + "label": "tokenAddress", + "offset": 0, + "slot": "305", + "type": "t_address", + "contract": "OperatorFactory", + "src": "contracts/OperatorTokenomics/OperatorFactory.sol:45" + }, + { + "label": "streamrConfig", + "offset": 0, + "slot": "306", + "type": "t_contract(StreamrConfig)24304", + "contract": "OperatorFactory", + "src": "contracts/OperatorTokenomics/OperatorFactory.sol:46" + }, + { + "label": "trustedPolicies", + "offset": 0, + "slot": "307", + "type": "t_mapping(t_address,t_bool)", + "contract": "OperatorFactory", + "src": "contracts/OperatorTokenomics/OperatorFactory.sol:47" + }, + { + "label": "deploymentTimestamp", + "offset": 0, + "slot": "308", + "type": "t_mapping(t_address,t_uint256)", + "contract": "OperatorFactory", + "src": "contracts/OperatorTokenomics/OperatorFactory.sol:50" + }, + { + "label": "voters", + "offset": 0, + "slot": "309", + "type": "t_array(t_address)dyn_storage", + "contract": "OperatorFactory", + "src": "contracts/OperatorTokenomics/OperatorFactory.sol:53" + }, + { + "label": "votersIndex", + "offset": 0, + "slot": "310", + "type": "t_mapping(t_address,t_uint256)", + "contract": "OperatorFactory", + "src": "contracts/OperatorTokenomics/OperatorFactory.sol:55" + }, + { + "label": "operators", + "offset": 0, + "slot": "311", + "type": "t_mapping(t_address,t_address)", + "contract": "OperatorFactory", + "src": "contracts/OperatorTokenomics/OperatorFactory.sol:58" + }, + { + "label": "totalStakedWei", + "offset": 0, + "slot": "312", + "type": "t_uint256", + "contract": "OperatorFactory", + "src": "contracts/OperatorTokenomics/OperatorFactory.sol:60" + }, + { + "label": "stakedWei", + "offset": 0, + "slot": "313", + "type": "t_mapping(t_address,t_uint256)", + "contract": "OperatorFactory", + "src": "contracts/OperatorTokenomics/OperatorFactory.sol:61" + } + ], + "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_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_contract(StreamrConfig)24304": { + "label": "contract StreamrConfig", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_address)": { + "label": "mapping(address => address)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_uint256)": { + "label": "mapping(address => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_struct(RoleData)7024_storage)": { + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32" + }, + "t_struct(RoleData)7024_storage": { + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "label": "members", + "type": "t_mapping(t_address,t_bool)", + "offset": 0, + "slot": "0" + }, + { + "label": "adminRole", + "type": "t_bytes32", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } + }, + "8f309c745ebcc1de0a2efeaa7db57b4dadfa7bae33f22d58b9d72aa5e77f842f": { + "address": "0x959684926448296ea72BD4B05593426A3cD3F0dF", + "txHash": "0x4dc53fbb08b6735529abcca0ffa88514ce28c108fa47730fe5a1585f29543205", + "layout": { + "solcVersion": "0.8.13", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "__gap", + "offset": 0, + "slot": "51", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC165Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol:41" + }, + { + "label": "_roles", + "offset": 0, + "slot": "101", + "type": "t_mapping(t_bytes32,t_struct(RoleData)7024_storage)", + "contract": "AccessControlUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:61" + }, + { + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage", + "contract": "AccessControlUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:259" + }, + { + "label": "__gap", + "offset": 0, + "slot": "151", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC1967UpgradeUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:211" + }, + { + "label": "__gap", + "offset": 0, + "slot": "201", + "type": "t_array(t_uint256)50_storage", + "contract": "UUPSUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol:107" + }, + { + "label": "__gap", + "offset": 0, + "slot": "251", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC2771ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/metatx/ERC2771ContextUpgradeable.sol:50" + }, + { + "label": "streamrConfig", + "offset": 0, + "slot": "301", + "type": "t_contract(StreamrConfig)24304", + "contract": "SponsorshipFactory", + "src": "contracts/OperatorTokenomics/SponsorshipFactory.sol:30" + }, + { + "label": "sponsorshipContractTemplate", + "offset": 0, + "slot": "302", + "type": "t_address", + "contract": "SponsorshipFactory", + "src": "contracts/OperatorTokenomics/SponsorshipFactory.sol:31" + }, + { + "label": "tokenAddress", + "offset": 0, + "slot": "303", + "type": "t_address", + "contract": "SponsorshipFactory", + "src": "contracts/OperatorTokenomics/SponsorshipFactory.sol:32" + }, + { + "label": "trustedPolicies", + "offset": 0, + "slot": "304", + "type": "t_mapping(t_address,t_bool)", + "contract": "SponsorshipFactory", + "src": "contracts/OperatorTokenomics/SponsorshipFactory.sol:33" + }, + { + "label": "deploymentTimestamp", + "offset": 0, + "slot": "305", + "type": "t_mapping(t_address,t_uint256)", + "contract": "SponsorshipFactory", + "src": "contracts/OperatorTokenomics/SponsorshipFactory.sol:34" + } + ], + "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_contract(StreamrConfig)24304": { + "label": "contract StreamrConfig", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_uint256)": { + "label": "mapping(address => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_struct(RoleData)7024_storage)": { + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32" + }, + "t_struct(RoleData)7024_storage": { + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "label": "members", + "type": "t_mapping(t_address,t_bool)", + "offset": 0, + "slot": "0" + }, + { + "label": "adminRole", + "type": "t_bytes32", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } + } + } +} diff --git a/packages/network-contracts/build.sh b/packages/network-contracts/build.sh index 3ba35f71a..2608f93f5 100755 --- a/packages/network-contracts/build.sh +++ b/packages/network-contracts/build.sh @@ -2,8 +2,7 @@ set -ex rm -rf artifacts -hardhat compile -cp ../../node_modules/@ensdomains/ens-contracts/deployments/archive/PublicResolver_mainnet_9412610.sol/PublicResolver_mainnet_9412610.json artifacts/PublicResolver_mainnet_9412610.json +npm run compile rm -rf dist tsc -p tsconfig.build.json diff --git a/packages/network-contracts/hardhat.config.ts b/packages/network-contracts/hardhat.config.ts index bc17cfbb2..943f48459 100644 --- a/packages/network-contracts/hardhat.config.ts +++ b/packages/network-contracts/hardhat.config.ts @@ -8,12 +8,16 @@ import "@nomiclabs/hardhat-etherscan" import "hardhat-contract-sizer" // import "hardhat-gas-reporter" +import "./tasks/copyFilesAfterCompilation" + import { HardhatUserConfig } from "hardhat/types" declare module "hardhat/types/config" { interface HardhatUserConfig { - dependencyCompiler?: any; - contractSizer?: any; + dependencyCompiler?: any; + contractSizer?: any; + warnings?: any; + etherscan?: any; } } @@ -90,7 +94,21 @@ const config: HardhatUserConfig = { chainId: 3338, url: "https://peaq.api.onfinality.io/public", accounts: [process.env.KEY || "0x5e98cce00cff5dea6b454889f359a4ec06b9fa6b88e9d69b86de8e1c81887da0"] // dummy key - } + }, + iotex: { + url: "https://babel-api.mainnet.IoTeX.io", + chainId: 4689, + gas: 8500000, + gasPrice: 1000000000000, + accounts: [process.env.KEY || "0x5e98cce00cff5dea6b454889f359a4ec06b9fa6b88e9d69b86de8e1c81887da0"], // dummy key + }, + iotexTestnet: { + url: "https://babel-api.testnet.IoTeX.io", + chainId: 4690, + gas: 8500000, + gasPrice: 1000000000000, + accounts: [process.env.KEY || "0x5e98cce00cff5dea6b454889f359a4ec06b9fa6b88e9d69b86de8e1c81887da0"], // dummy key + }, }, dependencyCompiler: { paths: [ @@ -107,6 +125,11 @@ const config: HardhatUserConfig = { "@ensdomains/ens-contracts/contracts/registry/ENSRegistry.sol", // exported in exports.ts ], }, + copyFilesAfterCompilation: [{ + from: "../../node_modules/" + + "@ensdomains/ens-contracts/deployments/archive/PublicResolver_mainnet_9412610.sol/PublicResolver_mainnet_9412610.json", + to: "./artifacts/PublicResolver_mainnet_9412610.json", + }], solidity: { compilers: [ { @@ -181,6 +204,8 @@ const config: HardhatUserConfig = { polygon: process.env.ETHERSCAN_KEY || "", polygonAmoy: process.env.ETHERSCAN_KEY || "", peaq: process.env.ETHERSCAN_KEY || "", + iotexTestnet: "no key needed!", + iotex: "no key needed!", }, customChains: [{ network: "polygonAmoy", @@ -196,6 +221,20 @@ const config: HardhatUserConfig = { apiURL: "https://peaq-testnet.api.subscan.io", browserURL: "https://peaq.subscan.io/" }, + }, { + network: "iotex", + chainId: 4689, + urls: { + apiURL: "https://iotexscout.io/api", + browserURL: "https://iotexscan.io" + }, + }, { + network: "iotexTestnet", + chainId: 4690, + urls: { + apiURL: "https://testnet.iotexscout.io/api", + browserURL: "https://testnet.iotexscan.io" + }, }] }, } diff --git a/packages/network-contracts/logs/2024-10-30-deploy-to-iotex-testnet.txt b/packages/network-contracts/logs/2024-10-30-deploy-to-iotex-testnet.txt new file mode 100644 index 000000000..aa5a20104 --- /dev/null +++ b/packages/network-contracts/logs/2024-10-30-deploy-to-iotex-testnet.txt @@ -0,0 +1,527 @@ +$ ./scripts/2024-10-25-deploy-to-iotex-testnet.sh [11:12:31] ++ '[' -z ']' ++ export CHAIN=iotexTestnet ++ CHAIN=iotexTestnet ++ export SCRIPT_FILE=scripts/deployStreamrContracts.ts ++ SCRIPT_FILE=scripts/deployStreamrContracts.ts ++ npm run hardhatScript + +> @streamr/network-contracts@7.1.1 hardhatScript +> hardhat run --network $CHAIN $SCRIPT_FILE + +You have both ethereum-waffle and @nomicfoundation/hardhat-chai-matchers installed. They don't work correctly together, so please make sure you only use one. + +We recommend you migrate to @nomicfoundation/hardhat-chai-matchers. Learn how to do it here: https://hardhat.org/migrate-from-waffle + ·----------------------------------|--------------------------------|--------------------------------· + | Solc version: 0.8.13 · Optimizer enabled: true · Runs: 100 │ + ···································|································|································· + | Contract Name · Deployed size (KiB) (change) · Initcode size (KiB) (change) │ + ···································|································|································· + | AcceptEverythingPaymaster · 3.571 (0.000) · 3.694 (0.000) │ + ···································|································|································· + | AddressUpgradeable · 0.084 (0.000) · 0.138 (0.000) │ + ···································|································|································· + | AddressUpgradeable · 0.084 (0.000) · 0.138 (0.000) │ + ···································|································|································· + | AdminKickPolicy · 11.931 (0.000) · 11.976 (0.000) │ + ···································|································|································· + | BasicToken · 0.497 (0.000) · 0.528 (0.000) │ + ···································|································|································· + | BufferChainlink · 0.084 (0.000) · 0.138 (0.000) │ + ···································|································|································· + | CBORChainlink · 0.084 (0.000) · 0.138 (0.000) │ + ···································|································|································· + | Chainlink · 0.084 (0.000) · 0.138 (0.000) │ + ···································|································|································· + | ClonesUpgradeable · 0.084 (0.000) · 0.138 (0.000) │ + ···································|································|································· + | DefaultDelegationPolicy · 18.962 (0.000) · 19.007 (0.000) │ + ···································|································|································· + | DefaultExchangeRatePolicy · 18.966 (0.000) · 19.011 (0.000) │ + ···································|································|································· + | DefaultLeavePolicy · 11.669 (0.000) · 11.714 (0.000) │ + ···································|································|································· + | DefaultUndelegationPolicy · 19.318 (0.000) · 19.363 (0.000) │ + ···································|································|································· + | ECDSA · 0.084 (0.000) · 0.138 (0.000) │ + ···································|································|································· + | ECDSAUpgradeable · 0.084 (0.000) · 0.138 (0.000) │ + ···································|································|································· + | ENSCache · 7.256 (0.000) · 7.967 (0.000) │ + ···································|································|································· + | ENSCacheV1 · 6.815 (0.000) · 7.526 (0.000) │ + ···································|································|································· + | ENSCacheV2Streamr · 5.178 (0.000) · 5.252 (0.000) │ + ···································|································|································· + | ENSRegistry · 2.417 (0.000) · 2.504 (0.000) │ + ···································|································|································· + | ERC20 · 2.190 (0.000) · 2.832 (0.000) │ + ···································|································|································· + | ERC20Mintable · 2.525 (0.000) · 3.192 (0.000) │ + ···································|································|································· + | ERC20Upgradeable · 2.097 (0.000) · 2.128 (0.000) │ + ···································|································|································· + | FIFSRegistrar · 0.574 (0.000) · 0.731 (0.000) │ + ···································|································|································· + | Forwarder · 4.759 (0.000) · 5.229 (0.000) │ + ···································|································|································· + | GsnEip712Library · 1.294 (0.000) · 1.351 (0.000) │ + ···································|································|································· + | GsnUtils · 0.084 (0.000) · 0.138 (0.000) │ + ···································|································|································· + | LinkToken · 2.676 (0.000) · 2.736 (0.000) │ + ···································|································|································· + | MathUpgradeable · 0.084 (0.000) · 0.138 (0.000) │ + ···································|································|································· + | MaxOperatorsJoinPolicy · 11.454 (0.000) · 11.499 (0.000) │ + ···································|································|································· + | MinimalForwarder · 2.813 (0.000) · 3.156 (0.000) │ + ···································|································|································· + | MinimalForwarderUpgradeable · 2.394 (0.000) · 2.425 (0.000) │ + ···································|································|································· + | MinLibBytes · 0.084 (0.000) · 0.138 (0.000) │ + ···································|································|································· + | MockERC1271 · 1.637 (0.000) · 1.668 (0.000) │ + ···································|································|································· + | MockRandomOracle · 0.734 (0.000) · 0.921 (0.000) │ + ···································|································|································· + | NetworkParameters · 1.621 (0.000) · 2.296 (0.000) │ + ···································|································|································· + | NodeDomainNameHelper · 0.452 (0.000) · 0.483 (0.000) │ + ···································|································|································· + | NodeModule · 20.818 (0.000) · 20.863 (0.000) │ + ···································|································|································· + | NodeRegistry · 8.724 (0.000) · 8.791 (0.000) │ + ···································|································|································· + | Operator · 18.695 (0.000) · 18.740 (0.000) │ + ···································|································|································· + | OperatorContractOnlyJoinPolicy · 11.516 (0.000) · 11.561 (0.000) │ + ···································|································|································· + | OperatorFactory · 11.744 (0.000) · 11.830 (0.000) │ + ···································|································|································· + | Oracle · 4.589 (0.000) · 4.763 (0.000) │ + ···································|································|································· + | Ownable · 0.551 (0.000) · 0.694 (0.000) │ + ···································|································|································· + | QueueModule · 21.135 (0.000) · 21.180 (0.000) │ + ···································|································|································· + | SafeMath · 0.084 (0.000) · 0.138 (0.000) │ + ···································|································|································· + | SafeMathChainlink · 0.084 (0.000) · 0.118 (0.000) │ + ···································|································|································· + | SafeMathChainlink · 0.074 (0.000) · 0.117 (0.000) │ + ···································|································|································· + | Sponsorship · 11.184 (0.000) · 11.229 (0.000) │ + ···································|································|································· + | SponsorshipFactory · 10.454 (0.000) · 10.540 (0.000) │ + ···································|································|································· + | StakeModule · 23.106 (0.000) · 23.152 (0.000) │ + ···································|································|································· + | StakeWeightedAllocationPolicy · 13.097 (0.000) · 13.142 (0.000) │ + ···································|································|································· + | StandardToken · 1.501 (0.000) · 1.532 (0.000) │ + ···································|································|································· + | StorageSlotUpgradeable · 0.084 (0.000) · 0.138 (0.000) │ + ···································|································|································· + | StorageSlotUpgradeable · 0.084 (0.000) · 0.138 (0.000) │ + ···································|································|································· + | StreamrConfig · 10.344 (0.000) · 10.418 (0.000) │ + ···································|································|································· + | StreamrConfigV1_1 · 10.505 (0.000) · 10.579 (0.000) │ + ···································|································|································· + | StreamRegistry · 20.528 (0.000) · 20.596 (0.000) │ + ···································|································|································· + | StreamRegistryV2 · 20.520 (0.000) · 20.587 (0.000) │ + ···································|································|································· + | StreamRegistryV3 · 22.183 (0.000) · 22.251 (0.000) │ + ···································|································|································· + | StreamRegistryV4 · 23.188 (0.000) · 23.257 (0.000) │ + ···································|································|································· + | StreamRegistryV4_1 · 23.265 (0.000) · 23.333 (0.000) │ + ···································|································|································· + | StreamRegistryV5 · 23.490 (0.000) · 23.559 (0.000) │ + ···································|································|································· + | StreamRegistryV5_1 · 23.567 (0.000) · 23.636 (0.000) │ + ···································|································|································· + | StreamStorageRegistry · 7.505 (0.000) · 7.572 (0.000) │ + ···································|································|································· + | StreamStorageRegistryV2 · 7.833 (0.000) · 7.900 (0.000) │ + ···································|································|································· + | Strings · 0.084 (0.000) · 0.138 (0.000) │ + ···································|································|································· + | StringsUpgradeable · 0.084 (0.000) · 0.138 (0.000) │ + ···································|································|································· + | StringsUpgradeable · 0.084 (0.000) · 0.138 (0.000) │ + ···································|································|································· + | TestAllocationPolicy · 12.381 (0.000) · 12.426 (0.000) │ + ···································|································|································· + | TestBadOperator · 2.888 (0.000) · 2.953 (0.000) │ + ···································|································|································· + | TestExchangeRatePolicy · 0.397 (0.000) · 0.429 (0.000) │ + ···································|································|································· + | TestExchangeRatePolicy2 · 0.464 (0.000) · 0.495 (0.000) │ + ···································|································|································· + | TestExchangeRatePolicy3 · 0.392 (0.000) · 0.423 (0.000) │ + ···································|································|································· + | TestJoinPolicy · 11.453 (0.000) · 11.498 (0.000) │ + ···································|································|································· + | TestKickPolicy · 11.760 (0.000) · 11.805 (0.000) │ + ···································|································|································· + | TestToken · 2.818 (0.000) · 3.466 (0.000) │ + ···································|································|································· + | TokenBalanceWeightStrategy · 0.390 (0.000) · 0.533 (0.000) │ + ···································|································|································· + | TrackerRegistry · 5.609 (0.000) · 8.042 (0.000) │ + ···································|································|································· + | VoteKickPolicy · 19.976 (0.000) · 20.021 (0.000) │ + ···································|································|································· + | WeightedNodeRegistry · 9.456 (0.000) · 9.523 (0.000) │ + ···································|································|································· + | WhitelistPaymaster · 4.631 (0.000) · 4.754 (0.000) │ + ·----------------------------------|--------------------------------|--------------------------------· +You have both ethereum-waffle and @nomicfoundation/hardhat-chai-matchers installed. They don't work correctly together, so please make sure you only use one. + +We recommend you migrate to @nomicfoundation/hardhat-chai-matchers. Learn how to do it here: https://hardhat.org/migrate-from-waffle +Connected to network { chainId: 4690, name: 'unknown' } +Estimated gas cost: 60.0 ETH (gas price 1000.0 gwei) +Balance of 0x41e36D4fFb5B443B20f55bcFf27c68fF086Fe06f: 252.503367 ETH +Found DATA token at 0x5ABD469031d2B5f939808565EAB8562d7Cbaa939 +Deployed StreamRegistry to 0xDC695780959aa5aEe9B28dfED7332032e3045210 +ENSCacheV2 deployed at 0xDDf8FB60f8c3ffb1C20375A30f6D8CFB0C48Bd38 +Granting trusted role to self (0x41e36D4fFb5B443B20f55bcFf27c68fF086Fe06f): https://testnet.iotexscan.io/tx/0x5aaebf72eee4ed11659595fac930acdbd6ccf87b5c641bbc1c5a2aca5a113cd8 +Setting ENSCacheV2 on StreamRegistry: https://testnet.iotexscan.io/tx/0x80bae7233422ada488a080018d09fddefe3e3cfbf0ce70fcb46978ea2b78c15d +Granting trusted role to ENSCacheV2: https://testnet.iotexscan.io/tx/0x81209f37494c26d0fefba1ffe72eef2c2e9f6221a4bcdae6a89bcb807a6838f0 +Deployed NodeRegistry to 0xc0F9666fbF16B2ac5726697237BcdF79096e3FA7 +Deployed StreamStorageRegistry to 0xd0C3A69762Bd920C1cAfBE91612a4600429f02f1 +Spent 15.968201 ETH for gas +All done! Streamr contract addresses: +{ + "DATA": "0x5ABD469031d2B5f939808565EAB8562d7Cbaa939", + "StreamRegistry": "0xDC695780959aa5aEe9B28dfED7332032e3045210", + "ENSCacheV2": "0xDDf8FB60f8c3ffb1C20375A30f6D8CFB0C48Bd38", + "StorageNodeRegistry": "0xc0F9666fbF16B2ac5726697237BcdF79096e3FA7", + "StreamStorageRegistry": "0xd0C3A69762Bd920C1cAfBE91612a4600429f02f1" +} ++ read -p 'Copy changed addresses to config, then press enter' +Copy changed addresses to config, then press enter ++ export SCRIPT_FILE=scripts/deployTokenomicsContracts.ts ++ SCRIPT_FILE=scripts/deployTokenomicsContracts.ts ++ npm run hardhatScript + +> @streamr/network-contracts@7.1.1 hardhatScript +> hardhat run --network $CHAIN $SCRIPT_FILE + +You have both ethereum-waffle and @nomicfoundation/hardhat-chai-matchers installed. They don't work correctly together, so please make sure you only use one. + +We recommend you migrate to @nomicfoundation/hardhat-chai-matchers. Learn how to do it here: https://hardhat.org/migrate-from-waffle + ·----------------------------------|--------------------------------|--------------------------------· + | Solc version: 0.8.13 · Optimizer enabled: true · Runs: 100 │ + ···································|································|································· + | Contract Name · Deployed size (KiB) (change) · Initcode size (KiB) (change) │ + ···································|································|································· + | AcceptEverythingPaymaster · 3.571 (0.000) · 3.694 (0.000) │ + ···································|································|································· + | AddressUpgradeable · 0.084 (0.000) · 0.138 (0.000) │ + ···································|································|································· + | AddressUpgradeable · 0.084 (0.000) · 0.138 (0.000) │ + ···································|································|································· + | AdminKickPolicy · 11.931 (0.000) · 11.976 (0.000) │ + ···································|································|································· + | BasicToken · 0.497 (0.000) · 0.528 (0.000) │ + ···································|································|································· + | BufferChainlink · 0.084 (0.000) · 0.138 (0.000) │ + ···································|································|································· + | CBORChainlink · 0.084 (0.000) · 0.138 (0.000) │ + ···································|································|································· + | Chainlink · 0.084 (0.000) · 0.138 (0.000) │ + ···································|································|································· + | ClonesUpgradeable · 0.084 (0.000) · 0.138 (0.000) │ + ···································|································|································· + | DefaultDelegationPolicy · 18.962 (0.000) · 19.007 (0.000) │ + ···································|································|································· + | DefaultExchangeRatePolicy · 18.966 (0.000) · 19.011 (0.000) │ + ···································|································|································· + | DefaultLeavePolicy · 11.669 (0.000) · 11.714 (0.000) │ + ···································|································|································· + | DefaultUndelegationPolicy · 19.318 (0.000) · 19.363 (0.000) │ + ···································|································|································· + | ECDSA · 0.084 (0.000) · 0.138 (0.000) │ + ···································|································|································· + | ECDSAUpgradeable · 0.084 (0.000) · 0.138 (0.000) │ + ···································|································|································· + | ENSCache · 7.256 (0.000) · 7.967 (0.000) │ + ···································|································|································· + | ENSCacheV1 · 6.815 (0.000) · 7.526 (0.000) │ + ···································|································|································· + | ENSCacheV2Streamr · 5.178 (0.000) · 5.252 (0.000) │ + ···································|································|································· + | ENSRegistry · 2.417 (0.000) · 2.504 (0.000) │ + ···································|································|································· + | ERC20 · 2.190 (0.000) · 2.832 (0.000) │ + ···································|································|································· + | ERC20Mintable · 2.525 (0.000) · 3.192 (0.000) │ + ···································|································|································· + | ERC20Upgradeable · 2.097 (0.000) · 2.128 (0.000) │ + ···································|································|································· + | FIFSRegistrar · 0.574 (0.000) · 0.731 (0.000) │ + ···································|································|································· + | Forwarder · 4.759 (0.000) · 5.229 (0.000) │ + ···································|································|································· + | GsnEip712Library · 1.294 (0.000) · 1.351 (0.000) │ + ···································|································|································· + | GsnUtils · 0.084 (0.000) · 0.138 (0.000) │ + ···································|································|································· + | LinkToken · 2.676 (0.000) · 2.736 (0.000) │ + ···································|································|································· + | MathUpgradeable · 0.084 (0.000) · 0.138 (0.000) │ + ···································|································|································· + | MaxOperatorsJoinPolicy · 11.454 (0.000) · 11.499 (0.000) │ + ···································|································|································· + | MinimalForwarder · 2.813 (0.000) · 3.156 (0.000) │ + ···································|································|································· + | MinimalForwarderUpgradeable · 2.394 (0.000) · 2.425 (0.000) │ + ···································|································|································· + | MinLibBytes · 0.084 (0.000) · 0.138 (0.000) │ + ···································|································|································· + | MockERC1271 · 1.637 (0.000) · 1.668 (0.000) │ + ···································|································|································· + | MockRandomOracle · 0.734 (0.000) · 0.921 (0.000) │ + ···································|································|································· + | NetworkParameters · 1.621 (0.000) · 2.296 (0.000) │ + ···································|································|································· + | NodeDomainNameHelper · 0.452 (0.000) · 0.483 (0.000) │ + ···································|································|································· + | NodeModule · 20.818 (0.000) · 20.863 (0.000) │ + ···································|································|································· + | NodeRegistry · 8.724 (0.000) · 8.791 (0.000) │ + ···································|································|································· + | Operator · 18.695 (0.000) · 18.740 (0.000) │ + ···································|································|································· + | OperatorContractOnlyJoinPolicy · 11.516 (0.000) · 11.561 (0.000) │ + ···································|································|································· + | OperatorFactory · 11.744 (0.000) · 11.830 (0.000) │ + ···································|································|································· + | Oracle · 4.589 (0.000) · 4.763 (0.000) │ + ···································|································|································· + | Ownable · 0.551 (0.000) · 0.694 (0.000) │ + ···································|································|································· + | QueueModule · 21.135 (0.000) · 21.180 (0.000) │ + ···································|································|································· + | SafeMath · 0.084 (0.000) · 0.138 (0.000) │ + ···································|································|································· + | SafeMathChainlink · 0.084 (0.000) · 0.118 (0.000) │ + ···································|································|································· + | SafeMathChainlink · 0.074 (0.000) · 0.117 (0.000) │ + ···································|································|································· + | Sponsorship · 11.184 (0.000) · 11.229 (0.000) │ + ···································|································|································· + | SponsorshipFactory · 10.454 (0.000) · 10.540 (0.000) │ + ···································|································|································· + | StakeModule · 23.106 (0.000) · 23.152 (0.000) │ + ···································|································|································· + | StakeWeightedAllocationPolicy · 13.097 (0.000) · 13.142 (0.000) │ + ···································|································|································· + | StandardToken · 1.501 (0.000) · 1.532 (0.000) │ + ···································|································|································· + | StorageSlotUpgradeable · 0.084 (0.000) · 0.138 (0.000) │ + ···································|································|································· + | StorageSlotUpgradeable · 0.084 (0.000) · 0.138 (0.000) │ + ···································|································|································· + | StreamrConfig · 10.344 (0.000) · 10.418 (0.000) │ + ···································|································|································· + | StreamrConfigV1_1 · 10.505 (0.000) · 10.579 (0.000) │ + ···································|································|································· + | StreamRegistry · 20.528 (0.000) · 20.596 (0.000) │ + ···································|································|································· + | StreamRegistryV2 · 20.520 (0.000) · 20.587 (0.000) │ + ···································|································|································· + | StreamRegistryV3 · 22.183 (0.000) · 22.251 (0.000) │ + ···································|································|································· + | StreamRegistryV4 · 23.188 (0.000) · 23.257 (0.000) │ + ···································|································|································· + | StreamRegistryV4_1 · 23.265 (0.000) · 23.333 (0.000) │ + ···································|································|································· + | StreamRegistryV5 · 23.490 (0.000) · 23.559 (0.000) │ + ···································|································|································· + | StreamRegistryV5_1 · 23.567 (0.000) · 23.636 (0.000) │ + ···································|································|································· + | StreamStorageRegistry · 7.505 (0.000) · 7.572 (0.000) │ + ···································|································|································· + | StreamStorageRegistryV2 · 7.833 (0.000) · 7.900 (0.000) │ + ···································|································|································· + | Strings · 0.084 (0.000) · 0.138 (0.000) │ + ···································|································|································· + | StringsUpgradeable · 0.084 (0.000) · 0.138 (0.000) │ + ···································|································|································· + | StringsUpgradeable · 0.084 (0.000) · 0.138 (0.000) │ + ···································|································|································· + | TestAllocationPolicy · 12.381 (0.000) · 12.426 (0.000) │ + ···································|································|································· + | TestBadOperator · 2.888 (0.000) · 2.953 (0.000) │ + ···································|································|································· + | TestExchangeRatePolicy · 0.397 (0.000) · 0.429 (0.000) │ + ···································|································|································· + | TestExchangeRatePolicy2 · 0.464 (0.000) · 0.495 (0.000) │ + ···································|································|································· + | TestExchangeRatePolicy3 · 0.392 (0.000) · 0.423 (0.000) │ + ···································|································|································· + | TestJoinPolicy · 11.453 (0.000) · 11.498 (0.000) │ + ···································|································|································· + | TestKickPolicy · 11.760 (0.000) · 11.805 (0.000) │ + ···································|································|································· + | TestToken · 2.818 (0.000) · 3.466 (0.000) │ + ···································|································|································· + | TokenBalanceWeightStrategy · 0.390 (0.000) · 0.533 (0.000) │ + ···································|································|································· + | TrackerRegistry · 5.609 (0.000) · 8.042 (0.000) │ + ···································|································|································· + | VoteKickPolicy · 19.976 (0.000) · 20.021 (0.000) │ + ···································|································|································· + | WeightedNodeRegistry · 9.456 (0.000) · 9.523 (0.000) │ + ···································|································|································· + | WhitelistPaymaster · 4.631 (0.000) · 4.754 (0.000) │ + ·----------------------------------|--------------------------------|--------------------------------· +You have both ethereum-waffle and @nomicfoundation/hardhat-chai-matchers installed. They don't work correctly together, so please make sure you only use one. + +We recommend you migrate to @nomicfoundation/hardhat-chai-matchers. Learn how to do it here: https://hardhat.org/migrate-from-waffle +Connected to network { chainId: 4690, name: 'unknown' } +Estimated gas cost: 60.0 ETH (gas price 1000.0 gwei) +Balance of 0x41e36D4fFb5B443B20f55bcFf27c68fF086Fe06f: 236.535166 ETH +Found DATA token at 0x5ABD469031d2B5f939808565EAB8562d7Cbaa939 +Found StreamRegistry at 0xDC695780959aa5aEe9B28dfED7332032e3045210 +Deployed StreamrConfig to 0x6d201374D7c28EF1c3cc1b6FA300f06110B597A3 +Streamr tokenomics contract addresses so far: +{ + "StreamrConfig": "0x6d201374D7c28EF1c3cc1b6FA300f06110B597A3" +} +Done setting StreamrConfig.streamRegistryAddress (https://testnet.iotexscan.io/tx/0x82367362388ff90bba3d9600d55933805b71019745097303c6ff76170b3e1eaa ) +Deploying Operator policies... +Deployed DefaultDelegationPolicy; Streamr tokenomics contract addresses: +{ + "StreamrConfig": "0x6d201374D7c28EF1c3cc1b6FA300f06110B597A3", + "OperatorDefaultDelegationPolicy": "0x67352e3F7dBA907aF877020aE7E9450C0029C70c" +} +Deployed DefaultExchangeRatePolicy; Streamr tokenomics contract addresses: +{ + "StreamrConfig": "0x6d201374D7c28EF1c3cc1b6FA300f06110B597A3", + "OperatorDefaultDelegationPolicy": "0x67352e3F7dBA907aF877020aE7E9450C0029C70c", + "OperatorDefaultExchangeRatePolicy": "0xE41439BF434F9CfBF0153f5231C205d4ae0C22e3" +} +Operator policies deployed; Streamr tokenomics contract addresses: +{ + "StreamrConfig": "0x6d201374D7c28EF1c3cc1b6FA300f06110B597A3", + "OperatorDefaultDelegationPolicy": "0x67352e3F7dBA907aF877020aE7E9450C0029C70c", + "OperatorDefaultExchangeRatePolicy": "0xE41439BF434F9CfBF0153f5231C205d4ae0C22e3", + "OperatorDefaultUndelegationPolicy": "0xF655955dc561356851e95a6D0febeB0BAc955Ab5" +} +Deployed NodeModule at 0xC8E8efAF4CE7bCcFc87878631BC64A1FAe63dc5D +Deployed QueueModule at 0xDa579a9a55158Bc57389f1b05F553DEf38a121c1 +Deployed StakeModule at 0xdc8d23092b93F9BB7416F45dEa36f55996f34867 +Deployed Operator template at 0x1B08F4CC8D5925Fbba64C01E0FC756F24DdE8568 +Warning: Potentially unsafe deployment of contracts/OperatorTokenomics/OperatorFactory.sol:OperatorFactory + + You are using the `unsafeAllow.delegatecall` flag. + +Deployed OperatorFactory; Streamr tokenomics contract addresses: +{ + "StreamrConfig": "0x6d201374D7c28EF1c3cc1b6FA300f06110B597A3", + "OperatorDefaultDelegationPolicy": "0x67352e3F7dBA907aF877020aE7E9450C0029C70c", + "OperatorDefaultExchangeRatePolicy": "0xE41439BF434F9CfBF0153f5231C205d4ae0C22e3", + "OperatorDefaultUndelegationPolicy": "0xF655955dc561356851e95a6D0febeB0BAc955Ab5", + "OperatorFactory": "0xdaF0905e19C45b9Fea7E60D232061edF78E9F570" +} +Done adding trusted policies (https://testnet.iotexscan.io/tx/0x85d95dbc0f04c276aec171150f0883c49bf665c9d3be5a0569f48a10afd1c038 ) +Done setting StreamrConfig.operatorFactory (https://testnet.iotexscan.io/tx/0xb244fcebeb2eaf062ca4114b877e348d4a4958856ca8c8b44b453c7f5f57a881 ) +Deploying Sponsorship policies... +Deployed MaxOperatorsJoinPolicy; Streamr tokenomics contract addresses: +{ + "StreamrConfig": "0x6d201374D7c28EF1c3cc1b6FA300f06110B597A3", + "SponsorshipMaxOperatorsJoinPolicy": "0x78d13aaBA657F448933Bb469E4E549Dee88cB78B", + "OperatorDefaultDelegationPolicy": "0x67352e3F7dBA907aF877020aE7E9450C0029C70c", + "OperatorDefaultExchangeRatePolicy": "0xE41439BF434F9CfBF0153f5231C205d4ae0C22e3", + "OperatorDefaultUndelegationPolicy": "0xF655955dc561356851e95a6D0febeB0BAc955Ab5", + "OperatorFactory": "0xdaF0905e19C45b9Fea7E60D232061edF78E9F570" +} +Deployed OperatorContractOnlyJoinPolicy; Streamr tokenomics contract addresses: +{ + "StreamrConfig": "0x6d201374D7c28EF1c3cc1b6FA300f06110B597A3", + "SponsorshipOperatorContractOnlyJoinPolicy": "0xAd24077505d3584F1AC8d78719F9d31F7Da0E264", + "SponsorshipMaxOperatorsJoinPolicy": "0x78d13aaBA657F448933Bb469E4E549Dee88cB78B", + "OperatorDefaultDelegationPolicy": "0x67352e3F7dBA907aF877020aE7E9450C0029C70c", + "OperatorDefaultExchangeRatePolicy": "0xE41439BF434F9CfBF0153f5231C205d4ae0C22e3", + "OperatorDefaultUndelegationPolicy": "0xF655955dc561356851e95a6D0febeB0BAc955Ab5", + "OperatorFactory": "0xdaF0905e19C45b9Fea7E60D232061edF78E9F570" +} +Deployed StakeWeightedAllocationPolicy; Streamr tokenomics contract addresses: +{ + "StreamrConfig": "0x6d201374D7c28EF1c3cc1b6FA300f06110B597A3", + "SponsorshipOperatorContractOnlyJoinPolicy": "0xAd24077505d3584F1AC8d78719F9d31F7Da0E264", + "SponsorshipMaxOperatorsJoinPolicy": "0x78d13aaBA657F448933Bb469E4E549Dee88cB78B", + "SponsorshipStakeWeightedAllocationPolicy": "0xB14205AE3D7672B937B972EBdf2b986fB0B8CfaA", + "OperatorDefaultDelegationPolicy": "0x67352e3F7dBA907aF877020aE7E9450C0029C70c", + "OperatorDefaultExchangeRatePolicy": "0xE41439BF434F9CfBF0153f5231C205d4ae0C22e3", + "OperatorDefaultUndelegationPolicy": "0xF655955dc561356851e95a6D0febeB0BAc955Ab5", + "OperatorFactory": "0xdaF0905e19C45b9Fea7E60D232061edF78E9F570" +} +Deployed DefaultLeavePolicy; Streamr tokenomics contract addresses: +{ + "StreamrConfig": "0x6d201374D7c28EF1c3cc1b6FA300f06110B597A3", + "SponsorshipOperatorContractOnlyJoinPolicy": "0xAd24077505d3584F1AC8d78719F9d31F7Da0E264", + "SponsorshipMaxOperatorsJoinPolicy": "0x78d13aaBA657F448933Bb469E4E549Dee88cB78B", + "SponsorshipStakeWeightedAllocationPolicy": "0xB14205AE3D7672B937B972EBdf2b986fB0B8CfaA", + "SponsorshipDefaultLeavePolicy": "0xfC9C1886EAd9a757039Edbee16Bea0183344D2BA", + "OperatorDefaultDelegationPolicy": "0x67352e3F7dBA907aF877020aE7E9450C0029C70c", + "OperatorDefaultExchangeRatePolicy": "0xE41439BF434F9CfBF0153f5231C205d4ae0C22e3", + "OperatorDefaultUndelegationPolicy": "0xF655955dc561356851e95a6D0febeB0BAc955Ab5", + "OperatorFactory": "0xdaF0905e19C45b9Fea7E60D232061edF78E9F570" +} +Deployed VoteKickPolicy; Streamr tokenomics contract addresses: +{ + "StreamrConfig": "0x6d201374D7c28EF1c3cc1b6FA300f06110B597A3", + "SponsorshipOperatorContractOnlyJoinPolicy": "0xAd24077505d3584F1AC8d78719F9d31F7Da0E264", + "SponsorshipMaxOperatorsJoinPolicy": "0x78d13aaBA657F448933Bb469E4E549Dee88cB78B", + "SponsorshipStakeWeightedAllocationPolicy": "0xB14205AE3D7672B937B972EBdf2b986fB0B8CfaA", + "SponsorshipDefaultLeavePolicy": "0xfC9C1886EAd9a757039Edbee16Bea0183344D2BA", + "SponsorshipVoteKickPolicy": "0xd1cBD6b1Be710C41c01A9613802209843407b8b9", + "OperatorDefaultDelegationPolicy": "0x67352e3F7dBA907aF877020aE7E9450C0029C70c", + "OperatorDefaultExchangeRatePolicy": "0xE41439BF434F9CfBF0153f5231C205d4ae0C22e3", + "OperatorDefaultUndelegationPolicy": "0xF655955dc561356851e95a6D0febeB0BAc955Ab5", + "OperatorFactory": "0xdaF0905e19C45b9Fea7E60D232061edF78E9F570" +} +Deployed Sponsorship template at 0xDdeebc8CC32C317b0add78C1A4dF0791734D33B7 +Warning: Potentially unsafe deployment of contracts/OperatorTokenomics/SponsorshipFactory.sol:SponsorshipFactory + + You are using the `unsafeAllow.delegatecall` flag. + +Deployed SponsorshipFactory; Streamr tokenomics contract addresses: +{ + "StreamrConfig": "0x6d201374D7c28EF1c3cc1b6FA300f06110B597A3", + "SponsorshipOperatorContractOnlyJoinPolicy": "0xAd24077505d3584F1AC8d78719F9d31F7Da0E264", + "SponsorshipMaxOperatorsJoinPolicy": "0x78d13aaBA657F448933Bb469E4E549Dee88cB78B", + "SponsorshipStakeWeightedAllocationPolicy": "0xB14205AE3D7672B937B972EBdf2b986fB0B8CfaA", + "SponsorshipDefaultLeavePolicy": "0xfC9C1886EAd9a757039Edbee16Bea0183344D2BA", + "SponsorshipVoteKickPolicy": "0xd1cBD6b1Be710C41c01A9613802209843407b8b9", + "SponsorshipFactory": "0x84c8d8f9760639e159350e5d2Bfaada99b670114", + "OperatorDefaultDelegationPolicy": "0x67352e3F7dBA907aF877020aE7E9450C0029C70c", + "OperatorDefaultExchangeRatePolicy": "0xE41439BF434F9CfBF0153f5231C205d4ae0C22e3", + "OperatorDefaultUndelegationPolicy": "0xF655955dc561356851e95a6D0febeB0BAc955Ab5", + "OperatorFactory": "0xdaF0905e19C45b9Fea7E60D232061edF78E9F570" +} +Done adding trusted policies (https://testnet.iotexscan.io/tx/0x88458db17875cf2e5abf0126338ac7b4b5f6245bf65a55270f609456287d7546 ) +Done setting StreamrConfig.operatorContractOnlyJoinPolicy (https://testnet.iotexscan.io/tx/0xa6ff60553a3513e5fef68b3bc7b1ab5e88a91963b7af2cd6a1d6df85a31fa265 ) +Done setting StreamrConfig.sponsorshipFactory (https://testnet.iotexscan.io/tx/0x53b9a0e8d06d065986fb0d909932ec69ba5bed503e6d473c209b439944c81f0a ) +Spent 80.644701 ETH for gas +All done! Streamr tokenomics contract addresses: +{ + "StreamrConfig": "0x6d201374D7c28EF1c3cc1b6FA300f06110B597A3", + "SponsorshipOperatorContractOnlyJoinPolicy": "0xAd24077505d3584F1AC8d78719F9d31F7Da0E264", + "SponsorshipMaxOperatorsJoinPolicy": "0x78d13aaBA657F448933Bb469E4E549Dee88cB78B", + "SponsorshipStakeWeightedAllocationPolicy": "0xB14205AE3D7672B937B972EBdf2b986fB0B8CfaA", + "SponsorshipDefaultLeavePolicy": "0xfC9C1886EAd9a757039Edbee16Bea0183344D2BA", + "SponsorshipVoteKickPolicy": "0xd1cBD6b1Be710C41c01A9613802209843407b8b9", + "SponsorshipFactory": "0x84c8d8f9760639e159350e5d2Bfaada99b670114", + "OperatorDefaultDelegationPolicy": "0x67352e3F7dBA907aF877020aE7E9450C0029C70c", + "OperatorDefaultExchangeRatePolicy": "0xE41439BF434F9CfBF0153f5231C205d4ae0C22e3", + "OperatorDefaultUndelegationPolicy": "0xF655955dc561356851e95a6D0febeB0BAc955Ab5", + "OperatorFactory": "0xdaF0905e19C45b9Fea7E60D232061edF78E9F570" +} \ No newline at end of file diff --git a/packages/network-contracts/package.json b/packages/network-contracts/package.json index f28b1ec3f..8f0211030 100644 --- a/packages/network-contracts/package.json +++ b/packages/network-contracts/package.json @@ -62,6 +62,7 @@ "@metamask/eth-sig-util": "7.0.1", "@nomicfoundation/hardhat-chai-matchers": "1.0.5", "@nomicfoundation/hardhat-toolbox": "2.0.0", + "@nomicfoundation/hardhat-verify": "2.0.11", "@opengsn/provider": "2.2.6", "@openzeppelin/hardhat-upgrades": "1.22.1", "@streamr/config": "^5.0.0", diff --git a/packages/network-contracts/scripts/2024-05-deployToAmoy.sh b/packages/network-contracts/scripts/2024-05-03-deployToAmoy.sh similarity index 100% rename from packages/network-contracts/scripts/2024-05-deployToAmoy.sh rename to packages/network-contracts/scripts/2024-05-03-deployToAmoy.sh diff --git a/packages/network-contracts/scripts/2024-10-30-deploy-to-iotex-testnet.sh b/packages/network-contracts/scripts/2024-10-30-deploy-to-iotex-testnet.sh new file mode 100755 index 000000000..96e3ae173 --- /dev/null +++ b/packages/network-contracts/scripts/2024-10-30-deploy-to-iotex-testnet.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +set -euxo pipefail + +if [ -z "$KEY" ]; then + read -p "Enter deployer private key: " KEY + export KEY="$KEY" +fi + +export CHAIN=iotexTestnet +export SCRIPT_FILE=scripts/deployStreamrContracts.ts +npm run hardhatScript + +read -p "Copy changed addresses to config, then press enter" + +export SCRIPT_FILE=scripts/deployTokenomicsContracts.ts +npm run hardhatScript diff --git a/packages/network-contracts/scripts/deployStreamrContracts.ts b/packages/network-contracts/scripts/deployStreamrContracts.ts index 4bb822898..2a4230213 100644 --- a/packages/network-contracts/scripts/deployStreamrContracts.ts +++ b/packages/network-contracts/scripts/deployStreamrContracts.ts @@ -65,6 +65,7 @@ const { async function main() { const [ deployer ] = await getSigners() as Wallet[] // specified in hardhat.config.ts + if (!deployer) { throw new Error(`No deployer wallet specified for "${CHAIN}" in hardhat.config.ts`) } console.log("Connected to network %o", await provider.getNetwork()) const gasRequired = 60000000 // measured in hardhat test network @@ -190,7 +191,7 @@ export default async function deployBaseContracts( const nodeRegistry = new Contract(nodeRegistryAddress, nodeRegistryABI, provider) as NodeRegistry await nodeRegistry.headNode().catch(() => { throw new Error(`Doesn't seem to be NodeRegistry: NodeRegistry=${nodeRegistryAddress}`) }) log("Found NodeRegistry at %s", nodeRegistry.address) - contracts.nodeRegistry = nodeRegistry + contracts.storageNodeRegistry = nodeRegistry } else { const nodeRegistryCF = await getContractFactory("NodeRegistry", { signer }) const nodeRegistry = await upgrades.deployProxy(nodeRegistryCF, [ @@ -203,12 +204,12 @@ export default async function deployBaseContracts( }) as NodeRegistry await nodeRegistry.deployed() log("Deployed NodeRegistry to %s", nodeRegistry.address) - contracts.nodeRegistry = nodeRegistry + contracts.storageNodeRegistry = nodeRegistry const streamStorageRegistryCF = await getContractFactory("StreamStorageRegistryV2", { signer }) contracts.streamStorageRegistry = await upgrades.deployProxy(streamStorageRegistryCF, [ contracts.streamRegistry.address, - contracts.nodeRegistry.address, + contracts.storageNodeRegistry.address, AddressZero, // trusted forwarder ], { kind: "uups", unsafeAllow: ["delegatecall"], timeout: 600000, diff --git a/packages/network-contracts/scripts/deployTokenomicsContracts.ts b/packages/network-contracts/scripts/deployTokenomicsContracts.ts index cab8292e2..a19885da2 100644 --- a/packages/network-contracts/scripts/deployTokenomicsContracts.ts +++ b/packages/network-contracts/scripts/deployTokenomicsContracts.ts @@ -69,6 +69,7 @@ const { async function main() { const [ deployer ] = await getSigners() as Wallet[] // specified in hardhat.config.ts + if (!deployer) { throw new Error(`No deployer wallet specified for "${CHAIN}" in hardhat.config.ts`) } console.log("Connected to network %o", await provider.getNetwork()) const gasRequired = 60000000 // measured in hardhat test network diff --git a/packages/network-contracts/tasks/copyFilesAfterCompilation.ts b/packages/network-contracts/tasks/copyFilesAfterCompilation.ts new file mode 100644 index 000000000..ee7182220 --- /dev/null +++ b/packages/network-contracts/tasks/copyFilesAfterCompilation.ts @@ -0,0 +1,32 @@ +import { copyFileSync } from "fs" + +import { task } from "hardhat/config" +import { TASK_COMPILE } from "hardhat/builtin-tasks/task-names" + +declare module "hardhat/types/config" { + interface HardhatUserConfig { + /** Copy files after compilation has finished successfully + * @param from Source file to copy + * @param to Destination filename + */ + copyFilesAfterCompilation?: [{ + from: string, + /** Destination directory + filename */ + to: string, + }]; + } + + interface HardhatConfig { + copyFilesAfterCompilation: [{ + from: string, + to: string, + }] + } +} + +task(TASK_COMPILE, async (_, hre, runSuper) => { + await runSuper() + hre.config.copyFilesAfterCompilation.forEach(({ from, to }) => { + copyFileSync(from, to) + }) +}) From cc6a3309d0dede6837a5c3590eaf6c1ab66c10c4 Mon Sep 17 00:00:00 2001 From: Juuso Takalainen Date: Wed, 30 Oct 2024 15:10:46 +0200 Subject: [PATCH 2/6] build: deploy script for iotex --- .../scripts/2024-10-30-deploy-to-iotex.sh | 18 ++++++++++++++++++ .../tasks/copyFilesAfterCompilation.ts | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100755 packages/network-contracts/scripts/2024-10-30-deploy-to-iotex.sh diff --git a/packages/network-contracts/scripts/2024-10-30-deploy-to-iotex.sh b/packages/network-contracts/scripts/2024-10-30-deploy-to-iotex.sh new file mode 100755 index 000000000..c300d8cd4 --- /dev/null +++ b/packages/network-contracts/scripts/2024-10-30-deploy-to-iotex.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash +set -euxo pipefail + +if declare -p KEY >/dev/null 2>&1; then + echo "Using deployer private key from environment variable KEY" +else + read -p "Enter deployer private key: " KEY + export KEY="$KEY" +fi + +export CHAIN=iotex +export SCRIPT_FILE=scripts/deployStreamrContracts.ts +npm run hardhatScript + +read -p "Copy changed addresses to config, then press enter" + +export SCRIPT_FILE=scripts/deployTokenomicsContracts.ts +npm run hardhatScript diff --git a/packages/network-contracts/tasks/copyFilesAfterCompilation.ts b/packages/network-contracts/tasks/copyFilesAfterCompilation.ts index ee7182220..2c2426bbc 100644 --- a/packages/network-contracts/tasks/copyFilesAfterCompilation.ts +++ b/packages/network-contracts/tasks/copyFilesAfterCompilation.ts @@ -26,7 +26,7 @@ declare module "hardhat/types/config" { task(TASK_COMPILE, async (_, hre, runSuper) => { await runSuper() - hre.config.copyFilesAfterCompilation.forEach(({ from, to }) => { + hre?.config?.copyFilesAfterCompilation?.forEach(({ from, to }) => { copyFileSync(from, to) }) }) From d7e11a223590ea964a14afd1c340737443228687 Mon Sep 17 00:00:00 2001 From: Juuso Takalainen Date: Thu, 7 Nov 2024 15:07:04 +0200 Subject: [PATCH 3/6] WIP: iotex deployment automation in testnet --- packages/network-contracts/hardhat.config.ts | 6 +++ .../scripts/2024-10-30-deploy-to-iotex.sh | 54 ++++++++++++++++++- .../scripts/deployStreamrContracts.ts | 19 ++++++- .../scripts/deployTokenomicsContracts.ts | 13 ++++- .../tasks/copyFilesAfterCompilation.ts | 19 +++++-- 5 files changed, 102 insertions(+), 9 deletions(-) diff --git a/packages/network-contracts/hardhat.config.ts b/packages/network-contracts/hardhat.config.ts index 943f48459..8b0e14ba9 100644 --- a/packages/network-contracts/hardhat.config.ts +++ b/packages/network-contracts/hardhat.config.ts @@ -129,6 +129,12 @@ const config: HardhatUserConfig = { from: "../../node_modules/" + "@ensdomains/ens-contracts/deployments/archive/PublicResolver_mainnet_9412610.sol/PublicResolver_mainnet_9412610.json", to: "./artifacts/PublicResolver_mainnet_9412610.json", + optional: true, + }, { + from: "./node_modules/" + + "@ensdomains/ens-contracts/deployments/archive/PublicResolver_mainnet_9412610.sol/PublicResolver_mainnet_9412610.json", + to: "./artifacts/PublicResolver_mainnet_9412610.json", + optional: true, }], solidity: { compilers: [ diff --git a/packages/network-contracts/scripts/2024-10-30-deploy-to-iotex.sh b/packages/network-contracts/scripts/2024-10-30-deploy-to-iotex.sh index c300d8cd4..bd6193d9e 100755 --- a/packages/network-contracts/scripts/2024-10-30-deploy-to-iotex.sh +++ b/packages/network-contracts/scripts/2024-10-30-deploy-to-iotex.sh @@ -8,11 +8,61 @@ else export KEY="$KEY" fi -export CHAIN=iotex +# export CHAIN=iotex +# export CHAIN=iotexTestnet +export CHAIN=dev2 +export IGNORE_TOKEN_SYMBOL=1 +export OUTPUT_FILE=addresses.json export SCRIPT_FILE=scripts/deployStreamrContracts.ts npm run hardhatScript -read -p "Copy changed addresses to config, then press enter" +export ADDRESS=$(jq -r '.StreamRegistry' addresses.json) +npm run verify + +export ADDRESS=$(jq -r '.ENSCacheV2' addresses.json) +npm run verify + +export ADDRESS=$(jq -r '.StorageNodeRegistry' addresses.json) +npm run verify + +export ADDRESS=$(jq -r '.StreamStorageRegistry' addresses.json) +npm run verify + +cat addresses.json +read -p "Copy above addresses to config, then press enter" export SCRIPT_FILE=scripts/deployTokenomicsContracts.ts npm run hardhatScript + +export ADDRESS=$(jq -r '.StreamrConfig' addresses.json) +npm run verify + +export ADDRESS=$(jq -r '.SponsorshipOperatorContractOnlyJoinPolicy' addresses.json) +npm run verify + +export ADDRESS=$(jq -r '.SponsorshipMaxOperatorsJoinPolicy' addresses.json) +npm run verify + +export ADDRESS=$(jq -r '.SponsorshipStakeWeightedAllocationPolicy' addresses.json) +npm run verify + +export ADDRESS=$(jq -r '.SponsorshipDefaultLeavePolicy' addresses.json) +npm run verify + +export ADDRESS=$(jq -r '.SponsorshipVoteKickPolicy' addresses.json) +npm run verify + +export ADDRESS=$(jq -r '.SponsorshipFactory' addresses.json) +npm run verify + +export ADDRESS=$(jq -r '.OperatorDefaultDelegationPolicy' addresses.json) +npm run verify + +export ADDRESS=$(jq -r '.OperatorDefaultExchangeRatePolicy' addresses.json) +npm run verify + +export ADDRESS=$(jq -r '.OperatorDefaultUndelegationPolicy' addresses.json) +npm run verify + +export ADDRESS=$(jq -r '.OperatorFactory' addresses.json) +npm run verify diff --git a/packages/network-contracts/scripts/deployStreamrContracts.ts b/packages/network-contracts/scripts/deployStreamrContracts.ts index 2a4230213..b1220f59d 100644 --- a/packages/network-contracts/scripts/deployStreamrContracts.ts +++ b/packages/network-contracts/scripts/deployStreamrContracts.ts @@ -1,4 +1,5 @@ /* eslint-disable require-atomic-updates,max-len */ +import { writeFileSync } from "fs" import { upgrades, ethers as hardhatEthers } from "hardhat" import { config } from "@streamr/config" import { abi as ERC20ABI } from "../artifacts/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol/IERC20Metadata.json" @@ -46,6 +47,8 @@ const { ENSCACHE_UPDATER_ADDRESS = "0xa3d1F77ACfF0060F7213D7BF3c7fEC78df847De1", OWNER, + OUTPUT_FILE, + IGNORE_BALANCE, IGNORE_TOKEN_SYMBOL, // set to bypass token check for testing } = process.env @@ -64,7 +67,7 @@ const { } = (config as any)[CHAIN] async function main() { - const [ deployer ] = await getSigners() as Wallet[] // specified in hardhat.config.ts + const [ deployer ] = await getSigners() as unknown as Wallet[] // specified in hardhat.config.ts if (!deployer) { throw new Error(`No deployer wallet specified for "${CHAIN}" in hardhat.config.ts`) } console.log("Connected to network %o", await provider.getNetwork()) @@ -92,7 +95,13 @@ async function main() { const gasSpent = balanceBefore.sub(balanceAfter) log("Spent %s ETH for gas", formatEther(gasSpent)) - log("All done! Streamr contract addresses:\n%s", JSON.stringify(getAddresses(contracts), null, 4)) + const addressesOutput = JSON.stringify(getAddresses(contracts), null, 4) + if (OUTPUT_FILE) { + writeFileSync(OUTPUT_FILE, addressesOutput) + log("Wrote contract addresses to %s", OUTPUT_FILE) + } else { + log("All done! Streamr contract addresses:\n%s", JSON.stringify(getAddresses(contracts), null, 4)) + } } function getAddresses(contracts: Partial) { @@ -129,16 +138,22 @@ export default async function deployBaseContracts( log("Deployed DATAv2 token to %s", contracts.token.address) } + console.log("asdf") if (STREAM_REGISTRY_ADDRESS && await provider.getCode(STREAM_REGISTRY_ADDRESS) !== "0x") { + console.log("asdf2") const registry = new Contract(STREAM_REGISTRY_ADDRESS, streamRegistryABI, signer) as StreamRegistry + console.log("asdf3") await registry.TRUSTED_ROLE().catch(() => { throw new Error(`Doesn't seem to be StreamRegistry: StreamRegistry=${STREAM_REGISTRY_ADDRESS}`) }) log("Found StreamRegistry at %s", STREAM_REGISTRY_ADDRESS) contracts.streamRegistry = registry } else { + console.log("asdf2") const registryCF = await getContractFactory("StreamRegistryV5", { signer }) + console.log("asdf3") contracts.streamRegistry = await upgrades.deployProxy(registryCF, [ AddressZero, AddressZero ], { kind: "uups", unsafeAllow: ["delegatecall"], timeout: 600000, }) as StreamRegistry + console.log("asdf4") await contracts.streamRegistry.deployed() log("Deployed StreamRegistry to %s", contracts.streamRegistry.address) } diff --git a/packages/network-contracts/scripts/deployTokenomicsContracts.ts b/packages/network-contracts/scripts/deployTokenomicsContracts.ts index a19885da2..e9ae490ca 100644 --- a/packages/network-contracts/scripts/deployTokenomicsContracts.ts +++ b/packages/network-contracts/scripts/deployTokenomicsContracts.ts @@ -1,4 +1,5 @@ /* eslint-disable require-atomic-updates,max-len */ +import { writeFileSync } from "fs" import { upgrades, ethers as hardhatEthers } from "hardhat" import { config } from "@streamr/config" import { abi as ERC20ABI } from "../artifacts/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol/IERC20Metadata.json" @@ -49,6 +50,8 @@ export type StreamrTokenomicsContracts = { const { CHAIN, + OUTPUT_FILE, + IGNORE_BALANCE, IGNORE_TOKEN_SYMBOL, // set to bypass token check for testing } = process.env @@ -68,7 +71,7 @@ const { } = (config as any)[CHAIN] async function main() { - const [ deployer ] = await getSigners() as Wallet[] // specified in hardhat.config.ts + const [ deployer ] = await getSigners() as unknown as Wallet[] // specified in hardhat.config.ts if (!deployer) { throw new Error(`No deployer wallet specified for "${CHAIN}" in hardhat.config.ts`) } console.log("Connected to network %o", await provider.getNetwork()) @@ -96,6 +99,14 @@ async function main() { const gasSpent = balanceBefore.sub(balanceAfter) log("Spent %s ETH for gas", formatEther(gasSpent)) + const addressesOutput = JSON.stringify(getAddresses(contracts), null, 4) + if (OUTPUT_FILE) { + writeFileSync(OUTPUT_FILE, addressesOutput) + log("Wrote contract addresses to %s", OUTPUT_FILE) + } else { + log("All done! Streamr tokenomics contract addresses:\n%s", JSON.stringify(getAddresses(contracts), null, 4)) + } + log("All done! Streamr tokenomics contract addresses:\n%s", JSON.stringify(getAddresses(contracts), null, 4)) } diff --git a/packages/network-contracts/tasks/copyFilesAfterCompilation.ts b/packages/network-contracts/tasks/copyFilesAfterCompilation.ts index 2c2426bbc..5fce20c76 100644 --- a/packages/network-contracts/tasks/copyFilesAfterCompilation.ts +++ b/packages/network-contracts/tasks/copyFilesAfterCompilation.ts @@ -9,24 +9,35 @@ declare module "hardhat/types/config" { * @param from Source file to copy * @param to Destination filename */ - copyFilesAfterCompilation?: [{ + copyFilesAfterCompilation?: { from: string, /** Destination directory + filename */ to: string, - }]; + /** Only show warning if file is missing */ + optional?: boolean, + }[]; } interface HardhatConfig { copyFilesAfterCompilation: [{ from: string, to: string, + optional?: boolean, }] } } task(TASK_COMPILE, async (_, hre, runSuper) => { await runSuper() - hre?.config?.copyFilesAfterCompilation?.forEach(({ from, to }) => { - copyFileSync(from, to) + hre?.config?.copyFilesAfterCompilation?.forEach(({ from, to, optional }) => { + try { + copyFileSync(from, to) + } catch (e) { + if (!optional) { + throw e + } else { + console.warn(e) + } + } }) }) From 3a152b49cb1772298d95d2e447ca0bb2ea6a25a4 Mon Sep 17 00:00:00 2001 From: Juuso Takalainen Date: Thu, 7 Nov 2024 15:16:32 +0200 Subject: [PATCH 4/6] build: update package-lock.json --- package-lock.json | 107 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 107 insertions(+) diff --git a/package-lock.json b/package-lock.json index 51a581a3a..5c24ce85e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3061,6 +3061,106 @@ "node": ">=10.0.0" } }, + "node_modules/@nomicfoundation/hardhat-verify": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-verify/-/hardhat-verify-2.0.11.tgz", + "integrity": "sha512-lGIo4dNjVQFdsiEgZp3KP6ntLiF7xJEJsbNHfSyIiFCyI0Yv0518ElsFtMC5uCuHEChiBBMrib9jWQvHHT+X3Q==", + "dev": true, + "dependencies": { + "@ethersproject/abi": "^5.1.2", + "@ethersproject/address": "^5.0.2", + "cbor": "^8.1.0", + "chalk": "^2.4.2", + "debug": "^4.1.1", + "lodash.clonedeep": "^4.5.0", + "semver": "^6.3.0", + "table": "^6.8.0", + "undici": "^5.14.0" + }, + "peerDependencies": { + "hardhat": "^2.0.4" + } + }, + "node_modules/@nomicfoundation/hardhat-verify/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@nomicfoundation/hardhat-verify/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@nomicfoundation/hardhat-verify/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/@nomicfoundation/hardhat-verify/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "node_modules/@nomicfoundation/hardhat-verify/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/@nomicfoundation/hardhat-verify/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/@nomicfoundation/hardhat-verify/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@nomicfoundation/hardhat-verify/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/@nomicfoundation/solidity-analyzer": { "version": "0.1.1", "license": "MIT", @@ -20084,6 +20184,12 @@ "dev": true, "license": "MIT" }, + "node_modules/lodash.clonedeep": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", + "integrity": "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==", + "dev": true + }, "node_modules/lodash.kebabcase": { "version": "4.1.1", "dev": true, @@ -31896,6 +32002,7 @@ "@metamask/eth-sig-util": "7.0.1", "@nomicfoundation/hardhat-chai-matchers": "1.0.5", "@nomicfoundation/hardhat-toolbox": "2.0.0", + "@nomicfoundation/hardhat-verify": "2.0.11", "@opengsn/provider": "2.2.6", "@openzeppelin/hardhat-upgrades": "1.22.1", "@streamr/config": "^5.0.0", From 65e4ad9438e83c1db2dca5c19d2ae707de06814f Mon Sep 17 00:00:00 2001 From: Juuso Takalainen Date: Fri, 13 Dec 2024 20:43:16 +0200 Subject: [PATCH 5/6] deployment: IoTeX mainnet --- packages/config/src/index.ts | 36 +- .../.openzeppelin/unknown-4689.json | 1578 +++++++++++++++++ packages/network-contracts/addresses.json | 7 - .../logs/2024-12-13-deploy-to-iotex.txt | 259 +++ .../scripts/2024-12-04-deploy-to-iotex.sh | 31 + .../scripts/2024-12-13-deploy-to-iotex.sh | 51 + 6 files changed, 1950 insertions(+), 12 deletions(-) create mode 100644 packages/network-contracts/.openzeppelin/unknown-4689.json delete mode 100644 packages/network-contracts/addresses.json create mode 100644 packages/network-contracts/logs/2024-12-13-deploy-to-iotex.txt create mode 100755 packages/network-contracts/scripts/2024-12-04-deploy-to-iotex.sh create mode 100755 packages/network-contracts/scripts/2024-12-13-deploy-to-iotex.sh diff --git a/packages/config/src/index.ts b/packages/config/src/index.ts index 1161e48ac..733a5691b 100644 --- a/packages/config/src/index.ts +++ b/packages/config/src/index.ts @@ -473,7 +473,22 @@ export const config = { } ], "contracts": { - + "DATA": "0x871a20C72d636A8C987e762616Ab047e1B52653e", + "StreamRegistry": "0x080F34fec2bc33928999Ea9e39ADc798bEF3E0d6", + "ENSCacheV2": "0xAB072849dd3Cd648cb85c73d525a70A36523337d", + "StorageNodeRegistry": "0xb9e70Bd9833dd091f06edc8073aa86a76EdeF46D", + "StreamStorageRegistry": "0xF79c40Fbc432f1f8B8B017441B644e0ac7bccea2", + "StreamrConfig": "0x23Dd2D1f39AD0f9d517ce56Ca490eF19B50e6f1A", + "SponsorshipOperatorContractOnlyJoinPolicy": "0x72b3278b7096DC198b42563e72Eb0D11fb35a074", + "SponsorshipMaxOperatorsJoinPolicy": "0x845AEBfedD1AA70eD92E8a6b34117EF056A9c6d0", + "SponsorshipStakeWeightedAllocationPolicy": "0x547910a95556ceE76b09Fc2ECbf4c61830f950aA", + "SponsorshipDefaultLeavePolicy": "0xFe376FF5baeA4C926F453eDf242378EBCa50696b", + "SponsorshipVoteKickPolicy": "0xa6dc2b0366757a4631Ad0e3271a2FD2FFDF383ec", + "SponsorshipFactory": "0xe4Ae8e6c5b6E85914738803ad73c111eF2618621", + "OperatorDefaultDelegationPolicy": "0xa9A5186193916921b86eD82BA5fa935079F91a73", + "OperatorDefaultExchangeRatePolicy": "0xe8e2660CeDf2a59C917a5ED05B72df4146b58399", + "OperatorDefaultUndelegationPolicy": "0xe0727fA33C83D1950163a8F5Ba85024B095fCfeF", + "OperatorFactory": "0xbC1cC84912d54fCf7316A6dA2e7A884731a87935" }, "blockExplorerUrl": "https://iotexscan.io" }, @@ -492,10 +507,21 @@ export const config = { ], "contracts": { "DATA": "0x5ABD469031d2B5f939808565EAB8562d7Cbaa939", - "StreamRegistry": "0xc9F35DEaD87e193A1929CA1C8F1Ee93474937406", - "ENSCacheV2": "0x28728D58FADb8564a4D32c14dAd6F373a1d5Af37", - "StorageNodeRegistry": "0x973906163a967697C52771cD2d7166d0548Ee698", - "StreamStorageRegistry": "0xB0237203987cf33C8035E03Aef1dBa117b7DdCE3", + "StreamRegistry": "0xDC695780959aa5aEe9B28dfED7332032e3045210", + "ENSCacheV2": "0xDDf8FB60f8c3ffb1C20375A30f6D8CFB0C48Bd38", + "StorageNodeRegistry": "0xc0F9666fbF16B2ac5726697237BcdF79096e3FA7", + "StreamStorageRegistry": "0xd0C3A69762Bd920C1cAfBE91612a4600429f02f1", + "StreamrConfig": "0x6d201374D7c28EF1c3cc1b6FA300f06110B597A3", + "SponsorshipOperatorContractOnlyJoinPolicy": "0xAd24077505d3584F1AC8d78719F9d31F7Da0E264", + "SponsorshipMaxOperatorsJoinPolicy": "0x78d13aaBA657F448933Bb469E4E549Dee88cB78B", + "SponsorshipStakeWeightedAllocationPolicy": "0xB14205AE3D7672B937B972EBdf2b986fB0B8CfaA", + "SponsorshipDefaultLeavePolicy": "0xfC9C1886EAd9a757039Edbee16Bea0183344D2BA", + "SponsorshipVoteKickPolicy": "0xd1cBD6b1Be710C41c01A9613802209843407b8b9", + "SponsorshipFactory": "0x84c8d8f9760639e159350e5d2Bfaada99b670114", + "OperatorDefaultDelegationPolicy": "0x67352e3F7dBA907aF877020aE7E9450C0029C70c", + "OperatorDefaultExchangeRatePolicy": "0xE41439BF434F9CfBF0153f5231C205d4ae0C22e3", + "OperatorDefaultUndelegationPolicy": "0xF655955dc561356851e95a6D0febeB0BAc955Ab5", + "OperatorFactory": "0xdaF0905e19C45b9Fea7E60D232061edF78E9F570" }, "blockExplorerUrl": "https://testnet.iotexscan.io", "entryPoints": [ diff --git a/packages/network-contracts/.openzeppelin/unknown-4689.json b/packages/network-contracts/.openzeppelin/unknown-4689.json new file mode 100644 index 000000000..a2e72f144 --- /dev/null +++ b/packages/network-contracts/.openzeppelin/unknown-4689.json @@ -0,0 +1,1578 @@ +{ + "manifestVersion": "3.2", + "proxies": [ + { + "address": "0x080F34fec2bc33928999Ea9e39ADc798bEF3E0d6", + "txHash": "0x9acf4616e95a1a788074b8987e25ebd37bc622979fe6dfe9bc5e70fba633ead9", + "kind": "uups" + }, + { + "address": "0xAB072849dd3Cd648cb85c73d525a70A36523337d", + "txHash": "0x2e6650364e771256138c4516039eff1cdf7dd2d2dae27a8c7f31e8ef199e299f", + "kind": "uups" + }, + { + "address": "0xb9e70Bd9833dd091f06edc8073aa86a76EdeF46D", + "txHash": "0xfd1a94ad9de08d844a02f6023f467660f10d03267af588c9bca5665c2c2ed111", + "kind": "uups" + }, + { + "address": "0xF79c40Fbc432f1f8B8B017441B644e0ac7bccea2", + "txHash": "0x38ba9345518f0e2d69d0678da55be371ee35033a3e1f7e8c17d97f5fd84e455c", + "kind": "uups" + }, + { + "address": "0x23Dd2D1f39AD0f9d517ce56Ca490eF19B50e6f1A", + "txHash": "0x03ecfc91d6176b3a38badd62b1d15a227a5073776bdf83f20f3c89924f99a127", + "kind": "uups" + }, + { + "address": "0xbC1cC84912d54fCf7316A6dA2e7A884731a87935", + "txHash": "0xb0cb3de9f1ddc1bfc814c8efad164d81e2e198471b3851418a9846b57a6a4da3", + "kind": "uups" + }, + { + "address": "0xe4Ae8e6c5b6E85914738803ad73c111eF2618621", + "txHash": "0x1bdb7023503cd08abf691667939470f1b2390318d3c93cba686c75aae1a888b5", + "kind": "uups" + } + ], + "impls": { + "ab73bf38ac788178f15970227a96e5f4a7e5bd31198a9f882c328a984b8dc8da": { + "address": "0x2db1fA04022F50a10470bA0E7c0dd345f66c7F19", + "txHash": "0x722e4884e0f9503aafdb744b90af76c10d0a464f0fa4baf5f0ba0de34d11d1ad", + "layout": { + "solcVersion": "0.8.9", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable-4.4.2/proxy/utils/Initializable.sol:39" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable-4.4.2/proxy/utils/Initializable.sol:44" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC1967UpgradeUpgradeable", + "src": "@openzeppelin/contracts-upgradeable-4.4.2/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:215" + }, + { + "label": "__gap", + "offset": 0, + "slot": "51", + "type": "t_array(t_uint256)50_storage", + "contract": "UUPSUpgradeable", + "src": "@openzeppelin/contracts-upgradeable-4.4.2/proxy/utils/UUPSUpgradeable.sol:81" + }, + { + "label": "__gap", + "offset": 0, + "slot": "101", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable-4.4.2/utils/ContextUpgradeable.sol:31" + }, + { + "label": "_trustedForwarder", + "offset": 0, + "slot": "151", + "type": "t_address", + "contract": "ERC2771ContextUpgradeable", + "src": "contracts/StreamRegistry/ERC2771ContextUpgradeable.sol:15" + }, + { + "label": "__gap", + "offset": 0, + "slot": "152", + "type": "t_array(t_uint256)49_storage", + "contract": "ERC2771ContextUpgradeable", + "src": "contracts/StreamRegistry/ERC2771ContextUpgradeable.sol:51" + }, + { + "label": "__gap", + "offset": 0, + "slot": "201", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC165Upgradeable", + "src": "@openzeppelin/contracts-upgradeable-4.4.2/utils/introspection/ERC165Upgradeable.sol:36" + }, + { + "label": "_roles", + "offset": 0, + "slot": "251", + "type": "t_mapping(t_bytes32,t_struct(RoleData)2219_storage)", + "contract": "AccessControlUpgradeable", + "src": "@openzeppelin/contracts-upgradeable-4.4.2/access/AccessControlUpgradeable.sol:64" + }, + { + "label": "__gap", + "offset": 0, + "slot": "252", + "type": "t_array(t_uint256)49_storage", + "contract": "AccessControlUpgradeable", + "src": "@openzeppelin/contracts-upgradeable-4.4.2/access/AccessControlUpgradeable.sol:232" + }, + { + "label": "streamIdToPermissions", + "offset": 0, + "slot": "301", + "type": "t_mapping(t_string_memory_ptr,t_mapping(t_bytes32,t_struct(Permission)4121_storage))", + "contract": "StreamRegistryV5", + "src": "contracts/StreamRegistry/StreamRegistryV5.sol:61" + }, + { + "label": "streamIdToMetadata", + "offset": 0, + "slot": "302", + "type": "t_mapping(t_string_memory_ptr,t_string_storage)", + "contract": "StreamRegistryV5", + "src": "contracts/StreamRegistry/StreamRegistryV5.sol:62" + }, + { + "label": "ensCache", + "offset": 0, + "slot": "303", + "type": "t_contract(ENSCache)6869", + "contract": "StreamRegistryV5", + "src": "contracts/StreamRegistry/StreamRegistryV5.sol:63" + }, + { + "label": "streamIdToVersion", + "offset": 0, + "slot": "304", + "type": "t_mapping(t_string_memory_ptr,t_uint32)", + "contract": "StreamRegistryV5", + "src": "contracts/StreamRegistry/StreamRegistryV5.sol:66" + } + ], + "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_contract(ENSCache)6869": { + "label": "contract ENSCache", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_struct(Permission)4121_storage)": { + "label": "mapping(bytes32 => struct StreamRegistryV5.Permission)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_struct(RoleData)2219_storage)": { + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32" + }, + "t_mapping(t_string_memory_ptr,t_mapping(t_bytes32,t_struct(Permission)4121_storage))": { + "label": "mapping(string => mapping(bytes32 => struct StreamRegistryV5.Permission))", + "numberOfBytes": "32" + }, + "t_mapping(t_string_memory_ptr,t_string_storage)": { + "label": "mapping(string => string)", + "numberOfBytes": "32" + }, + "t_mapping(t_string_memory_ptr,t_uint32)": { + "label": "mapping(string => uint32)", + "numberOfBytes": "32" + }, + "t_string_memory_ptr": { + "label": "string", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Permission)4121_storage": { + "label": "struct StreamRegistryV5.Permission", + "members": [ + { + "label": "canEdit", + "type": "t_bool", + "offset": 0, + "slot": "0" + }, + { + "label": "canDelete", + "type": "t_bool", + "offset": 1, + "slot": "0" + }, + { + "label": "publishExpiration", + "type": "t_uint256", + "offset": 0, + "slot": "1" + }, + { + "label": "subscribeExpiration", + "type": "t_uint256", + "offset": 0, + "slot": "2" + }, + { + "label": "canGrant", + "type": "t_bool", + "offset": 0, + "slot": "3" + } + ], + "numberOfBytes": "128" + }, + "t_struct(RoleData)2219_storage": { + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "label": "members", + "type": "t_mapping(t_address,t_bool)", + "offset": 0, + "slot": "0" + }, + { + "label": "adminRole", + "type": "t_bytes32", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "label": "uint32", + "numberOfBytes": "4" + } + } + } + }, + "d4db542646b11d24d6eb916bd37f55cf41377f4f0f7f7aa52461369a77c057ef": { + "address": "0x36BF71D0ba2e449fc14f9C4cF51468948E4ED27D", + "txHash": "0x387afa97214baeae17d2b0be0c545035e8a8f09f14666cdd2d1899e7568e579a", + "layout": { + "solcVersion": "0.8.9", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC1967UpgradeUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:211" + }, + { + "label": "__gap", + "offset": 0, + "slot": "51", + "type": "t_array(t_uint256)50_storage", + "contract": "UUPSUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol:107" + }, + { + "label": "__gap", + "offset": 0, + "slot": "101", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_owner", + "offset": 0, + "slot": "151", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "152", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" + }, + { + "label": "owners", + "offset": 0, + "slot": "201", + "type": "t_mapping(t_string_memory_ptr,t_address)", + "contract": "ENSCacheV2Streamr", + "src": "contracts/chainlinkClient/ENSCacheV2Streamr.sol:17" + }, + { + "label": "streamrScript", + "offset": 0, + "slot": "202", + "type": "t_address", + "contract": "ENSCacheV2Streamr", + "src": "contracts/chainlinkClient/ENSCacheV2Streamr.sol:18" + }, + { + "label": "streamRegistry", + "offset": 0, + "slot": "203", + "type": "t_contract(IStreamRegistry)3531", + "contract": "ENSCacheV2Streamr", + "src": "contracts/chainlinkClient/ENSCacheV2Streamr.sol:19" + }, + { + "label": "ensCacheV1", + "offset": 0, + "slot": "204", + "type": "t_contract(ENSCacheV1)3889", + "contract": "ENSCacheV2Streamr", + "src": "contracts/chainlinkClient/ENSCacheV2Streamr.sol:20" + } + ], + "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(ENSCacheV1)3889": { + "label": "contract ENSCacheV1", + "numberOfBytes": "20" + }, + "t_contract(IStreamRegistry)3531": { + "label": "contract IStreamRegistry", + "numberOfBytes": "20" + }, + "t_mapping(t_string_memory_ptr,t_address)": { + "label": "mapping(string => address)", + "numberOfBytes": "32" + }, + "t_string_memory_ptr": { + "label": "string", + "numberOfBytes": "32" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + }, + "t_string_storage": { + "label": "string" + } + } + } + }, + "5bca47f3befc568da3109ac56dec6e408046e7e9ed2ebdd5180523e64ecb5fe8": { + "address": "0xffA0bd4cbddDd2c329c93eC4c7c81475fD7B73C1", + "txHash": "0xc011ec9806f95f66f1a05be790c879e2749577e98f5a3db75d56d14d272f4b0a", + "layout": { + "solcVersion": "0.8.9", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable-4.4.2/proxy/utils/Initializable.sol:39" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable-4.4.2/proxy/utils/Initializable.sol:44" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC1967UpgradeUpgradeable", + "src": "@openzeppelin/contracts-upgradeable-4.4.2/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:215" + }, + { + "label": "__gap", + "offset": 0, + "slot": "51", + "type": "t_array(t_uint256)50_storage", + "contract": "UUPSUpgradeable", + "src": "@openzeppelin/contracts-upgradeable-4.4.2/proxy/utils/UUPSUpgradeable.sol:81" + }, + { + "label": "__gap", + "offset": 0, + "slot": "101", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable-4.4.2/utils/ContextUpgradeable.sol:31" + }, + { + "label": "_owner", + "offset": 0, + "slot": "151", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable-4.4.2/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "152", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable-4.4.2/access/OwnableUpgradeable.sol:82" + }, + { + "label": "nodeCount", + "offset": 0, + "slot": "201", + "type": "t_uint64", + "contract": "NodeRegistry", + "src": "contracts/NodeRegistry/NodeRegistry.sol:49" + }, + { + "label": "tailNode", + "offset": 8, + "slot": "201", + "type": "t_address", + "contract": "NodeRegistry", + "src": "contracts/NodeRegistry/NodeRegistry.sol:50" + }, + { + "label": "headNode", + "offset": 0, + "slot": "202", + "type": "t_address", + "contract": "NodeRegistry", + "src": "contracts/NodeRegistry/NodeRegistry.sol:51" + }, + { + "label": "requiresWhitelist", + "offset": 20, + "slot": "202", + "type": "t_bool", + "contract": "NodeRegistry", + "src": "contracts/NodeRegistry/NodeRegistry.sol:52" + }, + { + "label": "nodes", + "offset": 0, + "slot": "203", + "type": "t_mapping(t_address,t_struct(NodeLinkedListItem)4099_storage)", + "contract": "NodeRegistry", + "src": "contracts/NodeRegistry/NodeRegistry.sol:53" + }, + { + "label": "whitelist", + "offset": 0, + "slot": "204", + "type": "t_mapping(t_address,t_enum(WhitelistState)4084)", + "contract": "NodeRegistry", + "src": "contracts/NodeRegistry/NodeRegistry.sol:54" + } + ], + "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_enum(WhitelistState)4084": { + "label": "enum NodeRegistry.WhitelistState", + "members": [ + "None", + "Approved", + "Rejected" + ], + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_enum(WhitelistState)4084)": { + "label": "mapping(address => enum NodeRegistry.WhitelistState)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_struct(NodeLinkedListItem)4099_storage)": { + "label": "mapping(address => struct NodeRegistry.NodeLinkedListItem)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Node)4091_storage": { + "label": "struct NodeRegistry.Node", + "members": [ + { + "label": "nodeAddress", + "type": "t_address", + "offset": 0, + "slot": "0" + }, + { + "label": "metadata", + "type": "t_string_storage", + "offset": 0, + "slot": "1" + }, + { + "label": "lastSeen", + "type": "t_uint256", + "offset": 0, + "slot": "2" + } + ], + "numberOfBytes": "96" + }, + "t_struct(NodeLinkedListItem)4099_storage": { + "label": "struct NodeRegistry.NodeLinkedListItem", + "members": [ + { + "label": "node", + "type": "t_struct(Node)4091_storage", + "offset": 0, + "slot": "0" + }, + { + "label": "next", + "type": "t_address", + "offset": 0, + "slot": "3" + }, + { + "label": "prev", + "type": "t_address", + "offset": 0, + "slot": "4" + } + ], + "numberOfBytes": "160" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint64": { + "label": "uint64", + "numberOfBytes": "8" + } + } + } + }, + "66db4b0ef2108abc988b52ec3204b6f10a684681043dc8d85e19cd83a7756704": { + "address": "0x870528c1aDe8f5eB4676AA2d15FC0B034E276A1A", + "txHash": "0xac18fe567ac3be934895782080898d3f0d2d2abd4201b2a7dc1734e1487d893b", + "layout": { + "solcVersion": "0.8.9", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable-4.4.2/proxy/utils/Initializable.sol:39" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable-4.4.2/proxy/utils/Initializable.sol:44" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC1967UpgradeUpgradeable", + "src": "@openzeppelin/contracts-upgradeable-4.4.2/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:215" + }, + { + "label": "__gap", + "offset": 0, + "slot": "51", + "type": "t_array(t_uint256)50_storage", + "contract": "UUPSUpgradeable", + "src": "@openzeppelin/contracts-upgradeable-4.4.2/proxy/utils/UUPSUpgradeable.sol:81" + }, + { + "label": "__gap", + "offset": 0, + "slot": "101", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable-4.4.2/utils/ContextUpgradeable.sol:31" + }, + { + "label": "_trustedForwarder", + "offset": 0, + "slot": "151", + "type": "t_address", + "contract": "ERC2771ContextUpgradeable", + "src": "contracts/StreamRegistry/ERC2771ContextUpgradeable.sol:15" + }, + { + "label": "__gap", + "offset": 0, + "slot": "152", + "type": "t_array(t_uint256)49_storage", + "contract": "ERC2771ContextUpgradeable", + "src": "contracts/StreamRegistry/ERC2771ContextUpgradeable.sol:51" + }, + { + "label": "streamRegistry", + "offset": 0, + "slot": "201", + "type": "t_contract(StreamRegistryV4)7070", + "contract": "StreamStorageRegistryV2", + "src": "contracts/StreamStorageRegistry/StreamStorageRegistryV2.sol:19" + }, + { + "label": "nodeRegistry", + "offset": 0, + "slot": "202", + "type": "t_contract(NodeRegistry)4688", + "contract": "StreamStorageRegistryV2", + "src": "contracts/StreamStorageRegistry/StreamStorageRegistryV2.sol:20" + }, + { + "label": "pairs", + "offset": 0, + "slot": "203", + "type": "t_mapping(t_string_memory_ptr,t_mapping(t_address,t_struct(StreamNodePair)7093_storage))", + "contract": "StreamStorageRegistryV2", + "src": "contracts/StreamStorageRegistry/StreamStorageRegistryV2.sol:25" + } + ], + "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(NodeRegistry)4688": { + "label": "contract NodeRegistry", + "numberOfBytes": "20" + }, + "t_contract(StreamRegistryV4)7070": { + "label": "contract StreamRegistryV4", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_struct(StreamNodePair)7093_storage)": { + "label": "mapping(address => struct StreamStorageRegistryV2.StreamNodePair)", + "numberOfBytes": "32" + }, + "t_mapping(t_string_memory_ptr,t_mapping(t_address,t_struct(StreamNodePair)7093_storage))": { + "label": "mapping(string => mapping(address => struct StreamStorageRegistryV2.StreamNodePair))", + "numberOfBytes": "32" + }, + "t_string_memory_ptr": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(StreamNodePair)7093_storage": { + "label": "struct StreamStorageRegistryV2.StreamNodePair", + "members": [ + { + "label": "dateCreated", + "type": "t_uint256", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string" + } + } + } + }, + "da14434f272fc45b859d7c1bd0a7e850a40a79669069fa09af9592b13bcb4060": { + "address": "0x746bf2aF5a1AA1e1AC3E006d854f0eB37A7FCAaB", + "txHash": "0x015aac07a6551c264149fb86c3f324cad3b608993027819c47a9db63e5a4289a", + "layout": { + "solcVersion": "0.8.13", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "__gap", + "offset": 0, + "slot": "51", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC165Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol:41" + }, + { + "label": "_roles", + "offset": 0, + "slot": "101", + "type": "t_mapping(t_bytes32,t_struct(RoleData)34_storage)", + "contract": "AccessControlUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:61" + }, + { + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage", + "contract": "AccessControlUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:259" + }, + { + "label": "__gap", + "offset": 0, + "slot": "151", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC1967UpgradeUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:211" + }, + { + "label": "__gap", + "offset": 0, + "slot": "201", + "type": "t_array(t_uint256)50_storage", + "contract": "UUPSUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol:107" + }, + { + "label": "slashingFraction", + "offset": 0, + "slot": "251", + "type": "t_uint256", + "contract": "StreamrConfigV1_1", + "src": "contracts/OperatorTokenomics/StreamrConfigV1_1.sol:46" + }, + { + "label": "minimumSelfDelegationFraction", + "offset": 0, + "slot": "252", + "type": "t_uint256", + "contract": "StreamrConfigV1_1", + "src": "contracts/OperatorTokenomics/StreamrConfigV1_1.sol:52" + }, + { + "label": "minimumDelegationWei", + "offset": 0, + "slot": "253", + "type": "t_uint256", + "contract": "StreamrConfigV1_1", + "src": "contracts/OperatorTokenomics/StreamrConfigV1_1.sol:55" + }, + { + "label": "maxQueueSeconds", + "offset": 0, + "slot": "254", + "type": "t_uint256", + "contract": "StreamrConfigV1_1", + "src": "contracts/OperatorTokenomics/StreamrConfigV1_1.sol:61" + }, + { + "label": "maxPenaltyPeriodSeconds", + "offset": 0, + "slot": "255", + "type": "t_uint256", + "contract": "StreamrConfigV1_1", + "src": "contracts/OperatorTokenomics/StreamrConfigV1_1.sol:68" + }, + { + "label": "earlyLeaverPenaltyWei", + "offset": 0, + "slot": "256", + "type": "t_uint256", + "contract": "StreamrConfigV1_1", + "src": "contracts/OperatorTokenomics/StreamrConfigV1_1.sol:73" + }, + { + "label": "maxAllowedEarningsFraction", + "offset": 0, + "slot": "257", + "type": "t_uint256", + "contract": "StreamrConfigV1_1", + "src": "contracts/OperatorTokenomics/StreamrConfigV1_1.sol:84" + }, + { + "label": "fishermanRewardFraction", + "offset": 0, + "slot": "258", + "type": "t_uint256", + "contract": "StreamrConfigV1_1", + "src": "contracts/OperatorTokenomics/StreamrConfigV1_1.sol:92" + }, + { + "label": "protocolFeeFraction", + "offset": 0, + "slot": "259", + "type": "t_uint256", + "contract": "StreamrConfigV1_1", + "src": "contracts/OperatorTokenomics/StreamrConfigV1_1.sol:95" + }, + { + "label": "protocolFeeBeneficiary", + "offset": 0, + "slot": "260", + "type": "t_address", + "contract": "StreamrConfigV1_1", + "src": "contracts/OperatorTokenomics/StreamrConfigV1_1.sol:98" + }, + { + "label": "minEligibleVoterFractionOfAllStake", + "offset": 0, + "slot": "261", + "type": "t_uint256", + "contract": "StreamrConfigV1_1", + "src": "contracts/OperatorTokenomics/StreamrConfigV1_1.sol:101" + }, + { + "label": "minEligibleVoterAge", + "offset": 0, + "slot": "262", + "type": "t_uint256", + "contract": "StreamrConfigV1_1", + "src": "contracts/OperatorTokenomics/StreamrConfigV1_1.sol:104" + }, + { + "label": "flagReviewerCount", + "offset": 0, + "slot": "263", + "type": "t_uint256", + "contract": "StreamrConfigV1_1", + "src": "contracts/OperatorTokenomics/StreamrConfigV1_1.sol:107" + }, + { + "label": "flagReviewerRewardWei", + "offset": 0, + "slot": "264", + "type": "t_uint256", + "contract": "StreamrConfigV1_1", + "src": "contracts/OperatorTokenomics/StreamrConfigV1_1.sol:110" + }, + { + "label": "flaggerRewardWei", + "offset": 0, + "slot": "265", + "type": "t_uint256", + "contract": "StreamrConfigV1_1", + "src": "contracts/OperatorTokenomics/StreamrConfigV1_1.sol:113" + }, + { + "label": "flagReviewerSelectionIterations", + "offset": 0, + "slot": "266", + "type": "t_uint256", + "contract": "StreamrConfigV1_1", + "src": "contracts/OperatorTokenomics/StreamrConfigV1_1.sol:116" + }, + { + "label": "flagStakeWei", + "offset": 0, + "slot": "267", + "type": "t_uint256", + "contract": "StreamrConfigV1_1", + "src": "contracts/OperatorTokenomics/StreamrConfigV1_1.sol:119" + }, + { + "label": "reviewPeriodSeconds", + "offset": 0, + "slot": "268", + "type": "t_uint256", + "contract": "StreamrConfigV1_1", + "src": "contracts/OperatorTokenomics/StreamrConfigV1_1.sol:126" + }, + { + "label": "votingPeriodSeconds", + "offset": 0, + "slot": "269", + "type": "t_uint256", + "contract": "StreamrConfigV1_1", + "src": "contracts/OperatorTokenomics/StreamrConfigV1_1.sol:131" + }, + { + "label": "flagProtectionSeconds", + "offset": 0, + "slot": "270", + "type": "t_uint256", + "contract": "StreamrConfigV1_1", + "src": "contracts/OperatorTokenomics/StreamrConfigV1_1.sol:137" + }, + { + "label": "sponsorshipFactory", + "offset": 0, + "slot": "271", + "type": "t_address", + "contract": "StreamrConfigV1_1", + "src": "contracts/OperatorTokenomics/StreamrConfigV1_1.sol:139" + }, + { + "label": "operatorFactory", + "offset": 0, + "slot": "272", + "type": "t_address", + "contract": "StreamrConfigV1_1", + "src": "contracts/OperatorTokenomics/StreamrConfigV1_1.sol:140" + }, + { + "label": "voterRegistry", + "offset": 0, + "slot": "273", + "type": "t_address", + "contract": "StreamrConfigV1_1", + "src": "contracts/OperatorTokenomics/StreamrConfigV1_1.sol:141" + }, + { + "label": "trustedForwarder", + "offset": 0, + "slot": "274", + "type": "t_address", + "contract": "StreamrConfigV1_1", + "src": "contracts/OperatorTokenomics/StreamrConfigV1_1.sol:143" + }, + { + "label": "operatorContractOnlyJoinPolicy", + "offset": 0, + "slot": "275", + "type": "t_address", + "contract": "StreamrConfigV1_1", + "src": "contracts/OperatorTokenomics/StreamrConfigV1_1.sol:148" + }, + { + "label": "streamRegistryAddress", + "offset": 0, + "slot": "276", + "type": "t_address", + "contract": "StreamrConfigV1_1", + "src": "contracts/OperatorTokenomics/StreamrConfigV1_1.sol:150" + }, + { + "label": "randomOracle", + "offset": 0, + "slot": "277", + "type": "t_address", + "contract": "StreamrConfigV1_1", + "src": "contracts/OperatorTokenomics/StreamrConfigV1_1.sol:156" + }, + { + "label": "minimumDelegationSeconds", + "offset": 0, + "slot": "278", + "type": "t_uint256", + "contract": "StreamrConfigV1_1", + "src": "contracts/OperatorTokenomics/StreamrConfigV1_1.sol:159" + } + ], + "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_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_struct(RoleData)34_storage)": { + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32" + }, + "t_struct(RoleData)34_storage": { + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "label": "members", + "type": "t_mapping(t_address,t_bool)", + "offset": 0, + "slot": "0" + }, + { + "label": "adminRole", + "type": "t_bytes32", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } + }, + "e1a910407f5a4f597e47aec026988f63100d0410e1347c4ed7877610e6cbfde0": { + "address": "0xe008bC7D78329E6Dae9518851dA44CdeCac38656", + "txHash": "0x72a4831ce7daa9299dda6092dcc5bf8c0cfd0db685c36ddb698484a82e4e7151", + "layout": { + "solcVersion": "0.8.13", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC1967UpgradeUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:211" + }, + { + "label": "__gap", + "offset": 0, + "slot": "51", + "type": "t_array(t_uint256)50_storage", + "contract": "UUPSUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol:107" + }, + { + "label": "__gap", + "offset": 0, + "slot": "101", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "__gap", + "offset": 0, + "slot": "151", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC165Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol:41" + }, + { + "label": "_roles", + "offset": 0, + "slot": "201", + "type": "t_mapping(t_bytes32,t_struct(RoleData)34_storage)", + "contract": "AccessControlUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:61" + }, + { + "label": "__gap", + "offset": 0, + "slot": "202", + "type": "t_array(t_uint256)49_storage", + "contract": "AccessControlUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:259" + }, + { + "label": "__gap", + "offset": 0, + "slot": "251", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC2771ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/metatx/ERC2771ContextUpgradeable.sol:50" + }, + { + "label": "operatorTemplate", + "offset": 0, + "slot": "301", + "type": "t_address", + "contract": "OperatorFactory", + "src": "contracts/OperatorTokenomics/OperatorFactory.sol:41" + }, + { + "label": "nodeModuleTemplate", + "offset": 0, + "slot": "302", + "type": "t_address", + "contract": "OperatorFactory", + "src": "contracts/OperatorTokenomics/OperatorFactory.sol:42" + }, + { + "label": "queueModuleTemplate", + "offset": 0, + "slot": "303", + "type": "t_address", + "contract": "OperatorFactory", + "src": "contracts/OperatorTokenomics/OperatorFactory.sol:43" + }, + { + "label": "stakeModuleTemplate", + "offset": 0, + "slot": "304", + "type": "t_address", + "contract": "OperatorFactory", + "src": "contracts/OperatorTokenomics/OperatorFactory.sol:44" + }, + { + "label": "tokenAddress", + "offset": 0, + "slot": "305", + "type": "t_address", + "contract": "OperatorFactory", + "src": "contracts/OperatorTokenomics/OperatorFactory.sol:45" + }, + { + "label": "streamrConfig", + "offset": 0, + "slot": "306", + "type": "t_contract(StreamrConfig)10485", + "contract": "OperatorFactory", + "src": "contracts/OperatorTokenomics/OperatorFactory.sol:46" + }, + { + "label": "trustedPolicies", + "offset": 0, + "slot": "307", + "type": "t_mapping(t_address,t_bool)", + "contract": "OperatorFactory", + "src": "contracts/OperatorTokenomics/OperatorFactory.sol:47" + }, + { + "label": "deploymentTimestamp", + "offset": 0, + "slot": "308", + "type": "t_mapping(t_address,t_uint256)", + "contract": "OperatorFactory", + "src": "contracts/OperatorTokenomics/OperatorFactory.sol:50" + }, + { + "label": "voters", + "offset": 0, + "slot": "309", + "type": "t_array(t_address)dyn_storage", + "contract": "OperatorFactory", + "src": "contracts/OperatorTokenomics/OperatorFactory.sol:53" + }, + { + "label": "votersIndex", + "offset": 0, + "slot": "310", + "type": "t_mapping(t_address,t_uint256)", + "contract": "OperatorFactory", + "src": "contracts/OperatorTokenomics/OperatorFactory.sol:55" + }, + { + "label": "operators", + "offset": 0, + "slot": "311", + "type": "t_mapping(t_address,t_address)", + "contract": "OperatorFactory", + "src": "contracts/OperatorTokenomics/OperatorFactory.sol:58" + }, + { + "label": "totalStakedWei", + "offset": 0, + "slot": "312", + "type": "t_uint256", + "contract": "OperatorFactory", + "src": "contracts/OperatorTokenomics/OperatorFactory.sol:60" + }, + { + "label": "stakedWei", + "offset": 0, + "slot": "313", + "type": "t_mapping(t_address,t_uint256)", + "contract": "OperatorFactory", + "src": "contracts/OperatorTokenomics/OperatorFactory.sol:61" + } + ], + "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_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_contract(StreamrConfig)10485": { + "label": "contract StreamrConfig", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_address)": { + "label": "mapping(address => address)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_uint256)": { + "label": "mapping(address => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_struct(RoleData)34_storage)": { + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32" + }, + "t_struct(RoleData)34_storage": { + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "label": "members", + "type": "t_mapping(t_address,t_bool)", + "offset": 0, + "slot": "0" + }, + { + "label": "adminRole", + "type": "t_bytes32", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } + }, + "8f309c745ebcc1de0a2efeaa7db57b4dadfa7bae33f22d58b9d72aa5e77f842f": { + "address": "0x58e351854d1cCEA78393Ce35dF8Bf62dB3bfE1b7", + "txHash": "0x24633899c592399154314ec9ddc0b35233a3aec99189a0b82d25562e7980810c", + "layout": { + "solcVersion": "0.8.13", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "__gap", + "offset": 0, + "slot": "51", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC165Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol:41" + }, + { + "label": "_roles", + "offset": 0, + "slot": "101", + "type": "t_mapping(t_bytes32,t_struct(RoleData)34_storage)", + "contract": "AccessControlUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:61" + }, + { + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage", + "contract": "AccessControlUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:259" + }, + { + "label": "__gap", + "offset": 0, + "slot": "151", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC1967UpgradeUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:211" + }, + { + "label": "__gap", + "offset": 0, + "slot": "201", + "type": "t_array(t_uint256)50_storage", + "contract": "UUPSUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol:107" + }, + { + "label": "__gap", + "offset": 0, + "slot": "251", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC2771ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/metatx/ERC2771ContextUpgradeable.sol:50" + }, + { + "label": "streamrConfig", + "offset": 0, + "slot": "301", + "type": "t_contract(StreamrConfig)10485", + "contract": "SponsorshipFactory", + "src": "contracts/OperatorTokenomics/SponsorshipFactory.sol:30" + }, + { + "label": "sponsorshipContractTemplate", + "offset": 0, + "slot": "302", + "type": "t_address", + "contract": "SponsorshipFactory", + "src": "contracts/OperatorTokenomics/SponsorshipFactory.sol:31" + }, + { + "label": "tokenAddress", + "offset": 0, + "slot": "303", + "type": "t_address", + "contract": "SponsorshipFactory", + "src": "contracts/OperatorTokenomics/SponsorshipFactory.sol:32" + }, + { + "label": "trustedPolicies", + "offset": 0, + "slot": "304", + "type": "t_mapping(t_address,t_bool)", + "contract": "SponsorshipFactory", + "src": "contracts/OperatorTokenomics/SponsorshipFactory.sol:33" + }, + { + "label": "deploymentTimestamp", + "offset": 0, + "slot": "305", + "type": "t_mapping(t_address,t_uint256)", + "contract": "SponsorshipFactory", + "src": "contracts/OperatorTokenomics/SponsorshipFactory.sol:34" + } + ], + "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_contract(StreamrConfig)10485": { + "label": "contract StreamrConfig", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_uint256)": { + "label": "mapping(address => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_struct(RoleData)34_storage)": { + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32" + }, + "t_struct(RoleData)34_storage": { + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "label": "members", + "type": "t_mapping(t_address,t_bool)", + "offset": 0, + "slot": "0" + }, + { + "label": "adminRole", + "type": "t_bytes32", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } + } + } +} diff --git a/packages/network-contracts/addresses.json b/packages/network-contracts/addresses.json deleted file mode 100644 index e24a4e882..000000000 --- a/packages/network-contracts/addresses.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "DATA": "0x5ABD469031d2B5f939808565EAB8562d7Cbaa939", - "StreamRegistry": "0xc9F35DEaD87e193A1929CA1C8F1Ee93474937406", - "ENSCacheV2": "0x28728D58FADb8564a4D32c14dAd6F373a1d5Af37", - "StorageNodeRegistry": "0x973906163a967697C52771cD2d7166d0548Ee698", - "StreamStorageRegistry": "0xB0237203987cf33C8035E03Aef1dBa117b7DdCE3" -} \ No newline at end of file diff --git a/packages/network-contracts/logs/2024-12-13-deploy-to-iotex.txt b/packages/network-contracts/logs/2024-12-13-deploy-to-iotex.txt new file mode 100644 index 000000000..cbd8adb6c --- /dev/null +++ b/packages/network-contracts/logs/2024-12-13-deploy-to-iotex.txt @@ -0,0 +1,259 @@ +$ ./scripts/2024-12-13-deploy-to-iotex.sh [17:10:48] ++ declare -p KEY ++ echo 'Using deployer private key from environment variable KEY' +Using deployer private key from environment variable KEY ++ export CHAIN=iotex ++ CHAIN=iotex ++ export OUTPUT_FILE=addresses.json ++ OUTPUT_FILE=addresses.json ++ export SCRIPT_FILE=scripts/deployTokenomicsContracts.ts ++ SCRIPT_FILE=scripts/deployTokenomicsContracts.ts ++ npm run hardhatScript + +> @streamr/network-contracts@7.1.1 hardhatScript +> hardhat run --network $CHAIN $SCRIPT_FILE + +You have both ethereum-waffle and @nomicfoundation/hardhat-chai-matchers installed. They don't work correctly together, so please make sure you only use one. + +We recommend you migrate to @nomicfoundation/hardhat-chai-matchers. Learn how to do it here: https://hardhat.org/migrate-from-waffle + ·----------------------------------|--------------------------------|--------------------------------· + | Solc version: 0.8.13 · Optimizer enabled: true · Runs: 100 │ + ···································|································|································· + | Contract Name · Deployed size (KiB) (change) · Initcode size (KiB) (change) │ + ···································|································|································· + | AcceptEverythingPaymaster · 3.571 (0.000) · 3.694 (0.000) │ + ···································|································|································· + | Address · 0.084 (0.000) · 0.138 (0.000) │ + ···································|································|································· + | AddressUpgradeable · 0.084 (0.000) · 0.138 (0.000) │ + ···································|································|································· + | AddressUpgradeable · 0.084 (0.000) · 0.138 (0.000) │ + ···································|································|································· + | AdminKickPolicy · 11.931 (0.000) · 11.976 (0.000) │ + ···································|································|································· + | BasicToken · 0.497 (0.000) · 0.528 (0.000) │ + ···································|································|································· + | BufferChainlink · 0.084 (0.000) · 0.138 (0.000) │ + ···································|································|································· + | CBORChainlink · 0.084 (0.000) · 0.138 (0.000) │ + ···································|································|································· + | Chainlink · 0.084 (0.000) · 0.138 (0.000) │ + ···································|································|································· + | ClonesUpgradeable · 0.084 (0.000) · 0.138 (0.000) │ + ···································|································|································· + | DefaultDelegationPolicy · 18.962 (0.000) · 19.007 (0.000) │ + ···································|································|································· + | DefaultExchangeRatePolicy · 18.966 (0.000) · 19.011 (0.000) │ + ···································|································|································· + | DefaultLeavePolicy · 11.669 (0.000) · 11.714 (0.000) │ + ···································|································|································· + | DefaultUndelegationPolicy · 19.318 (0.000) · 19.363 (0.000) │ + ···································|································|································· + | ECDSA · 0.084 (0.000) · 0.138 (0.000) │ + ···································|································|································· + | ECDSAUpgradeable · 0.084 (0.000) · 0.138 (0.000) │ + ···································|································|································· + | ENSCache · 7.256 (0.000) · 7.967 (0.000) │ + ···································|································|································· + | ENSCacheV1 · 6.815 (0.000) · 7.526 (0.000) │ + ···································|································|································· + | ENSCacheV2Streamr · 5.178 (0.000) · 5.252 (0.000) │ + ···································|································|································· + | ENSRegistry · 2.417 (0.000) · 2.504 (0.000) │ + ···································|································|································· + | ERC1967Proxy · 0.664 (0.000) · 1.888 (0.000) │ + ···································|································|································· + | ERC20 · 2.190 (0.000) · 2.832 (0.000) │ + ···································|································|································· + | ERC20Mintable · 2.525 (0.000) · 3.192 (0.000) │ + ···································|································|································· + | ERC20Upgradeable · 2.097 (0.000) · 2.128 (0.000) │ + ···································|································|································· + | FIFSRegistrar · 0.574 (0.000) · 0.731 (0.000) │ + ···································|································|································· + | Forwarder · 4.759 (0.000) · 5.229 (0.000) │ + ···································|································|································· + | GsnEip712Library · 1.294 (0.000) · 1.351 (0.000) │ + ···································|································|································· + | GsnUtils · 0.084 (0.000) · 0.138 (0.000) │ + ···································|································|································· + | LinkToken · 2.676 (0.000) · 2.736 (0.000) │ + ···································|································|································· + | MathUpgradeable · 0.084 (0.000) · 0.138 (0.000) │ + ···································|································|································· + | MaxOperatorsJoinPolicy · 11.454 (0.000) · 11.499 (0.000) │ + ···································|································|································· + | MinimalForwarder · 2.813 (0.000) · 3.156 (0.000) │ + ···································|································|································· + | MinimalForwarderUpgradeable · 2.394 (0.000) · 2.425 (0.000) │ + ···································|································|································· + | MinLibBytes · 0.084 (0.000) · 0.138 (0.000) │ + ···································|································|································· + | MockRandomOracle · 0.734 (0.000) · 0.921 (0.000) │ + ···································|································|································· + | NetworkParameters · 1.621 (0.000) · 2.296 (0.000) │ + ···································|································|································· + | NodeDomainNameHelper · 0.452 (0.000) · 0.483 (0.000) │ + ···································|································|································· + | NodeModule · 20.818 (0.000) · 20.863 (0.000) │ + ···································|································|································· + | NodeRegistry · 8.724 (0.000) · 8.791 (0.000) │ + ···································|································|································· + | Operator · 18.695 (0.000) · 18.740 (0.000) │ + ···································|································|································· + | OperatorContractOnlyJoinPolicy · 11.516 (0.000) · 11.561 (0.000) │ + ···································|································|································· + | OperatorFactory · 11.744 (0.000) · 11.830 (0.000) │ + ···································|································|································· + | Oracle · 4.589 (0.000) · 4.763 (0.000) │ + ···································|································|································· + | Ownable · 0.551 (0.000) · 0.694 (0.000) │ + ···································|································|································· + | QueueModule · 21.135 (0.000) · 21.180 (0.000) │ + ···································|································|································· + | SafeMath · 0.084 (0.000) · 0.138 (0.000) │ + ···································|································|································· + | SafeMathChainlink · 0.084 (0.000) · 0.118 (0.000) │ + ···································|································|································· + | SafeMathChainlink · 0.074 (0.000) · 0.117 (0.000) │ + ···································|································|································· + | Sponsorship · 11.184 (0.000) · 11.229 (0.000) │ + ···································|································|································· + | SponsorshipFactory · 10.454 (0.000) · 10.540 (0.000) │ + ···································|································|································· + | StakeModule · 23.106 (0.000) · 23.152 (0.000) │ + ···································|································|································· + | StakeWeightedAllocationPolicy · 13.097 (0.000) · 13.142 (0.000) │ + ···································|································|································· + | StandardToken · 1.501 (0.000) · 1.532 (0.000) │ + ···································|································|································· + | StorageSlot · 0.084 (0.000) · 0.138 (0.000) │ + ···································|································|································· + | StorageSlotUpgradeable · 0.084 (0.000) · 0.138 (0.000) │ + ···································|································|································· + | StorageSlotUpgradeable · 0.084 (0.000) · 0.138 (0.000) │ + ···································|································|································· + | StreamrConfig · 10.344 (0.000) · 10.418 (0.000) │ + ···································|································|································· + | StreamrConfigV1_1 · 10.505 (0.000) · 10.579 (0.000) │ + ···································|································|································· + | StreamRegistry · 20.528 (0.000) · 20.596 (0.000) │ + ···································|································|································· + | StreamRegistryV2 · 20.520 (0.000) · 20.587 (0.000) │ + ···································|································|································· + | StreamRegistryV3 · 22.183 (0.000) · 22.251 (0.000) │ + ···································|································|································· + | StreamRegistryV4 · 23.188 (0.000) · 23.257 (0.000) │ + ···································|································|································· + | StreamRegistryV4_1 · 23.265 (0.000) · 23.333 (0.000) │ + ···································|································|································· + | StreamRegistryV5 · 23.490 (0.000) · 23.559 (0.000) │ + ···································|································|································· + | StreamRegistryV5_1 · 23.567 (0.000) · 23.636 (0.000) │ + ···································|································|································· + | StreamStorageRegistry · 7.505 (0.000) · 7.572 (0.000) │ + ···································|································|································· + | StreamStorageRegistryV2 · 7.833 (0.000) · 7.900 (0.000) │ + ···································|································|································· + | Strings · 0.084 (0.000) · 0.138 (0.000) │ + ···································|································|································· + | StringsUpgradeable · 0.084 (0.000) · 0.138 (0.000) │ + ···································|································|································· + | StringsUpgradeable · 0.084 (0.000) · 0.138 (0.000) │ + ···································|································|································· + | TestAllocationPolicy · 12.381 (0.000) · 12.426 (0.000) │ + ···································|································|································· + | TestBadOperator · 2.888 (0.000) · 2.953 (0.000) │ + ···································|································|································· + | TestExchangeRatePolicy · 0.397 (0.000) · 0.429 (0.000) │ + ···································|································|································· + | TestExchangeRatePolicy2 · 0.464 (0.000) · 0.495 (0.000) │ + ···································|································|································· + | TestExchangeRatePolicy3 · 0.392 (0.000) · 0.423 (0.000) │ + ···································|································|································· + | TestJoinPolicy · 11.453 (0.000) · 11.498 (0.000) │ + ···································|································|································· + | TestKickPolicy · 11.760 (0.000) · 11.805 (0.000) │ + ···································|································|································· + | TestToken · 2.818 (0.000) · 3.466 (0.000) │ + ···································|································|································· + | TokenBalanceWeightStrategy · 0.390 (0.000) · 0.533 (0.000) │ + ···································|································|································· + | TrackerRegistry · 5.609 (0.000) · 8.042 (0.000) │ + ···································|································|································· + | VoteKickPolicy · 19.976 (0.000) · 20.021 (0.000) │ + ···································|································|································· + | WeightedNodeRegistry · 9.456 (0.000) · 9.523 (0.000) │ + ···································|································|································· + | WhitelistPaymaster · 4.631 (0.000) · 4.754 (0.000) │ + ·----------------------------------|--------------------------------|--------------------------------· +You have both ethereum-waffle and @nomicfoundation/hardhat-chai-matchers installed. They don't work correctly together, so please make sure you only use one. + +We recommend you migrate to @nomicfoundation/hardhat-chai-matchers. Learn how to do it here: https://hardhat.org/migrate-from-waffle +Connected to network { chainId: 4689, name: 'unknown' } +Estimated gas cost: 97.2 ETH (gas price 1620.0 gwei) +Balance of 0x72ea90e2Fe101090fc44156cae3141527AE9F429: 101.5822358 ETH +Found DATA token at 0x871a20C72d636A8C987e762616Ab047e1B52653e +Found StreamRegistry at 0x080F34fec2bc33928999Ea9e39ADc798bEF3E0d6 +Found StreamrConfig at 0x23Dd2D1f39AD0f9d517ce56Ca490eF19B50e6f1A +Found OperatorFactory at 0xbC1cC84912d54fCf7316A6dA2e7A884731a87935 +Deploying Sponsorship policies... +Deployed MaxOperatorsJoinPolicy; Streamr tokenomics contract addresses: +{ + "StreamrConfig": "0x23Dd2D1f39AD0f9d517ce56Ca490eF19B50e6f1A", + "SponsorshipMaxOperatorsJoinPolicy": "0x845AEBfedD1AA70eD92E8a6b34117EF056A9c6d0", + "OperatorFactory": "0xbC1cC84912d54fCf7316A6dA2e7A884731a87935" +} +Deployed OperatorContractOnlyJoinPolicy; Streamr tokenomics contract addresses: +{ + "StreamrConfig": "0x23Dd2D1f39AD0f9d517ce56Ca490eF19B50e6f1A", + "SponsorshipOperatorContractOnlyJoinPolicy": "0x72b3278b7096DC198b42563e72Eb0D11fb35a074", + "SponsorshipMaxOperatorsJoinPolicy": "0x845AEBfedD1AA70eD92E8a6b34117EF056A9c6d0", + "OperatorFactory": "0xbC1cC84912d54fCf7316A6dA2e7A884731a87935" +} +Deployed StakeWeightedAllocationPolicy; Streamr tokenomics contract addresses: +{ + "StreamrConfig": "0x23Dd2D1f39AD0f9d517ce56Ca490eF19B50e6f1A", + "SponsorshipOperatorContractOnlyJoinPolicy": "0x72b3278b7096DC198b42563e72Eb0D11fb35a074", + "SponsorshipMaxOperatorsJoinPolicy": "0x845AEBfedD1AA70eD92E8a6b34117EF056A9c6d0", + "SponsorshipStakeWeightedAllocationPolicy": "0x547910a95556ceE76b09Fc2ECbf4c61830f950aA", + "OperatorFactory": "0xbC1cC84912d54fCf7316A6dA2e7A884731a87935" +} +Deployed DefaultLeavePolicy; Streamr tokenomics contract addresses: +{ + "StreamrConfig": "0x23Dd2D1f39AD0f9d517ce56Ca490eF19B50e6f1A", + "SponsorshipOperatorContractOnlyJoinPolicy": "0x72b3278b7096DC198b42563e72Eb0D11fb35a074", + "SponsorshipMaxOperatorsJoinPolicy": "0x845AEBfedD1AA70eD92E8a6b34117EF056A9c6d0", + "SponsorshipStakeWeightedAllocationPolicy": "0x547910a95556ceE76b09Fc2ECbf4c61830f950aA", + "SponsorshipDefaultLeavePolicy": "0xFe376FF5baeA4C926F453eDf242378EBCa50696b", + "OperatorFactory": "0xbC1cC84912d54fCf7316A6dA2e7A884731a87935" +} +Deployed VoteKickPolicy; Streamr tokenomics contract addresses: +{ + "StreamrConfig": "0x23Dd2D1f39AD0f9d517ce56Ca490eF19B50e6f1A", + "SponsorshipOperatorContractOnlyJoinPolicy": "0x72b3278b7096DC198b42563e72Eb0D11fb35a074", + "SponsorshipMaxOperatorsJoinPolicy": "0x845AEBfedD1AA70eD92E8a6b34117EF056A9c6d0", + "SponsorshipStakeWeightedAllocationPolicy": "0x547910a95556ceE76b09Fc2ECbf4c61830f950aA", + "SponsorshipDefaultLeavePolicy": "0xFe376FF5baeA4C926F453eDf242378EBCa50696b", + "SponsorshipVoteKickPolicy": "0xa6dc2b0366757a4631Ad0e3271a2FD2FFDF383ec", + "OperatorFactory": "0xbC1cC84912d54fCf7316A6dA2e7A884731a87935" +} +Deployed Sponsorship template at 0x1fb55196365Dde59857e6602C65C36F07dDF4389 +Warning: Potentially unsafe deployment of contracts/OperatorTokenomics/SponsorshipFactory.sol:SponsorshipFactory + + You are using the `unsafeAllow.delegatecall` flag. + +Deployed SponsorshipFactory; Streamr tokenomics contract addresses: +{ + "StreamrConfig": "0x23Dd2D1f39AD0f9d517ce56Ca490eF19B50e6f1A", + "SponsorshipOperatorContractOnlyJoinPolicy": "0x72b3278b7096DC198b42563e72Eb0D11fb35a074", + "SponsorshipMaxOperatorsJoinPolicy": "0x845AEBfedD1AA70eD92E8a6b34117EF056A9c6d0", + "SponsorshipStakeWeightedAllocationPolicy": "0x547910a95556ceE76b09Fc2ECbf4c61830f950aA", + "SponsorshipDefaultLeavePolicy": "0xFe376FF5baeA4C926F453eDf242378EBCa50696b", + "SponsorshipVoteKickPolicy": "0xa6dc2b0366757a4631Ad0e3271a2FD2FFDF383ec", + "SponsorshipFactory": "0xe4Ae8e6c5b6E85914738803ad73c111eF2618621", + "OperatorFactory": "0xbC1cC84912d54fCf7316A6dA2e7A884731a87935" +} +Done adding trusted policies (https://iotexscan.io/tx/0xf14e946483adc3ad3f32234250593336af3e175072d2567dfdc1d846713760d1 ) +Done setting StreamrConfig.operatorContractOnlyJoinPolicy (https://iotexscan.io/tx/0x60fdf868356a532018afdfe098f42c689365ae427d2573fc088f7dff90feea7f ) +Done setting StreamrConfig.sponsorshipFactory (https://iotexscan.io/tx/0xce49383957eee1535207e11d44be68ea6ead942daeaaa10c64f8fd3bb9dedaf4 ) diff --git a/packages/network-contracts/scripts/2024-12-04-deploy-to-iotex.sh b/packages/network-contracts/scripts/2024-12-04-deploy-to-iotex.sh new file mode 100755 index 000000000..29c167316 --- /dev/null +++ b/packages/network-contracts/scripts/2024-12-04-deploy-to-iotex.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash +set -euxo pipefail + +if declare -p KEY >/dev/null 2>&1; then + echo "Using deployer private key from environment variable KEY" +else + read -p "Enter deployer private key: " KEY + export KEY="$KEY" +fi + +export CHAIN=iotex +# export CHAIN=iotexTestnet +# export CHAIN=dev2 +# export IGNORE_TOKEN_SYMBOL=1 +export OUTPUT_FILE=addresses.json +export SCRIPT_FILE=scripts/deployStreamrContracts.ts +npm run hardhatScript + +export ADDRESS=$(jq -r '.StreamRegistry' addresses.json) +npm run verify + +export ADDRESS=$(jq -r '.ENSCacheV2' addresses.json) +npm run verify + +export ADDRESS=$(jq -r '.StorageNodeRegistry' addresses.json) +npm run verify + +export ADDRESS=$(jq -r '.StreamStorageRegistry' addresses.json) +npm run verify + +cat addresses.json diff --git a/packages/network-contracts/scripts/2024-12-13-deploy-to-iotex.sh b/packages/network-contracts/scripts/2024-12-13-deploy-to-iotex.sh new file mode 100755 index 000000000..95a371ee9 --- /dev/null +++ b/packages/network-contracts/scripts/2024-12-13-deploy-to-iotex.sh @@ -0,0 +1,51 @@ +#!/usr/bin/env bash +set -euxo pipefail + +if declare -p KEY >/dev/null 2>&1; then + echo "Using deployer private key from environment variable KEY" +else + read -p "Enter deployer private key: " KEY + export KEY="$KEY" +fi + +export CHAIN=iotex +# export CHAIN=iotexTestnet +# export CHAIN=dev2 +# export IGNORE_TOKEN_SYMBOL=1 +# export IGNORE_BALANCE=1 +export OUTPUT_FILE=addresses.json +export SCRIPT_FILE=scripts/deployTokenomicsContracts.ts +npm run hardhatScript + +export ADDRESS=$(jq -r '.StreamrConfig' addresses.json) +npm run verify + +export ADDRESS=$(jq -r '.SponsorshipOperatorContractOnlyJoinPolicy' addresses.json) +npm run verify + +export ADDRESS=$(jq -r '.SponsorshipMaxOperatorsJoinPolicy' addresses.json) +npm run verify + +export ADDRESS=$(jq -r '.SponsorshipStakeWeightedAllocationPolicy' addresses.json) +npm run verify + +export ADDRESS=$(jq -r '.SponsorshipDefaultLeavePolicy' addresses.json) +npm run verify + +export ADDRESS=$(jq -r '.SponsorshipVoteKickPolicy' addresses.json) +npm run verify + +export ADDRESS=$(jq -r '.SponsorshipFactory' addresses.json) +npm run verify + +export ADDRESS=$(jq -r '.OperatorDefaultDelegationPolicy' addresses.json) +npm run verify + +export ADDRESS=$(jq -r '.OperatorDefaultExchangeRatePolicy' addresses.json) +npm run verify + +export ADDRESS=$(jq -r '.OperatorDefaultUndelegationPolicy' addresses.json) +npm run verify + +export ADDRESS=$(jq -r '.OperatorFactory' addresses.json) +npm run verify From c37c2c8223a0a1e253f4fac942d5a4761213cd37 Mon Sep 17 00:00:00 2001 From: Juuso Takalainen Date: Sat, 14 Dec 2024 01:54:42 +0200 Subject: [PATCH 6/6] deployment: IoTeX subgraph https://api.studio.thegraph.com/query/58754/streamr-iotex/version/latest --- .../network-subgraphs/subgraph_iotex.yaml | 249 ++++++++++++++++++ 1 file changed, 249 insertions(+) create mode 100644 packages/network-subgraphs/subgraph_iotex.yaml diff --git a/packages/network-subgraphs/subgraph_iotex.yaml b/packages/network-subgraphs/subgraph_iotex.yaml new file mode 100644 index 000000000..948f3d71c --- /dev/null +++ b/packages/network-subgraphs/subgraph_iotex.yaml @@ -0,0 +1,249 @@ +# if you recreate the docker image to autodeploy in the dev env this file is used directly +# if you deploy locally use the npm task or scripts/generateYaml.sh to re-generate/update this file + +specVersion: 0.0.4 +description: Subgraph definitions for the Streamr contracts +repository: +schema: + file: ./schema.graphql +features: + - fullTextSearch +dataSources: + - kind: ethereum/contract + name: StreamRegistry + network: iotex + source: + address: "0x080F34fec2bc33928999Ea9e39ADc798bEF3E0d6" + abi: StreamRegistry + startBlock: 33510000 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + entities: + - Stream + - StreamPermission + abis: + - name: StreamRegistry + file: ./abis/StreamRegistry.json + eventHandlers: + - event: StreamCreated(string,string) + handler: handleStreamCreation + - event: StreamDeleted(string) + handler: handleStreamDeletion + - event: StreamUpdated(string,string) + handler: handleStreamUpdate + - event: PermissionUpdated(string,address,bool,bool,uint256,uint256,bool) + handler: handlePermissionUpdate + - event: PermissionUpdatedForUserId(string,bytes,bool,bool,uint256,uint256,bool) + handler: handlePermissionUpdateForUserId + file: ./src/streamRegistry.ts + - kind: ethereum/contract + name: NodeRegistry + network: iotex + source: + address: "0xb9e70Bd9833dd091f06edc8073aa86a76EdeF46D" + abi: NodeRegistry + startBlock: 33510000 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + entities: + - Node + abis: + - name: NodeRegistry + file: ./abis/NodeRegistry.json + eventHandlers: + - event: NodeUpdated(indexed address,string,indexed uint256,uint256) + handler: handleNodeUpdate + - event: NodeRemoved(indexed address) + handler: handleNodeRemoved + file: ./src/nodeRegistry.ts + - kind: ethereum/contract + name: StreamStorageRegistry + network: iotex + source: + address: "0xF79c40Fbc432f1f8B8B017441B644e0ac7bccea2" + abi: StreamStorageRegistry + startBlock: 33510000 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + entities: + - Node + abis: + - name: StreamStorageRegistry + file: ./abis/StreamStorageRegistry.json + eventHandlers: + - event: Added(string,indexed address) + handler: handleStorageNodeAddedToStream + - event: Removed(string,indexed address) + handler: handleStorageNodeRemovedFromStream + file: ./src/streamStorageRegistry.ts + - kind: ethereum/contract + name: StreamrConfig + network: iotex + source: + address: '0x23Dd2D1f39AD0f9d517ce56Ca490eF19B50e6f1A' + abi: StreamrConfig + startBlock: 33510000 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ./src/streamrConfig.ts + entities: + - Network + abis: + - name: StreamrConfig + file: ./abis/StreamrConfig.json + eventHandlers: + - event: ConfigChanged(indexed string,indexed uint256,indexed address) + handler: handleConfigChanged + - kind: ethereum/contract + name: SponsorshipFactory + network: iotex + source: + # make sure this is same as config.contracts.SponsorshipFactory in https://github.com/streamr-dev/network-contracts/blob/develop/packages/config/src/networks.json + address: '0xe4Ae8e6c5b6E85914738803ad73c111eF2618621' + abi: SponsorshipFactory + startBlock: 33510000 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ./src/sponsorshipFactory.ts + entities: + - Sponsorship + - SponsorshipDailyBucket + - Network + abis: + - name: SponsorshipFactory + file: ./abis/SponsorshipFactory.json + - name: Sponsorship + file: ./abis/Sponsorship.json + eventHandlers: + - event: NewSponsorship(indexed address,string,string,address[],uint256[],indexed address) + handler: handleNewSponsorship + - kind: ethereum/contract + name: OperatorFactory + network: iotex + source: + # make sure this is same as config.contracts.OperatorFactory in https://github.com/streamr-dev/network-contracts/blob/develop/packages/config/src/networks.json + address: '0xbC1cC84912d54fCf7316A6dA2e7A884731a87935' + abi: OperatorFactory + startBlock: 33510000 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ./src/operatorFactory.ts + entities: + - Operator + - Network + abis: + - name: OperatorFactory + file: ./abis/OperatorFactory.json + - name: Operator + file: ./abis/Operator.json + eventHandlers: + - event: NewOperator(indexed address,indexed address) + handler: handleNewOperator + - event: VoterUpdate(indexed address,indexed bool) + handler: handleVoterUpdate + +templates: + - name: Sponsorship + kind: ethereum/contract + network: iotex + source: + abi: Sponsorship + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ./src/sponsorship.ts + entities: + - Sponsorship + - Operator + - Stake + - StakingEvent + - SlashingEvent + - SponsoringEvent + - Flag + - Vote + - SponsorshipDailyBucket + abis: + - name: Sponsorship + file: ./abis/Sponsorship.json + eventHandlers: + - event: StakeUpdate(indexed address,uint256,uint256) + handler: handleStakeUpdated + - event: StakeLockUpdate(indexed address,uint256,uint256) + handler: handleStakeLockUpdated + - event: InsolvencyStarted(uint256) + handler: handleInsolvencyStarted + - event: InsolvencyEnded(uint256,uint256,uint256) + handler: handleInsolvencyEnded + - event: SponsorshipUpdate(uint256,uint256,indexed uint256,indexed bool) + handler: handleSponsorshipUpdated + - event: Flagged(indexed address,indexed address,uint256,indexed uint256,string) + handler: handleFlagged + - event: FlagUpdate(indexed address,indexed uint8,uint256,uint256,indexed address,int256) + handler: handleFlagUpdate + - event: OperatorSlashed(indexed address,uint256) + handler: handleOperatorSlashed + - event: SponsorshipReceived(indexed address,uint256) + handler: handleSponsorshipReceived + - name: Operator + kind: ethereum/contract + network: iotex + source: + abi: Operator + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ./src/operator.ts + entities: + - Operator + - Delegator + - OperatorDailyBucket + - DelegatorDailyBucket + - Delegation + - QueueEntry + - Network + abis: + - name: Operator + file: ./abis/Operator.json + eventHandlers: + - event: Delegated(indexed address,uint256) + handler: handleDelegated + - event: Undelegated(indexed address,uint256) + handler: handleUndelegated + - event: BalanceUpdate(indexed address,uint256,uint256,uint256) + handler: handleBalanceUpdate + - event: OperatorValueUpdate(uint256,uint256) + handler: handleOperatorValueUpdate + - event: Profit(uint256,indexed uint256,indexed uint256) + handler: handleProfit + - event: Loss(uint256) + handler: handleLoss + - event: QueuedDataPayout(indexed address,uint256,uint256) + handler: handleQueuedDataPayout + - event: QueueUpdated(indexed address,uint256,uint256) + handler: handleQueueUpdated + - event: NodesSet(address[]) + handler: handleNodesSet + - event: Heartbeat(indexed address,string) + handler: handleHeartbeat + - event: MetadataUpdated(string,indexed address,indexed uint256) + handler: handleMetadataUpdate + - event: ReviewRequest(indexed address,indexed address,uint256,uint256,string) + handler: handleReviewRequest + - event: RoleGranted(indexed bytes32,indexed address,indexed address) + handler: handleRoleGranted + - event: RoleRevoked(indexed bytes32,indexed address,indexed address) + handler: handleRoleRevoked