https://github.com/aave/gho-aip
https://github.com/aave/gho-aip
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/aave/gho-aip
- Owner: aave
- License: mit
- Created: 2023-02-28T15:40:42.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-18T05:46:40.000Z (over 1 year ago)
- Last Synced: 2025-04-12T10:04:23.653Z (about 2 months ago)
- Language: Solidity
- Size: 407 KB
- Stars: 11
- Watchers: 8
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Audit: audits/05-06-2023_SigmaPrime.pdf
Awesome Lists containing this project
README
# Aave GHO AIP
## Setup
```sh
cp .env.example .env
forge install
``````sh
forge build
```### Test
```sh
forge test -vvvv
```## Development
This project uses [Foundry](https://getfoundry.sh). See the [book](https://book.getfoundry.sh/getting-started/installation.html) for detailed instructions on how to install and use Foundry.
The template ships with sensible default so you can use default `foundry` commands without resorting to `MakeFile`.## Advanced features
### Diffing
For contracts upgrading implementations it's quite important to diff the implementation code to spot potential issues and ensure only the intended changes are included.
Therefore the `Makefile` includes some commands to streamline the diffing process.#### Download
You can `download` the current contract code of a deployed contract via `make download chain=polygon address=0x00`. This will download the contract source for specified address to `src/etherscan/chain_address`. This command works for all chains with a etherscan compatible block explorer.
#### Git diff
You can `git-diff` a downloaded contract against your src via `make git-diff before=./etherscan/chain_address after=./src out=filename`. This command will diff the two folders via git patience algorithm and write the output to `diffs/filename.md`.
**Caveat**: If the onchain implementation was verified using flatten, for generating the diff you need to flatten the new contract via `forge flatten` and supply the flattened file instead fo the whole `./src` folder.