This repository contains contracts to upgrade existing instances of Aave protocol from v3.2.0 to v3.3.0.
- Foundry, how-to install (we recommend also update to the last version with
foundryup
). - ZkSync Foundry, how-to install (we recommend also update to the last version with
foundryup-zksync
).
cp .env.example .env # you need to setup functional rpcs
forge install
# optional, to install prettier
yarn install
Command run test for all networks expect zkSync: forge test
Command to run test for zkSync: FOUNDRY_PROFILE=zksync forge test --zksync
There are two test templates available:
- PureTestTemplate.t.sol which creates a instance of the v3.3 protocol on a pure anvil
- UpgradeTestTemplate.t.sol which upgrades a existing protocol instance from 3.2 to 3.3
The payload for the upgrade does the following:
- Upgrades the
PoolConfigurator
implementation. - Upgrades the
Pool
implementation. - Connects the new
PoolDataProvider
to thePoolAddressesProvider
.
Additionally, there are new versions of some periphery-contracts that might be deployed alongside the proposal, namely:
WrappedTokenGatewayV3
ParaswapAdapters
StataTokenFactory
It's important to note that these contracts are:
- not part of the upgrade payload.
- they don't need to be upgraded, the old versions are perfectly operational.
Using the newer versions will result in slightly lower gas usage on certain operations.
The repository contains code-diffs for all the targeted networks. The diffs were created by diffing the current explorer code against new explorer code. Once the diff is created the script deletes all duplicates, so eventually what is left is the differences between the different instances. As expected:
- the diff on mainnet reflects the changes from the v3.3.0 branch.
- the diff on optimism reflects the changes from the v3.3.0 branch but for a
L2Pool
. In addition, the diff onPool
is slightly different, be cause the Pool instance comments were slightly outdated. - the diff on metis is limited again to a changed license.
- all other instances have no diff at all, or a diff that is limited to the
settings
, which describes some differences in comparison to the previous deployment process (e.g. usage of bytecodehash, remappings etc)but does not result in different code.
Copyright © 2024, BGD Labs.
This repository is BUSL-1.1-licensed.