@dolomite-exchange/dolomite-margin
Version:
Ethereum Smart Contracts and TypeScript library used for the DolomiteMargin trading protocol
89 lines (77 loc) • 2.43 kB
TypeScript
/* Generated by ts-generator ver. 0.0.8 */
/* tslint:disable */
import Contract, { CustomOptions, contractOptions } from "web3/eth/contract";
import { TransactionObject, BlockType } from "web3/eth/types";
import { Callback, EventLog } from "web3/types";
import { EventEmitter } from "events";
import { Provider } from "web3/providers";
export class ChainlinkPriceOracleV1 {
constructor(jsonInterface: any[], address?: string, options?: CustomOptions);
_address: string;
options: contractOptions;
methods: {
getPrice(_token: string): TransactionObject<{ value: string }>;
standardizeNumberOfDecimals(
_tokenDecimals: number | string,
_value: number | string,
_valueDecimals: number | string
): TransactionObject<string>;
getAggregatorByToken(_token: string): TransactionObject<string>;
getDecimalsByToken(_token: string): TransactionObject<string>;
getTokenPairByToken(_token: string): TransactionObject<string>;
ownerSetStalenessThreshold(
_stalenessThreshold: number | string
): TransactionObject<void>;
ownerInsertOrUpdateOracleToken(
_token: string,
_tokenDecimals: number | string,
_chainlinkAggregator: string,
_tokenPair: string
): TransactionObject<void>;
DOLOMITE_MARGIN(): TransactionObject<string>;
ONE_DOLLAR(): TransactionObject<string>;
stalenessThreshold(): TransactionObject<string>;
};
deploy(options: {
data: string;
arguments: any[];
}): TransactionObject<Contract>;
events: {
StalenessDurationUpdated(
options?: {
filter?: object;
fromBlock?: BlockType;
topics?: (null | string)[];
},
cb?: Callback<EventLog>
): EventEmitter;
TokenInsertedOrUpdated(
options?: {
filter?: object;
fromBlock?: BlockType;
topics?: (null | string)[];
},
cb?: Callback<EventLog>
): EventEmitter;
allEvents: (
options?: {
filter?: object;
fromBlock?: BlockType;
topics?: (null | string)[];
},
cb?: Callback<EventLog>
) => EventEmitter;
};
getPastEvents(
event: string,
options?: {
filter?: object;
fromBlock?: BlockType;
toBlock?: BlockType;
topics?: (null | string)[];
},
cb?: Callback<EventLog[]>
): Promise<EventLog[]>;
setProvider(provider: Provider): void;
clone(): ChainlinkPriceOracleV1;
}