Docs

prepareTransaction

Prepares a transaction with the given options.

Example

import { prepareTransaction, toWei } from "thirdweb";
import { ethereum } from "thirdweb/chains";
const transaction = prepareTransaction({
to: "0x1234567890123456789012345678901234567890",
chain: ethereum,
client: thirdwebClient,
value: toWei("1.0"),
gasPrice: 30n,
});

Parameters

Returns

The prepared transaction.