Skip to content

Commit

Permalink
Merge branch '4.x' into 6003-disconnect-in-eip1193-provider-must-emit…
Browse files Browse the repository at this point in the history
…-providerrpcerror
  • Loading branch information
Muhammad-Altabba authored Jun 28, 2023
2 parents dc08920 + d12dc7e commit 878c5dc
Show file tree
Hide file tree
Showing 51 changed files with 1,057 additions and 134 deletions.
106 changes: 103 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -1592,18 +1592,118 @@ Detailed List of changes are mentioned under:

If there are any bugs, improvements, optimizations or any new feature proposal feel free to create github issue, or post a pull request for contributions.

## [Unreleased]
## [4.0.2]

### Fixed

#### web3

- Fixed bug #6185, now web3.js compiles on typescript v5 (#6195)
- Fixed #6162 @types/ws issue (#6205)

#### web3-core

- Fixed Batch requests erroring out on one request (#6164)
- Fixed the issue: Subscribing to multiple blockchain events causes every listener to be fired for every registered event (#6210)
- Fixed the issue: Unsubscribe at a Web3Subscription class will still have the id of the subscription at the Web3SubscriptionManager (#6210)
- Fixed the issue: A call to the provider is made for every subscription object (#6210)

#### web3-eth-abi

- Support for "decoding" indexed string event arguments (returns the keccak256 hash of the string value instead of the actual string value) (#6167)

#### web3-eth-accounts

- Fixed "The `r` and `s` returned by `signTransaction` to does not always consist of 64 characters #6207" (#6216)

#### web3-eth-contract

- Event filtering using non-indexed and indexed string event arguments (#6167)

#### web3-eth-types
#### web3-eth-ens

- Fixed bug #6185, now web3.js compiles on typescript v5 (#6195)

#### web3-providers-ws

- Fixed #6162 @types/ws issue (#6205)

#### web3-types

- Fixed bug #6185, now web3.js compiles on typescript v5 (#6195)

### Added

#### web3

- Exported `Web3Context`, `Web3PluginBase`, `Web3EthPluginBase` from `'web3-core'`, and `Web3Validator` from `'web3-validator'` (#6165)

#### web3-core

- Web3Subscription constructor accept a Subscription Manager (as an alternative to accepting Request Manager that is now marked marked as deprecated) (#6210)

#### web3-types

- Added the `SimpleProvider` interface which has only `request(args)` method that is compatible with EIP-1193 (#6210)
- Added the `Eip1193EventName` type that contains the possible events names according to EIP-1193 (#6210)

### Changed

#### web3-core

- Web3Subscription constructor overloading that accept a Request Manager is marked as deprecated (#6210)

#### web3-errors

- Dependencies updated

#### web3-eth

- Dependencies updated

#### web3-eth-iban

- Dependencies updated

#### web3-eth-personal

- Dependencies updated

#### web3-net

- Dependencies updated

#### web3-providers-http

- Dependencies updated

#### web3-providers-ipc

- Dependencies updated

#### web3-rpc-methods

- Dependencies updated

#### web3-types

- The `EIP1193Provider` class has now all the events (for `on` and `removeListener`) according to EIP-1193 (#6210)

#### web3-utils

- Dependencies updated

#### web3-validator

- Dependencies updated

## [Unreleased]


#### web3-utils

- BigInts pass validation within the method `numberToHex` (#6206)

#### web3-rpc-methods

- Receive fragment type added (#6204)
- Rpc method `getPastLogs` accept blockHash as a parameter https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs (#6181)
201 changes: 201 additions & 0 deletions fixtures/build/NegativeNumbers.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
{
"abi": [
{
"inputs": [
{
"internalType": "int256",
"name": "number",
"type": "int256"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "int256",
"name": "one",
"type": "int256"
}
],
"name": "OneNegativeNumber",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "int256",
"name": "one",
"type": "int256"
}
],
"name": "OneNegativeNumberIndexed",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "positive",
"type": "uint256"
},
{
"indexed": false,
"internalType": "int256",
"name": "negative",
"type": "int256"
},
{
"indexed": false,
"internalType": "string",
"name": "str",
"type": "string"
}
],
"name": "OtherNegativeNumbers",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "uint256",
"name": "positive",
"type": "uint256"
},
{
"indexed": true,
"internalType": "int256",
"name": "negative",
"type": "int256"
},
{
"indexed": false,
"internalType": "string",
"name": "str",
"type": "string"
}
],
"name": "OtherNegativeNumbersIndexed",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "int256",
"name": "one",
"type": "int256"
},
{
"indexed": false,
"internalType": "int256",
"name": "two",
"type": "int256"
}
],
"name": "TwoNegativeNumbers",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "int256",
"name": "one",
"type": "int256"
},
{
"indexed": true,
"internalType": "int256",
"name": "two",
"type": "int256"
}
],
"name": "TwoNegativeNumbersIndexed",
"type": "event"
},
{
"inputs": [
{
"internalType": "int256",
"name": "number",
"type": "int256"
}
],
"name": "oneNegativeNumber",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "int256",
"name": "number",
"type": "int256"
},
{
"internalType": "int256",
"name": "number2",
"type": "int256"
},
{
"internalType": "string",
"name": "str",
"type": "string"
}
],
"name": "otherNegativeNumbers",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "storedNegativeNumber",
"outputs": [
{
"internalType": "int256",
"name": "",
"type": "int256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "int256",
"name": "number",
"type": "int256"
},
{
"internalType": "int256",
"name": "number2",
"type": "int256"
}
],
"name": "twoNegativeNumbers",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"evm": {
"bytecode": {
"object": "608060405234801561001057600080fd5b506040516105b93803806105b98339818101604052810190610032919061007a565b80600081905550506100a7565b600080fd5b6000819050919050565b61005781610044565b811461006257600080fd5b50565b6000815190506100748161004e565b92915050565b6000602082840312156100905761008f61003f565b5b600061009e84828501610065565b91505092915050565b610503806100b66000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c806309872ebc1461005157806310e9b2b41461006f5780634a299b871461008b5780636119780b146100a7575b600080fd5b6100596100c3565b6040516100669190610232565b60405180910390f35b61008960048036038101906100849190610283565b6100c9565b005b6100a560048036038101906100a09190610315565b610130565b005b6100c160048036038101906100bc9190610389565b6101ae565b005b60005481565b7f5b53dc4e9e8fa2416d4e172bdad04be5a6d622643bc9ef45987b2caadd0d0c95816040516100f89190610232565b60405180910390a1807f33e7dccd3899498f4408d6468e5dfad650f32574dba2ec4f13399a82e62166d560405160405180910390a250565b7f2e1fb99ee1b27b6491b2d46a54ac8daca82f2da6810e4b8eed4d634f78fa6948848484846040516101659493929190610440565b60405180910390a182847f0e29b573959c1b6ffd5e16886385ec1732e187cc5ac10e8faceb5e02a1c7b50b84846040516101a0929190610480565b60405180910390a350505050565b7ffaa997e4b16dcde196bbb99868e16fa934a0b4c1f019e494d9fbffb5abc46fc282826040516101df9291906104a4565b60405180910390a180827f0204c97becd72594486cf753e30e8acfc9951ee663e404bc858e3d10b80da99b60405160405180910390a35050565b6000819050919050565b61022c81610219565b82525050565b60006020820190506102476000830184610223565b92915050565b600080fd5b600080fd5b61026081610219565b811461026b57600080fd5b50565b60008135905061027d81610257565b92915050565b6000602082840312156102995761029861024d565b5b60006102a78482850161026e565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083601f8401126102d5576102d46102b0565b5b8235905067ffffffffffffffff8111156102f2576102f16102b5565b5b60208301915083600182028301111561030e5761030d6102ba565b5b9250929050565b6000806000806060858703121561032f5761032e61024d565b5b600061033d8782880161026e565b945050602061034e8782880161026e565b935050604085013567ffffffffffffffff81111561036f5761036e610252565b5b61037b878288016102bf565b925092505092959194509250565b600080604083850312156103a05761039f61024d565b5b60006103ae8582860161026e565b92505060206103bf8582860161026e565b9150509250929050565b6000819050919050565b6103dc816103c9565b82525050565b600082825260208201905092915050565b82818337600083830152505050565b6000601f19601f8301169050919050565b600061041f83856103e2565b935061042c8385846103f3565b61043583610402565b840190509392505050565b600060608201905061045560008301876103d3565b6104626020830186610223565b8181036040830152610475818486610413565b905095945050505050565b6000602082019050818103600083015261049b818486610413565b90509392505050565b60006040820190506104b96000830185610223565b6104c66020830184610223565b939250505056fea26469706673582212203eb052901c785465d43fe463b8123363abc0767d1df3b47a9c4cdc319870d8c264736f6c634300080d0033"
}
}
}
Loading

0 comments on commit 878c5dc

Please sign in to comment.