Skip to content

Commit

Permalink
Bug Fixing ERR_UNSUPPORTED_DIR_IMPORT in web3-eth-abi/lib/esm/coders/…
Browse files Browse the repository at this point in the history
…encode.js with node >18 (#6537)

* Update encode.ts

* Fixing route bugs

* Update CHANGELOG.md

* update changelog.md
  • Loading branch information
kmlcnclk authored Oct 23, 2023
1 parent 90b8581 commit a0d6730
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 5 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2199,4 +2199,10 @@ If there are any bugs, improvements, optimizations or any new feature proposal f

- Dependencies updated

## [Unreleased]
## [Unreleased]

### Fixed

#### web3-eth-abi

- Bug fix of `ERR_UNSUPPORTED_DIR_IMPORT` in ABI (#6535)
6 changes: 5 additions & 1 deletion packages/web3-eth-abi/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,4 +148,8 @@ Documentation:

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

## [Unreleased]
## [Unreleased]

### Fixed

- Bug fix of `ERR_UNSUPPORTED_DIR_IMPORT` in ABI (#6535)
2 changes: 1 addition & 1 deletion packages/web3-eth-abi/src/coders/base/array.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { AbiError } from 'web3-errors';
import { AbiParameter } from 'web3-types';
import { uint8ArrayConcat } from 'web3-utils';
// eslint-disable-next-line import/no-cycle
import { decodeParamFromAbiParameter, encodeNumber, encodeParamFromAbiParameter } from '.';
import { decodeParamFromAbiParameter, encodeNumber, encodeParamFromAbiParameter } from './index.js';
import { DecoderResult, EncoderResult } from '../types.js';
import { extractArrayType, isDynamic, WORD_SIZE } from '../utils.js';
import { decodeNumber } from './number.js';
Expand Down
2 changes: 1 addition & 1 deletion packages/web3-eth-abi/src/coders/base/tuple.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { AbiParameter } from 'web3-types';
import { uint8ArrayConcat } from 'web3-utils';
import { DecoderResult, EncoderResult } from '../types.js';
// eslint-disable-next-line import/no-cycle
import { decodeParamFromAbiParameter, encodeParamFromAbiParameter } from '.';
import { decodeParamFromAbiParameter, encodeParamFromAbiParameter } from './index.js';
import { encodeDynamicParams } from './utils.js';
import { isDynamic } from '../utils.js';
import { decodeNumber } from './number.js';
Expand Down
2 changes: 1 addition & 1 deletion packages/web3-eth-abi/src/coders/encode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ along with web3.js. If not, see <http://www.gnu.org/licenses/>.
import { AbiError } from 'web3-errors';
import { AbiInput } from 'web3-types';
import { utils } from 'web3-validator';
import { encodeTuple } from './base';
import { encodeTuple } from './base/index.js';
import { toAbiParams } from './utils.js';

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

0 comments on commit a0d6730

Please sign in to comment.