UNPKG

zksync-cli

Version:

CLI tool that simplifies the process of developing applications and interacting with the ZKsync network

19 lines (18 loc) 1.06 kB
import { ethers } from "ethers"; import type { ABI } from "./helpers.js"; export declare const getInterfaceFromSignature: (method: string) => ethers.Interface; export declare const getFragmentFromSignature: (method: string) => ethers.Fragment; export declare const getInputsFromSignature: (method: string) => readonly ethers.ParamType[]; export declare const encodeData: (func: string, args: unknown[]) => string; export declare const encodeParam: (param: ethers.ParamType, arg: unknown) => string; export declare const decodeData: (types: string[], bytecode: string) => ethers.Result; export declare const getInputValues: (inputsString: string) => string[]; export declare const getMethodId: (method: string) => string; export declare const getMethodsFromAbi: (abi: ABI, type: "read" | "write") => ethers.FunctionFragment[]; /** * Format method args based on the method signature into a valid * encodable format. * * @example "42,77" => [42,77] */ export declare const formatArgs: (method: string, args: Array<string[] | string>) => (string | string[])[];