Skip to content

Commit 0f16aa2

Browse files
committed
docs: random small fixes (#4990, #4991, #5000, #5003, #5010, #5024)
1 parent 540f30c commit 0f16aa2

File tree

6 files changed

+35
-13
lines changed

6 files changed

+35
-13
lines changed

CHANGELOG.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ ethers/v6.13.6 (2025-03-21 18:21)
6363
- tests: added browser tests for sending ([afd613a](https://github.com/ethers-io/ethers.js/commit/afd613a2a0c9fb548805ed36e23ad9a5d4bcc239)).
6464
- tests: debugging browser tests failing to launch ([d1baa74](https://github.com/ethers-io/ethers.js/commit/d1baa741f6b272ba692e0e78787cacb1bd42a8b4)).
6565
- tests: fix assert call for browser assert ([1806bbd](https://github.com/ethers-io/ethers.js/commit/1806bbde27523933fb140ad985426f94e0286faf)).
66-
- tests: inlcude more node tests in the browser tests ([92fd5d1](https://github.com/ethers-io/ethers.js/commit/92fd5d1f47c640caa7100bcccf0b133e866989e6)).
66+
- tests: include more node tests in the browser tests ([92fd5d1](https://github.com/ethers-io/ethers.js/commit/92fd5d1f47c640caa7100bcccf0b133e866989e6)).
6767
- tests: move more tests to dev network ([996f30c](https://github.com/ethers-io/ethers.js/commit/996f30c674002cea316fa7aa3929f43409f934bc)).
6868
- tests: debugging CI browser failure ([ce7212d](https://github.com/ethers-io/ethers.js/commit/ce7212d03d6867081603794f0480f31d053823c4)).
6969
- tests: debugging CI browser failure ([f1821a6](https://github.com/ethers-io/ethers.js/commit/f1821a696763938ca9d44815bdcd5cc043eb3900)).
@@ -316,7 +316,7 @@ ethers/v6.5.0 (2023-06-06 22:41)
316316
- Fixed type guard for non-Typed instances ([#4087](https://github.com/ethers-io/ethers.js/issues/4087); [20c3d1b](https://github.com/ethers-io/ethers.js/commit/20c3d1b109743e33ab60a75d69bf7ede73b15ce2)).
317317
- Add confirmations to TransactionResponse ([#4094](https://github.com/ethers-io/ethers.js/issues/4094); [bb8685b](https://github.com/ethers-io/ethers.js/commit/bb8685b112ce1c689c740d4dbcb358c16fb9b22d)).
318318
- Fix stray promises when a node returns invalid results ([#4118](https://github.com/ethers-io/ethers.js/issues/4118); [3c1bad2](https://github.com/ethers-io/ethers.js/commit/3c1bad2fb7ad4a6ff90ff11f3e382fd18e41c800)).
319-
- Added support to detect and stop providers spinning on intitial network detection ([#4015](https://github.com/ethers-io/ethers.js/issues/4015); [f37a52d](https://github.com/ethers-io/ethers.js/commit/f37a52da28ac130b7f4de52901618320994ea87a)).
319+
- Added support to detect and stop providers spinning on initial network detection ([#4015](https://github.com/ethers-io/ethers.js/issues/4015); [f37a52d](https://github.com/ethers-io/ethers.js/commit/f37a52da28ac130b7f4de52901618320994ea87a)).
320320

321321
ethers/v6.4.2 (2023-06-05 22:41)
322322
--------------------------------
@@ -344,7 +344,7 @@ ethers/v6.4.0 (2023-05-18 17:28)
344344
- Fix receipt gas price when effectiveGasPrice is 0 on testnets ([#4014](https://github.com/ethers-io/ethers.js/issues/4014); [2b0fe61](https://github.com/ethers-io/ethers.js/commit/2b0fe611335432aee334d777a64d8c7827881618)).
345345
- Added error event to provider ([#3970](https://github.com/ethers-io/ethers.js/issues/3970), [#3982](https://github.com/ethers-io/ethers.js/issues/3982); [af0291c](https://github.com/ethers-io/ethers.js/commit/af0291c01639674658f5049343da88a84da763a1)).
346346
- Removed superfluous parameters for internal transaction functions ([e848978](https://github.com/ethers-io/ethers.js/commit/e8489787585c2e69a23f6cdec6901f22b096aebe)).
347-
- More aggresive tree-shaking ([076edad](https://github.com/ethers-io/ethers.js/commit/076edad81ef62474f48f2b4c8af0edc6e4fd64f2)).
347+
- More aggressive tree-shaking ([076edad](https://github.com/ethers-io/ethers.js/commit/076edad81ef62474f48f2b4c8af0edc6e4fd64f2)).
348348
- More flexible static network checking ([#3834](https://github.com/ethers-io/ethers.js/issues/3834); [7c0465c](https://github.com/ethers-io/ethers.js/commit/7c0465c5fb834eba18d4e5535072685bdc1029f0)).
349349
- Support transitive dependants that use non-node16 moduleResolution ([#3920](https://github.com/ethers-io/ethers.js/issues/3920); [df685b1](https://github.com/ethers-io/ethers.js/commit/df685b1bd9ad346ee7863beb6c3ca3f4e94932a2)).
350350
- Populate any missing log.removed with false ([#3959](https://github.com/ethers-io/ethers.js/issues/3959); [4e478e6](https://github.com/ethers-io/ethers.js/commit/4e478e625d5648f2172631eef5fda5776ee776b0)).

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ in [TypeScript](https://www.typescriptlang.org).
1919
- Import and export **JSON wallets** (Geth, Parity and crowdsale)
2020
- Import and export BIP 39 **mnemonic phrases** (12 word backup phrases) and **HD Wallets** (English as well as Czech, French, Italian, Japanese, Korean, Simplified Chinese, Spanish, Traditional Chinese)
2121
- Meta-classes create JavaScript objects from any contract ABI, including **ABIv2** and **Human-Readable ABI**
22-
- Connect to Ethereum nodes over [JSON-RPC](https://github.com/ethereum/wiki/wiki/JSON-RPC), [INFURA](https://infura.io), [Etherscan](https://etherscan.io), [Alchemy](https://alchemyapi.io), [Ankr](https://ankr.com) or [MetaMask](https://metamask.io)
22+
- Connect to Ethereum nodes over [JSON-RPC](https://ethereum.org/en/developers/docs/apis/json-rpc/), [INFURA](https://infura.io), [Etherscan](https://etherscan.io), [Alchemy](https://alchemyapi.io), [Ankr](https://ankr.com) or [MetaMask](https://metamask.io)
2323
- **ENS names** are first-class citizens; they can be used anywhere an Ethereum addresses can be used
2424
- **Small** (~144kb compressed; 460kb uncompressed)
2525
- **Tree-shaking** focused; include only what you need during bundling

docs.wrm/getting-started.wrm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ _code: listen for ERC-20 events @lang<script>
419419
})
420420

421421
// Listen for any Transfer to "ethers.eth"
422-
filter = contract.filters.Transfer("ethers.eth")
422+
filter = contract.filters.Transfer(null, "ethers.eth")
423423
contract.on(filter, (from, to, amount, event) => {
424424
// `to` will always be equal to the address of "ethers.eth"
425425
});
@@ -462,7 +462,7 @@ _code: query historic ERC-20 events @lang<javascript>
462462
//_result:
463463

464464
// Query all time for any transfer to ethers.eth
465-
filter = contract.filters.Transfer("ethers.eth")
465+
filter = contract.filters.Transfer(null, "ethers.eth")
466466
events = await contract.queryFilter(filter)
467467

468468
// The first matching event

docs.wrm/migrating.wrm

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,28 @@ _code: Getting legacy gas price @lang<script>
263263
// v6
264264
(await provider.getFeeData()).gasPrice
265265

266+
_null:
267+
268+
The `lastBaseFeePerGas` field has been removed from the `FeeData` object in v6.
269+
This field was commonly used in v5 to calculate target gas prices by adding it
270+
to `maxPriorityFeePerGas`. In v6, this calculation is handled automatically.
271+
272+
_code: Base fee handling @lang<script>
273+
// v5: Manual calculation using lastBaseFeePerGas
274+
feeData = await provider.getFeeData()
275+
targetGasPrice = feeData.maxPriorityFeePerGas.add(feeData.lastBaseFeePerGas)
276+
277+
// v6: Use maxFeePerGas (automatically calculated using EIP-1559 heuristics)
278+
feeData = await provider.getFeeData()
279+
targetGasPrice = feeData.maxFeePerGas
280+
281+
// v6: Alternative - get base fee from latest block if needed
282+
block = await provider.getBlock("latest")
283+
baseFeePerGas = block.baseFeePerGas // i.e. lastBaseFeePerGas
284+
285+
// v6: Manual calculation (if you need the old behavior)
286+
targetGasPrice = feeData.maxPriorityFeePerGas + block.baseFeePerGas
287+
266288

267289
_subsection: Signatures @<migrate-signatures>
268290

src.ts/contract/contract.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,7 @@ export class BaseContract implements Addressable, EventEmitterable<ContractEvent
643643
* The target to connect to.
644644
*
645645
* This can be an address, ENS name or any [[Addressable]], such as
646-
* another contract. To get the resovled address, use the ``getAddress``
646+
* another contract. To get the resolved address, use the ``getAddress``
647647
* method.
648648
*/
649649
readonly target!: string | Addressable;
@@ -841,7 +841,7 @@ export class BaseContract implements Addressable, EventEmitterable<ContractEvent
841841
* resolve immediately if already deployed.
842842
*/
843843
async waitForDeployment(): Promise<this> {
844-
// We have the deployement transaction; just use that (throws if deployement fails)
844+
// We have the deployment transaction; just use that (throws if deployment fails)
845845
const deployTx = this.deploymentTransaction();
846846
if (deployTx) {
847847
await deployTx.wait();
@@ -884,7 +884,7 @@ export class BaseContract implements Addressable, EventEmitterable<ContractEvent
884884
/**
885885
* Return the function for a given name. This is useful when a contract
886886
* method name conflicts with a JavaScript name such as ``prototype`` or
887-
* when using a Contract programatically.
887+
* when using a Contract programmatically.
888888
*/
889889
getFunction<T extends ContractMethod = ContractMethod>(key: string | FunctionFragment): T {
890890
if (typeof(key) !== "string") { key = key.format(); }
@@ -895,7 +895,7 @@ export class BaseContract implements Addressable, EventEmitterable<ContractEvent
895895
/**
896896
* Return the event for a given name. This is useful when a contract
897897
* event name conflicts with a JavaScript name such as ``prototype`` or
898-
* when using a Contract programatically.
898+
* when using a Contract programmatically.
899899
*/
900900
getEvent(key: string | EventFragment): ContractEvent {
901901
if (typeof(key) !== "string") { key = key.format(); }

src.ts/wordlists/generation/encode-latin.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
// is encountered.
1717
//
1818
// The fold operation can be repeated for large sets as even within
19-
// each folded set, there is substatial overlap in prefix. With the
19+
// each folded set, there is substantial overlap in prefix. With the
2020
// second special symbol ";", we get:
2121
// [ ; x 13, other, :, ple, ricot, :, ; x 18, ead ]
2222
// which can be further compressed by using numbers instead of the
@@ -31,7 +31,7 @@
3131
//
3232
// Once the entire latin-1 set has been collapsed, we use the remaining
3333
// printable characters (except " and \, which require 2 bytes to represent
34-
// in string) to substiture for the most common 2-letter pairs of letters
34+
// in string) to substitute for the most common 2-letter pairs of letters
3535
// in the string.
3636
//
3737
// OWLA Accent Format
@@ -55,7 +55,7 @@
5555
// 00 10 01 01 10 = 001001 1010xx
5656
//
5757
// The base-64 set used has all number replaced with their
58-
// shifted-counterparts to prevent comflicting with the numbers used in
58+
// shifted-counterparts to prevent conflicting with the numbers used in
5959
// the fold operation to indicate the number of ";".
6060

6161
import fs from "fs";

0 commit comments

Comments
 (0)