aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2019-01-21 17:42:13 +0800
committerGitHub <noreply@github.com>2019-01-21 17:42:13 +0800
commit606c2b99456c6be4cb1f563edee5286787b67490 (patch)
treecde09416218734e5494d0ea8b36ec43176c36f6b
parentd3270bc31174d6c155314231e07755c4bb055729 (diff)
parentbda0bc8f08883711f48c87d933f2f7d898d3aff0 (diff)
downloaddexon-solidity-606c2b99456c6be4cb1f563edee5286787b67490.tar
dexon-solidity-606c2b99456c6be4cb1f563edee5286787b67490.tar.gz
dexon-solidity-606c2b99456c6be4cb1f563edee5286787b67490.tar.bz2
dexon-solidity-606c2b99456c6be4cb1f563edee5286787b67490.tar.lz
dexon-solidity-606c2b99456c6be4cb1f563edee5286787b67490.tar.xz
dexon-solidity-606c2b99456c6be4cb1f563edee5286787b67490.tar.zst
dexon-solidity-606c2b99456c6be4cb1f563edee5286787b67490.zip
Merge pull request #5816 from esaulpaugh/develop
improve packed encoding test vector
-rw-r--r--docs/abi-spec.rst12
1 files changed, 6 insertions, 6 deletions
diff --git a/docs/abi-spec.rst b/docs/abi-spec.rst
index 68ca8ec4..26293a1f 100644
--- a/docs/abi-spec.rst
+++ b/docs/abi-spec.rst
@@ -611,15 +611,15 @@ Through ``abi.encodePacked()``, Solidity supports a non-standard packed mode whe
This packed mode is mainly used for indexed event parameters.
-As an example, the encoding of ``int8(-1), bytes1(0x42), uint16(0x2424), string("Hello, world!")`` results in:
+As an example, the encoding of ``int16(-1), bytes1(0x42), uint16(0x03), string("Hello, world!")`` results in:
.. code-block:: none
- 0xff42242448656c6c6f2c20776f726c6421
- ^^ int8(-1)
- ^^ bytes1(0x42)
- ^^^^ uint16(0x2424)
- ^^^^^^^^^^^^^^^^^^^^^^^^^^ string("Hello, world!") without a length field
+ 0xffff42000348656c6c6f2c20776f726c6421
+ ^^^^ int16(-1)
+ ^^ bytes1(0x42)
+ ^^^^ uint16(0x03)
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^ string("Hello, world!") without a length field
More specifically:
- Each value type takes as many bytes as its range has.