erigon-pulse/cmd/devnet/blocks/fees.go
Mark Holt f3ce5f8a36
Bor proofgen tests (#8751)
Added initial proof generation tests for polygon reverse flow for devnet

Blocks tested, receipts need trie proof clarification
2023-11-17 10:41:45 +00:00

20 lines
413 B
Go

package blocks
import (
"context"
"fmt"
"github.com/ledgerwatch/erigon/cmd/devnet/devnet"
"github.com/ledgerwatch/erigon/rpc"
)
func BaseFeeFromBlock(ctx context.Context) (uint64, error) {
res, err := devnet.SelectNode(ctx).GetBlockByNumber(ctx, rpc.LatestBlockNumber, false)
if err != nil {
return 0, fmt.Errorf("failed to get base fee from block: %v\n", err)
}
return res.BaseFee.Uint64(), err
}