Skip to content

Commit

Permalink
[Relay] Update hardhat network
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelKim20 committed Mar 29, 2024
1 parent 8d0392c commit cb1a6c3
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 13 deletions.
4 changes: 2 additions & 2 deletions packages/relay/config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ relay:

contracts:
sideChain:
network: "production_net"
network: "production_side"
ledgerAddress : "${LEDGER_CONTRACT_ADDRESS}"
phoneLinkerAddress : "${PHONE_LINKER_CONTRACT_ADDRESS}"
shopAddress : "${SHOP_CONTRACT_ADDRESS}"
Expand All @@ -99,7 +99,7 @@ contracts:
loyaltyBridgeAddress: "${LOYALTY_BRIDGE_CONTRACT_ADDRESS}"
bridgeAddress: "${SIDE_CHAIN_BRIDGE_CONTRACT_ADDRESS}"
mainChain:
network: "bosagora_testnet"
network: "production_main"
tokenAddress : "${MAIN_CHAIN_TOKEN_CONTRACT_ADDRESS}"
loyaltyBridgeAddress: "${MAIN_CHAIN_LOYALTY_BRIDGE_CONTRACT_ADDRESS}"
bridgeAddress: "${MAIN_CHAIN_BRIDGE_CONTRACT_ADDRESS}"
Expand Down
7 changes: 5 additions & 2 deletions packages/relay/env/.env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ HOST_PORT=7070
# CHAIN URL
MAIN_NET_URL=https://mainnet.bosagora.org
TEST_NET_URL=https://testnet.bosagora.org
PRODUCTION_NET_URL=http://localhost:8545
PRODUCTION_CHAIN_ID=24680

PRODUCTION_MAIN_URL=https://mainnet.bosagora.org
PRODUCTION_MAIN_CHAIN_ID=2151
PRODUCTION_SIDE_URL=https://rpc.kios.bosagora.org
PRODUCTION_SIDE_CHAIN_ID=215110

# DATABASE INFO
DATABASE_HOST=127.0.0.1
Expand Down
11 changes: 8 additions & 3 deletions packages/relay/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -508,9 +508,14 @@ const config = {
chainId: 24680,
accounts: getAccounts(),
},
production_net: {
url: process.env.PRODUCTION_NET_URL || "",
chainId: Number(process.env.PRODUCTION_CHAIN_ID || "2151"),
production_main: {
url: process.env.PRODUCTION_MAIN_URL || "",
chainId: Number(process.env.PRODUCTION_MAIN_CHAIN_ID || "2151"),
accounts: getAccounts(),
},
production_side: {
url: process.env.PRODUCTION_SIDE_URL || "",
chainId: Number(process.env.PRODUCTION_SIDE_CHAIN_ID || "215110"),
accounts: getAccounts(),
},
},
Expand Down
7 changes: 1 addition & 6 deletions packages/relay/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,7 @@
"test": "TESTING=true hardhat test",
"clean": "hardhat clean",
"build": "hardhat compile",
"start:hardhat": "TESTING=false NODE_ENV=production hardhat run src/main.ts",
"start:mainnet": "TESTING=false NODE_ENV=production hardhat run src/main.ts --network bosagora_mainnet",
"start:testnet": "TESTING=false NODE_ENV=production hardhat run src/main.ts --network bosagora_testnet",
"start:devnet": "TESTING=false NODE_ENV=production hardhat run src/main.ts --network bosagora_devnet",
"start:localhost": "TESTING=false NODE_ENV=production hardhat run src/main.ts --network localhost",
"start": "TESTING=false NODE_ENV=production hardhat run src/main.ts --network production_net",
"start": "TESTING=false NODE_ENV=production hardhat run src/main.ts",
"formatting:check": "prettier '**/*.{json,sol,ts,js}' -c",
"formatting:write": "prettier '**/*.{json,sol,ts,js}' --write",
"test:Endpoints": "TESTING=true hardhat test test/Endpoints.test.ts",
Expand Down

0 comments on commit cb1a6c3

Please sign in to comment.