2020-07-05 21:44:19 +00:00
|
|
|
/* Generated by ts-generator ver. 0.0.8 */
|
|
|
|
/* tslint:disable */
|
|
|
|
|
2020-07-13 08:54:08 +00:00
|
|
|
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 '.';
|
2020-07-05 21:44:19 +00:00
|
|
|
|
|
|
|
interface IOneSplitInterface extends Interface {
|
|
|
|
functions: {
|
2020-07-13 08:54:08 +00:00
|
|
|
FLAG_AAVE: TypedFunctionDescription<{encode([]: []): string}>;
|
2020-07-05 21:44:19 +00:00
|
|
|
|
2020-07-13 08:54:08 +00:00
|
|
|
FLAG_BANCOR: TypedFunctionDescription<{encode([]: []): string}>;
|
2020-07-05 21:44:19 +00:00
|
|
|
|
2020-07-13 08:54:08 +00:00
|
|
|
FLAG_BDAI: TypedFunctionDescription<{encode([]: []): string}>;
|
2020-07-05 21:44:19 +00:00
|
|
|
|
2020-07-13 08:54:08 +00:00
|
|
|
FLAG_CHAI: TypedFunctionDescription<{encode([]: []): string}>;
|
2020-07-05 21:44:19 +00:00
|
|
|
|
2020-07-13 08:54:08 +00:00
|
|
|
FLAG_COMPOUND: TypedFunctionDescription<{encode([]: []): string}>;
|
2020-07-05 21:44:19 +00:00
|
|
|
|
2020-07-13 08:54:08 +00:00
|
|
|
FLAG_FULCRUM: TypedFunctionDescription<{encode([]: []): string}>;
|
2020-07-05 21:44:19 +00:00
|
|
|
|
2020-07-13 08:54:08 +00:00
|
|
|
FLAG_IEARN: TypedFunctionDescription<{encode([]: []): string}>;
|
2020-07-05 21:44:19 +00:00
|
|
|
|
2020-07-13 08:54:08 +00:00
|
|
|
FLAG_KYBER: TypedFunctionDescription<{encode([]: []): string}>;
|
2020-07-05 21:44:19 +00:00
|
|
|
|
|
|
|
FLAG_KYBER_BANCOR_RESERVE: TypedFunctionDescription<{
|
|
|
|
encode([]: []): string;
|
|
|
|
}>;
|
|
|
|
|
|
|
|
FLAG_KYBER_OASIS_RESERVE: TypedFunctionDescription<{
|
|
|
|
encode([]: []): string;
|
|
|
|
}>;
|
|
|
|
|
|
|
|
FLAG_KYBER_UNISWAP_RESERVE: TypedFunctionDescription<{
|
|
|
|
encode([]: []): string;
|
|
|
|
}>;
|
|
|
|
|
2020-07-13 08:54:08 +00:00
|
|
|
FLAG_MULTI_PATH_ETH: TypedFunctionDescription<{encode([]: []): string}>;
|
2020-07-05 21:44:19 +00:00
|
|
|
|
2020-07-13 08:54:08 +00:00
|
|
|
FLAG_OASIS: TypedFunctionDescription<{encode([]: []): string}>;
|
2020-07-05 21:44:19 +00:00
|
|
|
|
2020-07-13 08:54:08 +00:00
|
|
|
FLAG_SMART_TOKEN: TypedFunctionDescription<{encode([]: []): string}>;
|
2020-07-05 21:44:19 +00:00
|
|
|
|
2020-07-13 08:54:08 +00:00
|
|
|
FLAG_UNISWAP: TypedFunctionDescription<{encode([]: []): string}>;
|
2020-07-05 21:44:19 +00:00
|
|
|
|
|
|
|
getExpectedReturn: TypedFunctionDescription<{
|
|
|
|
encode([fromToken, toToken, amount, parts, disableFlags]: [
|
|
|
|
string,
|
|
|
|
string,
|
|
|
|
BigNumberish,
|
|
|
|
BigNumberish,
|
|
|
|
BigNumberish
|
|
|
|
]): string;
|
|
|
|
}>;
|
|
|
|
|
|
|
|
goodSwap: TypedFunctionDescription<{
|
|
|
|
encode([fromToken, toToken, amount, minReturn, parts, disableFlags]: [
|
|
|
|
string,
|
|
|
|
string,
|
|
|
|
BigNumberish,
|
|
|
|
BigNumberish,
|
|
|
|
BigNumberish,
|
|
|
|
BigNumberish
|
|
|
|
]): string;
|
|
|
|
}>;
|
|
|
|
|
|
|
|
swap: TypedFunctionDescription<{
|
2020-07-13 08:54:08 +00:00
|
|
|
encode([fromToken, toToken, amount, minReturn, distribution, disableFlags]: [
|
2020-07-05 21:44:19 +00:00
|
|
|
string,
|
|
|
|
string,
|
|
|
|
BigNumberish,
|
|
|
|
BigNumberish,
|
|
|
|
BigNumberish[],
|
|
|
|
BigNumberish
|
|
|
|
]): string;
|
|
|
|
}>;
|
|
|
|
};
|
|
|
|
|
|
|
|
events: {};
|
|
|
|
}
|
|
|
|
|
|
|
|
export class IOneSplit extends Contract {
|
|
|
|
connect(signerOrProvider: Signer | Provider | string): IOneSplit;
|
|
|
|
attach(addressOrName: string): IOneSplit;
|
|
|
|
deployed(): Promise<IOneSplit>;
|
|
|
|
|
|
|
|
on(event: EventFilter | string, listener: Listener): IOneSplit;
|
|
|
|
once(event: EventFilter | string, listener: Listener): IOneSplit;
|
|
|
|
addListener(eventName: EventFilter | string, listener: Listener): IOneSplit;
|
|
|
|
removeAllListeners(eventName: EventFilter | string): IOneSplit;
|
|
|
|
removeListener(eventName: any, listener: Listener): IOneSplit;
|
|
|
|
|
|
|
|
interface: IOneSplitInterface;
|
|
|
|
|
|
|
|
functions: {
|
|
|
|
FLAG_AAVE(): Promise<BigNumber>;
|
|
|
|
|
|
|
|
FLAG_BANCOR(): Promise<BigNumber>;
|
|
|
|
|
|
|
|
FLAG_BDAI(): Promise<BigNumber>;
|
|
|
|
|
|
|
|
FLAG_CHAI(): Promise<BigNumber>;
|
|
|
|
|
|
|
|
FLAG_COMPOUND(): Promise<BigNumber>;
|
|
|
|
|
|
|
|
FLAG_FULCRUM(): Promise<BigNumber>;
|
|
|
|
|
|
|
|
FLAG_IEARN(): Promise<BigNumber>;
|
|
|
|
|
|
|
|
FLAG_KYBER(): Promise<BigNumber>;
|
|
|
|
|
|
|
|
FLAG_KYBER_BANCOR_RESERVE(): Promise<BigNumber>;
|
|
|
|
|
|
|
|
FLAG_KYBER_OASIS_RESERVE(): Promise<BigNumber>;
|
|
|
|
|
|
|
|
FLAG_KYBER_UNISWAP_RESERVE(): Promise<BigNumber>;
|
|
|
|
|
|
|
|
FLAG_MULTI_PATH_ETH(): Promise<BigNumber>;
|
|
|
|
|
|
|
|
FLAG_OASIS(): Promise<BigNumber>;
|
|
|
|
|
|
|
|
FLAG_SMART_TOKEN(): Promise<BigNumber>;
|
|
|
|
|
|
|
|
FLAG_UNISWAP(): Promise<BigNumber>;
|
|
|
|
|
|
|
|
getExpectedReturn(
|
|
|
|
fromToken: string,
|
|
|
|
toToken: string,
|
|
|
|
amount: BigNumberish,
|
|
|
|
parts: BigNumberish,
|
|
|
|
disableFlags: BigNumberish
|
|
|
|
): Promise<{
|
|
|
|
returnAmount: BigNumber;
|
|
|
|
distribution: BigNumber[];
|
|
|
|
0: BigNumber;
|
|
|
|
1: BigNumber[];
|
|
|
|
}>;
|
|
|
|
|
|
|
|
goodSwap(
|
|
|
|
fromToken: string,
|
|
|
|
toToken: string,
|
|
|
|
amount: BigNumberish,
|
|
|
|
minReturn: BigNumberish,
|
|
|
|
parts: BigNumberish,
|
|
|
|
disableFlags: BigNumberish,
|
|
|
|
overrides?: TransactionOverrides
|
|
|
|
): Promise<ContractTransaction>;
|
|
|
|
|
|
|
|
swap(
|
|
|
|
fromToken: string,
|
|
|
|
toToken: string,
|
|
|
|
amount: BigNumberish,
|
|
|
|
minReturn: BigNumberish,
|
|
|
|
distribution: BigNumberish[],
|
|
|
|
disableFlags: BigNumberish,
|
|
|
|
overrides?: TransactionOverrides
|
|
|
|
): Promise<ContractTransaction>;
|
|
|
|
};
|
|
|
|
|
|
|
|
FLAG_AAVE(): Promise<BigNumber>;
|
|
|
|
|
|
|
|
FLAG_BANCOR(): Promise<BigNumber>;
|
|
|
|
|
|
|
|
FLAG_BDAI(): Promise<BigNumber>;
|
|
|
|
|
|
|
|
FLAG_CHAI(): Promise<BigNumber>;
|
|
|
|
|
|
|
|
FLAG_COMPOUND(): Promise<BigNumber>;
|
|
|
|
|
|
|
|
FLAG_FULCRUM(): Promise<BigNumber>;
|
|
|
|
|
|
|
|
FLAG_IEARN(): Promise<BigNumber>;
|
|
|
|
|
|
|
|
FLAG_KYBER(): Promise<BigNumber>;
|
|
|
|
|
|
|
|
FLAG_KYBER_BANCOR_RESERVE(): Promise<BigNumber>;
|
|
|
|
|
|
|
|
FLAG_KYBER_OASIS_RESERVE(): Promise<BigNumber>;
|
|
|
|
|
|
|
|
FLAG_KYBER_UNISWAP_RESERVE(): Promise<BigNumber>;
|
|
|
|
|
|
|
|
FLAG_MULTI_PATH_ETH(): Promise<BigNumber>;
|
|
|
|
|
|
|
|
FLAG_OASIS(): Promise<BigNumber>;
|
|
|
|
|
|
|
|
FLAG_SMART_TOKEN(): Promise<BigNumber>;
|
|
|
|
|
|
|
|
FLAG_UNISWAP(): Promise<BigNumber>;
|
|
|
|
|
|
|
|
getExpectedReturn(
|
|
|
|
fromToken: string,
|
|
|
|
toToken: string,
|
|
|
|
amount: BigNumberish,
|
|
|
|
parts: BigNumberish,
|
|
|
|
disableFlags: BigNumberish
|
|
|
|
): Promise<{
|
|
|
|
returnAmount: BigNumber;
|
|
|
|
distribution: BigNumber[];
|
|
|
|
0: BigNumber;
|
|
|
|
1: BigNumber[];
|
|
|
|
}>;
|
|
|
|
|
|
|
|
goodSwap(
|
|
|
|
fromToken: string,
|
|
|
|
toToken: string,
|
|
|
|
amount: BigNumberish,
|
|
|
|
minReturn: BigNumberish,
|
|
|
|
parts: BigNumberish,
|
|
|
|
disableFlags: BigNumberish,
|
|
|
|
overrides?: TransactionOverrides
|
|
|
|
): Promise<ContractTransaction>;
|
|
|
|
|
|
|
|
swap(
|
|
|
|
fromToken: string,
|
|
|
|
toToken: string,
|
|
|
|
amount: BigNumberish,
|
|
|
|
minReturn: BigNumberish,
|
|
|
|
distribution: BigNumberish[],
|
|
|
|
disableFlags: BigNumberish,
|
|
|
|
overrides?: TransactionOverrides
|
|
|
|
): Promise<ContractTransaction>;
|
|
|
|
|
|
|
|
filters: {};
|
|
|
|
|
|
|
|
estimate: {
|
|
|
|
FLAG_AAVE(): Promise<BigNumber>;
|
|
|
|
|
|
|
|
FLAG_BANCOR(): Promise<BigNumber>;
|
|
|
|
|
|
|
|
FLAG_BDAI(): Promise<BigNumber>;
|
|
|
|
|
|
|
|
FLAG_CHAI(): Promise<BigNumber>;
|
|
|
|
|
|
|
|
FLAG_COMPOUND(): Promise<BigNumber>;
|
|
|
|
|
|
|
|
FLAG_FULCRUM(): Promise<BigNumber>;
|
|
|
|
|
|
|
|
FLAG_IEARN(): Promise<BigNumber>;
|
|
|
|
|
|
|
|
FLAG_KYBER(): Promise<BigNumber>;
|
|
|
|
|
|
|
|
FLAG_KYBER_BANCOR_RESERVE(): Promise<BigNumber>;
|
|
|
|
|
|
|
|
FLAG_KYBER_OASIS_RESERVE(): Promise<BigNumber>;
|
|
|
|
|
|
|
|
FLAG_KYBER_UNISWAP_RESERVE(): Promise<BigNumber>;
|
|
|
|
|
|
|
|
FLAG_MULTI_PATH_ETH(): Promise<BigNumber>;
|
|
|
|
|
|
|
|
FLAG_OASIS(): Promise<BigNumber>;
|
|
|
|
|
|
|
|
FLAG_SMART_TOKEN(): Promise<BigNumber>;
|
|
|
|
|
|
|
|
FLAG_UNISWAP(): Promise<BigNumber>;
|
|
|
|
|
|
|
|
getExpectedReturn(
|
|
|
|
fromToken: string,
|
|
|
|
toToken: string,
|
|
|
|
amount: BigNumberish,
|
|
|
|
parts: BigNumberish,
|
|
|
|
disableFlags: BigNumberish
|
|
|
|
): Promise<BigNumber>;
|
|
|
|
|
|
|
|
goodSwap(
|
|
|
|
fromToken: string,
|
|
|
|
toToken: string,
|
|
|
|
amount: BigNumberish,
|
|
|
|
minReturn: BigNumberish,
|
|
|
|
parts: BigNumberish,
|
|
|
|
disableFlags: BigNumberish
|
|
|
|
): Promise<BigNumber>;
|
|
|
|
|
|
|
|
swap(
|
|
|
|
fromToken: string,
|
|
|
|
toToken: string,
|
|
|
|
amount: BigNumberish,
|
|
|
|
minReturn: BigNumberish,
|
|
|
|
distribution: BigNumberish[],
|
|
|
|
disableFlags: BigNumberish
|
|
|
|
): Promise<BigNumber>;
|
|
|
|
};
|
|
|
|
}
|