Skip to content

Commit e7165a6

Browse files
committed
Merge branch 'main' into wip-v6.14
2 parents e5036e7 + 158f5d0 commit e7165a6

File tree

152 files changed

+1487
-677
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

152 files changed

+1487
-677
lines changed

.github/workflows/test-browser.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ jobs:
1717
runs-on: ubuntu-latest
1818

1919
environment: ethers-tests
20+
env:
21+
FAUCET_PRIVATEKEY: ${{ secrets.FAUCET_PRIVATEKEY }}
2022

2123
strategy:
2224
fail-fast: false

.github/workflows/test-ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ jobs:
7070

7171
- name: Install and run Geth
7272
uses: ethers-io/run-geth-action@main
73-
73+
7474
- name: Checkout repository
7575
uses: actions/checkout@v2
7676

@@ -84,7 +84,7 @@ jobs:
8484
run: npm run test-coverage
8585

8686
- name: Store coverage summary artifact
87-
uses: actions/upload-artifact@v2
87+
uses: actions/upload-artifact@v4
8888
with:
8989
name: coverage-summary
9090
path: ./output/summary.txt
@@ -93,7 +93,7 @@ jobs:
9393
run: tar -cvf ./output/coverage.tar ./output/lcov-report/
9494

9595
- name: Store full coverage artifact
96-
uses: actions/upload-artifact@v2
96+
uses: actions/upload-artifact@v4
9797
with:
9898
name: coverage-complete
9999
path: ./output/coverage.tar

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,7 @@ output/**
55
**/*.swp
66
**/*.tgz
77
dist/*.gz
8+
9+
**/.DS_Store
10+
11+
.iterm2-project

.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ testcases/**
2525

2626
# Ignore random junk
2727
.DS_Store
28+
.iterm2-project
2829
node_modules/**
2930
misc/**
3031
**/*.tgz

CHANGELOG.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,24 @@ Change Log
33

44
This change log is maintained by `src.ts/_admin/update-changelog.ts` but may also be manually updated.
55

