The configuration for the Aptos provider.
The private key for the pool account.
The private key for the oracle account.
The private key for the underlying tokens account.
Optional
mnemonic: stringAn optional mnemonic for the account.
Optional
mnemonicConfigures multiple reserves with the provided configuration settings.
An array of reserve configurations, each including the account address and various reserve parameters.
A promise that resolves to undefined when all reserves have been configured.
Creates tokens based on the provided configuration and returns an array of tokens with their associated account addresses.
The type of the token configuration.
An array of token configurations.
A promise that resolves to an array of tokens with their associated account addresses.
Generates an Ed25519 account from a mnemonic and funds it with a specified amount.
The index to derive the account from the mnemonic.
Sets the price of multiple assets using the oracle client.
An array of asset price configurations. Each configuration includes the asset's address, symbol, and price in the market reference currency.
A promise that resolves to an array of committed transaction responses. Each response contains details about the transaction that set the asset's price.
Sets the EMode configuration for the pool.
The configuration object for EMode.
Sets multiple E-Modes by calling the setEMode method for each EModeConfig in the provided array.
An array of EModeConfig objects to be set.
A promise that resolves to an array of CommittedTransactionResponse objects, each representing the result of setting an E-Mode.
Sets the reserve interest rate strategy for a given asset.
The configuration object for the reserve strategy.
A promise that resolves to the committed transaction response.
const strategyConfig: ReserveStrategyConfig = {
address: '0x...',
optimalUsageRatio: 0.8,
baseVariableBorrowRate: 0.02,
variableRateSlope1: 0.04,
variableRateSlope2: 0.75,
symbol: 'DAI'
};
const receipt = await setReserveInterestRateStrategy(strategyConfig);
console.log(`Transaction hash: ${receipt.hash}`);
Sets the active status of multiple reserves.
An array of reserve configurations, each containing an account address and reserve configuration details.
A promise that resolves to an array of committed transaction responses.
Sets the borrowable in isolation status for a list of reserves.
An array of reserve configurations, each containing an account address and the borrowable in isolation status.
A promise that resolves to an array of committed transaction responses.
Sets the debt ceiling for a list of reserves if the current debt ceiling is different from the desired one.
An array of reserve configurations, each containing an account address and the desired debt ceiling.
A promise that resolves to an array of committed transaction responses.
Sets the eMode category for a list of reserves.
An array of reserve configurations, each containing an account address and eMode category ID.
A promise that resolves to an array of committed transaction responses.
Sets the freeze status for multiple reserves.
An array of reserve configurations, each containing an account address and reserve configuration details.
A promise that resolves to an array of committed transaction responses.
Sets the interest rate strategy for multiple reserves.
An array of reserve strategy configurations.
A promise that resolves to an array of committed transaction responses.
Pauses or unpauses a list of reserves.
An array of reserve configurations, each containing an account address and reserve configuration details.
A promise that resolves to an array of committed transaction responses.
Sets up the protocol by performing a series of configuration steps.
An array of reserve configurations.
An array of eMode configurations.
A promise that resolves when the protocol setup is complete.
This method performs the following steps:
Attempts to create tokens based on the provided token configurations.
The type of the token configuration.
An array of token configurations.
This method first checks if a token with the given symbol already exists by fetching its metadata. If the token does not exist, it creates a new token with the provided configuration and retrieves its address. If the token already exists, it fetches additional metadata such as the maximum supply, name, and decimals.
const tokens = [
{ symbol: 'TOKEN1', maxSupply: 1000, name: 'Token One', decimals: 18, iconUri: 'http://example.com/icon1.png', projectUri: 'http://example.com/project1' },
{ symbol: 'TOKEN2', maxSupply: 2000, name: 'Token Two', decimals: 18, iconUri: 'http://example.com/icon2.png', projectUri: 'http://example.com/project2' }
];
const result = await tryCreateTokens(tokens);
console.log(result);
Attempts to initialize reserves that are not already initialized.
An array of reserve configurations, each containing account address and reserve details.
A promise that resolves to a CommittedTransactionResponse
if reserves were initialized, or undefined
if no reserves needed initialization.
The function performs the following steps:
reservesToInit
object.initReserves
method on the pool client with the collected reserve details.
undefined
.
Constructs an instance of the AptosConfigurator.