Skip to content

Commit

Permalink
feat: finalize v2 addresses (#103)
Browse files Browse the repository at this point in the history
* feat: finalize v2 addresses

* fix: finalize v2 rates
  • Loading branch information
sakulstra authored Jun 8, 2023
1 parent 691f48c commit 1371a7c
Show file tree
Hide file tree
Showing 16 changed files with 25 additions and 214 deletions.
1 change: 0 additions & 1 deletion .assets/0372907d0b2f3da48f7adcaed3b1452230cd5c2b.svg

This file was deleted.

1 change: 0 additions & 1 deletion .assets/2c7dedb9c0cda4f69d46743b5137df8d3fa9ce57.svg

This file was deleted.

1 change: 0 additions & 1 deletion .assets/ae5f4984ec6d1aad35594fe55bd4718cc49196da.svg

This file was deleted.

1 change: 0 additions & 1 deletion .assets/ecca0fc5726ac8611b08586ad4640ef858267770.svg

This file was deleted.

2 changes: 1 addition & 1 deletion lib/forge-std
Submodule forge-std updated 1 files
+0 −1 src/StdCheats.sol
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@
"prettier-plugin-solidity": "^1.1.3"
},
"dependencies": {
"@bgd-labs/aave-cli": "^0.0.8"
"@bgd-labs/aave-cli": "^0.0.9"
}
}
86 changes: 0 additions & 86 deletions reports/postTestV2RatesUpdates.md

This file was deleted.

86 changes: 0 additions & 86 deletions reports/preTestV2RatesUpdates.md

This file was deleted.

