Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/4.x' into 6634-fix-if-the-contra…
Browse files Browse the repository at this point in the history
…ct-abi-not-passed-the-types-of-the-contract-constructor-and-the-methods-does-not-accept-parameters
  • Loading branch information
Muhammad-Altabba committed Dec 4, 2023
2 parents 0f9c629 + 5aa8b7f commit 2783778
Show file tree
Hide file tree
Showing 15 changed files with 97 additions and 31 deletions.
36 changes: 36 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2226,6 +2226,7 @@ If there are any bugs, improvements, optimizations or any new feature proposal f
- Dependencies updated

## [4.2.2]

### Added

#### web3-core
Expand Down Expand Up @@ -2253,6 +2254,41 @@ If there are any bugs, improvements, optimizations or any new feature proposal f

- Will populate `data` for transactions in contract for metamask provider instead of `input` (#6534)

## [4.3.0]

### Changed

#### web3-core

- Web3config `contractDataInputFill` has been defaulted to `data`, istead of `input`. (#6622)

#### web3-eth-contracts

- By default, contracts will fill `data` instead of `input` within method calls (#6622)

### Added


#### web3-utils

- `SocketProvider` now contains public function `getPendingRequestQueueSize`, `getSentRequestsQueueSize` and `clearQueues` (#6479)
- Added `safeDisconnect` as a `SocketProvider` method to disconnect only when request queue size and send request queue size is 0 (#6479)
- Add `isContractInitOptions` method (#6555)

#### web3

- Added methods (privateKeyToAddress, parseAndValidatePrivateKey, and privateKeyToPublicKey) to web3.eth.accounts (#6620)

### Fixed

#### web3-rpc-methods

- Fix web3-types import #6590 (#6589)

#### web3-utils

- Fix unecessary array copy when pack encoding (#6553)

## [Unreleased]

### Added
Expand Down
6 changes: 4 additions & 2 deletions packages/web3-core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,10 @@ Documentation:

- Added `isMetaMaskProvider` function to check if provider is metamask (#6534)

## [Unreleased]
## [4.3.2]

### Changed

- Web3config `contractDataInputFill` has been defaulted to `data`, istead of `input`. (#6622)
- Web3config `contractDataInputFill` has been defaulted to `data`, istead of `input`. (#6622)

## [Unreleased]
4 changes: 2 additions & 2 deletions packages/web3-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "web3-core",
"version": "4.3.1",
"version": "4.3.2",
"description": "Web3 core tools for sub-packages. This is an internal package.",
"main": "./lib/commonjs/index.js",
"module": "./lib/esm/index.js",
Expand Down Expand Up @@ -48,7 +48,7 @@
"web3-providers-http": "^4.1.0",
"web3-providers-ws": "^4.0.7",
"web3-types": "^1.3.1",
"web3-utils": "^4.0.7",
"web3-utils": "^4.1.0",
"web3-validator": "^2.0.3"
},
"optionalDependencies": {
Expand Down
8 changes: 7 additions & 1 deletion packages/web3-eth-contract/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -347,9 +347,15 @@ Documentation:

- Will populate `data` for transactions in contract for metamask provider instead of `input` (#6534)

## [4.1.4]

### Changed

- By default, contracts will fill `data` instead of `input` within method calls (#6622)


## [Unreleased]

### Changed

- `contractDataInputFill` has been defaulted to `data`, istead of `input`. (#6622)
- Allow the `deploy` function to accept parameters, even when no ABI was provided to the `Contract`(#6635)
6 changes: 3 additions & 3 deletions packages/web3-eth-contract/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "web3-eth-contract",
"version": "4.1.3",
"version": "4.1.4",
"description": "Web3 module to interact with Ethereum smart contracts.",
"main": "./lib/commonjs/index.js",
"module": "./lib/esm/index.js",
Expand Down Expand Up @@ -45,12 +45,12 @@
"test:e2e:firefox": "npx cypress run --headless --browser firefox --env grep='ignore',invert=true"
},
"dependencies": {
"web3-core": "^4.3.1",
"web3-core": "^4.3.2",
"web3-errors": "^1.1.4",
"web3-eth": "^4.3.1",
"web3-eth-abi": "^4.1.4",
"web3-types": "^1.3.1",
"web3-utils": "^4.0.7",
"web3-utils": "^4.1.0",
"web3-validator": "^2.0.3"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/web3-eth-ens/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,4 +141,4 @@ Documentation:

- Dependencies updated

## [Unreleased]
## [Unreleased]
5 changes: 4 additions & 1 deletion packages/web3-rpc-methods/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,11 @@ Documentation:

- Dependencies updated

## [Unreleased]
## [1.1.4]

### Fixed

- Fix web3-types import #6590 (#6589)

## [Unreleased]

6 changes: 3 additions & 3 deletions packages/web3-rpc-methods/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "web3-rpc-methods",
"version": "1.1.3",
"version": "1.1.4",
"description": "Ethereum RPC methods for Web3 4.x.x",
"main": "./lib/commonjs/index.js",
"module": "./lib/esm/index.js",
Expand Down Expand Up @@ -56,8 +56,8 @@
"typescript": "^4.7.4"
},
"dependencies": {
"web3-core": "^4.3.0",
"web3-types": "^1.3.0",
"web3-core": "^4.3.2",
"web3-types": "^1.3.1",
"web3-validator": "^2.0.3"
}
}
4 changes: 3 additions & 1 deletion packages/web3-utils/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ 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]
## [4.1.0]

### Added

Expand All @@ -180,3 +180,5 @@ Documentation:
### Fixed

- Fix unecessary array copy when pack encoding (#6553)

## [Unreleased]
6 changes: 3 additions & 3 deletions packages/web3-utils/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "web3-utils",
"sideEffects": false,
"version": "4.0.7",
"version": "4.1.0",
"description": "Collection of utility functions used in web3.js.",
"main": "./lib/commonjs/index.js",
"module": "./lib/esm/index.js",
Expand Down Expand Up @@ -64,8 +64,8 @@
},
"dependencies": {
"ethereum-cryptography": "^2.0.0",
"web3-errors": "^1.1.3",
"web3-types": "^1.3.0",
"web3-errors": "^1.1.4",
"web3-types": "^1.3.1",
"web3-validator": "^2.0.3"
}
}
9 changes: 8 additions & 1 deletion packages/web3/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,15 @@ Documentation:

- Dependencies updated ( details are in root changelog )

## [Unreleased]
## [4.3.0]

### Added

- Added methods (privateKeyToAddress, parseAndValidatePrivateKey, and privateKeyToPublicKey) to web3.eth.accounts (#6620)

### Changed

- Dependencies updated

## [Unreleased]

12 changes: 6 additions & 6 deletions packages/web3/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "web3",
"version": "4.2.2",
"version": "4.3.0",
"description": "Ethereum JavaScript API",
"main": "./lib/commonjs/index.js",
"module": "./lib/esm/index.js",
Expand Down Expand Up @@ -60,7 +60,7 @@
"test:blackbox:geth:ws": "./scripts/black_box_test.sh geth ws",
"test:blackbox:infura:http": "./scripts/black_box_test.sh infura http",
"test:blackbox:infura:ws": "./scripts/black_box_test.sh infura ws",
"test:e2e:chrome:stress": "npx cypress run --headless --browser chrome"
"test:e2e:chrome:stress": "npx cypress run --headless --browser chrome"
},
"devDependencies": {
"@truffle/hdwallet-provider": "^2.0.12",
Expand All @@ -83,21 +83,21 @@
"web3-providers-ipc": "^4.0.7"
},
"dependencies": {
"web3-core": "^4.3.1",
"web3-core": "^4.3.2",
"web3-errors": "^1.1.4",
"web3-eth": "^4.3.1",
"web3-eth-abi": "^4.1.4",
"web3-eth-accounts": "^4.1.0",
"web3-eth-contract": "^4.1.3",
"web3-eth-contract": "^4.1.4",
"web3-eth-ens": "^4.0.8",
"web3-eth-iban": "^4.0.7",
"web3-eth-personal": "^4.0.8",
"web3-net": "^4.0.7",
"web3-providers-http": "^4.1.0",
"web3-providers-ws": "^4.0.7",
"web3-rpc-methods": "^1.1.3",
"web3-rpc-methods": "^1.1.4",
"web3-types": "^1.3.1",
"web3-utils": "^4.0.7",
"web3-utils": "^4.1.0",
"web3-validator": "^2.0.3"
}
}
2 changes: 1 addition & 1 deletion packages/web3/src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
/* eslint-disable header/header */ export const Web3PkgInfo = { version: '4.2.2' };
/* eslint-disable header/header */ export const Web3PkgInfo = { version: '4.3.0' };
12 changes: 11 additions & 1 deletion packages/web3/test/e2e/get_proof.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,17 @@ describe(`${getSystemTestBackend()} tests - getProof`, () => {

if (block === 'blockHash' || block === 'blockNumber') {
expect(result).toEqual(expectedProof);
} else {
}
else if(block === 'pending') {
expect(result).toMatchObject({
balance: expect.any(BigInt),
codeHash: expect.any(String),
nonce: expect.any(BigInt),
storageHash: expect.any(String),
storageProof: expect.any(Array<string>),
});
}
else {
expect(result).toMatchObject<AccountObject>({
accountProof: expect.any(Array<string>),
balance: expect.any(BigInt),
Expand Down
10 changes: 5 additions & 5 deletions tools/web3-plugin-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@
"prettier": "^2.7.1",
"ts-jest": "^28.0.7",
"typescript": "^4.7.4",
"web3": "^4.2.1",
"web3-core": "^4.3.0",
"web3": "^4.3.0",
"web3-core": "^4.3.2",
"web3-eth-abi": "^4.1.4",
"web3-eth-contract": "^4.1.2",
"web3-types": "^1.3.0",
"web3-utils": "^4.0.7"
"web3-eth-contract": "^4.1.4",
"web3-types": "^1.3.1",
"web3-utils": "^4.1.0"
},
"peerDependencies": {
"web3-core": ">= 4.1.1 < 5",
Expand Down

0 comments on commit 2783778

Please sign in to comment.