Skip to content

Commit

Permalink
hedera deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
thelostone-mc committed Feb 7, 2025
1 parent 7666061 commit 1d4c849
Show file tree
Hide file tree
Showing 12 changed files with 406 additions and 10 deletions.
231 changes: 231 additions & 0 deletions .openzeppelin/unknown-296.json
Original file line number Diff line number Diff line change
@@ -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": {}
}
}
}
}
6 changes: 4 additions & 2 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},

Expand Down
8 changes: 8 additions & 0 deletions reports/deployment-logs/core/deploy.log
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
16 changes: 15 additions & 1 deletion scripts/config/allo.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
};
12 changes: 11 additions & 1 deletion scripts/config/common.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
};
8 changes: 8 additions & 0 deletions scripts/config/registry.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,4 +123,12 @@ export const registryConfig: DeployParams = {
100: {
owner: "0x8C180840fcBb90CE8464B4eCd12ab0f840c6647C",
},
// Hedera Mainnet
295: {
owner: "0x8C180840fcBb90CE8464B4eCd12ab0f840c6647C",
},
// Hedera Testnet
296: {
owner: "0x8C180840fcBb90CE8464B4eCd12ab0f840c6647C",
},
};
Loading

0 comments on commit 1d4c849

Please sign in to comment.