Generate gauge result from provided chainName
npm i @utkjs/farming-rate-query
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
})