This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Resolve 2 TODOs and use multicall batch client. | |
import type { Interface, Result, ethers } from "ethers"; | |
import { type IMulticall3 } from "../../index.js"; // TODO: use your import (in this example I used typechain types with multicall3 contract) | |
export type Multicall3ContractCall = { target: string, allowFailure: boolean, callData: string }; | |
export type Aggregate3Response = { success: boolean; returnData: string }; | |
export type TxResultsConverter<T> = (result: Result, ...opt: any[]) => T; | |
/* | |
* @description Client to be inherited from to work with Multicall3 contract to perform batch calls. |