import { AbiEventName, AbiFunctionName, Address, Contract, DecodedEvent, DecodedInput, DecodedOutput, ProviderRpcClient, TransactionWithAccount, } from "everscale-inpage-provider"; import { Trace } from "./trace/trace"; import { Optional } from "../../types"; import BigNumber from "bignumber.js"; import { JsRawMessage, JsRawTransaction } from "nekoton-wasm"; export enum TraceType { FUNCTION_CALL = "function_call", FUNCTION_RETURN = "function_return", DEPLOY = "deploy", EVENT = "event", EVENT_OR_FUNCTION_RETURN = "event_or_return", BOUNCE = "bounce", TRANSFER = "transfer", } export type TruncatedTransaction = Omit & JsRawTransaction["description"]; export type MessageTree = JsRawMessage & { dstTransaction: TruncatedTransaction | undefined; outMessages: Array; }; export type AccountData = { codeHash: string | undefined; id: string; }; export type TransactionWithAccountAndBoc = TransactionWithAccount & { boc: string }; export type RevertedBranch = { totalActions: number; traceLog: Trace; actionIdx: number }; export type WaitFinalizedOutput = { extTransaction: T; transactions: Array; }; export type TraceParams = { finalizedTx: WaitFinalizedOutput; allowedCodes?: AllowedCodes; raise?: boolean; }; export type TraceContext = { accounts: { [key: string]: AccountData }; }; export type AllowErrorCodes = number | null; export type OptionalContracts = Optional; type AllowedCode = { compute?: Array; action?: Array; }; export type AllowedCodes = AllowedCode & { contracts?: Record; }; export type DecoderOutput = | DecodedOutput> | DecodedInput> | DecodedEvent> | undefined; export interface TracingTransportConnection { provider: ProviderRpcClient; getAccountData(address: Address): Promise; getAccountsData(accounts: Address[]): Promise; } export type DecodedMsg | any = Record> = { method?: M; params?: P; }; export type ViewTrace | any = Record> = Pick< Trace, "msg" | "type" | "contract" | "error" > & { decodedMsg: DecodedMsg | undefined }; export type ViewTraceTree = Record> = ViewTrace< M, P > & { outTraces: Array> }; export enum InteractionType { EVENT, FUNCTION_CALL, } export type ViewTraceTreeWithTotalFee = Omit & { totalFees: BigNumber; sentValue: BigNumber; value: BigNumber; balanceChange: BigNumber; outTraces: Array; }; export type BalanceChangingInfo = { balanceDiff: BigNumber; }; export type BalanceChangeInfoStorage = Record; export type ErrorStore = Record>; export type MsgError = { phase: "compute" | "action"; code: number | null; trace: ViewTrace; }; export type Addressable = Contract | Address | string; export type LabelsMap = Map;