Compare commits

...

8 Commits

Author SHA1 Message Date
Richard Moore
f97b92bbb1 Merge branch 'master' of github.com:ethers-io/ethers.js 2023-02-02 21:04:20 -05:00
Richard Moore
098d1db315 admin: update admin dist files 2023-02-02 20:55:16 -05:00
Richard Moore
8dac54f90d admin: added spellcheck words 2023-02-02 20:54:33 -05:00
Richard Moore
3f0733c2f4 docs: updated docs upload scripts to be compatible with v6. 2023-02-02 20:54:10 -05:00
Richard Moore
962ee4e95a docs: added documentation changes 2023-02-02 20:53:12 -05:00
Richard Moore
bf0b468490 Update FUNDING.yml
Added GitHub Sponsors.
2023-01-14 07:15:49 -05:00
Richard Moore
c80fcddf50 admin: add env to workflow 2022-10-19 04:49:26 -04:00
Richard Moore
f3e67d230e admin: updated environment 2022-10-19 04:31:32 -04:00
17 changed files with 113 additions and 100 deletions

1
.github/FUNDING.yml vendored
View File

@@ -1 +1,2 @@
github: ethers-io
custom: [ 'https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2', 'https://www.buymeacoffee.com/ricmoo' ] custom: [ 'https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2', 'https://www.buymeacoffee.com/ricmoo' ]

View File

@@ -11,7 +11,9 @@ jobs:
# runs-on: ubuntu-latest # runs-on: ubuntu-latest
runs-on: macos-latest runs-on: macos-latest
environment: test-ethers environment: ethers-tests
env:
FAUCET_PRIVATEKEY: ${{ secrets.FAUCET_PRIVATEKEY }}
strategy: strategy:
fail-fast: false fail-fast: false
@@ -45,7 +47,9 @@ jobs:
# runs-on: ubuntu-latest # runs-on: ubuntu-latest
runs-on: macos-latest runs-on: macos-latest
environment: test-ethers environment: ethers-tests
env:
FAUCET_PRIVATEKEY: ${{ secrets.FAUCET_PRIVATEKEY }}
strategy: strategy:
fail-fast: false fail-fast: false
@@ -108,7 +112,9 @@ jobs:
# runs-on: ubuntu-latest # runs-on: ubuntu-latest
runs-on: macos-latest runs-on: macos-latest
environment: test-ethers environment: ethers-tests
env:
FAUCET_PRIVATEKEY: ${{ secrets.FAUCET_PRIVATEKEY }}
continue-on-error: true continue-on-error: true

View File

@@ -41,7 +41,8 @@ operations required to interact with the Ethereum Blockchain.
- customer usage metrics - customer usage metrics
_definition: **Networks:** _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> _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) - access to archive data (requires paid upgrade)
_definition: **Networks:** _definition: **Networks:**
``homestead``, ``ropsten``, ``rinkeby``, ``goerli``, ``kovan``, ``matic``, ``homestead``, ``goerli``, ``sepolia``, ``matic``. ``maticmum``, ``arbitrum``,
``maticmum``, ``optimism``, ``optimism-kovan``, ``arbitrum`` and ``arbitrum-goerli``, ``optimism`` and ``optimism-goerli``.
``arbitrum-rinkeby``.
_subsection: Alchemy @NOTE<(see the [[AlchemyProvider]])> @<api-keys--alchemy> _subsection: Alchemy @NOTE<(see the [[AlchemyProvider]])> @<api-keys--alchemy>
@@ -85,9 +85,8 @@ with debugging.
- access to advanced debugging trace and revert reason APIs - access to advanced debugging trace and revert reason APIs
_definition: **Networks:** _definition: **Networks:**
``homestead``, ``ropsten``, ``rinkeby``, ``goerli``, ``kovan``, ``matic``, ``homestead``, ``goerli``, ``matic``. ``maticmum``, ``arbitrum``,
``maticmum``, ``optimism``, ``optimism-kovan``, ``arbitrum`` and ``arbitrum-goerli``, ``optimism`` and ``optimism-goerli``.
``arbitrum-rinkeby``.
_subsection: Pocket Gateway @NOTE<(see the [[PocketProvider]])> @<api-keys--pocket-gateway> _subsection: Pocket Gateway @NOTE<(see the [[PocketProvider]])> @<api-keys--pocket-gateway>

View File