6+
ethers/v6.13.5 (2025-01-04 15:26)
7+
---------------------------------
8+
9+
- Use local dev net for testing Typed API to prevent tests getting throttled ([7654ee3](https://github.com/ethers-io/ethers.js/commit/7654ee3c6487171a4e13207accfc90f93a22b0fc)).
10+
- Fixed bad logic for searching prefetched transactions by hash ([#4868](https://github.com/ethers-io/ethers.js/issues/4868); [ef3c9bc](https://github.com/ethers-io/ethers.js/commit/ef3c9bc3afb9e36a073bbd3572e9021a852bd2c4)).
11+
- Add newline delimiter to IPC providers for broader support ([#4847](https://github.com/ethers-io/ethers.js/issues/4847); [474a8de](https://github.com/ethers-io/ethers.js/commit/474a8ded2b94a563067d3b4dd5f60ec0725b9a27)).
12+
13+
ethers/v6.13.4 (2024-10-10 18:01)
14+
---------------------------------
15+
16+
- Updated dependencies ([1d717ef](https://github.com/ethers-io/ethers.js/commit/1d717ef940b77d4ca9b350aa3aa159a40a547ac0)).
17+
- Fixed bug in JSON-RPC error checking ([#4827](https://github.com/ethers-io/ethers.js/issues/4827), [#4837](https://github.com/ethers-io/ethers.js/issues/4837), [#4851](https://github.com/ethers-io/ethers.js/issues/4851); [be3e6b1](https://github.com/ethers-io/ethers.js/commit/be3e6b14433bc88ad8c0c98a4f3a2a627cea6b99)).
18+
19+
ethers/v6.13.3 (2024-09-30 22:08)
20+
---------------------------------
21+
22+
- Allow CCIP-read to continue during low-level fetch failures ([#4842](https://github.com/ethers-io/ethers.js/issues/4842); [1c31f95](https://github.com/ethers-io/ethers.js/commit/1c31f95f7a1e4993ca0f1706002a975a0060dd88)).
23+
624
ethers/v6.13.2 (2024-07-25 17:54)
725
---------------------------------
826

@@ -45,7 +63,7 @@ ethers/v6.12.0 (2024-04-17 01:09)
4563
- Added prevRandao to block ([#3372](https://github.com/ethers-io/ethers.js/issues/3372); [ec6a754](https://github.com/ethers-io/ethers.js/commit/ec6a754f0c8647dae59c73b2589225cb200d83dd)).
4664
- Added Polygon Amoy testnet ([#4645](https://github.com/ethers-io/ethers.js/issues/4645); [1717abb](https://github.com/ethers-io/ethers.js/commit/1717abbf29a14a6f6b106e479fe9a5b1f8768dc4)).
4765
- Added Chainstack provider ([#2741](https://github.com/ethers-io/ethers.js/issues/2741); [014004d](https://github.com/ethers-io/ethers.js/commit/014004d9402d7fd8c15553792cfb7a8a84ed327a)).
48-
- Added deep convertion to Result for toObject and toArray ([#4681](https://github.com/ethers-io/ethers.js/issues/4681); [03bfe2a](https://github.com/ethers-io/ethers.js/commit/03bfe2a4f7b29b15cd90127974b7fc1d8b03edf9)).
66+
- Added deep conversion to Result for toObject and toArray ([#4681](https://github.com/ethers-io/ethers.js/issues/4681); [03bfe2a](https://github.com/ethers-io/ethers.js/commit/03bfe2a4f7b29b15cd90127974b7fc1d8b03edf9)).
4967
- Added EIP-4844 broadcast support ([92bad88](https://github.com/ethers-io/ethers.js/commit/92bad88261a5d8a538535a7d5528162fe5010527)).
5068
- Fix ignored throttle parameters ([#4663](https://github.com/ethers-io/ethers.js/issues/4663); [12772e9](https://github.com/ethers-io/ethers.js/commit/12772e9498b70f8538838f30e16f3792ea90e173)).
5169

@@ -186,7 +204,7 @@ ethers/v6.6.4 (2023-07-16 00:35)
186204
ethers/v6.6.3 (2023-07-11 20:55)
187205
--------------------------------
188206

189-
- Throw more desscriptive error for unconfigured ENS name contract targets ([#4213](https://github.com/ethers-io/ethers.js/issues/4213); [80f62ef](https://github.com/ethers-io/ethers.js/commit/80f62efc41c3a29e690af40a1976928b7f886a0e)).
207+
- Throw more descriptive error for unconfigured ENS name contract targets ([#4213](https://github.com/ethers-io/ethers.js/issues/4213); [80f62ef](https://github.com/ethers-io/ethers.js/commit/80f62efc41c3a29e690af40a1976928b7f886a0e)).
190208
- Fixed contract once not running stop callback ([7d061b7](https://github.com/ethers-io/ethers.js/commit/7d061b786f72cbfc461bf80d139d10aeff533a6e)).
191209

192210
ethers/v6.6.2 (2023-06-27 23:30)
@@ -283,7 +301,7 @@ ethers/v6.2.0 (2023-03-20 15:53)
283301
--------------------------------
284302

285303
- Added extra details in the error info field for RPC errors ([30ffa78](https://github.com/ethers-io/ethers.js/commit/30ffa78d1441fa033677fa09237fc135a314f373)).
286-
- Remove Ankr as a deafult for now as the provided API key is failing ([6e01e54](https://github.com/ethers-io/ethers.js/commit/6e01e5448f4a3e2d30288d4c8447db295c3a2e7a)).
304+
- Remove Ankr as a default for now as the provided API key is failing ([6e01e54](https://github.com/ethers-io/ethers.js/commit/6e01e5448f4a3e2d30288d4c8447db295c3a2e7a)).
287305
- Fixed deferred filters after unsafe-eval changes ([#3749](https://github.com/ethers-io/ethers.js/issues/3749), [#3763](https://github.com/ethers-io/ethers.js/issues/3763); [2e3802a](https://github.com/ethers-io/ethers.js/commit/2e3802a83b8ad2f5a6269d79fbd1c83c9f2d1047)).
288306
- Remove use of Function sub-class to address unsafe-eval issues ([#3749](https://github.com/ethers-io/ethers.js/issues/3749), [#3763](https://github.com/ethers-io/ethers.js/issues/3763); [7d3af51](https://github.com/ethers-io/ethers.js/commit/7d3af512c75b4c24027ec2daef1e9f4c1064194a)).
289307
- Added verifyTypedData utility (reported on Farcaster) ([f06a445](https://github.com/ethers-io/ethers.js/commit/f06a445247f3b294f9fc805cc8fe0752accb8edc)).

dist/ethers.js

Lines changed: 41 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
33
/**
44
* The current version of Ethers.
55
*/
6-
const version = "6.13.2";
6+
const version = "6.13.5";
77

88
/**
99
* Property helper functions.
@@ -219,7 +219,7 @@ function assertArgumentCount(count, expectedCount, message) {
219219
if (message) {
220220
message = ": " + message;
221221
}
222-
assert(count >= expectedCount, "missing arguemnt" + message, "MISSING_ARGUMENT", {
222+
assert(count >= expectedCount, "missing argument" + message, "MISSING_ARGUMENT", {
223223
count: count,
224224
expectedCount: expectedCount
225225
});
@@ -3659,11 +3659,10 @@ const u64 = {
36593659
rotlSH, rotlSL, rotlBH, rotlBL,
36603660
add, add3L, add3H, add4L, add4H, add5H, add5L,
36613661
};
3662-
var u64$1 = u64;
36633662

36643663
// Round contants (first 32 bits of the fractional parts of the cube roots of the first 80 primes 2..409):
36653664
// prettier-ignore
3666-
const [SHA512_Kh, SHA512_Kl] = /* @__PURE__ */ (() => u64$1.split([
3665+
const [SHA512_Kh, SHA512_Kl] = /* @__PURE__ */ (() => u64.split([
36673666
'0x428a2f98d728ae22', '0x7137449123ef65cd', '0xb5c0fbcfec4d3b2f', '0xe9b5dba58189dbbc',
36683667
'0x3956c25bf348b538', '0x59f111f1b605d019', '0x923f82a4af194f9b', '0xab1c5ed5da6d8118',
36693668
'0xd807aa98a3030242', '0x12835b0145706fbe', '0x243185be4ee4b28c', '0x550c7dc3d5ffb4e2',
@@ -3746,36 +3745,36 @@ class SHA512 extends SHA2 {
37463745
// s0 := (w[i-15] rightrotate 1) xor (w[i-15] rightrotate 8) xor (w[i-15] rightshift 7)
37473746
const W15h = SHA512_W_H[i - 15] | 0;
37483747
const W15l = SHA512_W_L[i - 15] | 0;
3749-
const s0h = u64$1.rotrSH(W15h, W15l, 1) ^ u64$1.rotrSH(W15h, W15l, 8) ^ u64$1.shrSH(W15h, W15l, 7);
3750-
const s0l = u64$1.rotrSL(W15h, W15l, 1) ^ u64$1.rotrSL(W15h, W15l, 8) ^ u64$1.shrSL(W15h, W15l, 7);
3748+
const s0h = u64.rotrSH(W15h, W15l, 1) ^ u64.rotrSH(W15h, W15l, 8) ^ u64.shrSH(W15h, W15l, 7);
3749+
const s0l = u64.rotrSL(W15h, W15l, 1) ^ u64.rotrSL(W15h, W15l, 8) ^ u64.shrSL(W15h, W15l, 7);
37513750
// s1 := (w[i-2] rightrotate 19) xor (w[i-2] rightrotate 61) xor (w[i-2] rightshift 6)
37523751
const W2h = SHA512_W_H[i - 2] | 0;
37533752
const W2l = SHA512_W_L[i - 2] | 0;
3754-
const s1h = u64$1.rotrSH(W2h, W2l, 19) ^ u64$1.rotrBH(W2h, W2l, 61) ^ u64$1.shrSH(W2h, W2l, 6);
3755-
const s1l = u64$1.rotrSL(W2h, W2l, 19) ^ u64$1.rotrBL(W2h, W2l, 61) ^ u64$1.shrSL(W2h, W2l, 6);
3753+
const s1h = u64.rotrSH(W2h, W2l, 19) ^ u64.rotrBH(W2h, W2l, 61) ^ u64.shrSH(W2h, W2l, 6);
3754+
const s1l = u64.rotrSL(W2h, W2l, 19) ^ u64.rotrBL(W2h, W2l, 61) ^ u64.shrSL(W2h, W2l, 6);
37563755
// SHA256_W[i] = s0 + s1 + SHA256_W[i - 7] + SHA256_W[i - 16];
3757-
const SUMl = u64$1.add4L(s0l, s1l, SHA512_W_L[i - 7], SHA512_W_L[i - 16]);
3758-
const SUMh = u64$1.add4H(SUMl, s0h, s1h, SHA512_W_H[i - 7], SHA512_W_H[i - 16]);
3756+
const SUMl = u64.add4L(s0l, s1l, SHA512_W_L[i - 7], SHA512_W_L[i - 16]);
3757+
const SUMh = u64.add4H(SUMl, s0h, s1h, SHA512_W_H[i - 7], SHA512_W_H[i - 16]);
37593758
SHA512_W_H[i] = SUMh | 0;
37603759
SHA512_W_L[i] = SUMl | 0;
37613760
}
37623761
let { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;
37633762
// Compression function main loop, 80 rounds
37643763
for (let i = 0; i < 80; i++) {
37653764
// S1 := (e rightrotate 14) xor (e rightrotate 18) xor (e rightrotate 41)
3766-
const sigma1h = u64$1.rotrSH(Eh, El, 14) ^ u64$1.rotrSH(Eh, El, 18) ^ u64$1.rotrBH(Eh, El, 41);
3767-
const sigma1l = u64$1.rotrSL(Eh, El, 14) ^ u64$1.rotrSL(Eh, El, 18) ^ u64$1.rotrBL(Eh, El, 41);
3765+
const sigma1h = u64.rotrSH(Eh, El, 14) ^ u64.rotrSH(Eh, El, 18) ^ u64.rotrBH(Eh, El, 41);
3766+
const sigma1l = u64.rotrSL(Eh, El, 14) ^ u64.rotrSL(Eh, El, 18) ^ u64.rotrBL(Eh, El, 41);
37683767
//const T1 = (H + sigma1 + Chi(E, F, G) + SHA256_K[i] + SHA256_W[i]) | 0;
37693768
const CHIh = (Eh & Fh) ^ (~Eh & Gh);
37703769
const CHIl = (El & Fl) ^ (~El & Gl);
37713770
// T1 = H + sigma1 + Chi(E, F, G) + SHA512_K[i] + SHA512_W[i]
37723771
// prettier-ignore
3773-
const T1ll = u64$1.add5L(Hl, sigma1l, CHIl, SHA512_Kl[i], SHA512_W_L[i]);
3774-
const T1h = u64$1.add5H(T1ll, Hh, sigma1h, CHIh, SHA512_Kh[i], SHA512_W_H[i]);
3772+
const T1ll = u64.add5L(Hl, sigma1l, CHIl, SHA512_Kl[i], SHA512_W_L[i]);
3773+
const T1h = u64.add5H(T1ll, Hh, sigma1h, CHIh, SHA512_Kh[i], SHA512_W_H[i]);
37753774
const T1l = T1ll | 0;
37763775
// S0 := (a rightrotate 28) xor (a rightrotate 34) xor (a rightrotate 39)
3777-
const sigma0h = u64$1.rotrSH(Ah, Al, 28) ^ u64$1.rotrBH(Ah, Al, 34) ^ u64$1.rotrBH(Ah, Al, 39);
3778-
const sigma0l = u64$1.rotrSL(Ah, Al, 28) ^ u64$1.rotrBL(Ah, Al, 34) ^ u64$1.rotrBL(Ah, Al, 39);
3776+
const sigma0h = u64.rotrSH(Ah, Al, 28) ^ u64.rotrBH(Ah, Al, 34) ^ u64.rotrBH(Ah, Al, 39);
3777+
const sigma0l = u64.rotrSL(Ah, Al, 28) ^ u64.rotrBL(Ah, Al, 34) ^ u64.rotrBL(Ah, Al, 39);
37793778
const MAJh = (Ah & Bh) ^ (Ah & Ch) ^ (Bh & Ch);
37803779
const MAJl = (Al & Bl) ^ (Al & Cl) ^ (Bl & Cl);
37813780
Hh = Gh | 0;
@@ -3784,26 +3783,26 @@ class SHA512 extends SHA2 {
37843783
Gl = Fl | 0;
37853784
Fh = Eh | 0;
37863785
Fl = El | 0;
3787-
({ h: Eh, l: El } = u64$1.add(Dh | 0, Dl | 0, T1h | 0, T1l | 0));
3786+
({ h: Eh, l: El } = u64.add(Dh | 0, Dl | 0, T1h | 0, T1l | 0));
37883787
Dh = Ch | 0;
37893788
Dl = Cl | 0;
37903789
Ch = Bh | 0;
37913790
Cl = Bl | 0;
37923791
Bh = Ah | 0;
37933792
Bl = Al | 0;
3794-
const All = u64$1.add3L(T1l, sigma0l, MAJl);
3795-
Ah = u64$1.add3H(All, T1h, sigma0h, MAJh);
3793+
const All = u64.add3L(T1l, sigma0l, MAJl);
3794+
Ah = u64.add3H(All, T1h, sigma0h, MAJh);
37963795
Al = All | 0;
37973796
}
37983797
// Add the compressed chunk to the current hash value
3799-
({ h: Ah, l: Al } = u64$1.add(this.Ah | 0, this.Al | 0, Ah | 0, Al | 0));
3800-
({ h: Bh, l: Bl } = u64$1.add(this.Bh | 0, this.Bl | 0, Bh | 0, Bl | 0));
3801-
({ h: Ch, l: Cl } = u64$1.add(this.Ch | 0, this.Cl | 0, Ch | 0, Cl | 0));
3802-
({ h: Dh, l: Dl } = u64$1.add(this.Dh | 0, this.Dl | 0, Dh | 0, Dl | 0));
3803-
({ h: Eh, l: El } = u64$1.add(this.Eh | 0, this.El | 0, Eh | 0, El | 0));
3804-
({ h: Fh, l: Fl } = u64$1.add(this.Fh | 0, this.Fl | 0, Fh | 0, Fl | 0));
3805-
({ h: Gh, l: Gl } = u64$1.add(this.Gh | 0, this.Gl | 0, Gh | 0, Gl | 0));
3806-
({ h: Hh, l: Hl } = u64$1.add(this.Hh | 0, this.Hl | 0, Hh | 0, Hl | 0));
3798+
({ h: Ah, l: Al } = u64.add(this.Ah | 0, this.Al | 0, Ah | 0, Al | 0));
3799+
({ h: Bh, l: Bl } = u64.add(this.Bh | 0, this.Bl | 0, Bh | 0, Bl | 0));
3800+
({ h: Ch, l: Cl } = u64.add(this.Ch | 0, this.Cl | 0, Ch | 0, Cl | 0));
3801+
({ h: Dh, l: Dl } = u64.add(this.Dh | 0, this.Dl | 0, Dh | 0, Dl | 0));
3802+
({ h: Eh, l: El } = u64.add(this.Eh | 0, this.El | 0, Eh | 0, El | 0));
3803+
({ h: Fh, l: Fl } = u64.add(this.Fh | 0, this.Fl | 0, Fh | 0, Fl | 0));
3804+
({ h: Gh, l: Gl } = u64.add(this.Gh | 0, this.Gl | 0, Gh | 0, Gl | 0));
3805+
({ h: Hh, l: Hl } = u64.add(this.Hh | 0, this.Hl | 0, Hh | 0, Hl | 0));
38073806
this.set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl);
38083807
}
38093808
roundClean() {
@@ -9531,7 +9530,6 @@ function consume_emoji_reversed(cps, eaten) {
95319530
let {V} = node;
95329531
if (V) { // this is a valid emoji (so far)
95339532
emoji = V;
9534-
if (eaten) eaten.push(...cps.slice(pos).reverse()); // (optional) copy input, used for ens_tokenize()
95359533
cps.length = pos; // truncate
95369534
}
95379535
}
@@ -14316,7 +14314,7 @@ class Block {
1431614314
break;
1431714315
}
1431814316
else {
14319-
if (v.hash === hash) {
14317+
if (v.hash !== hash) {
1432014318
continue;
1432114319
}
1432214320
tx = v;
@@ -18341,7 +18339,18 @@ class AbstractProvider {
1834118339
}
1834218340
this.emit("debug", { action: "sendCcipReadFetchRequest", request, index: i, urls });
1834318341
let errorMessage = "unknown error";
18344-
const resp = await request.send();
18342+
// Fetch the resource...
18343+
let resp;
18344+
try {
18345+
resp = await request.send();
18346+
}
18347+
catch (error) {
18348+
// ...low-level fetch error (missing host, bad SSL, etc.),
18349+
// so try next URL
18350+
errorMessages.push(error.message);
18351+
this.emit("debug", { action: "receiveCcipReadFetchError", request, result: { error } });
18352+
continue;
18353+
}
1834518354
try {
1834618355
const result = resp.bodyJson;
1834718356
if (result.data) {
@@ -20011,7 +20020,7 @@ class JsonRpcSigner extends AbstractSigner {
2001120020
// If the network changed: calling again will also fail
2001220021
// If unsupported: likely destroyed
2001320022
if (isError(error, "CANCELLED") || isError(error, "BAD_DATA") ||
20014-
isError(error, "NETWORK_ERROR" )) {
20023+
isError(error, "NETWORK_ERROR") || isError(error, "UNSUPPORTED_OPERATION")) {
2001520024
if (error.info == null) {
2001620025
error.info = {};
2001720026
}
@@ -23314,7 +23323,7 @@ class NonceManager extends AbstractSigner {
2331423323
class BrowserProvider extends JsonRpcApiPollingProvider {
2331523324
#request;
2331623325
/**
23317-
* Connnect to the %%ethereum%% provider, optionally forcing the
23326+
* Connect to the %%ethereum%% provider, optionally forcing the
2331823327
* %%network%%.
2331923328
*/
2332023329
constructor(ethereum, network, _options) {

dist/ethers.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/ethers.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)