Skip to content

Commit

Permalink
MOST-166: Added EVM_MAINNET key to hardhat config. (#238)
Browse files Browse the repository at this point in the history
* MOST-166: Added EVM_MAINNET key to hardhat config. Supplied Testnet
configuration used in the past as well.

* Linter

* Review
  • Loading branch information
Marcin-Radecki authored Sep 4, 2024
1 parent 73d5db6 commit a1f03ff
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 0 deletions.
11 changes: 11 additions & 0 deletions azero/env/l2_mainnet.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"ws_node": "wss://ws.azero.dev",
"relayers": [
"<AZERO deployer address>"
],
"deployer_seed": "<AZERO deployer seed>",
"signature_threshold": 1,
"dev": false,
"azero_deposit": 100000,
"token_config_path": "/../../cfg/l2_tokens_mainnet.json"
}
11 changes: 11 additions & 0 deletions azero/env/l2_testnet.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"ws_node": "wss://ws.test.azero.dev",
"relayers": [
"<TZERO deployer address>"
],
"deployer_seed": "<TZERO deployer seed>",
"signature_threshold": 1,
"dev": false,
"azero_deposit": 100000,
"token_config_path": "/../../cfg/l2_tokens_testnet.json"
}
12 changes: 12 additions & 0 deletions cfg/l2_tokens_mainnet.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"eth": [],
"aleph": [
{
"name": "Wrapped AZERO",
"symbol": "wAZERO",
"decimals": 12,
"deployed": true,
"address": "5CtuFVgEUz13SFPVY6s2cZrnLDEkxQXc19aXrNARwEBeCXgg"
}
]
}
12 changes: 12 additions & 0 deletions cfg/l2_tokens_testnet.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"eth": [],
"aleph": [
{
"name": "Wrapped AZERO",
"symbol": "wAZERO",
"decimals": 12,
"deployed": true,
"address": "5EFDb7mKbougLtr5dnwd5KDfZ3wK55JPGPLiryKq4uRMPR46"
}
]
}
29 changes: 29 additions & 0 deletions eth/hardhat.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ const ETHEREUM_PRIVATE_KEY = process.env.ETHEREUM_PRIVATE_KEY;
const ETHEREUM_GUARDIAN_ADDRESS = process.env.ETHEREUM_GUARDIAN_ADDRESS;
const EVM_TESTNET_KEY = process.env.EVM_TESTNET_KEY;
const EVM_TESTNET_ACCOUNT_NUMBER = process.env.EVM_TESTNET_ACCOUNT_NUMBER;
const EVM_MAINNET_KEY = process.env.EVM_MAINNET_KEY;
const EVM_MAINNET_ACCOUNT_NUMBER = process.env.EVM_MAINNET_ACCOUNT_NUMBER;

var config = {
defaultNetwork: "hardhat",
Expand Down Expand Up @@ -177,6 +179,33 @@ if (EVM_TESTNET_KEY) {
};
}

if (EVM_MAINNET_KEY) {
config.networks.evm_mainnet = {
url: "https://rpc.alephzero.raas.gelato.cloud",
accounts: [EVM_MAINNET_KEY],
deploymentConfig: {
dev: false,
guardianIds: [
typeof EVM_MAINNET_ACCOUNT_NUMBER == "undefined" ||
EVM_MAINNET_ACCOUNT_NUMBER == ""
? "0x66325D6a4C234b3927f9a9CA7Be510469c81e135"
: EVM_MAINNET_ACCOUNT_NUMBER, // EVM account address corresponding to EVM_MAINNET_KEY
],
threshold: 1,
bazero_decimals: 12,
bazero_token_mint: 100_000,
pool_config: {
amplification_coefficient: 2000,
admin_fee: 0,
fee: 0,
initial_token_supply: 100_000,
initial_native_supply: 100_000,
},
wazero_l1_address: "5CtuFVgEUz13SFPVY6s2cZrnLDEkxQXc19aXrNARwEBeCXgg",
},
};
}

if (ETHEREUM_PRIVATE_KEY) {
config.networks.mainnet = {
url: "https://ethereum-rpc.publicnode.com",
Expand Down

0 comments on commit a1f03ff

Please sign in to comment.