@@ -40,10 +40,14 @@ It is highly recommended for production, you register with
_definition: **Supported Networks** _definition: **Supported Networks**
- ``homestead`` - Homestead (Mainnet) - ``homestead`` - Homestead (Mainnet)
- ``ropsten`` - Ropsten (proof-of-work testnet)
- ``rinkeby`` - Rinkeby (proof-of-authority testnet)
- ``goerli`` - G&ouml;rli (clique testnet) - ``goerli`` - G&ouml;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> _code: Etherscan Examples @lang<javascript>
@@ -53,11 +57,11 @@ _code: Etherscan Examples @lang<javascript>
// Connect to mainnet (homestead) // Connect to mainnet (homestead)
provider = new EtherscanProvider(); provider = new EtherscanProvider();
// Connect to rinkeby testnet (these are equivalent) // Connect to goerli testnet (these are equivalent)
provider = new EtherscanProvider("rinkeby"); provider = new EtherscanProvider("goerli");
provider = new EtherscanProvider(4); provider = new EtherscanProvider(5);
network = ethers.providers.getNetwork("rinkeby"); network = ethers.providers.getNetwork("goerli");
//_hide: delete network._defaultProvider; //_hide: delete network._defaultProvider;
//_log: network //_log: network
@@ -107,16 +111,14 @@ It is highly recommended for production, you register with
_definition: **Supported Networks** _definition: **Supported Networks**
- ``homestead`` - Homestead (Mainnet) - ``homestead`` - Homestead (Mainnet)
- ``ropsten`` - Ropsten (proof-of-work testnet)
- ``rinkeby`` - Rinkeby (proof-of-authority testnet)
- ``goerli`` - G&ouml;rli (clique testnet) - ``goerli`` - G&ouml;rli (clique testnet)
- ``kovan`` - Kovan (proof-of-authority testnet) - ``sepolia`` - Sepolia (proof-of-authority testnet)
- ``matic`` - Polygon - ``arbitrum`` - Arbitrum Optimistic L2
- ``maticmum`` - Polygon Mumbai Testnet - ``arbitrum-goerli`` - Arbitrum Optimistic L2 testnet
- ``optimism`` - Optimism (L2; optimistic roll-up) - ``matic`` - Polgon mainnet
- ``optimism-kovan`` - Optimism Testnet (L2; optimistic roll-up testnet) - ``maticmum`` - Polgon testnet
- ``arbitrum`` - Arbitrum (L2; optimistic roll-up) - ``optimism`` - Optimism Optimistic L2
- ``arbitrum-rinkeby`` - Arbitrum Testnet (L2; optimistic roll-up testnet) - ``optimism-goerli`` - Optimism Optimistic L2 testnet
_code: INFURA Examples @lang<javascript> _code: INFURA Examples @lang<javascript>
@@ -127,9 +129,9 @@ _code: INFURA Examples @lang<javascript>
// Connect to mainnet (homestead) // Connect to mainnet (homestead)
provider = new InfuraProvider(); provider = new InfuraProvider();
// Connect to the ropsten testnet // Connect to the goerli testnet
// (see EtherscanProvider above for other network examples) // (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) // Connect to mainnet with a Project ID (these are equivalent)
provider = new InfuraProvider(null, projectId); provider = new InfuraProvider(null, projectId);
@@ -168,16 +170,13 @@ It is highly recommended for production, you register with
_definition: **Supported Networks** _definition: **Supported Networks**
- ``homestead`` - Homestead (Mainnet) - ``homestead`` - Homestead (Mainnet)
- ``ropsten`` - Ropsten (proof-of-work testnet)
- ``rinkeby`` - Rinkeby (proof-of-authority testnet)
- ``goerli`` - G&ouml;rli (clique testnet) - ``goerli`` - G&ouml;rli (clique testnet)
- ``kovan`` - Kovan (proof-of-authority testnet) - ``arbitrum`` - Arbitrum Optimistic L2
- ``matic`` - Polygon - ``arbitrum-goerli`` - Arbitrum Optimistic L2 testnet
- ``maticmum`` - Polygon Mumbai Testnet - ``matic`` - Polgon mainnet
- ``optimism`` - Optimism (L2; optimistic roll-up) - ``maticmum`` - Polgon testnet
- ``optimism-kovan`` - Optimism Testnet (L2; optimistic roll-up testnet) - ``optimism`` - Optimism Optimistic L2
- ``arbitrum`` - Arbitrum (L2; optimistic roll-up) - ``optimism-goerli`` - Optimism Optimistic L2 testnet
- ``arbitrum-rinkeby`` - Arbitrum Testnet (L2; optimistic roll-up testnet)
_code: Alchemy Examples @lang<javascript> _code: Alchemy Examples @lang<javascript>
@@ -187,9 +186,9 @@ _code: Alchemy Examples @lang<javascript>
// Connect to mainnet (homestead) // Connect to mainnet (homestead)
provider = new AlchemyProvider(); provider = new AlchemyProvider();
// Connect to the ropsten testnet // Connect to the goerli testnet
// (see EtherscanProvider above for other network examples) // (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) // Connect to mainnet with an API key (these are equivalent)
provider = new AlchemyProvider(null, apiKey); provider = new AlchemyProvider(null, apiKey);
@@ -241,9 +240,9 @@ It is highly recommended for production, you register with
_definition: **Supported Networks** _definition: **Supported Networks**
- ``homestead`` - Homestead (Mainnet) - ``homestead`` - Homestead (Mainnet)
- ``ropsten`` - Ropsten (proof-of-work testnet)
- ``rinkeby`` - Rinkeby (proof-of-authority testnet)
- ``goerli`` - G&ouml;rli (clique testnet) - ``goerli`` - G&ouml;rli (clique testnet)
- ``matic`` - Polgon mainnet
- ``maticmum`` - Polgon testnet
_code: Pocket Examples @lang<javascript> _code: Pocket Examples @lang<javascript>
@@ -255,9 +254,9 @@ _code: Pocket Examples @lang<javascript>
// Connect to mainnet (homestead) // Connect to mainnet (homestead)
provider = new PocketProvider(); provider = new PocketProvider();
// Connect to the ropsten testnet // Connect to the goerli testnet
// (see EtherscanProvider above for other network examples) // (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) // Connect to mainnet with an Application ID (these are equivalent)
provider = new PocketProvider(null, applicationId); provider = new PocketProvider(null, applicationId);

View File

@@ -78,7 +78,7 @@ There are several official common Ethereum networks as well as custom
networks and other compatible projects. networks and other compatible projects.
Any API that accept a [[providers-Networkish]] can be passed a common 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. network definition or may specify custom parameters.
_property: ethers.providers.getNetwork(aNetworkish) => [[providers-Network]] _property: ethers.providers.getNetwork(aNetworkish) => [[providers-Network]]

View File

@@ -529,7 +529,7 @@ topicSets = [
hexZeroPad(myOtherAddress, 32) hexZeroPad(myOtherAddress, 32)
] ]
] ]
provider.on(topicSets, (log, event) => { provider.on(topicSets, (log) => {
// Emitted any token is sent TO either address // Emitted any token is sent TO either address
}) })

View File

@@ -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 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. 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]]> _property: log.address => string<[[address]]>
The address of the contract that generated this log. The address of the contract that generated this log.

View File

@@ -105,28 +105,28 @@ it represents.
_heading: Math Operations _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//. 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//. 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// **&times;** //otherValue//. Returns a BigNumber with the value of //BigNumber// **&times;** //otherValue//.
_property: BigNumber.div(divisor) => [[BigNumber]] @SRC<bignumber> _property: bigNumber.div(divisor) => [[BigNumber]] @SRC<bignumber>
Returns a BigNumber with the value of //BigNumber// **&div;** //divisor//. Returns a BigNumber with the value of //BigNumber// **&div;** //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// &div; //divisor//. Returns a BigNumber with the value of the **remainder** of //BigNumber// &div; //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//. 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//. 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 Returns a BigNumber with the value of //BigNumber// with bits beyond
the //bitcount// least significant bits set to zero. 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. while efficiently preserving mathematical operations.
Most users will not need to interact with these. 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//. 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//. Returns a BigNumber with the value of //BigNumber// converted to twos-complement with //bitwidth//.
_heading: Comparison and Equivalence _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//. 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//. 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// **&le;** //otherValue//. Returns true if and only if the value of //BigNumber// **&le;** //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//. 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// **&ge;** //otherValue//. Returns true if and only if the value of //BigNumber// **&ge;** //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. Returns true if and only if the value of //BigNumber// is zero.
_heading: Conversion _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, Returns the value of //BigNumber// as a [JavaScript BigInt](link-js-bigint) value,
on platforms which support them. 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. Returns the value of //BigNumber// as a JavaScript value.
This will **throw an error** This will **throw an error**
if the value is greater than or equal to //Number.MAX_SAFE_INTEGER// or less than or if the value is greater than or equal to //Number.MAX_SAFE_INTEGER// or less than or
equal to //Number.MIN_SAFE_INTEGER//. 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. 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]]. Returns the value of //BigNumber// as a base-16, ``0x``-prefixed [[DataHexString]].

