Skip to content
LogoLogo

funding.getPolicy

Gets a policy's administrators and current rules hash. The policy does not store its complete rules; obtain them from a creation or update event, or an indexer.

Usage

import { client } from './viem.config'
 
const policy = await client.funding.getPolicy({ policyId: 1n })
{ admins: ['0x...'], rulesHash: '0x...' }

Standalone Action

import { Actions } from 'viem/tempo'
import { client } from './viem.config'
 
const policy = await Actions.funding.getPolicy(client, { policyId: 1n })
{ admins: ['0x...'], rulesHash: '0x...' }

Return Value

type ReturnType = {
  admins: Address[]
  rulesHash: Hex
}

Parameters

policyId

  • Type: bigint

Funding policy ID.

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.