UNPKG

flashloan-profit-calculator

Version:

A library for analyzing flashloan transactions and calculating profits

31 lines (30 loc) 918 B
import type { TraceCall, TransferLog } from "./types"; /** * Calculate profit from a transaction hash */ export declare function calculateProfitFromTxHash(txHash: string): Promise<{ token: string; profit: bigint; }[]>; /** * Main function to calculate profit from a transaction */ export declare function calculateProfit(logs: TransferLog[], trace: TraceCall[], blockNumber: number, contract: string, sender: string): Promise<{ token: string; profit: bigint; }[]>; /** * Format and display profit results */ export declare function displayProfitResults(profitResults: { token: string; profit: bigint; }[]): Promise<void>; export * from "./types"; export * from "./constants/addresses"; export * from "./processors"; export * from "./utils/parsing"; export * from "./utils/decoding"; export * from "./utils/weth"; export * from "./services/alchemy"; export * from "./detectors/flashloan";