Supply if a Token Balance Is 0
0x484428507A212cA56D71baa27Ca6089a6dB63a88

What this does

This plug supplies a caller-specified amount of a token to an Aave market when the target wallet holds no aTokens for that reserve. It asks the caller for the supply token, the market address, the holder wallet, and the supply amount. It reads the reserve's aToken address, checks the holder's aToken balance, and supplies only when that balance equals zero. Running it against a stale balance risks either skipping a needed supply or duplicating a position that already exists.

Actions · 6

  • Get asset data
    Get asset data of in
    Reads an Aave reserve's live rates and token addresses, with supply and borrow APYs.
  • Get token balance
    Get balance of held by
    Reads a token balance held by an address, native or ERC-20.
  • Compare two values
    Is
    Compares two values with a chosen operator and returns a boolean.
  • Predicate
    Steers control flow by comparing two values: branch, loop, or require the condition holds.
  • Supply
    Supply to
    Supplies an asset to an Aave market, minting aTokens to the wallet.
  • End block
    End block
    Closes the innermost open block, whether a conditional branch or a loop.

Related plugs · 8