UNPKG

@dolomite-exchange/dolomite-margin

Version:

Ethereum Smart Contracts and TypeScript library used for the DolomiteMargin trading protocol

21 lines (20 loc) 1.4 kB
import { Contracts } from '../../lib/Contracts'; import { address, ContractCallOptions, ContractConstantCallOptions, Integer, TxResult } from '../../types'; export declare class ChainlinkPriceOracleV1 { private contracts; constructor(contracts: Contracts); ownerInsertOrUpdateOracleToken(token: address, tokenDecimals: number, chainlinkAggregator: address, tokenPair: address, options?: ContractCallOptions): Promise<TxResult>; ownerSetStalenessThreshold(stalenessThreshold: Integer, options?: ContractCallOptions): Promise<TxResult>; getStalenessThreshold(options?: ContractConstantCallOptions): Promise<Integer>; getPrice(token: address, options?: ContractConstantCallOptions): Promise<Integer>; getAggregatorByToken(token: address, options?: ContractConstantCallOptions): Promise<address>; getTokenDecimalsByToken(token: address, options?: ContractConstantCallOptions): Promise<number>; /** * @return 0 address for USD, non-zero address representing another token otherwise. */ getCurrencyPairingByToken(token: address, options?: ContractConstantCallOptions): Promise<address>; /** * @return Standardizes `value` to have `ONE_DOLLAR` - `tokenDecimals` number of decimals. */ standardizeNumberOfDecimals(tokenDecimals: number, value: Integer, valueDecimals: number, options?: ContractConstantCallOptions): Promise<Integer>; }