import { PopulatedTransaction, providers } from 'ethers'; import BaseService from '../commons/BaseService'; import { EthereumTransactionTypeExtended } from '../commons/types'; import { LPSupplyParamsType } from '../v3-pool-contract/lendingPoolTypes'; import { IPoolInterface } from '../v3-pool-contract/typechain/IPool'; import { LPBorrowParamsType, LPLiquidationCall, LPRepayParamsType, LPRepayWithATokensType, LPSetUsageAsCollateral, LPSupplyWithPermitType, LPSwapBorrowRateMode, LPWithdrawParamsType, LPRepayWithPermitParamsType } from './poolTypes'; import { IL2Pool, IL2PoolInterface } from './typechain/IL2Pool'; import { L2Encoder, L2EncoderInterface } from './typechain/L2Encoder'; export interface L2PoolInterface { encoderContract: L2Encoder; supply: (args: LPSupplyParamsType, txs: EthereumTransactionTypeExtended[]) => Promise; generateSupplyTxData: (args: LPSupplyParamsType) => PopulatedTransaction; generateBorrowTxData: (args: LPBorrowParamsType) => PopulatedTransaction; generateEncodedSupplyTxData: (args: { encodedTxData: string; user: string; }) => PopulatedTransaction; generateEncodedBorrowTxData: (args: { encodedTxData: string; user: string; }) => PopulatedTransaction; generateSupplyWithPermitTxData: (args: LPSupplyWithPermitType) => PopulatedTransaction; generateEncodedSupplyWithPermitTxData: (args: { encodedTxData: string; user: string; signature: string; }) => PopulatedTransaction; generateEncodedRepayTxData: (args: { encodedTxData: string; user: string; }) => PopulatedTransaction; generateEncodedRepayWithPermitTxData: (args: { encodedTxData: string; user: string; signature: string; }) => PopulatedTransaction; generateEncodedRepayWithATokensTxData: (args: { encodedTxData: string; user: string; }) => PopulatedTransaction; supplyWithPermit: (args: LPSupplyWithPermitType, txs: EthereumTransactionTypeExtended[]) => Promise; withdraw: (args: LPWithdrawParamsType) => Promise; borrow: (args: LPBorrowParamsType) => Promise; repay: (args: LPRepayParamsType, txs: EthereumTransactionTypeExtended[]) => Promise; repayWithPermit: (args: LPRepayWithPermitParamsType, txs: EthereumTransactionTypeExtended[]) => Promise; repayWithATokens: (args: LPRepayWithATokensType, txs: EthereumTransactionTypeExtended[]) => Promise; swapBorrowRateMode: (args: LPSwapBorrowRateMode) => Promise; setUserUseReserveAsCollateral: (args: LPSetUsageAsCollateral) => Promise; liquidationCall: (args: LPLiquidationCall, txs: EthereumTransactionTypeExtended[]) => Promise; getEncoder: () => L2Encoder; } export declare type L2PoolConfigType = { l2PoolAddress?: string; encoderAddress?: string; }; export declare class L2Pool extends BaseService implements L2PoolInterface { readonly l2PoolAddress: string; readonly encoderAddress: string; readonly l2PoolContractInstance: IL2PoolInterface; readonly poolContractInstance: IPoolInterface; encoderContract: L2Encoder; encoderInterface: L2EncoderInterface; generateSupplyTxData: (args: LPSupplyParamsType) => PopulatedTransaction; generateBorrowTxData: (args: LPBorrowParamsType) => PopulatedTransaction; generateSupplyWithPermitTxData: (args: LPSupplyWithPermitType) => PopulatedTransaction; generateEncodedSupplyTxData: (args: { encodedTxData: string; user: string; }) => PopulatedTransaction; generateEncodedBorrowTxData: (args: { encodedTxData: string; user: string; }) => PopulatedTransaction; generateEncodedSupplyWithPermitTxData: (args: { encodedTxData: string; user: string; signature: string; }) => PopulatedTransaction; generateEncodedRepayTxData: (args: { encodedTxData: string; user: string; }) => PopulatedTransaction; generateEncodedRepayWithPermitTxData: (args: { encodedTxData: string; user: string; signature: string; }) => PopulatedTransaction; generateEncodedRepayWithATokensTxData: (args: { encodedTxData: string; user: string; }) => PopulatedTransaction; constructor(provider: providers.Provider, l2PoolConfig?: L2PoolConfigType); supply({ user, reserve, amount, referralCode }: LPSupplyParamsType, txs: EthereumTransactionTypeExtended[]): Promise; supplyWithPermit({ user, reserve, amount, deadline, referralCode, permitR, permitS, permitV, }: LPSupplyWithPermitType, txs: EthereumTransactionTypeExtended[]): Promise; withdraw({ user, reserve, amount, }: LPWithdrawParamsType): Promise; borrow({ user, reserve, amount, numericRateMode, referralCode, }: LPBorrowParamsType): Promise; repay({ reserve, user, amount, numericRateMode }: LPRepayParamsType, txs: EthereumTransactionTypeExtended[]): Promise; repayWithPermit({ user, reserve, amount, numericRateMode, permitR, permitS, permitV, deadline, }: LPRepayWithPermitParamsType, txs: EthereumTransactionTypeExtended[]): Promise; repayWithATokens({ reserve, user, amount, numericRateMode }: LPRepayParamsType, txs: EthereumTransactionTypeExtended[]): Promise; swapBorrowRateMode({ reserve, numericRateMode, user, }: LPSwapBorrowRateMode): Promise; setUserUseReserveAsCollateral({ reserve, usageAsCollateral, user, }: LPSetUsageAsCollateral): Promise; liquidationCall({ liquidator, liquidatedUser, debtReserve, collateralReserve, debtToCover, getAToken, }: LPLiquidationCall, txs: EthereumTransactionTypeExtended[]): Promise; getEncoder(): L2Encoder; } //# sourceMappingURL=index.d.ts.map