UNPKG

evm-blockchain-tools

Version:

This is a collection of resuseable tools to support development for EVM-powered blockchains

24 lines (23 loc) 1.07 kB
import { Contract, ethers, Signer } from "ethers"; import { Interface } from "ethers/lib/utils"; import { GenerateContractTransactionData, Subscription } from "../common/interfaces"; export declare abstract class ContractModel { address: string; signer: Signer; contract: Contract; abi: Interface; protected _signerList: Signer[]; constructor(address: string, abi: any, signer: Signer); get provider(): ethers.providers.Provider; generateTransaction(data: GenerateContractTransactionData, options?: { gasPrice?: string; }): Promise<{ preCalculatedHash: string; signedTransaction: string; }>; populateTransaction(functionName: string, data: any[], options: { gasPrice: string; }): Promise<ethers.PopulatedTransaction>; queryForEvents(eventFilter: string | ethers.EventFilter, startingBlock: number | string, endingBlock?: number | string): Promise<ethers.Event[]>; subscribeForEvent(eventFilter: string | ethers.EventFilter, callback: ethers.providers.Listener): Subscription; }