Encodes a transaction object into a hexadecimal string representation of the encoded data.
import { encode } from "thirdweb";const encodedData = await encode(transaction);
function encode( transaction: PreparedTransaction<abi, abiFn>,): Promise<`0x${string}`>;
The transaction object to encode.
let transaction: PreparedTransaction<abi, abiFn>;
let returnType: Promise<`0x${string}`>;
A promise that resolves to the encoded data as a hexadecimal string.