UNPKG

@q-dev/q-js-sdk

Version:

Typescript Library to interact with Q System Contracts

40 lines (39 loc) 1.93 kB
import type { ContractTransaction } from 'ethers'; import { Saving } from '../../ethers-contracts/Saving'; import { SystemContractInstance } from '../SystemContractInstance'; import { QNonPayableTx, SavingBalanceDetails, SignerOrProvider } from '../../types'; import { CompoundRateKeeperInstance } from '../common/CompoundRateKeeperInstance'; /** * Saving instance to interact with Saving contract. * See [onchain documentation](@system-contracts-repo/@network/Saving/) for more details. * An instance of this class for a deployed network can be obtained via {@link ContractRegistryInstance.saving} */ export declare class SavingInstance extends SystemContractInstance<Saving> { constructor(signerOrProvider: SignerOrProvider, address: string); /** @deprecated use getCompoundRateKeeper */ compoundRateKeeper(): Promise<string>; /** * [External documentation](@system-contracts-repo/@network/Saving/#getcompoundratekeeper) */ getCompoundRateKeeper(): Promise<CompoundRateKeeperInstance>; /** * [External documentation](@system-contracts-repo/@network/Saving/#normalizedcapitals) */ normalizedCapitals(address: string): Promise<string>; /** * [External documentation](@system-contracts-repo/@network/Saving/#getbalancedetails) */ getBalanceDetails(address: string): Promise<SavingBalanceDetails>; /** * [External documentation](@system-contracts-repo/@network/Saving/#updatecompoundrate) */ updateCompoundRate(txOptions?: QNonPayableTx): Promise<ContractTransaction>; /** * [External documentation](@system-contracts-repo/@network/Saving/#deposit) */ deposit(amount: string, txOptions?: QNonPayableTx): Promise<ContractTransaction>; /** * [External documentation](@system-contracts-repo/@network/Saving/#withdraw) */ withdraw(amount: string, txOptions?: QNonPayableTx): Promise<ContractTransaction>; }