Skip to content

getPoSRewardByEpoch

Get rewards information of a PoS epoch by it's correspond PoW epoch number. Only PoW epoch happen's at PoS epoch end will have rewards information. Others will return undefined.

Usage

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

const PoSReward = await publicClient.getPoSRewardByEpoch({
  epochNumber: 1n,
});

Returns

PoSReward | undefined

Parameters

epochNumber

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

JSON-RPC Method

cfx_getPoSRewardByEpoch