mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
80 lines
9.2 KiB
TypeScript
80 lines
9.2 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 {GenericLogic} from './GenericLogic';
|
|
|
|
export class GenericLogicFactory extends ContractFactory {
|
|
constructor(signer?: Signer) {
|
|
super(_abi, _bytecode, signer);
|
|
}
|
|
|
|
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;
|
|
}
|
|
static connect(address: string, signerOrProvider: Signer | Provider): GenericLogic {
|
|
return new Contract(address, _abi, signerOrProvider) as GenericLogic;
|
|
}
|
|
}
|
|
|
|
const _abi = [
|
|
{
|
|
inputs: [],
|
|
name: 'HEALTH_FACTOR_LIQUIDATION_THRESHOLD',
|
|
outputs: [
|
|
{
|
|
internalType: 'uint256',
|
|
name: '',
|
|
type: 'uint256',
|
|
},
|
|
],
|
|
stateMutability: 'view',
|
|
type: 'function',
|
|
},
|
|
{
|
|
inputs: [
|
|
{
|
|
internalType: 'uint256',
|
|
name: 'collateralBalanceETH',
|
|
type: 'uint256',
|
|
},
|
|
{
|
|
internalType: 'uint256',
|
|
name: 'borrowBalanceETH',
|
|
type: 'uint256',
|
|
},
|
|
{
|
|
internalType: 'uint256',
|
|
name: 'ltv',
|
|
type: 'uint256',
|
|
},
|
|
],
|
|
name: 'calculateAvailableBorrowsETH',
|
|
outputs: [
|
|
{
|
|
internalType: 'uint256',
|
|
name: '',
|
|
type: 'uint256',
|
|
},
|
|
],
|
|
stateMutability: 'view',
|
|
type: 'function',
|
|
},
|
|
];
|
|
|
|
const _bytecode =
|
|
'0x610e85610026600b82828239805160001a60731461001957fe5b30600052607381538281f3fe730000000000000000000000000000000000000000301460806040526004361061004b5760003560e01c8063865cb0ce14610050578063c3525c2814610079578063d609bd1b1461008e575b600080fd5b61006361005e366004610c0b565b6100a1565b6040516100709190610d70565b60405180910390f35b610081610326565b6040516100709190610e46565b61008161009c366004610d31565b610332565b60006100ba6100b536879003870187610cdc565b610374565b158061010857506001600160a01b03891660009081526020879052604090206009015461010690600160d01b900460ff166100fa36889003880188610cdc565b9063ffffffff61039c16565b155b156101155750600161031a565b61011d610af7565b6001600160a01b038a166000908152602088905260409020610141906005016103b4565b845250506020820181905261015a57600191505061031a565b6101a9898861016e368a90038a018a610cdc565b8888808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152508a92506103fb915050565b506080850152506060830181905260408301919091526101cd57600191505061031a565b6102708160000151600a0a6102648a866001600160a01b031663b3596f078f6040518263ffffffff1660e01b81526004016102089190610d5c565b60206040518083038186803b15801561022057600080fd5b505afa158015610234573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102589190610d19565b9063ffffffff6108fb16565b9063ffffffff61093e16565b60c08201819052604082015161028b9163ffffffff61098016565b60e082018190526102a057600091505061031a565b6102eb8160e001516102646102c68460a001518560c001516108fb90919063ffffffff16565b608085015160408601516102df9163ffffffff6108fb16565b9063ffffffff61098016565b610100820181905260e0820151606083015160009261030b9291906109c2565b670de0b6b3a764000010925050505b98975050505050505050565b670de0b6b3a764000081565b600080610345858463ffffffff6109fa16565b90508381101561035957600091505061036d565b610369818563ffffffff61098016565b9150505b9392505050565b517f555555555555555555555555555555555555555555555555555555555555555516151590565b815160016002830281019190911c1615155b92915050565b54670fffffffffff000019811691601082901c650fffffff0001600160f01b031691602081901c630fff0001600160e01b03169160309190911c610f01600160d01b031690565b600080600080600061040b610b53565b61041489610a1e565b1561043157506000945084935083925082915060001990506108ee565b600060e08201525b87518160e0015110156108415760e081015161045c908a9063ffffffff610a2316565b61046557610831565b878160e001518151811061047557fe5b6020908102919091018101516001600160a01b031661020083018190526000908152908b9052604090206104ab600582016103b4565b6080860181905260c08601929092525060a0840191909152600a0a602083015261020082015160405163b3596f0760e01b81526001600160a01b038a169163b3596f07916104fc9190600401610d5c565b60206040518083038186803b15801561051457600080fd5b505afa158015610528573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061054c9190610d19565b825260a082015115801590610572575060e0820151610572908b9063ffffffff61039c16565b156106a35760068101546040516370a0823160e01b81526001600160a01b03909116906370a08231906105a9908f90600401610d5c565b60206040518083038186803b1580156105c157600080fd5b505afa1580156105d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105f99190610d19565b604083018190526020830151835160009261061e92916102649163ffffffff6108fb16565b610120840151909150610637908263ffffffff610a3316565b61012084015260a08301516106699061065790839063ffffffff6108fb16565b6101808501519063ffffffff610a3316565b61018084015260c083015161069b9061068990839063ffffffff6108fb16565b6101a08501519063ffffffff610a3316565b6101a0840152505b60e08201516106b9908b9063ffffffff610a5816565b1561082f5760078101546040516370a0823160e01b81526001600160a01b03909116906370a08231906106f0908f90600401610d5c565b60206040518083038186803b15801561070857600080fd5b505afa15801561071c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107409190610d19565b8260600181815250506107f08160080160009054906101000a90046001600160a01b03166001600160a01b03166370a082318e6040518263ffffffff1660e01b815260040161078f9190610d5c565b60206040518083038186803b1580156107a757600080fd5b505afa1580156107bb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107df9190610d19565b60608401519063ffffffff610a3316565b60608301819052602083015183516108289261081692916102649163ffffffff6108fb16565b6101408401519063ffffffff610a3316565b6101408301525b505b60e0810180516001019052610439565b600081610120015111610855576000610870565b6101208101516101808201516108709163ffffffff61093e16565b6101808201526101208101516108875760006108a2565b6101208101516101a08201516108a29163ffffffff61093e16565b6101a082018190526101208201516101408301516108bf926109c2565b61010082018190526101208201516101408301516101808401516101a090940151919850965091945090925090505b9550955095509550959050565b60008261090a575060006103ae565b8282028284828161091757fe5b041461036d5760405162461bcd60e51b815260040161093590610e05565b60405180910390fd5b600061036d83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610a68565b600061036d83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610a9f565b6000826109d2575060001961036d565b6109f2836109e6868563ffffffff6109fa16565b9063ffffffff610acb16565b949350505050565b600061036d612710610264610a15868663ffffffff6108fb16565b61138890610a33565b511590565b9051600360029092021c16151590565b60008282018381101561036d5760405162461bcd60e51b815260040161093590610dce565b9051600160029092021c16151590565b60008183610a895760405162461bcd60e51b81526004016109359190610d7b565b506000838581610a9557fe5b0495945050505050565b60008184841115610ac35760405162461bcd60e51b81526004016109359190610d7b565b505050900390565b6000600282046109f283610264610aea87670de0b6b3a76400006108fb565b849063ffffffff610a3316565b604051806101600160405280600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000151581525090565b60405180610260016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160001515815260200160006001600160a01b031681526020016000151581526020016000151581525090565b80356001600160a01b03811681146103ae57600080fd5b600080600080600080600080888a0360e0811215610c27578485fd5b610c318b8b610bf4565b9850610c408b60208c01610bf4565b975060408a0135965060608a013595506020607f1982011215610c61578485fd5b5060808901935060a089013567ffffffffffffffff80821115610c82578485fd5b818b018c601f820112610c93578586fd5b8035925081831115610ca3578586fd5b8c60208085028301011115610cb6578586fd5b6020019450909250610ccd90508a60c08b01610bf4565b90509295985092959890939650565b600060208284031215610ced578081fd5b6040516020810181811067ffffffffffffffff82111715610d0c578283fd5b6040529135825250919050565b600060208284031215610d2a578081fd5b5051919050565b600080600060608486031215610d45578283fd5b505081359360208301359350604090920135919050565b6001600160a01b0391909116815260200190565b901515815260200190565b6000602080835283518082850152825b81811015610da757858101830151858201604001528201610d8b565b81811115610db85783604083870101525b50601f01601f1916929092016040019392505050565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b9081526020019056fea264697066735822122013de44bbcb2905d31c33d018309ffd832873bd3203d4ab8043140ffa6b577b9364736f6c63430006080033';
|