Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add Foundry initial test environment mocks #289

Merged
merged 27 commits into from
May 10, 2023

Conversation

kartojal
Copy link
Contributor

  • Initial test environment setup in Foundry
  • Add Pool mock for Gho AToken and Gho Variable Debt Token

@height
Copy link

height bot commented Feb 14, 2023

Link Height tasks by mentioning a task ID in the pull request title or commit messages, or description and comments with the keyword link (e.g. "Link T-123").

💡Tip: You can also use "Close T-X" to automatically close a task when the pull request is merged.

remappings.txt Outdated
@@ -0,0 +1,7 @@
@aave/=node_modules/@aave/
Copy link
Contributor

@miguelmtzinf miguelmtzinf Feb 15, 2023

Choose a reason for hiding this comment

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

All this data is duplicated (also in the toml)

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IStkAave {
Copy link
Contributor

Choose a reason for hiding this comment

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

This interface seems already imported in the safety-module dependency. Can we fetch it from there?

Copy link
Contributor Author

@kartojal kartojal Feb 20, 2023

Choose a reason for hiding this comment

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

needed to re-write due the solidity version of Satefy module is 6 or 7, so is not compatible if the test suite runs on Solidity 8

kartojal and others added 12 commits February 20, 2023 14:57
* fix: remove discount lock period from GhoDebtToken

* test: Update tests for new rebalance behaviour
* fix: Remove Facilitator struct from addFacilitator function

* test: Adjusts test for new addFacilitator parameters

* fix: Make facilitatorLabel calldata-like parameter
* setup modifier

* setup gho manager and tests

* remove atoken changes

* use interfaces

* adds test for ghomanager as pooladmin
import {TestnetERC20} from '@aave/periphery-v3/contracts/mocks/testnet-helpers/TestnetERC20.sol';

contract TestEnv is Test {
address faucet = 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266;
Copy link
Contributor

Choose a reason for hiding this comment

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

where are these addresses coming from?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The addresses are from the default mnemonic test test ... test junk from anvil Foundry node.

Copy link
Contributor

@Zer0dot Zer0dot left a comment

Choose a reason for hiding this comment

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

LGTM, I think it's a good start, and with the PRs building atop it, we should merge this to consolidate all our work so far.

@miguelmtzinf miguelmtzinf merged commit 639031f into main May 10, 2023
@miguelmtzinf miguelmtzinf deleted the chore/foundry-test-suite branch May 10, 2023 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants