UNPKG

@witnet/ethers

Version:

Wit/Oracle Ethers Framework package for EVM-compatible projects

47 lines 1.58 kB
import { Addressable, Contract, Interface, InterfaceAbi, JsonRpcApiProvider, JsonRpcSigner } from "ethers"; export declare abstract class ContractWrapper { constructor(signer: JsonRpcSigner, network: string, abi: Interface | InterfaceAbi, target: string | Addressable); protected _address: string | Addressable; protected _contract: Contract; attach(target: string | Addressable): any; /** * The contract's ABI. */ readonly abi: Interface | InterfaceAbi; /** * The address of the underlying Wit/Oracle Framework artifact. */ get address(): string | Addressable; /** * The underlying Ethers' contract wrapper. */ get contract(): Contract; /** * The EVM network currently connected to. */ readonly network: string; /** * The ETH/RPC provider used of contract interactions. */ readonly provider: JsonRpcApiProvider; /** * The EVM address that will sign contract interaction transactions, when required. */ readonly signer: JsonRpcSigner; /** * Name of the underlying logic implementation contract. * @returns Contract name. */ getEvmImplClass(): Promise<string>; /** * Get specs identifier of the underlying logic implementation contract. * @returns 4-byte hex string. */ getEvmImplSpecs(): Promise<string>; /** * Version tag of the underlying logic implementation contract. * @returns Version tag. */ getEvmImplVersion(): Promise<string>; } //# sourceMappingURL=ContractWrapper.d.ts.map