Skip to content

zenlinkpro/gauge-result

Repository files navigation

gauge-result

Generate gauge result from provided chainName

NPM version



Install as dependency

npm i @utkjs/farming-rate-query

Usage

Generate rewards first if admin need to update config in 'src/rewards' (auto generate before build process)

pnpm run generate:rewards

Fetch results

import { ChainName, generateGaugeResult } from '@utkjs/farming-rate-query'

// only fech result from current periodId
const result1 = await generateGaugeResult(ChainName.Moonbase)

// fetch result from specific periodId
const result2 = await generateGaugeResult(ChainName.Moonbase, {
  periodId: 0
})

// fetch result from specific periodId and get contract call parameters
const result3 = await generateGaugeResult(ChainName.Moonbase, {
  periodId: 0,
  generateContractCallParameters: true
})