| 411 | } |
| 412 | |
| 413 | func queryBlobBaseFee(l1 *ethclient.Client) (*big.Int, error) { |
| 414 | var hex string |
| 415 | err := l1.Client().CallContext(context.Background(), &hex, "eth_blobBaseFee") |
| 416 | if err != nil { |
| 417 | return nil, err |
| 418 | } |
| 419 | blobBaseFee, ok := new(big.Int).SetString(hex, 0) |
| 420 | if !ok { |
| 421 | return nil, errors.New("invalid blob base fee") |
| 422 | } |
| 423 | return blobBaseFee, nil |
| 424 | } |
| 425 | |
| 426 | func getKvInfo(pc *eth.PollingClient, blobLen int) ([]uint64, []common.Hash, error) { |
| 427 | lastIdx, err := pc.GetStorageKvEntryCount(rpc.LatestBlockNumber.Int64()) |