View File

@@ -89,9 +89,9 @@ The chain ID for //transaction//. This is used as part of
[[link-eip-155]] to prevent replay attacks on different [[link-eip-155]] to prevent replay attacks on different
networks. 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 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. unintended.
There are situations where replay may be desired, however these There are situations where replay may be desired, however these

View File

@@ -91,8 +91,8 @@ New account address: 0x485bcC23ae2E5038ec7ec9b8DCB2A6A6291cC003
Saved: wallet.json Saved: wallet.json
# If you are planning to try out the Ropsten testnet... # If you are planning to try out the Goerli testnet...
/home/ethers> ethers --network ropsten fund 0x485bcC23ae2E5038ec7ec9b8DCB2A6A6291cC003 /home/ethers> ethers --network goerli fund 0x485bcC23ae2E5038ec7ec9b8DCB2A6A6291cC003
Transaction Hash: 0x8dc55b8f8dc8076acded97f9e3ed7d6162460c0221e2769806006b6d7d1156e0 Transaction Hash: 0x8dc55b8f8dc8076acded97f9e3ed7d6162460c0221e2769806006b6d7d1156e0
@@ -168,14 +168,14 @@ the command line to be passed into other commands or stored in script
environment variables. environment variables.
_code: Get the formatted balance of an account @lang<shell> _code: Get the formatted balance of an account @lang<shell>
/home/ethers> ethers --network ropsten \ /home/ethers> ethers --network goerli \
--account wallet.json \ --account wallet.json \
eval \ eval \
'accounts[0].getBalance().then(b => formatEther(b))' 'accounts[0].getBalance().then(b => formatEther(b))'
3.141592653589793238 3.141592653589793238
_code: Get the current block number @lang<shell> _code: Get the current block number @lang<shell>
/home/ethers> ethers --network rinkeby \ /home/ethers> ethers --network goerli \
eval "provider.getBlockNumber()" eval "provider.getBlockNumber()"
5761009 5761009

View File

@@ -2,7 +2,7 @@ _section: Best Practices @<best-practices>
_subsection: Network Changes _subsection: Network Changes
Handling a change in the network (e.g. Ropsten vs Mainnet) is Handling a change in the network (e.g. G&ouml;rli vs Mainnet) is
incredibly complex and a slight failure can at best make your incredibly complex and a slight failure can at best make your
application seem confusing and at worst cause the loss of funds, application seem confusing and at worst cause the loss of funds,
leak private data or misrepresent what an action performed. leak private data or misrepresent what an action performed.

View File

