aave-protocol-v2/types/OneSplitAdapterFactory.ts

155 lines
9.2 KiB
TypeScript

/* Generated by ts-generator ver. 0.0.8 */
/* tslint:disable */
import { Contract, ContractFactory, Signer } from "ethers";
import { Provider } from "ethers/providers";
import { UnsignedTransaction } from "ethers/utils/transaction";
import { TransactionOverrides } from ".";
import { OneSplitAdapter } from "./OneSplitAdapter";
export class OneSplitAdapterFactory extends ContractFactory {
constructor(signer?: Signer) {
super(_abi, _bytecode, signer);
}
deploy(overrides?: TransactionOverrides): Promise<OneSplitAdapter> {
return super.deploy(overrides) as Promise<OneSplitAdapter>;
}
getDeployTransaction(overrides?: TransactionOverrides): UnsignedTransaction {
return super.getDeployTransaction(overrides);
}
attach(address: string): OneSplitAdapter {
return super.attach(address) as OneSplitAdapter;
}
connect(signer: Signer): OneSplitAdapterFactory {
return super.connect(signer) as OneSplitAdapterFactory;
}
static connect(
address: string,
signerOrProvider: Signer | Provider
): OneSplitAdapter {
return new Contract(address, _abi, signerOrProvider) as OneSplitAdapter;
}
}
const _abi = [
{
inputs: [],
stateMutability: "nonpayable",
type: "constructor"
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "address",
name: "from",
type: "address"
},
{
indexed: true,
internalType: "address",
name: "to",
type: "address"
},
{
indexed: true,
internalType: "address",
name: "platform",
type: "address"
},
{
indexed: false,
internalType: "uint256",
name: "fromAmount",
type: "uint256"
},
{
indexed: false,
internalType: "uint256",
name: "toAmount",
type: "uint256"
}
],
name: "Exchange",
type: "event"
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: "address",
name: "oneSplit",
type: "address"
},
{
indexed: false,
internalType: "address",
name: "priceOracle",
type: "address"
},
{
indexed: false,
internalType: "uint256",
name: "splitParts",
type: "uint256"
}
],
name: "OneSplitAdapterSetup",
type: "event"
},
{
inputs: [
{
internalType: "contract IERC20[]",
name: "_tokens",
type: "address[]"
}
],
name: "approveExchange",
outputs: [],
stateMutability: "nonpayable",
type: "function"
},
{
inputs: [
{
internalType: "address",
name: "_from",
type: "address"
},
{
internalType: "address",
name: "_to",
type: "address"
},
{
internalType: "uint256",
name: "_amount",
type: "uint256"
},
{
internalType: "uint256",
name: "_maxSlippage",
type: "uint256"
}
],
name: "exchange",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256"
}
],
stateMutability: "nonpayable",
type: "function"
}
];
const _bytecode =
"0x608060405234801561001057600080fd5b5060408051731814222fa8c8c1c1bf380e3bbfbd9de8657da47681527376b47460d7f7c5222cfb6b6a75615ab10895dde46020820152600a8183015290517f8d2e03fe8af77d72ac9d334b8bc58153f47fc0c0ec0c926c1686754201cfdc5d9181900360600190a1610b5d806100876000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80630ed2fc951461003b57806393ed430914610089575b600080fd5b6100776004803603608081101561005157600080fd5b506001600160a01b038135811691602081013590911690604081013590606001356100fb565b60408051918252519081900360200190f35b6100f96004803603602081101561009f57600080fd5b8101906020810181356401000000008111156100ba57600080fd5b8201836020820111156100cc57600080fd5b803590602001918460208302840111640100000000831117156100ee57600080fd5b5090925090506104f2565b005b600080610106610599565b6001600160a01b0316866001600160a01b031614610125576000610127565b835b6040805163b3596f0760e01b81526001600160a01b038916600482015290519192506000917376b47460d7f7c5222cfb6b6a75615ab10895dde49163b3596f07916024808301926020929190829003018186803b15801561018757600080fd5b505afa15801561019b573d6000803e3d6000fd5b505050506040513d60208110156101b157600080fd5b50516040805163b3596f0760e01b81526001600160a01b038916600482015290519192506000917376b47460d7f7c5222cfb6b6a75615ab10895dde49163b3596f07916024808301926020929190829003018186803b15801561021357600080fd5b505afa158015610227573d6000803e3d6000fd5b505050506040513d602081101561023d57600080fd5b5051604080516370a0823160e01b815230600482015290519192506000916001600160a01b038a16916370a08231916024808301926020929190829003018186803b15801561028b57600080fd5b505afa15801561029f573d6000803e3d6000fd5b505050506040513d60208110156102b557600080fd5b5051604080516335cac4d560e11b81526001600160a01b038c811660048301528b166024820152604481018a9052600060648201819052600a608483015261020060a48301529151929350731814222fa8c8c1c1bf380e3bbfbd9de8657da47692636b9589aa92889260c4808201939182900301818588803b15801561033a57600080fd5b505af115801561034e573d6000803e3d6000fd5b505050505060006103e7828a6001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b1580156103af57600080fd5b505afa1580156103c3573d6000803e3d6000fd5b505050506040513d60208110156103d957600080fd5b50519063ffffffff6105b116565b9050606487900361042e610401868b63ffffffff6105fc16565b6104226064610416888763ffffffff6105fc16565b9063ffffffff6105fc16565b9063ffffffff61065516565b1015610474576040805162461bcd60e51b815260206004820152601060248201526f494e56414c49445f534c49505041474560801b604482015290519081900360640190fd5b731814222fa8c8c1c1bf380e3bbfbd9de8657da4766001600160a01b0316896001600160a01b03168b6001600160a01b03167fa6fee24309b1d83d9ec7b9e4dbb73c6f882746efbfb26db7b7d9e9f2fb6dc95a8b85604051808381526020018281526020019250505060405180910390a49998505050505050505050565b60005b8181101561059457610505610599565b6001600160a01b031683838381811061051a57fe5b905060200201356001600160a01b03166001600160a01b03161461058c5761058c731814222fa8c8c1c1bf380e3bbfbd9de8657da476610558610697565b85858581811061056457fe5b905060200201356001600160a01b03166001600160a01b031661069d9092919063ffffffff16565b6001016104f5565b505050565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee90565b60006105f383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506107b0565b90505b92915050565b60008261060b575060006105f6565b8282028284828161061857fe5b04146105f35760405162461bcd60e51b8152600401808060200182810382526021815260200180610aa76021913960400191505060405180910390fd5b60006105f383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610847565b60011990565b801580610723575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b1580156106f557600080fd5b505afa158015610709573d6000803e3d6000fd5b505050506040513d602081101561071f57600080fd5b5051155b61075e5760405162461bcd60e51b8152600401808060200182810382526036815260200180610af26036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b1790526105949084906108ac565b6000818484111561083f5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156108045781810151838201526020016107ec565b50505050905090810190601f1680156108315780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600081836108965760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156108045781810151838201526020016107ec565b5060008385816108a257fe5b0495945050505050565b6108be826001600160a01b0316610a6a565b61090f576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b6020831061094d5780518252601f19909201916020918201910161092e565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146109af576040519150601f19603f3d011682016040523d82523d6000602084013e6109b4565b606091505b509150915081610a0b576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b805115610a6457808060200190516020811015610a2757600080fd5b5051610a645760405162461bcd60e51b815260040180806020018281038252602a815260200180610ac8602a913960400191505060405180910390fd5b50505050565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470818114801590610a9e57508115155b94935050505056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a2646970667358221220fc45accf95836cf324cd68150730543f84ce17523a2367fa0f1221eb5eca3c0264736f6c63430006080033";