Usage

Returns

{ 
  event: Log 
}

Parameters

channelAddress

  • type: string

The target channel address

const { event } = await uplinkClient.mintTokenBatchWithETH({
  channelAddress: '0x1234567890123456789012345678901234567890',
  ...
})

to

  • type: string

The recipient of the minted tokens

const { event } = await uplinkClient.mintTokenBatchWithETH
({
  to: '0x1234567890123456789012345678901234567890',
  ...
})

tokenIds

  • type: bigint[]

The token IDs to mint

const { event } = await uplinkClient.mintTokenBatchWithETH({
  tokenIds: [1n, 2n, 3n],
  ...
})

amounts

  • type: bigint[]

The amounts of each token to mint

const { event } = await uplinkClient.mintTokenBatchWithETH({
  amounts: [1n, 1n, 1n],
  ...
})

mintReferral (optional)

  • type: string

The referral address for the mint

const { event } = await uplinkClient.mintTokenBatchWithETH({
  mintReferral: '0x1234567890123456789012345678901234567890',
  ...
})

data (optional)

  • type: string

Additional data for the mint

const { event } = await uplinkClient.mintTokenBatchWithETH
({
  data: '0x00...',
  ...
})

transactionOverrides (optional)

  • type: TransactionOverrides
type TransactionOverrides = {
  accessList?: AccessList
  gas?: bigint
  maxFeePerGas?: bigint
  maxPriorityFeePerGas?: bigint
  nonce?: number
  value?: bigint
}

Overrides for the transaction

const { event } = await uplinkClient.mintTokenBatchWithETH({
    ...
    transactionOverrides: {
        value: parseEther('0.000666')
    }
})

Calldata

generate calldata for the transaction

const { address, data } = await uplinkClient.calldata.mintTokenBatchWithETH({...})

Returns

{
    address: string, // address of the target contract
    data: string // calldata for the transaction
}

Gas Estimation

Estimate gas for the transaction

const gas = await uplinkClient.estimateGas.mintTokenBatchWithETH({...})

Returns

bigint // gas estimate in wei