Skip to content

Commit 4d4a030

Browse files
committed
Minor grammar fixes
1 parent 9f34322 commit 4d4a030

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

docs/abi-spec.rst

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The Contract Application Binary Interface (ABI) is the standard way to interact
1313
from outside the blockchain and for contract-to-contract interaction. Data is encoded according to its type,
1414
as described in this specification. The encoding is not self describing and thus requires a schema in order to decode.
1515

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.
1717
We assume that all contracts will have the interface definitions of any contracts they call available at compile-time.
1818

1919
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
2929
the function. The signature is defined as the canonical expression of the basic prototype without data
3030
location specifier, i.e.
3131
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.
3333

3434
.. note::
3535
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
133133
previous version of the ABI, the number of reads scaled linearly with the total number of dynamic
134134
parameters in the worst case.
135135

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
137137
relocatable, i.e. it only uses relative "addresses".
138138

139139

@@ -252,7 +252,7 @@ Given the contract:
252252
}
253253
254254
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
256256
``true``, we would pass 68 bytes total, which can be broken down into:
257257

258258
- ``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:
597597

598598
.. note::
599599
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
601601
files in the smart contract or are referenced from another smart contract.
602602
For the ABI, only the name of the error itself is relevant and not where it is
603603
defined.
@@ -646,15 +646,15 @@ would result in the JSON:
646646
Handling tuple types
647647
--------------------
648648

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
650650
in the JSON to enable displaying it to the end user. The structure is nested in the following way:
651651

652652
An object with members ``name``, ``type`` and potentially ``components`` describes a typed variable.
653653
The canonical type is determined until a tuple type is reached and the string description up
654654
to that point is stored in ``type`` prefix with the word ``tuple``, i.e. it will be ``tuple`` followed by
655655
a sequence of ``[]`` and ``[k]`` with
656656
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
658658
``indexed`` is not allowed there.
659659

660660
As an example, the code
@@ -738,10 +738,10 @@ Strict Encoding Mode
738738
====================
739739

740740
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
742742
allowed.
743743

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
745745
might enforce strict mode. The Solidity ABI decoder currently does not enforce strict mode, but the encoder
746746
always creates data in strict mode.
747747

@@ -777,7 +777,7 @@ More specifically:
777777
encoding of its elements **with** padding.
778778
- Dynamically-sized types like ``string``, ``bytes`` or ``uint[]`` are encoded
779779
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,
781781
unless it is part of an array or struct (then it is padded to a multiple of
782782
32 bytes).
783783

@@ -805,7 +805,7 @@ Encoding of Indexed Event Parameters
805805
====================================
806806

807807
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
809809
is defined as follows:
810810

811811
- the encoding of a ``bytes`` and ``string`` value is just the string contents

0 commit comments

Comments
 (0)