Skip to content

Commit

Permalink
feat(rc): last cycle rewards v2
Browse files Browse the repository at this point in the history
  • Loading branch information
franciscotobar committed Nov 10, 2024
1 parent ea146e3 commit 7a1c2e7
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/app/collective-rewards/utils/getBuilderToGauge.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { BuilderRegistryAbi } from '@/lib/abis/v2/BuilderRegistryAbi'
import { SponsorsManagerAddress } from '@/lib/contracts'
import { Address } from 'viem'
import { config } from '@/config'
import { readContract } from 'wagmi/actions'

export const getBuilderToGauge = async (builder: Address): Promise<Address> => {
return readContract(config, {
address: SponsorsManagerAddress,
abi: BuilderRegistryAbi,
functionName: 'builderToGauge',
args: [builder],
})
}

0 comments on commit 7a1c2e7

Please sign in to comment.