aave-protocol-v2/types/IExchangeAdapter.d.ts
2020-06-03 12:23:21 +02:00

107 lines
2.6 KiB
TypeScript

/* Generated by ts-generator ver. 0.0.8 */
/* tslint:disable */
import { Contract, ContractTransaction, EventFilter, Signer } from "ethers";
import { Listener, Provider } from "ethers/providers";
import { Arrayish, BigNumber, BigNumberish, Interface } from "ethers/utils";
import {
TransactionOverrides,
TypedEventDescription,
TypedFunctionDescription
} from ".";
interface IExchangeAdapterInterface extends Interface {
functions: {
approveExchange: TypedFunctionDescription<{
encode([_tokens]: [string[]]): string;
}>;
exchange: TypedFunctionDescription<{
encode([_from, _to, _amount, _maxSlippage]: [
string,
string,
BigNumberish,
BigNumberish
]): string;
}>;
};
events: {
Exchange: TypedEventDescription<{
encodeTopics([from, to, platform, fromAmount, toAmount]: [
string | null,
string | null,
string | null,
null,
null
]): string[];
}>;
};
}
export class IExchangeAdapter extends Contract {
connect(signerOrProvider: Signer | Provider | string): IExchangeAdapter;
attach(addressOrName: string): IExchangeAdapter;
deployed(): Promise<IExchangeAdapter>;
on(event: EventFilter | string, listener: Listener): IExchangeAdapter;
once(event: EventFilter | string, listener: Listener): IExchangeAdapter;
addListener(
eventName: EventFilter | string,
listener: Listener
): IExchangeAdapter;
removeAllListeners(eventName: EventFilter | string): IExchangeAdapter;
removeListener(eventName: any, listener: Listener): IExchangeAdapter;
interface: IExchangeAdapterInterface;
functions: {
approveExchange(
_tokens: string[],
overrides?: TransactionOverrides
): Promise<ContractTransaction>;
exchange(
_from: string,
_to: string,
_amount: BigNumberish,
_maxSlippage: BigNumberish,
overrides?: TransactionOverrides
): Promise<ContractTransaction>;
};
approveExchange(
_tokens: string[],
overrides?: TransactionOverrides
): Promise<ContractTransaction>;
exchange(
_from: string,
_to: string,
_amount: BigNumberish,
_maxSlippage: BigNumberish,
overrides?: TransactionOverrides
): Promise<ContractTransaction>;
filters: {
Exchange(
from: string | null,
to: string | null,
platform: string | null,
fromAmount: null,
toAmount: null
): EventFilter;
};
estimate: {
approveExchange(_tokens: string[]): Promise<BigNumber>;
exchange(
_from: string,
_to: string,
_amount: BigNumberish,
_maxSlippage: BigNumberish
): Promise<BigNumber>;
};
}