The PoolClient class provides methods to interact with the Aave protocol's pool contracts on the Aptos blockchain. It extends the AptosContractWrapperBaseClass and includes functionalities for managing reserves, configuring pool parameters, handling user positions, and managing protocol fees.

This client is designed to work with the core pool contracts and provides a high-level API for pool operations. The client can be instantiated in two ways:

  1. Using the constructor directly with a provider and optional signer
  2. Using the static buildWithDefaultSigner method which automatically configures the client with the provider's pool profile account
// Using buildWithDefaultSigner
const provider = new AptosProvider();
const client = PoolClient.buildWithDefaultSigner(provider);

// Using constructor directly
const provider = new AptosProvider();
const signer = provider.getPoolProfileAccount();
const client = new PoolClient(provider, signer);

// Get reserve data
const reserveData = await client.getReserveData(assetAddress);

The AptosProvider instance used to interact with the Aptos blockchain.

Optional Ed25519Account signer for transaction signing.

Hierarchy (View Summary)

Constructors

Properties

Methods

buildTx callViewMethod collectorWithdraw configureReserveAsCollateral disableLiquidationdNoGracePeriod dropReserve feeManagerSetAptFee feeManagerTransferAptFee fundAccount getAccounAptBalance getAllATokens getAllReservesTokens getAllVariableTokens getATokenTotalSupply getBridgeProtocolFee getCollectorAddress getCollectorCollectedFees getCollectorIsFundsAdmin getDebtCeiling getDebtCeilingDecimals getEmodeCategoryData getEmodeEmodeLabel getEmodeEmodeLiquidationBonus getEventsFromAccount getFeeManagerCollectorAddress getFeeManagerCollectorAptBalance getFeeManagerGetAptFee getFeeManagerGetFeeConfigObjectAddress getFeeManagerTotalFees getFlashloanEnabled getFlashloanPremiumToProtocol getFlashloanPremiumTotal getLiquidationGracePeriodUntil getLiquidationProtocolFee getMaxNumberReserves getNormalizedDebtByReserveData getPaused getPendingLtv getReserveAccruedToTreasury getReserveAddressById getReserveATokenAddress getReserveCaps getReserveConfiguration getReserveConfigurationByReserveData getReserveConfigurationData getReserveCurrentLiquidityRate getReserveCurrentVariableBorrowRate getReserveData getReserveData2 getReserveDataAndReservesCount getReserveDeficit getReserveEmodeCategory getReserveId getReserveIsolationModeTotalDebt getReserveLastUpdateTimestamp getReserveLiquidityIndex getReserveNormalizedIncome getReserveNormalizedVariableDebt getReservesCount getReservesList getReserveTokensAddresses getReserveVariableBorrowIndex getReserveVariableDebtTokenAddress getScaledATokenBalanceOf getScaledATokenTotalSupply getScaledVariableTokenBalanceOf getScaledVariableTokenTotalSupply getSigner getSiloedBorrowing getTotalDebt getTxEvents getUserAccountData getUserConfiguration getUserEmode getUserReserveData getVirtualUnderlyingBalance initReserves isInEmodeCategory mintToTreasury numberOfActiveAndDroppedReserves numberOfActiveReserves rescueTokens resetIsolationModeTotalDebt sendTxAndAwaitResponse setAssetEmodeCategory setBorrowableInIsolation setBorrowCap setBridgeProtocolFee setDebtCeiling setEmodeCategory setFlashloanPremiums setIncentivesControllers setLiquidationProtocolFee setPoolPause setPoolPauseNoGracePeriod setReserveActive setReserveBorrowing setReserveFactor setReserveFlashLoaning setReserveFreeze setReservePaused setReservePausedNoGracePeriod setSigner setSiloedBorrowing setSupplyCap setUserEmode transfer updateFloashloanPremiumToProtocol updateFloashloanPremiumTotal updateInterestRateStrategy withModuleSigner withSigner buildWithDefaultSigner

Constructors

Properties

poolContract: PoolContract

