Skip to content

alchemyplatform/smart-wallets-aave

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Alchemy Smart Wallets for Aave

Two approaches for integrating with Aave using Alchemy's Smart Wallets - Core (recommended) and Wallet APIs.

Quick Start

  1. Setup environment variables:

    cp .env.example .env
    # Fill in your values in .env
  2. Install dependencies:

    npm install
  3. Initialize your smart wallet:

    npm run account  # Get your smart wallet address
  4. Fund your smart wallet: Send 0.01+ DAI to the smart wallet address from step 3

  5. Run examples:

    npm run supply   # Supply DAI to Aave
    npm run withdraw # Withdraw DAI from Aave

Environment Variables

Required in .env:

Implementation Approaches

🔧 Core (Recommended)

  • npm run core:* - Direct @aa-sdk/core implementation
  • Simpler API, fewer lines of code

🏛️ Wallet APIs

  • npm run wallet:* - @account-kit/wallet-client implementation
  • Full prepare/sign/send workflow

Configuration

To customize chain, token addresses, or amounts, edit src/config.ts:

export const config = {
  chain: arbitrum,        // Change to sepolia, polygon, etc.
  amounts: {
    deposit: "0.01",      // Change deposit amount
    withdraw: "0.01",     // Change withdraw amount
  }
}

Notes

  • Uses Arbitrum network and DAI token by default
  • Creates smart wallets (not EOAs) - fund the smart wallet address
  • Gas fees sponsored via Alchemy Gas Manager
  • Get DAI on Arbitrum: Uniswap

About

Using Alchemy Smart Wallets on Aave

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published