Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/1.x' into bugfix/#4724
Browse files Browse the repository at this point in the history
# Conflicts:
#	CHANGELOG.md
  • Loading branch information
andreistefanwork committed Jul 7, 2022
2 parents f2f2fe8 + 35d8f7f commit 4d1500e
Show file tree
Hide file tree
Showing 20 changed files with 2,637 additions and 5,573 deletions.
19 changes: 17 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,22 @@ Released with 1.0.0-beta.37 code base.

## [1.7.5]

### Changed
- Replace xhr2-cookies deps to cross-fetch for web3-providers-http (#5085)

### Added
- Documentation details about `maxFeePerGas` and `maxPriorityFeePerGas` (#5121)
- Added `createAccessList` types in web3.eth (#5146)

### Fixed
- Fix typos in web3-eth-accounts.rst & TESTING.md (#5047)
- Fix Promise in Accounts.signTransaction() throwing errors that cannot be caught (#4724)
- Improving `AbstractProvider` interface (#5150)
- Fix typos in web3-eth-accounts.rst & TESTING.md (#5047)
- Fix remove wallet using an index when an account address and address lowercase are equal (#5049)
- Improve README.md & Fix typos (#4848)
- Add optional hex formatting parameter for getTransactionrReceipt (#5153)
- Fix transactionRoot -> transactionsRoot in BlockHeader (#5083)
- Fix Promise in Accounts.signTransaction() throwing errors that cannot be caught (#4724)

### Security
- Updated `got` lib version and fixed other libs using npm audit fix

12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<p align="center">
<img src="assets/logo/web3js.jpg" width="200" alt="web3.js" />
<p style="text-align: center;">
<img src="assets/logo/web3js.jpg" width="200" alt="web3.js">
</p>

# web3.js - Ethereum JavaScript API
Expand Down Expand Up @@ -56,10 +56,10 @@ UNPKG:
```js
// In Node.js
const Web3 = require('web3');

let web3 = new Web3('ws://localhost:8546');
const web3 = new Web3('ws://localhost:8546');
console.log(web3);
> {
// Output
{
eth: ... ,
shh: ... ,
utils: ...,
Expand Down Expand Up @@ -227,7 +227,7 @@ global.process = {
If you are using Ionic/Angular at a version >5 you may run into a build error in which modules `crypto` and `stream` are `undefined`
a work around for this is to go into your node-modules and at `/angular-cli-files/models/webpack-configs/browser.js` change the `node: false` to `node: {crypto: true, stream: true}` as mentioned [here](https://github.com/ethereum/web3.js/issues/2260#issuecomment-458519127)
a workaround for this is to go into your node-modules and at `/angular-cli-files/models/webpack-configs/browser.js` change the `node: false` to `node: {crypto: true, stream: true}` as mentioned [here](https://github.com/ethereum/web3.js/issues/2260#issuecomment-458519127)
Another variation of this problem was an [issue opned on angular-cli](https://github.com/angular/angular-cli/issues/1548)
Expand Down
2 changes: 2 additions & 0 deletions docs/web3-eth-accounts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@ Parameters
- ``data`` - ``String``: (optional) The call data of the transaction, can be empty for simple value transfers.
- ``value`` - ``String``: (optional) The value of the transaction in wei.
- ``gasPrice`` - ``String``: (optional) The gas price set by this transaction, if empty, it will use :ref:`web3.eth.getGasPrice() <eth-gasprice>`
- ``maxFeePerGas`` - ``Number|String|BN``: (optional, defaulted to ``(2 * block.baseFeePerGas) + maxPriorityFeePerGas``) The maximum fee per gas that the transaction is willing to pay in total. If ``gasPrice`` is also set, ``maxFeePerGas`` will be set equal to it, regardless of this value.
- ``maxPriorityFeePerGas`` - ``Number|String|BN`` (optional, defaulted to ``2.5 Gwei``) The maximum fee per gas to give miners to incentivize them to include the transaction (Priority fee). If ``gasPrice`` is also set, ``maxPriorityFeePerGas`` will be set equal to it, regardless of this value.
- ``gas`` - ``String``: The gas provided by the transaction.
- ``chain`` - ``String``: (optional) Defaults to ``mainnet``.
- ``hardfork`` - ``String``: (optional) Defaults to ``berlin``.
Expand Down
29 changes: 23 additions & 6 deletions docs/web3-eth.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1401,7 +1401,8 @@ Parameters
----------

1. ``String`` - The transaction hash.
2. ``Function`` - (optional) Optional callback, returns an error object as first parameter and the result as second.
2. ``String`` - (optional) The ``hex`` keyword can be passed as second argument, in order to format in hex, values that would be ``Number`` otherwise.
3. ``Function`` - (optional) Optional callback, returns an error object as first parameter and the result as second.


.. _eth-gettransactionreceipt-return:
Expand All @@ -1415,16 +1416,16 @@ Returns

- ``status`` - ``Boolean``: ``TRUE`` if the transaction was successful, ``FALSE`` if the EVM reverted the transaction.
- ``blockHash`` 32 Bytes - ``String``: Hash of the block where this transaction was in.
- ``blockNumber`` - ``Number``: Block number where this transaction was in.
- ``blockNumber`` - ``Number`` (or ``hex String``): Block number where this transaction was in.
- ``transactionHash`` 32 Bytes - ``String``: Hash of the transaction.
- ``transactionIndex``- ``Number``: Integer of the transactions index position in the block.
- ``transactionIndex``- ``Number`` (or ``hex String``): Integer of the transactions index position in the block.
- ``from`` - ``String``: Address of the sender.
- ``to`` - ``String``: Address of the receiver. ``null`` when it's a contract creation transaction.
- ``contractAddress`` - ``String``: The contract address created, if the transaction was a contract creation, otherwise ``null``.
- ``cumulativeGasUsed`` - ``Number``: The total amount of gas used when this transaction was executed in the block.
- ``gasUsed`` - ``Number``: The amount of gas used by this specific transaction alone.
- ``cumulativeGasUsed`` - ``Number`` (or ``hex String``): The total amount of gas used when this transaction was executed in the block.
- ``gasUsed`` - ``Number`` (or ``hex String``): The amount of gas used by this specific transaction alone.
- ``logs`` - ``Array``: Array of log objects, which this transaction generated.
- ``effectiveGasPrice`` - ``Number``: The actual value per gas deducted from the senders account. Before EIP-1559, this is equal to the transaction's gas price. After, it is equal to baseFeePerGas + min(maxFeePerGas - baseFeePerGas, maxPriorityFeePerGas).
- ``effectiveGasPrice`` - ``Number`` (or ``hex String``): The actual value per gas deducted from the senders account. Before EIP-1559, this is equal to the transaction's gas price. After, it is equal to baseFeePerGas + min(maxFeePerGas - baseFeePerGas, maxPriorityFeePerGas).

-------
Example
Expand All @@ -1449,6 +1450,22 @@ Example
}, ...]
}
var receipt = web3.eth.getTransactionReceipt('0x9fc76417374aa880d4449a1f7f31ec597f00b1f6f3dd2d66f4c9c6c445836d8b','hex')
.then(console.log);
> {
"status": true,
"transactionHash": "0x9fc76417374aa880d4449a1f7f31ec597f00b1f6f3dd2d66f4c9c6c445836d8b",
"transactionIndex": '0x0',
"blockHash": "0xef95f2f1ed3ca60b048b4bf67cde2195961e0bba6f70bcbea9a2c4e133e34b46",
"blockNumber": '0x3',
"contractAddress": "0x11f4d0A3c12e86B4b5F39B213F7E19D048276DAe",
"cumulativeGasUsed": '0x4cb2f',
"gasUsed": '0x761a',
"logs": [{
// logs as returned by getPastLogs, etc.
}, ...]
}
------------------------------------------------------------------------------

Expand Down
Loading

0 comments on commit 4d1500e

Please sign in to comment.