From c7a8ab6630a015eaac83754a5a99da6cc72ab7c8 Mon Sep 17 00:00:00 2001 From: vignesha22 <82584664+vignesha22@users.noreply.github.com> Date: Thu, 11 May 2023 12:31:17 +0530 Subject: [PATCH] PRO-1322-Klaytn Support (#223) * added klaytn mainnet and testnet * added klaytn mainnet on qa env * Updated readme --- README.md | 4 ++++ package-lock.json | 14 +++++++------- package.json | 2 +- src/sdk/env/constants.ts | 4 +++- src/sdk/network/constants.ts | 4 ++++ 5 files changed, 19 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 8988bcd..7760884 100644 --- a/README.md +++ b/README.md @@ -72,6 +72,10 @@ main().catch(console.error); notification of transactions is not available for fuse +## Transaction History on Klaytn + +History of transactions would be incomplete only on Klaytn Network due to lack of resources for fetching the required data + ## License diff --git a/package-lock.json b/package-lock.json index b77182e..97d0344 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "license": "MIT", "dependencies": { "@apollo/client": "3.4.0", - "@etherspot/contracts": "1.9.7", + "@etherspot/contracts": "1.9.8", "@lifi/sdk": "1.6.4", "@nerdwallet/apollo-cache-policies": "1.2.1", "class-transformer": "0.4.0", @@ -780,9 +780,9 @@ "dev": true }, "node_modules/@etherspot/contracts": { - "version": "1.9.7", - "resolved": "https://registry.npmjs.org/@etherspot/contracts/-/contracts-1.9.7.tgz", - "integrity": "sha512-64tOeERJRaICgGq8jshWZE8c3G4oOrOhPbitZELmPtVhRMLu2U/WJvkEZeIa1aMhMjjR5fxBZ+bRRv5HqOx0RQ==" + "version": "1.9.8", + "resolved": "https://registry.npmjs.org/@etherspot/contracts/-/contracts-1.9.8.tgz", + "integrity": "sha512-aFE8anV3z4BIsgah+5CtnuiHU4pJnPur3BtXKh/lwfCIhLwGIfjHvallcbqUKWeiywJlaq5Nf8GrHN1NT0md5A==" }, "node_modules/@ethersproject/abi": { "version": "5.6.3", @@ -14728,9 +14728,9 @@ "dev": true }, "@etherspot/contracts": { - "version": "1.9.7", - "resolved": "https://registry.npmjs.org/@etherspot/contracts/-/contracts-1.9.7.tgz", - "integrity": "sha512-64tOeERJRaICgGq8jshWZE8c3G4oOrOhPbitZELmPtVhRMLu2U/WJvkEZeIa1aMhMjjR5fxBZ+bRRv5HqOx0RQ==" + "version": "1.9.8", + "resolved": "https://registry.npmjs.org/@etherspot/contracts/-/contracts-1.9.8.tgz", + "integrity": "sha512-aFE8anV3z4BIsgah+5CtnuiHU4pJnPur3BtXKh/lwfCIhLwGIfjHvallcbqUKWeiywJlaq5Nf8GrHN1NT0md5A==" }, "@ethersproject/abi": { "version": "5.6.3", diff --git a/package.json b/package.json index a82d049..53ef537 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ }, "dependencies": { "@apollo/client": "3.4.0", - "@etherspot/contracts": "1.9.7", + "@etherspot/contracts": "1.9.8", "@lifi/sdk": "1.6.4", "@nerdwallet/apollo-cache-policies": "1.2.1", "class-transformer": "0.4.0", diff --git a/src/sdk/env/constants.ts b/src/sdk/env/constants.ts index d53fda8..28d7122 100644 --- a/src/sdk/env/constants.ts +++ b/src/sdk/env/constants.ts @@ -29,6 +29,7 @@ export const SUPPORTED_ENVS: { [key: string]: Env } = { NetworkNames.Celo, NetworkNames.Fuse, NetworkNames.ArbitrumNova, + // NetworkNames.Klaytn, // NetworkNames.Neon, ], }, @@ -54,6 +55,7 @@ export const SUPPORTED_ENVS: { [key: string]: Env } = { NetworkNames.NeonDevnet, NetworkNames.OptimismGoerli, NetworkNames.BaseGoerli, + NetworkNames.KlaytnBaobab, NetworkNames.Etherspot, ], }, @@ -77,7 +79,7 @@ export const SUPPORTED_ENVS: { [key: string]: Env } = { useSsl: true, }, networkOptions: { - supportedNetworkNames: [NetworkNames.Matic, NetworkNames.Bsc, NetworkNames.Optimism, NetworkNames.Arbitrum], + 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 05a1dd6..110f41a 100644 --- a/src/sdk/network/constants.ts +++ b/src/sdk/network/constants.ts @@ -28,6 +28,8 @@ export enum NetworkNames { NeonDevnet = 'neonDevnet', OptimismGoerli = 'optimismGoerli', BaseGoerli = 'baseGoerli', + KlaytnBaobab = 'klaytnBaobab', + Klaytn = 'klaytn', LocalA = 'localA', LocalB = 'localB', LocalH = 'localH', @@ -64,6 +66,8 @@ export const NETWORK_NAME_TO_CHAIN_ID: { [NetworkNames.NeonDevnet]: 245022926, [NetworkNames.OptimismGoerli]: 420, [NetworkNames.BaseGoerli]: 84531, + [NetworkNames.Klaytn]: 8217, + [NetworkNames.KlaytnBaobab]: 1001, [NetworkNames.Etherspot]: 4386, [NetworkNames.LocalA]: 9999, [NetworkNames.LocalB]: 6666,