Эх сурвалжийг харах

docs: fix typos (#1578)

fix some typos in docs.

Signed-off-by: shuoer86 <129674997+shuoer86@users.noreply.github.com>
shuoer86 2 жил өмнө
parent
commit
aaceeb9d86

+ 1 - 1
docs/examples/polkadot/call_chain_extension.sol

@@ -13,7 +13,7 @@ contract Foo {
         assert(ret == 0); // The fetch-random chain extension always returns 0
         assert(ret == 0); // The fetch-random chain extension always returns 0
         bytes32 random = abi.decode(output, (bytes32));
         bytes32 random = abi.decode(output, (bytes32));
 
 
-        print("psuedo random bytes: {}".format(random));
+        print("pseudo random bytes: {}".format(random));
         return random;
         return random;
     }
     }
 }
 }

+ 2 - 2
docs/language/contracts.rst

@@ -175,7 +175,7 @@ be specified here.
 
 
 In this case, contract ``a`` inherits from both ``b`` and ``c``. Both ``func1()`` and ``func2()``
 In this case, contract ``a`` inherits from both ``b`` and ``c``. Both ``func1()`` and ``func2()``
 are visible in contract ``a``, and will be part of its public interface if they are declared ``public`` or
 are visible in contract ``a``, and will be part of its public interface if they are declared ``public`` or
-``external``. In addition, the contract storage variables ``foo`` and ``bar`` are also availabe in ``a``.
+``external``. In addition, the contract storage variables ``foo`` and ``bar`` are also available in ``a``.
 
 
 Inheriting contracts is recursive; this means that if you inherit a contract, you also inherit everything
 Inheriting contracts is recursive; this means that if you inherit a contract, you also inherit everything
 that that contract inherits. In this example, contract ``a`` inherits ``b`` directly, and inherits ``c``
 that that contract inherits. In this example, contract ``a`` inherits ``b`` directly, and inherits ``c``
@@ -205,7 +205,7 @@ Calling function in base contract
 _________________________________
 _________________________________
 
 
 When a virtual function is called, the dispatch is *virtual*. If the function being called is
 When a virtual function is called, the dispatch is *virtual*. If the function being called is
-overriden in another contract, then the overriding function is called. For example:
+overridden in another contract, then the overriding function is called. For example:
 
 
 .. include:: ../examples/base_contract_function_call.sol
 .. include:: ../examples/base_contract_function_call.sol
   :code: solidity
   :code: solidity

+ 1 - 1
docs/language/expressions.rst

@@ -96,7 +96,7 @@ The result of a comparison operator can be assigned to a bool. For example:
 
 
  	bool even = (value % 2) == 0;
  	bool even = (value % 2) == 0;
 
 
-It is not allowed to assign an integer to a bool; an explicit comparision is needed to turn it into
+It is not allowed to assign an integer to a bool; an explicit comparison is needed to turn it into
 a bool.
 a bool.
 
 
 Increment and Decrement operators
 Increment and Decrement operators

+ 4 - 4
docs/language/functions.rst

@@ -187,7 +187,7 @@ what the runtime program uses to determine what function was called. On Polkadot
 function selector is generated using a deterministic hash value of the function
 function selector is generated using a deterministic hash value of the function
 name and the arguments types. On Solana, the selector is known as discriminator.
 name and the arguments types. On Solana, the selector is known as discriminator.
 
 
-The selector value can be overriden with the annotation
+The selector value can be overridden with the annotation
 ``@selector([0xde, 0xad, 0xbe, 0xa1])``.
 ``@selector([0xde, 0xad, 0xbe, 0xa1])``.
 
 
 .. include:: ../examples/polkadot/function_selector_override.sol
 .. include:: ../examples/polkadot/function_selector_override.sol
@@ -196,8 +196,8 @@ The selector value can be overriden with the annotation
 The given example only works for Polkadot, whose selectors are four bytes wide. On Solana, they are eight bytes wide.
 The given example only works for Polkadot, whose selectors are four bytes wide. On Solana, they are eight bytes wide.
 
 
 Only ``public`` and ``external`` functions have a selector, and can have their
 Only ``public`` and ``external`` functions have a selector, and can have their
-selector overriden. On Polkadot, constructors have selectors too, so they
-can also have their selector overriden. If a function overrides another one in a
+selector overridden. On Polkadot, constructors have selectors too, so they
+can also have their selector overridden. If a function overrides another one in a
 base contract, then the selector of both must match.
 base contract, then the selector of both must match.
 
 
 .. warning::
 .. warning::
@@ -284,7 +284,7 @@ reaches ``_;``.
 .. include:: ../examples/polkadot/function_multiple_modifiers.sol
 .. include:: ../examples/polkadot/function_multiple_modifiers.sol
   :code: solidity
   :code: solidity
 
 
-Modifiers can be inherited or declared ``virtual`` in a base contract and then overriden, exactly like
+Modifiers can be inherited or declared ``virtual`` in a base contract and then overridden, exactly like
 functions can be.
 functions can be.
 
 
 .. include:: ../examples/polkadot/function_override_modifiers.sol
 .. include:: ../examples/polkadot/function_override_modifiers.sol

+ 1 - 1
docs/language/statements.rst

@@ -72,7 +72,7 @@ For example, to loop from 0 to 1000 by steps of 100:
 
 
 The declaration ``uint i = 0`` can be omitted if no new variable needs to be declared, and
 The declaration ``uint i = 0`` can be omitted if no new variable needs to be declared, and
 similarly the post increment ``i += 100`` can be omitted if not necessary. The loop condition
 similarly the post increment ``i += 100`` can be omitted if not necessary. The loop condition
-must evaluate to a boolean, or it can be omitted completely. If it is ommited the block must
+must evaluate to a boolean, or it can be omitted completely. If it is omitted the block must
 contain a ``break`` or ``return`` statement, else execution will
 contain a ``break`` or ``return`` statement, else execution will
 repeat infinitely (or until all gas is spent):
 repeat infinitely (or until all gas is spent):
 
 

+ 2 - 2
docs/language/types.rst

@@ -200,7 +200,7 @@ is represented as a ``uint8`` in the ABI. Enum are limited to 256 values.
 An enum can be converted to and from integer, but this requires an explicit cast. The value of an enum
 An enum can be converted to and from integer, but this requires an explicit cast. The value of an enum
 is numbered from 0, like in C and Rust.
 is numbered from 0, like in C and Rust.
 
 
-If enum is declared in another contract, the type can be refered to with `contractname.typename`. The
+If enum is declared in another contract, the type can be referred to with `contractname.typename`. The
 individual enum values are `contractname.typename.value`. The enum declaration does not have to appear
 individual enum values are `contractname.typename.value`. The enum declaration does not have to appear
 in a contract, in which case it can be used without the contract name prefix.
 in a contract, in which case it can be used without the contract name prefix.
 
 
@@ -544,7 +544,7 @@ is used, for example in function arguments or return values.
 .. include:: ../examples/user_defined_type.sol
 .. include:: ../examples/user_defined_type.sol
   :code: solidity
   :code: solidity
 
 
-Note that the wrapped value ``Value v`` cannot be used in any type of arithmetic or comparision. It needs to
+Note that the wrapped value ``Value v`` cannot be used in any type of arithmetic or comparison. It needs to
 be unwrapped before it can be used.
 be unwrapped before it can be used.
 
 
 User Defined Types can be used with :ref:`user defined operators <user_defined_operators>`.
 User Defined Types can be used with :ref:`user defined operators <user_defined_operators>`.