0

I am trying to write a contract imported aave-v3 which includes the some aave v3 functions such as supply, borrow, repay etc. I will then make this contract accessible only to its owner.

For example:

// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.10;

import {IPool} from "@aave/core-v3/contracts/interfaces/IPool.sol";

contract AaveV3 {

     function supply(
        address pool,
        address asset,
        address onBehalfOf,
        uint256 amount
    ) public {
        IPool(pool).supply(asset, amount, onBehalfOf, 0);
        
    }

}

I don't understand what "address pool" is inside the supply function. I couldn't find any example contract defining these functions in.

Considering that I am inexperienced in this field, I am waiting for your help.

2
  • Please, can you clarify your issue? Aug 12, 2022 at 15:06
  • I want to use aave-v3 inside my contract. To use some functions flash loan, borrow vs. Aug 17, 2022 at 11:07

1 Answer 1

0

Aave has a Pool.sol smart contracts which you can use to supply ,borrow .The pool address you are asking for is the address of the deployed contract on a specific network. For ETH mainnet it is here : here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.