From b54a05482b5e78eb413bb228839a9dca12e622fd Mon Sep 17 00:00:00 2001 From: kaushalrajbacancy <78725072+kaushalrajbacancy@users.noreply.github.com> Date: Wed, 24 May 2023 14:21:37 +0530 Subject: [PATCH] Added OKTC in SDK (#228) * Set OKTC in SDK * Enabled klaytn in sdk * Removed OKTC mainnet from unwanted place --- package-lock.json | 4 ++-- package.json | 2 +- src/sdk/env/constants.ts | 12 ++++++++++-- src/sdk/network/constants.ts | 4 ++++ 4 files changed, 17 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8f8811b..e975406 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "etherspot", - "version": "1.43.3", + "version": "1.43.4", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "etherspot", - "version": "1.43.3", + "version": "1.43.4", "license": "MIT", "dependencies": { "@apollo/client": "3.4.0", diff --git a/package.json b/package.json index 6759e21..32dda99 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "etherspot", - "version": "1.43.3", + "version": "1.43.4", "description": "Etherspot SDK", "keywords": [ "ether", diff --git a/src/sdk/env/constants.ts b/src/sdk/env/constants.ts index 28d7122..94dcede 100644 --- a/src/sdk/env/constants.ts +++ b/src/sdk/env/constants.ts @@ -29,8 +29,9 @@ export const SUPPORTED_ENVS: { [key: string]: Env } = { NetworkNames.Celo, NetworkNames.Fuse, NetworkNames.ArbitrumNova, - // NetworkNames.Klaytn, + NetworkNames.Klaytn, // NetworkNames.Neon, + NetworkNames.OKTC, ], }, }, @@ -56,6 +57,7 @@ export const SUPPORTED_ENVS: { [key: string]: Env } = { NetworkNames.OptimismGoerli, NetworkNames.BaseGoerli, NetworkNames.KlaytnBaobab, + NetworkNames.OktcTest, NetworkNames.Etherspot, ], }, @@ -79,7 +81,13 @@ export const SUPPORTED_ENVS: { [key: string]: Env } = { useSsl: true, }, networkOptions: { - supportedNetworkNames: [NetworkNames.Matic, NetworkNames.Bsc, NetworkNames.Optimism, NetworkNames.Arbitrum, NetworkNames.Klaytn], + supportedNetworkNames: [ + NetworkNames.Matic, + NetworkNames.Bsc, + NetworkNames.Optimism, + NetworkNames.Arbitrum, + NetworkNames.Klaytn, + ], }, }, }; diff --git a/src/sdk/network/constants.ts b/src/sdk/network/constants.ts index 110f41a..4b5564a 100644 --- a/src/sdk/network/constants.ts +++ b/src/sdk/network/constants.ts @@ -30,6 +30,8 @@ export enum NetworkNames { BaseGoerli = 'baseGoerli', KlaytnBaobab = 'klaytnBaobab', Klaytn = 'klaytn', + OKTC = 'oktc', + OktcTest = 'oktcTest', LocalA = 'localA', LocalB = 'localB', LocalH = 'localH', @@ -69,6 +71,8 @@ export const NETWORK_NAME_TO_CHAIN_ID: { [NetworkNames.Klaytn]: 8217, [NetworkNames.KlaytnBaobab]: 1001, [NetworkNames.Etherspot]: 4386, + [NetworkNames.OKTC]: 66, + [NetworkNames.OktcTest]: 65, [NetworkNames.LocalA]: 9999, [NetworkNames.LocalB]: 6666, [NetworkNames.LocalH]: 3333,