UNPKG

flashloan-profit-calculator

Version:

A library for analyzing flashloan transactions and calculating profits

27 lines (26 loc) 1.11 kB
import type { ProfitResult, TraceCall, TransferLog } from "./types"; export * from "./types"; export * from "./constants"; export * from "./utils"; export * from "./transferProcessor"; export * from "./profitCalculator"; export * from "./api/types"; export { default as FlashloanAnalysisClient } from "./api/client"; export declare let globalBlockNumber: number; export declare let globalGasCostETH: number; export declare let globalGasCostWei: string; export declare let globalSenderAddress: string; export declare let globalContractAddress: string; export declare let flashloanContracts: string[]; /** * Calculate profit from a transaction hash */ export declare function calculateProfitFromTxHash(txHash: string): Promise<ProfitResult[]>; /** * Main function to calculate profit from a transaction */ export declare function calculateProfit(logs: TransferLog[], trace: TraceCall[], blockNumber: number, contract: string, sender: string): Promise<ProfitResult[]>; /** * Format and display profit results */ export declare function displayProfitResults(profitResults: ProfitResult[]): Promise<void>;