aggregate

Prepares a transaction to call the "aggregate" function on the contract.

Example

import { sendTransaction } from "thirdweb";
import { aggregate } from "thirdweb/extensions/multicall3";
const transaction = aggregate({
contract,
calls: ...,
overrides: {
...
}
});
// Send the transaction
await sendTransaction({ transaction, account });
function aggregate(
AggregateParams | { asyncParams: () => Promise<AggregateParams> }
>,

Parameters

The options for the "aggregate" function.

Type

AggregateParams | { asyncParams: () => Promise<AggregateParams> }
>;

Returns

let returnType: PreparedTransaction<
any,
AbiFunction,
>;

A prepared transaction object.