UNPKG

@yfi/sdk

Version:

Interaction framework for the yearn protocol

60 lines (59 loc) 2.01 kB
import { Address, CustomError, Integer, Usdc } from "../common"; export declare class SimulationError extends CustomError { error_code: string; static NO_LOG: string; static TENDERLY_RESPONSE_ERROR: string; static PARTIAL_REVERT: string; constructor(message: string, error_code: string); } export declare class ZapperError extends CustomError { error_code: string; static ZAP_IN_APPROVAL_STATE: string; static ZAP_IN_APPROVAL: string; static ZAP_OUT_APPROVAL_STATE: string; static ZAP_OUT_APPROVAL: string; static ZAP_IN: string; static ZAP_OUT: string; constructor(message: string, error_code: string); } export declare class EthersError extends CustomError { error_code: string; static FAIL_TOKEN_FETCH: string; static NO_DECIMALS: string; static NO_PRICE_PER_SHARE: string; static POPULATING_TRANSACTION: string; constructor(message: string, error_code: string); } export declare class TenderlyError extends CustomError { error_code: string; static SIMULATION_CALL: string; static CREATE_FORK: string; constructor(message: string, error_code: string); } export declare class PriceFetchingError extends CustomError { error_code: string; static FETCHING_PRICE_ORACLE: string; static FETCHING_PRICE_PICKLE: string; constructor(message: string, error_code: string); } export interface TransactionOutcome { sourceTokenAddress: Address; sourceTokenAmount: Integer; targetTokenAddress: Address; targetTokenAmount: Integer; targetTokenAmountUsdc: Usdc; targetUnderlyingTokenAddress: Address; targetUnderlyingTokenAmount: Integer; conversionRate: number; slippage: number; } export interface SimulationOptions { slippage?: number; root?: string; forkId?: string; gasPrice?: Integer; maxFeePerGas?: Integer; maxPriorityFeePerGas?: Integer; gasLimit?: Integer; save?: boolean; }