reward.getPendingRewards
Calculates the pending claimable rewards for an account without modifying state.
Usage
import { } from './viem.config'
const = await .reward.getPendingRewards({
: '0x20c0000000000000000000000000000000000001',
: '0xa5cc3c03994DB5b0d9A5eEdD10CabaB0813678AC',
})
.('Pending rewards:', )
Pending rewards: 1000000000000000000nReturn Type
type ReturnValue = bigintReturns the total pending claimable reward amount, including stored balance and newly accrued rewards.
Parameters
account
- Type:
Address
The account address to query pending rewards for.
token
- Type:
Address
Address of the TIP-20 token.
blockNumber (optional)
- Type:
bigint
Block number to read the state from.
blockOverrides (optional)
- Type:
BlockOverrides
Block overrides to apply to the state.
blockTag (optional)
- Type:
BlockTag
Block tag to read the state from.
stateOverride (optional)
- Type:
StateOverride
State override to apply.