locklift
Version:
Node JS framework for working with Ever contracts. Inspired by Truffle and Hardhat. Helps you to build, test, run and maintain your smart contracts.
32 lines (31 loc) • 1.93 kB
TypeScript
import { BalanceChangeInfoStorage, MsgError, TraceType, ViewTraceTree, ViewTraceTreeWithTotalFee } from "../types";
import { ContractWithArtifacts } from "../../../types";
import BigNumber from "bignumber.js";
import { NameAndType } from "./viewTracingTree";
export declare const mapType: Record<TraceType, string>;
export declare const colors: Record<"contractName" | "methodName" | "paramsKey" | "error", (param?: string) => string>;
export declare const applyTotalFees: (viewTrace: ViewTraceTree) => ViewTraceTreeWithTotalFee;
export declare const calculateTotalFees: (traceTree: ViewTraceTreeWithTotalFee) => BigNumber;
export type PrinterConfig = {
fullPrint: boolean;
} | {
printFullAddresses: boolean;
} | {
printFillParams: boolean;
};
export type PrinterProps = Pick<ViewTraceTreeWithTotalFee, "type" | "decodedMsg" | "msg" | "contract" | "totalFees" | "sentValue" | "value" | "balanceChange" | "error">;
export declare const printer: ({ type, decodedMsg, contract, totalFees, sentValue, value, balanceChange, error }: PrinterProps, { contracts }: {
contracts: Array<ContractWithArtifacts | undefined>;
}, printerConfig?: PrinterConfig) => string;
export type BalanceChangingInfo = {
totalReceive: BigNumber;
totalSent: BigNumber;
balanceDiff: BigNumber;
};
type BalanceChangeInfo = Record<string, Omit<BalanceChangingInfo, "balanceDiff">>;
export declare const getBalanceChangingInfo: (viewTrace: ViewTraceTreeWithTotalFee, accumulator?: BalanceChangeInfo) => BalanceChangeInfo;
export declare const getBalanceDiff: (balanceChangeInfo: BalanceChangeInfo) => BalanceChangeInfoStorage;
type ErrorInfoStorage = Record<string, Array<MsgError>>;
export declare const getErrorsInfo: (viewTrace: ViewTraceTreeWithTotalFee, accumulator?: ErrorInfoStorage) => ErrorInfoStorage;
export declare const isDesiredMethod: ({ name, type, contract }: NameAndType, trace: ViewTraceTree) => boolean;
export {};