diff --git a/.openzeppelin/unknown-296.json b/.openzeppelin/unknown-296.json new file mode 100644 index 000000000..0615ffddc --- /dev/null +++ b/.openzeppelin/unknown-296.json @@ -0,0 +1,231 @@ +{ + "manifestVersion": "3.2", + "admin": { + "address": "0xe773F10dE367E803940693cD3AA3C563A354dE26", + "txHash": "0x2ef473016cf20b7ee3c99280e6d29e64a4a2e7054d111ed08fa16d16a3cb1179" + }, + "proxies": [ + { + "address": "0xd39b40aC9279EeeB86FBbDeb2C9acDF16e16cF89", + "txHash": "0x14a7b56ad63b2df28036cfc701c1119bb122174e1ab6443c40c8e9ad7d743c60", + "kind": "transparent" + } + ], + "impls": { + "f1ae5f6ef2fae572c225dbdd45350f5c4b22a4360002fcead42bca135ebcd241": { + "address": "0x606e4A7Ffd2cF4Db089bdF530c17618eA29b4F1c", + "txHash": "0xdb5e386079d76c8a3caab5099fca3bd1d72663d1ce2b315acf5fccf335d3fcb7", + "layout": { + "solcVersion": "0.8.19", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "lib/openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "lib/openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "lib/openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + }, + { + "label": "__gap", + "offset": 0, + "slot": "51", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC165Upgradeable", + "src": "lib/openzeppelin-contracts-upgradeable/contracts/utils/introspection/ERC165Upgradeable.sol:41" + }, + { + "label": "_roles", + "offset": 0, + "slot": "101", + "type": "t_mapping(t_bytes32,t_struct(RoleData)35468_storage)", + "contract": "AccessControlUpgradeable", + "src": "lib/openzeppelin-contracts-upgradeable/contracts/access/AccessControlUpgradeable.sol:62" + }, + { + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage", + "contract": "AccessControlUpgradeable", + "src": "lib/openzeppelin-contracts-upgradeable/contracts/access/AccessControlUpgradeable.sol:260" + }, + { + "label": "anchorToProfileId", + "offset": 0, + "slot": "151", + "type": "t_mapping(t_address,t_bytes32)", + "contract": "Registry", + "src": "contracts/core/Registry.sol:108" + }, + { + "label": "profilesById", + "offset": 0, + "slot": "152", + "type": "t_mapping(t_bytes32,t_struct(Profile)2673_storage)", + "contract": "Registry", + "src": "contracts/core/Registry.sol:110" + }, + { + "label": "profileIdToPendingOwner", + "offset": 0, + "slot": "153", + "type": "t_mapping(t_bytes32,t_address)", + "contract": "Registry", + "src": "contracts/core/Registry.sol:112" + } + ], + "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_address,t_bytes32)": { + "label": "mapping(address => bytes32)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_address)": { + "label": "mapping(bytes32 => address)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_struct(Profile)2673_storage)": { + "label": "mapping(bytes32 => struct IRegistry.Profile)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_struct(RoleData)35468_storage)": { + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Metadata)3148_storage": { + "label": "struct Metadata", + "members": [ + { + "label": "protocol", + "type": "t_uint256", + "offset": 0, + "slot": "0" + }, + { + "label": "pointer", + "type": "t_string_storage", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Profile)2673_storage": { + "label": "struct IRegistry.Profile", + "members": [ + { + "label": "id", + "type": "t_bytes32", + "offset": 0, + "slot": "0" + }, + { + "label": "nonce", + "type": "t_uint256", + "offset": 0, + "slot": "1" + }, + { + "label": "name", + "type": "t_string_storage", + "offset": 0, + "slot": "2" + }, + { + "label": "metadata", + "type": "t_struct(Metadata)3148_storage", + "offset": 0, + "slot": "3" + }, + { + "label": "owner", + "type": "t_address", + "offset": 0, + "slot": "5" + }, + { + "label": "anchor", + "type": "t_address", + "offset": 0, + "slot": "6" + } + ], + "numberOfBytes": "224" + }, + "t_struct(RoleData)35468_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" + } + }, + "namespaces": {} + } + } + } +} diff --git a/hardhat.config.ts b/hardhat.config.ts index 93918e497..fb84c1aa9 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -275,12 +275,14 @@ const config: HardhatUserConfig = { }, "hedera-mainnet": { ...createMainnetConfig("hedera-mainnet"), - url: "https://mainnet.hashio.io/api" + url: "https://mainnet.hashio.io/api", + gasPrice: 350000000000, // url: "https://295.rpc.thirdweb.com", }, "hedera-testnet": { ...createTestnetConfig("hedera-testnet"), - url: "https://testnet.hashio.io/api" + url: "https://testnet.hashio.io/api", + gasPrice: 350000000000, // url: "https://296.rpc.thirdweb.com" }, diff --git a/reports/deployment-logs/core/deploy.log b/reports/deployment-logs/core/deploy.log index 52e0a4995..ad0dbe095 100644 --- a/reports/deployment-logs/core/deploy.log +++ b/reports/deployment-logs/core/deploy.log @@ -673,3 +673,11 @@ 20250107_150308 - Deployment finished with 0 error(s) 20250107_150313 - Executing: bun hardhat run scripts/strategies/deployEasyRetroFunding.ts --no-compile --network sepolia | tee ./reports/deployment-logs/strategies/deployEasyRetroFunding/sepolia/20250107_150313/deploy-20250107_150313.log 20250107_160738 - Deployment finished with 0 error(s) +20250207_152703 - Executing: bun hardhat run scripts/core/deployRegistry.ts --no-compile --network hedera-testnet | tee ./reports/deployment-logs/core/deployRegistry/hedera-testnet/20250207_152703/deploy-20250207_152703.log +20250207_152709 - Deployment finished with 0 error(s) +20250207_152709 - Executing: bun hardhat run scripts/core/deployContractFactory.ts --no-compile --network hedera-testnet | tee ./reports/deployment-logs/core/deployContractFactory/hedera-testnet/20250207_152703/deploy-20250207_152703.log +20250207_152713 - Deployment finished with 0 error(s) +20250207_152713 - Executing: bun hardhat run scripts/core/deployAllo.ts --no-compile --network hedera-testnet | tee ./reports/deployment-logs/core/deployAllo/hedera-testnet/20250207_152703/deploy-20250207_152703.log +20250207_152714 - Deployment finished with 0 error(s) +20250207_152933 - Executing: bun hardhat run scripts/core/deployRegistry.ts --no-compile --network hedera-testnet | tee ./reports/deployment-logs/core/deployRegistry/hedera-testnet/20250207_152933/deploy-20250207_152933.log +20250207_153119 - Deployment finished with 0 error(s) diff --git a/reports/deployment-logs/core/deployRegistry/hedera-testnet/20250207_152703/deploy-20250207_152703.log b/reports/deployment-logs/core/deployRegistry/hedera-testnet/20250207_152703/deploy-20250207_152703.log new file mode 100644 index 000000000..95a133b40 --- /dev/null +++ b/reports/deployment-logs/core/deployRegistry/hedera-testnet/20250207_152703/deploy-20250207_152703.log @@ -0,0 +1,12 @@ +WARNING: You are currently using Node.js v21.7.3, which is not supported by Hardhat. This can lead to unexpected behavior. See https://hardhat.org/nodejs-versions + + + + //////////////////////////////////////////////////// + Deploys Registry.sol on hedera-testnet + //////////////////////////////////////////////////// + +Error: Registry params not found for chainId: 296 + at deployRegistry (/Users/thelostone-mc/Labs/allo/allo-v2/scripts/core/deployRegistry.ts:28:11) + at processTicksAndRejections (node:internal/process/task_queues:95:5) +error: "hardhat" exited with code 1 diff --git a/reports/deployment-logs/core/deployRegistry/hedera-testnet/20250207_152933/deploy-20250207_152933.log b/reports/deployment-logs/core/deployRegistry/hedera-testnet/20250207_152933/deploy-20250207_152933.log new file mode 100644 index 000000000..3d0d3893d --- /dev/null +++ b/reports/deployment-logs/core/deployRegistry/hedera-testnet/20250207_152933/deploy-20250207_152933.log @@ -0,0 +1,72 @@ +WARNING: You are currently using Node.js v21.7.3, which is not supported by Hardhat. This can lead to unexpected behavior. See https://hardhat.org/nodejs-versions + + + + //////////////////////////////////////////////////// + Deploys Registry.sol on hedera-testnet + //////////////////////////////////////////////////// + +┌─────────────────┬──────────────────────────────────────────────┐ +│ (index) │ Values │ +├─────────────────┼──────────────────────────────────────────────┤ +│ contract │ 'Registry.sol' │ +│ chainId │ 296 │ +│ network │ 'hedera-testnet' │ +│ deployerAddress │ '0xB8cEF765721A6da910f14Be93e7684e9a3714123' │ +│ registryOwner │ '0x8C180840fcBb90CE8464B4eCd12ab0f840c6647C' │ +│ balance │ '100.0' │ +└─────────────────┴──────────────────────────────────────────────┘ +Deploying Registry... +Registry proxy deployed to: 0xd39b40aC9279EeeB86FBbDeb2C9acDF16e16cF89 +Registry implementation deployed to: 0x606e4A7Ffd2cF4Db089bdF530c17618eA29b4F1c +Proxy Admin: 0xe773F10dE367E803940693cD3AA3C563A354dE26 +Proxy Admin Owner: 0xB8cEF765721A6da910f14Be93e7684e9a3714123 + +Verifying contract... +Verifying implementation: 0x606e4A7Ffd2cF4Db089bdF530c17618eA29b4F1c +Failed to verify implementation contract at 0x606e4A7Ffd2cF4Db089bdF530c17618eA29b4F1c: Trying to verify a contract in a network with chain id 296, but the plugin doesn't recognize it as a supported chain. + +You can manually add support for it by following these instructions: https://hardhat.org/verify-custom-networks + +To see the list of supported networks, run this command: + + npx hardhat verify --list-networks +ChainConfigNotFoundError: Trying to verify a contract in a network with chain id 296, but the plugin doesn't recognize it as a supported chain. + +You can manually add support for it by following these instructions: https://hardhat.org/verify-custom-networks + +To see the list of supported networks, run this command: + + npx hardhat verify --list-networks + at Function.getCurrentChainConfig (/Users/thelostone-mc/Labs/allo/allo-v2/node_modules/@nomicfoundation/hardhat-verify/src/internal/etherscan.ts:65:13) + at processTicksAndRejections (node:internal/process/task_queues:95:5) + at async getEtherscanInstance (/Users/thelostone-mc/Labs/allo/allo-v2/node_modules/@openzeppelin/hardhat-upgrades/src/utils/etherscan-api.ts:44:23) + at async fullVerifyTransparentOrUUPS (/Users/thelostone-mc/Labs/allo/allo-v2/node_modules/@openzeppelin/hardhat-upgrades/src/verify-proxy.ts:202:21) + at async verify (/Users/thelostone-mc/Labs/allo/allo-v2/node_modules/@openzeppelin/hardhat-upgrades/src/verify-proxy.ts:99:5) + at async OverriddenTaskDefinition._action (/Users/thelostone-mc/Labs/allo/allo-v2/node_modules/@openzeppelin/hardhat-upgrades/src/index.ts:206:12) + at async Environment._runTaskDefinition (/Users/thelostone-mc/Labs/allo/allo-v2/node_modules/hardhat/src/internal/core/runtime-environment.ts:351:14) + at async Environment.run (/Users/thelostone-mc/Labs/allo/allo-v2/node_modules/hardhat/src/internal/core/runtime-environment.ts:184:14) + at async SimpleTaskDefinition.action (/Users/thelostone-mc/Labs/allo/allo-v2/node_modules/@nomicfoundation/hardhat-verify/src/index.ts:546:7) + at async Environment._runTaskDefinition (/Users/thelostone-mc/Labs/allo/allo-v2/node_modules/hardhat/src/internal/core/runtime-environment.ts:351:14) + +Verifying contract... +ChainConfigNotFoundError: Trying to verify a contract in a network with chain id 296, but the plugin doesn't recognize it as a supported chain. + +You can manually add support for it by following these instructions: https://hardhat.org/verify-custom-networks + +To see the list of supported networks, run this command: + + npx hardhat verify --list-networks + at Function.getCurrentChainConfig (/Users/thelostone-mc/Labs/allo/allo-v2/node_modules/@nomicfoundation/hardhat-verify/src/internal/etherscan.ts:65:13) + at processTicksAndRejections (node:internal/process/task_queues:95:5) + at async SimpleTaskDefinition.action (/Users/thelostone-mc/Labs/allo/allo-v2/node_modules/@nomicfoundation/hardhat-verify/src/index.ts:234:27) + at async Environment._runTaskDefinition (/Users/thelostone-mc/Labs/allo/allo-v2/node_modules/hardhat/src/internal/core/runtime-environment.ts:351:14) + at async hardhatVerify (/Users/thelostone-mc/Labs/allo/allo-v2/node_modules/@openzeppelin/hardhat-upgrades/src/verify-proxy.ts:118:12) + at async OverriddenTaskDefinition._action (/Users/thelostone-mc/Labs/allo/allo-v2/node_modules/@openzeppelin/hardhat-upgrades/src/index.ts:206:12) + at async Environment._runTaskDefinition (/Users/thelostone-mc/Labs/allo/allo-v2/node_modules/hardhat/src/internal/core/runtime-environment.ts:351:14) + at async Environment.run (/Users/thelostone-mc/Labs/allo/allo-v2/node_modules/hardhat/src/internal/core/runtime-environment.ts:184:14) + at async SimpleTaskDefinition.action (/Users/thelostone-mc/Labs/allo/allo-v2/node_modules/@nomicfoundation/hardhat-verify/src/index.ts:546:7) + at async Environment._runTaskDefinition (/Users/thelostone-mc/Labs/allo/allo-v2/node_modules/hardhat/src/internal/core/runtime-environment.ts:351:14) + + Validating hasRole(0x815b5a78dc333d344c7df9da23c04dbd432015cc701876ddb9ffe850e6882747,0x8C180840fcBb90CE8464B4eCd12ab0f840c6647C) == true + ✅ PASSED with Result: true diff --git a/scripts/config/allo.config.ts b/scripts/config/allo.config.ts index 33e0b519c..2a4f5ec6f 100644 --- a/scripts/config/allo.config.ts +++ b/scripts/config/allo.config.ts @@ -212,5 +212,19 @@ export const alloConfig: DeployParams = { treasury: "0x8C180840fcBb90CE8464B4eCd12ab0f840c6647C", percentFee: 0, baseFee: 0, - } + }, + // Hedera Mainnet + 295: { + owner: "0x8C180840fcBb90CE8464B4eCd12ab0f840c6647C", + treasury: "0x8C180840fcBb90CE8464B4eCd12ab0f840c6647C", + percentFee: 0, + baseFee: 0, + }, + // Hedera Testnet + 296: { + owner: "0x8C180840fcBb90CE8464B4eCd12ab0f840c6647C", + treasury: "0x8C180840fcBb90CE8464B4eCd12ab0f840c6647C", + percentFee: 0, + baseFee: 0, + }, }; diff --git a/scripts/config/common.config.ts b/scripts/config/common.config.ts index 5c7d6e21f..fb7256435 100644 --- a/scripts/config/common.config.ts +++ b/scripts/config/common.config.ts @@ -150,5 +150,15 @@ export const commonConfig: DeployParams = { 100: { proxyAdminOwner: "0x8C180840fcBb90CE8464B4eCd12ab0f840c6647C", permit2Address: "0x000000000022D473030F116dDEE9F6B43aC78BA3", - } + }, + // Hedera Mainnet + 295: { + proxyAdminOwner: "TODO", + permit2Address: "TODO", + }, + // Hedera Testnet + 296: { + proxyAdminOwner: "TODO", + permit2Address: "TODO", + }, }; diff --git a/scripts/config/registry.config.ts b/scripts/config/registry.config.ts index 0f2abe7e8..8a76c4ae7 100644 --- a/scripts/config/registry.config.ts +++ b/scripts/config/registry.config.ts @@ -123,4 +123,12 @@ export const registryConfig: DeployParams = { 100: { owner: "0x8C180840fcBb90CE8464B4eCd12ab0f840c6647C", }, + // Hedera Mainnet + 295: { + owner: "0x8C180840fcBb90CE8464B4eCd12ab0f840c6647C", + }, + // Hedera Testnet + 296: { + owner: "0x8C180840fcBb90CE8464B4eCd12ab0f840c6647C", + }, }; diff --git a/scripts/config/strategies.config.ts b/scripts/config/strategies.config.ts index 7c71af5f3..e1f6abeed 100644 --- a/scripts/config/strategies.config.ts +++ b/scripts/config/strategies.config.ts @@ -736,4 +736,34 @@ export const strategyConfig: DeployParams = { version: "v1.1", }, }, + // Hedera Mainnet + 295: { + "donation-voting-merkle-distribution-direct": { + name: "DonationVotingMerkleDistributionDirectTransferStrategy", + version: "v2.1", + }, + "direct-grants-lite": { + name: "DirectGrantsLiteStrategy", + version: "v1.0", + }, + "direct-allocation": { + name: "DirectAllocationStrategy", + version: "v1.1", + }, + }, + // Hedera Testnet + 296: { + "donation-voting-merkle-distribution-direct": { + name: "DonationVotingMerkleDistributionDirectTransferStrategy", + version: "v2.1", + }, + "direct-grants-lite": { + name: "DirectGrantsLiteStrategy", + version: "v1.0", + }, + "direct-allocation": { + name: "DirectAllocationStrategy", + version: "v1.1", + }, + }, }; diff --git a/scripts/core/deployAllNetworks.sh b/scripts/core/deployAllNetworks.sh index c6cb51435..1360e7e52 100755 --- a/scripts/core/deployAllNetworks.sh +++ b/scripts/core/deployAllNetworks.sh @@ -50,7 +50,7 @@ networks=( # "metisAndromeda" # "gnosis" # "hedera-mainnet" -# "hedera-testnet" + "hedera-testnet" # === ZkSync Era === # "zkSyncTestnet" # "zkSyncMainnet" @@ -58,7 +58,7 @@ networks=( ) scripts=( - # "core/deployRegistry" + "core/deployRegistry" # "core/deployContractFactory" # "core/deployAllo" diff --git a/scripts/deployments/registry.deployment.json b/scripts/deployments/registry.deployment.json index 010b8c26f..e86906e51 100644 --- a/scripts/deployments/registry.deployment.json +++ b/scripts/deployments/registry.deployment.json @@ -62,6 +62,15 @@ "proxyAdmin": "0x758b87af7fdB4783f848a1dDEa1F025dC48B9858", "proxyAdminOwner": "0x8C180840fcBb90CE8464B4eCd12ab0f840c6647C" }, + "296": { + "name": "Registry", + "implementation": "0x606e4A7Ffd2cF4Db089bdF530c17618eA29b4F1c", + "proxy": "0xd39b40aC9279EeeB86FBbDeb2C9acDF16e16cF89", + "deployerAddress": "0xB8cEF765721A6da910f14Be93e7684e9a3714123", + "owner": "0x8C180840fcBb90CE8464B4eCd12ab0f840c6647C", + "proxyAdmin": "0xe773F10dE367E803940693cD3AA3C563A354dE26", + "proxyAdminOwner": "0xB8cEF765721A6da910f14Be93e7684e9a3714123" + }, "300": { "name": "Registry", "proxy": "0xaa376Ef759c1f5A8b0B5a1e2FEC5C23f3bF30246", diff --git a/scripts/test/createProfile.ts b/scripts/test/createProfile.ts index 2ca66c652..4ae3ecc57 100644 --- a/scripts/test/createProfile.ts +++ b/scripts/test/createProfile.ts @@ -12,7 +12,7 @@ export async function createProfile() { const balance = await ethers.provider.getBalance(deployerAddress); - const registry = "0x4AAcca72145e1dF2aeC137E1f3C5E3D75DB8b5f3"; + const registry = "0xd39b40aC9279EeeB86FBbDeb2C9acDF16e16cF89"; console.table({ contract: "registry: create profile", @@ -27,17 +27,17 @@ export async function createProfile() { const instance = await ethers.getContractAt('Registry', registry); await instance.createProfile( - 1, // none + 1, // nonce "Direct Allocation", // name { protocol: 1, pointer: "bafybeia4khbew3r2mkflyn7nzlvfzcb3qpfeftz5ivpzfwn77ollj47gqi" }, // metadata "0x8C180840fcBb90CE8464B4eCd12ab0f840c6647C", // owner - ["0x8C180840fcBb90CE8464B4eCd12ab0f840c6647C"] // members + [] // members ); - console.log("profile created at:", instance.target); + console.log("profile created on resgistry:", instance.target); return instance.target; }