@dolomite-exchange/dolomite-margin
Version:
Ethereum Smart Contracts and TypeScript library used for the DolomiteMargin trading protocol
126 lines (112 loc) • 3.75 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 BorrowPositionProxyV2 {
constructor(jsonInterface: any[], address?: string, options?: CustomOptions);
_address: string;
options: contractOptions;
methods: {
isCallerAuthorized(_caller: string): TransactionObject<boolean>;
closeBorrowPosition(
_borrowAccountNumber: number | string,
_toAccountNumber: number | string,
_collateralMarketIds: (number | string)[]
): TransactionObject<void>;
openBorrowPosition(
_fromAccountNumber: number | string,
_toAccountNumber: number | string,
_marketId: number | string,
_amountWei: number | string,
_balanceCheckFlag: number | string
): TransactionObject<void>;
repayAllForBorrowPosition(
_fromAccountNumber: number | string,
_borrowAccountNumber: number | string,
_marketId: number | string,
_balanceCheckFlag: number | string
): TransactionObject<void>;
setIsCallerAuthorized(
_caller: string,
_isAuthorized: boolean
): TransactionObject<void>;
transferBetweenAccounts(
_fromAccountNumber: number | string,
_toAccountNumber: number | string,
_marketId: number | string,
_amountWei: number | string,
_balanceCheckFlag: number | string
): TransactionObject<void>;
openBorrowPositionWithDifferentAccounts(
_fromAccountOwner: string,
_fromAccountNumber: number | string,
_toAccountOwner: string,
_toAccountNumber: number | string,
_marketId: number | string,
_amountWei: number | string,
_balanceCheckFlag: number | string
): TransactionObject<void>;
closeBorrowPositionWithDifferentAccounts(
_borrowAccountOwner: string,
_borrowAccountNumber: number | string,
_toAccountOwner: string,
_toAccountNumber: number | string,
_collateralMarketIds: (number | string)[]
): TransactionObject<void>;
transferBetweenAccountsWithDifferentAccounts(
_fromAccountOwner: string,
_fromAccountNumber: number | string,
_toAccountOwner: string,
_toAccountNumber: number | string,
_marketId: number | string,
_amountWei: number | string,
_balanceCheckFlag: number | string
): TransactionObject<void>;
repayAllForBorrowPositionWithDifferentAccounts(
_fromAccountOwner: string,
_fromAccountNumber: number | string,
_borrowAccountOwner: string,
_borrowAccountNumber: number | string,
_marketId: number | string,
_balanceCheckFlag: number | string
): TransactionObject<void>;
DOLOMITE_MARGIN(): TransactionObject<string>;
};
deploy(options: {
data: string;
arguments: any[];
}): TransactionObject<Contract>;
events: {
BorrowPositionOpen(
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(): BorrowPositionProxyV2;
}