mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
155 lines
9.4 KiB
TypeScript
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 =
|
||
|
"0x608060405234801561001057600080fd5b5060408051731814222fa8c8c1c1bf380e3bbfbd9de8657da47681527376b47460d7f7c5222cfb6b6a75615ab10895dde46020820152600a8183015290517f8d2e03fe8af77d72ac9d334b8bc58153f47fc0c0ec0c926c1686754201cfdc5d9181900360600190a1610bc6806100876000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80630ed2fc951461003b57806393ed430914610089575b600080fd5b6100776004803603608081101561005157600080fd5b506001600160a01b038135811691602081013590911690604081013590606001356100fb565b60408051918252519081900360200190f35b6100f96004803603602081101561009f57600080fd5b8101906020810181356401000000008111156100ba57600080fd5b8201836020820111156100cc57600080fd5b803590602001918460208302840111640100000000831117156100ee57600080fd5b5090925090506104f4565b005b60008061010661059b565b6001600160a01b0316866001600160a01b031614610125576000610127565b835b6040805163b3596f0760e01b81526001600160a01b038916600482015290519192506000917376b47460d7f7c5222cfb6b6a75615ab10895dde49163b3596f07916024808301926020929190829003018186803b15801561018757600080fd5b505afa15801561019b573d6000803e3d6000fd5b505050506040513d60208110156101b157600080fd5b50516040805163b3596f0760e01b81526001600160a01b038916600482015290519192506000917376b47460d7f7c5222cfb6b6a75615ab10895dde49163b3596f07916024808301926020929190829003018186803b15801561021357600080fd5b505afa158015610227573d6000803e3d6000fd5b505050506040513d602081101561023d57600080fd5b5051604080516370a0823160e01b815230600482015290519192506000916001600160a01b038a16916370a08231916024808301926020929190829003018186803b15801561028b57600080fd5b505afa15801561029f573d6000803e3d6000fd5b505050506040513d60208110156102b557600080fd5b5051604080516335cac4d560e11b81526001600160a01b038c811660048301528b166024820152604481018a9052600060648201819052600a608483015261020060a48301529151929350731814222fa8c8c1c1bf380e3bbfbd9de8657da47692636b9589aa92889260c4808201939182900301818588803b15801561033a57600080fd5b505af115801561034e573d6000803e3d6000fd5b505050505060006103e7828a6001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b1580156103af57600080fd5b505afa1580156103c3573d6000803e3d6000fd5b505050506040513d60208110156103d957600080fd5b50519063ffffffff6105b316565b9050606487900361042e610401868b63ffffffff6105fe16565b6104226064610416888763ffffffff6105fe16565b9063ffffffff6105fe16565b9063ffffffff61065716565b1015610474576040805162461bcd60e51b815260206004820152601060248201526f494e56414c49445f534c49505041474560801b604482015290519081900360640190fd5b731814222fa8c8c1c1bf380e3bbfbd9de8657da4766001600160a01b0316896001600160a01b03168b6001600160a01b03167fa6fee24309b1d83d9ec7b9e4dbb73c6f882746efbfb26db7b7d9e9f2fb6dc95a8b85604051808381526020018281526020019250505060405180910390a49450505050505b949350505050565b60005b818110156105965761050761059b565b6001600160a01b031683838381811061051c57fe5b905060200201356001600160a01b03166001600160a01b03161461058e5761058e731814222fa8c8c1c1bf380e3bbfbd9de8657da47661055a610699565b85858581811061056657fe5b905060200201356001600160a01b03166001600160a01b031661069f9092919063ffffffff16565b6001016104f7565b505050565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee90565b60006105f583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506107b2565b90505b92915050565b60008261060d575060006105f8565b8282028284828161061a57fe5b04146105f55760405162461bcd60e51b8152600401808060200182810382526021815260200180610b106021913960400191505060405180910390fd5b60006105f583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610849565b60011990565b801580610725575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b1580156106f757600080fd5b505afa15801561070b573d6000803e3d6000fd5b505050506040513d602081101561072157600080fd5b5051155b6107605760405162461bcd60e51b8152600401808060200182810382526036815260200180610b5b6036913960400191505060405180910390fd5b604080516001600160a01b03841660248201526044
|