Skip to content

Simple example (with helpers) of an Aave v2 listing

License

Notifications You must be signed in to change notification settings

liquity/example-aave-v2-listing

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

👻 Example listing Aave v2

This repository contains an example of a listing on Aave v2 Ethereum, including some useful helpers to test the protocol post-proposal execution.

Prepare env

cp .env.example .env

Dependencies

make update

Compilation

make build

Testing

make test

Diffing

You can use the diffing utility to generate the diff between two contracts.

sh diff.sh <pathA> <pathB> <outName>

If one of the contracts is deployed you can download the contract from etherscan via make download address=0x...

For a mainnet v2 listing you might want to diff the a/s/v implementations, with a standard implementation (like e.g. the ones of DAI) to ensure it's correct.

# LUSD vs DAI diff example
make download address=0x7b2a3cf972c3193f26cdec6217d27379b6417bd0 # aDAI impl
make download address=0xB2f4Fb41F01CdeF7c10F0e8aFbeB3cFA79d1686F # aLUSD impl

# generate aTokenDiff via
sh ./diff.sh ./etherscan/0x7b2a3cf972c3193f26cdec6217d27379b6417bd0 ./etherscan/0xB2f4Fb41F01CdeF7c10F0e8aFbeB3cFA79d1686F aLUSDimplDiff

# If the code is only available with flattened format you would need to bring the contracts in a similar format.
# You can do so by flattening the respective contract.
# In the example case of LUSD and DAI where both are verified via json this method should not be used.
forge flatten ./etherscan/0x7b2a3cf972c3193f26cdec6217d27379b6417bd0/AToken/@aave/protocol-v2/contracts/protocol/tokenization/AToken.sol --output ./etherscan/0x7b2a3cf972c3193f26cdec6217d27379b6417bd0/Flattened.sol

About

Simple example (with helpers) of an Aave v2 listing

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Solidity 97.3%
  • Makefile 1.5%
  • Shell 1.2%