Methods

  • Builds a transaction for the specified user, function, and arguments.

    Parameters

    • user: AccountAddress

      The account address of the user initiating the transaction.

    • functionId: `${string}::${string}::${string}`

      The identifier of the Move function to be called.

    • funcArgs: (EntryFunctionArgumentTypes | SimpleEntryFunctionArgumentTypes)[]

      An array of arguments for the entry function.

    • typeArgs: string[] = []

    Returns Promise<SimpleTransaction>

    A promise that resolves to a SimpleTransaction object.

  • Calls a view method on the Aptos blockchain.

    Type Parameters

    • T extends MoveValue[]

      The type of the return value, which extends an array of MoveValue.

    Parameters

    • functionId: `${string}::${string}::${string}`

      The identifier of the function to call.

    • funcArgs: (EntryFunctionArgumentTypes | SimpleEntryFunctionArgumentTypes)[]

      The arguments to pass to the function.

    • typeArgs: string[] = []

      Optional generic type arguments for the function (e.g. ["0x1::aptos_coin::AptosCoin"]).

    Returns Promise<T>

    • A promise that resolves to the result of the view method call.
  • Transfers the collected fees by the collector to a given account.

    Parameters

    • asset: AccountAddress

      The asset address.

    • receiver: AccountAddress

      The account address to whom to transfer the collected fees.

    • amount: bigint

      The collected fee amount to transfer.

    Returns Promise<CommittedTransactionResponse>

    A promise that resolves to a CommittedTransactionResponse.

  • Configures a reserve as collateral by setting the loan-to-value (LTV), liquidation threshold, and liquidation bonus for a given asset.

    Parameters

    • asset: AccountAddress

      The address of the asset to be configured as collateral.

    • ltv: bigint

      The loan-to-value ratio for the asset, represented as a bigint.

    • liquidationThreshold: bigint

      The threshold at which the asset will be liquidated, represented as a bigint.

    • liquidationBonus: bigint

      The bonus applied during liquidation, represented as a bigint.

    Returns Promise<CommittedTransactionResponse>

    A promise that resolves to a CommittedTransactionResponse once the transaction is committed.

  • Disables the liquidation with no grace period.

    Parameters

    • asset: AccountAddress

      The address of the asset.

    Returns Promise<CommittedTransactionResponse>

    A promise that resolves to a CommittedTransactionResponse object.

  • Drops a reserve from the pool.

    Parameters

    • asset: AccountAddress

      The account address of the asset to be dropped.

    Returns Promise<CommittedTransactionResponse>

    A promise that resolves to the committed transaction response.

  • Sets a new apt fee to the fee manager.

    Parameters

    • newAptFee: bigint

      The new apt fee to apply.

    Returns Promise<CommittedTransactionResponse>

    A promise that resolves to a CommittedTransactionResponse.

  • Transfers the collected fees by the fee manager to a given account.

    Parameters

    • to: AccountAddress

      The account address to whom to transfer the collected fees.

    • amount: bigint

      The collected fee amount to transfer.

    Returns Promise<CommittedTransactionResponse>

    A promise that resolves to a CommittedTransactionResponse.

  • Funds an account with a specified amount.

    Parameters

    • account: AccountAddress

      The address of the account to be funded.

    • amount: bigint

      The amount to fund the account with, in bigint.

    Returns Promise<UserTransactionResponse>

    A promise that resolves to a UserTransactionResponse.

  • Retrieves the Aptos balance of a specified account.

    Parameters

    • account: Ed25519Account

      The Ed25519 account object.

    • accountAddress: AccountAddress

      The address of the account to retrieve the balance for.

    • OptionalversionToWaitFor: bigint

      (Optional) The specific version to wait for before retrieving the balance.

    Returns Promise<bigint>

    A promise that resolves to the balance of the account in bigint.

  • Retrieves all AToken data from the pool contract.

    Returns Promise<TokenData[]>

    A promise that resolves to an array of TokenData objects.

    const aTokens = await poolClient.getAllATokens();
    console.log(aTokens);
  • Retrieves all reserve tokens from the pool contract.

    Returns Promise<TokenData[]>

    A promise that resolves to an array of TokenData objects.

    If the call to the view method fails or returns an unexpected result.

  • Retrieves all variable tokens from the pool contract.

    Returns Promise<TokenData[]>

    A promise that resolves to an array of TokenData objects.

    This method calls the GetAllVariableTokensFuncAddr function of the pool contract to fetch the variable tokens. The response is then mapped to an array of TokenData objects, each containing the token symbol and token address.

    const variableTokens = await poolClient.getAllVariableTokens();
    console.log(variableTokens);
  • Retrieves the total supply of AToken for a given asset.

    Parameters

    • asset: AccountAddress

      The account address of the asset.

    Returns Promise<bigint>

    A promise that resolves to the total supply of the AToken as a bigint.

  • Retrieves the bridge protocol fee from the pool contract.

    Returns Promise<bigint>

    A promise that resolves to the bridge protocol fee as a bigint.

  • Retrieves the collector address.

    Returns Promise<AccountAddress>

    A promise that resolves to the collector address.

  • Retrieves the total fees collected by the collector.

    Returns Promise<bigint>

    A promise that resolves to the fee collector total collected fees.

  • Returns if the address is the funds admin of the collector.

    Parameters

    • account: AccountAddress

    Returns Promise<boolean>

    A promise that resolves to a boolean.

  • Retrieves the debt ceiling for a given asset.

    Parameters

    • asset: AccountAddress

      The account address of the asset for which to get the debt ceiling.

    Returns Promise<bigint>

    A promise that resolves to the debt ceiling as a bigint.

  • Retrieves the debt ceiling decimals from the pool contract.

    Returns Promise<bigint>

    A promise that resolves to the debt ceiling decimals as a bigint.

  • Retrieves the eMode category data for a given category ID.

    Parameters

    • id: number

      The ID of the eMode category to retrieve data for.

    Returns Promise<number>

    A promise that resolves to the eMode category data as a number.

  • Retrieves the eMode (efficiency mode) label from the pool contract.

    Parameters

    • emodeCategory: number

      The emode cateogory number.

    Returns Promise<string>

    A promise that resolves to the emode label as a sting.

  • Retrieves the eMode (efficiency mode) liquidation bonus from the pool contract.

    Parameters

    • userEmodeCategory: number

      The emode cateogory of the user.

    Returns Promise<number>

    A promise that resolves to the emode liquidation bonus as a number.

  • Retrieves events associated with a specific account.

    Parameters

    • account: AccountAddress

      The address of the account to retrieve events for.

    • limit: number

      The maximum number of events to retrieve.

    Returns Promise<
        {
            account_address: string;
            creation_number: any;
            data: any;
            event_index: any;
            indexed_type: string;
            sequence_number: any;
            transaction_block_height: any;
            transaction_version: any;
            type: string;
        }[],
    >

    A promise that resolves to an array of event objects, each containing:

    • account_address: The address of the account.
    • creation_number: The creation number of the event.
    • data: The data associated with the event.
    • event_index: The index of the event.
    • sequence_number: The sequence number of the event.
    • transaction_block_height: The block height of the transaction.
    • transaction_version: The version of the transaction.
    • type: The type of the event.
    • indexed_type: The indexed type of the event.
  • Retrieves the fee collector address.

    Returns Promise<AccountAddress>

    A promise that resolves to the fee collector address.

  • Retrieves the fee collector apt balance.

    Returns Promise<bigint>

    A promise that resolves to the fee collector apt balance.

  • Retrieves the apt fee of the manager.

    Returns Promise<bigint>

    A promise that resolves to the apt fee as a bigint.

  • Retrieves the fee manager object address.

    Returns Promise<AccountAddress>

    A promise that resolves to the fee manager object address.

  • Retrieves the total fees collected by the fee manager.

    Returns Promise<bigint>

    A promise that resolves to the fee collector total collected fees.

  • Checks if flash loans are enabled for a given asset.

    Parameters

    • asset: AccountAddress

      The address of the asset to check.

    Returns Promise<boolean>

    A promise that resolves to a boolean indicating whether flash loans are enabled for the specified asset.

  • Retrieves the flashloan premium to the protocol.

    This method calls a view function on the pool contract to get the flashloan premium that is allocated to the protocol. The result is mapped to a bigint and returned.

    Returns Promise<bigint>

    A promise that resolves to the flashloan premium as a bigint.

  • Retrieves the total flashloan premium from the pool contract.

    This method calls the PoolGetFlashloanPremiumTotalFuncAddr function on the pool contract and maps the response to a bigint.

    Returns Promise<bigint>

    A promise that resolves to the total flashloan premium as a bigint.

  • Parameters

    • object: AccountAddress

    Returns Promise<number>

  • Retrieves the liquidation protocol fee for a given asset.

    Parameters

    • asset: AccountAddress

      The account address of the asset for which to retrieve the liquidation protocol fee.

    Returns Promise<bigint>

    A promise that resolves to the liquidation protocol fee as a bigint.

  • Retrieves the maximum number of reserves allowed in the pool.

    Returns Promise<bigint>

    A promise that resolves to the maximum number of reserves as a bigint.

  • Retrieves the normalized debt by reserve data.

    Parameters

    • reserveData: AccountAddress

      The address of the reserve data.

    Returns Promise<bigint>

    A promise that resolves to the normalized debt as a bigint.

  • Checks if the specified asset is paused.

    Parameters

    • asset: AccountAddress

      The address of the asset to check.

    Returns Promise<boolean>

    A promise that resolves to a boolean indicating whether the asset is paused.

  • Retrieves the pending ltv for an asset from the pool contract.

    Parameters

    • asset: AccountAddress

    Returns Promise<bigint>

    A promise that resolves to the pending ltv as a bigint.

  • Parameters

    • object: AccountAddress

    Returns Promise<bigint>

  • Retrieves the reserve address associated with a given ID.

    Parameters

    • id: number

      The ID of the reserve to retrieve the address for.

    Returns Promise<AccountAddress>

    A promise that resolves to the AccountAddress of the reserve.

  • Parameters

    • object: AccountAddress

    Returns Promise<AccountAddress>

  • Retrieves the reserve caps for a given asset.

    Parameters

    • asset: AccountAddress

      The address of the asset account.

    Returns Promise<{ borrowCap: bigint; supplyCap: bigint }>

    A promise that resolves to an object containing the borrow cap and supply cap as big integers.

  • Retrieves the reserve configuration for a given asset.

    Parameters

    • asset: AccountAddress

      The address of the asset for which to get the reserve configuration.

    Returns Promise<ReserveConfigurationMap>

    A promise that resolves to the reserve configuration map of the specified asset.

  • Retrieves the reserve configuration data for a given asset.

    Parameters

    • asset: AccountAddress

      The account address of the asset.

    Returns Promise<ReserveConfigurationData>

    A promise that resolves to an object containing the reserve configuration data.

    The returned object includes the following properties:

    • decimals: The number of decimals for the asset.
    • ltv: The loan-to-value ratio.
    • liquidationThreshold: The liquidation threshold.
    • liquidationBonus: The liquidation bonus.
    • reserveFactor: The reserve factor.
    • usageAsCollateralEnabled: A boolean indicating if the asset can be used as collateral.
    • borrowingEnabled: A boolean indicating if borrowing is enabled for the asset.
    • isActive: A boolean indicating if the asset is active.
    • isFrozen: A boolean indicating if the asset is frozen.
  • Parameters

    • object: AccountAddress

    Returns Promise<bigint>

  • Parameters

    • object: AccountAddress

    Returns Promise<bigint>

  • Retrieves the reserve data for a given asset.

    Parameters

    • asset: AccountAddress

      The address of the asset for which to retrieve reserve data.

    Returns Promise<ReserveData>

    A promise that resolves to the reserve data of the specified asset.

  • Retrieves reserve data for a given asset.

    Parameters

    • asset: AccountAddress

      The address of the asset to retrieve reserve data for.

    Returns Promise<ReserveData2>

    A promise that resolves to an object containing reserve data.

    The returned object includes the following properties:

    • reserveUnbacked: The amount of unbacked reserve.
    • reserveAccruedToTreasury: The amount accrued to the treasury.
    • aTokenSupply: The total supply of aTokens.
    • varTokenSupply: The total supply of variable tokens.
    • reserveCurrentLiquidityRate: The current liquidity rate of the reserve.
    • reserveCurrentVariableBorrowRate: The current variable borrow rate of the reserve.
    • reserveLiquidityIndex: The liquidity index of the reserve.
    • reserveVarBorrowIndex: The variable borrow index of the reserve.
    • reserveLastUpdateTimestamp: The timestamp of the last update to the reserve data.
  • Retrieves reserve data and the count of reserves for a given asset.

    Parameters

    • asset: AccountAddress

      The account address of the asset.

    Returns Promise<{ count: number; reserveData: ReserveData }>

    A promise that resolves to an object containing the reserve data and the count of reserves.

    Will throw an error if the view method call fails.

  • Retrieves the reserve deficit for a given asset.

    Parameters

    • asset: AccountAddress

      The address of the asset to check.

    Returns Promise<bigint>

    A promise that resolves to a bigint.

  • Retrieves the eMode category for a given reserve asset.

    Parameters

    • asset: AccountAddress

      The account address of the reserve asset.

    Returns Promise<number>

    A promise that resolves to the eMode category number of the specified asset.

  • Parameters

    • object: AccountAddress

    Returns Promise<number>

  • Parameters

    • object: AccountAddress

    Returns Promise<bigint>

  • Parameters

    • object: AccountAddress

    Returns Promise<number>

  • Parameters

    • object: AccountAddress

    Returns Promise<bigint>

  • Retrieves the normalized income for a given reserve asset.

    Parameters

    • asset: AccountAddress

      The address of the reserve asset.

    Returns Promise<bigint>

    A promise that resolves to the normalized income of the reserve asset as a bigint.

  • Retrieves the normalized variable debt for a given reserve asset.

    Parameters

    • asset: AccountAddress

      The address of the reserve asset.

    Returns Promise<bigint>

    A promise that resolves to the normalized variable debt as a bigint.

  • Retrieves the count of reserves from the pool contract.

    Returns Promise<bigint>

    A promise that resolves to the count of reserves as a bigint.

  • Retrieves the list of reserve accounts from the pool contract.

    Returns Promise<AccountAddress[]>

    A promise that resolves to an array of AccountAddress objects representing the reserve accounts.

  • Retrieves the addresses of the reserve tokens for a given asset.

    Parameters

    • asset: AccountAddress

      The address of the asset for which to get the reserve token addresses.

    Returns Promise<
        {
            reserveATokenAddress: AccountAddress;
            reserveVariableDebtTokenAddress: AccountAddress;
        },
    >

    A promise that resolves to an object containing the addresses of the reserve AToken and the reserve Variable Debt Token.

  • Parameters

    • object: AccountAddress

    Returns Promise<bigint>

  • Parameters

    • object: AccountAddress

    Returns Promise<AccountAddress>

  • Retrieves the scaled AToken balance of a specified owner.

    Parameters

    • owner: AccountAddress

      The address of the account owner whose balance is being queried.

    • aTokenAddress: AccountAddress

      The address of the AToken contract.

    Returns Promise<bigint>

    A promise that resolves to the scaled AToken balance as a bigint.

  • Retrieves the scaled total supply of an AToken.

    Parameters

    • aTokenAddress: AccountAddress

      The address of the AToken.

    Returns Promise<bigint>

    A promise that resolves to the scaled total supply of the AToken as a bigint.

  • Retrieves the scaled variable token balance of a specified owner for a given variable token address.

    Parameters

    • owner: AccountAddress

      The account address of the token owner.

    • varTokenAddress: AccountAddress

      The account address of the variable token.

    Returns Promise<bigint>

    A promise that resolves to the scaled variable token balance as a bigint.

  • Retrieves the scaled total supply of variable tokens for a given aToken address.

    Parameters

    • aTokenAddress: AccountAddress

      The address of the aToken whose scaled variable token total supply is to be fetched.

    Returns Promise<bigint>

    A promise that resolves to the scaled total supply of variable tokens as a bigint.

  • Retrieves the siloed borrowing status for a given asset.

    Parameters

    • asset: AccountAddress

      The account address of the asset to check.

    Returns Promise<boolean>

    A promise that resolves to a boolean indicating whether the asset has siloed borrowing enabled.

  • Retrieves the total debt for a given asset.

    Parameters

    • asset: AccountAddress

      The address of the asset account.

    Returns Promise<bigint>

    A promise that resolves to the total debt as a bigint.

  • Retrieves the events associated with a given transaction hash.

    Parameters

    • txHash: HexInput

      The hash of the transaction to retrieve events for.

    Returns Promise<{ data: unknown }[]>

    A promise that resolves to an array of objects containing the event data.

    This method fetches the transaction details using the provided Aptos provider. It then checks if the transaction response is of type BlockMetadataTransactionResponse or UserTransactionResponse to extract the events. The event data is parsed from JSON and returned in an array.

  • Retrieves the user account data by user emode category from the pool contract.

    Parameters

    • userEmodeCategory: number

      The emode cateogory of the user.

    Returns Promise<{ liquidationThreshold: bigint; ltv: bigint }>

    A promise that resolves to the emode ltv and liquidation threshold as a number.

  • Retrieves the user configuration for a given account.

    Parameters

    • account: AccountAddress

      The address of the account to retrieve the configuration for.

    Returns Promise<UserConfigurationMap>

    A promise that resolves to the user's configuration map.

  • Retrieves the eMode (efficiency mode) of a user from the pool contract.

    Parameters

    • user: AccountAddress

      The account address of the user.

    Returns Promise<number>

    A promise that resolves to the eMode of the user as a number.

  • Retrieves the reserve data for a specific user and asset.

    Parameters

    • asset: AccountAddress

      The address of the asset.

    • user: AccountAddress

      The address of the user.

    Returns Promise<UserReserveData>

    A promise that resolves to an object containing the user's reserve data.

    The returned object includes the following properties:

    • currentATokenBalance: The current balance of A tokens held by the user.
    • currentVariableDebt: The current variable debt of the user.
    • scaledVariableDebt: The scaled variable debt of the user.
    • liquidityRate: The liquidity rate of the reserve.
    • usageAsCollateralEnabled: A boolean indicating if the asset is being used as collateral.
  • Parameters

    • object: AccountAddress

    Returns Promise<bigint>

  • Initializes the reserves in the pool.

    Parameters

    • underlyingAsset: AccountAddress[]

      An array of account addresses representing the underlying assets.

    • treasury: AccountAddress[]

      An array of account addresses representing the treasury.

    • aTokenName: string[]

      An array of strings representing the names of the aTokens.

    • aTokenSymbol: string[]

      An array of strings representing the symbols of the aTokens.

    • variableDebtTokenName: string[]

      An array of strings representing the names of the variable debt tokens.

    • variableDebtTokenSymbol: string[]

      An array of strings representing the symbols of the variable debt tokens.

    • incentivesController: MoveOption<AccountAddress>[]

      An array of addresses representing the incentives controllers.

    • optimalUsageRatio: bigint[]

      An array of numbers representing the optimal usage ratios.

    • baseVariableBorrowRate: bigint[]

      An array of numbers representing the base variable borrow rates.

    • variableRateSlope1: bigint[]

      An array of numbers representing the variable rate slopes 1.

    • variableRateSlope2: bigint[]

      An array of numbers representing the variable rate slopes 2.

    Returns Promise<CommittedTransactionResponse>

    A promise that resolves to a CommittedTransactionResponse.

  • Checks if the combination user and asset categories are an emode or not.

    Parameters

    • emodeUserCategory: number

      The emode cateogory of the user.

    • emodeAssetCategory: number

      The emode cateogory of the asset.

    Returns Promise<boolean>

    A promise that resolves to a boolean.

  • Mints the assets accrued through the reserve factor to the treasury in the form of aTokens.

    Parameters

    • assets: AccountAddress[]

      An array of account addresses representing the assets to be minted to the treasury.

    Returns Promise<CommittedTransactionResponse>

    A promise that resolves to a CommittedTransactionResponse object.

  • Retrieves the number of active and dropped reserves.

    Returns Promise<number>

    A promise that resolves to the number of active and dropped reserves.

  • Retrieves the number of active reserves.

    Returns Promise<number>

    A promise that resolves to the number of active reserves.

  • Rescues tokens from the pool contract and sends them to a specified address.

    Parameters

    • token: AccountAddress

      The address of the token to be rescued.

    • to: AccountAddress

      The address to which the rescued tokens will be sent.

    • amount: bigint

      The amount of tokens to be rescued.

    Returns Promise<CommittedTransactionResponse>

    A promise that resolves to the response of the committed transaction.

  • Resets the total debt for an asset in isolation mode.

    Parameters

    • asset: AccountAddress

      The account address of the asset for which the total debt is to be reset.

    Returns Promise<CommittedTransactionResponse>

    A promise that resolves to a CommittedTransactionResponse object.

  • Sends a transaction and awaits the response.

    Parameters

    • functionId: `${string}::${string}::${string}`

      The ID of the Move function to be called.

    • funcArgs: (EntryFunctionArgumentTypes | SimpleEntryFunctionArgumentTypes)[]

      An array of arguments for the entry function.

    • typeArgs: string[] = []

    Returns Promise<CommittedTransactionResponse>

    A promise that resolves to the committed transaction response.

  • Sets the eMode category for a specific asset.

    Parameters

    • asset: AccountAddress

      The address of the asset for which the eMode category is being set.

    • newCategoryId: number

      The new eMode category ID to be assigned to the asset.

    Returns Promise<CommittedTransactionResponse>

    A promise that resolves to the response of the committed transaction.

  • Sets whether a specific asset is borrowable in isolation mode.

    Parameters

    • asset: AccountAddress

      The address of the asset to be configured.

    • borrowable: boolean

      A boolean indicating if the asset should be borrowable in isolation.

    Returns Promise<CommittedTransactionResponse>

    A promise that resolves to a CommittedTransactionResponse object.

  • Sets the borrow cap for a specific asset.

    Parameters

    • asset: AccountAddress

      The address of the asset for which the borrow cap is being set.

    • newBorrowCap: bigint

      The new borrow cap value to be set for the asset.

    Returns Promise<CommittedTransactionResponse>

    A promise that resolves to the response of the committed transaction.

  • Sets the bridge protocol fee for the pool.

    Parameters

    • protocolFee: bigint

      The new protocol fee to be set, represented as a bigint.

    Returns Promise<CommittedTransactionResponse>

    A promise that resolves to a CommittedTransactionResponse once the transaction is committed.

  • Sets the debt ceiling for a specific asset.

    Parameters

    • asset: AccountAddress

      The account address of the asset for which the debt ceiling is being set.

    • newDebtCeiling: bigint

      The new debt ceiling value to be set, represented as a bigint.

    Returns Promise<CommittedTransactionResponse>

    A promise that resolves to a CommittedTransactionResponse once the transaction is committed.

  • Sets the eMode category for the pool.

    Parameters

    • categoryId: number

      The ID of the eMode category.

    • ltv: number

      The loan-to-value ratio for the category.

    • liquidationThreshold: number

      The liquidation threshold for the category.

    • liquidationBonus: number

      The liquidation bonus for the category.

    • label: string

      The label for the eMode category.

    Returns Promise<CommittedTransactionResponse>

    A promise that resolves to the committed transaction response.

  • Sets the flashloan premiums for the pool.

    Parameters

    • flashloanPremiumTotal: bigint

      The total premium for the flashloan as a bigint.

    • flashloanPremiumToProtocol: bigint

      The portion of the premium that goes to the protocol as a bigint.

    Returns Promise<CommittedTransactionResponse>

    A promise that resolves to a CommittedTransactionResponse.

  • Sets the incentives controllers.

    Parameters

    • underlyingAssets: AccountAddress[]

      An array of account addresses representing the assets on which to set incentives controllers.

    • incentivesControllers: MoveOption<AccountAddress>[]

      An array of account addresses representing the addresses of the incentives controllers.

    Returns Promise<CommittedTransactionResponse>

    A promise that resolves to a CommittedTransactionResponse object.

  • Sets the liquidation protocol fee for a given asset.

    Parameters

    • asset: AccountAddress

      The address of the asset for which the liquidation protocol fee is being set.

    • newFee: bigint

      The new liquidation protocol fee to be set, represented as a bigint.

    Returns Promise<CommittedTransactionResponse>

    A promise that resolves to a CommittedTransactionResponse once the transaction is committed.

  • Pauses or unpauses the pool.

    Parameters

    • paused: boolean

      A boolean indicating whether to pause (true) or unpause (false) the pool.

    • gracePeriod: bigint

      The grace period the pause is applied for.

    Returns Promise<CommittedTransactionResponse>

    A promise that resolves to a CommittedTransactionResponse object.

  • Pauses or unpauses the pool without setting any grace period.

    Parameters

    • paused: boolean

      A boolean indicating whether to pause (true) or unpause (false) the pool.

    Returns Promise<CommittedTransactionResponse>

    A promise that resolves to a CommittedTransactionResponse object.

  • Sets the active status of a reserve.

    Parameters

    • asset: AccountAddress

      The address of the asset's account.

    • active: boolean

      A boolean indicating whether the reserve should be active (true) or inactive (false).

    Returns Promise<CommittedTransactionResponse>

    A promise that resolves to a CommittedTransactionResponse object.

  • Sets the borrowing status for a specific reserve asset.

    Parameters

    • asset: AccountAddress

      The address of the asset for which borrowing is being enabled or disabled.

    • enabled: boolean

      A boolean indicating whether borrowing should be enabled (true) or disabled (false) for the specified asset.

    Returns Promise<CommittedTransactionResponse>

    A promise that resolves to a CommittedTransactionResponse object once the transaction is committed.

  • Sets the reserve factor for a given asset.

    Parameters

    • asset: AccountAddress

      The account address of the asset for which the reserve factor is being set.

    • newReserveFactor: bigint

      The new reserve factor to be set, represented as a bigint.

    Returns Promise<CommittedTransactionResponse>

    A promise that resolves to a CommittedTransactionResponse once the transaction is committed.

  • Enables or disables flash loaning for a specific reserve asset.

    Parameters

    • asset: AccountAddress

      The address of the reserve asset.

    • enabled: boolean

      A boolean indicating whether flash loaning should be enabled (true) or disabled (false).

    Returns Promise<CommittedTransactionResponse>

    A promise that resolves to a CommittedTransactionResponse object.

  • Sets the freeze status of a reserve asset.

    Parameters

    • asset: AccountAddress

      The address of the reserve asset to be frozen or unfrozen.

    • freeze: boolean

      A boolean indicating whether to freeze (true) or unfreeze (false) the reserve asset.

    Returns Promise<CommittedTransactionResponse>

    A promise that resolves to a CommittedTransactionResponse object.

  • Sets the paused state of a reserve with a grace period.

    Parameters

    • asset: AccountAddress

      The address of the asset to be paused or unpaused.

    • paused: boolean

      A boolean indicating whether to pause (true) or unpause (false) the reserve.

    • gracePeriod: bigint = 0n

      A number indicationg the grace period.

    Returns Promise<CommittedTransactionResponse>

    A promise that resolves to a CommittedTransactionResponse object.

  • Sets the paused state of a reserve without a grace period.

    Parameters

    • asset: AccountAddress

      The address of the asset to be paused or unpaused.

    • paused: boolean

      A boolean indicating whether to pause (true) or unpause (false) the reserve.

    Returns Promise<CommittedTransactionResponse>

    A promise that resolves to a CommittedTransactionResponse object.

  • Sets the siloed borrowing status for a given asset.

    Parameters

    • asset: AccountAddress

      The address of the asset for which to set the siloed borrowing status.

    • newSiloed: boolean

      A boolean indicating the new siloed borrowing status.

    Returns Promise<CommittedTransactionResponse>

    A promise that resolves to a CommittedTransactionResponse object.

  • Sets the supply cap for a given asset.

    Parameters

    • asset: AccountAddress

      The account address of the asset for which the supply cap is being set.

    • newSupplyCap: bigint

      The new supply cap value to be set for the asset.

    Returns Promise<CommittedTransactionResponse>

    A promise that resolves to a CommittedTransactionResponse object.

  • Sets the user's eMode category.

    Parameters

    • categoryId: number

      The ID of the eMode category to set for the user.

    Returns Promise<CommittedTransactionResponse>

    A promise that resolves to a CommittedTransactionResponse object.

  • Transfers aTokens from the user to the recipient.

    Parameters

    • recipient: AccountAddress

      The recipient of the aTokens

    • amount: bigint

      The amount of aTokens to transfer

    • aTokenAddress: AccountAddress

      The Metadata of the aToken

    Returns Promise<CommittedTransactionResponse>

    A promise that resolves to a CommittedTransactionResponse object.

  • Updates the flashloan premium to protocol.

    Parameters

    • newFlashloanPremiumToProtocol: bigint

      The new flashloan premium to be set, represented as a bigint.

    Returns Promise<CommittedTransactionResponse>

    A promise that resolves to a CommittedTransactionResponse.

  • Updates the flashloan premium total in the pool configurator.

    Parameters

    • newFlashloanPremiumTotal: bigint

      The new flashloan premium total as a bigint.

    Returns Promise<CommittedTransactionResponse>

    A promise that resolves to a CommittedTransactionResponse.

  • Updates the interest rate strategy.

    Parameters

    • asset: AccountAddress

      The account address of the asset for which the interest rate strategy is to be applied.

    • optimalUsageRatio: bigint

      The optimal usage ratio of the interest rate strategy which is to be applied.

    • baseVariableBorrowRate: bigint

      The base variable borrow rate for which the interest rate strategy is to be applied.

    • variableRateSlope1: bigint

      The variable rate slope 1 of the interest rate strategy which is to be applied.

    • variableRateSlope2: bigint

      The variable rate slope 2 of the interest rate strategy which is to be applied.

    Returns Promise<CommittedTransactionResponse>

    A promise that resolves to a CommittedTransactionResponse.

  • Creates an instance of PoolClient using the default signer provided by the AptosProvider.

    Parameters

    • provider: AptosProvider

      An instance of AptosProvider which provides the necessary configurations and signer.

    Returns PoolClient

    A new instance of PoolClient initialized with the default signer.