Create a new token in the channel. This function will revert if the caller does not fulfill any of the channel creatorLogic[] rules.
creatorLogic[]
import { uplinkClient } from './config' const { tokenId, event } = await uplinkClient.createToken({ channelAddress: '0x1234567890123456789012345678901234567890', uri: 'new token uri', maxSupply: 100n })
{ tokenId: bigint, event: Log }
string
const { tokenId, event } = await uplinkClient.createToken({ channelAddress: '0x1234567890123456789012345678901234567890', ... })
const { tokenId, event } = await uplinkClient.createToken({ uri: 'new token uri', ... })
bigint
const { tokenId, event } = await uplinkClient.createToken({ maxSupply: 100n, ... })
TransactionOverrides
type TransactionOverrides = { accessList?: AccessList gas?: bigint maxFeePerGas?: bigint maxPriorityFeePerGas?: bigint nonce?: number value?: bigint }
const { tokenId, event } = await uplinkClient.createToken({ ... transactionOverrides: { gas: 1000000n } })
const { address, data } = await uplinkClient.calldata.createToken({...})
{ address: string, // address of the target contract data: string // calldata for the transaction }
const gas = await uplinkClient.estimateGas.createToken({...})
bigint // gas estimate in wei