aave-protocol-v2/types/GenericLogicFactory.ts

80 lines
9.2 KiB
TypeScript
Raw Normal View History

2020-06-20 23:40:03 +00:00
/* Generated by ts-generator ver. 0.0.8 */
/* tslint:disable */
2020-07-13 08:54:08 +00:00
import {Contract, ContractFactory, Signer} from 'ethers';
import {Provider} from 'ethers/providers';
import {UnsignedTransaction} from 'ethers/utils/transaction';
2020-06-20 23:40:03 +00:00
2020-07-13 08:54:08 +00:00
import {TransactionOverrides} from '.';
import {GenericLogic} from './GenericLogic';
2020-06-20 23:40:03 +00:00
export class GenericLogicFactory extends ContractFactory {
2020-06-30 12:09:28 +00:00
constructor(signer?: Signer) {
super(_abi, _bytecode, signer);
2020-06-20 23:40:03 +00:00
}
deploy(overrides?: TransactionOverrides): Promise<GenericLogic> {
return super.deploy(overrides) as Promise<GenericLogic>;
}
getDeployTransaction(overrides?: TransactionOverrides): UnsignedTransaction {
return super.getDeployTransaction(overrides);
}
attach(address: string): GenericLogic {
return super.attach(address) as GenericLogic;
}
connect(signer: Signer): GenericLogicFactory {
return super.connect(signer) as GenericLogicFactory;
}
2020-07-13 08:54:08 +00:00
static connect(address: string, signerOrProvider: Signer | Provider): GenericLogic {
2020-06-20 23:40:03 +00:00
return new Contract(address, _abi, signerOrProvider) as GenericLogic;
}
}
const _abi = [
{
inputs: [],
2020-07-13 08:54:08 +00:00
name: 'HEALTH_FACTOR_LIQUIDATION_THRESHOLD',
2020-06-20 23:40:03 +00:00
outputs: [
{
2020-07-13 08:54:08 +00:00
internalType: 'uint256',
name: '',
type: 'uint256',
},
2020-06-20 23:40:03 +00:00
],
2020-07-13 08:54:08 +00:00
stateMutability: 'view',
type: 'function',
2020-06-20 23:40:03 +00:00
},
{
inputs: [
{
2020-07-13 08:54:08 +00:00
internalType: 'uint256',
name: 'collateralBalanceETH',
type: 'uint256',
2020-06-20 23:40:03 +00:00
},
{
2020-07-13 08:54:08 +00:00
internalType: 'uint256',
name: 'borrowBalanceETH',
type: 'uint256',
2020-06-20 23:40:03 +00:00
},
{
2020-07-13 08:54:08 +00:00
internalType: 'uint256',
name: 'ltv',
type: 'uint256',
2020-06-20 23:40:03 +00:00
},
],
2020-07-13 08:54:08 +00:00
name: 'calculateAvailableBorrowsETH',
2020-06-20 23:40:03 +00:00
outputs: [
{
2020-07-13 08:54:08 +00:00
internalType: 'uint256',
name: '',
type: 'uint256',
},
2020-06-20 23:40:03 +00:00
],
2020-07-13 08:54:08 +00:00
stateMutability: 'view',
type: 'function',
},
2020-06-20 23:40:03 +00:00
];
const _bytecode =
2020-07-23 15:18:06 +00:00
'0x610e73610026600b82828239805160001a60731461001957fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106100565760003560e01c806392eeb05c1461005b578063c3525c2814610150578063d609bd1b1461016a578063daae705514610193575b600080fd5b610125600480360360a081101561007157600080fd5b6001600160a01b0382351691602081013591604082013591908101906080810160608201356401000000008111156100a857600080fd5b8201836020820111156100ba57600080fd5b803590602001918460208302840111640100000000831117156100dc57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550505090356001600160a01b0316915061024c9050565b6040805195865260208601949094528484019290925260608401526080830152519081900360a00190f35b6101586107b7565b60408051918252519081900360200190f35b6101586004803603606081101561018057600080fd5b50803590602081013590604001356107c3565b610238600480360360e08110156101a957600080fd5b6001600160a01b0382358116926020810135909116916040820135916060810135916080820135919081019060c0810160a08201356401000000008111156101f057600080fd5b82018360208201111561020257600080fd5b8035906020019184602083028401116401000000008311171561022457600080fd5b9193509150356001600160a01b031661080a565b604080519115158252519081900360200190f35b600080600080600061025c610d26565b600060e08201525b87518160e00151101561070357878160e001518151811061028157fe5b6020026020010151816101e001906001600160a01b031690816001600160a01b03168152505060008a6000836101e001516001600160a01b03166001600160a01b0316815260200190815260200160002090508060060160009054906101000a90046001600160a01b03166001600160a01b03166370a082318d6040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b15801561034157600080fd5b505afa158015610355573d6000803e3d6000fd5b505050506040513d602081101561036b57600080fd5b5051604080840191909152600782015481516370a0823160e01b81526001600160a01b038f81166004830152925192909116916370a0823191602480820192602092909190829003018186803b1580156103c457600080fd5b505afa1580156103d8573d6000803e3d6000fd5b505050506040513d60208110156103ee57600080fd5b505160608301526008810154604080516370a0823160e01b81526001600160a01b038f8116600483015291516104869392909216916370a0823191602480820192602092909190829003018186803b15801561044957600080fd5b505afa15801561045d573d6000803e3d6000fd5b505050506040513d602081101561047357600080fd5b505160608401519063ffffffff610a3a16565b6060830152604082015115801561049f57506060820151155b156104aa57506106f3565b6104b681600501610a9d565b6080860181905260c08601929092525060a0840191909152600a0a602083015260e082015189516001600160a01b038a169163b3596f07918c919081106104f957fe5b60200260200101516040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b15801561054757600080fd5b505afa15801561055b573d6000803e3d6000fd5b505050506040513d602081101561057157600080fd5b505182526040820151156106a85760006105b083602001516105a485604001518660000151610ae490919063ffffffff16565b9063ffffffff610b3d16565b90508260a0015160001415801561062057508a60008e6001600160a01b03166001600160a01b0316815260200190815260200160002060008b8560e00151815181106105f857fe5b6020908102919091018101516001600160a01b031682528101919091526040016000205460ff165b156106a65761012083015161063b908263ffffffff610a3a16565b61012084015260a083015161066d9061065b90839063ffffffff610ae416565b6101808501519063ffffffff610a3a16565b61018084015260c083015161069f9061068d90839063ffffffff610ae416565b6101a08501519063ffffffff610a3a16565b6101a08401525b505b6060820151156106f1576106ea6106d883602001516105a485606001518660000151610ae490919063ffffffff16565b6101408401519063ffffffff610a3a16565b6101408301525b505b60e0810180516001019052610264565b600081610120015111610717576000610732565b6101208101516101808201516107329163ffffffff610b3d16565b610180820152610120810151610749576000610764565b6101208101516101a08201516107649163ffffffff610b3d16565b6101a0820181905261012082015161014083015161078192610b7f565b61010082018190526101208201516101408301516101808401516101a090940151919e909d50929b509950975095505050505050565b670de0b6b3a764000081565b6000806107db60646105a4878663ffffffff61