@@ -202,7 +202,7 @@ function codeContextify(context) {
module.exports = { module.exports = {
title: "ethers", title: "ethers",
subtitle: "v5.4", subtitle: "v5.7",
description: "Documentation for ethers, a complete, tiny and simple Ethereum library.", description: "Documentation for ethers, a complete, tiny and simple Ethereum library.",
logo: "logo.svg", logo: "logo.svg",
@@ -210,11 +210,11 @@ module.exports = {
prefix: "/v5", 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;.", 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: { 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, codeContextify: codeContextify,
@@ -225,7 +225,7 @@ module.exports = {
externalLinks: { externalLinks: {
"link-mail": "mailto:me@ricmoo.com", "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-ankr": { name: "Ankr", url: "https:/\/www.ankr.com" },
"link-cloudflare": { name: "Cloudflare", url: "https:/\/developers.cloudflare.com/distributed-web/ethereum-gateway/" }, "link-cloudflare": { name: "Cloudflare", url: "https:/\/developers.cloudflare.com/distributed-web/ethereum-gateway/" },
"link-ens": { name: "ENS", url: "https:/\/ens.domains/" }, "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-debug": "https:/\/github.com/ethereum/go-ethereum/wiki/Management-APIs#debug",
"link-geth-rpc": "https:/\/github.com/ethereum/go-ethereum/wiki/Management-APIs", "link-geth-rpc": "https:/\/github.com/ethereum/go-ethereum/wiki/Management-APIs",
"link-legacy-docs3": "https:/\/docs.ethers.io/v3/", "link-legacy-docs3": "https:/\/docs.ethers.org/v3/",
"link-legacy-docs4": "https:/\/docs.ethers.io/v4/", "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-ci": "https:/\/github.com/ethers-io/ethers.js/actions/runs/158006903",
"link-github-issues": "https:/\/github.com/ethers-io/ethers.js/issues", "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-rlp": { name: "Recursive Length Prefix", url: "https:/\/github.com/ethereum/wiki/wiki/RLP" },
"link-ethersio": "https:/\/ethers.io/", "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-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-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", "link-ethers-asm-grammar": "https:/\/github.com/ethers-io/ethers.js/blob/master/packages/asm/grammar.jison",

View File

@@ -1,5 +1,9 @@
_section: Documentation @<documentation> _section: Documentation @<documentation>
This documentation is for Ethers v5.
For Ethers v6, see [v6 beta documentation](link-beta-docs6).
_subsection: What is Ethers? @<preamble> _subsection: What is Ethers? @<preamble>
The ethers.js library aims to be a complete and compact library for The ethers.js library aims to be a complete and compact library for

View File

@@ -22,17 +22,17 @@ const Words = fs_1.default.readFileSync("/usr/share/dict/words").toString().spli
}, {}); }, {});
` `
// Words missing from the dictionary // 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 clamping compiled computed configured consumed contained creating decoded decoding
decreased decrypt decrypted decrypting deployed deploying deprecated detected decreased decrypt decrypted decrypting deployed deploying deprecated detected
discontinued earliest email emitted enabled encoded encoder encoding encountered discontinued earliest email emitted enabled encoded encoder encoding encountered
encrypt encrypted encrypting entries euro exceeded existing expected 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 hardened has highly ignoring implemented implementer imported including instantiate
joined keyword labelled larger lookup matches mined modified modifies multi joined keyword labelled larger lookup matches mined modified modifies multi
named needed nested neutered numeric offline optimizer overriding owned packed named needed nested neutered numeric offline optimizer overriding owned packed
padded parsed parsing passed payload placeholder processing properties prototyping reached 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 serializes shared signed signing skipped stats stored supported tagging targetted
throttled transactions typed uninstall unstake unsubscribe untyped throttled transactions typed uninstall unstake unsubscribe untyped
using verifies verifying website 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 abi addr api app arg arrayify asm backend basex bigint bignumber bn byte
bytecode callback calldata ccip charset checksum ciphertext cli codepoint bytecode callback calldata ccip charset checksum ciphertext cli codepoint
commify config 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 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 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 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 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 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 alchemyapi ankr arbitrum Cloudflare com Etherscan INFURA IPFS IPNS MetaMask Nodesmith
Trezor ledgerhq axic bitcoinjs browserify easyseed ethereumjs Trezor ledgerhq axic bitcoinjs browserify easyseed ethereumjs
goerli homestead kotti kovan mainnet morden mordor rinkeby kintsugi goerli homestead kotti kovan mainnet morden mordor rinkeby kintsugi
ropsten skynet testnet lb maticmum ropsten sepolia skynet testnet lb maticmum
// Demo words // Demo words
args foo eth foo foobar ll localhost passwd ricmoo tx xxx yna args foo eth foo foobar ll localhost passwd ricmoo tx xxx yna

View File

@@ -141,7 +141,7 @@ function getFiles(basedir) {
} }
(function () { (function () {
return __awaiter(this, void 0, void 0, 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 awsAccessId = yield config_1.config.get("aws-upload-docs-accesskey");
const awsSecretKey = yield config_1.config.get("aws-upload-docs-secretkey"); const awsSecretKey = yield config_1.config.get("aws-upload-docs-secretkey");
const s3 = new aws_sdk_1.default.S3({ const s3 = new aws_sdk_1.default.S3({
@@ -152,7 +152,9 @@ function getFiles(basedir) {
const added = [], removed = [], changed = [], upload = []; const added = [], removed = [], changed = [], upload = [];
const basedir = (0, path_2.resolve)("docs"); const basedir = (0, path_2.resolve)("docs");
const local = yield getFiles(basedir); const local = yield getFiles(basedir);
console.log("LOCAL", local);
const remote = yield getKeys(s3, bucket); const remote = yield getKeys(s3, bucket);
console.log("REMOTE", remote);
Object.keys(local).forEach((filename) => { Object.keys(local).forEach((filename) => {
if (!remote[filename]) { if (!remote[filename]) {
added.push(filename); added.push(filename);
@@ -176,8 +178,9 @@ function getFiles(basedir) {
console.log('Removed: ', removed.length); console.log('Removed: ', removed.length);
console.log('Changed: ', changed.length); console.log('Changed: ', changed.length);
for (let i = 0; i < upload.length; i++) { for (let i = 0; i < upload.length; i++) {
const filename = upload[i]; const _filename = upload[i];
const content = fs_1.default.readFileSync((0, path_1.join)(basedir, filename)); 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)`); console.log(`Uploading: ${filename} (${content.length} bytes)`);
yield putObject(s3, bucket, filename, content); yield putObject(s3, bucket, filename, content);
} }

View File

@@ -13,17 +13,17 @@ const Words = fs.readFileSync("/usr/share/dict/words").toString().split("\n").re
` `
// Words missing from the dictionary // 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 clamping compiled computed configured consumed contained creating decoded decoding
decreased decrypt decrypted decrypting deployed deploying deprecated detected decreased decrypt decrypted decrypting deployed deploying deprecated detected
discontinued earliest email emitted enabled encoded encoder encoding encountered discontinued earliest email emitted enabled encoded encoder encoding encountered
encrypt encrypted encrypting entries euro exceeded existing expected 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 hardened has highly ignoring implemented implementer imported including instantiate
joined keyword labelled larger lookup matches mined modified modifies multi joined keyword labelled larger lookup matches mined modified modifies multi
named needed nested neutered numeric offline optimizer overriding owned packed named needed nested neutered numeric offline optimizer overriding owned packed
padded parsed parsing passed payload placeholder processing properties prototyping reached 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 serializes shared signed signing skipped stats stored supported tagging targetted
throttled transactions typed uninstall unstake unsubscribe untyped throttled transactions typed uninstall unstake unsubscribe untyped
using verifies verifying website 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 abi addr api app arg arrayify asm backend basex bigint bignumber bn byte
bytecode callback calldata ccip charset checksum ciphertext cli codepoint bytecode callback calldata ccip charset checksum ciphertext cli codepoint
commify config 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 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 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 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 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 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 alchemyapi ankr arbitrum Cloudflare com Etherscan INFURA IPFS IPNS MetaMask Nodesmith
Trezor ledgerhq axic bitcoinjs browserify easyseed ethereumjs Trezor ledgerhq axic bitcoinjs browserify easyseed ethereumjs
goerli homestead kotti kovan mainnet morden mordor rinkeby kintsugi goerli homestead kotti kovan mainnet morden mordor rinkeby kintsugi
ropsten skynet testnet lb maticmum ropsten sepolia skynet testnet lb maticmum
// Demo words // Demo words
args foo eth foo foobar ll localhost passwd ricmoo tx xxx yna args foo eth foo foobar ll localhost passwd ricmoo tx xxx yna

View File

@@ -132,7 +132,7 @@ function getFiles(basedir: string): Record<string, string> {
} }
(async function() { (async function() {
const bucket = "docs.ethers.io"; const bucket = "ethers.org";
const awsAccessId = await config.get("aws-upload-docs-accesskey"); const awsAccessId = await config.get("aws-upload-docs-accesskey");
const awsSecretKey = await config.get("aws-upload-docs-secretkey"); 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 basedir = resolve("docs");
const local = await getFiles(basedir); const local = await getFiles(basedir);
console.log("LOCAL", local);
const remote = await getKeys(s3, bucket); const remote = await getKeys(s3, bucket);
console.log("REMOTE", remote);
Object.keys(local).forEach((filename) => { Object.keys(local).forEach((filename) => {
if (!remote[filename]) { if (!remote[filename]) {
@@ -174,8 +176,9 @@ function getFiles(basedir: string): Record<string, string> {
console.log('Changed: ', changed.length); console.log('Changed: ', changed.length);
for (let i = 0; i < upload.length; i++) { for (let i = 0; i < upload.length; i++) {
const filename = upload[i]; const _filename = upload[i];
const content = fs.readFileSync(join(basedir, filename)); const content = fs.readFileSync(join(basedir, _filename));
const filename = join("docs", _filename);
console.log(`Uploading: ${ filename } (${ content.length } bytes)`); console.log(`Uploading: ${ filename } (${ content.length } bytes)`);
await putObject(s3, bucket, filename, content); await putObject(s3, bucket, filename, content);
} }