Skip to content

Commit cfaf4d4

Browse files
committed
Use dotenv to give default configuration options
To use dotenv, copy .env.default to .env
1 parent b52bf40 commit cfaf4d4

File tree

4 files changed

+10
-0
lines changed

4 files changed

+10
-0
lines changed

ibc.ts/.env.default

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
CHAIN_A_RPC_URL="http://localhost:8080"
2+
CHAIN_A_NETWORK_ID="tc"
3+
CHAIN_A_FAUCET_ADDRESS="tccqym6znlgc48qeelrzccehkcaut7yz39wwq96q3y7"
4+
CHAIN_B_RPC_URL="http://localhost:8081"
5+
CHAIN_B_NETWORK_ID="fc"
6+
CHAIN_B_FAUCET_ADDRESS="fccqyd6clszl2aeq4agrk8sgq8whkty6ktljuemc9y3"

ibc.ts/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ node_modules/
22
yarn-error.log
33
yarn.lock
44
build/
5+
.env

ibc.ts/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"codechain-primitives": "^1.0.4",
2121
"codechain-sdk": "^2.0.1",
2222
"debug": "^4.1.1",
23+
"dotenv": "^8.2.0",
2324
"rlp": "^2.0.0"
2425
}
2526
}

ibc.ts/src/relayer/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import { delay } from "../common/util";
55
import { getConfig } from "./config";
66
import { PlatformAddress } from "codechain-primitives/lib";
77

8+
require("dotenv").config();
9+
810
const debug = Debug("relayer:main");
911

1012
async function main() {

0 commit comments

Comments
 (0)