Tako Protocol
  • What is Tako?
  • Social Abstract Account
  • Social Legos
    • On-Chain Reputation
    • Farcaster
  • Monetization
    • Profile as an asset
      • Introduction
      • API Overview
      • For Farcaster dApp
        • Deployed Contract Address
        • Contract Specification
          • ProfileMarketV1
          • FarcasterKey
        • APIs
          • GetBuyPrice
          • GetBuyPriceAfterFee
          • GetSellPrice
          • GetSellPriceAfterFee
          • Discover
          • Explore
          • GetCommentsOnFarcaster
          • GetCommentsOnLens
          • GetHolders
          • GetAssets
          • GetProfileAndKey
          • GetActivated
          • GetHoldersByAddress
          • GetHoldingByAddress
          • GetKeyInfo
          • GetTrending
          • GetTrendingVolume
          • GetTradesLatest
          • GetTradesList
          • GetClaimable
    • Open Curation
      • Introduction
      • API Overview
      • For Lens dApp
        • Deployed Contract Address
        • Contract Specification
          • Enums and Structs
          • Owner Functions
          • Governance Functions
          • Bid Functions
          • Curate Functions
          • View Functions
        • APIs
          • GetWhitelistInfo
          • CheckOnchainTX
          • getOpenCurationCuratorAccepted
          • getOpenCurationBidsCreated
          • getOpenCurationBidsConfirmingCreated
          • getOpenCurationBidsPassed
          • getOpenCurationRecentActiveCurators
          • GetBidsFeed
          • verifyOpenCurationBid
          • getOpenCurationBidsCreatedStats
          • getOpenCurationCuratorLastBidPrice
          • registerOpenCuration
          • getOpenCurationIdIndexPairs
        • SDK
          • Installing the SDK
          • allBids
          • takoHubInfo()
          • generateBidAbiData()
          • generateBidBatchAbiData()
          • estimateGas()
          • generateTransaction()
          • register()
          • verifyBid()
          • generateClaimRewardAbiData()
          • curatorStatus()
    • Peer-to-Peer Curation
      • Introduction
      • API Overview
      • For Lens dApp
        • Deployed Contract Address
        • Contract Specification
          • Enums and Structs
          • Owner Functions
          • Governance Functions
          • Bid Functions
          • Curate Functions
          • View Functions
        • APIs
          • GetToken
          • RefreshToken
          • GetWhitelistInfo
          • SearchProfile
          • CheckOnchainTX
          • GetRecentActiveCurators
          • ActiveStatistics
          • GetLensCuratorAccepted
          • GetLensBidsCreated
          • GetLensBidsReceived
          • GetLensBidsConfirmingCreated
          • GetLensBidsConfirmingReceived
          • VerifyLensBid
          • IgnoreLensBid
          • GetLensBidsIgnored
          • GetLensBidsCreatedStats
          • GetLensBidsReceivedStats
          • GetLensCuratorLastBidPrice
          • GetLensPubIndexPairs
          • GetLensPubIds
      • For Farcaster dApp
        • Deployed Contract Address
        • Contract Specification
          • Enums and Structs
          • Owner Functions
          • Governance Functions
          • Bid Functions
          • Curate Functions
          • View Functions
        • APIs
          • GetToken
          • RefreshToken
          • GetWhitelistInfo
          • SearchProfile
          • CheckOnchainTX
          • GetRecentActiveCurators
          • ActiveStatistics
          • GetFarcasterCuratorAccepted
          • GetFarcasterBidsCreated
          • GetFarcasterBidsReceived
          • GetFarcasterBidsConfirmingReceived
          • VerifyFarcasterBid
          • IgnoreFarcasterBid
          • GetFarcasterBidsIgnored
          • GetFarcasterBidsCreatedStats
          • GetFarcasterBidsReceivedStats
          • GetFarcasterCuratorLastBidPrice
          • GetFarcasterEngagement
          • GetFarcasterPubIndexPairs
  • Links
    • Github
    • Twitter
    • Brand kit
Powered by GitBook
On this page
  • Parameters
  • Example Code
  • Example Returns
  1. Monetization
  2. Open Curation
  3. For Lens dApp
  4. SDK

generateClaimRewardAbiData()

SDK
verifyBid()

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

Name
Type
Description

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
PreviousverifyBid()NextcuratorStatus()

Last updated 1 year ago

https://eips.ethereum.org/EIPS/eip-712