@@ -13,7 +13,7 @@ The Contract Application Binary Interface (ABI) is the standard way to interact
13
13
from outside the blockchain and for contract-to-contract interaction. Data is encoded according to its type,
14
14
as described in this specification. The encoding is not self describing and thus requires a schema in order to decode.
15
15
16
- We assume the interface functions of a contract are strongly typed, known at compilation time and static.
16
+ We assume that the interface functions of a contract are strongly typed, known at compilation time and static.
17
17
We assume that all contracts will have the interface definitions of any contracts they call available at compile-time.
18
18
19
19
This specification does not address contracts whose interface is dynamic or otherwise known only at run-time.
@@ -29,7 +29,7 @@ first (left, high-order in big-endian) four bytes of the Keccak-256 hash of the
29
29
the function. The signature is defined as the canonical expression of the basic prototype without data
30
30
location specifier, i.e.
31
31
the function name with the parenthesised list of parameter types. Parameter types are split by a single
32
- comma - no spaces are used.
32
+ comma — no spaces are used.
33
33
34
34
.. note ::
35
35
The return type of a function is not part of this signature. In
@@ -133,7 +133,7 @@ The encoding is designed to have the following properties, which are especially
133
133
previous version of the ABI, the number of reads scaled linearly with the total number of dynamic
134
134
parameters in the worst case.
135
135
136
- 2. The data of a variable or array element is not interleaved with other data and it is
136
+ 2. The data of a variable or an array element is not interleaved with other data and it is
137
137
relocatable, i.e. it only uses relative "addresses".
138
138
139
139
@@ -252,7 +252,7 @@ Given the contract:
252
252
}
253
253
254
254
255
- Thus for our ``Foo `` example if we wanted to call ``baz `` with the parameters ``69 `` and
255
+ Thus, for our ``Foo `` example if we wanted to call ``baz `` with the parameters ``69 `` and
256
256
``true ``, we would pass 68 bytes total, which can be broken down into:
257
257
258
258
- ``0xcdcd77c0 ``: the Method ID. This is derived as the first 4 bytes of the Keccak hash of
@@ -597,7 +597,7 @@ Errors look as follows:
597
597
598
598
.. note ::
599
599
There can be multiple errors with the same name and even with identical signature
600
- in the JSON array, for example if the errors originate from different
600
+ in the JSON array; for example, if the errors originate from different
601
601
files in the smart contract or are referenced from another smart contract.
602
602
For the ABI, only the name of the error itself is relevant and not where it is
603
603
defined.
@@ -646,15 +646,15 @@ would result in the JSON:
646
646
Handling tuple types
647
647
--------------------
648
648
649
- Despite that names are intentionally not part of the ABI encoding they do make a lot of sense to be included
649
+ Despite the fact that names are intentionally not part of the ABI encoding, they do make a lot of sense to be included
650
650
in the JSON to enable displaying it to the end user. The structure is nested in the following way:
651
651
652
652
An object with members ``name ``, ``type `` and potentially ``components `` describes a typed variable.
653
653
The canonical type is determined until a tuple type is reached and the string description up
654
654
to that point is stored in ``type `` prefix with the word ``tuple ``, i.e. it will be ``tuple `` followed by
655
655
a sequence of ``[] `` and ``[k] `` with
656
656
integers ``k ``. The components of the tuple are then stored in the member ``components ``,
657
- which is of array type and has the same structure as the top-level object except that
657
+ which is of an array type and has the same structure as the top-level object except that
658
658
``indexed `` is not allowed there.
659
659
660
660
As an example, the code
@@ -738,10 +738,10 @@ Strict Encoding Mode
738
738
====================
739
739
740
740
Strict encoding mode is the mode that leads to exactly the same encoding as defined in the formal specification above.
741
- This means offsets have to be as small as possible while still not creating overlaps in the data areas and thus no gaps are
741
+ This means that offsets have to be as small as possible while still not creating overlaps in the data areas, and thus no gaps are
742
742
allowed.
743
743
744
- Usually, ABI decoders are written in a straightforward way just following offset pointers, but some decoders
744
+ Usually, ABI decoders are written in a straightforward way by just following offset pointers, but some decoders
745
745
might enforce strict mode. The Solidity ABI decoder currently does not enforce strict mode, but the encoder
746
746
always creates data in strict mode.
747
747
@@ -777,7 +777,7 @@ More specifically:
777
777
encoding of its elements **with ** padding.
778
778
- Dynamically-sized types like ``string ``, ``bytes `` or ``uint[] `` are encoded
779
779
without their length field.
780
- - The encoding of ``string `` or ``bytes `` does not apply padding at the end
780
+ - The encoding of ``string `` or ``bytes `` does not apply padding at the end,
781
781
unless it is part of an array or struct (then it is padded to a multiple of
782
782
32 bytes).
783
783
@@ -805,7 +805,7 @@ Encoding of Indexed Event Parameters
805
805
====================================
806
806
807
807
Indexed event parameters that are not value types, i.e. arrays and structs are not
808
- stored directly but instead a keccak256- hash of an encoding is stored. This encoding
808
+ stored directly but instead a Keccak-256 hash of an encoding is stored. This encoding
809
809
is defined as follows:
810
810
811
811
- the encoding of a ``bytes `` and ``string `` value is just the string contents
0 commit comments