@mountainpath9/overlord-viem
v1.9.2
Published
This library contains functions and types to extend the `@mountainpath9/overlord-core` library for use with viem.
Readme
viem support for overlord
This library contains functions and types to extend the @mountainpath9/overlord-core library for use with viem.
In addition to rexporting all from @mountainpath9/overlord-core the following functions are provided:
function getPublicClient(ctx: TaskContext | TaskRunner, chain: Chain): Promise<PublicClient>
function getWalletClient(ctx: TaskContext, chain: Chain, walletName: string): Promise<WalletClient>
function getMevProtectedPublicClient(ctx: TaskContext, chain: Chain): Promise<PublicClient>
function getMevProtectedWalletClient(ctx: TaskContext, chain: Chain, walletName: string): Promise<WalletClient>
function createTransactionManager(ctx: TaskContext, client: WalletClient, params: TxSubmissionParams, opts?: VtmOptions)The TransactionManager submits transactions to the blockchain, with controls to subsequently increase the gas tip,
and ultimately cancel the transaction if unsuccessful:
export interface TransactionManager {
/**
* Sign and submit the given transaction and wait
* for it to be mined. This interface combines these
* operations so that an implementation can lock the current
* nonce until the transaction has been successfully mined.
*
* If the transaction fails to be mined, this will throw an
* exception.
*/
submitAndWait(tx: ContractTransaction): Promise<TransactionReceipt>;
}