relay

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

Example

import { sendTransaction } from "thirdweb";
import { relay } from "thirdweb/extensions/vote";
const transaction = relay({
contract,
target: ...,
value: ...,
data: ...,
overrides: {
...
}
});
// Send the transaction
await sendTransaction({ transaction, account });
function relay(
RelayParams | { asyncParams: () => Promise<RelayParams> }
>,

Parameters

The options for the "relay" function.

Type

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

Returns

let returnType: PreparedTransaction<
any,
AbiFunction,
>;

A prepared transaction object.