This commit is contained in:
Dmitry Vasilev
2023-05-13 11:13:29 +03:00
parent 8bb4369ba5
commit 5310a0c2d9
4 changed files with 47 additions and 56 deletions

View File

@@ -1,7 +1,6 @@
//import {ethers} from 'https://unpkg.com/ethers/dist/ethers.js'
import {ethers} from 'https://unpkg.com/ethers@5.7.2/dist/ethers.esm.js'
/*
const URL = 'https://ethereum-goerli-rpc.allthatnode.com'
const p = ethers.getDefaultProvider(URL)
@@ -12,7 +11,7 @@ const latest = await p.getBlock()
latest
const txs = await Promise.all(latest.transactions.slice(0,2).map(t =>
const txs = await Promise.all(latest.transactions.map(t =>
p.getTransactionReceipt(t)
))
@@ -23,7 +22,7 @@ const totalGas = txs.reduce((gas,tx) =>
totalGas.add(20)
totalGas.add(21)
/*