Skip to content

Commit

Permalink
Merge branch '4.x' into 4.x
Browse files Browse the repository at this point in the history
  • Loading branch information
jdevcs authored Jan 19, 2024
2 parents 789f937 + 7b97011 commit e48f2a0
Show file tree
Hide file tree
Showing 27 changed files with 551 additions and 247 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
build:
strategy:
matrix:
node: [18, 16]
node: [18, 20]
name: Build CJS
runs-on: ubuntu-latest
steps:
Expand All @@ -37,7 +37,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [ 18, 16 ]
node: [ 18 ]
steps:
- uses: actions/setup-node@v3
with:
Expand All @@ -54,7 +54,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [ 18, 16 ]
node: [ 18 ]
steps:
- uses: actions/setup-node@v3
with:
Expand Down Expand Up @@ -123,7 +123,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [18, 16]
node: [18, 20]
steps:
- uses: actions/setup-node@v3
with:
Expand All @@ -142,7 +142,7 @@ jobs:
if: ${{ matrix.node == 18 }}

integration:
name: Integration
name: Integration # (ganache with HTTP)
needs: build
runs-on: ubuntu-latest
env:
Expand All @@ -151,9 +151,9 @@ jobs:
strategy:
fail-fast: false
matrix:
node: [18, 16]
backend: ['geth', 'ganache']
mode: ['http', 'ws']
node: [18]
backend: ['ganache']
mode: ['http']
steps:
- uses: actions/setup-node@v3
with:
Expand All @@ -167,7 +167,7 @@ jobs:
shell: bash

e2e-ipc:
name: Integration IPC
name: Integration # (geth with HTTP, IPC & WS)
needs: build
runs-on: ubuntu-latest
env:
Expand All @@ -176,9 +176,9 @@ jobs:
strategy:
fail-fast: false
matrix:
node: [ 18, 16 ]
node: [ 18 ]
backend: [ 'geth' ]
mode: [ 'ipc' ]
mode: [ 'ipc', 'ws', 'http' ]
steps:
- uses: actions/setup-node@v3
with:
Expand All @@ -198,7 +198,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node: [18, 16]
node: [18]
browser: ['electron', 'chrome', 'firefox']
steps:
- uses: actions/setup-node@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e_network_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
INFURA_SEPOLIA_HTTP: ${{ secrets.INFURA_SEPOLIA_HTTP }}
INFURA_MAINNET_HTTP: ${{ secrets.INFURA_MAINNET_HTTP }}
MODE: ${{ matrix.mode }}
TEST_ACCOUNT_ADDRESS: ${{ fromJSON('{"sepolia":"0x0000000000000000000000000000000000000000","mainnet":"0x0000000000000000000000000000000000000000"}')[matrix.network] }}
TEST_ACCOUNT_ADDRESS: ${{ fromJSON('{"sepolia":"0xa127C5E6a7E3600Ac34A9a9928E52521677e7211","mainnet":"0x98AF911164f9d4E0f5983ed114949c3Bfe3ADc9d"}')[matrix.network] }}
ALLOWED_SEND_TRANSACTION: ${{ secrets.E2E_TESTS_ALLOWED_SEND_TRANSACTION }}
TEST_ACCOUNT_PRIVATE_KEY: ${{ secrets.TEST_ACCOUNT_PRIVATE_KEY }}
strategy:
Expand Down
41 changes: 27 additions & 14 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2289,37 +2289,50 @@ If there are any bugs, improvements, optimizations or any new feature proposal f

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

## [Unreleased]
## [4.4.0]

### Added

#### web3


#### web3-eth

