distributeByToken

This extension is similar to the distribute extension, however it require you to specify the token (address) that you want to distribute

Example

import { distributeByToken } from "thirdweb/extensions/split";
const transaction = distributeByToken();
// Send the transaction
...
function distributeByToken(
options: BaseTransactionOptions<{ tokenAddress: string }>,
any,
{
readonly inputs: readonly [
{ readonly name: "token"; readonly type: "address" },
];
readonly name: "distribute";
readonly outputs: readonly [];
readonly stateMutability: "nonpayable";
readonly type: "function";
},
>;

Parameters

Type

let options: BaseTransactionOptions<{ tokenAddress: string }>;

Returns

let returnType: PreparedTransaction<
any,
{
readonly inputs: readonly [
{ readonly name: "token"; readonly type: "address" },
];
readonly name: "distribute";
readonly outputs: readonly [];
readonly stateMutability: "nonpayable";
readonly type: "function";
},
>;

A prepared transaction object.