aave-protocol-v2/types/DefaultReserveInterestRateStrategyFactory.ts
2020-06-21 01:40:03 +02:00

267 lines
10 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 { BigNumberish } from "ethers/utils";
import { TransactionOverrides } from ".";
import { DefaultReserveInterestRateStrategy } from "./DefaultReserveInterestRateStrategy";
export class DefaultReserveInterestRateStrategyFactory extends ContractFactory {
constructor(signer?: Signer) {
super(_abi, _bytecode, signer);
}
deploy(
_provider: string,
_baseVariableBorrowRate: BigNumberish,
_variableRateSlope1: BigNumberish,
_variableRateSlope2: BigNumberish,
_stableRateSlope1: BigNumberish,
_stableRateSlope2: BigNumberish,
overrides?: TransactionOverrides
): Promise<DefaultReserveInterestRateStrategy> {
return super.deploy(
_provider,
_baseVariableBorrowRate,
_variableRateSlope1,
_variableRateSlope2,
_stableRateSlope1,
_stableRateSlope2,
overrides
) as Promise<DefaultReserveInterestRateStrategy>;
}
getDeployTransaction(
_provider: string,
_baseVariableBorrowRate: BigNumberish,
_variableRateSlope1: BigNumberish,
_variableRateSlope2: BigNumberish,
_stableRateSlope1: BigNumberish,
_stableRateSlope2: BigNumberish,
overrides?: TransactionOverrides
): UnsignedTransaction {
return super.getDeployTransaction(
_provider,
_baseVariableBorrowRate,
_variableRateSlope1,
_variableRateSlope2,
_stableRateSlope1,
_stableRateSlope2,
overrides
);
}
attach(address: string): DefaultReserveInterestRateStrategy {
return super.attach(address) as DefaultReserveInterestRateStrategy;
}
connect(signer: Signer): DefaultReserveInterestRateStrategyFactory {
return super.connect(signer) as DefaultReserveInterestRateStrategyFactory;
}
static connect(
address: string,
signerOrProvider: Signer | Provider
): DefaultReserveInterestRateStrategy {
return new Contract(
address,
_abi,
signerOrProvider
) as DefaultReserveInterestRateStrategy;
}
}
const _abi = [
{
inputs: [
{
internalType: "contract LendingPoolAddressesProvider",
name: "_provider",
type: "address"
},
{
internalType: "uint256",
name: "_baseVariableBorrowRate",
type: "uint256"
},
{
internalType: "uint256",
name: "_variableRateSlope1",
type: "uint256"
},
{
internalType: "uint256",
name: "_variableRateSlope2",
type: "uint256"
},
{
internalType: "uint256",
name: "_stableRateSlope1",
type: "uint256"
},
{
internalType: "uint256",
name: "_stableRateSlope2",
type: "uint256"
}
],
stateMutability: "nonpayable",
type: "constructor"
},
{
inputs: [],
name: "EXCESS_UTILIZATION_RATE",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [],
name: "OPTIMAL_UTILIZATION_RATE",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [],
name: "addressesProvider",
outputs: [
{
internalType: "contract LendingPoolAddressesProvider",
name: "",
type: "address"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [
{
internalType: "address",
name: "_reserve",
type: "address"
},
{
internalType: "uint256",
name: "_availableLiquidity",
type: "uint256"
},
{
internalType: "uint256",
name: "_totalBorrowsStable",
type: "uint256"
},
{
internalType: "uint256",
name: "_totalBorrowsVariable",
type: "uint256"
},
{
internalType: "uint256",
name: "_averageStableBorrowRate",
type: "uint256"
}
],
name: "calculateInterestRates",
outputs: [
{
internalType: "uint256",
name: "currentLiquidityRate",
type: "uint256"
},
{
internalType: "uint256",
name: "currentStableBorrowRate",
type: "uint256"
},
{
internalType: "uint256",
name: "currentVariableBorrowRate",
type: "uint256"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [],
name: "getBaseVariableBorrowRate",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [],
name: "getStableRateSlope1",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [],
name: "getStableRateSlope2",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [],
name: "getVariableRateSlope1",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [],
name: "getVariableRateSlope2",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256"
}
],
stateMutability: "view",
type: "function"
}
];
const _bytecode =
"0x608060405234801561001057600080fd5b50604051610881380380610881833981810160405260c081101561003357600080fd5b508051602082015160408301516060840151608085015160a090950151600080546001600160a01b039096166001600160a01b0319909616959095179094556001929092556002556003556004919091556005556107eb806100966000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c806357e37af01161006657806357e37af0146100ca578063a15f30ac14610126578063c72c4d101461012e578063d5cd739114610152578063f42024091461015a57610093565b80630b3429a21461009857806314e32da4146100b257806317319873146100ba57806334762ca5146100c2575b600080fd5b6100a0610162565b60408051918252519081900360200190f35b6100a0610168565b6100a061016e565b6100a061017d565b610108600480360360a08110156100e057600080fd5b506001600160a01b038135169060208101359060408101359060608101359060800135610183565b60408051938452602084019290925282820152519081900360600190f35b6100a061042a565b61013661043a565b604080516001600160a01b039092168252519081900360200190f35b6100a0610449565b6100a061044f565b60025490565b60055490565b6aa56fa5b99019a5c800000081565b60015490565b6000808080610198878763ffffffff61045516565b90506000811580156101a8575088155b6101d1576101cc6101bf8a8463ffffffff61045516565b839063ffffffff6104b816565b6101d4565b60005b90506000809054906101000a90046001600160a01b03166001600160a01b0316633618abba6040518163ffffffff1660e01b815260040160206040518083038186803b15801561022357600080fd5b505afa158015610237573d6000803e3d6000fd5b505050506040513d602081101561024d57600080fd5b50516040805163bb85c0bb60e01b81526001600160a01b038d811660048301529151919092169163bb85c0bb916024808301926020929190829003018186803b15801561029957600080fd5b505afa1580156102ad573d6000803e3d6000fd5b505050506040513d60208110156102c357600080fd5b505193506b0295be96e6406697200000008111156103855760006103146aa56fa5b99019a5c8000000610308846b0295be96e64066972000000063ffffffff6104fc16565b9063ffffffff6104b816565b905061034e61032e8260055461053e90919063ffffffff16565b60045461034290889063ffffffff61045516565b9063ffffffff61045516565b945061037d6103688260035461053e90919063ffffffff16565b6002546001546103429163ffffffff61045516565b93505061040b565b6103c36103b66103a7836b0295be96e64066972000000063ffffffff6104b816565b6004549063ffffffff61053e16565b859063ffffffff61045516565b93506104086103f96002546103ed6b0295be96e640669720000000856104b890919063ffffffff16565b9063ffffffff61053e16565b6001549063ffffffff61045516565b92505b61041b816103ed8a8a878b610576565b94505050955095509592505050565b6b0295be96e64066972000000081565b6000546001600160a01b031681565b60045490565b60035490565b6000828201838110156104af576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b90505b92915050565b6000600282046104f4836104e86104db876b033b2e3c9fd0803ce80000006105e7565b849063ffffffff61045516565b9063ffffffff61064016565b949350505050565b60006104af83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610682565b60006104af6b033b2e3c9fd0803ce80000006104e8610563868663ffffffff6105e716565b6b019d971e4fe8401e7400000090610455565b600080610589868663ffffffff61045516565b90508061059a5760009150506104f4565b60006105a9856103ed88610719565b905060006105ba856103ed8a610719565b905060006105da6105ca85610719565b610308858563ffffffff61045516565b9998505050505050505050565b6000826105f6575060006104b2565b8282028284828161060357fe5b04146104af5760405162461bcd60e51b81526004018080602001828103825260218152602001806107956021913960400191505060405180910390fd5b60006104af83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061072f565b600081848411156107115760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156106d65781810151838201526020016106be565b50505050905090810190601f1680156107035780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60006104b282633b9aca0063ffffffff6105e716565b6000818361077e5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156106d65781810151838201526020016106be565b50600083858161078a57fe5b049594505050505056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a2646970667358221220ad3fd83002ac1c6512ed0ec7535181627573587704a2a4df5dc66febe8399dcf64736f6c63430006080033";