From 09f4c8b077c06322855a99c722fd87aadee2feac Mon Sep 17 00:00:00 2001 From: Or Noyman <17881579+fullkomnun@users.noreply.github.com> Date: Tue, 17 Oct 2023 17:08:05 +0000 Subject: [PATCH 1/6] Fix validation uint int sizes (#6434) * add ABI test cases with single numeric parameter that have a size that is not a power of 2 * fail-fast by throwing an error if during conversion of JSON shceme to Zod 'check' function is undefined (due to unsupported type) * make sure validators are defined for all valid sized of numeric types * prettify * updated changelog * include all newly generated single param test cases in validator test suite * add schemaError and unit test * update errors * format * test converage * address feedback --------- Co-authored-by: Alex Co-authored-by: Muhammad Altabba <24407834+Muhammad-Altabba@users.noreply.github.com> --- packages/web3-errors/CHANGELOG.md | 4 ++- packages/web3-errors/src/error_codes.ts | 4 +++ .../web3-errors/src/errors/schema_errors.ts | 32 +++++++++++++++++ packages/web3-errors/src/index.ts | 1 + .../unit/__snapshots__/errors.test.ts.snap | 10 ++++++ packages/web3-errors/test/unit/errors.test.ts | 11 ++++++ packages/web3-validator/CHANGELOG.md | 2 ++ packages/web3-validator/src/formats.ts | 3 +- packages/web3-validator/src/validator.ts | 5 +++ .../web3-validator/test/config/jest.config.js | 2 +- .../test/fixtures/abi_to_json_schema.ts | 35 ++++++++++++++++++- .../web3-validator/test/unit/load.test.ts | 2 +- .../test/unit/web3_validator.test.ts | 31 ++++++++++++---- 13 files changed, 130 insertions(+), 12 deletions(-) create mode 100644 packages/web3-errors/src/errors/schema_errors.ts diff --git a/packages/web3-errors/CHANGELOG.md b/packages/web3-errors/CHANGELOG.md index 6c242768467..303bff74b62 100644 --- a/packages/web3-errors/CHANGELOG.md +++ b/packages/web3-errors/CHANGELOG.md @@ -154,4 +154,6 @@ Documentation: - Dependencies updated -## [Unreleased] \ No newline at end of file +## [Unreleased] + +- Added new SchemaFormatError (#6434) \ No newline at end of file diff --git a/packages/web3-errors/src/error_codes.ts b/packages/web3-errors/src/error_codes.ts index 8d077e6a040..c9ff68f6d7f 100644 --- a/packages/web3-errors/src/error_codes.ts +++ b/packages/web3-errors/src/error_codes.ts @@ -158,10 +158,14 @@ export const ERR_INVALID_NIBBLE_WIDTH = 1014; // Validation error codes export const ERR_VALIDATION = 1100; + // Core error codes export const ERR_CORE_HARDFORK_MISMATCH = 1101; export const ERR_CORE_CHAIN_MISMATCH = 1102; +// Schema error codes +export const ERR_SCHEMA_FORMAT = 1200; + // RPC error codes (EIP-1474) // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1474.md export const ERR_RPC_INVALID_JSON = -32700; diff --git a/packages/web3-errors/src/errors/schema_errors.ts b/packages/web3-errors/src/errors/schema_errors.ts new file mode 100644 index 00000000000..4d61684c616 --- /dev/null +++ b/packages/web3-errors/src/errors/schema_errors.ts @@ -0,0 +1,32 @@ +/* +This file is part of web3.js. + +web3.js is free software: you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +web3.js is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with web3.js. If not, see . +*/ + +import { ERR_SCHEMA_FORMAT } from '../error_codes.js'; +import { BaseWeb3Error } from '../web3_error_base.js'; + +export class SchemaFormatError extends BaseWeb3Error { + public code = ERR_SCHEMA_FORMAT; + + public constructor(public type: string) { + super(`Format for the type ${type} is unsupported`); + } + + public toJSON() { + return { ...super.toJSON(), type: this.type }; + } + +} diff --git a/packages/web3-errors/src/index.ts b/packages/web3-errors/src/index.ts index 5916321f8a6..2e4ef7abca6 100644 --- a/packages/web3-errors/src/index.ts +++ b/packages/web3-errors/src/index.ts @@ -30,3 +30,4 @@ export * from './errors/response_errors.js'; export * from './errors/core_errors.js'; export * from './errors/rpc_errors.js'; export * from './errors/rpc_error_messages.js'; +export * from './errors/schema_errors.js'; \ No newline at end of file diff --git a/packages/web3-errors/test/unit/__snapshots__/errors.test.ts.snap b/packages/web3-errors/test/unit/__snapshots__/errors.test.ts.snap index a0f890a4b88..ab49d6aaa0a 100644 --- a/packages/web3-errors/test/unit/__snapshots__/errors.test.ts.snap +++ b/packages/web3-errors/test/unit/__snapshots__/errors.test.ts.snap @@ -333,6 +333,16 @@ Object { } `; +exports[`errors SchemaFormatError should have valid json structure 1`] = ` +Object { + "code": 1200, + "innerError": undefined, + "message": "Format for the type unsupported is unsupported", + "name": "SchemaFormatError", + "type": "unsupported", +} +`; + exports[`errors TransactionError should have valid json structure 1`] = ` Object { "code": 400, diff --git a/packages/web3-errors/test/unit/errors.test.ts b/packages/web3-errors/test/unit/errors.test.ts index f8dd8466fcd..7428cc9b6b3 100644 --- a/packages/web3-errors/test/unit/errors.test.ts +++ b/packages/web3-errors/test/unit/errors.test.ts @@ -26,6 +26,7 @@ import * as signatureErrors from '../../src/errors/signature_errors'; import * as transactionErrors from '../../src/errors/transaction_errors'; import * as utilsErrors from '../../src/errors/utils_errors'; import * as responseErrors from '../../src/errors/response_errors'; +import * as schemaErrors from '../../src/errors/schema_errors'; import { ConvertValueToString } from '../fixtures/errors'; import { BaseWeb3Error } from '../../src/web3_error_base'; @@ -50,6 +51,7 @@ describe('errors', () => { ...signatureErrors, ...transactionErrors, ...utilsErrors, + ...schemaErrors, })) { if (ErrorClass === transactionErrors.InvalidPropertiesForTransactionTypeError) break; // To disable error for the abstract class @@ -379,4 +381,13 @@ describe('errors', () => { ).toMatchSnapshot(); }); }); + + describe('SchemaFormatError', () => { + it('should have valid json structure', () => { + expect( + new schemaErrors.SchemaFormatError("unsupported" + ).toJSON(), + ).toMatchSnapshot(); + }); + }); }); diff --git a/packages/web3-validator/CHANGELOG.md b/packages/web3-validator/CHANGELOG.md index 44852713656..94cda5fb867 100644 --- a/packages/web3-validator/CHANGELOG.md +++ b/packages/web3-validator/CHANGELOG.md @@ -153,3 +153,5 @@ Documentation: - Multi-dimensional arrays are now handled properly when parsing ABIs (#6435) - Fix issue with default config with babel (and React): "TypeError: Cannot convert a BigInt value to a number #6187" (#6506) +- Validator will now properly handle all valid numeric type sizes: intN / uintN where 8 <= N <= 256 and N % 8 == 0 (#6434) +- Will now throw SchemaFormatError when unsupported format is passed to `convertToZod` method (#6434) diff --git a/packages/web3-validator/src/formats.ts b/packages/web3-validator/src/formats.ts index da0c0ba6564..69d6fa9cf1f 100644 --- a/packages/web3-validator/src/formats.ts +++ b/packages/web3-validator/src/formats.ts @@ -41,8 +41,7 @@ const formats: { [key: string]: (data: unknown) => boolean } = { string: (data: unknown) => isString(data as ValidInputTypes), }; // generate formats for all numbers types -for (let i = 3; i <= 8; i += 1) { - const bitSize = 2 ** i; +for (let bitSize = 8; bitSize <= 256; bitSize += 8) { formats[`int${bitSize}`] = data => isInt(data as ValidInputTypes, { bitSize }); formats[`uint${bitSize}`] = data => isUInt(data as ValidInputTypes, { bitSize }); } diff --git a/packages/web3-validator/src/validator.ts b/packages/web3-validator/src/validator.ts index c1779992125..d477a06d96b 100644 --- a/packages/web3-validator/src/validator.ts +++ b/packages/web3-validator/src/validator.ts @@ -14,6 +14,7 @@ GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with web3.js. If not, see . */ +import { SchemaFormatError } from 'web3-errors'; import { Web3ValidationErrorObject } from 'web3-types'; import { z, ZodType, ZodIssue, ZodIssueCode, ZodTypeAny } from 'zod'; @@ -67,6 +68,10 @@ const convertToZod = (schema: JsonSchema): ZodType => { } if (schema?.format) { + if (!formats[schema.format]) { + throw new SchemaFormatError(schema.format); + } + return z.any().refine(formats[schema.format], (value: unknown) => ({ params: { value, format: schema.format }, })); diff --git a/packages/web3-validator/test/config/jest.config.js b/packages/web3-validator/test/config/jest.config.js index 4a60f95b353..c8c21e06e6a 100644 --- a/packages/web3-validator/test/config/jest.config.js +++ b/packages/web3-validator/test/config/jest.config.js @@ -12,7 +12,7 @@ module.exports = { }, moduleNameMapper: { '^(\\.{1,2}/.*)\\.js$': '$1', - }, + }, verbose: false, collectCoverage: false, coverageReporters: ['json'], diff --git a/packages/web3-validator/test/fixtures/abi_to_json_schema.ts b/packages/web3-validator/test/fixtures/abi_to_json_schema.ts index dcac24e2046..1a2cb7bd36f 100644 --- a/packages/web3-validator/test/fixtures/abi_to_json_schema.ts +++ b/packages/web3-validator/test/fixtures/abi_to_json_schema.ts @@ -30,7 +30,7 @@ export type AbiToJsonSchemaCase = { data: Record | Array; }; }; -export const abiToJsonSchemaCases: AbiToJsonSchemaCase[] = [ +const abiToJsonSchemaCases: AbiToJsonSchemaCase[] = [ { title: 'single param uint', abi: { @@ -1659,3 +1659,36 @@ export const abiToJsonSchemaCases: AbiToJsonSchemaCase[] = [ }, }, ]; + +function generateSingleParamNumericCase(type: string, bitSize: number) { + return { + title: `single param ${type}${bitSize}`, + abi: { + fullSchema: [{ name: 'a', type: `${type}${bitSize}` }], + shortSchema: [`${type}${bitSize}`], + data: [12], + }, + json: { + fullSchema: { + type: 'array', + items: [{ $id: 'a', format: `${type}${bitSize}`, required: true }], + minItems: 1, + maxItems: 1, + }, + shortSchema: { + type: 'array', + items: [{ $id: '/0/0', format: `${type}${bitSize}`, required: true }], + minItems: 1, + maxItems: 1, + }, + data: [12], + }, + }; +} + +for (let i = 256; i >= 8; i -= 8) { + abiToJsonSchemaCases.unshift(generateSingleParamNumericCase('int', i)); + abiToJsonSchemaCases.unshift(generateSingleParamNumericCase('uint', i)); +} + +export { abiToJsonSchemaCases }; diff --git a/packages/web3-validator/test/unit/load.test.ts b/packages/web3-validator/test/unit/load.test.ts index 919214ef7af..9053be7e8f0 100644 --- a/packages/web3-validator/test/unit/load.test.ts +++ b/packages/web3-validator/test/unit/load.test.ts @@ -16,7 +16,7 @@ along with web3.js. If not, see . */ import { Web3Validator } from '../../src/web3_validator'; -import { Json, JsonSchema, ValidationSchemaInput } from '../..'; +import { Json, JsonSchema, ValidationSchemaInput } from '../../src/types'; const abi = [ { indexed: true, internalType: 'address', name: 'from', type: 'address' }, diff --git a/packages/web3-validator/test/unit/web3_validator.test.ts b/packages/web3-validator/test/unit/web3_validator.test.ts index e1a49fa6e3a..0b910c31f17 100644 --- a/packages/web3-validator/test/unit/web3_validator.test.ts +++ b/packages/web3-validator/test/unit/web3_validator.test.ts @@ -14,6 +14,7 @@ GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with web3.js. If not, see . */ +import { SchemaFormatError } from 'web3-errors' import { abiToJsonSchemaCases } from '../fixtures/abi_to_json_schema'; import { Web3Validator } from '../../src/web3_validator'; import { Web3ValidatorError } from '../../src/errors'; @@ -101,14 +102,32 @@ describe('web3-validator', () => { ), ).toBeUndefined(); }); + + it('should throw due to unsupported format', () => { + expect(() => { + validator.validateJSONSchema( + { + type: 'array', + items: [{ $id: 'a', format: 'unsupportedFormat', required: true }], + minItems: 1, + maxItems: 1, + }, + ['0x2df0879f1ee2b2b1f2448c64c089c29e3ad7ccc5'], + ); + }).toThrow(SchemaFormatError); + }); }); describe('validateJsonSchema', () => { - it.each(abiToJsonSchemaCases.slice(0, 5))('should pass for valid data', abi => { - const jsonSchema = abi.json; - expect( - validator.validateJSONSchema(jsonSchema.fullSchema, jsonSchema.data), - ).toBeUndefined(); - }); + // only single param test cases + it.each(abiToJsonSchemaCases.slice(0, 69))( + `$title - should pass for valid data`, + abi => { + const jsonSchema = abi.json; + expect( + validator.validateJSONSchema(jsonSchema.fullSchema, jsonSchema.data), + ).toBeUndefined(); + }, + ); it('should throw', () => { expect(() => { From bd3b9a0dacc6f15a406dd660ec7add3c2765b600 Mon Sep 17 00:00:00 2001 From: Junaid <86780488+jdevcs@users.noreply.github.com> Date: Wed, 18 Oct 2023 15:59:18 +0200 Subject: [PATCH 2/6] Release/4.2.0 (#6517) * version bumps * changelog bumps --- CHANGELOG.md | 59 ++++++++++++++++++++++- packages/web3-core/CHANGELOG.md | 4 +- packages/web3-core/package.json | 18 +++---- packages/web3-errors/CHANGELOG.md | 8 ++- packages/web3-errors/package.json | 4 +- packages/web3-eth-abi/CHANGELOG.md | 4 +- packages/web3-eth-abi/package.json | 10 ++-- packages/web3-eth-accounts/CHANGELOG.md | 4 +- packages/web3-eth-accounts/package.json | 12 ++--- packages/web3-eth-contract/CHANGELOG.md | 4 +- packages/web3-eth-contract/package.json | 18 +++---- packages/web3-eth-ens/CHANGELOG.md | 6 +++ packages/web3-eth-ens/package.json | 18 +++---- packages/web3-eth-iban/CHANGELOG.md | 6 +++ packages/web3-eth-iban/package.json | 10 ++-- packages/web3-eth-personal/CHANGELOG.md | 6 +++ packages/web3-eth-personal/package.json | 16 +++--- packages/web3-eth/CHANGELOG.md | 4 +- packages/web3-eth/package.json | 24 ++++----- packages/web3-net/CHANGELOG.md | 6 +++ packages/web3-net/package.json | 10 ++-- packages/web3-providers-http/CHANGELOG.md | 4 +- packages/web3-providers-http/package.json | 8 +-- packages/web3-providers-ipc/CHANGELOG.md | 6 ++- packages/web3-providers-ipc/package.json | 8 +-- packages/web3-providers-ws/CHANGELOG.md | 6 ++- packages/web3-providers-ws/package.json | 8 +-- packages/web3-rpc-methods/CHANGELOG.md | 6 +++ packages/web3-rpc-methods/package.json | 8 +-- packages/web3-types/CHANGELOG.md | 4 +- packages/web3-types/package.json | 2 +- packages/web3-utils/CHANGELOG.md | 4 +- packages/web3-utils/package.json | 8 +-- packages/web3-validator/CHANGELOG.md | 4 +- packages/web3-validator/package.json | 6 +-- packages/web3/CHANGELOG.md | 10 ++++ packages/web3/package.json | 36 +++++++------- packages/web3/src/version.ts | 2 +- tools/web3-plugin-example/CHANGELOG.md | 8 ++- tools/web3-plugin-example/package.json | 14 +++--- 40 files changed, 265 insertions(+), 138 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a58e999f9a9..e4e6ec38695 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2081,10 +2081,14 @@ If there are any bugs, improvements, optimizations or any new feature proposal f - Dependencies updated -## [Unreleased] +## [4.2.0] ### Added +#### web3 + +- Various web3 sub packages has new functions details are in root changelog + #### web3-eth - Added `ALL_EVENTS` and `ALL_EVENTS_ABI` constants, `SendTransactionEventsBase` type, `decodeEventABI` method (#6410) @@ -2109,10 +2113,19 @@ If there are any bugs, improvements, optimizations or any new feature proposal f - Fix the issue: "Uncaught TypeError: Class extends value undefined is not a constructor or null #6371". (#6398) +#### web3-errors + +- Added new SchemaFormatError (#6434) + #### web3-eth - Ensure provider.supportsSubscriptions exists before watching by subscription (#6440) - Fixed param sent to `checkRevertBeforeSending` in `sendSignedTransaction` +- Fixed `defaultTransactionBuilder` for value issue (#6509) + +#### web3-eth-abi + +- Fix issue with default config with babel (and React): "TypeError: Cannot convert a BigInt value to a number #6187" (#6506) #### web3-eth-accounts @@ -2122,12 +2135,32 @@ If there are any bugs, improvements, optimizations or any new feature proposal f - Fix issue lquixada/cross-fetch#78, enabling to run web3.js in service worker (#6463) +#### web3-providers-ipc + +- Fixed bug in chunks processing logic (#6496) + +#### web3-providers-ws + +- Fixed bug in chunks processing logic (#6496) + +#### web3-utils + +- Fix issue with default config with babel (and React): "TypeError: Cannot convert a BigInt value to a number #6187" (#6506) +- Fixed bug in chunks processing logic (#6496) + #### web3-validator -- Multi-dimensional arrays are now handled properly when parsing ABIs +- Multi-dimensional arrays are now handled properly when parsing ABIs (#6435) +- Fix issue with default config with babel (and React): "TypeError: Cannot convert a BigInt value to a number #6187" (#6506) +- Validator will now properly handle all valid numeric type sizes: intN / uintN where 8 <= N <= 256 and N % 8 == 0 (#6434) +- Will now throw SchemaFormatError when unsupported format is passed to `convertToZod` method (#6434) ### Changed +#### web3 + +- Dependencies updated + #### web3-core - defaultTransactionType is now type 0x2 instead of 0x0 (#6282) @@ -2142,6 +2175,28 @@ If there are any bugs, improvements, optimizations or any new feature proposal f - The `events` property was added to the `receipt` object (#6410) +#### web3-eth-ens + +- Dependencies updated + +#### web3-eth-iban + +- Dependencies updated + +#### web3-eth-personal + +- Dependencies updated + +#### web3-net + +- Dependencies updated + #### web3-providers-http - Bump cross-fetch to version 4 (#6463). + +#### web3-rpc-methods + +- Dependencies updated + +## [Unreleased] \ No newline at end of file diff --git a/packages/web3-core/CHANGELOG.md b/packages/web3-core/CHANGELOG.md index 3499c620c2d..2075f77082d 100644 --- a/packages/web3-core/CHANGELOG.md +++ b/packages/web3-core/CHANGELOG.md @@ -179,7 +179,7 @@ Documentation: - Added to `Web3Config` property `contractDataInputFill` allowing users to have the choice using property `data`, `input` or `both` for contract methods to be sent to the RPC provider when creating contracts. (#6377) (#6400) -## [Unreleased] +## [4.3.0] ### Changed @@ -190,3 +190,5 @@ Documentation: ### Fixed - Fix the issue: "Uncaught TypeError: Class extends value undefined is not a constructor or null #6371". (#6398) + +## [Unreleased] diff --git a/packages/web3-core/package.json b/packages/web3-core/package.json index 2fb6ee258eb..215f86bdff0 100644 --- a/packages/web3-core/package.json +++ b/packages/web3-core/package.json @@ -1,6 +1,6 @@ { "name": "web3-core", - "version": "4.2.0", + "version": "4.3.0", "description": "Web3 core tools for sub-packages. This is an internal package.", "main": "./lib/commonjs/index.js", "module": "./lib/esm/index.js", @@ -42,16 +42,16 @@ "test:integration": "jest --config=./test/integration/jest.config.js --passWithNoTests" }, "dependencies": { - "web3-errors": "^1.1.2", - "web3-eth-iban": "^4.0.6", - "web3-providers-http": "^4.0.6", - "web3-providers-ws": "^4.0.6", - "web3-types": "^1.2.0", - "web3-utils": "^4.0.6", - "web3-validator": "^2.0.2" + "web3-errors": "^1.1.3", + "web3-eth-iban": "^4.0.7", + "web3-providers-http": "^4.1.0", + "web3-providers-ws": "^4.0.7", + "web3-types": "^1.3.0", + "web3-utils": "^4.0.7", + "web3-validator": "^2.0.3" }, "optionalDependencies": { - "web3-providers-ipc": "^4.0.6" + "web3-providers-ipc": "^4.0.7" }, "devDependencies": { "@types/jest": "^28.1.6", diff --git a/packages/web3-errors/CHANGELOG.md b/packages/web3-errors/CHANGELOG.md index 303bff74b62..abf921d4027 100644 --- a/packages/web3-errors/CHANGELOG.md +++ b/packages/web3-errors/CHANGELOG.md @@ -154,6 +154,10 @@ Documentation: - Dependencies updated -## [Unreleased] +## [1.1.3] -- Added new SchemaFormatError (#6434) \ No newline at end of file +### Fixed + +- Added new SchemaFormatError (#6434) + +## [Unreleased] \ No newline at end of file diff --git a/packages/web3-errors/package.json b/packages/web3-errors/package.json index dc45b9972f4..64dfb0fb667 100644 --- a/packages/web3-errors/package.json +++ b/packages/web3-errors/package.json @@ -1,6 +1,6 @@ { "name": "web3-errors", - "version": "1.1.2", + "version": "1.1.3", "description": "This package has web3 error classes", "main": "./lib/commonjs/index.js", "module": "./lib/esm/index.js", @@ -41,7 +41,7 @@ "test:integration": "jest --config=./test/integration/jest.config.js --passWithNoTests" }, "dependencies": { - "web3-types": "^1.2.0" + "web3-types": "^1.3.0" }, "devDependencies": { "@types/jest": "^28.1.6", diff --git a/packages/web3-eth-abi/CHANGELOG.md b/packages/web3-eth-abi/CHANGELOG.md index 0765c91d578..5cf1be481b8 100644 --- a/packages/web3-eth-abi/CHANGELOG.md +++ b/packages/web3-eth-abi/CHANGELOG.md @@ -142,8 +142,10 @@ Documentation: - Dependencies updated -## [Unreleased] +## [4.1.3] ### Fixed - Fix issue with default config with babel (and React): "TypeError: Cannot convert a BigInt value to a number #6187" (#6506) + +## [Unreleased] \ No newline at end of file diff --git a/packages/web3-eth-abi/package.json b/packages/web3-eth-abi/package.json index fe3c2f183b6..f71d24a3668 100644 --- a/packages/web3-eth-abi/package.json +++ b/packages/web3-eth-abi/package.json @@ -1,6 +1,6 @@ { "name": "web3-eth-abi", - "version": "4.1.2", + "version": "4.1.3", "description": "Web3 module encode and decode EVM in/output.", "main": "./lib/commonjs/index.js", "module": "./lib/esm/index.js", @@ -43,10 +43,10 @@ }, "dependencies": { "abitype": "0.7.1", - "web3-validator": "^2.0.2", - "web3-errors": "^1.1.2", - "web3-types": "^1.2.0", - "web3-utils": "^4.0.6" + "web3-errors": "^1.1.3", + "web3-types": "^1.3.0", + "web3-utils": "^4.0.7", + "web3-validator": "^2.0.3" }, "devDependencies": { "@humeris/espresso-shot": "^4.0.0", diff --git a/packages/web3-eth-accounts/CHANGELOG.md b/packages/web3-eth-accounts/CHANGELOG.md index 58034dc7a48..5e1e9bee8c1 100644 --- a/packages/web3-eth-accounts/CHANGELOG.md +++ b/packages/web3-eth-accounts/CHANGELOG.md @@ -137,7 +137,7 @@ Documentation: - Fixed "The `r` and `s` returned by `sign` to does not always consist of 64 characters" (#6411) -## [Unreleased] +## [4.1.0] ### Added @@ -148,3 +148,5 @@ Documentation: ### Fixed - Fixed `recover` function, `v` will be normalized to value 0,1 (#6344) + +## [Unreleased] \ No newline at end of file diff --git a/packages/web3-eth-accounts/package.json b/packages/web3-eth-accounts/package.json index 5ebf6cdfe54..ae62345610d 100644 --- a/packages/web3-eth-accounts/package.json +++ b/packages/web3-eth-accounts/package.json @@ -1,6 +1,6 @@ { "name": "web3-eth-accounts", - "version": "4.0.6", + "version": "4.1.0", "description": "Package for managing Ethereum accounts and signing", "main": "./lib/commonjs/index.js", "module": "./lib/esm/index.js", @@ -55,15 +55,15 @@ "prettier": "^2.7.1", "ts-jest": "^28.0.7", "typescript": "^4.7.4", - "web3-providers-ipc": "^4.0.6" + "web3-providers-ipc": "^4.0.7" }, "dependencies": { "@ethereumjs/rlp": "^4.0.1", "crc-32": "^1.2.2", "ethereum-cryptography": "^2.0.0", - "web3-errors": "^1.1.2", - "web3-types": "^1.2.0", - "web3-utils": "^4.0.6", - "web3-validator": "^2.0.2" + "web3-errors": "^1.1.3", + "web3-types": "^1.3.0", + "web3-utils": "^4.0.7", + "web3-validator": "^2.0.3" } } diff --git a/packages/web3-eth-contract/CHANGELOG.md b/packages/web3-eth-contract/CHANGELOG.md index cd30b90db36..fd3fd479055 100644 --- a/packages/web3-eth-contract/CHANGELOG.md +++ b/packages/web3-eth-contract/CHANGELOG.md @@ -308,8 +308,10 @@ Documentation: - Added to `Web3Config` property `contractDataInputFill` allowing users to have the choice using property `data`, `input` or `both` for contract methods to be sent to the RPC provider when creating contracts. (#6377) -## [Unreleased] +## [4.1.1] ### Changed - The `events` property was added to the `receipt` object (#6410) + +## [Unreleased] \ No newline at end of file diff --git a/packages/web3-eth-contract/package.json b/packages/web3-eth-contract/package.json index d6f8d11bb58..e39f76dbbdf 100644 --- a/packages/web3-eth-contract/package.json +++ b/packages/web3-eth-contract/package.json @@ -1,6 +1,6 @@ { "name": "web3-eth-contract", - "version": "4.1.0", + "version": "4.1.1", "description": "Web3 module to interact with Ethereum smart contracts.", "main": "./lib/commonjs/index.js", "module": "./lib/esm/index.js", @@ -45,13 +45,13 @@ "test:e2e:firefox": "npx cypress run --headless --browser firefox --env grep='ignore',invert=true" }, "dependencies": { - "web3-core": "^4.2.0", - "web3-errors": "^1.1.2", - "web3-eth": "^4.2.0", - "web3-eth-abi": "^4.1.2", - "web3-types": "^1.2.0", - "web3-utils": "^4.0.6", - "web3-validator": "^2.0.2" + "web3-core": "^4.3.0", + "web3-errors": "^1.1.3", + "web3-eth": "^4.3.0", + "web3-eth-abi": "^4.1.3", + "web3-types": "^1.3.0", + "web3-utils": "^4.0.7", + "web3-validator": "^2.0.3" }, "devDependencies": { "@humeris/espresso-shot": "^4.0.0", @@ -67,6 +67,6 @@ "prettier": "^2.7.1", "ts-jest": "^28.0.7", "typescript": "^4.7.4", - "web3-eth-accounts": "^4.0.6" + "web3-eth-accounts": "^4.1.0" } } diff --git a/packages/web3-eth-ens/CHANGELOG.md b/packages/web3-eth-ens/CHANGELOG.md index db44732df72..235df027e14 100644 --- a/packages/web3-eth-ens/CHANGELOG.md +++ b/packages/web3-eth-ens/CHANGELOG.md @@ -129,4 +129,10 @@ Documentation: - Dependencies updated +## [4.0.7] + +### Changed + +- Dependencies updated + ## [Unreleased] \ No newline at end of file diff --git a/packages/web3-eth-ens/package.json b/packages/web3-eth-ens/package.json index 78feabc7af9..32d07ef01d9 100644 --- a/packages/web3-eth-ens/package.json +++ b/packages/web3-eth-ens/package.json @@ -1,6 +1,6 @@ { "name": "web3-eth-ens", - "version": "4.0.6", + "version": "4.0.7", "description": "This package has ENS functions for interacting with Ethereum Name Service.", "main": "./lib/commonjs/index.js", "module": "./lib/esm/index.js", @@ -59,13 +59,13 @@ }, "dependencies": { "@adraffy/ens-normalize": "^1.8.8", - "web3-core": "^4.2.0", - "web3-errors": "^1.1.2", - "web3-eth": "^4.2.0", - "web3-eth-contract": "^4.1.0", - "web3-net": "^4.0.6", - "web3-types": "^1.2.0", - "web3-utils": "^4.0.6", - "web3-validator": "^2.0.2" + "web3-core": "^4.3.0", + "web3-errors": "^1.1.3", + "web3-eth": "^4.3.0", + "web3-eth-contract": "^4.1.1", + "web3-net": "^4.0.7", + "web3-types": "^1.3.0", + "web3-utils": "^4.0.7", + "web3-validator": "^2.0.3" } } diff --git a/packages/web3-eth-iban/CHANGELOG.md b/packages/web3-eth-iban/CHANGELOG.md index 0c08cb50e34..797f4ffe29f 100644 --- a/packages/web3-eth-iban/CHANGELOG.md +++ b/packages/web3-eth-iban/CHANGELOG.md @@ -119,4 +119,10 @@ Documentation: - Dependencies updated +## [4.0.7] + +### Changed + +- Dependencies updated + ## [Unreleased] \ No newline at end of file diff --git a/packages/web3-eth-iban/package.json b/packages/web3-eth-iban/package.json index 4683810dc23..c04c1b0476c 100644 --- a/packages/web3-eth-iban/package.json +++ b/packages/web3-eth-iban/package.json @@ -1,6 +1,6 @@ { "name": "web3-eth-iban", - "version": "4.0.6", + "version": "4.0.7", "description": "This package converts Ethereum addresses to IBAN addresses and vice versa.", "main": "./lib/commonjs/index.js", "module": "./lib/esm/index.js", @@ -56,9 +56,9 @@ "typescript": "^4.7.4" }, "dependencies": { - "web3-errors": "^1.1.2", - "web3-types": "^1.2.0", - "web3-utils": "^4.0.6", - "web3-validator": "^2.0.2" + "web3-errors": "^1.1.3", + "web3-types": "^1.3.0", + "web3-utils": "^4.0.7", + "web3-validator": "^2.0.3" } } diff --git a/packages/web3-eth-personal/CHANGELOG.md b/packages/web3-eth-personal/CHANGELOG.md index 30d2ae17cac..11d09bb8549 100644 --- a/packages/web3-eth-personal/CHANGELOG.md +++ b/packages/web3-eth-personal/CHANGELOG.md @@ -135,4 +135,10 @@ Documentation: - Dependencies updated +## [4.0.7] + +### Changed + +- Dependencies updated + ## [Unreleased] \ No newline at end of file diff --git a/packages/web3-eth-personal/package.json b/packages/web3-eth-personal/package.json index e9c38b47bfa..062bf4bf9f1 100644 --- a/packages/web3-eth-personal/package.json +++ b/packages/web3-eth-personal/package.json @@ -1,6 +1,6 @@ { "name": "web3-eth-personal", - "version": "4.0.6", + "version": "4.0.7", "description": "Web3 module to interact with the Ethereum blockchain accounts stored in the node.", "main": "./lib/commonjs/index.js", "module": "./lib/esm/index.js", @@ -42,12 +42,12 @@ "test:integration": "jest --config=./test/integration/jest.config.js" }, "dependencies": { - "web3-core": "^4.2.0", - "web3-eth": "^4.2.0", - "web3-rpc-methods": "^1.1.2", - "web3-types": "^1.2.0", - "web3-utils": "^4.0.6", - "web3-validator": "^2.0.2" + "web3-core": "^4.3.0", + "web3-eth": "^4.3.0", + "web3-rpc-methods": "^1.1.3", + "web3-types": "^1.3.0", + "web3-utils": "^4.0.7", + "web3-validator": "^2.0.3" }, "devDependencies": { "@types/jest": "^28.1.6", @@ -62,6 +62,6 @@ "prettier": "^2.7.1", "ts-jest": "^28.0.7", "typescript": "^4.7.4", - "web3-providers-ws": "^4.0.6" + "web3-providers-ws": "^4.0.7" } } diff --git a/packages/web3-eth/CHANGELOG.md b/packages/web3-eth/CHANGELOG.md index 21fa4c5d8a0..2449f9306e0 100644 --- a/packages/web3-eth/CHANGELOG.md +++ b/packages/web3-eth/CHANGELOG.md @@ -191,7 +191,7 @@ Documentation: - Added to `Web3Config` property `contractDataInputFill` allowing users to have the choice using property `data`, `input` or `both` for contract methods to be sent to the RPC provider when creating contracts. (#6377) (#6400) -## [Unreleased] +## [4.3.0] ### Changed @@ -206,3 +206,5 @@ Documentation: ### Added - Added `ALL_EVENTS` and `ALL_EVENTS_ABI` constants, `SendTransactionEventsBase` type, `decodeEventABI` method (#6410) + +## [Unreleased] \ No newline at end of file diff --git a/packages/web3-eth/package.json b/packages/web3-eth/package.json index 8f2432e91fd..cc76f9844e3 100644 --- a/packages/web3-eth/package.json +++ b/packages/web3-eth/package.json @@ -1,6 +1,6 @@ { "name": "web3-eth", - "version": "4.2.0", + "version": "4.3.0", "description": "Web3 module to interact with the Ethereum blockchain and smart contracts.", "main": "./lib/commonjs/index.js", "module": "./lib/esm/index.js", @@ -59,19 +59,19 @@ "prettier": "^2.7.1", "ts-jest": "^28.0.7", "typescript": "^4.7.4", - "web3-providers-http": "^4.0.6" + "web3-providers-http": "^4.1.0" }, "dependencies": { "setimmediate": "^1.0.5", - "web3-core": "^4.2.0", - "web3-errors": "^1.1.2", - "web3-eth-abi": "^4.1.2", - "web3-eth-accounts": "^4.0.6", - "web3-net": "^4.0.6", - "web3-providers-ws": "^4.0.6", - "web3-rpc-methods": "^1.1.2", - "web3-types": "^1.2.0", - "web3-utils": "^4.0.6", - "web3-validator": "^2.0.2" + "web3-core": "^4.3.0", + "web3-errors": "^1.1.3", + "web3-eth-abi": "^4.1.3", + "web3-eth-accounts": "^4.1.0", + "web3-net": "^4.0.7", + "web3-providers-ws": "^4.0.7", + "web3-rpc-methods": "^1.1.3", + "web3-types": "^1.3.0", + "web3-utils": "^4.0.7", + "web3-validator": "^2.0.3" } } diff --git a/packages/web3-net/CHANGELOG.md b/packages/web3-net/CHANGELOG.md index bb774786056..dd6227ecdd8 100644 --- a/packages/web3-net/CHANGELOG.md +++ b/packages/web3-net/CHANGELOG.md @@ -135,4 +135,10 @@ Documentation: - Dependencies updated +## [4.0.7] + +### Changed + +- Dependencies updated + ## [Unreleased] \ No newline at end of file diff --git a/packages/web3-net/package.json b/packages/web3-net/package.json index c6ac34300fe..f6ddefca6ee 100644 --- a/packages/web3-net/package.json +++ b/packages/web3-net/package.json @@ -1,6 +1,6 @@ { "name": "web3-net", - "version": "4.0.6", + "version": "4.0.7", "description": "Web3 module to interact with the Ethereum nodes networking properties.", "main": "./lib/commonjs/index.js", "module": "./lib/esm/index.js", @@ -56,9 +56,9 @@ "typescript": "^4.7.4" }, "dependencies": { - "web3-core": "^4.2.0", - "web3-rpc-methods": "^1.1.2", - "web3-types": "^1.2.0", - "web3-utils": "^4.0.6" + "web3-core": "^4.3.0", + "web3-rpc-methods": "^1.1.3", + "web3-types": "^1.3.0", + "web3-utils": "^4.0.7" } } diff --git a/packages/web3-providers-http/CHANGELOG.md b/packages/web3-providers-http/CHANGELOG.md index fed7d430fc3..6d57af6dcf7 100644 --- a/packages/web3-providers-http/CHANGELOG.md +++ b/packages/web3-providers-http/CHANGELOG.md @@ -119,7 +119,7 @@ Documentation: - Dependencies updated -## [Unreleased] +## [4.1.0] ### Changed @@ -128,3 +128,5 @@ Documentation: ### Fixed - Fix issue lquixada/cross-fetch#78, enabling to run web3.js in service worker (#6463) + +## [Unreleased] \ No newline at end of file diff --git a/packages/web3-providers-http/package.json b/packages/web3-providers-http/package.json index 6cb6baaaf2b..6a01d2e835d 100644 --- a/packages/web3-providers-http/package.json +++ b/packages/web3-providers-http/package.json @@ -1,6 +1,6 @@ { "name": "web3-providers-http", - "version": "4.0.6", + "version": "4.1.0", "description": "HTTP provider for Web3 4.x.x", "main": "./lib/commonjs/index.js", "module": "./lib/esm/index.js", @@ -61,8 +61,8 @@ }, "dependencies": { "cross-fetch": "^4.0.0", - "web3-errors": "^1.1.2", - "web3-types": "^1.2.0", - "web3-utils": "^4.0.6" + "web3-errors": "^1.1.3", + "web3-types": "^1.3.0", + "web3-utils": "^4.0.7" } } diff --git a/packages/web3-providers-ipc/CHANGELOG.md b/packages/web3-providers-ipc/CHANGELOG.md index 8fc671b4a20..6f75b93995e 100644 --- a/packages/web3-providers-ipc/CHANGELOG.md +++ b/packages/web3-providers-ipc/CHANGELOG.md @@ -129,8 +129,10 @@ Documentation: - Dependencies updated -## [Unreleased] +## [4.0.7] ### Fixed -- Fixed bug in chunks processing logic (#6496) \ No newline at end of file +- Fixed bug in chunks processing logic (#6496) + +## [Unreleased] \ No newline at end of file diff --git a/packages/web3-providers-ipc/package.json b/packages/web3-providers-ipc/package.json index 0eb1997b2b3..e0052448ae3 100644 --- a/packages/web3-providers-ipc/package.json +++ b/packages/web3-providers-ipc/package.json @@ -1,6 +1,6 @@ { "name": "web3-providers-ipc", - "version": "4.0.6", + "version": "4.0.7", "description": "IPC provider for Web3 4.x.x", "main": "./lib/commonjs/index.js", "module": "./lib/esm/index.js", @@ -56,8 +56,8 @@ "typescript": "^4.7.4" }, "dependencies": { - "web3-errors": "^1.1.2", - "web3-types": "^1.2.0", - "web3-utils": "^4.0.6" + "web3-errors": "^1.1.3", + "web3-types": "^1.3.0", + "web3-utils": "^4.0.7" } } diff --git a/packages/web3-providers-ws/CHANGELOG.md b/packages/web3-providers-ws/CHANGELOG.md index f3eaafc94ee..8648c09c9d3 100644 --- a/packages/web3-providers-ws/CHANGELOG.md +++ b/packages/web3-providers-ws/CHANGELOG.md @@ -123,8 +123,10 @@ Documentation: - Dependencies updated -## [Unreleased] +## [4.0.7] ### Fixed -- Fixed bug in chunks processing logic (#6496) \ No newline at end of file +- Fixed bug in chunks processing logic (#6496) + +## [Unreleased] \ No newline at end of file diff --git a/packages/web3-providers-ws/package.json b/packages/web3-providers-ws/package.json index fc2ba700878..6aa3bde1ee1 100644 --- a/packages/web3-providers-ws/package.json +++ b/packages/web3-providers-ws/package.json @@ -1,6 +1,6 @@ { "name": "web3-providers-ws", - "version": "4.0.6", + "version": "4.0.7", "description": "Websocket provider for Web3 4.x.x", "main": "./lib/commonjs/index.js", "module": "./lib/esm/index.js", @@ -63,9 +63,9 @@ "dependencies": { "@types/ws": "8.5.3", "isomorphic-ws": "^5.0.0", - "web3-errors": "^1.1.2", - "web3-types": "^1.2.0", - "web3-utils": "^4.0.6", + "web3-errors": "^1.1.3", + "web3-types": "^1.3.0", + "web3-utils": "^4.0.7", "ws": "^8.8.1" } } diff --git a/packages/web3-rpc-methods/CHANGELOG.md b/packages/web3-rpc-methods/CHANGELOG.md index 3141a6c775f..dcf92f6e427 100644 --- a/packages/web3-rpc-methods/CHANGELOG.md +++ b/packages/web3-rpc-methods/CHANGELOG.md @@ -120,4 +120,10 @@ Documentation: - Dependencies updated +## [1.1.3] + +### Changed + +- Dependencies updated + ## [Unreleased] \ No newline at end of file diff --git a/packages/web3-rpc-methods/package.json b/packages/web3-rpc-methods/package.json index 1aaa70d0126..25cc30c36ae 100644 --- a/packages/web3-rpc-methods/package.json +++ b/packages/web3-rpc-methods/package.json @@ -1,6 +1,6 @@ { "name": "web3-rpc-methods", - "version": "1.1.2", + "version": "1.1.3", "description": "Ethereum RPC methods for Web3 4.x.x", "main": "./lib/commonjs/index.js", "module": "./lib/esm/index.js", @@ -56,8 +56,8 @@ "typescript": "^4.7.4" }, "dependencies": { - "web3-core": "^4.2.0", - "web3-types": "^1.2.0", - "web3-validator": "^2.0.2" + "web3-core": "^4.3.0", + "web3-types": "^1.3.0", + "web3-validator": "^2.0.3" } } diff --git a/packages/web3-types/CHANGELOG.md b/packages/web3-types/CHANGELOG.md index e0f82088f8e..a526d15b3a0 100644 --- a/packages/web3-types/CHANGELOG.md +++ b/packages/web3-types/CHANGELOG.md @@ -164,8 +164,10 @@ Documentation: - add `asEIP1193Provider` to `Web3BaseProvider` so every inherited class can have the returned value of `request` method, fully compatible with EIP-1193. (#6407) -## [Unreleased] +## [1.3.0] ### Added - Interface `EventLog` was added. (#6410) + +## [Unreleased] \ No newline at end of file diff --git a/packages/web3-types/package.json b/packages/web3-types/package.json index 09cd9edcb9a..1329c0faa92 100644 --- a/packages/web3-types/package.json +++ b/packages/web3-types/package.json @@ -1,6 +1,6 @@ { "name": "web3-types", - "version": "1.2.0", + "version": "1.3.0", "description": "Provide the common data structures and interfaces for web3 modules.", "main": "./lib/commonjs/index.js", "module": "./lib/esm/index.js", diff --git a/packages/web3-utils/CHANGELOG.md b/packages/web3-utils/CHANGELOG.md index ca3aa5b9a3d..d01573fae6c 100644 --- a/packages/web3-utils/CHANGELOG.md +++ b/packages/web3-utils/CHANGELOG.md @@ -158,7 +158,7 @@ Documentation: - `soliditySha3()` with BigInt support -## [Unreleased] +## [4.0.7] ### Added @@ -168,3 +168,5 @@ Documentation: - Fix issue with default config with babel (and React): "TypeError: Cannot convert a BigInt value to a number #6187" (#6506) - Fixed bug in chunks processing logic (#6496) + +## [Unreleased] \ No newline at end of file diff --git a/packages/web3-utils/package.json b/packages/web3-utils/package.json index 72a7b760da3..a4d48ca5cf4 100644 --- a/packages/web3-utils/package.json +++ b/packages/web3-utils/package.json @@ -1,7 +1,7 @@ { "name": "web3-utils", "sideEffects": false, - "version": "4.0.6", + "version": "4.0.7", "description": "Collection of utility functions used in web3.js.", "main": "./lib/commonjs/index.js", "module": "./lib/esm/index.js", @@ -64,8 +64,8 @@ }, "dependencies": { "ethereum-cryptography": "^2.0.0", - "web3-errors": "^1.1.2", - "web3-types": "^1.2.0", - "web3-validator": "^2.0.2" + "web3-errors": "^1.1.3", + "web3-types": "^1.3.0", + "web3-validator": "^2.0.3" } } diff --git a/packages/web3-validator/CHANGELOG.md b/packages/web3-validator/CHANGELOG.md index 94cda5fb867..48a2255f135 100644 --- a/packages/web3-validator/CHANGELOG.md +++ b/packages/web3-validator/CHANGELOG.md @@ -147,7 +147,7 @@ Documentation: - Dependencies updated -## [Unreleased] +## [2.0.3] ### Fixed @@ -155,3 +155,5 @@ Documentation: - Fix issue with default config with babel (and React): "TypeError: Cannot convert a BigInt value to a number #6187" (#6506) - Validator will now properly handle all valid numeric type sizes: intN / uintN where 8 <= N <= 256 and N % 8 == 0 (#6434) - Will now throw SchemaFormatError when unsupported format is passed to `convertToZod` method (#6434) + +## [Unreleased] \ No newline at end of file diff --git a/packages/web3-validator/package.json b/packages/web3-validator/package.json index cd95d53c1f6..483ac6237aa 100644 --- a/packages/web3-validator/package.json +++ b/packages/web3-validator/package.json @@ -1,6 +1,6 @@ { "name": "web3-validator", - "version": "2.0.2", + "version": "2.0.3", "description": "JSON-Schema compatible validator for web3", "main": "./lib/commonjs/index.js", "module": "./lib/esm/index.js", @@ -47,8 +47,8 @@ "dependencies": { "ethereum-cryptography": "^2.0.0", "util": "^0.12.5", - "web3-errors": "^1.1.2", - "web3-types": "^1.2.0", + "web3-errors": "^1.1.3", + "web3-types": "^1.3.0", "zod": "^3.21.4" }, "devDependencies": { diff --git a/packages/web3/CHANGELOG.md b/packages/web3/CHANGELOG.md index 42dc4e5c660..3312cc7999d 100644 --- a/packages/web3/CHANGELOG.md +++ b/packages/web3/CHANGELOG.md @@ -151,4 +151,14 @@ Documentation: - Fix of incorrect provider warning behavior +## [4.2.0] + +### Changed + +- Dependencies updated + +### Added + +- Various web3 sub packages has new functions details are in root changelog + ## [Unreleased] \ No newline at end of file diff --git a/packages/web3/package.json b/packages/web3/package.json index b60812065df..8d80e746625 100644 --- a/packages/web3/package.json +++ b/packages/web3/package.json @@ -1,6 +1,6 @@ { "name": "web3", - "version": "4.1.2", + "version": "4.2.0", "description": "Ethereum JavaScript API", "main": "./lib/commonjs/index.js", "module": "./lib/esm/index.js", @@ -78,24 +78,24 @@ "prettier": "^2.7.1", "ts-jest": "^28.0.7", "typescript": "^4.7.4", - "web3-providers-ipc": "^4.0.6" + "web3-providers-ipc": "^4.0.7" }, "dependencies": { - "web3-core": "^4.2.0", - "web3-errors": "^1.1.2", - "web3-eth": "^4.2.0", - "web3-eth-abi": "^4.1.2", - "web3-eth-accounts": "^4.0.6", - "web3-eth-contract": "^4.1.0", - "web3-eth-ens": "^4.0.6", - "web3-eth-iban": "^4.0.6", - "web3-eth-personal": "^4.0.6", - "web3-net": "^4.0.6", - "web3-providers-http": "^4.0.6", - "web3-providers-ws": "^4.0.6", - "web3-rpc-methods": "^1.1.2", - "web3-types": "^1.2.0", - "web3-utils": "^4.0.6", - "web3-validator": "^2.0.2" + "web3-core": "^4.3.0", + "web3-errors": "^1.1.3", + "web3-eth": "^4.3.0", + "web3-eth-abi": "^4.1.3", + "web3-eth-accounts": "^4.1.0", + "web3-eth-contract": "^4.1.1", + "web3-eth-ens": "^4.0.7", + "web3-eth-iban": "^4.0.7", + "web3-eth-personal": "^4.0.7", + "web3-net": "^4.0.7", + "web3-providers-http": "^4.1.0", + "web3-providers-ws": "^4.0.7", + "web3-rpc-methods": "^1.1.3", + "web3-types": "^1.3.0", + "web3-utils": "^4.0.7", + "web3-validator": "^2.0.3" } } diff --git a/packages/web3/src/version.ts b/packages/web3/src/version.ts index c8ea101634b..21e225fe9cf 100644 --- a/packages/web3/src/version.ts +++ b/packages/web3/src/version.ts @@ -1 +1 @@ -/* eslint-disable header/header */ export const Web3PkgInfo = { version: '4.1.2' }; +/* eslint-disable header/header */ export const Web3PkgInfo = { version: '4.2.0' }; diff --git a/tools/web3-plugin-example/CHANGELOG.md b/tools/web3-plugin-example/CHANGELOG.md index d7fc6b40ded..65e4434200c 100644 --- a/tools/web3-plugin-example/CHANGELOG.md +++ b/tools/web3-plugin-example/CHANGELOG.md @@ -82,4 +82,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Dependencies updated -## [Unreleased] +## [1.0.6] + +### Changed + +- Dependencies updated + +## [Unreleased] \ No newline at end of file diff --git a/tools/web3-plugin-example/package.json b/tools/web3-plugin-example/package.json index 67a15463a37..cb1f42533e8 100644 --- a/tools/web3-plugin-example/package.json +++ b/tools/web3-plugin-example/package.json @@ -1,6 +1,6 @@ { "name": "web3-plugin-example", - "version": "1.0.5", + "version": "1.0.6", "description": "Example implementations of Web3.js' 4.x plugin system", "repository": "https://github.com/ChainSafe/web3.js", "engines": { @@ -45,12 +45,12 @@ "prettier": "^2.7.1", "ts-jest": "^28.0.7", "typescript": "^4.7.4", - "web3": "^4.1.2", - "web3-core": "^4.2.0", - "web3-eth-abi": "^4.1.2", - "web3-eth-contract": "^4.1.0", - "web3-types": "^1.2.0", - "web3-utils": "^4.0.6" + "web3": "^4.2.0", + "web3-core": "^4.3.0", + "web3-eth-abi": "^4.1.3", + "web3-eth-contract": "^4.1.1", + "web3-types": "^1.3.0", + "web3-utils": "^4.0.7" }, "peerDependencies": { "web3-core": ">= 4.1.1 < 5", From 7bee9bc7706f9c16757b464553fb7234fc8e4491 Mon Sep 17 00:00:00 2001 From: Muhammad Altabba <24407834+Muhammad-Altabba@users.noreply.github.com> Date: Wed, 18 Oct 2023 18:42:17 +0200 Subject: [PATCH 3/6] fix CI/CD Firefox tests (#6516) * delete cypress firefox special configurations --- templates/cypress.config.js | 19 ------------------- templates/cypress/.cert/cert.pem | 25 ------------------------- templates/cypress/.cert/key.pem | 28 ---------------------------- 3 files changed, 72 deletions(-) delete mode 100644 templates/cypress/.cert/cert.pem delete mode 100644 templates/cypress/.cert/key.pem diff --git a/templates/cypress.config.js b/templates/cypress.config.js index 0bec9597315..95874902d93 100644 --- a/templates/cypress.config.js +++ b/templates/cypress.config.js @@ -28,23 +28,4 @@ const config = { }, }; -if (process.env.WEB3_SYSTEM_TEST_ENGINE === 'firefox') { - const port = parseInt(String(Math.random() * 10000 + 10000)); - config.clientCertificates = [ - { - url: 'https://web3.js', - certs: [ - { - cert: './cypress/.cert/cert.pem', - key: './cypress/.cert/key.pem', - }, - ], - }, - ]; - config.e2e.port = port; - config.e2e.hosts = { - 'web3.js': '127.0.0.1', - }; - config.e2e.baseUrl = `https://web3.js:${port}`; -} module.exports = config; diff --git a/templates/cypress/.cert/cert.pem b/templates/cypress/.cert/cert.pem deleted file mode 100644 index 5653f4a1311..00000000000 --- a/templates/cypress/.cert/cert.pem +++ /dev/null @@ -1,25 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIERDCCAqygAwIBAgIQI9z+o56tynrZPMnAUwC20DANBgkqhkiG9w0BAQsFADCB -hTEeMBwGA1UEChMVbWtjZXJ0IGRldmVsb3BtZW50IENBMS0wKwYDVQQLDCRhbGV4 -ZXlrb3NpbnNraUBtYWMgKEFsZXhleSBLb3NpbnNraSkxNDAyBgNVBAMMK21rY2Vy -dCBhbGV4ZXlrb3NpbnNraUBtYWMgKEFsZXhleSBLb3NpbnNraSkwHhcNMjIwODAy -MTIwMDI1WhcNMjQxMTAyMTMwMDI1WjBYMScwJQYDVQQKEx5ta2NlcnQgZGV2ZWxv -cG1lbnQgY2VydGlmaWNhdGUxLTArBgNVBAsMJGFsZXhleWtvc2luc2tpQG1hYyAo -QWxleGV5IEtvc2luc2tpKTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB -AONNPbdU8M+ZXLmbmgw7YWnt6g9UU7FAFa0xXT+xUxgg8s5Sfe0v8+pmddq4Yw1G -Kri2CIiDixjcuA6+PbHoKNtqN5s0AwqfQ52XgjSzWch9zNPAvzytQkc8ooCFUdii -NZj67zdMXjxZMQN9h6usMLOE73Y30Bl8mfCwPU/lrjhWy8HRYX3Jb1Gxa67QFqyw -CbHeGCapmRwMSwPk89HCBiNxenTNf+stj/sc98PtLTvNUJoHJZ6QNYIbkYz1GaOo -0t/1/3hj7KTIyYhfLnqWECtNuA4LWMCdZ8kk3ItgSHRnepC4qc9UBTdGgXWf2jJ/ -3mfywsrIILF45aLYe4pYw+cCAwEAAaNcMFowDgYDVR0PAQH/BAQDAgWgMBMGA1Ud -JQQMMAoGCCsGAQUFBwMBMB8GA1UdIwQYMBaAFJgtatBnctxn4zOQkmc4QIps6IYZ -MBIGA1UdEQQLMAmCB3dlYjMuanMwDQYJKoZIhvcNAQELBQADggGBAAPZALXjRddj -jZ0V1zCmtKRpI5G7LSMPLEigKaR7c/muY76uYgyjMov2H5ErFNac/eFu5+s6gLgK -cchoxbKGxm3a941ybjAu1GRR8hqczoAKw9koYf19F6rLbQD0f1eq5vAumJT/dPwq -wifaj7jUhvdxMcEKhF5tgQVP/HvzjarzbIdWjvk/MYnvfUlamOgBgUxl0/lE6OGN -T9Rx9eST3RJfRYtrRrMdylPH/EC7W5vmToTCu0jRo8FZKfOJsppWanHnJhjZ7iHg -XXedJdZn/IaqW1hWEjdI6TqkdiesGbpfgB9q9+u1GPveEjtPPyK9RlKwrbOp8xI2 -zo8h7xfzqO/5h0ow1G48RY5JcNBhmn3A07kVKWrJViw6o3YfgUj/Wd/T+0h4sZDz -6zIK6UW/6C8NKl2Fcwfj2/E/2TiNFnm1wei0Sl4PT+6sZoPBP+MPLhjXucgI7NPO -xQvP/ubZFshoUlW37ybhiGd0obscGK5yPAHNxlni8kDaW8H/9jIymA== ------END CERTIFICATE----- diff --git a/templates/cypress/.cert/key.pem b/templates/cypress/.cert/key.pem deleted file mode 100644 index c0799428876..00000000000 --- a/templates/cypress/.cert/key.pem +++ /dev/null @@ -1,28 +0,0 @@ ------BEGIN PRIVATE KEY----- -MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQDjTT23VPDPmVy5 -m5oMO2Fp7eoPVFOxQBWtMV0/sVMYIPLOUn3tL/PqZnXauGMNRiq4tgiIg4sY3LgO -vj2x6CjbajebNAMKn0Odl4I0s1nIfczTwL88rUJHPKKAhVHYojWY+u83TF48WTED -fYerrDCzhO92N9AZfJnwsD1P5a44VsvB0WF9yW9RsWuu0BassAmx3hgmqZkcDEsD -5PPRwgYjcXp0zX/rLY/7HPfD7S07zVCaByWekDWCG5GM9RmjqNLf9f94Y+ykyMmI -Xy56lhArTbgOC1jAnWfJJNyLYEh0Z3qQuKnPVAU3RoF1n9oyf95n8sLKyCCxeOWi -2HuKWMPnAgMBAAECggEAD90uN4NoIzUS8alYgQ4L6HbAZT1/cdmFKcdOOMnJgN+b -0qaTP2CfZ3arNw6zaxPAm4+o3M5BgQS2m+DPMYGAiH/LTbu9kpo2/+K5JbB2zbVp -/EVxk2yMOaiTtuCXK8V2dCzfUT61PQUElLfIJkUoSP84L0oJ7h1yKQhD3zWqiSfz -7DdAYJSDpraoyx2pkQYGYvcEK5wCkcJtfR9PePCANkCBtY+5sP17gtG0DPrdlgBj -+4nyhsnd3cZG7QKxSnQ16Pn6hHv3JeEQlaTQ8yYrI4FFjvPowfwSWsH0pg3/AAS/ -a5yF8DTtaEyn74mzTEPWJWp9fTOs4L2IuYz1p5yC8QKBgQDkocBK907Eg94hhIHB -bpjpJ8TmC1tD7vdxcBotoB2GmZJssGpyv2kmqwdUxb1CAnhgCflDU3HeeR6GNqO3 -HmnED8sb0214D6HNVabXQm6zCZwFm7WQZSX/C9r2/FNpcSSATuEa25lukKPZ2Sdw -Slf2o1S6Y00pCo8cW+WRxIRrdQKBgQD+grrAV90MAjHKyyJNtFGXXHYm4MC47MYW -m7HkES6tDgdacLCNvx9jXQBR6YobwY970PtMewFsb2cfE/XqWQ8g4Wl9iCr5dejy -MjGlsGxpr9TJKEM3oO7TtG2jSp7j00E3zW5AOC+VkyefbdAgJG0r3hp0xskYUHmL -F2SviJcyawKBgEDe0DO1FelWTRmPgk2C9un4ubpX8I5G6HiMSTE25AnD2zLxn1Jt -kwVAs7TO4lMvZj5BtjLvIzjvfsSwDiWwAGx72rJLfBz7unoLWmprVAOCr3073/lX -ab+C+p7nmzcoviWVu/Ml6dPgQE1YewM2ZNz7HNhBwqvpbg+q12lTrArdAoGAEKf7 -ktTtOXj3Sz9KCm3PnSlG7jptQmz0dcxQsw1Q0bCGWKvhUhV892LBv5qaGEDto/vE -RngSWsdbp1QGFwUnEU7POZDsxxCpYxhX2XEXVz9TnKqO45gbqS04s6QRi/VqYj2G -hptmudI8mJl2MnRP1LwfXR8ZUAcMPUcVpss4oesCgYBJ+hCF3gAewFQ23t6gc2YP -3C9RusVwWF5P6jFFF9tqkzVEwazwMYCe+g2R3C6JHQOXsiynbf/mLgAIJLldliBp -/37uKgtZySXCJohj5MecjaT1r/aBXGY8fF7VWGklDGnvxkrq68d2s9FKQIfk4fUx -u2VV5GVZtOSezTKZW5AO0g== ------END PRIVATE KEY----- From 6791e60ee3d66feab782e1ee79713f7baa5655c1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Oct 2023 15:29:17 +0200 Subject: [PATCH 4/6] Bump undici from 5.22.0 to 5.26.3 (#6511) Bumps [undici](https://github.com/nodejs/undici) from 5.22.0 to 5.26.3. - [Release notes](https://github.com/nodejs/undici/releases) - [Commits](https://github.com/nodejs/undici/compare/v5.22.0...v5.26.3) --- updated-dependencies: - dependency-name: undici dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Junaid <86780488+jdevcs@users.noreply.github.com> --- yarn.lock | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/yarn.lock b/yarn.lock index 2ef8320c531..4956e0e58bd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -572,6 +572,11 @@ "@ethersproject/properties" "^5.7.0" "@ethersproject/strings" "^5.7.0" +"@fastify/busboy@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@fastify/busboy/-/busboy-2.0.0.tgz#f22824caff3ae506b18207bad4126dbc6ccdb6b8" + integrity sha512-JUFJad5lv7jxj926GPgymrWQxxjPYuJNiNjNMzqT+HiuP6Vl3dk5xzG+8sTX96np0ZAluvaMzPsjhHZ5rNuNQQ== + "@gar/promisify@^1.1.3": version "1.1.3" resolved "https://registry.yarnpkg.com/@gar/promisify/-/promisify-1.1.3.tgz#555193ab2e3bb3b6adc3d551c9c030d9e860daf6" @@ -3463,13 +3468,6 @@ bundle-name@^3.0.0: dependencies: run-applescript "^5.0.0" -busboy@^1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/busboy/-/busboy-1.6.0.tgz#966ea36a9502e43cdb9146962523b92f531f6893" - integrity sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA== - dependencies: - streamsearch "^1.1.0" - byte-size@7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/byte-size/-/byte-size-7.0.0.tgz#36528cd1ca87d39bd9abd51f5715dc93b6ceb032" @@ -11005,11 +11003,6 @@ statuses@2.0.1: resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63" integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== -streamsearch@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/streamsearch/-/streamsearch-1.1.0.tgz#404dd1e2247ca94af554e841a8ef0eaa238da764" - integrity sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg== - string-length@^4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/string-length/-/string-length-4.0.2.tgz#a8a8dc7bd5c1a82b9b3c8b87e125f66871b6e57a" @@ -11667,11 +11660,11 @@ unbox-primitive@^1.0.2: which-boxed-primitive "^1.0.2" undici@^5.4.0: - version "5.22.0" - resolved "https://registry.yarnpkg.com/undici/-/undici-5.22.0.tgz#5e205d82a5aecc003fc4388ccd3d2c6e8674a0ad" - integrity sha512-fR9RXCc+6Dxav4P9VV/sp5w3eFiSdOjJYsbtWfd4s5L5C4ogyuVpdKIVHeW0vV1MloM65/f7W45nR9ZxwVdyiA== + version "5.26.3" + resolved "https://registry.yarnpkg.com/undici/-/undici-5.26.3.tgz#ab3527b3d5bb25b12f898dfd22165d472dd71b79" + integrity sha512-H7n2zmKEWgOllKkIUkLvFmsJQj062lSm3uA4EYApG8gLuiOM0/go9bIoC3HVaSnfg4xunowDE2i9p8drkXuvDw== dependencies: - busboy "^1.6.0" + "@fastify/busboy" "^2.0.0" union-value@^1.0.0: version "1.0.1" From 90b8581630ba8c15acca259179d1de69d7d1aab5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Oct 2023 16:31:24 +0200 Subject: [PATCH 5/6] Bump @babel/traverse from 7.18.11 to 7.23.2 (#6513) Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.18.11 to 7.23.2. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse) --- updated-dependencies: - dependency-name: "@babel/traverse" dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Junaid <86780488+jdevcs@users.noreply.github.com> --- yarn.lock | 138 ++++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 114 insertions(+), 24 deletions(-) diff --git a/yarn.lock b/yarn.lock index 4956e0e58bd..a7b97e98173 100644 --- a/yarn.lock +++ b/yarn.lock @@ -22,6 +22,14 @@ dependencies: "@babel/highlight" "^7.18.6" +"@babel/code-frame@^7.22.13": + version "7.22.13" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.22.13.tgz#e3c1c099402598483b7a8c46a721d1038803755e" + integrity sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w== + dependencies: + "@babel/highlight" "^7.22.13" + chalk "^2.4.2" + "@babel/compat-data@^7.17.7", "@babel/compat-data@^7.18.8": version "7.18.8" resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.18.8.tgz#2483f565faca607b8535590e84e7de323f27764d" @@ -57,6 +65,16 @@ "@jridgewell/gen-mapping" "^0.3.2" jsesc "^2.5.1" +"@babel/generator@^7.23.0": + version "7.23.0" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.23.0.tgz#df5c386e2218be505b34837acbcb874d7a983420" + integrity sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g== + dependencies: + "@babel/types" "^7.23.0" + "@jridgewell/gen-mapping" "^0.3.2" + "@jridgewell/trace-mapping" "^0.3.17" + jsesc "^2.5.1" + "@babel/helper-compilation-targets@^7.17.7", "@babel/helper-compilation-targets@^7.18.9": version "7.18.9" resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.18.9.tgz#69e64f57b524cde3e5ff6cc5a9f4a387ee5563bf" @@ -84,20 +102,25 @@ resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz#0c0cee9b35d2ca190478756865bb3528422f51be" integrity sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg== -"@babel/helper-function-name@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.18.9.tgz#940e6084a55dee867d33b4e487da2676365e86b0" - integrity sha512-fJgWlZt7nxGksJS9a0XdSaI4XvpExnNIgRP+rVefWh5U7BL8pPuir6SJUmFKRfjWQ51OtWSzwOxhaH/EBWWc0A== +"@babel/helper-environment-visitor@^7.22.20": + version "7.22.20" + resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz#96159db61d34a29dba454c959f5ae4a649ba9167" + integrity sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA== + +"@babel/helper-function-name@^7.23.0": + version "7.23.0" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz#1f9a3cdbd5b2698a670c30d2735f9af95ed52759" + integrity sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw== dependencies: - "@babel/template" "^7.18.6" - "@babel/types" "^7.18.9" + "@babel/template" "^7.22.15" + "@babel/types" "^7.23.0" -"@babel/helper-hoist-variables@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz#d4d2c8fb4baeaa5c68b99cc8245c56554f926678" - integrity sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q== +"@babel/helper-hoist-variables@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz#c01a007dac05c085914e8fb652b339db50d823bb" + integrity sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw== dependencies: - "@babel/types" "^7.18.6" + "@babel/types" "^7.22.5" "@babel/helper-module-imports@^7.18.6": version "7.18.6" @@ -139,16 +162,33 @@ dependencies: "@babel/types" "^7.18.6" +"@babel/helper-split-export-declaration@^7.22.6": + version "7.22.6" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz#322c61b7310c0997fe4c323955667f18fcefb91c" + integrity sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g== + dependencies: + "@babel/types" "^7.22.5" + "@babel/helper-string-parser@^7.18.10": version "7.18.10" resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.18.10.tgz#181f22d28ebe1b3857fa575f5c290b1aaf659b56" integrity sha512-XtIfWmeNY3i4t7t4D2t02q50HvqHybPqW2ki1kosnvWCwuCMeo81Jf0gwr85jy/neUdg5XDdeFE/80DXiO+njw== +"@babel/helper-string-parser@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz#533f36457a25814cf1df6488523ad547d784a99f" + integrity sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw== + "@babel/helper-validator-identifier@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.18.6.tgz#9c97e30d31b2b8c72a1d08984f2ca9b574d7a076" integrity sha512-MmetCkz9ej86nJQV+sFCxoGGrUbU3q02kgLciwkrt9QqEB7cP39oKEY0PakknEO0Gu20SskMRi+AYZ3b1TpN9g== +"@babel/helper-validator-identifier@^7.22.20": + version "7.22.20" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz#c4ae002c61d2879e724581d96665583dbc1dc0e0" + integrity sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A== + "@babel/helper-validator-option@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz#bf0d2b5a509b1f336099e4ff36e1a63aa5db4db8" @@ -172,11 +212,25 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.18.10", "@babel/parser@^7.18.11": +"@babel/highlight@^7.22.13": + version "7.22.20" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.22.20.tgz#4ca92b71d80554b01427815e06f2df965b9c1f54" + integrity sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg== + dependencies: + "@babel/helper-validator-identifier" "^7.22.20" + chalk "^2.4.2" + js-tokens "^4.0.0" + +"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.18.10": version "7.18.11" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.18.11.tgz#68bb07ab3d380affa9a3f96728df07969645d2d9" integrity sha512-9JKn5vN+hDt0Hdqn1PiJ2guflwP+B6Ga8qbDuoF0PzzVhrzsKIJo8yGqVk6CmMHiMei9w1C1Bp9IMJSIK+HPIQ== +"@babel/parser@^7.22.15", "@babel/parser@^7.23.0": + version "7.23.0" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.23.0.tgz#da950e622420bf96ca0d0f2909cdddac3acd8719" + integrity sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw== + "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz#a983fb1aeb2ec3f6ed042a210f640e90e786fe0d" @@ -303,19 +357,28 @@ "@babel/parser" "^7.18.10" "@babel/types" "^7.18.10" -"@babel/traverse@^7.18.10", "@babel/traverse@^7.18.9", "@babel/traverse@^7.7.2": - version "7.18.11" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.18.11.tgz#3d51f2afbd83ecf9912bcbb5c4d94e3d2ddaa16f" - integrity sha512-TG9PiM2R/cWCAy6BPJKeHzNbu4lPzOSZpeMfeNErskGpTJx6trEvFaVCbDvpcxwy49BKWmEPwiW8mrysNiDvIQ== +"@babel/template@^7.22.15": + version "7.22.15" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.22.15.tgz#09576efc3830f0430f4548ef971dde1350ef2f38" + integrity sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w== dependencies: - "@babel/code-frame" "^7.18.6" - "@babel/generator" "^7.18.10" - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-function-name" "^7.18.9" - "@babel/helper-hoist-variables" "^7.18.6" - "@babel/helper-split-export-declaration" "^7.18.6" - "@babel/parser" "^7.18.11" - "@babel/types" "^7.18.10" + "@babel/code-frame" "^7.22.13" + "@babel/parser" "^7.22.15" + "@babel/types" "^7.22.15" + +"@babel/traverse@^7.18.10", "@babel/traverse@^7.18.9", "@babel/traverse@^7.7.2": + version "7.23.2" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.23.2.tgz#329c7a06735e144a506bdb2cad0268b7f46f4ad8" + integrity sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw== + dependencies: + "@babel/code-frame" "^7.22.13" + "@babel/generator" "^7.23.0" + "@babel/helper-environment-visitor" "^7.22.20" + "@babel/helper-function-name" "^7.23.0" + "@babel/helper-hoist-variables" "^7.22.5" + "@babel/helper-split-export-declaration" "^7.22.6" + "@babel/parser" "^7.23.0" + "@babel/types" "^7.23.0" debug "^4.1.0" globals "^11.1.0" @@ -328,6 +391,15 @@ "@babel/helper-validator-identifier" "^7.18.6" to-fast-properties "^2.0.0" +"@babel/types@^7.22.15", "@babel/types@^7.22.5", "@babel/types@^7.23.0": + version "7.23.0" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.23.0.tgz#8c1f020c9df0e737e4e247c0619f58c68458aaeb" + integrity sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg== + dependencies: + "@babel/helper-string-parser" "^7.22.5" + "@babel/helper-validator-identifier" "^7.22.20" + to-fast-properties "^2.0.0" + "@bcoe/v8-coverage@^0.2.3": version "0.2.3" resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" @@ -950,6 +1022,11 @@ resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78" integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w== +"@jridgewell/resolve-uri@^3.1.0": + version "3.1.1" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz#c08679063f279615a3326583ba3a90d1d82cc721" + integrity sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA== + "@jridgewell/set-array@^1.0.0", "@jridgewell/set-array@^1.0.1": version "1.1.2" resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" @@ -968,6 +1045,11 @@ resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24" integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== +"@jridgewell/sourcemap-codec@^1.4.14": + version "1.4.15" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" + integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== + "@jridgewell/trace-mapping@0.3.9": version "0.3.9" resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz#6534fd5933a53ba7cbf3a17615e273a0d1273ff9" @@ -984,6 +1066,14 @@ "@jridgewell/resolve-uri" "^3.0.3" "@jridgewell/sourcemap-codec" "^1.4.10" +"@jridgewell/trace-mapping@^0.3.17": + version "0.3.19" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.19.tgz#f8a3249862f91be48d3127c3cfe992f79b4b8811" + integrity sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw== + dependencies: + "@jridgewell/resolve-uri" "^3.1.0" + "@jridgewell/sourcemap-codec" "^1.4.14" + "@lerna/child-process@6.6.2": version "6.6.2" resolved "https://registry.yarnpkg.com/@lerna/child-process/-/child-process-6.6.2.tgz#5d803c8dee81a4e013dc428292e77b365cba876c" From a0d6730e317ab97fa4983c09880a0a1d01af9b74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamilcan=20=C3=87elik?= <56474929+kmlcnclk@users.noreply.github.com> Date: Mon, 23 Oct 2023 17:35:53 +0300 Subject: [PATCH 6/6] 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 --- CHANGELOG.md | 8 +++++++- packages/web3-eth-abi/CHANGELOG.md | 6 +++++- packages/web3-eth-abi/src/coders/base/array.ts | 2 +- packages/web3-eth-abi/src/coders/base/tuple.ts | 2 +- packages/web3-eth-abi/src/coders/encode.ts | 2 +- 5 files changed, 15 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e4e6ec38695..0dabf072034 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2199,4 +2199,10 @@ If there are any bugs, improvements, optimizations or any new feature proposal f - Dependencies updated -## [Unreleased] \ No newline at end of file +## [Unreleased] + +### Fixed + +#### web3-eth-abi + +- Bug fix of `ERR_UNSUPPORTED_DIR_IMPORT` in ABI (#6535) \ No newline at end of file diff --git a/packages/web3-eth-abi/CHANGELOG.md b/packages/web3-eth-abi/CHANGELOG.md index 5cf1be481b8..a24f03944a9 100644 --- a/packages/web3-eth-abi/CHANGELOG.md +++ b/packages/web3-eth-abi/CHANGELOG.md @@ -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] \ No newline at end of file +## [Unreleased] + +### Fixed + +- Bug fix of `ERR_UNSUPPORTED_DIR_IMPORT` in ABI (#6535) \ No newline at end of file diff --git a/packages/web3-eth-abi/src/coders/base/array.ts b/packages/web3-eth-abi/src/coders/base/array.ts index 26fab5049cd..0c23ac4e287 100644 --- a/packages/web3-eth-abi/src/coders/base/array.ts +++ b/packages/web3-eth-abi/src/coders/base/array.ts @@ -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'; diff --git a/packages/web3-eth-abi/src/coders/base/tuple.ts b/packages/web3-eth-abi/src/coders/base/tuple.ts index 4e086d41e43..89ccff48cf3 100644 --- a/packages/web3-eth-abi/src/coders/base/tuple.ts +++ b/packages/web3-eth-abi/src/coders/base/tuple.ts @@ -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'; diff --git a/packages/web3-eth-abi/src/coders/encode.ts b/packages/web3-eth-abi/src/coders/encode.ts index 254496dfbeb..d0d8260db16 100644 --- a/packages/web3-eth-abi/src/coders/encode.ts +++ b/packages/web3-eth-abi/src/coders/encode.ts @@ -17,7 +17,7 @@ along with web3.js. If not, see . 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, params: unknown[]): string {