From e53a984d571c04c71515ad1f2f94b65466671606 Mon Sep 17 00:00:00 2001 From: Kenneth Hoang Date: Tue, 24 Dec 2024 10:19:01 +0700 Subject: [PATCH 1/2] feat: update unit conversion helpers for v6 --- .../v6/accountKey/sign_tx_AccountKeyPublic.js | 4 +- .../accountKey/sign_tx_AccountKeyRoleBased.js | 4 +- .../sign_tx_AccountKeyWeightedMultiSig.js | 4 +- .../src/components/KlaytnFeeDelVT.tsx | 42 ++++++++++++------ .../browser-react/src/components/KlaytnVT.tsx | 43 +++++++++++++------ .../browser-react/src/components/LegacyVT.tsx | 42 ++++++++++++------ .../Basic_08_TxTypeValueTransfer.js | 4 +- .../Basic_10_TxTypeValueTransferMemo.js | 4 +- ...eDel_09_TxTypeFeeDelegatedValueTransfer.js | 4 +- ..._11_TxTypeFeeDelegatedValueTransferMemo.js | 4 +- .../FeeDel_39_TxTypeFeeDelegatedCancel.js | 2 +- ...xTypeFeeDelegatedValueTransferWithRatio.js | 4 +- ...eFeeDelegatedValueTransferMemoWithRatio.js | 4 +- ...el_3a_TxTypeFeeDelegatedCancelWithRatio.js | 2 +- ethers-ext/example/v6/transactions/legacy.js | 4 +- ethers-ext/example/v6/utils/util.js | 8 ++-- ethers-ext/package-lock.json | 12 +++--- ethers-ext/package.json | 4 +- ethers-ext/src/v6/index.ts | 7 +++ 19 files changed, 128 insertions(+), 74 deletions(-) diff --git a/ethers-ext/example/v6/accountKey/sign_tx_AccountKeyPublic.js b/ethers-ext/example/v6/accountKey/sign_tx_AccountKeyPublic.js index 5743a7b3e..9a7f3446a 100644 --- a/ethers-ext/example/v6/accountKey/sign_tx_AccountKeyPublic.js +++ b/ethers-ext/example/v6/accountKey/sign_tx_AccountKeyPublic.js @@ -3,7 +3,7 @@ const { ethers } = require("ethers6"); -const { Wallet, TxType, parseKlay } = require("@kaiachain/ethers-ext/v6"); +const { Wallet, TxType, parseKaia } = require("@kaiachain/ethers-ext/v6"); const senderAddr = "0xe15cd70a41dfb05e7214004d7d054801b2a2f06b"; const senderPriv = @@ -23,7 +23,7 @@ async function main() { type: TxType.ValueTransfer, from: senderAddr, to: recieverAddr, - value: parseKlay("0.01").toString(), + value: parseKaia("0.01"), }; const populatedTx = await newWallet.populateTransaction(tx); diff --git a/ethers-ext/example/v6/accountKey/sign_tx_AccountKeyRoleBased.js b/ethers-ext/example/v6/accountKey/sign_tx_AccountKeyRoleBased.js index 3d46f5c9c..69d385905 100644 --- a/ethers-ext/example/v6/accountKey/sign_tx_AccountKeyRoleBased.js +++ b/ethers-ext/example/v6/accountKey/sign_tx_AccountKeyRoleBased.js @@ -3,7 +3,7 @@ const { ethers } = require("ethers6"); -const { Wallet, TxType, parseKlay } = require("@kaiachain/ethers-ext/v6"); +const { Wallet, TxType, parseKaia } = require("@kaiachain/ethers-ext/v6"); const senderAddr = "0x5bd2fb3c21564c023a4a735935a2b7a238c4ccea"; const senderPriv = @@ -27,7 +27,7 @@ async function main() { type: TxType.ValueTransfer, from: senderAddr, to: recieverAddr, - value: parseKlay("0.01").toString(), + value: parseKaia("0.01"), gasLimit: 100000, }; diff --git a/ethers-ext/example/v6/accountKey/sign_tx_AccountKeyWeightedMultiSig.js b/ethers-ext/example/v6/accountKey/sign_tx_AccountKeyWeightedMultiSig.js index 15cb8987f..c2cf1c0f9 100644 --- a/ethers-ext/example/v6/accountKey/sign_tx_AccountKeyWeightedMultiSig.js +++ b/ethers-ext/example/v6/accountKey/sign_tx_AccountKeyWeightedMultiSig.js @@ -7,7 +7,7 @@ const { Wallet, TxType, AccountKeyType, - parseKlay, + parseKaia, } = require("@kaiachain/ethers-ext/v6"); const senderAddr = "0x82c6a8d94993d49cfd0c1d30f0f8caa65782cc7e"; @@ -34,7 +34,7 @@ async function main() { type: TxType.ValueTransfer, from: senderAddr, to: recieverAddr, - value: parseKlay("0.01").toString(), + value: parseKaia("0.01"), gasLimit: 100000, }; diff --git a/ethers-ext/example/v6/browser-react/src/components/KlaytnFeeDelVT.tsx b/ethers-ext/example/v6/browser-react/src/components/KlaytnFeeDelVT.tsx index 1667938f1..cf09496c0 100644 --- a/ethers-ext/example/v6/browser-react/src/components/KlaytnFeeDelVT.tsx +++ b/ethers-ext/example/v6/browser-react/src/components/KlaytnFeeDelVT.tsx @@ -1,7 +1,8 @@ -import { useState } from 'react'; -import { Account } from '../types'; -import { doSignTx } from '../util'; -import { TxType, parseKlay } from '@kaiachain/js-ext-core'; +import { useState } from "react"; +import { Account } from "../types"; +import { doSignTx } from "../util"; +import { TxType } from "@kaiachain/js-ext-core"; +import { parseKaia } from "@kaiachain/ethers-ext/v6"; type Props = { account: Account; @@ -16,7 +17,7 @@ function KlaytnFeeDelVT({ account }: Props) { const tx = { type: TxType.FeeDelegatedValueTransfer, to: e.target.to.value, - value: parseKlay(e.target.amount.value).toString(), + value: parseKaia(e.target.amount.value), }; try { @@ -30,14 +31,29 @@ function KlaytnFeeDelVT({ account }: Props) { return (
-

To:

-

Value:

-

+

+ To:{" "} + +

+

+ Value: +

+

+ +

- { txhash? {txhash} : null } - { error? {error} : null } -
-); -}; + {txhash ? ( + + {txhash} + + ) : null} + {error ? ( + + {error} + + ) : null} + + ); +} export default KlaytnFeeDelVT; diff --git a/ethers-ext/example/v6/browser-react/src/components/KlaytnVT.tsx b/ethers-ext/example/v6/browser-react/src/components/KlaytnVT.tsx index cc12292fe..52d535fd1 100644 --- a/ethers-ext/example/v6/browser-react/src/components/KlaytnVT.tsx +++ b/ethers-ext/example/v6/browser-react/src/components/KlaytnVT.tsx @@ -1,8 +1,8 @@ -import { useState } from 'react'; -import { Account } from '../types'; -import { doSendTx } from '../util'; -import { TxType, parseKlay } from '@kaiachain/js-ext-core'; - +import { useState } from "react"; +import { Account } from "../types"; +import { doSendTx } from "../util"; +import { TxType } from "@kaiachain/js-ext-core"; +import { parseKaia } from "@kaiachain/ethers-ext/v6"; type Props = { account: Account; }; @@ -16,7 +16,7 @@ function KlaytnVT({ account }: Props) { const tx = { type: TxType.ValueTransfer, to: e.target.to.value, - value: parseKlay(e.target.amount.value).toString(), + value: parseKaia(e.target.amount.value), }; try { @@ -30,14 +30,29 @@ function KlaytnVT({ account }: Props) { return (
-

To:

-

Value:

-

+

+ To:{" "} + +

+

+ Value: +

+

+ +

- { txhash? {txhash} : null } - { error? {error} : null } -
-); -}; + {txhash ? ( + + {txhash} + + ) : null} + {error ? ( + + {error} + + ) : null} + + ); +} export default KlaytnVT; diff --git a/ethers-ext/example/v6/browser-react/src/components/LegacyVT.tsx b/ethers-ext/example/v6/browser-react/src/components/LegacyVT.tsx index c157327c0..1476e7f99 100644 --- a/ethers-ext/example/v6/browser-react/src/components/LegacyVT.tsx +++ b/ethers-ext/example/v6/browser-react/src/components/LegacyVT.tsx @@ -1,7 +1,7 @@ -import { useState } from 'react'; -import { Account } from '../types'; -import { doSendTx } from '../util'; -import { parseKlay } from '@kaiachain/ethers-ext/v6'; +import { useState } from "react"; +import { Account } from "../types"; +import { doSendTx } from "../util"; +import { parseKaia } from "@kaiachain/ethers-ext/v6"; type Props = { account: Account; @@ -14,7 +14,7 @@ function LegacyVT({ account }: Props) { async function handleSubmit(e: any) { e.preventDefault(); const toAddr = e.target.to.value; - const valuePeb = parseKlay(e.target.amount.value).toString(); + const valuePeb = parseKaia(e.target.amount.value); const tx = { to: toAddr, value: valuePeb, @@ -31,14 +31,30 @@ function LegacyVT({ account }: Props) { return (
-

To:

-

Amount (ETH/KLAY):

-

+

+ To:{" "} + +

+

+ Amount (ETH/KLAY):{" "} + +

+

+ +

- { txhash? {txhash} : null } - { error? {error} : null } -
-); -}; + {txhash ? ( + + {txhash} + + ) : null} + {error ? ( + + {error} + + ) : null} + + ); +} export default LegacyVT; diff --git a/ethers-ext/example/v6/transactions/Basic_08_TxTypeValueTransfer.js b/ethers-ext/example/v6/transactions/Basic_08_TxTypeValueTransfer.js index 11d852db9..94c46b6ef 100644 --- a/ethers-ext/example/v6/transactions/Basic_08_TxTypeValueTransfer.js +++ b/ethers-ext/example/v6/transactions/Basic_08_TxTypeValueTransfer.js @@ -3,7 +3,7 @@ const ethers = require("ethers6"); -const { Wallet, TxType, parseKlay } = require("@kaiachain/ethers-ext/v6"); +const { Wallet, TxType, parseKaia } = require("@kaiachain/ethers-ext/v6"); const recieverAddr = "0xc40b6909eb7085590e1c26cb3becc25368e249e9"; const senderAddr = "0xa2a8854b1802d8cd5de631e690817c253d6a9153"; @@ -20,7 +20,7 @@ async function main() { type: TxType.ValueTransfer, from: senderAddr, to: recieverAddr, - value: parseKlay("0.01").toString(), + value: parseKaia("0.01"), }; const sentTx = await wallet.sendTransaction(tx); diff --git a/ethers-ext/example/v6/transactions/Basic_10_TxTypeValueTransferMemo.js b/ethers-ext/example/v6/transactions/Basic_10_TxTypeValueTransferMemo.js index 91faa2cb0..11871fb9e 100644 --- a/ethers-ext/example/v6/transactions/Basic_10_TxTypeValueTransferMemo.js +++ b/ethers-ext/example/v6/transactions/Basic_10_TxTypeValueTransferMemo.js @@ -3,7 +3,7 @@ const ethers = require("ethers6"); -const { Wallet, TxType, parseKlay } = require("@kaiachain/ethers-ext/v6"); +const { Wallet, TxType, parseKaia } = require("@kaiachain/ethers-ext/v6"); const recieverAddr = "0xc40b6909eb7085590e1c26cb3becc25368e249e9"; const senderAddr = "0xa2a8854b1802d8cd5de631e690817c253d6a9153"; @@ -20,7 +20,7 @@ async function main() { type: TxType.ValueTransferMemo, from: senderAddr, to: recieverAddr, - value: parseKlay("0.01").toString(), + value: parseKaia("0.01"), data: "0x1234567890", }; diff --git a/ethers-ext/example/v6/transactions/FeeDel_09_TxTypeFeeDelegatedValueTransfer.js b/ethers-ext/example/v6/transactions/FeeDel_09_TxTypeFeeDelegatedValueTransfer.js index 68ed9a228..59dc07a24 100644 --- a/ethers-ext/example/v6/transactions/FeeDel_09_TxTypeFeeDelegatedValueTransfer.js +++ b/ethers-ext/example/v6/transactions/FeeDel_09_TxTypeFeeDelegatedValueTransfer.js @@ -3,7 +3,7 @@ const ethers = require("ethers6"); -const { Wallet, TxType, parseKlay } = require("@kaiachain/ethers-ext/v6"); +const { Wallet, TxType, parseKaia } = require("@kaiachain/ethers-ext/v6"); const senderAddr = "0xa2a8854b1802d8cd5de631e690817c253d6a9153"; const senderPriv = @@ -23,7 +23,7 @@ async function main() { const tx = { type: TxType.FeeDelegatedValueTransfer, to: recieverAddr, - value: parseKlay("0.01").toString(), + value: parseKaia("0.01"), from: senderAddr, }; diff --git a/ethers-ext/example/v6/transactions/FeeDel_11_TxTypeFeeDelegatedValueTransferMemo.js b/ethers-ext/example/v6/transactions/FeeDel_11_TxTypeFeeDelegatedValueTransferMemo.js index f5c57fb35..b803298dc 100644 --- a/ethers-ext/example/v6/transactions/FeeDel_11_TxTypeFeeDelegatedValueTransferMemo.js +++ b/ethers-ext/example/v6/transactions/FeeDel_11_TxTypeFeeDelegatedValueTransferMemo.js @@ -3,7 +3,7 @@ const ethers = require("ethers6"); -const { Wallet, TxType, parseKlay } = require("@kaiachain/ethers-ext/v6"); +const { Wallet, TxType, parseKaia } = require("@kaiachain/ethers-ext/v6"); const senderAddr = "0xa2a8854b1802d8cd5de631e690817c253d6a9153"; const senderPriv = @@ -24,7 +24,7 @@ async function main() { type: TxType.FeeDelegatedValueTransferMemo, from: senderAddr, to: recieverAddr, - value: parseKlay("0.01").toString(), + value: parseKaia("0.01"), data: "0x1234567890", }; diff --git a/ethers-ext/example/v6/transactions/FeeDel_39_TxTypeFeeDelegatedCancel.js b/ethers-ext/example/v6/transactions/FeeDel_39_TxTypeFeeDelegatedCancel.js index 0b8ae4472..bfa3cf204 100644 --- a/ethers-ext/example/v6/transactions/FeeDel_39_TxTypeFeeDelegatedCancel.js +++ b/ethers-ext/example/v6/transactions/FeeDel_39_TxTypeFeeDelegatedCancel.js @@ -3,7 +3,7 @@ const ethers = require("ethers6"); -const { Wallet, TxType, parseKlay } = require("@kaiachain/ethers-ext/v6"); +const { Wallet, TxType, parseKaia } = require("@kaiachain/ethers-ext/v6"); const senderAddr = "0xa2a8854b1802d8cd5de631e690817c253d6a9153"; const senderPriv = diff --git a/ethers-ext/example/v6/transactions/PartialFeeDel_0a_TxTypeFeeDelegatedValueTransferWithRatio.js b/ethers-ext/example/v6/transactions/PartialFeeDel_0a_TxTypeFeeDelegatedValueTransferWithRatio.js index c4b046981..bc675be24 100644 --- a/ethers-ext/example/v6/transactions/PartialFeeDel_0a_TxTypeFeeDelegatedValueTransferWithRatio.js +++ b/ethers-ext/example/v6/transactions/PartialFeeDel_0a_TxTypeFeeDelegatedValueTransferWithRatio.js @@ -3,7 +3,7 @@ const ethers = require("ethers6"); -const { Wallet, TxType, parseKlay } = require("@kaiachain/ethers-ext/v6"); +const { Wallet, TxType, parseKaia } = require("@kaiachain/ethers-ext/v6"); const senderAddr = "0xa2a8854b1802d8cd5de631e690817c253d6a9153"; const senderPriv = @@ -23,7 +23,7 @@ async function main() { const tx = { type: TxType.FeeDelegatedValueTransferWithRatio, to: recieverAddr, - value: parseKlay("0.01").toString(), + value: parseKaia("0.01"), from: senderAddr, feeRatio: 30, }; diff --git a/ethers-ext/example/v6/transactions/PartialFeeDel_12_TxTypeFeeDelegatedValueTransferMemoWithRatio.js b/ethers-ext/example/v6/transactions/PartialFeeDel_12_TxTypeFeeDelegatedValueTransferMemoWithRatio.js index f702ea8b9..74d56001b 100644 --- a/ethers-ext/example/v6/transactions/PartialFeeDel_12_TxTypeFeeDelegatedValueTransferMemoWithRatio.js +++ b/ethers-ext/example/v6/transactions/PartialFeeDel_12_TxTypeFeeDelegatedValueTransferMemoWithRatio.js @@ -3,7 +3,7 @@ const ethers = require("ethers6"); -const { Wallet, TxType, parseKlay } = require("@kaiachain/ethers-ext/v6"); +const { Wallet, TxType, parseKaia } = require("@kaiachain/ethers-ext/v6"); const senderAddr = "0xa2a8854b1802d8cd5de631e690817c253d6a9153"; const senderPriv = @@ -24,7 +24,7 @@ async function main() { type: TxType.FeeDelegatedValueTransferMemoWithRatio, from: senderAddr, to: recieverAddr, - value: parseKlay("0.01").toString(), + value: parseKaia("0.01"), data: "0x1234567890", feeRatio: 30, }; diff --git a/ethers-ext/example/v6/transactions/PartialFeeDel_3a_TxTypeFeeDelegatedCancelWithRatio.js b/ethers-ext/example/v6/transactions/PartialFeeDel_3a_TxTypeFeeDelegatedCancelWithRatio.js index f9cdf2404..af08e3bc9 100644 --- a/ethers-ext/example/v6/transactions/PartialFeeDel_3a_TxTypeFeeDelegatedCancelWithRatio.js +++ b/ethers-ext/example/v6/transactions/PartialFeeDel_3a_TxTypeFeeDelegatedCancelWithRatio.js @@ -3,7 +3,7 @@ const ethers = require("ethers6"); -const { Wallet, TxType, parseKlay } = require("@kaiachain/ethers-ext/v6"); +const { Wallet, TxType, parseKaia } = require("@kaiachain/ethers-ext/v6"); const senderAddr = "0xa2a8854b1802d8cd5de631e690817c253d6a9153"; const senderPriv = diff --git a/ethers-ext/example/v6/transactions/legacy.js b/ethers-ext/example/v6/transactions/legacy.js index 8b0c528d6..6e2d55254 100644 --- a/ethers-ext/example/v6/transactions/legacy.js +++ b/ethers-ext/example/v6/transactions/legacy.js @@ -3,7 +3,7 @@ const ethers = require("ethers6"); -const { Wallet, parseKlay } = require("@kaiachain/ethers-ext/v6"); +const { Wallet, parseKaia } = require("@kaiachain/ethers-ext/v6"); const recieverAddr = "0xc40b6909eb7085590e1c26cb3becc25368e249e9"; const senderAddr = "0xa2a8854b1802d8cd5de631e690817c253d6a9153"; @@ -22,7 +22,7 @@ async function main() { // here, type will be 2 because no gas-related fields are set. from: senderAddr, to: recieverAddr, - value: parseKlay("0.01").toString(), + value: parseKaia("0.01"), }; const sentTx = await wallet.sendTransaction(tx); diff --git a/ethers-ext/example/v6/utils/util.js b/ethers-ext/example/v6/utils/util.js index 0a0499fbc..eab74bb0f 100644 --- a/ethers-ext/example/v6/utils/util.js +++ b/ethers-ext/example/v6/utils/util.js @@ -4,9 +4,9 @@ const { getCompressedPublicKey, getSignatureTuple, formatKlayUnits, - parseKlayUnits, + parseKaiaUnits, formatKlay, - parseKlay, + parseKaia, } = require("@kaiachain/ethers-ext/v6"); async function main() { @@ -53,9 +53,9 @@ async function main() { console.log("transfer amount in klay =", formatKlay("1230000000000000000")); console.log( "example gas price in peb =", - parseKlayUnits("50", "ston").toString() + parseKaiaUnits("50", "ston") ); - console.log("transfer amount in peb =", parseKlay("9.87").toString()); + console.log("transfer amount in peb =", parseKaia("9.87")); } main(); diff --git a/ethers-ext/package-lock.json b/ethers-ext/package-lock.json index 6cb125f76..3dd02515e 100644 --- a/ethers-ext/package-lock.json +++ b/ethers-ext/package-lock.json @@ -1,12 +1,12 @@ { "name": "@kaiachain/ethers-ext", - "version": "1.0.0", + "version": "1.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@kaiachain/ethers-ext", - "version": "1.0.0", + "version": "1.1.0", "license": "MIT", "dependencies": { "@ethersproject/abstract-provider": "^5.7.0", @@ -27,7 +27,7 @@ "@ethersproject/transactions": "^5.7.0", "@ethersproject/wallet": "^5.7.0", "@ethersproject/web": "^5.7.1", - "@kaiachain/js-ext-core": "^1.0.0", + "@kaiachain/js-ext-core": "^1.1.1", "@kaiachain/web3rpc": "^1.0.0", "ethers6": "npm:ethers@^6.12.1", "lodash": "^4.17.21" @@ -1462,9 +1462,9 @@ "link": true }, "node_modules/@kaiachain/js-ext-core": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@kaiachain/js-ext-core/-/js-ext-core-1.0.0.tgz", - "integrity": "sha512-OXPmMVZyXjSMNNnvbItRkxu2T6lrgkqRxv22upkW6CKM+EkZDI0hxsLastDW3KJ4FOFSyX1Yel8T6Vp81CGg2A==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@kaiachain/js-ext-core/-/js-ext-core-1.1.1.tgz", + "integrity": "sha512-JDz39l1/aRgwXPiJpweOUDlETu5J4H8kGUlxAAic58g3yf4MpH7iYIN3qzPjpVxBZvvopPpQA7uVOZUmw7l50Q==", "license": "MIT", "dependencies": { "@ethersproject/address": "^5.7.0", diff --git a/ethers-ext/package.json b/ethers-ext/package.json index a495cf37f..9bc46a279 100644 --- a/ethers-ext/package.json +++ b/ethers-ext/package.json @@ -92,8 +92,8 @@ "@ethersproject/wallet": "^5.7.0", "@ethersproject/web": "^5.7.1", "ethers6": "npm:ethers@^6.12.1", - "@kaiachain/js-ext-core": "^1.0.0", + "@kaiachain/js-ext-core": "^1.1.1", "@kaiachain/web3rpc": "^1.0.0", "lodash": "^4.17.21" } -} \ No newline at end of file +} diff --git a/ethers-ext/src/v6/index.ts b/ethers-ext/src/v6/index.ts index ef5554e4d..7a8804f84 100644 --- a/ethers-ext/src/v6/index.ts +++ b/ethers-ext/src/v6/index.ts @@ -21,3 +21,10 @@ export const providers = { JsonRpcProvider, Web3Provider, }; +// this will override parseKaia, parseKaiaUnits, parseUnits from line 2 +export { + parseKaia, + parseKaiaUnits, + parseUnits, +// eslint-disable-next-line import/no-unresolved +} from "@kaiachain/js-ext-core/ethers-v6"; From b6eee68e51fc516703c9be7532635f71d82075c2 Mon Sep 17 00:00:00 2001 From: Kenneth Hoang Date: Tue, 24 Dec 2024 10:48:30 +0700 Subject: [PATCH 2/2] feat: ignore import unresolved for js-ext-core/ethers-v6 --- ethers-ext/.eslintrc.js | 26 +++++++++++++++++--------- ethers-ext/src/v6/index.ts | 1 - 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/ethers-ext/.eslintrc.js b/ethers-ext/.eslintrc.js index 12b5cc541..b39f2e7eb 100644 --- a/ethers-ext/.eslintrc.js +++ b/ethers-ext/.eslintrc.js @@ -33,17 +33,25 @@ module.exports = { "@typescript-eslint/ban-ts-comment": "off", // imports - "import/order": ["warn", { - "alphabetize": { "order": "asc", "caseInsensitive": true }, - "pathGroups": [ - { "pattern": "@kaiachain/**", "group": "parent", "position": "after" }, - ], - "newlines-between": "always", - "pathGroupsExcludedImportTypes": ["@kaiachain/**"], - }], + "import/order": [ + "warn", + { + alphabetize: { order: "asc", caseInsensitive: true }, + pathGroups: [ + { pattern: "@kaiachain/**", group: "parent", position: "after" }, + ], + "newlines-between": "always", + pathGroupsExcludedImportTypes: ["@kaiachain/**"], + }, + ], "import/no-unresolved": [ "error", // eslint-plugin-import cannot resolve subpaths https://github.com/firebase/firebase-admin-node/discussions/1359 - { ignore: ["^@kaiachain/js-ext-core/util$"] } + { + ignore: [ + "^@kaiachain/js-ext-core/util$", + "^@kaiachain/js-ext-core/ethers-v6$", + ], + }, ], // formatting diff --git a/ethers-ext/src/v6/index.ts b/ethers-ext/src/v6/index.ts index 7a8804f84..4c3899547 100644 --- a/ethers-ext/src/v6/index.ts +++ b/ethers-ext/src/v6/index.ts @@ -26,5 +26,4 @@ export { parseKaia, parseKaiaUnits, parseUnits, -// eslint-disable-next-line import/no-unresolved } from "@kaiachain/js-ext-core/ethers-v6";