Skip to content

Commit

Permalink
Swaps: Deployment Script and Init (#141)
Browse files Browse the repository at this point in the history
* feat: add specific payloads

* chore: remove allowed tokens

* feat: finish updating aave swaps

* feat: update addresses

* chore: update readme

* chore: index events

* chore: update README

* chore: add deployment script

* chore: fix deployment via proxy
  • Loading branch information
efecarranza authored Aug 29, 2023
1 parent 9ca17b6 commit 521cb08
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/swaps/AaveSwapper.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {Rescuable} from 'solidity-utils/contracts/utils/Rescuable.sol';
import {OwnableWithGuardian} from 'solidity-utils/contracts/access-control/OwnableWithGuardian.sol';
import {Initializable} from 'solidity-utils/contracts/transparent-proxy/Initializable.sol';
import {AaveV3Ethereum} from 'aave-address-book/AaveV3Ethereum.sol';
import {AaveGovernanceV2} from 'aave-address-book/AaveGovernanceV2.sol';

import {IPriceChecker} from './interfaces/IExpectedOutCalculator.sol';
import {IMilkman} from './interfaces/IMilkman.sol';
Expand Down Expand Up @@ -35,8 +36,8 @@ contract AaveSwapper is Initializable, OwnableWithGuardian, Rescuable {
address public constant BAL80WETH20 = 0x5c6Ee304399DBdB9C8Ef030aB642B10820DB8F56;

function initialize() external initializer {
_transferOwnership(_msgSender());
_updateGuardian(_msgSender());
_transferOwnership(AaveGovernanceV2.SHORT_EXECUTOR);
_updateGuardian(0xA519a7cE7B24333055781133B13532AEabfAC81b);
}

function swap(
Expand Down
24 changes: 24 additions & 0 deletions src/swaps/AaveSwapperDeployment.s.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.19;

import {Script} from 'forge-std/Script.sol';
import {AaveMisc} from 'aave-address-book/AaveMisc.sol';
import {TransparentProxyFactory} from 'solidity-utils/contracts/transparent-proxy/TransparentProxyFactory.sol';

import {AaveSwapper} from './AaveSwapper.sol';

contract DeplyAaveSwapper is Script {
function run() external {
vm.startBroadcast();

address aaveSwapper = address(new AaveSwapper());
TransparentProxyFactory(AaveMisc.TRANSPARENT_PROXY_FACTORY_ETHEREUM).create(
aaveSwapper,
AaveMisc.PROXY_ADMIN_ETHEREUM,
abi.encodeWithSelector(AaveSwapper.initialize.selector)
);

vm.stopBroadcast();
}
}

1 comment on commit 521cb08

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Foundry report

forge 0.2.0 (bff4ed9 2023-08-29T00:16:15.395348141Z)
Build log
installing solc version "0.8.19"
Successfully installed solc 0.8.19
Compiling 206 files with 0.8.19
Solc 0.8.19 finished in 79.89s
Compiler run successful with warnings:
Warning (8760): This declaration has the same name as another declaration.
  --> src/dependencies/DefaultReserveInterestRateStrategy.sol:60:5:
   |
60 |     uint256 baseVariableBorrowRate,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Note: The other declaration is here:
  --> src/dependencies/DefaultReserveInterestRateStrategy.sol:92:3:
   |
92 |   function baseVariableBorrowRate() external view override returns (uint256) {
   |   ^ (Relevant source part starts here and spans across multiple lines).

Warning (8760): This declaration has the same name as another declaration.
  --> src/dependencies/DefaultReserveInterestRateStrategy.sol:61:5:
   |
61 |     uint256 variableRateSlope1,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
Note: The other declaration is here:
  --> src/dependencies/DefaultReserveInterestRateStrategy.sol:76:3:
   |
76 |   function variableRateSlope1() external view returns (uint256) {
   |   ^ (Relevant source part starts here and spans across multiple lines).

Warning (8760): This declaration has the same name as another declaration.
  --> src/dependencies/DefaultReserveInterestRateStrategy.sol:62:5:
   |
62 |     uint256 variableRateSlope2,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
Note: The other declaration is here:
  --> src/dependencies/DefaultReserveInterestRateStrategy.sol:80:3:
   |
80 |   function variableRateSlope2() external view returns (uint256) {
   |   ^ (Relevant source part starts here and spans across multiple lines).

Warning (8760): This declaration has the same name as another declaration.
  --> src/dependencies/DefaultReserveInterestRateStrategy.sol:63:5:
   |
63 |     uint256 stableRateSlope1,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^
Note: The other declaration is here:
  --> src/dependencies/DefaultReserveInterestRateStrategy.sol:84:3:
   |
84 |   function stableRateSlope1() external view returns (uint256) {
   |   ^ (Relevant source part starts here and spans across multiple lines).

Warning (8760): This declaration has the same name as another declaration.
  --> src/dependencies/DefaultReserveInterestRateStrategy.sol:64:5:
   |
64 |     uint256 stableRateSlope2
   |     ^^^^^^^^^^^^^^^^^^^^^^^^
Note: The other declaration is here:
  --> src/dependencies/DefaultReserveInterestRateStrategy.sol:88:3:
   |
88 |   function stableRateSlope2() external view returns (uint256) {
   |   ^ (Relevant source part starts here and spans across multiple lines).

Warning (2462): Visibility for constructor is ignored. If you want the contract to be non-deployable, making it "abstract" is sufficient.
  --> src/dependencies/DefaultReserveInterestRateStrategy.sol:57:3:
   |
57 |   constructor(
   |   ^ (Relevant source part starts here and spans across multiple lines).

Warning (9302): Return value of low-level calls not used.
   --> tests/crosschainforwarders/ArbitrumCrossChainForwarderTest.t.sol:141:5:
    |
141 |     ARBITRUM_BRIDGE_EXECUTOR.call(payload);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

| Contract                                    | Size (kB) | Margin (kB) |
|---------------------------------------------|-----------|-------------|
| AaveGovernanceV2                            | 0.2       | 24.376      |
| AaveMisc                                    | 0.086     | 24.49       |
| AaveSwapper                                 | 5.613     | 18.963      |
| AaveV2Avalanche                             | 0.086     | 24.49       |
| AaveV2AvalancheAssets                       | 0.086     | 24.49       |
| AaveV2ConfigEngine                          | 3.18      | 21.396      |
| AaveV2Ethereum                              | 0.086     | 24.49       |
| AaveV2EthereumAMM                           | 0.086     | 24.49       |
| AaveV2EthereumAMMAssets                     | 0.086     | 24.49       |
| AaveV2EthereumArc                           | 0.086     | 24.49       |
| AaveV2EthereumAssets                        | 0.086     | 24.49       |
| AaveV2EthereumRatesUpdate                   | 1.512     | 23.064      |
| AaveV2Fuji                                  | 0.086     | 24.49       |
| AaveV2FujiAssets                            | 0.086     | 24.49       |
| AaveV2Goerli                                | 0.086     | 24.49       |
| AaveV2GoerliAssets                          | 0.086     | 24.49       |
| AaveV2Mumbai                                | 0.086     | 24.49       |
| AaveV2MumbaiAssets                          | 0.086     | 24.49       |
| AaveV2Polygon                               | 0.086     | 24.49       |
| AaveV2PolygonAssets                         | 0.086     | 24.49       |
| AaveV3Arbitrum                              | 0.086     | 24.49       |
| AaveV3ArbitrumAssets                        | 0.086     | 24.49       |
| AaveV3ArbitrumGoerli                        | 0.086     | 24.49       |
| AaveV3ArbitrumGoerliAssets                  | 0.086     | 24.49       |
| AaveV3ArbitrumRatesUpdates070322            | 4.554     | 20.022      |
| AaveV3Avalanche                             | 0.086     | 24.49       |
| AaveV3AvalancheAssets                       | 0.086     | 24.49       |
| AaveV3AvalancheCollateralUpdate             | 3.012     | 21.564      |
| AaveV3AvalancheCollateralUpdateCorrectBonus | 3.012     | 21.564      |
| AaveV3AvalancheCollateralUpdateNoChange     | 3.032     | 21.544      |
| AaveV3AvalancheCollateralUpdateWrongBonus   | 3.012     | 21.564      |
| AaveV3AvalancheRatesUpdates070322           | 5.119     | 19.457      |
| AaveV3Base                                  | 0.086     | 24.49       |
| AaveV3BaseAssets                            | 0.086     | 24.49       |
| AaveV3ConfigEngine                          | 21.129    | 3.447       |
| AaveV3Ethereum                              | 0.086     | 24.49       |
| AaveV3EthereumAssets                        | 0.086     | 24.49       |
| AaveV3EthereumMockCapUpdate                 | 2.92      | 21.656      |
| AaveV3EthereumMockCustomListing             | 3.919     | 20.657      |
| AaveV3Fantom                                | 0.086     | 24.49       |
| AaveV3FantomAssets                          | 0.086     | 24.49       |
| AaveV3FantomTestnet                         | 0.086     | 24.49       |
| AaveV3FantomTestnetAssets                   | 0.086     | 24.49       |
| AaveV3Fuji                                  | 0.086     | 24.49       |
| AaveV3FujiAssets                            | 0.086     | 24.49       |
| AaveV3Goerli                                | 0.086     | 24.49       |
| AaveV3GoerliAssets                          | 0.086     | 24.49       |
| AaveV3GoerliGho                             | 0.086     | 24.49       |
| AaveV3GoerliGhoAssets                       | 0.086     | 24.49       |
| AaveV3Harmony                               | 0.086     | 24.49       |
| AaveV3HarmonyAssets                         | 0.086     | 24.49       |
| AaveV3Metis                                 | 0.086     | 24.49       |
| AaveV3MetisAssets                           | 0.086     | 24.49       |
| AaveV3Mumbai                                | 0.086     | 24.49       |
| AaveV3MumbaiAssets                          | 0.086     | 24.49       |
| AaveV3Optimism                              | 0.086     | 24.49       |
| AaveV3OptimismAssets                        | 0.086     | 24.49       |
| AaveV3OptimismGoerli                        | 0.086     | 24.49       |
| AaveV3OptimismGoerliAssets                  | 0.086     | 24.49       |
| AaveV3OptimismMockRatesUpdate               | 3.254     | 21.322      |
| AaveV3OptimismRatesUpdates070322            | 4.133     | 20.443      |
| AaveV3Polygon                               | 0.086     | 24.49       |
| AaveV3PolygonAssets                         | 0.086     | 24.49       |
| AaveV3PolygonBorrowUpdate                   | 3.005     | 21.571      |
| AaveV3PolygonMockListing                    | 3.731     | 20.845      |
| AaveV3PolygonPriceFeedUpdate                | 2.856     | 21.72       |
| AaveV3PolygonRatesUpdates070322             | 5.858     | 18.718      |
| AaveV3ScrollAlpha                           | 0.086     | 24.49       |
| AaveV3ScrollAlphaAssets                     | 0.086     | 24.49       |
| AaveV3ScrollSepolia                         | 0.086     | 24.49       |
| AaveV3ScrollSepoliaAssets                   | 0.086     | 24.49       |
| AaveV3Sepolia                               | 0.086     | 24.49       |
| AaveV3SepoliaAssets                         | 0.086     | 24.49       |
| Address                                     | 0.086     | 24.49       |
| AddressAliasHelper                          | 0.086     | 24.49       |
| CapsPlusRiskSteward                         | 2.607     | 21.969      |
| CapsPlusRiskStewardErrors                   | 0.556     | 24.02       |
| ChainIds                                    | 0.086     | 24.49       |
| ConfiguratorInputTypes                      | 0.086     | 24.49       |
| CrosschainForwarderArbitrum                 | 2.246     | 22.33       |
| CrosschainForwarderMetis                    | 1.561     | 23.015      |
| CrosschainForwarderOptimism                 | 1.689     | 22.887      |
| CrosschainForwarderPolygon                  | 1.435     | 23.141      |
| DataTypes                                   | 0.086     | 24.49       |
| DefaultReserveInterestRateStrategy          | 3.469     | 21.107      |
| DeployEngineArbLib                          | 0.086     | 24.49       |
| DeployEngineAvaLib                          | 0.086     | 24.49       |
| DeployEngineEthLib                          | 0.086     | 24.49       |
| DeployEngineMetLib                          | 0.086     | 24.49       |
| DeployEngineOptLib                          | 0.086     | 24.49       |
| DeployEnginePolLib                          | 0.086     | 24.49       |
| DeployRatesFactoryArbLib                    | 0.086     | 24.49       |
| DeployRatesFactoryAvaLib                    | 0.086     | 24.49       |
| DeployRatesFactoryEthLib                    | 0.086     | 24.49       |
| DeployRatesFactoryLib                       | 0.086     | 24.49       |
| DeployRatesFactoryMetLib                    | 0.086     | 24.49       |
| DeployRatesFactoryOptLib                    | 0.086     | 24.49       |
| DeployRatesFactoryPolLib                    | 0.086     | 24.49       |
| DeployV2EngineAvaLib                        | 0.086     | 24.49       |
| DeployV2EngineEthAMMLib                     | 0.086     | 24.49       |
| DeployV2EngineEthLib                        | 0.086     | 24.49       |
| DeployV2EnginePolLib                        | 0.086     | 24.49       |
| DeployV2RatesFactoryAvaLib                  | 0.086     | 24.49       |
| DeployV2RatesFactoryEthAMMLib               | 0.086     | 24.49       |
| DeployV2RatesFactoryEthLib                  | 0.086     | 24.49       |
| DeployV2RatesFactoryLib                     | 0.086     | 24.49       |
| DeployV2RatesFactoryPolLib                  | 0.086     | 24.49       |
| ERC1967Proxy                                | 0.177     | 24.399      |
| EngineFlags                                 | 0.086     | 24.49       |
| Errors                                      | 3.952     | 20.624      |
| FxChild                                     | 1.039     | 23.537      |
| FxRoot                                      | 0.811     | 23.765      |
| GovHelpers                                  | 0.086     | 24.49       |
| MockExecutor                                | 0.437     | 24.139      |
| MyPayload                                   | 1.53      | 23.046      |
| PayloadWithEmit                             | 0.15      | 24.426      |
| PercentageMath                              | 0.086     | 24.49       |
| ProxyAdmin                                  | 1.683     | 22.893      |
| ProxyHelpers                                | 0.086     | 24.49       |
| ReserveConfiguration                        | 0.171     | 24.405      |
| SafeERC20                                   | 0.086     | 24.49       |
| SafeMath                                    | 0.086     | 24.49       |
| StdStyle                                    | 0.086     | 24.49       |
| StorageHelpers                              | 0.086     | 24.49       |
| StorageSlot                                 | 0.086     | 24.49       |
| TransparentProxyFactory                     | 7.375     | 17.201      |
| TransparentUpgradeableProxy                 | 2.081     | 22.495      |
| V2RateStrategyFactory                       | 8.767     | 15.809      |
| V3RateStrategyFactory                       | 9.279     | 15.297      |
| WadRayMath                                  | 0.086     | 24.49       |
| console                                     | 0.086     | 24.49       |
| console2                                    | 0.086     | 24.49       |
| safeconsole                                 | 0.086     | 24.49       |
| stdError                                    | 0.591     | 23.985      |
| stdJson                                     | 0.086     | 24.49       |
| stdMath                                     | 0.086     | 24.49       |
| stdStorage                                  | 0.086     | 24.49       |
| stdStorageSafe                              | 0.086     | 24.49       |
Test success 🌈
No files changed, compilation skipped

Running 6 tests for src/swaps/AaveSwapperTest.t.sol:AaveSwapperSwap
[PASS] test_revertsIf_amountIsZero() (gas: 12452)
[PASS] test_revertsIf_fromTokenIsZeroAddress() (gas: 12413)
[PASS] test_revertsIf_invalidCaller() (gas: 11647)
[PASS] test_revertsIf_invalidRecipient() (gas: 12474)
[PASS] test_revertsIf_toTokenIsZeroAddress() (gas: 12351)
[PASS] test_successful() (gas: 496514)
Test result: ok. 6 passed; 0 failed; 0 skipped; finished in 3.00s

Running 3 tests for src/swaps/AaveSwapperTest.t.sol:CancelSwap
[PASS] test_revertsIf_invalidCaller() (gas: 15418)
[PASS] test_revertsIf_noMatchingTrade() (gas: 502872)
[PASS] test_successful() (gas: 603994)
Test result: ok. 3 passed; 0 failed; 0 skipped; finished in 1.06s

Running 2 tests for src/swaps/AaveSwapperTest.t.sol:EmergencyTokenTransfer
[PASS] test_revertsIf_invalidCaller() (gas: 10839)
[PASS] test_successful_governanceCaller() (gas: 304551)
Test result: ok. 2 passed; 0 failed; 0 skipped; finished in 929.89ms

Running 1 test for src/swaps/DepositV3SwapPayloadTest.t.sol:DepositV3SwapPayloadTest
[PASS] test_successful() (gas: 458739)
Test result: ok. 1 passed; 0 failed; 0 skipped; finished in 5.11s

Running 7 tests for src/swaps/AaveSwapperTest.t.sol:GetExpectedOut
[PASS] test_aaveToUsdc() (gas: 84122)
[PASS] test_aaveToUsdc_withEthBasedOracles() (gas: 84115)
[PASS] test_balTo80BAL20WETH() (gas: 83868)
[PASS] test_ethToBal() (gas: 69531)
[PASS] test_ethToDai() (gas: 67281)
[PASS] test_revertsIf_fromOracleIsAddressZero() (gas: 9216)
[PASS] test_revertsIf_toOracleIsAddressZero() (gas: 9220)
Test result: ok. 7 passed; 0 failed; 0 skipped; finished in 6.67s

Running 1 test for src/swaps/AaveSwapperTest.t.sol:Initialize
[PASS] test_revertsIf_alreadyInitialized() (gas: 10872)
Test result: ok. 1 passed; 0 failed; 0 skipped; finished in 1.47ms

Running 2 tests for src/swaps/AaveSwapperTest.t.sol:RemoveGuardian
[PASS] test_revertsIf_invalidCaller() (gas: 12902)
[PASS] test_successful() (gas: 16184)
Test result: ok. 2 passed; 0 failed; 0 skipped; finished in 1.64ms

Running 2 tests for src/swaps/AaveSwapperTest.t.sol:TransferOwnership
[PASS] test_revertsIf_invalidCaller() (gas: 12330)
[PASS] test_successful() (gas: 18297)
Test result: ok. 2 passed; 0 failed; 0 skipped; finished in 1.98ms

Running 2 tests for src/swaps/AaveSwapperTest.t.sol:UpdateGuardian
[PASS] test_revertsIf_invalidCaller() (gas: 14524)
[PASS] test_successful() (gas: 22582)
Test result: ok. 2 passed; 0 failed; 0 skipped; finished in 2.02ms

Running 1 test for tests/GovTest.t.sol:GovernanceIpfsTest
[PASS] testIpfsHashCreation() (gas: 15084)
Logs:
  Info: This preview will only work when the file has been uploaded to ipfs
  Preview: https://app.aave.com/governance/ipfs-preview/?ipfsHash=0x12f2d9c91e4e23ae4009ab9ef5862ee0ae79498937b66252213221f04a5d5b32

Test result: ok. 1 passed; 0 failed; 0 skipped; finished in 11.81s

Running 1 test for tests/GovTest.t.sol:GovernanceL2ExecutorTest
[PASS] testCreateProposal() (gas: 116301)
Test result: ok. 1 passed; 0 failed; 0 skipped; finished in 2.36s

Running 2 tests for tests/GovTest.t.sol:GovernanceMainnetExecutorTest
[PASS] testCreateProposalLong() (gas: 165804)
[PASS] testCreateProposalShort() (gas: 161453)
Test result: ok. 2 passed; 0 failed; 0 skipped; finished in 3.51s

Running 2 tests for tests/GovTest.t.sol:GovernanceTest
[PASS] testCreateProposal() (gas: 533184)
[PASS] testCreateProposalDynamicIpfsHash() (gas: 545530)
Logs:
  Info: This preview will only work when the file has been uploaded to ipfs
  Preview: https://app.aave.com/governance/ipfs-preview/?ipfsHash=0x12f2d9c91e4e23ae4009ab9ef5862ee0ae79498937b66252213221f04a5d5b32

Test result: ok. 2 passed; 0 failed; 0 skipped; finished in 5.85s

Running 1 test for tests/crosschainforwarders/MetisCrossChainForwarderTest.t.sol:MetisCrossChainForwarderTest
[PASS] testProposalE2E() (gas: 1213114)
Test result: ok. 1 passed; 0 failed; 0 skipped; finished in 8.89s

Running 1 test for tests/crosschainforwarders/OptimismCrossChainForwarderTest.t.sol:OptimismCrossChainForwarderTest
[PASS] testProposalE2E() (gas: 1196700)
Test result: ok. 1 passed; 0 failed; 0 skipped; finished in 9.42s

Running 1 test for tests/crosschainforwarders/PolygonCrossChainForwarderTest.t.sol:PolygonCrossChainForwarderTest
[PASS] testProposalE2E() (gas: 1049409)
Test result: ok. 1 passed; 0 failed; 0 skipped; finished in 7.56s

Running 1 test for tests/AaveV2ConfigEngineTest.t.sol:AaveV2ConfigEngineTest
[PASS] testV2RateStrategiesUpdates() (gas: 189294736)
Test result: ok. 1 passed; 0 failed; 0 skipped; finished in 102.60s

Running 1 test for tests/ProtocolV2TestBase.t.sol:ProtocolV2TestBaseTest
[PASS] testE2E() (gas: 19954822)
Logs:
  E2E: Collateral AAVE, TestAsset USDT
  SUPPLY: AAVE, Amount: 2553597251196022693793
  SUPPLY: USDT, Amount: 1922278804
  WITHDRAW: USDT, Amount: 961139402
  WITHDRAW: USDT, Amount: 961139403
  BORROW: USDT, Amount 1922278804, Stable: false
  REPAY: USDT, Amount: 1922278804
  BORROW: USDT, Amount 1922278804, Stable: true
  REPAY: USDT, Amount: 1922278804
  E2E: Collateral AAVE, TestAsset WBTC
  SUPPLY: AAVE, Amount: 2553597251196022693793
  SUPPLY: WBTC, Amount: 6293388
  WITHDRAW: WBTC, Amount: 3146694
  WITHDRAW: WBTC, Amount: 3146693
  BORROW: WBTC, Amount 6293388, Stable: false
  REPAY: WBTC, Amount: 6293388
  BORROW: WBTC, Amount 6293388, Stable: true
  REPAY: WBTC, Amount: 6293388
  E2E: Collateral AAVE, TestAsset WETH
  SUPPLY: AAVE, Amount: 2553597251196022693793
  SUPPLY: WETH, Amount: 1000000000000000000
  WITHDRAW: WETH, Amount: 500000000000000000
  WITHDRAW: WETH, Amount: 500000000000000001
  BORROW: WETH, Amount 1000000000000000000, Stable: false
  REPAY: WETH, Amount: 1000000000000000000
  BORROW: WETH, Amount 1000000000000000000, Stable: true
  REPAY: WETH, Amount: 1000000000000000000
  E2E: Collateral AAVE, TestAsset AAVE
  SUPPLY: AAVE, Amount: 2553597251196022693793
  SUPPLY: AAVE, Amount: 25535972511960226937
  WITHDRAW: AAVE, Amount: 12767986255980113468
  WITHDRAW: AAVE, Amount: 12767986255980113469
  E2E: Collateral AAVE, TestAsset DAI
  SUPPLY: AAVE, Amount: 2553597251196022693793
  SUPPLY: DAI, Amount: 1914944850736299739803
  WITHDRAW: DAI, Amount: 957472425368149869901
  WITHDRAW: DAI, Amount: 957472425368149869902
  BORROW: DAI, Amount 1914944850736299739803, Stable: false
  REPAY: DAI, Amount: 1914944850736299739803
  BORROW: DAI, Amount 1914944850736299739803, Stable: true
  REPAY: DAI, Amount: 1914944850736299739803
  E2E: Collateral AAVE, TestAsset sUSD
  SUPPLY: AAVE, Amount: 2553597251196022693793
  SUPPLY: sUSD, Amount: 1919434649608077907661
  WITHDRAW: sUSD, Amount: 959717324804038953830
  WITHDRAW: sUSD, Amount: 959717324804038953830
  BORROW: sUSD, Amount 1919434649608077907661, Stable: false
  REPAY: sUSD, Amount: 1919434649608077907661
  E2E: Collateral AAVE, TestAsset USDC
  SUPPLY: AAVE, Amount: 2553597251196022693793
  SUPPLY: USDC, Amount: 1912585127
  WITHDRAW: USDC, Amount: 956292563
  WITHDRAW: USDC, Amount: 956292564
  BORROW: USDC, Amount 1912585127, Stable: false
  REPAY: USDC, Amount: 1912585127
  BORROW: USDC, Amount 1912585127, Stable: true
  REPAY: USDC, Amount: 1912585127
  E2E: Collateral AAVE, TestAsset CRV
  SUPPLY: AAVE, Amount: 2553597251196022693793
  SUPPLY: CRV, Amount: 2447532600357965341777
  WITHDRAW: CRV, Amount: 1223766300178982670888
  WITHDRAW: CRV, Amount: 1223766300178982670889
  E2E: Collateral AAVE, TestAsset GUSD
  SUPPLY: AAVE, Amount: 2553597251196022693793
  SUPPLY: GUSD, Amount: 191331
  WITHDRAW: GUSD, Amount: 95665
  WITHDRAW: GUSD, Amount: 95665
  BORROW: GUSD, Amount 191331, Stable: false
  REPAY: GUSD, Amount: 191331
  E2E: Collateral AAVE, TestAsset USDP
  SUPPLY: AAVE, Amount: 2553597251196022693793
  SUPPLY: USDP, Amount: 1939299150785117381031
  WITHDRAW: USDP, Amount: 969649575392558690515
  WITHDRAW: USDP, Amount: 969649575392558690516
  BORROW: USDP, Amount 1939299150785117381031, Stable: false
  REPAY: USDP, Amount: 1939299150785117381031
  E2E: Collateral AAVE, TestAsset FRAX
  SUPPLY: AAVE, Amount: 2553597251196022693793
  SUPPLY: FRAX, Amount: 1937630504372688546970
  WITHDRAW: FRAX, Amount: 968815252186344273485
  WITHDRAW: FRAX, Amount: 968815252186344273486
  BORROW: FRAX, Amount 1937630504372688546970, Stable: false
  REPAY: FRAX, Amount: 1937630504372688546970
  E2E: Collateral AAVE, TestAsset stETH
  SUPPLY: AAVE, Amount: 2553597251196022693793
  SUPPLY: stETH, Amount: 1000000000000000000
  WITHDRAW: stETH, Amount: 500000000000000000
  WITHDRAW: stETH, Amount: 499999999999999999
  E2E: Collateral AAVE, TestAsset LUSD
  SUPPLY: AAVE, Amount: 2553597251196022693793
  SUPPLY: LUSD, Amount: 1910246445122217347247
  WITHDRAW: LUSD, Amount: 955123222561108673623
  WITHDRAW: LUSD, Amount: 955123222561108673623
  BORROW: LUSD, Amount 1910246445122217347247, Stable: false
  REPAY: LUSD, Amount: 1910246445122217347247
  BORROW: LUSD, Amount 1910246445122217347247, Stable: true
  REPAY: LUSD, Amount: 1910246445122217347247

Test result: ok. 1 passed; 0 failed; 0 skipped; finished in 93.63s

Running 1 test for tests/ProtocolV2TestBase.t.sol:ProtocolV2TestE2ETestAsset
[PASS] test_e2eTestAssetUSDT() (gas: 3504995)
Logs:
  E2E: Collateral DAI, TestAsset USDT
  SUPPLY: DAI, Amount: 191494485073629973980349
  SUPPLY: USDT, Amount: 1922278804
  WITHDRAW: USDT, Amount: 961139402
  WITHDRAW: USDT, Amount: 961139403
  BORROW: USDT, Amount 1922278804, Stable: false
  REPAY: USDT, Amount: 1922278804
  BORROW: USDT, Amount 1922278804, Stable: true
  REPAY: USDT, Amount: 1922278804

Test result: ok. 1 passed; 0 failed; 0 skipped; finished in 228.95ms

Running 1 test for tests/AaveV3ConfigEngineGauntletProposal.t.sol:AaveV3ArbitrumConfigEngineRatesTest
[PASS] testEngine() (gas: 17802961)
Test result: ok. 1 passed; 0 failed; 0 skipped; finished in 36.87s

Running 1 test for tests/AaveV3ConfigEngineGauntletProposal.t.sol:AaveV3AvalancheConfigEngineRatesTest
[PASS] testEngine() (gas: 27767224)
Test result: ok. 1 passed; 0 failed; 0 skipped; finished in 24.62s

Running 1 test for tests/ProtocolV3TestBase.t.sol:ProtocolV3TestE2ETestAll
[PASS] test_e2e() (gas: 12055804)
Logs:
  E2E: Collateral LINK, TestAsset DAI
  SUPPLY: LINK, Amount: 1616553507921112188813
  SUPPLY: DAI, Amount: 100002834080317836207
  WITHDRAW: DAI, Amount: 50001417040158918103
  WITHDRAW: DAI, Amount: 50001417040158918104
  BORROW: DAI, Amount 100002834080317836207, Stable: false
  REPAY: DAI, Amount: 100002834080317836207
  BORROW: DAI, Amount 100002834080317836207, Stable: true
  REPAY: DAI, Amount: 100002834080317836207
  E2E: Collateral LINK, TestAsset LINK
  SUPPLY: LINK, Amount: 1616553507921112188813
  SUPPLY: LINK, Amount: 16165535079211121888
  WITHDRAW: LINK, Amount: 8082767539605560944
  WITHDRAW: LINK, Amount: 8082767539605560944
  BORROW: LINK, Amount 16165535079211121888, Stable: false
  REPAY: LINK, Amount: 16165535079211121888
  E2E: Collateral LINK, TestAsset USDC
  SUPPLY: LINK, Amount: 1616553507921112188813
  SUPPLY: USDC, Amount: 100000000
  WITHDRAW: USDC, Amount: 50000000
  WITHDRAW: USDC, Amount: 50000000
  BORROW: USDC, Amount 100000000, Stable: false
  REPAY: USDC, Amount: 100000000
  BORROW: USDC, Amount 100000000, Stable: true
  REPAY: USDC, Amount: 100000000
  E2E: Collateral LINK, TestAsset WBTC
  SUPPLY: LINK, Amount: 1616553507921112188813
  SUPPLY: WBTC, Amount: 385965
  WITHDRAW: WBTC, Amount: 192982
  WITHDRAW: WBTC, Amount: 192983
  BORROW: WBTC, Amount 385965, Stable: false
  REPAY: WBTC, Amount: 385965
  E2E: Collateral LINK, TestAsset WETH
  SUPPLY: LINK, Amount: 1616553507921112188813
  SUPPLY: WETH, Amount: 54558945484701671
  WITHDRAW: WETH, Amount: 27279472742350835
  WITHDRAW: WETH, Amount: 27279472742350836
  BORROW: WETH, Amount 54558945484701671, Stable: false
  REPAY: WETH, Amount: 54558945484701671
  E2E: Collateral LINK, TestAsset USDT
  SUPPLY: LINK, Amount: 1616553507921112188813
  SUPPLY: USDT, Amount: 99994515
  WITHDRAW: USDT, Amount: 49997257
  WITHDRAW: USDT, Amount: 49997258
  BORROW: USDT, Amount 99994515, Stable: false
  REPAY: USDT, Amount: 99994515
  BORROW: USDT, Amount 99994515, Stable: true
  REPAY: USDT, Amount: 99994515
  E2E: Collateral LINK, TestAsset AAVE
  Skip: AAVE, supply cap fully utilized
  E2E: Collateral LINK, TestAsset sUSD
  SUPPLY: LINK, Amount: 1616553507921112188813
  SUPPLY: sUSD, Amount: 100213932694959892580
  WITHDRAW: sUSD, Amount: 50106966347479946290
  WITHDRAW: sUSD, Amount: 50106966347479946291
  BORROW: sUSD, Amount 100213932694959892580, Stable: false
  REPAY: sUSD, Amount: 100213932694959892580
  E2E: Collateral LINK, TestAsset OP
  SUPPLY: LINK, Amount: 1616553507921112188813
  SUPPLY: OP, Amount: 65659881812212738017
  WITHDRAW: OP, Amount: 32829940906106369008
  WITHDRAW: OP, Amount: 32829940906106369009
  E2E: Collateral LINK, TestAsset wstETH
  SUPPLY: LINK, Amount: 1616553507921112188813
  SUPPLY: wstETH, Amount: 48438229171421992
  WITHDRAW: wstETH, Amount: 24219114585710996
  WITHDRAW: wstETH, Amount: 24219114585710996
  BORROW: wstETH, Amount 48438229171421992, Stable: false
  REPAY: wstETH, Amount: 48438229171421992
  E2E: Collateral LINK, TestAsset LUSD
  SUPPLY: LINK, Amount: 1616553507921112188813
  SUPPLY: LUSD, Amount: 99436925482654158084
  WITHDRAW: LUSD, Amount: 49718462741327079042
  WITHDRAW: LUSD, Amount: 49718462741327079042
  BORROW: LUSD, Amount 99436925482654158084, Stable: false
  REPAY: LUSD, Amount: 99436925482654158084
  E2E: TestAsset MAI SKIPPED

Test result: ok. 1 passed; 0 failed; 0 skipped; finished in 45.61s

Running 1 test for tests/AaveV3ConfigEngineGauntletProposal.t.sol:AaveV3OptimismConfigEngineRatesTest
[PASS] testEngine() (gas: 20609027)
Test result: ok. 1 passed; 0 failed; 0 skipped; finished in 33.42s

Running 1 test for tests/AaveV3ConfigEngineGauntletProposal.t.sol:AaveV3PolygonConfigEngineRatesTest
[PASS] testEngine() (gas: 71053800)
Test result: ok. 1 passed; 0 failed; 0 skipped; finished in 64.76s

Running 1 test for tests/ProtocolV3TestBase.t.sol:ProtocolV3TestE2ETestAllMainnet
[PASS] test_e2e() (gas: 21991791)
Logs:
  E2E: Collateral WETH, TestAsset WETH
  SUPPLY: WETH, Amount: 6058639095884313146
  SUPPLY: WETH, Amount: 60586390958843131
  WITHDRAW: WETH, Amount: 30293195479421565
  WITHDRAW: WETH, Amount: 30293195479421566
  BORROW: WETH, Amount 60586390958843131, Stable: false
  REPAY: WETH, Amount: 60586390958843131
  E2E: Collateral WETH, TestAsset wstETH
  SUPPLY: WETH, Amount: 6058639095884313146
  SUPPLY: wstETH, Amount: 53280673161492371
  WITHDRAW: wstETH, Amount: 26640336580746185
  WITHDRAW: wstETH, Amount: 26640336580746186
  BORROW: wstETH, Amount 53280673161492371, Stable: false
  REPAY: wstETH, Amount: 53280673161492371
  E2E: Collateral WETH, TestAsset WBTC
  SUPPLY: WETH, Amount: 6058639095884313146
  SUPPLY: WBTC, Amount: 383041
  WITHDRAW: WBTC, Amount: 191520
  WITHDRAW: WBTC, Amount: 191521
  BORROW: WBTC, Amount 383041, Stable: false
  REPAY: WBTC, Amount: 383041
  E2E: Collateral WETH, TestAsset USDC
  SUPPLY: WETH, Amount: 6058639095884313146
  SUPPLY: USDC, Amount: 99997805
  WITHDRAW: USDC, Amount: 49998902
  WITHDRAW: USDC, Amount: 49998903
  BORROW: USDC, Amount 99997805, Stable: false
  REPAY: USDC, Amount: 99997805
  E2E: Collateral WETH, TestAsset DAI
  SUPPLY: WETH, Amount: 6058639095884313146
  SUPPLY: DAI, Amount: 100010001000100010001
  WITHDRAW: DAI, Amount: 50005000500050005000
  WITHDRAW: DAI, Amount: 50005000500050005000
  BORROW: DAI, Amount 100010001000100010001, Stable: false
  REPAY: DAI, Amount: 100010001000100010001
  E2E: Collateral WETH, TestAsset LINK
  SUPPLY: WETH, Amount: 6058639095884313146
  SUPPLY: LINK, Amount: 16762478423086336626
  WITHDRAW: LINK, Amount: 8381239211543168313
  WITHDRAW: LINK, Amount: 8381239211543168314
  BORROW: LINK, Amount 16762478423086336626, Stable: false
  REPAY: LINK, Amount: 16762478423086336626
  E2E: Collateral WETH, TestAsset AAVE
  SUPPLY: WETH, Amount: 6058639095884313146
  SUPPLY: AAVE, Amount: 1779312582127864301
  WITHDRAW: AAVE, Amount: 889656291063932150
  WITHDRAW: AAVE, Amount: 889656291063932151
  E2E: Collateral WETH, TestAsset cbETH
  SUPPLY: WETH, Amount: 6058639095884313146
  SUPPLY: cbETH, Amount: 57866658031368797
  WITHDRAW: cbETH, Amount: 28933329015684398
  WITHDRAW: cbETH, Amount: 28933329015684400
  BORROW: cbETH, Amount 57866658031368797, Stable: false
  REPAY: cbETH, Amount: 57866658031368797
  E2E: Collateral WETH, TestAsset USDT
  SUPPLY: WETH, Amount: 6058639095884313146
  SUPPLY: USDT, Amount: 100057032
  WITHDRAW: USDT, Amount: 50028516
  WITHDRAW: USDT, Amount: 50028516
  BORROW: USDT, Amount 100057032, Stable: false
  REPAY: USDT, Amount: 100057032
  E2E: Collateral WETH, TestAsset rETH
  SUPPLY: WETH, Amount: 6058639095884313146
  SUPPLY: rETH, Amount: 56019957636630099
  WITHDRAW: rETH, Amount: 28009978818315049
  WITHDRAW: rETH, Amount: 28009978818315049
  BORROW: rETH, Amount 56019957636630099, Stable: false
  REPAY: rETH, Amount: 56019957636630099
  E2E: Collateral WETH, TestAsset LUSD
  SUPPLY: WETH, Amount: 6058639095884313146
  SUPPLY: LUSD, Amount: 100115968330756248192
  WITHDRAW: LUSD, Amount: 50057984165378124096
  WITHDRAW: LUSD, Amount: 50057984165378124096
  BORROW: LUSD, Amount 100115968330756248192, Stable: false
  REPAY: LUSD, Amount: 100115968330756248192
  E2E: Collateral WETH, TestAsset CRV
  SUPPLY: WETH, Amount: 6058639095884313146
  SUPPLY: CRV, Amount: 223005138752013290392
  WITHDRAW: CRV, Amount: 111502569376006645196
  WITHDRAW: CRV, Amount: 111502569376006645196
  E2E: Collateral WETH, TestAsset MKR
  SUPPLY: WETH, Amount: 6058639095884313146
  SUPPLY: MKR, Amount: 98727441294737554
  WITHDRAW: MKR, Amount: 49363720647368777
  WITHDRAW: MKR, Amount: 49363720647368777
  BORROW: MKR, Amount 98727441294737554, Stable: false
  REPAY: MKR, Amount: 98727441294737554
  E2E: Collateral WETH, TestAsset SNX
  SUPPLY: WETH, Amount: 6058639095884313146
  SUPPLY: SNX, Amount: 48449612403100775193
  WITHDRAW: SNX, Amount: 24224806201550387596
  WITHDRAW: SNX, Amount: 24224806201550387597
  BORROW: SNX, Amount 48449612403100775193, Stable: false
  REPAY: SNX, Amount: 48449612403100775193
  E2E: Collateral WETH, TestAsset BAL
  SUPPLY: WETH, Amount: 6058639095884313146
  SUPPLY: BAL, Amount: 29102153909197170579
  WITHDRAW: BAL, Amount: 14551076954598585289
  WITHDRAW: BAL, Amount: 14551076954598585290
  BORROW: BAL, Amount 29102153909197170579, Stable: false
  REPAY: BAL, Amount: 29102153909197170579
  E2E: Collateral WETH, TestAsset UNI
  SUPPLY: WETH, Amount: 6058639095884313146
  SUPPLY: UNI, Amount: 21784934158663696976
  WITHDRAW: UNI, Amount: 10892467079331848488
  WITHDRAW: UNI, Amount: 10892467079331848487
  BORROW: UNI, Amount 21784934158663696976, Stable: false
  REPAY: UNI, Amount: 21784934158663696976
  E2E: Collateral WETH, TestAsset LDO
  SUPPLY: WETH, Amount: 6058639095884313146
  SUPPLY: LDO, Amount: 63030843796742294959
  WITHDRAW: LDO, Amount: 31515421898371147479
  WITHDRAW: LDO, Amount: 31515421898371147480
  BORROW: LDO, Amount 63030843796742294959, Stable: false
  REPAY: LDO, Amount: 63030843796742294959
  E2E: Collateral WETH, TestAsset ENS
  SUPPLY: WETH, Amount: 6058639095884313146
  SUPPLY: ENS, Amount: 12437764195368907456
  WITHDRAW: ENS, Amount: 6218882097684453728
  WITHDRAW: ENS, Amount: 6218882097684453729
  BORROW: ENS, Amount 12437764195368907456, Stable: false
  REPAY: ENS, Amount: 12437764195368907456
  E2E: Collateral WETH, TestAsset 1INCH
  SUPPLY: WETH, Amount: 6058639095884313146
  SUPPLY: 1INCH, Amount: 410278510592180821883
  WITHDRAW: 1INCH, Amount: 205139255296090410941
  WITHDRAW: 1INCH, Amount: 205139255296090410942
  BORROW: 1INCH, Amount 410278510592180821883, Stable: false
  REPAY: 1INCH, Amount: 410278510592180821883
  E2E: Collateral WETH, TestAsset FRAX
  SUPPLY: WETH, Amount: 6058639095884313146
  SUPPLY: FRAX, Amount: 100168997118418426095
  WITHDRAW: FRAX, Amount: 50084498559209213047
  WITHDRAW: FRAX, Amount: 50084498559209213049
  BORROW: FRAX, Amount 100168997118418426095, Stable: false
  REPAY: FRAX, Amount: 100168997118418426095
  E2E: TestAsset GHO SKIPPED
  E2E: Collateral WETH, TestAsset RPL
  SUPPLY: WETH, Amount: 6058639095884313146
  SUPPLY: RPL, Amount: 4169283941609818799
  WITHDRAW: RPL, Amount: 2084641970804909399
  WITHDRAW: RPL, Amount: 2084641970804909401
  BORROW: RPL, Amount 4169283941609818799, Stable: false
  REPAY: RPL, Amount: 4169283941609818799

Test result: ok. 1 passed; 0 failed; 0 skipped; finished in 83.84s

Running 2 tests for tests/ProtocolV3TestBase.t.sol:ProtocolV3TestE2ETestAsset
[PASS] test_e2eTestAssetMAI() (gas: 1668001)
Logs:
  E2E: Collateral DAI, TestAsset MAI
  SUPPLY: DAI, Amount: 10000000000000000000000
  SUPPLY: MAI, Amount: 100855007402202840780
  WITHDRAW: MAI, Amount: 50427503701101420390
  WITHDRAW: MAI, Amount: 50427503701101420389
  BORROW: MAI, Amount 100855007402202840780, Stable: false
  REPAY: MAI, Amount: 100855007402202840780

[PASS] test_e2eTestAssetUSDC() (gas: 2060985)
Logs:
  E2E: Collateral DAI, TestAsset USDC
  SUPPLY: DAI, Amount: 10000000000000000000000
  SUPPLY: USDC, Amount: 100000866
  WITHDRAW: USDC, Amount: 50000433
  WITHDRAW: USDC, Amount: 50000433
  BORROW: USDC, Amount 100000866, Stable: false
  REPAY: USDC, Amount: 100000866
  BORROW: USDC, Amount 100000866, Stable: true
  REPAY: USDC, Amount: 100000866

Test result: ok. 2 passed; 0 failed; 0 skipped; finished in 22.91s

Running 1 test for tests/ProtocolV3TestBase.t.sol:ProtocolV3TestE2ETestSnapshot
[PASS] test_snapshot() (gas: 4686931)
Test result: ok. 1 passed; 0 failed; 0 skipped; finished in 9.31s

Running 2 tests for tests/ProxyHelpersTest.t.sol:ProxyHelpersTest
[PASS] testAdmin() (gas: 3274)
[PASS] testImplementation() (gas: 3241)
Test result: ok. 2 passed; 0 failed; 0 skipped; finished in 803.62ms

Running 2 tests for tests/V2RateStrategyFactory.t.sol:V2RateStrategyFactoryTest
[PASS] testCreateStrategies() (gas: 847468)
[PASS] testMultipleCreateStrategies() (gas: 847233)
Test result: ok. 2 passed; 0 failed; 0 skipped; finished in 2.57s

Running 2 tests for tests/V3RateStrategyFactory.t.sol:V3RateStrategyFactoryTest
[PASS] testCreateStrategies() (gas: 714607)
[PASS] testMultipleCreateStrategies() (gas: 714587)
Test result: ok. 2 passed; 0 failed; 0 skipped; finished in 795.90ms

Running 3 tests for tests/crosschainforwarders/ArbitrumCrossChainForwarderTest.t.sol:ArbitrumCrossChainForwarderTest
[PASS] testHasSufficientGas() (gas: 24011)
[PASS] testProposalE2E() (gas: 1120247)
[PASS] testgetGetMaxSubmissionCost() (gas: 17182)
Test result: ok. 3 passed; 0 failed; 0 skipped; finished in 8.05s

Running 9 tests for tests/riskstewards/CapsPlusRiskSteward.t.sol:CapsPlusRiskSteward_Test
[PASS] test_debounce() (gas: 129229)
[PASS] test_increaseCapsMax() (gas: 114995)
[PASS] test_invalidCaller() (gas: 7525)
[PASS] test_keepCurrent() (gas: 48166)
[PASS] test_unlisted() (gas: 32844)
[PASS] test_updateBorrowCapBiggerMax() (gas: 37168)
[PASS] test_updateBorrowCapNotStrictlyHigher() (gas: 45939)
[PASS] test_updateSupplyCapBiggerMax() (gas: 36946)
[PASS] test_updateSupplyCapNotStrictlyHigher() (gas: 45514)
Test result: ok. 9 passed; 0 failed; 0 skipped; finished in 2.52s

Running 1 test for src/swaps/DepositV2SwapPayloadTest.t.sol:DepositV2SwapPayloadTest
[PASS] test_successful() (gas: 496066)
Test result: ok. 1 passed; 0 failed; 0 skipped; finished in 3.47s

Running 15 tests for tests/AaveV3ConfigEngineTest.t.sol:AaveV3ConfigEngineTest
[PASS] testArbitrumRateStrategiesUpdates() (gas: 22041972)
[PASS] testAvaxRateStrategiesUpdates() (gas: 31937630)
[PASS] testBorrowsUpdates() (gas: 73250031)
[PASS] testCapsUpdates() (gas: 28929325)
[PASS] testCollateralUpdateCorrectBonus() (gas: 31852710)
[PASS] testCollateralUpdateWrongBonus() (gas: 4952599)
[PASS] testCollateralsUpdates() (gas: 30379868)
[PASS] testCollateralsUpdatesNoChange() (gas: 30356036)
[PASS] testFailCollateralsUpdatesNoChange() (gas: 5610991)
[PASS] testListings() (gas: 93285803)
[PASS] testListingsCustom() (gas: 33176687)
[PASS] testOptimismRateStrategiesUpdates() (gas: 24847409)
[PASS] testPolygonRateStrategiesUpdates() (gas: 75284207)
[PASS] testPriceFeedsUpdates() (gas: 73195333)
[PASS] testRateStrategiesUpdates() (gas: 33334803)
Test result: ok. 15 passed; 0 failed; 0 skipped; finished in 238.45s
Ran 34 test suites: 81 tests passed, 0 failed, 0 skipped (81 total tests)

Please sign in to comment.