UNPKG

zksync-cli

Version:

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

24 lines (23 loc) 1.36 kB
import { ethers } from "ethers"; import type { L2Chain } from "../../../data/chains.js"; import type { Provider } from "zksync-ethers"; export type ABI = Record<string, unknown>[]; export type ContractInfo = { address: string; bytecode: string; abi: ABI | undefined; implementation?: ContractInfo; }; export declare const formatMethodString: (method: string) => string; export declare const getMethodsFromAbi: (abi: ABI, type: "read" | "write" | "any") => ethers.FunctionFragment[]; export declare const checkIfMethodExists: (contractInfo: ContractInfo, method: string) => void; export declare const getContractABI: (chain: L2Chain, contractAddress: string) => Promise<Record<string, unknown>[] | undefined>; export declare const readAbiFromFile: (abiFilePath: string) => ABI; export declare const getContractInformation: (chain: L2Chain | undefined, provider: Provider, contractAddress: string, options?: { fetchImplementation?: boolean; }) => Promise<ContractInfo>; export declare const getContractInfoWithLoader: (chain: L2Chain | undefined, provider: Provider, contractAddress: string) => Promise<ContractInfo>; export declare const askAbiMethod: (contractInfo: { abi?: ContractInfo["abi"]; implementation?: ContractInfo["implementation"]; }, type?: "read" | "write" | "any") => Promise<ethers.FunctionFragment | "manual">;