zksync-cli
Version:
CLI tool that simplifies the process of developing applications and interacting with the ZKsync network
24 lines (23 loc) • 946 B
TypeScript
import chalk from "chalk";
import type { BigNumberish } from "ethers/lib/ethers.js";
/**
* Sets the number of decimals for a token format conversion.
*
* @param decimals - The number of decimals to use.
* @returns An object with two functions: one to convert a decimal string to a BigNumber and another to convert a BigNumber to a decimal string.
*/
export declare function useDecimals(decimals: number): {
decimalToBigNumber: (amount: string) => BigNumberish;
bigNumberToDecimal: (amount: BigNumberish) => string;
};
export type LogEntry = string | {
text: string;
list?: LogEntry[];
};
export declare const formatLogs: (logs: LogEntry[], indentation?: string, defaultColor?: chalk.Chalk) => string;
export declare const formatSeparator: (text: string) => {
type: string;
line: string;
};
export declare const getTimeAgo: (date: Date) => string;
export declare const convertBigNumbersToStrings: (value: any) => any;