Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f97b92bbb1 | ||
|
|
098d1db315 | ||
|
|
8dac54f90d | ||
|
|
3f0733c2f4 | ||
|
|
962ee4e95a | ||
|
|
bf0b468490 | ||
|
|
c80fcddf50 | ||
|
|
f3e67d230e |
1
.github/FUNDING.yml
vendored
1
.github/FUNDING.yml
vendored
@@ -1 +1,2 @@
|
||||
github: ethers-io
|
||||
custom: [ 'https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2', 'https://www.buymeacoffee.com/ricmoo' ]
|
||||
|
||||
12
.github/workflows/nodejs.yml
vendored
12
.github/workflows/nodejs.yml
vendored
@@ -11,7 +11,9 @@ jobs:
|
||||
|
||||
# runs-on: ubuntu-latest
|
||||
runs-on: macos-latest
|
||||
environment: test-ethers
|
||||
environment: ethers-tests
|
||||
env:
|
||||
FAUCET_PRIVATEKEY: ${{ secrets.FAUCET_PRIVATEKEY }}
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
@@ -45,7 +47,9 @@ jobs:
|
||||
# runs-on: ubuntu-latest
|
||||
runs-on: macos-latest
|
||||
|
||||
environment: test-ethers
|
||||
environment: ethers-tests
|
||||
env:
|
||||
FAUCET_PRIVATEKEY: ${{ secrets.FAUCET_PRIVATEKEY }}
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
@@ -108,7 +112,9 @@ jobs:
|
||||
# runs-on: ubuntu-latest
|
||||
runs-on: macos-latest
|
||||
|
||||
environment: test-ethers
|
||||
environment: ethers-tests
|
||||
env:
|
||||
FAUCET_PRIVATEKEY: ${{ secrets.FAUCET_PRIVATEKEY }}
|
||||
|
||||
continue-on-error: true
|
||||
|
||||
|
||||
@@ -41,7 +41,8 @@ operations required to interact with the Ethereum Blockchain.
|
||||
- customer usage metrics
|
||||
|
||||
_definition: **Networks:**
|
||||
``homestead``, ``ropsten``, ``rinkeby``, ``goerli`` and ``kovan``.
|
||||
``homestead``, ``goerli``, ``sepolia``, ``matic``. ``maticmum``, ``arbitrum``,
|
||||
``arbitrum-goerli``, ``optimism`` and ``optimism-goerli``.
|
||||
|
||||
|
||||
_subsection: INFURA @NOTE<(see the [[InfuraProvider]])> @<api-keys--infura>
|
||||
@@ -61,9 +62,8 @@ interaction with standard tools versatile, simple and straightforward.
|
||||
- access to archive data (requires paid upgrade)
|
||||
|
||||
_definition: **Networks:**
|
||||
``homestead``, ``ropsten``, ``rinkeby``, ``goerli``, ``kovan``, ``matic``,
|
||||
``maticmum``, ``optimism``, ``optimism-kovan``, ``arbitrum`` and
|
||||
``arbitrum-rinkeby``.
|
||||
``homestead``, ``goerli``, ``sepolia``, ``matic``. ``maticmum``, ``arbitrum``,
|
||||
``arbitrum-goerli``, ``optimism`` and ``optimism-goerli``.
|
||||
|
||||
|
||||
_subsection: Alchemy @NOTE<(see the [[AlchemyProvider]])> @<api-keys--alchemy>
|
||||
@@ -85,9 +85,8 @@ with debugging.
|
||||
- access to advanced debugging trace and revert reason APIs
|
||||
|
||||
_definition: **Networks:**
|
||||
``homestead``, ``ropsten``, ``rinkeby``, ``goerli``, ``kovan``, ``matic``,
|
||||
``maticmum``, ``optimism``, ``optimism-kovan``, ``arbitrum`` and
|
||||
``arbitrum-rinkeby``.
|
||||
``homestead``, ``goerli``, ``matic``. ``maticmum``, ``arbitrum``,
|
||||
``arbitrum-goerli``, ``optimism`` and ``optimism-goerli``.
|
||||
|
||||
|
||||
_subsection: Pocket Gateway @NOTE<(see the [[PocketProvider]])> @<api-keys--pocket-gateway>
|
||||
|
||||
@@ -40,10 +40,14 @@ It is highly recommended for production, you register with
|
||||
_definition: **Supported Networks**
|
||||
|
||||
- ``homestead`` - Homestead (Mainnet)
|
||||
- ``ropsten`` - Ropsten (proof-of-work testnet)
|
||||
- ``rinkeby`` - Rinkeby (proof-of-authority testnet)
|
||||
- ``goerli`` - Görli (clique testnet)
|
||||
- ``kovan`` - Kovan (proof-of-authority testnet)
|
||||
- ``sepolia`` - Sepolia (proof-of-authority testnet)
|
||||
- ``arbitrum`` - Arbitrum Optimistic L2
|
||||
- ``arbitrum-goerli`` - Arbitrum Optimistic L2 testnet
|
||||
- ``matic`` - Polgon mainnet
|
||||
- ``maticmum`` - Polgon testnet
|
||||
- ``optimism`` - Optimism Optimistic L2
|
||||
- ``optimism-goerli`` - Optimism Optimistic L2 testnet
|
||||
|
||||
_code: Etherscan Examples @lang<javascript>
|
||||
|
||||
@@ -53,11 +57,11 @@ _code: Etherscan Examples @lang<javascript>
|
||||
// Connect to mainnet (homestead)
|
||||
provider = new EtherscanProvider();
|
||||
|
||||
// Connect to rinkeby testnet (these are equivalent)
|
||||
provider = new EtherscanProvider("rinkeby");
|
||||
provider = new EtherscanProvider(4);
|
||||
// Connect to goerli testnet (these are equivalent)
|
||||
provider = new EtherscanProvider("goerli");
|
||||
provider = new EtherscanProvider(5);
|
||||
|
||||
network = ethers.providers.getNetwork("rinkeby");
|
||||
network = ethers.providers.getNetwork("goerli");
|
||||
//_hide: delete network._defaultProvider;
|
||||
//_log: network
|
||||
|
||||
@@ -107,16 +111,14 @@ It is highly recommended for production, you register with
|
||||
_definition: **Supported Networks**
|
||||
|
||||
- ``homestead`` - Homestead (Mainnet)
|
||||
- ``ropsten`` - Ropsten (proof-of-work testnet)
|
||||
- ``rinkeby`` - Rinkeby (proof-of-authority testnet)
|
||||
- ``goerli`` - Görli (clique testnet)
|
||||
- ``kovan`` - Kovan (proof-of-authority testnet)
|
||||
- ``matic`` - Polygon
|
||||
- ``maticmum`` - Polygon Mumbai Testnet
|
||||
- ``optimism`` - Optimism (L2; optimistic roll-up)
|
||||
- ``optimism-kovan`` - Optimism Testnet (L2; optimistic roll-up testnet)
|
||||
- ``arbitrum`` - Arbitrum (L2; optimistic roll-up)
|
||||
- ``arbitrum-rinkeby`` - Arbitrum Testnet (L2; optimistic roll-up testnet)
|
||||
- ``sepolia`` - Sepolia (proof-of-authority testnet)
|
||||
- ``arbitrum`` - Arbitrum Optimistic L2
|
||||
- ``arbitrum-goerli`` - Arbitrum Optimistic L2 testnet
|
||||
- ``matic`` - Polgon mainnet
|
||||
- ``maticmum`` - Polgon testnet
|
||||
- ``optimism`` - Optimism Optimistic L2
|
||||
- ``optimism-goerli`` - Optimism Optimistic L2 testnet
|
||||
|
||||
_code: INFURA Examples @lang<javascript>
|
||||
|
||||
@@ -127,9 +129,9 @@ _code: INFURA Examples @lang<javascript>
|
||||
// Connect to mainnet (homestead)
|
||||
provider = new InfuraProvider();
|
||||
|
||||
// Connect to the ropsten testnet
|
||||
// Connect to the goerli testnet
|
||||
// (see EtherscanProvider above for other network examples)
|
||||
provider = new InfuraProvider("ropsten");
|
||||
provider = new InfuraProvider("goerli");
|
||||
|
||||
// Connect to mainnet with a Project ID (these are equivalent)
|
||||
provider = new InfuraProvider(null, projectId);
|
||||
@@ -168,16 +170,13 @@ It is highly recommended for production, you register with
|
||||
_definition: **Supported Networks**
|
||||
|
||||
- ``homestead`` - Homestead (Mainnet)
|
||||
- ``ropsten`` - Ropsten (proof-of-work testnet)
|
||||
- ``rinkeby`` - Rinkeby (proof-of-authority testnet)
|
||||
- ``goerli`` - Görli (clique testnet)
|
||||
- ``kovan`` - Kovan (proof-of-authority testnet)
|
||||
- ``matic`` - Polygon
|
||||
- ``maticmum`` - Polygon Mumbai Testnet
|
||||
- ``optimism`` - Optimism (L2; optimistic roll-up)
|
||||
- ``optimism-kovan`` - Optimism Testnet (L2; optimistic roll-up testnet)
|
||||
- ``arbitrum`` - Arbitrum (L2; optimistic roll-up)
|
||||
- ``arbitrum-rinkeby`` - Arbitrum Testnet (L2; optimistic roll-up testnet)
|
||||
- ``arbitrum`` - Arbitrum Optimistic L2
|
||||
- ``arbitrum-goerli`` - Arbitrum Optimistic L2 testnet
|
||||
- ``matic`` - Polgon mainnet
|
||||
- ``maticmum`` - Polgon testnet
|
||||
- ``optimism`` - Optimism Optimistic L2
|
||||
- ``optimism-goerli`` - Optimism Optimistic L2 testnet
|
||||
|
||||
_code: Alchemy Examples @lang<javascript>
|
||||
|
||||
@@ -187,9 +186,9 @@ _code: Alchemy Examples @lang<javascript>
|
||||
// Connect to mainnet (homestead)
|
||||
provider = new AlchemyProvider();
|
||||
|
||||
// Connect to the ropsten testnet
|
||||
// Connect to the goerli testnet
|
||||
// (see EtherscanProvider above for other network examples)
|
||||
provider = new AlchemyProvider("ropsten");
|
||||
provider = new AlchemyProvider("goerli");
|
||||
|
||||
// Connect to mainnet with an API key (these are equivalent)
|
||||
provider = new AlchemyProvider(null, apiKey);
|
||||
@@ -241,9 +240,9 @@ It is highly recommended for production, you register with
|
||||
_definition: **Supported Networks**
|
||||
|
||||
- ``homestead`` - Homestead (Mainnet)
|
||||
- ``ropsten`` - Ropsten (proof-of-work testnet)
|
||||
- ``rinkeby`` - Rinkeby (proof-of-authority testnet)
|
||||
- ``goerli`` - Görli (clique testnet)
|
||||
- ``matic`` - Polgon mainnet
|
||||
- ``maticmum`` - Polgon testnet
|
||||
|
||||
_code: Pocket Examples @lang<javascript>
|
||||
|
||||
@@ -255,9 +254,9 @@ _code: Pocket Examples @lang<javascript>
|
||||
// Connect to mainnet (homestead)
|
||||
provider = new PocketProvider();
|
||||
|
||||
// Connect to the ropsten testnet
|
||||
// Connect to the goerli testnet
|
||||
// (see EtherscanProvider above for other network examples)
|
||||
provider = new PocketProvider("ropsten");
|
||||
provider = new PocketProvider("goerli");
|
||||
|
||||
// Connect to mainnet with an Application ID (these are equivalent)
|
||||
provider = new PocketProvider(null, applicationId);
|
||||
|
||||
@@ -78,7 +78,7 @@ There are several official common Ethereum networks as well as custom
|
||||
networks and other compatible projects.
|
||||
|
||||
Any API that accept a [[providers-Networkish]] can be passed a common
|
||||
name (such as ``"mainnet"`` or ``"ropsten"``) or chain ID to use that
|
||||
name (such as ``"mainnet"`` or ``"goerli"``) or chain ID to use that
|
||||
network definition or may specify custom parameters.
|
||||
|
||||
_property: ethers.providers.getNetwork(aNetworkish) => [[providers-Network]]
|
||||
|
||||
@@ -529,7 +529,7 @@ topicSets = [
|
||||
hexZeroPad(myOtherAddress, 32)
|
||||
]
|
||||
]
|
||||
provider.on(topicSets, (log, event) => {
|
||||
provider.on(topicSets, (log) => {
|
||||
// Emitted any token is sent TO either address
|
||||
})
|
||||
|
||||
|
||||
@@ -173,9 +173,6 @@ to indicate the Log entry has been removed; it will likely be emitted
|
||||
again in the near future when another block is mined with the transaction
|
||||
that triggered this log, but keep in mind the values may change.
|
||||
|
||||
_property: log.transactionLogIndex => number
|
||||
The index of this log in the transaction.
|
||||
|
||||
_property: log.address => string<[[address]]>
|
||||
The address of the contract that generated this log.
|
||||
|
||||
|
||||
@@ -105,28 +105,28 @@ it represents.
|
||||
|
||||
_heading: Math Operations
|
||||
|
||||
_property: BigNumber.add(otherValue) => [[BigNumber]] @SRC<bignumber>
|
||||
_property: bigNumber.add(otherValue) => [[BigNumber]] @SRC<bignumber>
|
||||
Returns a BigNumber with the value of //BigNumber// **+** //otherValue//.
|
||||
|
||||
_property: BigNumber.sub(otherValue) => [[BigNumber]] @SRC<bignumber>
|
||||
_property: bigNumber.sub(otherValue) => [[BigNumber]] @SRC<bignumber>
|
||||
Returns a BigNumber with the value of //BigNumber// **-** //otherValue//.
|
||||
|
||||
_property: BigNumber.mul(otherValue) => [[BigNumber]] @SRC<bignumber>
|
||||
_property: bigNumber.mul(otherValue) => [[BigNumber]] @SRC<bignumber>
|
||||
Returns a BigNumber with the value of //BigNumber// **×** //otherValue//.
|
||||
|
||||
_property: BigNumber.div(divisor) => [[BigNumber]] @SRC<bignumber>
|
||||
_property: bigNumber.div(divisor) => [[BigNumber]] @SRC<bignumber>
|
||||
Returns a BigNumber with the value of //BigNumber// **÷** //divisor//.
|
||||
|
||||
_property: BigNumber.mod(divisor) => [[BigNumber]] @SRC<bignumber>
|
||||
_property: bigNumber.mod(divisor) => [[BigNumber]] @SRC<bignumber>
|
||||
Returns a BigNumber with the value of the **remainder** of //BigNumber// ÷ //divisor//.
|
||||
|
||||
_property: BigNumber.pow(exponent) => [[BigNumber]] @SRC<bignumber>
|
||||
_property: bigNumber.pow(exponent) => [[BigNumber]] @SRC<bignumber>
|
||||
Returns a BigNumber with the value of //BigNumber// to the power of //exponent//.
|
||||
|
||||
_property: BigNumber.abs() => [[BigNumber]] @SRC<bignumber>
|
||||
_property: bigNumber.abs() => [[BigNumber]] @SRC<bignumber>
|
||||
Returns a BigNumber with the absolute value of //BigNumber//.
|
||||
|
||||
_property: BigNumber.mask(bitcount) => [[BigNumber]] @SRC<bignumber>
|
||||
_property: bigNumber.mask(bitcount) => [[BigNumber]] @SRC<bignumber>
|
||||
Returns a BigNumber with the value of //BigNumber// with bits beyond
|
||||
the //bitcount// least significant bits set to zero.
|
||||
|
||||
@@ -138,51 +138,51 @@ is an elegant method used to encode and decode fixed-width signed values
|
||||
while efficiently preserving mathematical operations.
|
||||
Most users will not need to interact with these.
|
||||
|
||||
_property: BigNumber.fromTwos(bitwidth) => [[BigNumber]] @SRC<bignumber>
|
||||
_property: bigNumber.fromTwos(bitwidth) => [[BigNumber]] @SRC<bignumber>
|
||||
Returns a BigNumber with the value of //BigNumber// converted from twos-complement with //bitwidth//.
|
||||
|
||||
_property: BigNumber.toTwos(bitwidth) => [[BigNumber]] @SRC<bignumber>
|
||||
_property: bigNumber.toTwos(bitwidth) => [[BigNumber]] @SRC<bignumber>
|
||||
Returns a BigNumber with the value of //BigNumber// converted to twos-complement with //bitwidth//.
|
||||
|
||||
|
||||
_heading: Comparison and Equivalence
|
||||
|
||||
_property: BigNumber.eq(otherValue) => boolean @SRC<bignumber>
|
||||
_property: bigNumber.eq(otherValue) => boolean @SRC<bignumber>
|
||||
Returns true if and only if the value of //BigNumber// is equal to //otherValue//.
|
||||
|
||||
_property: BigNumber.lt(otherValue) => boolean @SRC<bignumber>
|
||||
_property: bigNumber.lt(otherValue) => boolean @SRC<bignumber>
|
||||
Returns true if and only if the value of //BigNumber// **<** //otherValue//.
|
||||
|
||||
_property: BigNumber.lte(otherValue) => boolean @SRC<bignumber>
|
||||
_property: bigNumber.lte(otherValue) => boolean @SRC<bignumber>
|
||||
Returns true if and only if the value of //BigNumber// **≤** //otherValue//.
|
||||
|
||||
_property: BigNumber.gt(otherValue) => boolean @SRC<bignumber>
|
||||
_property: bigNumber.gt(otherValue) => boolean @SRC<bignumber>
|
||||
Returns true if and only if the value of //BigNumber// **>** //otherValue//.
|
||||
|
||||
_property: BigNumber.gte(otherValue) => boolean @SRC<bignumber>
|
||||
_property: bigNumber.gte(otherValue) => boolean @SRC<bignumber>
|
||||
Returns true if and only if the value of //BigNumber// **≥** //otherValue//.
|
||||
|
||||
_property: BigNumber.isZero() => boolean @SRC<bignumber:BigNumber.isZero>
|
||||
_property: bigNumber.isZero() => boolean @SRC<bignumber:BigNumber.isZero>
|
||||
Returns true if and only if the value of //BigNumber// is zero.
|
||||
|
||||
|
||||
_heading: Conversion
|
||||
|
||||
_property: BigNumber.toBigInt() => bigint @SRC<bignumber>
|
||||
_property: bigNumber.toBigInt() => bigint @SRC<bignumber>
|
||||
Returns the value of //BigNumber// as a [JavaScript BigInt](link-js-bigint) value,
|
||||
on platforms which support them.
|
||||
|
||||
_property: BigNumber.toNumber() => number @SRC<bignumber>
|
||||
_property: bigNumber.toNumber() => number @SRC<bignumber>
|
||||
Returns the value of //BigNumber// as a JavaScript value.
|
||||
|
||||
This will **throw an error**
|
||||
if the value is greater than or equal to //Number.MAX_SAFE_INTEGER// or less than or
|
||||
equal to //Number.MIN_SAFE_INTEGER//.
|
||||
|
||||
_property: BigNumber.toString() => string @SRC<bignumber:BigNumber.toString>
|
||||
_property: bigNumber.toString() => string @SRC<bignumber:BigNumber.toString>
|
||||
Returns the value of //BigNumber// as a base-10 string.
|
||||
|
||||
_property: BigNumber.toHexString() => string<[[DataHexString]]> @SRC<bignumber:BigNumber.toHexString>
|
||||
_property: bigNumber.toHexString() => string<[[DataHexString]]> @SRC<bignumber:BigNumber.toHexString>
|
||||
Returns the value of //BigNumber// as a base-16, ``0x``-prefixed [[DataHexString]].
|
||||
|
||||
|
||||
|
||||
@@ -89,9 +89,9 @@ The chain ID for //transaction//. This is used as part of
|
||||
[[link-eip-155]] to prevent replay attacks on different
|
||||
networks.
|
||||
|
||||
For example, if a transaction was made on ropsten with an account
|
||||
For example, if a transaction was made on goerli with an account
|
||||
also used on homestead, it would be possible for a transaction
|
||||
signed on ropsten to be executed on homestead, which is likely
|
||||
signed on goerli to be executed on homestead, which is likely
|
||||
unintended.
|
||||
|
||||
There are situations where replay may be desired, however these
|
||||
|
||||
@@ -91,8 +91,8 @@ New account address: 0x485bcC23ae2E5038ec7ec9b8DCB2A6A6291cC003
|
||||
Saved: wallet.json
|
||||
|
||||
|
||||
# If you are planning to try out the Ropsten testnet...
|
||||
/home/ethers> ethers --network ropsten fund 0x485bcC23ae2E5038ec7ec9b8DCB2A6A6291cC003
|
||||
# If you are planning to try out the Goerli testnet...
|
||||
/home/ethers> ethers --network goerli fund 0x485bcC23ae2E5038ec7ec9b8DCB2A6A6291cC003
|
||||
Transaction Hash: 0x8dc55b8f8dc8076acded97f9e3ed7d6162460c0221e2769806006b6d7d1156e0
|
||||
|
||||
|
||||
@@ -168,14 +168,14 @@ the command line to be passed into other commands or stored in script
|
||||
environment variables.
|
||||
|
||||
_code: Get the formatted balance of an account @lang<shell>
|
||||
/home/ethers> ethers --network ropsten \
|
||||
/home/ethers> ethers --network goerli \
|
||||
--account wallet.json \
|
||||
eval \
|
||||
'accounts[0].getBalance().then(b => formatEther(b))'
|
||||
3.141592653589793238
|
||||
|
||||
_code: Get the current block number @lang<shell>
|
||||
/home/ethers> ethers --network rinkeby \
|
||||
/home/ethers> ethers --network goerli \
|
||||
eval "provider.getBlockNumber()"
|
||||
5761009
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ _section: Best Practices @<best-practices>
|
||||
|
||||
_subsection: Network Changes
|
||||
|
||||
Handling a change in the network (e.g. Ropsten vs Mainnet) is
|
||||
Handling a change in the network (e.g. Görli vs Mainnet) is
|
||||
incredibly complex and a slight failure can at best make your
|
||||
application seem confusing and at worst cause the loss of funds,
|
||||
leak private data or misrepresent what an action performed.
|
||||
|
||||
@@ -202,7 +202,7 @@ function codeContextify(context) {
|
||||
|
||||
module.exports = {
|
||||
title: "ethers",
|
||||
subtitle: "v5.4",
|
||||
subtitle: "v5.7",
|
||||
description: "Documentation for ethers, a complete, tiny and simple Ethereum library.",
|
||||
logo: "logo.svg",
|
||||
|
||||
@@ -210,11 +210,11 @@ module.exports = {
|
||||
|
||||
prefix: "/v5",
|
||||
|
||||
link: "https:/\/docs.ethers.io",
|
||||
link: "https:/\/docs.ethers.org",
|
||||
copyright: "The content of this site is licensed under the [Creative Commons License](https:/\/choosealicense.com/licenses/cc-by-4.0/). Generated on &$now;.",
|
||||
|
||||
markdown: {
|
||||
"banner": "-----\n\nDocumentation: [html](https://docs.ethers.io/)\n\n-----\n\n"
|
||||
"banner": "-----\n\nDocumentation: [html](https://docs.ethers.org/)\n\n-----\n\n"
|
||||
},
|
||||
|
||||
codeContextify: codeContextify,
|
||||
@@ -225,7 +225,7 @@ module.exports = {
|
||||
|
||||
externalLinks: {
|
||||
"link-mail": "mailto:me@ricmoo.com",
|
||||
"link-alchemy": { name: "Alchemy", url: "https:/\/alchemyapi.io" },
|
||||
"link-alchemy": { name: "Alchemy", url: "https:/\/alchemy.com/?a=ethers" },
|
||||
"link-ankr": { name: "Ankr", url: "https:/\/www.ankr.com" },
|
||||
"link-cloudflare": { name: "Cloudflare", url: "https:/\/developers.cloudflare.com/distributed-web/ethereum-gateway/" },
|
||||
"link-ens": { name: "ENS", url: "https:/\/ens.domains/" },
|
||||
@@ -265,8 +265,9 @@ module.exports = {
|
||||
"link-geth-debug": "https:/\/github.com/ethereum/go-ethereum/wiki/Management-APIs#debug",
|
||||
"link-geth-rpc": "https:/\/github.com/ethereum/go-ethereum/wiki/Management-APIs",
|
||||
|
||||
"link-legacy-docs3": "https:/\/docs.ethers.io/v3/",
|
||||
"link-legacy-docs4": "https:/\/docs.ethers.io/v4/",
|
||||
"link-legacy-docs3": "https:/\/docs.ethers.org/v3/",
|
||||
"link-legacy-docs4": "https:/\/docs.ethers.org/v4/",
|
||||
"link-beta-docs6": "https:/\/docs.ethers.org/v6-beta/",
|
||||
|
||||
"link-github-ci": "https:/\/github.com/ethers-io/ethers.js/actions/runs/158006903",
|
||||
"link-github-issues": "https:/\/github.com/ethers-io/ethers.js/issues",
|
||||
@@ -290,7 +291,7 @@ module.exports = {
|
||||
"link-rlp": { name: "Recursive Length Prefix", url: "https:/\/github.com/ethereum/wiki/wiki/RLP" },
|
||||
|
||||
"link-ethersio": "https:/\/ethers.io/",
|
||||
"link-ethers-docs": "https:/\/docs.ethers.io/",
|
||||
"link-ethers-docs": "https:/\/docs.ethers.org/",
|
||||
"link-ethers-js": "https:/\/cdn.ethers.io/lib/ethers-5.1.esm.min.js",
|
||||
"link-ethers-npm": "https:/\/www.npmjs.com/search?q=%40ethersproject%2F",
|
||||
"link-ethers-asm-grammar": "https:/\/github.com/ethers-io/ethers.js/blob/master/packages/asm/grammar.jison",
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
_section: Documentation @<documentation>
|
||||
|
||||
This documentation is for Ethers v5.
|
||||
|
||||
For Ethers v6, see [v6 beta documentation](link-beta-docs6).
|
||||
|
||||
_subsection: What is Ethers? @<preamble>
|
||||
|
||||
The ethers.js library aims to be a complete and compact library for
|
||||
|
||||
@@ -22,17 +22,17 @@ const Words = fs_1.default.readFileSync("/usr/share/dict/words").toString().spli
|
||||
}, {});
|
||||
`
|
||||
// Words missing from the dictionary
|
||||
accessing addresses aligned autofill avatar called cancelled changed censored
|
||||
accessing addresses aligned allowed autofill avatar called cancelled changed censored
|
||||
clamping compiled computed configured consumed contained creating decoded decoding
|
||||
decreased decrypt decrypted decrypting deployed deploying deprecated detected
|
||||
discontinued earliest email emitted enabled encoded encoder encoding encountered
|
||||
encrypt encrypted encrypting entries euro exceeded existing expected
|
||||
expired failed fetches formatted formatting funding generated
|
||||
expired failed fetches finalized formatted formatting funding generated
|
||||
hardened has highly ignoring implemented implementer imported including instantiate
|
||||
joined keyword labelled larger lookup matches mined modified modifies multi
|
||||
named needed nested neutered numeric offline optimizer overriding owned packed
|
||||
padded parsed parsing passed payload placeholder processing properties prototyping reached
|
||||
recommended recovered recursively redacted remaining replaced repriced required reverted
|
||||
recommended recovered recursively redacted rejected remaining replaced repriced required reverted
|
||||
serializes shared signed signing skipped stats stored supported tagging targetted
|
||||
throttled transactions typed uninstall unstake unsubscribe untyped
|
||||
using verifies verifying website
|
||||
@@ -58,11 +58,11 @@ ABIEncoder testcase numberish Wordlist
|
||||
abi addr api app arg arrayify asm backend basex bigint bignumber bn byte
|
||||
bytecode callback calldata ccip charset checksum ciphertext cli codepoint
|
||||
commify config
|
||||
contenthash ctr ctrl debug dd dklen eexist encseed eof eq erc ethaddr
|
||||
contenthash ctr ctrl debug dd disallowed dklen dns eexist encseed eof eq erc ethaddr
|
||||
ethseed ethers eval exec filename func gz gzip hid http https hw iv
|
||||
info init ipc json kdf kdfparams labelhash lang lib metadata mm multihash nfc
|
||||
nfkc nfd nfkd nodehash notok nowait nullish offchain oob opcode org pbkdf pc plugin
|
||||
pragma pre prf recid repl rpc sighash topichash solc stderr stdin stdout subclasses
|
||||
pragma pre prf punycode recid repl rpc sighash topichash solc stderr stdin stdout subclasses
|
||||
subnode timeout todo txt typeof ufixed utc utf util url urlencoded uuid vm
|
||||
vs websocket wikipedia wildcard wildcards wss www wx xe xpriv xpub xx yyyy zlib
|
||||
|
||||
@@ -75,7 +75,7 @@ apikey asc endblock startblock
|
||||
alchemyapi ankr arbitrum Cloudflare com Etherscan INFURA IPFS IPNS MetaMask Nodesmith
|
||||
Trezor ledgerhq axic bitcoinjs browserify easyseed ethereumjs
|
||||
goerli homestead kotti kovan mainnet morden mordor rinkeby kintsugi
|
||||
ropsten skynet testnet lb maticmum
|
||||
ropsten sepolia skynet testnet lb maticmum
|
||||
|
||||
// Demo words
|
||||
args foo eth foo foobar ll localhost passwd ricmoo tx xxx yna
|
||||
|
||||
@@ -141,7 +141,7 @@ function getFiles(basedir) {
|
||||
}
|
||||
(function () {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const bucket = "docs.ethers.io";
|
||||
const bucket = "ethers.org";
|
||||
const awsAccessId = yield config_1.config.get("aws-upload-docs-accesskey");
|
||||
const awsSecretKey = yield config_1.config.get("aws-upload-docs-secretkey");
|
||||
const s3 = new aws_sdk_1.default.S3({
|
||||
@@ -152,7 +152,9 @@ function getFiles(basedir) {
|
||||
const added = [], removed = [], changed = [], upload = [];
|
||||
const basedir = (0, path_2.resolve)("docs");
|
||||
const local = yield getFiles(basedir);
|
||||
console.log("LOCAL", local);
|
||||
const remote = yield getKeys(s3, bucket);
|
||||
console.log("REMOTE", remote);
|
||||
Object.keys(local).forEach((filename) => {
|
||||
if (!remote[filename]) {
|
||||
added.push(filename);
|
||||
@@ -176,8 +178,9 @@ function getFiles(basedir) {
|
||||
console.log('Removed: ', removed.length);
|
||||
console.log('Changed: ', changed.length);
|
||||
for (let i = 0; i < upload.length; i++) {
|
||||
const filename = upload[i];
|
||||
const content = fs_1.default.readFileSync((0, path_1.join)(basedir, filename));
|
||||
const _filename = upload[i];
|
||||
const content = fs_1.default.readFileSync((0, path_1.join)(basedir, _filename));
|
||||
const filename = (0, path_1.join)("docs", _filename);
|
||||
console.log(`Uploading: ${filename} (${content.length} bytes)`);
|
||||
yield putObject(s3, bucket, filename, content);
|
||||
}
|
||||
|
||||
@@ -13,17 +13,17 @@ const Words = fs.readFileSync("/usr/share/dict/words").toString().split("\n").re
|
||||
|
||||
`
|
||||
// Words missing from the dictionary
|
||||
accessing addresses aligned autofill avatar called cancelled changed censored
|
||||
accessing addresses aligned allowed autofill avatar called cancelled changed censored
|
||||
clamping compiled computed configured consumed contained creating decoded decoding
|
||||
decreased decrypt decrypted decrypting deployed deploying deprecated detected
|
||||
discontinued earliest email emitted enabled encoded encoder encoding encountered
|
||||
encrypt encrypted encrypting entries euro exceeded existing expected
|
||||
expired failed fetches formatted formatting funding generated
|
||||
expired failed fetches finalized formatted formatting funding generated
|
||||
hardened has highly ignoring implemented implementer imported including instantiate
|
||||
joined keyword labelled larger lookup matches mined modified modifies multi
|
||||
named needed nested neutered numeric offline optimizer overriding owned packed
|
||||
padded parsed parsing passed payload placeholder processing properties prototyping reached
|
||||
recommended recovered recursively redacted remaining replaced repriced required reverted
|
||||
recommended recovered recursively redacted rejected remaining replaced repriced required reverted
|
||||
serializes shared signed signing skipped stats stored supported tagging targetted
|
||||
throttled transactions typed uninstall unstake unsubscribe untyped
|
||||
using verifies verifying website
|
||||
@@ -49,11 +49,11 @@ ABIEncoder testcase numberish Wordlist
|
||||
abi addr api app arg arrayify asm backend basex bigint bignumber bn byte
|
||||
bytecode callback calldata ccip charset checksum ciphertext cli codepoint
|
||||
commify config
|
||||
contenthash ctr ctrl debug dd dklen eexist encseed eof eq erc ethaddr
|
||||
contenthash ctr ctrl debug dd disallowed dklen dns eexist encseed eof eq erc ethaddr
|
||||
ethseed ethers eval exec filename func gz gzip hid http https hw iv
|
||||
info init ipc json kdf kdfparams labelhash lang lib metadata mm multihash nfc
|
||||
nfkc nfd nfkd nodehash notok nowait nullish offchain oob opcode org pbkdf pc plugin
|
||||
pragma pre prf recid repl rpc sighash topichash solc stderr stdin stdout subclasses
|
||||
pragma pre prf punycode recid repl rpc sighash topichash solc stderr stdin stdout subclasses
|
||||
subnode timeout todo txt typeof ufixed utc utf util url urlencoded uuid vm
|
||||
vs websocket wikipedia wildcard wildcards wss www wx xe xpriv xpub xx yyyy zlib
|
||||
|
||||
@@ -66,7 +66,7 @@ apikey asc endblock startblock
|
||||
alchemyapi ankr arbitrum Cloudflare com Etherscan INFURA IPFS IPNS MetaMask Nodesmith
|
||||
Trezor ledgerhq axic bitcoinjs browserify easyseed ethereumjs
|
||||
goerli homestead kotti kovan mainnet morden mordor rinkeby kintsugi
|
||||
ropsten skynet testnet lb maticmum
|
||||
ropsten sepolia skynet testnet lb maticmum
|
||||
|
||||
// Demo words
|
||||
args foo eth foo foobar ll localhost passwd ricmoo tx xxx yna
|
||||
|
||||
@@ -132,7 +132,7 @@ function getFiles(basedir: string): Record<string, string> {
|
||||
}
|
||||
|
||||
(async function() {
|
||||
const bucket = "docs.ethers.io";
|
||||
const bucket = "ethers.org";
|
||||
|
||||
const awsAccessId = await config.get("aws-upload-docs-accesskey");
|
||||
const awsSecretKey = await config.get("aws-upload-docs-secretkey");
|
||||
@@ -148,7 +148,9 @@ function getFiles(basedir: string): Record<string, string> {
|
||||
const basedir = resolve("docs");
|
||||
|
||||
const local = await getFiles(basedir);
|
||||
console.log("LOCAL", local);
|
||||
const remote = await getKeys(s3, bucket);
|
||||
console.log("REMOTE", remote);
|
||||
|
||||
Object.keys(local).forEach((filename) => {
|
||||
if (!remote[filename]) {
|
||||
@@ -174,8 +176,9 @@ function getFiles(basedir: string): Record<string, string> {
|
||||
console.log('Changed: ', changed.length);
|
||||
|
||||
for (let i = 0; i < upload.length; i++) {
|
||||
const filename = upload[i];
|
||||
const content = fs.readFileSync(join(basedir, filename));
|
||||
const _filename = upload[i];
|
||||
const content = fs.readFileSync(join(basedir, _filename));
|
||||
const filename = join("docs", _filename);
|
||||
console.log(`Uploading: ${ filename } (${ content.length } bytes)`);
|
||||
await putObject(s3, bucket, filename, content);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user