Merge branch 'fix-doc-typos' of git://github.com/yuetloo/ethers.js into yuetloo-fix-doc-typos
This commit is contained in:
commit
a0278615a4
@ -14,7 +14,7 @@ These API keys are a provided as a community resource by the backend services
|
||||
for low-traffic projects and for early prototyping.
|
||||
|
||||
Since these API keys are shared by all users (that have not acquired their
|
||||
own API key), they are aggressively throttled which means reties occur more
|
||||
own API key), they are aggressively throttled which means retries occur more
|
||||
frequently and the responses are slower.
|
||||
|
||||
It is **highly recommended** that you sign up for a free API key from each service for their
|
||||
|
@ -24,7 +24,7 @@ _subsection: Methods @<ContractFactory--methods>
|
||||
|
||||
_property: contractFactory.attach(address) => [[Contract]] @<ContractFactory-attach>
|
||||
|
||||
Return an instance of a [[Contract]] attched to //address//. This is the
|
||||
Return an instance of a [[Contract]] attached to //address//. This is the
|
||||
same as using the [Contract constructor](Contract--creating) with
|
||||
//address// and this the the //interface// and //signerOrProvider// passed
|
||||
in when creating the ContractFactory.
|
||||
@ -37,7 +37,7 @@ to the Contract's constructor.
|
||||
_property: contractFactory.deploy(...args) => Promise<[[Contract]]> @<ContractFactory-deploy>
|
||||
|
||||
Uses the signer to deploy the Contract with //args// passed into the constructor and
|
||||
retruns a Contract which is attached to the address where this contract **will** be
|
||||
returns a Contract which is attached to the address where this contract **will** be
|
||||
deployed once the transaction is mined.
|
||||
|
||||
The transaction can be found at ``contract.deployTransaction``, and no interactions
|
||||
|
@ -17,7 +17,7 @@ Generates a brain wallet, with a slightly improved experience, in which
|
||||
the generated wallet has a mnemonic.
|
||||
|
||||
_property: BrainWallet.generateLegacy(username, password [ , progressCallback ]) => [[experimental-brainwallet]]
|
||||
Generate a brain wallet which is compatibile with the ethers v3 and earlier.
|
||||
Generate a brain wallet which is compatible with the ethers v3 and earlier.
|
||||
|
||||
|
||||
_subsection: EIP1193Bridge @<experimental-eip1193bridge> @INHERIT<[[link-npm-events]]>
|
||||
|
@ -26,7 +26,7 @@ Create a formatted output of an array of [[asm-operation]].
|
||||
|
||||
_heading: Bytecode @<asm-bytecode> @INHERIT<Array\<[[asm-operation]]\>>
|
||||
|
||||
Each arary index represents an operation, collapsing multi-byte operations
|
||||
Each array index represents an operation, collapsing multi-byte operations
|
||||
(i.e. ``PUSH``) into a single operation.
|
||||
|
||||
_property: bytecode.getOperation(offset) => [[asm-operation]]
|
||||
@ -52,7 +52,7 @@ If the opcode is a ``PUSH``, this is the value of that push
|
||||
_subsection: Opcode @<asm-opcode> @SRC<asm/opcodes:class.Opcode>
|
||||
|
||||
_property: asm.Opcode.from(valueOrMnemonic) => [[asm-opcode]]
|
||||
Create a new instnace of an Opcode for a given numeric value
|
||||
Create a new instance of an Opcode for a given numeric value
|
||||
(e.g. 0x60 is PUSH1) or mnemonic string (e.g. "PUSH1").
|
||||
|
||||
_heading: Properties
|
||||
|
@ -49,7 +49,7 @@ string of a decimal number.
|
||||
|
||||
_property: literalNode.verbatim => boolean
|
||||
This is true in a [[asm-datanode]] context, since in that case the
|
||||
value should be taken verbatim and no ``PUSH`` operation shoud be
|
||||
value should be taken verbatim and no ``PUSH`` operation should be
|
||||
added, otherwise false.
|
||||
|
||||
|
||||
@ -96,7 +96,7 @@ any output assembly, using the ``{{! code here }}`` syntax.
|
||||
|
||||
_property: literalNode.verbatim => boolean
|
||||
This is true in a [[asm-datanode]] context, since in that case the
|
||||
value should be taken verbatim and no ``PUSH`` operation shoud be
|
||||
value should be taken verbatim and no ``PUSH`` operation should be
|
||||
added, otherwise false.
|
||||
|
||||
_property: evaluationNode.script => string
|
||||
|
@ -1,9 +1,9 @@
|
||||
_section: Ethers ASM Dialect @<asm-dialect>
|
||||
|
||||
This provides a quick, high-level overcview of the **Ethers ASM Dialect**
|
||||
This provides a quick, high-level overview of the **Ethers ASM Dialect**
|
||||
for EVM, which is defined by the [Ethers ASM Dialect Grammar](link-ethers-asm-grammar)
|
||||
|
||||
Once a program is compiled by a higher level langauge into ASM (assembly),
|
||||
Once a program is compiled by a higher level language into ASM (assembly),
|
||||
or hand-coded directly in ASM, it needs to be assembled into bytecode.
|
||||
|
||||
The assembly process performs a very small set of operations and is
|
||||
@ -34,7 +34,7 @@ A **Label** is a position in the program which can be jumped to. A
|
||||
``JUMPDEST`` is automatically added to this point in the assembled
|
||||
output.
|
||||
|
||||
@TODO: Exmaples
|
||||
@TODO: Examples
|
||||
|
||||
|
||||
_subsection: Literals @<asm-dialect-literal>
|
||||
@ -45,7 +45,7 @@ operation.
|
||||
A **Literal** can be provided using a [[DataHexString]] or a decimal
|
||||
byte value.
|
||||
|
||||
@TODO: exmples
|
||||
@TODO: examples
|
||||
|
||||
|
||||
_subsection: Comments @<asm-dialect-comment>
|
||||
@ -64,7 +64,7 @@ within a **deployment bytecode**, which can be used as **init code**.
|
||||
When deploying a program to Ethereum, an **init transaction** is used. An
|
||||
//init transaction// has a null ``to`` address and contains bytecode in
|
||||
the ``data``. This ``data`` bytecode is a program, that when executed
|
||||
returns some other bytecode as a result, this restul is the bytecode
|
||||
returns some other bytecode as a result, this result is the bytecode
|
||||
to be installed.
|
||||
|
||||
Therefore it is important that embedded code uses jumps relative to itself,
|
||||
@ -84,7 +84,7 @@ _subsection: Data Segment @<asm-dialect-datasegment>
|
||||
A **Data Segment** allows arbitrary data to be embedded into a program,
|
||||
which can be useful for lookup tables or deploy-time constants.
|
||||
|
||||
An emtpty **Data Segment** can also be used when a labelled location is
|
||||
An empty **Data Segment** can also be used when a labelled location is
|
||||
required, but without the ``JUMPDEST`` which a [[asm-dialect-label]] adds.
|
||||
|
||||
@TODO: Example
|
||||
@ -111,5 +111,5 @@ _subsection: Stack Placeholders @<asm-dialect-placeholder>
|
||||
@TODO: exampl
|
||||
|
||||
|
||||
_subsection: Evaluation and Excution @<asm-dialect-scripting>
|
||||
_subsection: Evaluation and Execution @<asm-dialect-scripting>
|
||||
|
||||
|
@ -11,7 +11,7 @@ It uses a quorum and connects to multiple [Providers](Provider) as backends,
|
||||
each configured with a //priority// and a //weight// .
|
||||
|
||||
When a request is made, the request is dispatched to multiple backends, randomly
|
||||
choosen (higher prioirty backends are always selected first) and the results from
|
||||
chosen (higher priority backends are always selected first) and the results from
|
||||
each are compared against the others. Only once the quorum has been reached will that
|
||||
result be accepted and returned to the caller.
|
||||
|
||||
@ -41,7 +41,7 @@ The provider for this configuration.
|
||||
|
||||
_property: fallbackProviderConfig.priority => number
|
||||
The priority used for the provider. Higher priorities are favoured over lower
|
||||
priorities. If multiple providers share the same prioirty, they are choosen
|
||||
priorities. If multiple providers share the same prioirty, they are chosen
|
||||
at random.
|
||||
|
||||
_property: fallbackProviderConfig.stallTimeout => number
|
||||
@ -96,7 +96,7 @@ The URL to use for the JsonRpcProvider instance.
|
||||
_subsection: Web3Provider @<Web3Provider> @INHERIT<[[JsonRpcProvider]]> @SRC<providers:class.Web3Provider>
|
||||
|
||||
The Web3Provider is meant to ease moving from a [web3.js based](link-web3)
|
||||
application to ethers by wraping an existing Web3-compatible (such as a
|
||||
application to ethers by wrapping an existing Web3-compatible (such as a
|
||||
[Web3HttpProvider](link-web3-http), [Web3IpcProvider](link-web3-ipc) or
|
||||
[Web3WsProvider](link-web3-ws)) and exposing it as an ethers.js [[Provider]]
|
||||
which can then be used with the rest of the library.
|
||||
|
@ -26,10 +26,10 @@ A **Networkish** may be any of the following:
|
||||
- the name of a common network as a string (e.g. ``"homestead"``)
|
||||
- the chain ID a network as a number; if the chain ID is that of a
|
||||
common network, the ``name`` and ``ensAddress`` will be populated, otherwise,
|
||||
the deafults name ``"unknown"`` and no ``ensAddress`` is used
|
||||
the default name ``"unknown"`` and no ``ensAddress`` is used
|
||||
|
||||
_subsection: Network @<providers-Network>
|
||||
A **Network** represents an Etherem network.
|
||||
A **Network** represents an Ethereum network.
|
||||
|
||||
_property: network.name => string
|
||||
The human-readable name of the network, such as ``homestead``. If the network
|
||||
@ -273,7 +273,7 @@ The amount of gas actually used by this transaction.
|
||||
|
||||
_property: receipt.logsBloom => string<[[DataHexString]]>
|
||||
A [bloom-filter](link-wiki-bloomfilter), which
|
||||
incldues all the addresses and topics included in any log in this
|
||||
includes all the addresses and topics included in any log in this
|
||||
transaction.
|
||||
|
||||
_property: receipt.blockHash => string<[[DataHexString]]<32>>
|
||||
|
@ -12,7 +12,7 @@ _subsection: Creating Instance @<AbiCoder--creating>
|
||||
|
||||
For the most part, there should never be a need to manually create
|
||||
an instance of an [[AbiCoder]], since one is created with the
|
||||
default coersion function when the library is loaded which can
|
||||
default coercion function when the library is loaded which can
|
||||
be used universally.
|
||||
|
||||
This is likely only needed by those with specific needs to override
|
||||
|
@ -212,7 +212,7 @@ to parameters which are part of an [[EventFragment]].
|
||||
_property: paramType.arrayChildren => [[ParamType]] @<ParamType-arrayChildren>
|
||||
|
||||
The type of children of the array. This is null for for any parameter
|
||||
wjhich is not an array.
|
||||
which is not an array.
|
||||
|
||||
_property: paramType.arrayLength => number @<ParamType-arrayLength>
|
||||
|
||||
|
@ -4,7 +4,7 @@ The **Interface** Class abstracts the encoding and decoding required
|
||||
to interact with contracts on the Ethereum network.
|
||||
|
||||
Many of the standards organically evolved along side the [[link-solidity]]
|
||||
language, which other languages have adopted to remain compatibile with
|
||||
language, which other languages have adopted to remain compatible with
|
||||
existing deployed contracts.
|
||||
|
||||
The EVM itself does not understand what the ABI is. It is simply an agreed
|
||||
|
@ -17,7 +17,7 @@ _heading: BigNumberish @<BigNumberish>
|
||||
|
||||
Many functions and methods in this library take in values which
|
||||
can be non-ambiguously and safely converted to a BigNumber. These
|
||||
values can be sepcified as:
|
||||
values can be specified as:
|
||||
|
||||
_definition: **//string//**
|
||||
A [[HexString]] or a decimal string, either of which may
|
||||
@ -232,7 +232,7 @@ mathematical operations handled safely.
|
||||
_heading: Why not BigNumber.js, BN.js, BigDecimal, etc?
|
||||
|
||||
Everyone has their own favourite Big Number library, and once someone
|
||||
has choosen one, it becomes part of their identity, like their editor,
|
||||
has chosen one, it becomes part of their identity, like their editor,
|
||||
vi vs emacs. There are over 100 Big Number libraries on [npm](link-npm-query-bignumber).
|
||||
|
||||
One of the biggest differences between the Ethers [[BigNumber]] object and
|
||||
@ -246,7 +246,7 @@ low-level library's objects which supports myriad in-place operations.
|
||||
Second, the Ethers [[BigNumber]] provides all the functionality required
|
||||
internally and should generally be sufficient for most developers while
|
||||
not exposing some of the more advanced and rare functionality. So it will
|
||||
be eaiser to swap out the underlying library without impacting consumers.
|
||||
be easier to swap out the underlying library without impacting consumers.
|
||||
|
||||
For example, if [[link-npm-bnjs]] was exposed, someone may use the
|
||||
greatest-common-denominator functions, which would then be functionality
|
||||
|
@ -25,7 +25,7 @@ binary data as a string.
|
||||
_heading: HexString @<HexString>
|
||||
|
||||
A **Hexstring** is a string which has a ``0x`` prefix followed by any
|
||||
number of nibbles (i.e. case-insensitive hexidecumal characters, ``0-9`` and ``a-f``).
|
||||
number of nibbles (i.e. case-insensitive hexadecimal characters, ``0-9`` and ``a-f``).
|
||||
|
||||
_heading: Signature @<Signature>
|
||||
|
||||
@ -37,7 +37,7 @@ _heading: Signature @<Signature>
|
||||
_heading: Raw Signature @<signature-raw> @inherit<string\<[[DataHexString]]\<65\>\>>
|
||||
|
||||
A **Raw Signature** is a common Signature format where the r, s and v are
|
||||
concanenated into a 65 byte (130 nibble) [[DataHexString]].
|
||||
concatenated into a 65 byte (130 nibble) [[DataHexString]].
|
||||
|
||||
|
||||
_heading: SignatureLike @<SignatureLike>
|
||||
@ -112,7 +112,7 @@ _property: ethers.utils.stripZeros(aBytesLike) => Uint8Array @<utils-stripZeros
|
||||
Returns a Uint8Array with all leading ``0`` bytes of //aBtyesLike// removed.
|
||||
|
||||
_property: ethers.utils.zeroPad(aBytesLike, length) => Uint8Array @<utils-zeroPad> @SRC<bytes>
|
||||
Retutns a Uint8Array of the data in //aBytesLike// with ``0`` bytes prepended to
|
||||
Returns a Uint8Array of the data in //aBytesLike// with ``0`` bytes prepended to
|
||||
//length// bytes long.
|
||||
|
||||
If //aBytesLike// is already longer than //length// bytes long, an InvalidArgument
|
||||
|
@ -93,7 +93,7 @@ A signed format string begins with ``fixed``, which an unsigned format
|
||||
string begins with ``ufixed``, followed by the width (in bits) and the
|
||||
number of decimals.
|
||||
|
||||
The width must be conguent to 0 mod 8 (i.e. ``(width % 8) == 0``) and no
|
||||
The width must be congruent to 0 mod 8 (i.e. ``(width % 8) == 0``) and no
|
||||
larger than 256 bits and the number of decimals must be no larger than 80.
|
||||
|
||||
For example:
|
||||
|
@ -163,7 +163,7 @@ the tightly packing algorithm.
|
||||
|
||||
_property: ethers.utils.solidityPack(types, values) => string<[[DataHexString]]> @<utils-solidityPack> @SRC<solidity:pack>
|
||||
Returns the non-standard encoded //values// packed according to
|
||||
their respecive type in //types//.
|
||||
their respective type in //types//.
|
||||
|
||||
_property: ethers.utils.solidityKeccak256(types, values) => string<[[DataHexString]]<32>> @<utils-solidityKeccak256> @SRC<solidity:keccak256>
|
||||
Returns the [KECCAK256](link-wiki-sha3) of the non-standard encoded //values// packed
|
||||
|
@ -101,7 +101,7 @@ _heading: Methods @<HDNode--methods>
|
||||
|
||||
_property: hdNode.neuter() => [[HDNode]] @<HDNode-neuter> @SRC<hdnode>
|
||||
Return a new instance of //hdNode// with its private key removed
|
||||
but all otehr properties preserved. This ensures that the key
|
||||
but all other properties preserved. This ensures that the key
|
||||
can not leak the private key of itself or any derived children,
|
||||
but may still be used to compute the addresses of itself and
|
||||
any non-hardened children.
|
||||
|
@ -56,11 +56,11 @@ _heading: Usage Validation
|
||||
There can be used to ensure various properties and actions are safe.
|
||||
|
||||
_property: logger.checkAbstract(target, kind) => void @SRC<logger>
|
||||
Checks that //target// is not //kind// and performs the same operatons
|
||||
Checks that //target// is not //kind// and performs the same operations
|
||||
as ``checkNew``. This is useful for ensuring abstract classes are not
|
||||
being instantiated.
|
||||
|
||||
_property: logger.checkArgumentCount(count, expectedCound [ , message) => void @SRC<logger>
|
||||
_property: logger.checkArgumentCount(count, expectedCount [ , message) => void @SRC<logger>
|
||||
If //count// is not equal to //expectedCount//, throws a [MISSING_ARGUMENT](errors-MissingArgument)
|
||||
or [UNEXPECTED_ARGUMENT](errors-UnexpectedArgument) error.
|
||||
|
||||
|
@ -8,11 +8,11 @@ The private key for this Signing Key.
|
||||
|
||||
_property: signingKey.publicKey => string<[[DataHexString]]<65>>
|
||||
The uncompressed public key for this Signing Key. It will always be
|
||||
65 bytes (130 nibbles) and begine with ``0x04``.
|
||||
65 bytes (130 nibbles) and begins with ``0x04``.
|
||||
|
||||
_property: signingKey.compressedPublicKey => string<[[DataHexString]]<33>>
|
||||
The compressed public key for this Signing Key. It will always be
|
||||
33 bytes (66 nibbles) and begine with either ``0x02`` or ``0x03``.
|
||||
33 bytes (66 nibbles) and begins with either ``0x02`` or ``0x03``.
|
||||
|
||||
_property: signingKey.signDigest(digest) => [[Signature]]
|
||||
Sign the //digest// and return the signature.
|
||||
|
@ -40,7 +40,7 @@ Returns the Array of codepoints of //text//, optionally normalized using the
|
||||
_note: Note
|
||||
This function correctly splits each **user-perceived character** into
|
||||
its codepoint, accounting for surrogate pairs. This should not be confused with
|
||||
``string.split("")``, which destroys surrogate pairs, spliting between each UTF-16
|
||||
``string.split("")``, which destroys surrogate pairs, splitting between each UTF-16
|
||||
codeunit instead.
|
||||
|
||||
_property: ethers.utils.toUtf8String(aBytesLike [ , onError = error ] ) => string @<utils-toUtf8String> @SRC<strings>
|
||||
@ -88,7 +88,7 @@ See NFKC for more an example.
|
||||
|
||||
_note: Note
|
||||
Only certain specified characters are folded in Canonical Equivalence, and thus
|
||||
it should **not** be considered a method to acheive //any// level of security from
|
||||
it should **not** be considered a method to achieve //any// level of security from
|
||||
[homoglyph attacks](link-wiki-homoglyph).
|
||||
|
||||
|
||||
|
@ -54,7 +54,7 @@ _property: transaction.gasLimit => [[BigNumber]]
|
||||
The gas limit for //transaction//. An account must have enough ether to
|
||||
cover the gas (at the specified **gasPrice**). Any unused gas is
|
||||
refunded at the end of the transaction, and if there is insufficient gas
|
||||
to complete execution, the effects of the trasaction are reverted, but
|
||||
to complete execution, the effects of the transaction are reverted, but
|
||||
the gas is **fully consumed** and an out-of-gas error occurs.
|
||||
|
||||
_property: transaction.gasPrice => [[BigNumber]]
|
||||
|
@ -37,7 +37,7 @@ Additional headers to include in the connection.
|
||||
_heading: PollOptions @<PollOptions>
|
||||
|
||||
_property: options.timeout => number
|
||||
The amount of time allowed to ellapse before triggering a timeout
|
||||
The amount of time allowed to elapse before triggering a timeout
|
||||
error.
|
||||
|
||||
_property: options.floor => number
|
||||
|
@ -30,8 +30,8 @@ the registered //name//.
|
||||
|
||||
_subsection: Languages @<wordlists--languages>
|
||||
|
||||
The [official wordlists](link-bip39-wordlists) availalbe in at
|
||||
`ethers.wordlists`. In the browser, only the english langauge is
|
||||
The [official wordlists](link-bip39-wordlists) available in at
|
||||
`ethers.wordlists`. In the browser, only the english language is
|
||||
available by default; to include the others (which increases the
|
||||
size of the library), see the dist files in the `ethers` package.
|
||||
|
||||
|
@ -2,7 +2,7 @@ _section: Assembler @<cli-asm>
|
||||
|
||||
The assembler Command-Line utility allows you to assemble the
|
||||
[Ethers ASM Dialect](asm-dialect) into deployable EVM bytecode
|
||||
and disassemle EVM bytecode into human-readable mnemonics.
|
||||
and disassemble EVM bytecode into human-readable mnemonics.
|
||||
|
||||
|
||||
_subsection: Help
|
||||
@ -31,7 +31,7 @@ _code: SimpleStore.asm @lang<asm>
|
||||
|
||||
; SimpleStore (uint)
|
||||
|
||||
; Set the inital value of 42
|
||||
; Set the initial value of 42
|
||||
sstore(0, 42)
|
||||
|
||||
; Init code to deploy myContract
|
||||
@ -144,7 +144,7 @@ Byt specifying the **Position Independent Code** flag, code
|
||||
will be generated in a way such that all offsets are relative, allowing
|
||||
the program to be moved without any impact to its logic.
|
||||
|
||||
This does incur an additional gsas cost of 8 gas per offset access though.
|
||||
This does incur an additional gas cost of 8 gas per offset access though.
|
||||
|
||||
_definition: **-\-target LABEL**
|
||||
All programs have a root scope named ``_`` which is by default
|
||||
|
@ -62,7 +62,7 @@ TRANSACTION OPTIONS (default: query network)
|
||||
--gasPrice GWEI Default gas price for transactions(in wei)
|
||||
--gasLimit GAS Default gas limit for transactions
|
||||
--nonce NONCE Initial nonce for the first transaction
|
||||
--yes Always accept Siging and Sending
|
||||
--yes Always accept Signing and Sending
|
||||
|
||||
OTHER OPTIONS
|
||||
--wait Wait until transactions are mined
|
||||
|
@ -1,7 +1,7 @@
|
||||
_section: Sandbox Utility
|
||||
|
||||
The sandbox utility provides a simple way to use the most common
|
||||
ethers utilities required during learning, debuging and managing
|
||||
ethers utilities required during learning, debugging and managing
|
||||
interactions with the Ethereum network.
|
||||
|
||||
If no command is given, it will enter a REPL interface with many
|
||||
@ -64,7 +64,7 @@ TRANSACTION OPTIONS (default: query network)
|
||||
--gasPrice GWEI Default gas price for transactions(in wei)
|
||||
--gasLimit GAS Default gas limit for transactions
|
||||
--nonce NONCE Initial nonce for the first transaction
|
||||
--yes Always accept Siging and Sending
|
||||
--yes Always accept Signing and Sending
|
||||
|
||||
OTHER OPTIONS
|
||||
--wait Wait until transactions are mined
|
||||
|
@ -21,7 +21,7 @@ associated plugin class will be instantiated and run.
|
||||
|
||||
_property: setPlugin(pluginClass) => void @<cli-setplugin> @SRC<cli/cli>
|
||||
Set a dedicated [[cli-plugin]] class which will handle all input. This
|
||||
may not be used in conjuction with addPlugin and will not automatically
|
||||
may not be used in conjunction with addPlugin and will not automatically
|
||||
accept a command from the arguments.
|
||||
|
||||
_property: showUsage([ message = "" [ , status = 0 ] ]) => never @<cli-showusage> @SRC<cli/cli>
|
||||
@ -36,7 +36,7 @@ _subsection: Plugin @<cli-plugin> @SRC<cli:class.Plugin>
|
||||
Each **Plugin** manages each command of a CLI and is executed in phases.
|
||||
|
||||
If the usage (i.e. help) of a CLI is requested, the static methods ``getHelp``
|
||||
and ``getOptionHelp`` are used to geneate the help screen.
|
||||
and ``getOptionHelp`` are used to generate the help screen.
|
||||
|
||||
Otherwise, a plugin is instantiated and the ``prepareOptions`` is called. Each
|
||||
plugin **must** call ``super.prepareOptions``, otherwise the basic options are
|
||||
@ -83,7 +83,7 @@ _property: plugin.prepareArgs(args) => Promise<void> @<plugin-prepareargs> @SR
|
||||
_property: plugin.run() => Promise<void> @<plugin-run> @SRC<cli/cli:Plugin.run>
|
||||
|
||||
_property: plugin.getAddress(addressOrName [ , message = "", [ allowZero = false ] ]) => Promise<string> @<plugin-getaddress> @SRC<cli/cli:Plugin.getAddress>
|
||||
A plugin should use this method to resolve an address. If the resovled address is
|
||||
A plugin should use this method to resolve an address. If the resolved address is
|
||||
the zero address and //allowZero// is not true, an error is raised.
|
||||
|
||||
_property: plugin.dump(header, info) => void @<plugin-dump> @SRC<cli/cli:Plugin.dump>
|
||||
@ -92,7 +92,7 @@ formatted style. In the future, plugins may support a JSON output format
|
||||
which will automatically work with this method.
|
||||
|
||||
_property: plugin.throwUsageError([ message = "" ]) => never @<plugin-throwusageerror> @SRC<cli/cli>
|
||||
Stops exectuion of the plugin and shows the help screen of the plugin with
|
||||
Stops execution of the plugin and shows the help screen of the plugin with
|
||||
the optional //message//.
|
||||
|
||||
_property: plugin.throwError(message) => never @<plugin-throwerror> @SRC<cli/cli>
|
||||
@ -133,7 +133,7 @@ Flags are simple binary options (such as the ``--yes``), which are true if prese
|
||||
otherwise false.
|
||||
|
||||
Options require a single parameter follow them on the command line
|
||||
(such as ``--account wallet.json``, which nhas the name ``account`` and the value
|
||||
(such as ``--account wallet.json``, which has the name ``account`` and the value
|
||||
``wallet.json``)
|
||||
|
||||
Arguments are all other values on the command line, and are not accessed through
|
||||
|
@ -94,7 +94,7 @@ Style Guide (this section will have much more coming):
|
||||
- Avoid inline links in the source; use the ``externalLinks`` field in the config.js
|
||||
- Prefix external links with ``link-``
|
||||
- Changing an anchor name must be well justified, as it will break all existing links
|
||||
to that section; flatworm will support symblinks in the future
|
||||
to that section; flatworm will support symlinks in the future
|
||||
- In general, I aim for xonsistency; look to similar situations throughout the documentation
|
||||
|
||||
|
||||
|
@ -18,7 +18,7 @@ To use ethers in React Native, you must either provide shims for the needed
|
||||
missing functionality, or use the ethers.js shim.
|
||||
|
||||
It is **HIGHLY RECOMMENDED** you check out the [security section](cookbook-reactnative-security>
|
||||
below for instructions on installing pacakges which can affect the security
|
||||
below for instructions on installing packages which can affect the security
|
||||
of your application.
|
||||
|
||||
After installing packages, you may need to restart your packager and company.
|
||||
|
@ -280,7 +280,7 @@ The language can be specified using the [@lang extension](flatworm--ext-lang).
|
||||
_table:
|
||||
|
||||
| **Language** | **Notes** |
|
||||
| javascript | Syntax highlights and [evaluates](flatworm--code-eval) the JavaScipt |
|
||||
| javascript | Syntax highlights and [evaluates](flatworm--code-eval) the JavaScript |
|
||||
| script | Same as ``javascript``, but does not evaluate the results |
|
||||
| shell | Shell scripts or command-line |
|
||||
| text | Plain text with no syntax highlighting |
|
||||
@ -379,7 +379,7 @@ _heading: Variables @<flatworm--table-variable>
|
||||
|
||||
Often the layout of a table is easier to express and maintain without
|
||||
uneven or changing content within it. So the content can be defined
|
||||
separately within a table directive using **variables**. A varaible
|
||||
separately within a table directive using **variables**. A variable
|
||||
name must being with a letter and must only contain letters and numbers.
|
||||
|
||||
Variables are also useful when content is repeated throughout a table.
|
||||
|
@ -65,7 +65,7 @@ $Signer: A Signer is a class which (usually) in some way directly or
|
||||
ether to perform operations.
|
||||
$Contract: A Contract is an abstraction which represents a connection to a
|
||||
specific contract on the Ethereum Network, so that applications
|
||||
can use it like a normal JavaScipt object.
|
||||
can use it like a normal JavaScript object.
|
||||
|
||||
|
||||
| **Provider** | $Provider |
|
||||
@ -225,7 +225,7 @@ const daiContract = new ethers.Contract("dai.tokens.ethers.eth", daiAbi, provide
|
||||
daiContract.name()
|
||||
//!
|
||||
|
||||
// Get the ERC-20 token synbol (for tickers and UIs)
|
||||
// Get the ERC-20 token symbol (for tickers and UIs)
|
||||
daiContract.symbol()
|
||||
//!
|
||||
|
||||
|
@ -3,7 +3,7 @@ _section: Migration: From Ethers v4 @<migration-v4>
|
||||
This document only covers the features present in v4 which have changed
|
||||
in some important way in v5.
|
||||
|
||||
It does not cover all the new additional featuers that have been added and
|
||||
It does not cover all the new additional features that have been added and
|
||||
mainly aims to help those updating their older scripts and applications to
|
||||
retain functional parity.
|
||||
|
||||
@ -52,7 +52,7 @@ _subsection: Contracts
|
||||
_heading: ENS Name Resolution
|
||||
|
||||
The name of the resolved address has changed. If the address passed into the
|
||||
constructor was an ENS name, the address will be resovled before any calls
|
||||
constructor was an ENS name, the address will be resolved before any calls
|
||||
are made to the contract.
|
||||
|
||||
The name of the property where the resolved address has changed from ``addressPromise``
|
||||
@ -151,7 +151,7 @@ All errors now belong to the [[Logger]] class and the related functions
|
||||
have been moved to [[Logger]] instances, which can include a per-package
|
||||
version string.
|
||||
|
||||
Global error fucntions have been moved [[Logger]] class methods.
|
||||
Global error functions have been moved [[Logger]] class methods.
|
||||
|
||||
_code: @lang<script>
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
_section: Testing
|
||||
|
||||
Testing is a critcial part of any library which wishes to remain secure, safe
|
||||
Testing is a critical part of any library which wishes to remain secure, safe
|
||||
and reliable.
|
||||
|
||||
Ethers currently has **over 23k tests** among its test suites, which are all
|
||||
@ -15,7 +15,7 @@ fix and included to prevent future changes from causing a regression.
|
||||
|
||||
A large number of the test cases were created procedurally by using
|
||||
known correct implementations from various sources (such as Geth) and
|
||||
written in different languages and verifyied with multiple libraries.
|
||||
written in different languages and verified with multiple libraries.
|
||||
|
||||
For example, the ABI test suites were generated by procedurally generating
|
||||
a list of types, for each type choosing a random (valid) value, which then
|
||||
@ -52,14 +52,14 @@ and will require ES2015 for [Proxy](link-js-proxy).
|
||||
|
||||
Certain features in JavaScript are also avoided, such as look-behind tokens in regular
|
||||
expressions, since these have caused conflicts (at import time) with certain JavaScript
|
||||
environmants such as [Otto](link-otto).
|
||||
environments such as [Otto](link-otto).
|
||||
|
||||
Basically, the moral of the story is "be inclusive and don't drop people needlessly".
|
||||
|
||||
|
||||
_subsection: Test Suites @<testing-suites>
|
||||
|
||||
The test suites are avaialble a gzipped JSON files in the
|
||||
The test suites are available as gzipped JSON files in the
|
||||
``@ethersproject/testcases``, which makes it easy to install and import
|
||||
(both GZIP and JSON are quite easy to consume from most langauges). Each
|
||||
test suite also has its schema available in this package.
|
||||
@ -71,10 +71,10 @@ $ContractEvents: Compiled Solidity, ABI interfaces, input types/values with
|
||||
output types/values for emitted events; all tests were
|
||||
executed against real Ethereum nodes
|
||||
$ContractAbi: Compiled Solidity, ABI interfaces, input types/values with the
|
||||
output types/values, encoded and decoded binrary data and normalized
|
||||
output types/values, encoded and decoded binary data and normalized
|
||||
values for function calls executed against real Ethereum nodes.
|
||||
$ContractAbi2: Identical to ``contract-interface``, except with emphasis on
|
||||
the ABIv2 coder which supports nested dynami types and strutured
|
||||
the ABIv2 coder which supports nested dynami types and structured
|
||||
data
|
||||
$ContractSignatures: Contract signatures and matching selectors
|
||||
$Hashes: Data and respective hashes against a variety of hash functions
|
||||
@ -88,7 +88,7 @@ $Transactions: Signed and unsigned transactions with their serialized form
|
||||
including both with and without EIP-155 replay protection
|
||||
$Units: Values converted between various units
|
||||
$Wallet: Keystore JSON format wallets, passwords and decrypted values
|
||||
$Wordlist: Fully decompressed BIP-39 offcial wordlists
|
||||
$Wordlist: Fully decompressed BIP-39 official wordlists
|
||||
|
||||
| **Filename** | **Test Cases** <|
|
||||
| accounts.json.gz | $Account <|
|
||||
@ -116,7 +116,7 @@ _property: testcases.loadTests(tag) => Array<TestCase>
|
||||
Load all the given testcases for the //tag//.
|
||||
|
||||
A tag is the string in the above list of test case names not including
|
||||
any extenstion (e.g. ``"solidity-hashes"``)
|
||||
any extension (e.g. ``"solidity-hashes"``)
|
||||
|
||||
_property: testcases.TestCase.TEST_NAME
|
||||
Most testcases have its schema available as a TypeScript type to make testing
|
||||
@ -129,8 +129,8 @@ we do not case what values are used, however we want the values to be consistent
|
||||
accross runs. Otherwise it becomes difficult to reproduce an issue.
|
||||
|
||||
In each of the following the seed is used to control the random value returned. Be
|
||||
sure to tweak the seed properly, for eaxmple on each iteration change the value and
|
||||
in recursive functions, concatentate to the seed.
|
||||
sure to tweak the seed properly, for example on each iteration change the value and
|
||||
in recursive functions, concatenate to the seed.
|
||||
|
||||
_property: testcases.randomBytes(seed, lower [, upper ]) => Uint8Array
|
||||
Return at least //lower// random bytes, up to //upper// (exclusive) if specified,
|
||||
@ -159,9 +159,9 @@ accounts and transactions suites can be merged into one large collection.
|
||||
|
||||
_heading: Accounts
|
||||
|
||||
Basic account information using a private key and computing various addrss forms.
|
||||
Basic account information using a private key and computing various address forms.
|
||||
|
||||
Tests were verfified against [EthereumJS](https:/\/github.com/ethereumjs) and custom
|
||||
Tests were verified against [EthereumJS](https:/\/github.com/ethereumjs) and custom
|
||||
scripts created to directly interact with Geth and cpp implementations.
|
||||
|
||||
//See: ``accounts.json.gz``//
|
||||
|
Loading…
Reference in New Issue
Block a user