Skip to content

Commit

Permalink
Hedera contract deployment
Browse files Browse the repository at this point in the history
Modify hardhat/hedera deploy scripts and README

Signed-off-by: brioux <[email protected]>
  • Loading branch information
brioux committed Mar 28, 2023
1 parent 761e65c commit 7d749e2
Show file tree
Hide file tree
Showing 12 changed files with 3,164 additions and 98 deletions.
2 changes: 1 addition & 1 deletion app/api-server/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const assertEnv = (key: string): string => {
return process.env[key] || '';
}
const contract_address = assertEnv('LEDGER_EMISSION_TOKEN_CONTRACT_ADDRESS')
const tracker_address = process.env['LEDGER_CARBON_TRACKER_ADDRESS']
const tracker_address = assertEnv('LEDGER_CARBON_TRACKER_ADDRESS')
const network_name = assertEnv('LEDGER_ETH_NETWORK')
const network_rpc_url = assertEnv('LEDGER_ETH_JSON_RPC_URL')
const network_ws_url = process.env['LEDGER_ETH_WS_URL']
Expand Down
24 changes: 21 additions & 3 deletions app/frontend/contracts/src/addresses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,24 @@ const networksAndAddresses = {
}
},

hedera_testnet: {
network: "Hedera Testnet",
tokenNetwork: {
address: "0x00000000000000000000000000000000003be83f",
},
carbonTracker: {
address: "0x00000000000000000000000000000000003c0064",
},
dao: {
governor: {
address: "",
},
daoToken: {
address: "",
}
}
},

goerli: {
network: "Goerli Testnet",
tokenNetwork: {
Expand All @@ -34,10 +52,10 @@ const networksAndAddresses = {
},
dao: {
governor: {
address: "0x9F4590684d1DD950dF65Dc71D39f782bc3af317A",
address: "0x6875735ee7864673B211eC2ec2a534179F863DAD",
},
daoToken: {
address: "0x67E5b82809f28aA321818b90bF5c603D954f87C8",
address: "0x08AA8Ae1E7A087b591a5a1234fBE20e592c5c417",
}
}
},
Expand Down Expand Up @@ -152,6 +170,6 @@ const networksAndAddresses = {
}

// change this to the network you want
const addresses = networksAndAddresses.hardhat;
const addresses = networksAndAddresses.hedera_testnet;

export default addresses;
6 changes: 5 additions & 1 deletion hardhat/.ethereum-config.js.template
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,8 @@ exports.ETHERSCAN_API_KEY = "";
exports.BSC_PRIVATE_KEY = "";

// Only required for Avalanche deployments
exports.AVALANCHE_PRIVATE_KEY = ""
exports.AVALANCHE_PRIVATE_KEY = "";

// Only required for Hedera Testnet deployments
exports.HEDERA_TESTNET_ENDPOINT = "";
exports.HEDERA_TESTNET_OPERATOR_PRIVATE_KEY = "";
1 change: 1 addition & 0 deletions hardhat/deployments/hedera-testnet/.chainId
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
296
Loading

0 comments on commit 7d749e2

Please sign in to comment.