aave-protocol-v2/types/IExchangeAdapterFactory.ts

101 lines
2.0 KiB
TypeScript
Raw Normal View History

2020-06-03 10:23:21 +00:00
/* Generated by ts-generator ver. 0.0.8 */
/* tslint:disable */
2020-07-13 08:54:08 +00:00
import {Contract, Signer} from 'ethers';
import {Provider} from 'ethers/providers';
2020-06-03 10:23:21 +00:00
2020-07-13 08:54:08 +00:00
import {IExchangeAdapter} from './IExchangeAdapter';
2020-06-03 10:23:21 +00:00
export class IExchangeAdapterFactory {
2020-07-13 08:54:08 +00:00
static connect(address: string, signerOrProvider: Signer | Provider): IExchangeAdapter {
2020-06-03 10:23:21 +00:00
return new Contract(address, _abi, signerOrProvider) as IExchangeAdapter;
}
}
const _abi = [
{
anonymous: false,
inputs: [
{
indexed: true,
2020-07-13 08:54:08 +00:00
internalType: 'address',
name: 'from',
type: 'address',
2020-06-03 10:23:21 +00:00
},
{
indexed: true,
2020-07-13 08:54:08 +00:00
internalType: 'address',
name: 'to',
type: 'address',
2020-06-03 10:23:21 +00:00
},
{
indexed: true,
2020-07-13 08:54:08 +00:00
internalType: 'address',
name: 'platform',
type: 'address',
2020-06-03 10:23:21 +00:00
},
{
indexed: false,
2020-07-13 08:54:08 +00:00
internalType: 'uint256',
name: 'fromAmount',
type: 'uint256',
2020-06-03 10:23:21 +00:00
},
{
indexed: false,
2020-07-13 08:54:08 +00:00
internalType: 'uint256',
name: 'toAmount',
type: 'uint256',
},
2020-06-03 10:23:21 +00:00
],
2020-07-13 08:54:08 +00:00
name: 'Exchange',
type: 'event',
2020-06-03 10:23:21 +00:00
},
{
inputs: [
{
2020-07-13 08:54:08 +00:00
internalType: 'contract IERC20[]',
name: '_tokens',
type: 'address[]',
},
2020-06-03 10:23:21 +00:00
],
2020-07-13 08:54:08 +00:00
name: 'approveExchange',
2020-06-03 10:23:21 +00:00
outputs: [],
2020-07-13 08:54:08 +00:00
stateMutability: 'nonpayable',
type: 'function',
2020-06-03 10:23:21 +00:00
},
{
inputs: [
{
2020-07-13 08:54:08 +00:00
internalType: 'address',
name: '_from',
type: 'address',
2020-06-03 10:23:21 +00:00
},
{
2020-07-13 08:54:08 +00:00
internalType: 'address',
name: '_to',
type: 'address',
2020-06-03 10:23:21 +00:00
},
{
2020-07-13 08:54:08 +00:00
internalType: 'uint256',
name: '_amount',
type: 'uint256',
2020-06-03 10:23:21 +00:00
},
{
2020-07-13 08:54:08 +00:00
internalType: 'uint256',
name: '_maxSlippage',
type: 'uint256',
},
2020-06-03 10:23:21 +00:00
],
2020-07-13 08:54:08 +00:00
name: 'exchange',
2020-06-03 10:23:21 +00:00
outputs: [
{
2020-07-13 08:54:08 +00:00
internalType: 'uint256',
name: '',
type: 'uint256',
},
2020-06-03 10:23:21 +00:00
],
2020-07-13 08:54:08 +00:00
stateMutability: 'nonpayable',
type: 'function',
},
2020-06-03 10:23:21 +00:00
];