Skip to content

getBlockRewardInfo

Get the reward info for all executed blocks in the specified epoch.

Usage

example.ts
import { publicClient } from "./client";

const rewardInfo = await publicClient.getBlockRewardInfo();

Returns

[BlockRewardInfo]

The reward info object array.

Parameters

epochTag (optional)

  • Type: latest_state| latest_confirmed| latest_checkpoint | earliest
  • Defaut: latest_state
const rewardInfo = await publicClient.getBlockRewardInfo({
  epochTag: "latest_state", 
});

epochNumber (optional)

  • Type: bigint
const rewardInfo = await publicClient.getBlockRewardInfo({
  epochNumber: 1n, 
});

JSON-RPC Method

cfx_getBlockRewardInfo