mirror of
https://github.com/leporello-js/leporello-js
synced 2026-01-13 13:04:30 -08:00
WIP
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user