UNPKG

@contractjs/aave-v3

Version:

A TypeScript utility library for Aave V3 contracts.

22 lines 1.54 kB
import { Address } from "ox"; import { Chain } from "viem"; import { supportedChains } from "./constants/supportedChains"; type ViemChainName = keyof typeof supportedChains; type ChainIdentifier = number | ViemChainName | Chain; export declare const supplyERC20Calldata: (asset: Address.Address, amount: bigint, onBehalfOf: Address.Address, referralCode: number) => `0x${string}`; export declare const withdrawERC20Calldata: (asset: Address.Address, amount: bigint, to: Address.Address) => `0x${string}`; export declare const supplyETHCalldata: (poolAddress: Address.Address, onBehalfOf: Address.Address, referralCode: number) => `0x${string}`; export declare const withdrawETHCalldata: (poolAddress: Address.Address, amount: bigint, to: Address.Address) => `0x${string}`; export declare const getReserveDataCalldata: (asset: Address.Address) => `0x${string}`; export declare const getAssetPriceCalldata: (asset: Address.Address) => `0x${string}`; /** * Retrieves the AAVE V3 Pool contract address for a given chain. * Throws an error if the chain is not supported. * @param chain - The chain identifier (e.g., 'base', 8453, or a viem Chain object). * @returns The AAVE V3 Pool contract address for the specified chain. */ export declare const poolAddressOn: (chain: ChainIdentifier) => Address.Address; export declare const wrappedTokenGatewayAddressOn: (chain: ChainIdentifier) => Address.Address; export declare const priceOracleAddressOn: (chain: ChainIdentifier) => Address.Address; export {}; //# sourceMappingURL=aaveV3Utils.d.ts.map