Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docs #4185

Closed
wants to merge 24 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
c29b932
add nonce to send options.
exx8 May 9, 2021
fb726ab
add nonce to send options.
exx8 May 9, 2021
70e4fda
Update CHANGELOG.md
exx8 May 9, 2021
9139352
linting
exx8 May 12, 2021
a277e69
Merge remote-tracking branch 'origin/1.x' into 1.x
exx8 May 12, 2021
f23e07c
merge
exx8 May 14, 2021
8899f35
updating docs
Jul 21, 2021
ab58050
update web3-shh.rst : whisper-overview broken link (#4170)
starwalker00 Jul 21, 2021
c61a335
[Docs] Fixed a broken link (#4151)
mongolsteppe Jul 21, 2021
9c31732
Possible typo in docs (#4088)
blackblather Jul 21, 2021
46f9f6b
Typically you will have only one Web3 connection, use const (#3967)
fulldecent Jul 21, 2021
33167fc
Removing deprecation notice for HttpProvider (#4008)
evertonfraga Jul 21, 2021
51bf795
[Docs] Updated solidity example to modern syntax (#4147)
mongolsteppe Jul 21, 2021
068d986
Merge branch '1.x' of https://github.com/exx8/web3.js into alex/updat…
Jul 21, 2021
cf32dcf
Update CHANGELOG with next anticipated version
spacesailor24 Jul 21, 2021
1c46aa7
npm i and build for v1.5.0-rc.0
spacesailor24 Jul 21, 2021
fb3af4b
v1.5.0-rc.0
spacesailor24 Jul 21, 2021
4779430
added EIP-2718 and EIP-1559 documentation
Jul 21, 2021
b0ea036
fixing typo
Jul 21, 2021
b650d1a
addressing feedback
Jul 21, 2021
1ad5608
changing possible types for maxPriorityFeePerGas
Jul 21, 2021
086ccd5
updating maxFeePerGas type
Jul 21, 2021
a73c5e9
Merge branch 'release/1.5.0' into alex/update-docs
Jul 21, 2021
a3e2e37
Update CHANGELOG.md
spacesailor24 Jul 21, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -400,10 +400,20 @@ Released with 1.0.0-beta.37 code base.

- Removing the underscore package

## [Unreleased]

## [1.5.0]

### Added

- London transaction support (#4155)

### Changed
- Grammar fix (4088) and updated Swarm (#4151)and Whisper doc links (#4170)
- Removed deprecation notice for HttpProvider (#4008)
- Nonce added to send options in documentation and types (#4052)
- Updated Solidity example to modern syntax (#4147)
- Changing web3 connection example from lets to const (#3967)
- Updated the documentation for the transaction object to include EIP-2718 and EIP-1559 options

## [Unreleased]

## [1.5.1]
24 changes: 12 additions & 12 deletions dist/web3.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/web3.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/callbacks-promises-events.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ To help web3 integrate into all kinds of projects with different standards we pr
Most web3.js objects allow a callback as the last parameter, as well as returning promises to chain functions.

Ethereum as a blockchain has different levels of finality and therefore needs to return multiple "stages" of an action.
To cope with requirement we return a "promiEvent" for functions like ``web3.eth.sendTransaction`` or contract methods.
To cope with this requirement we return a "promiEvent" for functions like ``web3.eth.sendTransaction`` or contract methods.
This "promiEvent" is a promise combined with an event emitter to allow acting on different stages of action on the blockchain, like a transaction.

PromiEvents work like a normal promises with added ``on``, ``once`` and ``off`` functions.
Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ If this property is ``null`` you should connect to a remote/local node.
// In Node.js use: const Web3 = require('web3');
let web3 = new Web3(Web3.givenProvider || "ws://localhost:8545");
const web3 = new Web3(Web3.givenProvider || "ws://localhost:8545");
That's it! now you can use the ``web3`` object.
60 changes: 32 additions & 28 deletions docs/glossary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,47 +51,51 @@ Example

.. code-block:: javascript

pragma solidity ^0.8.4;
contract Test {
uint a;
address d = 0x12345678901234567890123456789012;
address d = 0xdCad3a6d3569DF655070DEd06cb7A1b2Ccd1D3AF;

function Test(uint testInt) { a = testInt;}
constructor(uint testInt) { a = testInt;}

event Event(uint indexed b, bytes32 c);

event Event2(uint indexed b, bytes32 c);

function foo(uint b, bytes32 c) returns(address) {
Event(b, c);
function foo(uint b, bytes32 c) public returns(address) {
emit Event(b, c);
return d;
}
}


// would result in the JSON:
[{
"type":"constructor",
"payable":false,
"stateMutability":"nonpayable"
"inputs":[{"name":"testInt","type":"uint256"}],
},{
"type":"function",
"name":"foo",
"constant":false,
"payable":false,
"stateMutability":"nonpayable",
"inputs":[{"name":"b","type":"uint256"}, {"name":"c","type":"bytes32"}],
"outputs":[{"name":"","type":"address"}]
},{
"type":"event",
"name":"Event",
"inputs":[{"indexed":true,"name":"b","type":"uint256"}, {"indexed":false,"name":"c","type":"bytes32"}],
"anonymous":false
},{
"type":"event",
"name":"Event2",
"inputs":[{"indexed":true,"name":"b","type":"uint256"},{"indexed":false,"name":"c","type":"bytes32"}],
"anonymous":false
}]
[
{
"type": "constructor"
"stateMutability": "nonpayable",
"inputs": [{"internalType":"uint256","name":"testInt","type":"uint256"}],
},
{
"type": "event"
"name": "Event",
"inputs": [{"indexed":true,"internalType":"uint256","name":"b","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"c","type":"bytes32"}],
"anonymous": false,
},
{
"type": "event"
"name": "Event2",
"inputs": [{"indexed":true,"internalType":"uint256","name":"b","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"c","type":"bytes32"}],
"anonymous": false,
},
{
"type": "function"
"name": "foo",
"stateMutability": "nonpayable",
"inputs": [{"internalType":"uint256","name":"b","type":"uint256"},{"internalType":"bytes32","name":"c","type":"bytes32"}],
"outputs": [{"internalType":"address","name":"","type":"address"}],
}
]


------------------------------------------------------------------------------
2 changes: 1 addition & 1 deletion docs/include_package-core.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Value

``Object`` with the following providers:

- ``Object`` - ``HttpProvider``: The HTTP provider is **deprecated**, as it won't work for subscriptions.
- ``Object`` - ``HttpProvider``: HTTP provider, does not support subscriptions.
- ``Object`` - ``WebsocketProvider``: The Websocket provider is the standard for usage in legacy browsers.
- ``Object`` - ``IpcProvider``: The IPC provider is used node.js dapps when running a local node. Gives the most secure connection.

Expand Down
2 changes: 1 addition & 1 deletion docs/web3-bzz.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ web3.bzz


The ``web3-bzz`` package allows you to interact with swarm, the decentralized file store.
For more see the `Swarm Docs <http://swarm-guide.readthedocs.io/en/latest/>`_.
For more see the `Swarm Docs <https://docs.ethswarm.org/docs/>`_.


.. code-block:: javascript
Expand Down
2 changes: 2 additions & 0 deletions docs/web3-eth-contract.rst
Original file line number Diff line number Diff line change
Expand Up @@ -837,6 +837,8 @@ Parameters
* ``gasPrice`` - ``String`` (optional): The gas price in wei to use for this transaction.
* ``gas`` - ``Number`` (optional): The maximum gas provided for this transaction (gas limit).
* ``value`` - ``Number|String|BN|BigNumber``(optional): The value transferred for the transaction in wei.
* ``nonce`` - ``Number`` (optional): the nonce number of transaction

2. ``callback`` - ``Function`` (optional): This callback will be fired first with the "transactionHash", or with an error object as the first argument.

-------
Expand Down
16 changes: 11 additions & 5 deletions docs/web3-eth.rst
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,10 @@ The default hardfork property can be one of the following:
- ``"constantinople"`` - ``String``
- ``"petersburg"`` - ``String``
- ``"istanbul"`` - ``String``
- ``"berlin"`` - ``String``
- ``"london"`` - ``String``

Default is ``"petersburg"``
Default is ``"london"``


-------
Expand All @@ -247,7 +249,7 @@ Example
.. code-block:: javascript

web3.eth.defaultHardfork;
> "petersburg"
> "london"

// set the default block
web3.eth.defaultHardfork = 'istanbul';
Expand Down Expand Up @@ -318,7 +320,7 @@ The default common property does contain the following ``Common`` object:
- ``networkId`` - ``number``: Network ID of the custom chain
- ``chainId`` - ``number``: Chain ID of the custom chain
- ``baseChain`` - ``string``: (optional) ``mainnet``, ``goerli``, ``kovan``, ``rinkeby``, or ``ropsten``
- ``hardfork`` - ``string``: (optional) ``chainstart``, ``homestead``, ``dao``, ``tangerineWhistle``, ``spuriousDragon``, ``byzantium``, ``constantinople``, ``petersburg``, or ``istanbul``
- ``hardfork`` - ``string``: (optional) ``chainstart``, ``homestead``, ``dao``, ``tangerineWhistle``, ``spuriousDragon``, ``byzantium``, ``constantinople``, ``petersburg``, ``istanbul``, ``berlin``, or ``london``


Default is ``undefined``.
Expand Down Expand Up @@ -1419,17 +1421,21 @@ Parameters
- ``value`` - ``Number|String|BN|BigNumber``: (optional) The value transferred for the transaction in :ref:`wei <what-is-wei>`, also the endowment if it's a contract-creation transaction.
- ``gas`` - ``Number``: (optional, default: To-Be-Determined) The amount of gas to use for the transaction (unused gas is refunded).
- ``gasPrice`` - ``Number|String|BN|BigNumber``: (optional) The price of gas for this transaction in :ref:`wei <what-is-wei>`, defaults to :ref:`web3.eth.gasPrice <eth-gasprice>`.
- ``type`` - ``Number|String|BN|BigNumber``: (optional) A positive unsigned 8-bit number between 0 and 0x7f that represents the type of the transaction.
- ``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
- ``maxPriorityFeePerGas`` - ``Number|String|BN`` (optional, defaulted to ``1 Gwei``) The maximum fee per gas to give miners to incentivize them to include the transaction (Priority fee)
- ``accessList`` - ``List of hexstrings`` (optional) a list of addresses and storage keys that the transaction plans to access
- ``data`` - ``String``: (optional) Either a `ABI byte string <http://solidity.readthedocs.io/en/latest/abi-spec.html>`_ containing the data of the function call on a contract, or in the case of a contract-creation transaction the initialisation code.
- ``nonce`` - ``Number``: (optional) Integer of the nonce. This allows to overwrite your own pending transactions that use the same nonce.
- ``chain`` - ``String``: (optional) Defaults to ``mainnet``.
- ``hardfork`` - ``String``: (optional) Defaults to ``petersburg``.
- ``hardfork`` - ``String``: (optional) Defaults to ``london``.
- ``common`` - ``Object``: (optional) The common object
- ``customChain`` - ``Object``: The custom chain properties
- ``name`` - ``string``: (optional) The name of the chain
- ``networkId`` - ``number``: Network ID of the custom chain
- ``chainId`` - ``number``: Chain ID of the custom chain
- ``baseChain`` - ``string``: (optional) ``mainnet``, ``goerli``, ``kovan``, ``rinkeby``, or ``ropsten``
- ``hardfork`` - ``string``: (optional) ``chainstart``, ``homestead``, ``dao``, ``tangerineWhistle``, ``spuriousDragon``, ``byzantium``, ``constantinople``, ``petersburg``, or ``istanbul``
- ``hardfork`` - ``string``: (optional) ``chainstart``, ``homestead``, ``dao``, ``tangerineWhistle``, ``spuriousDragon``, ``byzantium``, ``constantinople``, ``petersburg``, ``istanbul``, ``berlin``, or ``london``

2. ``callback`` - ``Function``: (optional) Optional callback, returns an error object as first parameter and the result as second.

Expand Down
2 changes: 1 addition & 1 deletion docs/web3-shh.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ web3.shh
========


The ``web3-shh`` package allows you to interact with the whisper protocol for broadcasting. For more see `Whisper Overview <https://github.com/ethereum/go-ethereum/wiki/Whisper>`_.
The ``web3-shh`` package allows you to interact with the whisper protocol for broadcasting. For more see `Whisper Overview <https://eth.wiki/concepts/whisper/whisper-overview>`_.


.. code-block:: javascript
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.4.0",
"version": "1.5.0-rc.0",
"lerna": "2.0.0",
"command": {
"init": {
Expand Down
Loading