generateBidAbiData()
SDK
generateBidAbiData()
Description
Generate calldata to call the Tako Open Curation Contract
Nature
Method of Class
Parameters
Name
Type
Required
Description
contentId
string
YES
The id of publication that is wating to be curated, such as 0x8d11-0x07-DA-1cdac4db
bidToken
string
YES
The address of token. Default to 0x0000000000000000000000000000000000000000 , namely Matic
bidAmount
bigint
YES
The amount of bidToken
merkleIndex
number
NO
(Ignore it on testnet)
merkleProof
string[]
NO
(Ignore it on testnet)
Example Code
import { CONSTANT, TakoOpenCuration } from 'tako-open-curation'
const tako = new TakoOpenCuration(CONSTANT.Network.TESTNET)
const lensOpenCuration = tako.lensOpenCuration
const takoHubInfo = await lensOpenCuration.takoHubInfo();
const amount = BigInt(325); // 325 GWEI
const abiData = await lensOpenCuration.generateBidAbiData("0x47-0x01-DA-fece722d", "0x0000000000000000000000000000000000000000", amount);
Example Returns
0x07de204500000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001450000000000000000000000000000000000000000000000000000000000000015307834372d307830312d44412d66656365373232640000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000
Last updated