From 09c0dfba3cb250bf799060c944e965af967e3957 Mon Sep 17 00:00:00 2001 From: wanwiset25 Date: Wed, 29 Nov 2023 15:51:13 +0400 Subject: [PATCH] change var name PARENTCHAIN > PARENTNET --- .example.env | 4 ++-- README.md | 4 ++-- src/config.ts | 4 ++-- src/server.ts | 2 +- src/service/zero/index.ts | 6 +++--- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.example.env b/.example.env index e51a0ff..8ff8437 100644 --- a/.example.env +++ b/.example.env @@ -6,7 +6,7 @@ NODE_ENV=development SUBNET_URL=https://devnetstats.apothem.network/subnet -PARENTCHAIN_URL=https://devnetstats.apothem.network/devnet +PARENTNET_URL=https://devnetstats.apothem.network/devnet CHECKPOINT_CONTRACT=0x16da2C7caf46D0d7270d68e590A992A90DfcF7ee @@ -14,7 +14,7 @@ SUBNET_ZERO_CONTRACT=0x0000000 PARENTNET_ZERO_CONTRACT=0x0000000 -PARENTCHAIN_WALLET_PK=0x123 +PARENTNET_WALLET_PK=0x123 PARENTNET_ZERO_WALLET_PK=0x123 diff --git a/README.md b/README.md index 64aba10..352d9fb 100644 --- a/README.md +++ b/README.md @@ -69,9 +69,9 @@ Create a .env file (or just rename the .example.env) containing all the env vari ### Find the value for important envs 1. `SUBNET_URL` : This is the URL to your subnet with RPC port specified. e.g http://66.94.121.151:8545 -2. `PARENTCHAIN_URL` : This is the XDC parent chain URL with RPC port specified. +2. `PARENTNET_URL` : This is the XDC parent chain URL with RPC port specified. 3. `CHECKPOINT_CONTRACT` : This is the smart contract address for this subnet that has been uploaded in the parent chain. -4. `PARENTCHAIN_WALLET_PK` : This is the wallet key that will be used for submit subnet data into parent chain. You will need to have credits in it first. +4. `PARENTNET_WALLET_PK` : This is the wallet key that will be used for submit subnet data into parent chain. You will need to have credits in it first. 5. `SLACK_WEBHOOK` : (Optional) If relayer detected forking of your subnet, this is the URL where we will push alerting message to. You are required to set up slack bot and install it in the relevant channel first. For details, see slack doc: https://api.slack.com/messaging/webhooks \n Once you are done with the slack setup, find the slack webhook url and put it here. It shall look like `https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX` We only need the ones after `https://hooks.slack.com/services/` diff --git a/src/config.ts b/src/config.ts index b136587..48f23aa 100644 --- a/src/config.ts +++ b/src/config.ts @@ -49,11 +49,11 @@ const config: Config = { }, mainnet: { url: - process.env.PARENTCHAIN_URL || + process.env.PARENTNET_URL || "https://devnetstats.apothem.network/mainnet", smartContractAddress: process.env.CHECKPOINT_CONTRACT || "", accountPK: - process.env.PARENTCHAIN_WALLET_PK || + process.env.PARENTNET_WALLET_PK || "0xa6538b992365dd26bbc2391ae6639bac0ed8599f8b45bca7c28c105959f02af4", // Default to a dummy key submitTransactionWaitingTime: +process.env.MN_TX_SUBMIT_WAITING_TIME || 100, }, diff --git a/src/server.ts b/src/server.ts index d69c6de..b696222 100644 --- a/src/server.ts +++ b/src/server.ts @@ -19,7 +19,7 @@ const worker = new Worker(config, logger); app.use(bodyParser()); app.listen(config.port, async () => { - if (!process.env.PARENTCHAIN_WALLET_PK) { + if (!process.env.PARENTNET_WALLET_PK) { logger.error("csc pk not found ,will dont running csc relayer"); return; } diff --git a/src/service/zero/index.ts b/src/service/zero/index.ts index c75d85a..c2cf4c3 100644 --- a/src/service/zero/index.ts +++ b/src/service/zero/index.ts @@ -34,7 +34,7 @@ const parentnetEndpointContract = { }; const xdcparentnet = async () => { return { - id: await getChainId(process.env.PARENTCHAIN_URL), + id: await getChainId(process.env.PARENTNET_URL), name: "XDC Devnet", network: "XDC Devnet", nativeCurrency: { @@ -43,8 +43,8 @@ const xdcparentnet = async () => { symbol: "XDC", }, rpcUrls: { - public: { http: [process.env.PARENTCHAIN_URL] }, - default: { http: [process.env.PARENTCHAIN_URL] }, + public: { http: [process.env.PARENTNET_URL] }, + default: { http: [process.env.PARENTNET_URL] }, }, }; };