core-v3 1.11.1
Install from the command line:
Learn more about npm packages
$ npm install @aave/core-v3@1.11.1
Install via package.json:
"@aave/core-v3": "1.11.1"
About this version
.///. .///. //. .// `/////////////-
`++:++` .++:++` :++` `++: `++:......---.`
`/+: -+/` `++- :+/` /+/ `/+/ `++.
/+/ :+/ /+: /+/ `/+/ /+/` `++.
-::/++::` /+: -::/++::` `/+: `++: :++` `++/:::::::::.
-:+++::-` `/+: --++/---` `++- .++- -++. `++/:::::::::.
-++. .++- -++` .++. .++. .++- `++.
.++- -++. .++. -++. -++``++- `++.
`++: :++` .++- :++` :+//+: `++:----------`
-/: :/- -/: :/. ://: `/////////////-
This repository contains the smart contracts source code and markets configuration for Aave Protocol V3. The repository uses Docker Compose and Hardhat as development enviroment for compilation, testing and deployment tasks.
Aave is a decentralized non-custodial liquidity markets protocol where users can participate as suppliers or borrowers. Suppliers provide liquidity to the market to earn a passive income, while borrowers are able to borrow in an overcollateralized (perpetually) or undercollateralized (one-block liquidity) fashion.
[Pending]
[Pending]
You can join at the Discord channel or at the Governance Forum for asking questions about the protocol or talk about Aave with other peers.
You can install @aave/aave-v3-core
as an NPM package in your Hardhat or Truffle project to import the contracts and interfaces:
npm install @aave/aave-v3-core
Import at Solidity files:
import {IPool} from "@aave/aave-v3-core/contracts/interfaces/IPool.sol";
contract Misc {
function supply(address pool, address token, address user, uint256 amount) public {
IPool(pool).supply(token, amount, user, 0);
{...}
}
}
The JSON artifacts with the ABI and Bytecode are also included into the bundled NPM package at artifacts/
directory.
Import JSON file via Node JS require
:
const PoolV3Artifact = require('@aave/aave-v3-core/artifacts/contracts/protocol/pool/Pool.sol/Pool.json');
// Log the ABI into console
console.log(PoolV3Artifact.abi)
The repository uses Docker Compose to manage sensitive keys and load the configuration. Prior any action like test or deploy, you must run docker-compose up
to start the contracts-env
container, and then connect to the container console via docker-compose exec contracts-env bash
.
Follow the next steps to setup the repository:
- Install
docker
anddocker-compose
- Create an enviroment file named
.env
and fill the next enviroment variables
# Mnemonic, only first address will be used
MNEMONIC=""
# Add Alchemy or Infura provider keys, alchemy takes preference at the config level
ALCHEMY_KEY=""
INFURA_KEY=""
# Optional Etherscan key, for automatize the verification of the contracts at Etherscan
ETHERSCAN_KEY=""
# Optional, if you plan to use Tenderly scripts
TENDERLY_PROJECT=""
TENDERLY_USERNAME=""
The configurations related with the Aave Markets are located at markets
directory. You can follow the IAaveConfiguration
interface to create new Markets configuration or extend the current Aave configuration.
Each market should have his own Market configuration file, and their own set of deployment tasks, using the Aave market config and tasks as a reference.
You can run the full test suite with the following commands:
# In one terminal
docker-compose up
# Open another tab or terminal
docker-compose exec contracts-env bash
# A new Bash terminal is prompted, connected to the container
npm run test
To deploy the Aave Protocol V3 core contracts, refer to the repo aave-v3-deployments.
[Pending]