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

Commit d446964

Browse files
Merge branch '4.x' into 7143-an-issue-when-calling-a-method-on-diamonds-proxy-contract
2 parents 09b683c + 9b32205 commit d446964

File tree

49 files changed

+721
-325
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+721
-325
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
build:
1515
strategy:
1616
matrix:
17-
node: [18, 20]
17+
node: ['18', '20.17.0']
1818
name: Build CJS
1919
runs-on: ubuntu-latest
2020
steps:
@@ -23,7 +23,7 @@ jobs:
2323
with:
2424
node-version: ${{ matrix.node }}
2525
cache: yarn
26-
- run: yarn install --ignore-scripts
26+
- run: yarn install --ignore-scripts --frozen-lockfile
2727
- run: npx ts-node scripts/init.ts
2828
- run: yarn build:cjs
2929
- uses: actions/cache/save@v4
@@ -165,7 +165,7 @@ jobs:
165165
runs-on: ubuntu-latest
166166
strategy:
167167
matrix:
168-
node: [18, 20]
168+
node: ['18', '20.17.0']
169169
steps:
170170
- uses: actions/setup-node@v4
171171
with:
@@ -176,6 +176,7 @@ jobs:
176176
path: ./
177177
key: web3-${{ matrix.node }}-${{github.sha}}
178178
- run: yarn test:unit
179+
continue-on-error: ${{ matrix.node == '20.17.0' }}
179180
- name: Upload coverage to Codecov
180181
uses: codecov/codecov-action@v3
181182
with:

CHANGELOG.md

Lines changed: 42 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2563,8 +2563,6 @@ If there are any bugs, improvements, optimizations or any new feature proposal f
25632563

25642564
- `getName` reverse resolution
25652565

2566-
## [Unreleased]
2567-
25682566
### Fixed
25692567

25702568
#### web3-eth
@@ -2648,16 +2646,55 @@ If there are any bugs, improvements, optimizations or any new feature proposal f
26482646

