Skip to content

Commit

Permalink
Add Hedera (#673)
Browse files Browse the repository at this point in the history
* add hardhat config

* hedera deploy

* deploy on hedera-mainnet

* deploy strategies
  • Loading branch information
thelostone-mc authored Feb 10, 2025
1 parent ee6dbbd commit b5907b6
Show file tree
Hide file tree
Showing 33 changed files with 2,277 additions and 6 deletions.
515 changes: 515 additions & 0 deletions .openzeppelin/unknown-295.json

Large diffs are not rendered by default.

740 changes: 740 additions & 0 deletions .openzeppelin/unknown-296.json

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ const chainIds = {
"sei-devnet": 713715,
"sei-mainnet": 1329,
"lukso-testnet": 4201,
"hedera-testnet": 296,

// mainnet
mainnet: 1,
Expand All @@ -52,6 +53,7 @@ const chainIds = {
"lukso-mainnet": 42,
metisAndromeda: 1088,
gnosis: 100,
"hedera-mainnet": 295,
};

let deployPrivateKey = process.env.DEPLOYER_PRIVATE_KEY as string;
Expand Down Expand Up @@ -271,6 +273,18 @@ const config: HardhatUserConfig = {
...createMainnetConfig("gnosis"),
url: "https://rpc.gnosischain.com",
},
"hedera-mainnet": {
...createMainnetConfig("hedera-mainnet"),
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",
gasPrice: 350000000000,
// url: "https://296.rpc.thirdweb.com"
},

// Local Networks
localhost: createTestnetConfig("localhost", "http://localhost:8545"),
Expand Down
36 changes: 36 additions & 0 deletions reports/deployment-logs/core/deploy.log
Original file line number Diff line number Diff line change
Expand Up @@ -673,3 +673,39 @@
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)
20250207_182818 - Executing: bun hardhat run scripts/core/deployContractFactory.ts --no-compile --network hedera-testnet | tee ./reports/deployment-logs/core/deployContractFactory/hedera-testnet/20250207_182818/deploy-20250207_182818.log
20250207_182917 - Deployment finished with 0 error(s)
20250207_182922 - Executing: bun hardhat run scripts/core/deployAllo.ts --no-compile --network hedera-testnet | tee ./reports/deployment-logs/core/deployAllo/hedera-testnet/20250207_182922/deploy-20250207_182922.log
20250207_183056 - Deployment finished with 0 error(s)
20250207_183113 - Executing: bun hardhat run scripts/strategies/deployDirectGrantsLite.ts --no-compile --network hedera-testnet | tee ./reports/deployment-logs/strategies/deployDirectGrantsLite/hedera-testnet/20250207_183113/deploy-20250207_183113.log
20250207_183210 - Deployment finished with 0 error(s)
20250207_183231 - Executing: bun hardhat run scripts/strategies/deployDirectAllocation.ts --no-compile --network hedera-testnet | tee ./reports/deployment-logs/strategies/deployDirectAllocation/hedera-testnet/20250207_183231/deploy-20250207_183231.log
20250207_183315 - Deployment finished with 0 error(s)
20250210_152758 - Executing: bun hardhat run scripts/core/deployRegistry.ts --no-compile --network hedera-mainnet | tee ./reports/deployment-logs/core/deployRegistry/hedera-mainnet/20250210_152758/deploy-20250210_152758.log
20250210_152807 - Deployment finished with 0 error(s)
20250210_152934 - Executing: bun hardhat run scripts/core/deployRegistry.ts --no-compile --network hedera-testnet | tee ./reports/deployment-logs/core/deployRegistry/hedera-testnet/20250210_152934/deploy-20250210_152934.log
20250210_153108 - Deployment finished with 0 error(s)
20250210_153238 - Executing: bun hardhat run scripts/core/deployRegistry.ts --no-compile --network hedera-testnet | tee ./reports/deployment-logs/core/deployRegistry/hedera-testnet/20250210_153238/deploy-20250210_153238.log
20250210_153353 - Deployment finished with 0 error(s)
20250210_153356 - Executing: bun hardhat run scripts/core/deployContractFactory.ts --no-compile --network hedera-testnet | tee ./reports/deployment-logs/core/deployContractFactory/hedera-testnet/20250210_153356/deploy-20250210_153356.log
20250210_153457 - Deployment finished with 0 error(s)
20250210_153533 - Executing: bun hardhat run scripts/core/deployRegistry.ts --no-compile --network hedera-mainnet | tee ./reports/deployment-logs/core/deployRegistry/hedera-mainnet/20250210_153533/deploy-20250210_153533.log
20250210_153750 - Deployment finished with 0 error(s)
20250210_153803 - Executing: bun hardhat run scripts/core/deployContractFactory.ts --no-compile --network hedera-mainnet | tee ./reports/deployment-logs/core/deployContractFactory/hedera-mainnet/20250210_153803/deploy-20250210_153803.log
20250210_153908 - Deployment finished with 0 error(s)
20250210_153916 - Executing: bun hardhat run scripts/core/deployAllo.ts --no-compile --network hedera-mainnet | tee ./reports/deployment-logs/core/deployAllo/hedera-mainnet/20250210_153916/deploy-20250210_153916.log
20250210_154202 - Deployment finished with 0 error(s)
20250210_154612 - Executing: bun hardhat run scripts/strategies/deployDirectGrantsLite.ts --no-compile --network hedera-mainnet | tee ./reports/deployment-logs/strategies/deployDirectGrantsLite/hedera-mainnet/20250210_154612/deploy-20250210_154612.log
20250210_154756 - Deployment finished with 0 error(s)
20250210_154806 - Executing: bun hardhat run scripts/strategies/deployDirectAllocation.ts --no-compile --network hedera-mainnet | tee ./reports/deployment-logs/strategies/deployDirectAllocation/hedera-mainnet/20250210_154806/deploy-20250210_154806.log
20250210_154918 - Deployment finished with 0 error(s)
20250210_161400 - Executing: bun hardhat run scripts/strategies/deployDonationVotingMerkleDistributionDirect.ts --no-compile --network hedera-mainnet | tee ./reports/deployment-logs/strategies/deployDonationVotingMerkleDistributionDirect/hedera-mainnet/20250210_161400/deploy-20250210_161400.log
20250210_161551 - Deployment finished with 0 error(s)
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@

////////////////////////////////////////////////////
Deploys Allo.sol on hedera-mainnet
////////////////////////////////////////////////////

┌─────────────────┬──────────────────────────────────────────────┐
│ (index) │ Values │
├─────────────────┼──────────────────────────────────────────────┤
│ contract │ 'Deploy Allo.sol' │
│ chainId │ 295 │
│ network │ 'hedera-mainnet' │
│ owner │ '0x8C180840fcBb90CE8464B4eCd12ab0f840c6647C' │
│ registry │ '0x4AAcca72145e1dF2aeC137E1f3C5E3D75DB8b5f3' │
│ treasury │ '0x8C180840fcBb90CE8464B4eCd12ab0f840c6647C' │
│ percentFee │ 0 │
│ baseFee │ 0 │
│ deployerAddress │ '0x8C180840fcBb90CE8464B4eCd12ab0f840c6647C' │
│ balance │ '198.7854449' │
└─────────────────┴──────────────────────────────────────────────┘
Deploying Allo.sol...
Allo Proxy deployed to: 0x1133eA7Af70876e64665ecD07C0A0476d09465a1
Registry implementation deployed to: 0xB087535DB0df98fC4327136e897A5985E5Cfbd66
Proxy Admin: 0x758b87af7fdB4783f848a1dDEa1F025dC48B9858
Proxy Admin Owner: 0x8C180840fcBb90CE8464B4eCd12ab0f840c6647C

Verifying contract...
Verifying implementation: 0xB087535DB0df98fC4327136e897A5985E5Cfbd66
Failed to verify implementation contract at 0xB087535DB0df98fC4327136e897A5985E5Cfbd66: Trying to verify a contract in a network with chain id 295, 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 295, 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 295, 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 getRegistry() == 0x4AAcca72145e1dF2aeC137E1f3C5E3D75DB8b5f3
 ✅ PASSED with Result: 0x4AAcca72145e1dF2aeC137E1f3C5E3D75DB8b5f3

Validating getTreasury() == 0x8C180840fcBb90CE8464B4eCd12ab0f840c6647C
 ✅ PASSED with Result: 0x8C180840fcBb90CE8464B4eCd12ab0f840c6647C

Validating getPercentFee() == 0
 ✅ PASSED with Result: 0

Validating getBaseFee() == 0
 ✅ PASSED with Result: 0

Validating owner() == 0x8C180840fcBb90CE8464B4eCd12ab0f840c6647C
 ✅ PASSED with Result: 0x8C180840fcBb90CE8464B4eCd12ab0f840c6647C
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
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 Allo.sol on hedera-testnet
////////////////////////////////////////////////////

┌─────────────────┬──────────────────────────────────────────────┐
│ (index) │ Values │
├─────────────────┼──────────────────────────────────────────────┤
│ contract │ 'Deploy Allo.sol' │
│ chainId │ 296 │
│ network │ 'hedera-testnet' │
│ owner │ '0x8C180840fcBb90CE8464B4eCd12ab0f840c6647C' │
│ registry │ '0xd39b40aC9279EeeB86FBbDeb2C9acDF16e16cF89' │
│ treasury │ '0x8C180840fcBb90CE8464B4eCd12ab0f840c6647C' │
│ percentFee │ 0 │
│ baseFee │ 0 │
│ deployerAddress │ '0xB8cEF765721A6da910f14Be93e7684e9a3714123' │
│ balance │ '99.55726574' │
└─────────────────┴──────────────────────────────────────────────┘
Deploying Allo.sol...
Allo Proxy deployed to: 0x00CD233ae7F31DC3664401cb040f24f6bf615668
Registry implementation deployed to: 0x0BFA0AAF5f2D81f859e85C8E82A3fc5b624fc6E8
Proxy Admin: 0xe773F10dE367E803940693cD3AA3C563A354dE26
Proxy Admin Owner: 0xB8cEF765721A6da910f14Be93e7684e9a3714123

Verifying contract...
Verifying implementation: 0x0BFA0AAF5f2D81f859e85C8E82A3fc5b624fc6E8
Failed to verify implementation contract at 0x0BFA0AAF5f2D81f859e85C8E82A3fc5b624fc6E8: 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 getRegistry() == 0xd39b40aC9279EeeB86FBbDeb2C9acDF16e16cF89
 ✅ PASSED with Result: 0xd39b40aC9279EeeB86FBbDeb2C9acDF16e16cF89

Validating getTreasury() == 0x8C180840fcBb90CE8464B4eCd12ab0f840c6647C
 ✅ PASSED with Result: 0x8C180840fcBb90CE8464B4eCd12ab0f840c6647C

Validating getPercentFee() == 0
 ✅ PASSED with Result: 0

Validating getBaseFee() == 0
 ✅ PASSED with Result: 0

Validating owner() == 0x8C180840fcBb90CE8464B4eCd12ab0f840c6647C
 ✅ PASSED with Result: 0x8C180840fcBb90CE8464B4eCd12ab0f840c6647C
Loading

0 comments on commit b5907b6

Please sign in to comment.