Skip to content
LogoLogo

reward.getGlobalRewardPerToken

Gets the global reward per token value.

Usage

import {  } from './viem.config'
 
const  = await .reward.getGlobalRewardPerToken({
  : '0x20c0000000000000000000000000000000000001',
})
 
.('Global reward per token:', )
Global reward per token: 385802469135802469135n

Return Type

type ReturnValue = bigint

Returns the current global reward per token value scaled by ACC_PRECISION (1e18). This value increases each time rewards are distributed.

Parameters

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.