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

Add basic dev test setup #59

Merged
merged 2 commits into from
Jan 22, 2024
Merged

Add basic dev test setup #59

merged 2 commits into from
Jan 22, 2024

Conversation

RickGriff
Copy link
Collaborator

@RickGriff RickGriff commented Jan 19, 2024

Add a basic dev environment test setup - deploying and connecting core contracts, using a testnet PriceFeed - to allow testing in Solidity with Foundry.

@RickGriff RickGriff requested a review from bingen January 19, 2024 14:08
Copy link
Collaborator

@bingen bingen left a comment

Choose a reason for hiding this comment

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

Looking good, thanks!!
I left some minor comments inline.
One more generic one, related to the deployment testing, I think we should look into this:
https://github.com/ChainSecurity/deployment_validation
(Do you remember? We watch the presentation about it in Paris)

pragma solidity 0.8.18;

interface IGasPool {
// empty
Copy link
Collaborator

Choose a reason for hiding this comment

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

Curious: why is this needed?

Copy link
Collaborator Author

@RickGriff RickGriff Jan 20, 2024

Choose a reason for hiding this comment

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

Hmm that was to be consistent with declaring interfaces in BaseTest then deploying in DevTestSetup. I've changed this so we just declare the contract GasPool in BaseTest rather than the interface (and deleted the interface). An empty interface is awkward.


// Active Pool

function testActivePoolHasCorrectActivePoolAddress() public {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I guess the 2nd one should be Stability instead of Active


// Sorted Troves

function testSortedTrovesHasCorrectTroveManagerAddress() public {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Name is mixed with the test below

@RickGriff
Copy link
Collaborator Author

RickGriff commented Jan 20, 2024

Definitely, I like the idea of deployment validation. It's another layer of security assurance for users, and will be a good fit for Bold since the system won't be upgradeable. Assuming we use ChainSecurity for an audit we can discuss it with them.

@RickGriff RickGriff merged commit b63e854 into main Jan 22, 2024
2 of 4 checks passed
@danielattilasimon danielattilasimon deleted the test_setup branch April 12, 2024 06:15
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.

2 participants