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<Hex>;
The transaction object to encode.
let transaction: PreparedTransaction<abi, abiFn>;
let returnType: `0x${string}`;
A promise that resolves to the encoded data as a hexadecimal string.