aave-protocol-v2/types/OneSplitAdapterFactory.ts

155 lines
9.4 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 =
"0x608060405234801561001057600080fd5b5060408051731814222fa8c8c1c1bf380e3bbfbd9de8657da47681527376b47460d7f7c5222cfb6b6a75615ab10895dde46020820152600a8183015290517f8d2e03fe8af77d72ac9d334b8bc58153f47fc0c0ec0c926c1686754201cfdc5d9181900360600190a1610bc6806100876000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80630ed2fc951461003b57806393ed430914610089575b600080fd5b6100776004803603608081101561005157600080fd5b506001600160a01b038135811691602081013590911690604081013590606001356100fb565b60408051918252519081900360200190f35b6100f96004803603602081101561009f57600080fd5b8101906020810181356401000000008111156100ba57600080fd5b8201836020820111156100cc57600080fd5b803590602001918460208302840111640100000000831117156100ee57600080fd5b5090925090506104f4565b005b60008061010661059b565b6001600160a01b0316866001600160a01b031614610125576000610127565b835b6040805163b3596f0760e01b81526001600160a01b038916600482015290519192506000917376b47460d7f7c5222cfb6b6a75615ab10895dde49163b3596f07916024808301926020929190829003018186803b15801561018757600080fd5b505afa15801561019b573d6000803e3d6000fd5b505050506040513d60208110156101b157600080fd5b50516040805163b3596f0760e01b81526001600160a01b038916600482015290519192506000917376b47460d7f7c5222cfb6b6a75615ab10895dde49163b3596f07916024808301926020929190829003018186803b15801561021357600080fd5b505afa158015610227573d6000803e3d6000fd5b505050506040513d602081101561023d57600080fd5b5051604080516370a0823160e01b815230600482015290519192506000916001600160a01b038a16916370a08231916024808301926020929190829003018186803b15801561028b57600080fd5b505afa15801561029f573d6000803e3d6000fd5b505050506040513d60208110156102b557600080fd5b5051604080516335cac4d560e11b81526001600160a01b038c811660048301528b166024820152604481018a9052600060648201819052600a608483015261020060a48301529151929350731814222fa8c8c1c1bf380e3bbfbd9de8657da47692636b9589aa92889260c4808201939182900301818588803b15801561033a57600080fd5b505af115801561034e573d6000803e3d6000fd5b505050505060006103e7828a6001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b1580156103af57600080fd5b505afa1580156103c3573d6000803e3d6000fd5b505050506040513d60208110156103d957600080fd5b50519063ffffffff6105b316565b9050606487900361042e610401868b63ffffffff6105fe16565b6104226064610416888763ffffffff6105fe16565b9063ffffffff6105fe16565b9063ffffffff61065716565b1015610474576040805162461bcd60e51b815260206004820152601060248201526f494e56414c49445f534c49505041474560801b604482015290519081900360640190fd5b731814222fa8c8c1c1bf380e3bbfbd9de8657da4766001600160a01b0316896001600160a01b03168b6001600160a01b03167fa6fee24309b1d83d9ec7b9e4dbb73c6f882746efbfb26db7b7d9e9f2fb6dc95a8b85604051808381526020018281526020019250505060405180910390a49450505050505b949350505050565b60005b818110156105965761050761059b565b6001600160a01b031683838381811061051c57fe5b905060200201356001600160a01b03166001600160a01b03161461058e5761058e731814222fa8c8c1c1bf380e3bbfbd9de8657da47661055a610699565b85858581811061056657fe5b905060200201356001600160a01b03166001600160a01b031661069f9092919063ffffffff16565b6001016104f7565b505050565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee90565b60006105f583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506107b2565b90505b92915050565b60008261060d575060006105f8565b8282028284828161061a57fe5b04146105f55760405162461bcd60e51b8152600401808060200182810382526021815260200180610b106021913960400191505060405180910390fd5b60006105f583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610849565b60011990565b801580610725575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b1580156106f757600080fd5b505afa15801561070b573d6000803e3d6000fd5b505050506040513d602081101561072157600080fd5b5051155b6107605760405162461bcd60e51b8152600401808060200182810382526036815260200180610b5b6036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b1790526105969084906108ae565b600081848411156108415760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156108065781810151838201526020016107ee565b50505050905090810190601f1680156108335780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600081836108985760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156108065781810151838201526020016107ee565b5060008385816108a457fe5b0495945050505050565b6060610903826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661095f9092919063ffffffff16565b8051909150156105965780806020019051602081101561092257600080fd5b50516105965760405162461bcd60e51b815260040180806020018281038252602a815260200180610b31602a913960400191505060405180910390fd5b60606104ec8484600085606061097485610ad6565b6109c5576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310610a045780518252601f1990920191602091820191016109e5565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114610a66576040519150601f19603f3d011682016040523d82523d6000602084013e610a6b565b606091505b50915091508115610a7f5791506104ec9050565b805115610a8f5780518082602001fd5b60405162461bcd60e51b81526020600482018181528651602484015286518793919283926044019190850190808383600083156108065781810151838201526020016107ee565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708181148015906104ec57505015159291505056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a26469706673582212208feab8b8969fcadba8a22d5b8ed1cc59039f86ba2611f214a3dec442aac4f39b64736f6c63430006080033";