Skip to content

Commit 122cd65

Browse files
committed
Documentation.
1 parent 9328ea4 commit 122cd65

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

‎docs/miscellaneous.rst‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,7 @@ The following is the order of precedence for operators, listed in order of evalu
318318
Global Variables
319319
================
320320

321+
- ``abi.decode(bytes encodedData, (...)) returns (...)``: :ref:`ABI <ABI>`-decodes the provided data. The types are given in parentheses as second argument. Example: ``(uint a, uint[2] memory b, bytes memory c) = abi.decode(data, (uint, uint[2], bytes))``
321322
- ``abi.encode(...) returns (bytes)``: :ref:`ABI <ABI>`-encodes the given arguments
322323
- ``abi.encodePacked(...) returns (bytes)``: Performs :ref:`packed encoding <abi_packed_mode>` of the given arguments
323324
- ``abi.encodeWithSelector(bytes4 selector, ...) returns (bytes)``: :ref:`ABI <ABI>`-encodes the given arguments

‎docs/units-and-global-variables.rst‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,10 @@ Block and Transaction Properties
9696

9797
.. index:: abi, encoding, packed
9898

99-
ABI Encoding Functions
100-
----------------------
99+
ABI Encoding and Decoding Functions
100+
-----------------------------------
101101

102+
- ``abi.decode(bytes encodedData, (...)) returns (...)``: ABI-decodes the given data, while the types are given in parentheses as second argument. Example: ``(uint a, uint[2] memory b, bytes memory c) = abi.decode(data, (uint, uint[2], bytes))``
102103
- ``abi.encode(...) returns (bytes)``: ABI-encodes the given arguments
103104
- ``abi.encodePacked(...) returns (bytes)``: Performs :ref:`packed encoding <abi_packed_mode>` of the given arguments
104105
- ``abi.encodeWithSelector(bytes4 selector, ...) returns (bytes)``: ABI-encodes the given arguments starting from the second and prepends the given four-byte selector

0 commit comments

Comments
 (0)