aave-protocol-v2/types/DefaultReserveInterestRateStrategyFactory.ts
2020-07-23 17:18:06 +02:00

263 lines
11 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 =
'0x61014060405234801561001157600080fd5b50604051610a77380380610a77833981810160405260c081101561003457600080fd5b5080516020820151604083015160608085015160808087015160a0978801516001600160601b03199790941b9690961690529290945260c05260e052610100526101205260805160601c60a05160c05160e05161010051610120516109866100f16000398061018852806103845250806103b5528061049c52806105aa5250806103f552806105ce525080610164528061044652806104de5250806101bb52806104255280610527525080610232528061058652506109866000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c806357e37af01161006657806357e37af0146100ca578063a15f30ac14610126578063c72c4d101461012e578063d5cd739114610152578063f42024091461015a57610093565b80630b3429a21461009857806314e32da4146100b257806317319873146100ba57806334762ca5146100c2575b600080fd5b6100a0610162565b60408051918252519081900360200190f35b6100a0610186565b6100a06101aa565b6100a06101b9565b610108600480360360a08110156100e057600080fd5b506001600160a01b0381351690602081013590604081013590606081013590608001356101dd565b60408051938452602084019290925282820152519081900360600190f35b6100a0610574565b610136610584565b604080516001600160a01b039092168252519081900360200190f35b6100a06105a8565b6100a06105cc565b7f000000000000000000000000000000000000000000000000000000000000000090565b7f000000000000000000000000000000000000000000000000000000000000000090565b6aa56fa5b99019a5c800000081565b7f000000000000000000000000000000000000000000000000000000000000000090565b60008080806101f2878763ffffffff6105f016565b9050600081158015610202575088155b61022b576102266102198a8463ffffffff6105f016565b839063ffffffff61065316565b61022e565b60005b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316633618abba6040518163ffffffff1660e01b815260040160206040518083038186803b15801561028957600080fd5b505afa15801561029d573d6000803e3d6000fd5b505050506040513d60208110156102b357600080fd5b50516040805163bb85c0bb60e01b81526001600160a01b038d811660048301529151919092169163bb85c0bb916024808301926020929190829003018186803b1580156102ff57600080fd5b505afa158015610313573d6000803e3d6000fd5b505050506040513d602081101561032957600080fd5b505193506b0295be96e64066972000000081111561047857600061037a6aa56fa5b99019a5c800000061036e846b0295be96e64066972000000063ffffffff61069716565b9063ffffffff61065316565b90506103eb6103af7f00000000000000000000000000000000000000000000000000000000000000008363ffffffff6106d916565b6103df877f000000000000000000000000000000000000000000000000000000000000000063ffffffff6105f016565b9063ffffffff6105f016565b94506104706104207f00000000000000000000000000000000000000000000000000000000000000008363ffffffff6106d916565b6103df7f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000063ffffffff6105f016565b935050610555565b6104d46104c761049a836b0295be96e64066972000000063ffffffff61065316565b7f00000000000000000000000000000000000000000000000000000000000000009063ffffffff6106d916565b859063ffffffff6105f016565b93506105526105257f0000000000000000000000000000000000000000000000000000000000000000610519846b0295be96e64066972000000063ffffffff61065316565b9063ffffffff6106d916565b7f00000000000000000000000000000000000000000000000000000000000000009063ffffffff6105f016565b92505b610565816105198a8a878b610711565b94505050955095509592505050565b6b0295be96e64066972000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000090565b7f000000000000000000000000000000000000000000000000000000000000000090565b60008282018381101561064a576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b90505b92915050565b60006002820461068f83610683610676876b033b2e3c9fd0803ce8000000610782565b849063ffffffff6105f016565b9063ffffffff6107db16565b949350505050565b600061064a83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061081d565b600061064a6b033b2e3c9fd0803ce80000006106836106fe868663ffffffff61078216565b6b019d971e4fe8401e74000000906105f0565b600080610724868663ffffffff6105f016565b90508061073557600091505061068f565b600061074485610519886108b4565b90506000610755856105198a6108b4565b90506000610775610765856108b4565b61036e858563ffffffff6105f016565b9998505050505050505050565b6000826107915750600061064d565b8282028284828161079e57fe5b041461064a5760405162461bcd60e51b81526004018080602001828103825260218152602001806109306021913960400191505060405180910390fd5b600061064a83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506108ca565b600081848411156108ac5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610871578181015183820152602001610859565b50505050905090810190601f16801561089e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600061064d82633b9aca0063ffffffff61078216565b600081836109195760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610871578181015183820152602001610859565b50600083858161092557fe5b049594505050505056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a2646970667358221220175aebdffa875d06b5847c42f5d0afc64ad241d294adaf7d3339b85ee7be3fe964736f6c63430006080033';