Skip to content

Commit

Permalink
Fix typos in web3-utils.rst (#4662)
Browse files Browse the repository at this point in the history
* Fix typos in web3-utils.rst

* Update changelog for #4662

Co-authored-by: jdevcs <86780488+jdevcs@users.noreply.github.com>
  • Loading branch information
GitHubPang and jdevcs authored Jan 19, 2022
1 parent 1308c3c commit 8a87aef
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,7 @@ Released with 1.0.0-beta.37 code base.

### Fixed
- Fix a typo in the documentation for `methods.myMethod.send` (#4599)
- Fix typos in web3-utils.rst (#4662)
- Added effectiveGasPrice to TransactionReceipt (#4692)
- Correction in documentation for `web3.eth.accounts.signTransaction` (#4576)
- Updated README to include Webpack 5 create-react-app support instructions (#4173)
Expand Down
20 changes: 10 additions & 10 deletions docs/web3-utils.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ The `randomHex <https://github.com/frozeman/randomHex>`_ library to generate cry
Parameters
----------

1. ``size`` - ``Number``: The byte size for the HEX string, e.g. ``32`` will result in a 32 bytes HEX string with 64 characters preficed with "0x".
1. ``size`` - ``Number``: The byte size for the HEX string, e.g. ``32`` will result in a 32 bytes HEX string with 64 characters prefixed with "0x".

-------
Returns
Expand Down Expand Up @@ -152,7 +152,7 @@ Checks if a given value is a `BN.js <https://github.com/indutny/bn.js/>`_ instan
Parameters
----------

1. ``bn`` - ``Object``: An `BN.js <https://github.com/indutny/bn.js/>`_ instance.
1. ``bn`` - ``Object``: A `BN.js <https://github.com/indutny/bn.js/>`_ instance.

-------
Returns
Expand Down Expand Up @@ -269,7 +269,7 @@ sha3Raw
web3.utils.sha3Raw(string)
Will calculate the sha3 of the input but does return the hash value instead of ``null`` if for example a empty string is passed.
Will calculate the sha3 of the input but does return the hash value instead of ``null`` if for example an empty string is passed.

.. note:: Further details about this function can be seen here :ref:`sha3 <utils-sha3>`

Expand Down Expand Up @@ -389,7 +389,7 @@ soliditySha3Raw
Will calculate the sha3 of given input parameters in the same way solidity would.
This means arguments will be ABI converted and tightly packed before being hashed.
The difference between this function and the ``soliditySha3`` function is that it will return the hash value instead of ``null`` if for example a empty string is given.
The difference between this function and the ``soliditySha3`` function is that it will return the hash value instead of ``null`` if for example an empty string is given.


.. note:: Further details about this function can be seen here :ref:`soliditySha3 <utils-soliditysha3>`
Expand Down Expand Up @@ -593,7 +593,7 @@ Parameters
Returns
-------

``Boolean``: ``true`` when the checksum of the address is valid, ``false`` if its not a checksum address, or the checksum is invalid.
``Boolean``: ``true`` when the checksum of the address is valid, ``false`` if it's not a checksum address, or the checksum is invalid.

-------
Example
Expand All @@ -616,7 +616,7 @@ toHex
web3.utils.toHex(mixed)
Will auto convert any given value to HEX.
Number strings will interpreted as numbers.
Number strings will be interpreted as numbers.
Text strings will be interpreted as UTF-8 strings.

----------
Expand Down Expand Up @@ -889,7 +889,7 @@ Returns the ASCII string representation of a given HEX value.
Parameters
----------

1. ``hex`` - ``String``: A HEX string to convert to a ASCII string.
1. ``hex`` - ``String``: A HEX string to convert to an ASCII string.

-------
Returns
Expand Down Expand Up @@ -963,7 +963,7 @@ Returns the HEX representation of a given ASCII string.
Parameters
----------

1. ``string`` - ``String``: A ASCII string to convert to a HEX string.
1. ``string`` - ``String``: An ASCII string to convert to a HEX string.

-------
Returns
Expand Down Expand Up @@ -1136,7 +1136,7 @@ fromWei
web3.utils.fromWei(number [, unit])
Converts any `wei <http://ethereum.stackexchange.com/questions/253/the-ether-denominations-are-called-finney-szabo-and-wei-what-who-are-these-na>`_ value into a `ether value <http://ethdocs.org/en/latest/ether.html>`_.
Converts any `wei <http://ethereum.stackexchange.com/questions/253/the-ether-denominations-are-called-finney-szabo-and-wei-what-who-are-these-na>`_ value into an `ether value <http://ethdocs.org/en/latest/ether.html>`_.

.. note:: "wei" are the smallest ether unit, and you should always make calculations in wei and convert only for display reasons.

Expand Down Expand Up @@ -1377,7 +1377,7 @@ toTwosComplement
web3.utils.toTwosComplement(number)
Converts a negative numer into a two's complement.
Converts a negative number into a two's complement.


----------
Expand Down

0 comments on commit 8a87aef

Please sign in to comment.