26492647
- Remove redundant constructor of contractBuilder (#7150)
26502648

2651-
## [Unreleased]
2649+
2650+
## [4.12.0]
26522651

26532652
### Fixed
26542653

2655-
#### web3-utils
2654+
#### web3-core
2655+
2656+
- `setConfig()` fix for `setMaxListenerWarningThreshold` fix (#5079)
2657+
2658+
#### web3-eth-accounts
26562659

2657-
- Fixed format schema with `oneOf` doesn't work correctly (#7055)
2660+
- Fix `TransactionFactory.registerTransactionType` not working, if there is a version mistatch between `web3-eth` and `web3-eth-accounts` by saving `extraTxTypes` at `globals`. (#7197)
26582661

26592662
### Added
26602663

26612664
#### web3-eth-accounts
26622665

26632666
- Added public function `signMessageWithPrivateKey` (#7174)
2667+
2668+
#### web3-eth-contract
2669+
2670+
- Added `populateTransaction` to the `contract.deploy(...)` properties. (#7197)
2671+
2672+
#### web3-providers-http
2673+
2674+
- Added `statusCode` of response in ResponseError, `statusCode` is optional property in ResponseError.
2675+
2676+
#### web3-rpc-providers
2677+
2678+
- Updated rate limit error of QuickNode provider for HTTP transport
2679+
- Added optional `HttpProviderOptions | SocketOptions` in `Web3ExternalProvider` and `QuickNodeProvider` for provider configs
2680+
2681+
#### web3-errors
2682+
2683+
- Added optional `statusCode` property of response in ResponseError.
2684+
2685+
### Changed
2686+
2687+
#### web3-eth-contract
2688+
2689+
- The returnred properties of `contract.deploy(...)` are structured with a newly created class named `DeployerMethodClass`. (#7197)
2690+
- Add a missed accepted type for the `abi` parameter, at `dataInputEncodeMethodHelper` and `getSendTxParams`. (#7197)
2691+
2692+
## [4.12.1]
2693+
2694+
### Fixed
2695+
2696+
#### web3-eth-accounts
2697+
2698+
- Revert `TransactionFactory.registerTransactionType` if there is a version mistatch between `web3-eth` and `web3-eth-accounts` and fix nextjs problem. (#7216)
2699+
2700+
## [Unreleased]

packages/web3-core/CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,10 @@ Documentation:
227227

228228
- Now when existing packages are added in web3, will be avalible for plugins via context. (#7088)
229229

230-
## [Unreleased]
230+
## [4.5.1]
231231

232232
### Fixed
233233

234234
- `setConfig()` fix for `setMaxListenerWarningThreshold` fix (#5079)
235+
236+
## [Unreleased]

packages/web3-core/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "web3-core",
3-
"version": "4.5.0",
3+
"version": "4.5.1",
44
"description": "Web3 core tools for sub-packages. This is an internal package.",
55
"main": "./lib/commonjs/index.js",
66
"module": "./lib/esm/index.js",
@@ -42,13 +42,13 @@
4242
"test:integration": "jest --config=./test/integration/jest.config.js --passWithNoTests"
4343
},
4444
"dependencies": {
45-
"web3-errors": "^1.2.0",
46-
"web3-eth-accounts": "^4.1.2",
45+
"web3-errors": "^1.3.0",
46+
"web3-eth-accounts": "^4.2.0",
4747
"web3-eth-iban": "^4.0.7",
48-
"web3-providers-http": "^4.1.0",
49-
"web3-providers-ws": "^4.0.7",
48+
"web3-providers-http": "^4.2.0",
49+
"web3-providers-ws": "^4.0.8",
5050
"web3-types": "^1.7.0",
51-
"web3-utils": "^4.3.0",
51+
"web3-utils": "^4.3.1",
5252
"web3-validator": "^2.0.6"
5353
},
5454
"optionalDependencies": {

packages/web3-core/test/config/jest.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,5 @@ module.exports = {
4040
* This can be done programmatically using jest.resetModules().
4141
*/
4242
resetModules: true,
43+
testTimeout: 600000,
4344
};

packages/web3-errors/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,4 +178,10 @@ Documentation:
178178

179179
- Fixed the undefined data in `Eip838ExecutionError` constructor (#6905)
180180

181+
## [1.3.0]
182+
183+
### Added
184+
185+
- Added optional `statusCode` property of response in ResponseError.
186+
181187
## [Unreleased]

packages/web3-errors/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "web3-errors",
3-
"version": "1.2.1",
3+
"version": "1.3.0",
44
"description": "This package has web3 error classes",
55
"main": "./lib/commonjs/index.js",
66
"module": "./lib/esm/index.js",

packages/web3-errors/src/errors/response_errors.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,13 @@ export class ResponseError<ErrorType = unknown, RequestType = unknown> extends B
4545
public code = ERR_RESPONSE;
4646
public data?: ErrorType | ErrorType[];
4747
public request?: JsonRpcPayload<RequestType>;
48+
public statusCode?: number;
4849

4950
public constructor(
5051
response: JsonRpcResponse<unknown, ErrorType>,
5152
message?: string,
5253
request?: JsonRpcPayload<RequestType>,
54+
statusCode?: number
5355
) {
5456
super(
5557
message ??
@@ -66,6 +68,7 @@ export class ResponseError<ErrorType = unknown, RequestType = unknown> extends B
6668
: response?.error?.data;
6769
}
6870

71+
this.statusCode = statusCode;
6972
this.request = request;
7073
let errorOrErrors: JsonRpcError | JsonRpcError[] | undefined;
7174
if (`error` in response) {
@@ -82,7 +85,7 @@ export class ResponseError<ErrorType = unknown, RequestType = unknown> extends B
8285
}
8386

8487
public toJSON() {
85-
return { ...super.toJSON(), data: this.data, request: this.request };
88+
return { ...super.toJSON(), data: this.data, request: this.request, statusCode: this.statusCode };
8689
}
8790
}
8891

packages/web3-errors/test/unit/__snapshots__/errors.test.ts.snap

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ exports[`errors InvalidResponseError should have valid json structure 1`] = `
239239
"message": "Returned error: error message",
240240
"name": "InvalidResponseError",
241241
"request": undefined,
242+
"statusCode": undefined,
242243
}
243244
`;
244245

@@ -316,6 +317,7 @@ exports[`errors ResponseError should have valid json structure with data 1`] = `
316317
"message": "Returned error: error message",
317318
"name": "ResponseError",
318319
"request": undefined,
320+
"statusCode": undefined,
319321
}
320322
`;
321323

@@ -336,6 +338,7 @@ exports[`errors ResponseError should have valid json structure without data 1`]
336338
"message": "Returned error: error message",
337339
"name": "ResponseError",
338340
"request": undefined,
341+
"statusCode": undefined,
339342
}
340343
`;
341344

@@ -357,6 +360,7 @@ exports[`errors ResponseError should include the array of inner errors 1`] = `
357360
"message": "Returned error: error message,error message",
358361
"name": "ResponseError",
359362
"request": undefined,
363+
"statusCode": undefined,
360364
}
361365
`;
362366

packages/web3-eth-abi/test/config/jest.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,5 @@ module.exports = {
4040
* This can be done programmatically using jest.resetModules().
4141
*/
4242
resetModules: true,
43+
testTimeout: 600000,
4344
};

0 commit comments

Comments
 (0)