Skip to content
This repository has been archived by the owner on Jun 10, 2021. It is now read-only.

specify AbiCoder::encode more precisely #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions source/ethers.js/source/api-advanced.rst
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,11 @@ Prototype
Returns a :ref:`hex string <hexstring>` of the *values* encoded as the *types*.
If names is provided, *values* may contain named keys for tuples, otherwise
each tuple expects an Array. Throws if a value is invalid for the type.

Formally, this returns `enc((values[0], values[1] ... ))` where `enc` is this
`function <https://solidity.readthedocs.io/en/v0.4.25/abi-spec.html#formal-specification-of-the-encoding>`_
defined in the Solidity documentation, and where `values[i]` is an instance of type
`types[i]`.

:sup:`prototype` . decode ( [ names , ] types , data )
Returns an Object by parsing *data* assuming *types*, with each parameter
Expand Down