This library contains functions and types to extend the `@mountainpath9/overlord-core` library for use with ethersjs.
npm install @mountainpath9/overlord-ethersThis library contains functions and types to extend the @mountainpath9/overlord-core library for use with ethersjs.
In addition to rexporting all from @mountainpath9/overlord-core the following functions are provided:
```
function getProvider(ctx: TaskContext, chainId: number): Promise
function getSigner(ctx: TaskContext, provider: Provider, walletName: string): Promise
function createTransactionManager(ctx: TaskContext, signer: Signer, provider: Provider, params: TxSubmissionParams);
and a global nonce manager:
``
let NONCE_MANAGER: NonceManager
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
}