Skip to content

Commit 3807726

Browse files
ernestognwAmxx
andauthored
Bump ethers to 6.16.0 (#6279)
Co-authored-by: Hadrien Croubois <[email protected]>
1 parent 1004347 commit 3807726

File tree

4 files changed

+20
-18
lines changed

4 files changed

+20
-18
lines changed

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
"chai": "^4.2.0",
6969
"eslint": "^9.0.0",
7070
"eslint-config-prettier": "^10.0.0",
71-
"ethers": "^6.14.0",
71+
"ethers": "^6.16.0",
7272
"glob": "^13.0.0",
7373
"globals": "^16.0.0",
7474
"graphlib": "^2.1.8",

test/helpers/trie.js

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,17 @@ class BlockTries {
1010

1111
this._ready = Promise.all(
1212
block.transactions.map(hash =>
13-
block.getTransaction(hash).then(tx =>
14-
Promise.all([
15-
// Transaction
16-
this.transactionTrie.put(BlockTries.indexToKeyBytes(tx.index), BlockTries.serializeTransaction(tx)),
17-
// Receipt
18-
tx
19-
.wait()
20-
.then(receipt =>
21-
this.receiptTrie.put(BlockTries.indexToKeyBytes(tx.index), BlockTries.serializeReceipt(receipt)),
22-
),
23-
]),
24-
),
13+
block
14+
.getTransaction(hash)
15+
.then(async tx => [tx, await tx.wait()])
16+
.then(([tx, receipt]) =>
17+
Promise.all([
18+
// Transaction
19+
this.transactionTrie.put(BlockTries.indexToKeyBytes(receipt.index), BlockTries.serializeTransaction(tx)),
20+
// Receipt
21+
this.receiptTrie.put(BlockTries.indexToKeyBytes(receipt.index), BlockTries.serializeReceipt(receipt)),
22+
]),
23+
),
2524
),
2625
).then(() => this);
2726
}

test/utils/cryptography/MerkleProof.test.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,10 @@ describe('MerkleProof', function () {
187187
const root = nodeHash(leave, ethers.ZeroHash);
188188

189189
// Now we can pass any **malicious** fake leaves as valid!
190-
const maliciousLeaves = ['malicious', 'leaves'].map(ethers.id).map(ethers.toBeArray).sort(Buffer.compare);
190+
const maliciousLeaves = ['malicious', 'leaves']
191+
.map(ethers.id)
192+
.map(id => ethers.toBeArray(id))
193+
.sort(Buffer.compare);
191194
const maliciousProof = [leave, leave];
192195
const maliciousProofFlags = [true, true, false];
193196

0 commit comments

Comments
 (0)