generateClaimRewardAbiData()

SDKverifyBid()

Description

Generate calldata to call loanWithSig on Tako Open Curation Contarct The curator can claim his reward from the booster bid after verification

This function is used to claim the reward

Nature

Method of Class

Parameters

NameTypeDescription

index

number

The index of bid

curatorId

number

The curator’s Lens profile id

relayer

string

An EVM-comptiable externally owned account, for signless feature

contentId

string

Tako will auto-submit a publication to Farcaster in cast, reply, and recast bids while the curator accepts the bid. The contentId is the publication Id on Farcaster

sig

object {

r: string,

s: string,

v: number,

deadline: number

}

Example Code

import { ethers } from 'ethers'
import { CONSTANT, TakoOpenCuration } from 'tako-open-curation'

const tako = new TakoOpenCuration(CONSTANT.Network.TESTNET)
const lensOpenCuration = tako.lensOpenCuration
const apikey = "Your Alchemy API Key"
const web3Provider = new ethers.providers.AlchemyProvider(80001, apikey)
lensOpenCuration.provider = web3Provider

const profileId = 189
const bidIndex = 27
const contentId = '0xbd-0x01-DA-a8a8cbd5'
const sig = await lensOpenCuration.verifyBid('0xaddress', bidIndex, contentId)
const abiData = await lensOpenCuration.generateClaimRewardAbiData(bidIndex, profileId, sig.relayer, contentId, sig.signature);

Example Returns

0xfa2fd476000000000000000000000000000000000000000000000000000000000000001b00000000000000000000000000000000000000000000000000000000000000bd000000000000000000000000197309df1f580884b5a2a75dfd842a524fd8ac150000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000001beb98124c99d8b8341464c7519cf97bf9c7cfe06485a6dd9bdfcdfe7aec42ab523e5c21579c58377166c65a2342a3181642d3e6d8ed5bd990517be5e719da77510000000000000000000000000000000000000000000000000000000065693fbb0000000000000000000000000000000000000000000000000000000000000015307862642d307830312d44412d61386138636264350000000000000000000000

Last updated