@holographxyz/cli
Version:
Holograph operator CLI
25 lines (24 loc) • 966 B
TypeScript
import { Contract } from '@ethersproject/contracts';
import { TransactionReceipt } from '@ethersproject/providers';
import { BigNumber } from '@ethersproject/bignumber';
import CoreChainService from './core-chain-service';
import { NetworkMonitor } from '../utils/network-monitor';
export interface FaucetFee {
fee: string;
hasEnoughBalance: boolean;
}
export interface FaucetInfo {
amount: string;
cooldown: number;
isAllowedToWithdraw: boolean;
}
declare class FaucetService extends CoreChainService {
faucet: Contract;
constructor(network: string, networkMonitor: NetworkMonitor, contract?: Contract);
estimateGasForRequestTokens: () => Promise<BigNumber>;
getFaucetCooldown: (address: string) => Promise<number>;
getFaucetFee: (address: string) => Promise<FaucetFee>;
getFaucetInfo: (address: string) => Promise<FaucetInfo>;
requestTokens: () => Promise<TransactionReceipt | null>;
}
export default FaucetService;