- Catch `TransactionPollingTimeoutError` was added to send transaction events (#6623)

#### 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)

### Changed

#### web3-core
#### web3-eth-abi

- Use `AbiError` instead of `Error` for errors at web3-eth-abi (#6641).

#### web3-eth-contract

- Allow the `deploy` function to accept parameters, even when no ABI was provided to the `Contract`(#6635)

#### web3

- Dependencies updated

### Fixed

#### web3-rpc-methods
#### web3-eth-abi

- Fix web3-types import #6590 (#6589)
- Fixed an issue with detecting Uint8Array (#6486)

#### web3-eth-accounts

- Send Transaction config used to be ignored if the passed `common` did not have a `copy()` and the `chainId` was not provided (#6663)
- Fixed an issue with detecting Uint8Array (#6486)

#### web3-eth-contract

- Fix and error that happen when trying to get past events by calling `contract.getPastEvents` or `contract.events.allEvents()`, if there is no matching events. (#6647)
- Fixed: The Contract is not using the context wallet passed if context was passed at constructor. (#6661)

#### web3-utils

- Fix unnecessary array copy when pack encoding (#6553)
- Fixed an issue with detecting Uint8Array (#6486)

#### web3-validator

- Fixed an issue with detecting Uint8Array (#6486)

## [Unreleased]
16 changes: 15 additions & 1 deletion docs/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const packages = [
/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'web3.js',
tagline: 'The ultimate JavaScript library for Ethereum',
tagline: 'Powerful TypeScript libraries for Ethereum interaction and utility functions',
url: 'https://docs.web3js.org',
baseUrl: '/',
onBrokenLinks: 'throw',
Expand Down Expand Up @@ -179,6 +179,20 @@ const config = {
*/
playgroundPosition: 'bottom',
},
image:"https://pbs.twimg.com/profile_images/1746099108937363456/duG_Pqem_400x400.jpg",
metadata: [
{ name: 'keywords', content: 'web3.js, web3, web3js, ethereum, ethereum json rpc, blockchain development, smart contracts, dapps, dApp development' },
{ name: 'description', content: 'Collection of comprehensive TypeScript libraries for Interaction with the Ethereum JSON RPC API and utility functions.' },
{ name: 'og:title', content: 'Web3.js Documentation' },
{ name: 'og:description', content: 'Collection of comprehensive TypeScript libraries for Interaction with the Ethereum JSON RPC API and utility functions.' },
{ name: 'og:type', content: 'website' },
{ name: 'og:url', content: 'https://docs.web3js.org' },
{ name: 'og:image', content: 'https://pbs.twimg.com/profile_images/1746099108937363456/duG_Pqem_400x400.jpg' },
{ name: 'twitter:card', content: 'summary_large_image' },
{ name: 'twitter:title', content: 'Web3.js Documentation' },
{ name: 'twitter:description', content: 'Official documentation for web3.js, the Type/JavaScript library for interacting with the Ethereum blockchain.' },
{ name: 'twitter:image', content: 'https://pbs.twimg.com/profile_images/1746099108937363456/duG_Pqem_400x400.jpg' },
],
}),
};

Expand Down
4 changes: 3 additions & 1 deletion packages/web3-eth-abi/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ Documentation:

- Bug fix of `ERR_UNSUPPORTED_DIR_IMPORT` in ABI (#6535)

## [Unreleased]
## [4.2.0]

### Changed

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

- Fixed an issue with detecting Uint8Array (#6486)

## [Unreleased]
10 changes: 5 additions & 5 deletions packages/web3-eth-abi/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "web3-eth-abi",
"version": "4.1.4",
"version": "4.2.0",
"description": "Web3 module encode and decode EVM in/output.",
"main": "./lib/commonjs/index.js",
"module": "./lib/esm/index.js",
Expand Down Expand Up @@ -43,10 +43,10 @@
},
"dependencies": {
"abitype": "0.7.1",
"web3-errors": "^1.1.3",
"web3-types": "^1.3.0",
"web3-utils": "^4.0.7",
"web3-validator": "^2.0.3"
"web3-errors": "^1.1.4",
"web3-types": "^1.3.1",
"web3-utils": "^4.1.1",
"web3-validator": "^2.0.4"
},
"devDependencies": {
"@humeris/espresso-shot": "^4.0.0",
Expand Down
5 changes: 4 additions & 1 deletion packages/web3-eth-accounts/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,12 @@ Documentation:

- Fixed `recover` function, `v` will be normalized to value 0,1 (#6344)

## [Unreleased]
## [4.1.1]

### Fixed

- Send Transaction config used to be ignored if the passed `common` did not have a `copy()` and the `chainId` was not provided (#6663)
- Fixed an issue with detecting Uint8Array (#6486)

## [Unreleased]

10 changes: 5 additions & 5 deletions packages/web3-eth-accounts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "web3-eth-accounts",
"version": "4.1.0",
"version": "4.1.1",
"description": "Package for managing Ethereum accounts and signing",
"main": "./lib/commonjs/index.js",
"module": "./lib/esm/index.js",
Expand Down Expand Up @@ -61,9 +61,9 @@
"@ethereumjs/rlp": "^4.0.1",
"crc-32": "^1.2.2",
"ethereum-cryptography": "^2.0.0",
"web3-errors": "^1.1.3",
"web3-types": "^1.3.0",
"web3-utils": "^4.0.7",
"web3-validator": "^2.0.3"
"web3-errors": "^1.1.4",
"web3-types": "^1.3.1",
"web3-utils": "^4.1.1",
"web3-validator": "^2.0.4"
}
}
4 changes: 3 additions & 1 deletion packages/web3-eth-contract/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ Documentation:

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

## [Unreleased]
## [4.2.0]

### Changed

Expand All @@ -363,3 +363,5 @@ Documentation:

- Fix and error that happen when trying to get past events by calling `contract.getPastEvents` or `contract.events.allEvents()`, if there is no matching events. (#6647)
- Fixed: The Contract is not using the context wallet passed if context was passed at constructor. (#6661)

## [Unreleased]
12 changes: 6 additions & 6 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.4",
"version": "4.2.0",
"description": "Web3 module to interact with Ethereum smart contracts.",
"main": "./lib/commonjs/index.js",
"module": "./lib/esm/index.js",
Expand Down Expand Up @@ -47,11 +47,11 @@
"dependencies": {
"web3-core": "^4.3.2",
"web3-errors": "^1.1.4",
"web3-eth": "^4.3.1",
"web3-eth-abi": "^4.1.4",
"web3-eth": "^4.4.0",
"web3-eth-abi": "^4.2.0",
"web3-types": "^1.3.1",
"web3-utils": "^4.1.0",
"web3-validator": "^2.0.3"
"web3-utils": "^4.1.1",
"web3-validator": "^2.0.4"
},
"devDependencies": {
"@humeris/espresso-shot": "^4.0.0",
Expand All @@ -67,7 +67,7 @@
"prettier": "^2.7.1",
"ts-jest": "^29.1.1",
"typescript": "^4.7.4",
"web3-eth-accounts": "^4.1.0",
"web3-eth-accounts": "^4.1.1",
"web3-providers-ws": "^4.0.7"
}
}
10 changes: 5 additions & 5 deletions packages/web3-eth-ens/test/integration/ens.events.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ import { ENS } from '../../src';
import { namehash } from '../../src/utils';

import {
getSystemTestAccounts,
getSystemTestProvider,
isWs,
isIpc,
closeOpenConnection,
isSocket,
describeIf,
getSystemTestProviderUrl,
createTempAccount,
} from '../fixtures/system_tests_utils';

import { ENSRegistryAbi } from '../fixtures/ens/abi/ENSRegistry';
Expand Down Expand Up @@ -62,7 +62,6 @@ describeIf(isSocket)('ens events', () => {
const node = namehash('resolver');
const label = sha3('resolver') as string;

let accounts: string[];
let ens: ENS;
let defaultAccount: string;
let accountOne: string;
Expand All @@ -71,9 +70,10 @@ describeIf(isSocket)('ens events', () => {
const addressOne: Address = '0x0000000000000000000000000000000000000001';

beforeAll(async () => {
accounts = await getSystemTestAccounts();

[defaultAccount, accountOne] = accounts;
const acc1 = await createTempAccount();
defaultAccount = acc1.address;
const acc2 = await createTempAccount();
accountOne = acc2.address;

sendOptions = { from: defaultAccount, gas: '10000000' };

Expand Down
10 changes: 5 additions & 5 deletions packages/web3-eth-ens/test/integration/ens.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { namehash } from '../../src/utils';

import {
closeOpenConnection,
getSystemTestAccounts,
createTempAccount,
getSystemTestProvider,
getSystemTestProviderUrl,
isIpc,
Expand Down Expand Up @@ -63,7 +63,6 @@ describe('ens', () => {
const fullDomain = `${subdomain}.${domain}`;
const web3jsName = 'web3js.test';

let accounts: string[];
let ens: ENS;
let defaultAccount: string;
let accountOne: string;
Expand All @@ -72,9 +71,10 @@ describe('ens', () => {
const addressOne: Address = '0x0000000000000000000000000000000000000001';

beforeAll(async () => {
accounts = await getSystemTestAccounts();

[defaultAccount, accountOne] = accounts;
const acc1 = await createTempAccount();
defaultAccount = acc1.address;
const acc2 = await createTempAccount();
accountOne = acc2.address;

sendOptions = { from: defaultAccount, gas: '10000000' };

Expand Down
Loading

0 comments on commit e48f2a0

Please sign in to comment.