11 changes: 6 additions & 5 deletions src/test/mocks/AaveV2EthereumRatesUpdate.sol
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@ import {AaveV2EthereumAssets} from 'aave-address-book/AaveV2Ethereum.sol';
contract AaveV2EthereumRatesUpdate is AaveV2PayloadBase {
constructor(IEngine customEngine) AaveV2PayloadBase(customEngine) {}

function rateStrategiesUpdates() public pure override returns (IEngine.RateStrategyUpdate[] memory) {
function rateStrategiesUpdates()
public
pure
override
returns (IEngine.RateStrategyUpdate[] memory)
{
IEngine.RateStrategyUpdate[] memory rateStrategy = new IEngine.RateStrategyUpdate[](1);

rateStrategy[0] = IEngine.RateStrategyUpdate({
Expand All @@ -29,8 +34,4 @@ contract AaveV2EthereumRatesUpdate is AaveV2PayloadBase {

return rateStrategy;
}

function getPoolContext() public pure override returns (IEngine.PoolContext memory) {
return IEngine.PoolContext({networkName: 'Ethereum', networkAbbreviation: 'Eth'});
}
}
8 changes: 3 additions & 5 deletions src/v2-config-engine/AaveV2PayloadAvalanche.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {AaveV2Avalanche, AaveV2AvalancheAssets} from 'aave-address-book/AaveV2Avalanche.sol';
import {AaveV2Avalanche} from 'aave-address-book/AaveV2Avalanche.sol';
import './AaveV2PayloadBase.sol';

/**
Expand All @@ -10,9 +10,7 @@ import './AaveV2PayloadBase.sol';
*/
// TODO: Add rates factory address after deploying
abstract contract AaveV2PayloadAvalanche is
AaveV2PayloadBase(IEngine(address(0)))
AaveV2PayloadBase(IEngine(AaveV2Avalanche.LISTING_ENGINE))
{
function getPoolContext() public pure override returns (IEngine.PoolContext memory) {
return IEngine.PoolContext({networkName: 'Avalanche', networkAbbreviation: 'Ava'});
}

}
4 changes: 0 additions & 4 deletions src/v2-config-engine/AaveV2PayloadBase.sol
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,4 @@ abstract contract AaveV2PayloadBase {
virtual
returns (IEngine.RateStrategyUpdate[] memory)
{}

/// @dev the lack of support for immutable strings kinds of forces for this
/// Besides that, it can actually be useful being able to change the naming, but remote
function getPoolContext() public view virtual returns (IEngine.PoolContext memory);
}
8 changes: 3 additions & 5 deletions src/v2-config-engine/AaveV2PayloadEthereum.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {AaveV2Ethereum, AaveV2EthereumAssets} from 'aave-address-book/AaveV2Ethereum.sol';
import {AaveV2Ethereum} from 'aave-address-book/AaveV2Ethereum.sol';
import './AaveV2PayloadBase.sol';

/**
Expand All @@ -10,9 +10,7 @@ import './AaveV2PayloadBase.sol';
*/
// TODO: Add rates factory address after deploying
abstract contract AaveV2PayloadEthereum is
AaveV2PayloadBase(IEngine(address(0)))
AaveV2PayloadBase(IEngine(AaveV2Ethereum.LISTING_ENGINE))
{
function getPoolContext() public pure override returns (IEngine.PoolContext memory) {
return IEngine.PoolContext({networkName: 'Ethereum', networkAbbreviation: 'Eth'});
}

}
8 changes: 3 additions & 5 deletions src/v2-config-engine/AaveV2PayloadEthereumAMM.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {AaveV2EthereumAMM, AaveV2EthereumAMMAssets} from 'aave-address-book/AaveV2EthereumAMM.sol';
import {AaveV2EthereumAMM} from 'aave-address-book/AaveV2EthereumAMM.sol';
import './AaveV2PayloadBase.sol';

/**
Expand All @@ -10,9 +10,7 @@ import './AaveV2PayloadBase.sol';
*/
// TODO: Add rates factory address after deploying
abstract contract AaveV2PayloadEthereumAMM is
AaveV2PayloadBase(IEngine(address(0)))
AaveV2PayloadBase(IEngine(AaveV2EthereumAMM.LISTING_ENGINE))
{
function getPoolContext() public pure override returns (IEngine.PoolContext memory) {
return IEngine.PoolContext({networkName: 'Ethereum', networkAbbreviation: 'Eth'});
}

}
10 changes: 3 additions & 7 deletions src/v2-config-engine/AaveV2PayloadPolygon.sol
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {AaveV2Polygon, AaveV2PolygonAssets} from 'aave-address-book/AaveV2Polygon.sol';
import {AaveV2Polygon} from 'aave-address-book/AaveV2Polygon.sol';
import './AaveV2PayloadBase.sol';

/**
* @dev Base smart contract for an Aave v2 rates update on Avalanche.
* @author BGD Labs
*/
// TODO: Add rates factory address after deploying
abstract contract AaveV2PayloadPolygon is
AaveV2PayloadBase(IEngine(address(0)))
{
function getPoolContext() public pure override returns (IEngine.PoolContext memory) {
return IEngine.PoolContext({networkName: 'Polygon', networkAbbreviation: 'Pol'});
}
abstract contract AaveV2PayloadPolygon is AaveV2PayloadBase(IEngine(AaveV2Polygon.LISTING_ENGINE)) {

}
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@
resolved "https://registry.yarnpkg.com/@bgd-labs/aave-address-book/-/aave-address-book-1.24.0.tgz#c6396651f82492d69e5b0c83a6131aeebb3c9d95"
integrity sha512-9tD2TIntIo6AD+4ima6RyQGAE/8hHwf4j9Gls+tQZhLKhVlebp3Ecotv3KWzMeNqrKF6TNghCaVAEFPW04wIyQ==

"@bgd-labs/aave-cli@^0.0.8":
version "0.0.8"
resolved "https://registry.yarnpkg.com/@bgd-labs/aave-cli/-/aave-cli-0.0.8.tgz#f7f34c1fafe0767c694b4eb99fa5b339c3255919"
integrity sha512-3HrtBvwRC3hqe++Pb1ddkktQlqFrZAjWJEIQR72PX1TvLeyimbbHOjX/chG06gSsNnov5n6x9FTpbJu9FwCFTQ==
"@bgd-labs/aave-cli@^0.0.9":
version "0.0.9"
resolved "https://registry.yarnpkg.com/@bgd-labs/aave-cli/-/aave-cli-0.0.9.tgz#5024f07094e2bd465be46fb270550357815cda1f"
integrity sha512-r4toS6nPuxTzy6/RBJ821cHlVM/YqB1ifJvB8s8q/6D/z5LiqZ83U35B0BzsQ5K7wBKy5ijIKhkpcb+VTxpIyQ==
dependencies:
"@bgd-labs/aave-address-book" "^1.23.1"
bs58 "^5.0.0"
Expand Down

0 comments on commit 1371a7c

Please sign in to comment.