UNPKG

@hashlike-official/extend-web3-react-wrapper

Version:

web3-react wrapper - it offers a common interface for different wallet providers

33 lines (32 loc) 890 B
declare type CallbackType = { onTransactionHash?: (hash: string) => void; onError?: (error: Error) => void; }; export declare type CallParamType = { methodName: string; params?: any[]; option?: { from?: string; gasLimit?: any; gasPrice?: any; }; }; export declare type SendParamType = { methodName: string; params?: any[]; option?: { from?: string; gasLimit?: any; gasPrice?: any; value?: any; }; callback?: CallbackType; }; export declare abstract class WrappedContract<SupportedContract> { protected readonly originContract: SupportedContract; constructor(originContract: SupportedContract); abstract call(params: CallParamType): Promise<any>; abstract send(params: SendParamType): Promise<any>; abstract estimateGas(params: SendParamType): Promise<any>; } export {};