Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Commit a0d6730

Browse files
authored
Bug Fixing ERR_UNSUPPORTED_DIR_IMPORT in web3-eth-abi/lib/esm/coders/encode.js with node >18 (#6537)
* Update encode.ts * Fixing route bugs * Update CHANGELOG.md * update changelog.md
1 parent 90b8581 commit a0d6730

File tree

5 files changed

+15
-5
lines changed

5 files changed

+15
-5
lines changed

CHANGELOG.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -2199,4 +2199,10 @@ If there are any bugs, improvements, optimizations or any new feature proposal f
21992199

22002200
- Dependencies updated
22012201

2202-
## [Unreleased]
2202+
## [Unreleased]
2203+
2204+
### Fixed
2205+
2206+
#### web3-eth-abi
2207+
2208+
- Bug fix of `ERR_UNSUPPORTED_DIR_IMPORT` in ABI (#6535)

packages/web3-eth-abi/CHANGELOG.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -148,4 +148,8 @@ Documentation:
148148

149149
- Fix issue with default config with babel (and React): "TypeError: Cannot convert a BigInt value to a number #6187" (#6506)
150150

151-
## [Unreleased]
151+
## [Unreleased]
152+
153+
### Fixed
154+
155+
- Bug fix of `ERR_UNSUPPORTED_DIR_IMPORT` in ABI (#6535)

packages/web3-eth-abi/src/coders/base/array.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import { AbiError } from 'web3-errors';
1818
import { AbiParameter } from 'web3-types';
1919
import { uint8ArrayConcat } from 'web3-utils';
2020
// eslint-disable-next-line import/no-cycle
21-
import { decodeParamFromAbiParameter, encodeNumber, encodeParamFromAbiParameter } from '.';
21+
import { decodeParamFromAbiParameter, encodeNumber, encodeParamFromAbiParameter } from './index.js';
2222
import { DecoderResult, EncoderResult } from '../types.js';
2323
import { extractArrayType, isDynamic, WORD_SIZE } from '../utils.js';
2424
import { decodeNumber } from './number.js';

packages/web3-eth-abi/src/coders/base/tuple.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import { AbiParameter } from 'web3-types';
1919
import { uint8ArrayConcat } from 'web3-utils';
2020
import { DecoderResult, EncoderResult } from '../types.js';
2121
// eslint-disable-next-line import/no-cycle
22-
import { decodeParamFromAbiParameter, encodeParamFromAbiParameter } from '.';
22+
import { decodeParamFromAbiParameter, encodeParamFromAbiParameter } from './index.js';
2323
import { encodeDynamicParams } from './utils.js';
2424
import { isDynamic } from '../utils.js';
2525
import { decodeNumber } from './number.js';

packages/web3-eth-abi/src/coders/encode.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ along with web3.js. If not, see <http://www.gnu.org/licenses/>.
1717
import { AbiError } from 'web3-errors';
1818
import { AbiInput } from 'web3-types';
1919
import { utils } from 'web3-validator';
20-
import { encodeTuple } from './base';
20+
import { encodeTuple } from './base/index.js';
2121
import { toAbiParams } from './utils.js';
2222

2323
export function encodeParameters(abi: ReadonlyArray<AbiInput>, params: unknown[]): string {

0 commit comments

Comments
 (0)