mev-inspect
Version:
A JS port of 'mev-inspect-py' optimised for ease of use.
34 lines • 1.03 kB
TypeScript
import { Provider, TransactionReceipt } from 'ethers';
import { TransactionTrace } from './traces.js';
interface BaseArbitrage {
transactions: string[];
receipts: TransactionReceipt[];
searcher: string;
}
interface EthAsset {
amount: bigint;
}
interface Erc20Asset {
address: string;
amount: bigint;
}
interface Erc721Asset {
collection: string;
id: bigint;
}
interface Erc1155Asset {
collection: string;
id: bigint;
amount: bigint;
}
type Asset = EthAsset | Erc20Asset | Erc721Asset | Erc1155Asset;
interface PureArbitrage extends BaseArbitrage {
beneficiary: string;
assets: Asset[];
}
type Mev = PureArbitrage;
declare function getAssets(receipts: TransactionReceipt[]): string[];
declare function fetchAssetTypes(provider: Provider, assets: string[]): Promise<void>;
declare function classify(traces: Record<string, TransactionTrace>, receipts: Record<string, TransactionReceipt>): Mev[];
export { Mev, getAssets, fetchAssetTypes, classify };
//# sourceMappingURL=mev.d.ts.map