Skip to content

Commit

Permalink
feat: added getters for profiles, fixed admin test
Browse files Browse the repository at this point in the history
  • Loading branch information
mpsc0x committed Oct 14, 2024
1 parent f89e5d5 commit 75ac4b4
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/admin/mintUnderlyings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ const fundAmount = BigInt(1000);
for (const reserveUnderlyingToken of allReserveUnderlyingTokens) {
for (const addressToFund of ADDRESSES_TO_FUND) {
const txReceipt = await underlyingTokensClient.mint(
addressToFund.toString(),
addressToFund,
fundAmount,
reserveUnderlyingToken.tokenAddress.toString(),
reserveUnderlyingToken.tokenAddress,
);
console.log(`User addresses ${addressToFund.toString()} funded with ${fundAmount.toString()} ${
reserveUnderlyingToken.symbol
Expand Down
24 changes: 24 additions & 0 deletions src/clients/aptosProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,30 @@ export class AptosProvider {
return this.profileAddressMap.get(profileName);
}

public getOracleProfileAccount(): AccountAddress {
return this.getProfileAddressByName(AAVE_PROFILES.AAVE_MOCK_ORACLE);
}

public getPoolProfileAccount(): AccountAddress {
return this.getProfileAddressByName(AAVE_PROFILES.AAVE_POOL);
}

public getATokensProfileAccount(): AccountAddress {
return this.getProfileAddressByName(AAVE_PROFILES.A_TOKENS);
}

public getUnderlyingTokensProfileAccount(): AccountAddress {
return this.getProfileAddressByName(AAVE_PROFILES.UNDERLYING_TOKENS);
}

public getVariableTokensProfileAccount(): AccountAddress {
return this.getProfileAddressByName(AAVE_PROFILES.VARIABLE_TOKENS);
}

public getAclProfileAccount(): AccountAddress {
return this.getProfileAddressByName(AAVE_PROFILES.AAVE_ACL);
}

/** Gets the selected network. */
public getNetwork(): Network {
return this.network;
Expand Down
1 change: 1 addition & 0 deletions src/clients/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export {
AptosAccountConfig,
AAVE_PROFILES,
} from "./aptosProvider";
export { AptosContractWrapperBaseClass } from "./baseClass";
export { ATokensClient } from "./aTokensClient";
export { CoreClient } from "./coreClient";
export { PoolClient } from "./poolClient";
Expand Down

0 comments on commit 75ac4b4

Please sign in to comment.