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

Feature/rd 1193 add openzeppelin foundry upgrades to the repo #51

Open
wants to merge 15 commits into
base: develop
Choose a base branch
from

Conversation

xavikh
Copy link
Contributor

@xavikh xavikh commented Feb 10, 2025

No description provided.

@@ -382,12 +383,12 @@ contract GaugesDaoFactoryTest is Test {

TokenParameters[] memory tokenParameters = new TokenParameters[](2);
tokenParameters[0] = TokenParameters({
token: address(deployMockERC20("T1", "T1", 18)),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

deployMockERC20 was deprecated on the new version of forge-std

@@ -29,6 +29,7 @@ contract Clock is IClock, DaoAuthorizable, UUPSUpgradeable {
Initialization
//////////////////////////////////////////////////////////////*/

/// @custom:oz-upgrades-unsafe-allow constructor
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This annotation is needed in all the contracts with a constructor (also in the old ones)

@xavikh xavikh force-pushed the feature/rd-1193-add-openzeppelin-foundry-upgrades-to-the-repo branch from dd64db6 to de71bbc Compare February 10, 2025 19:18
@xavikh xavikh force-pushed the feature/rd-1193-add-openzeppelin-foundry-upgrades-to-the-repo branch from 7cf5a12 to dc6fbf8 Compare February 10, 2025 20:20
@xavikh xavikh force-pushed the feature/rd-1193-add-openzeppelin-foundry-upgrades-to-the-repo branch from e707746 to 70c3555 Compare February 12, 2025 03:07
"test-unit": "forge test --no-match-path \"{test/fork/*.sol,test/upgrades/*.sol}\" -vvv",
"test-fork": "forge test --match-path \"test/fork/**/*.sol\" --rpc-url https://sepolia.drpc.org -vvv",
"test-upgrades": "forge test --build-info --match-path \"test/upgrades/**/*.sol\" -vvv",
"test": "forge test -vvv"
Copy link
Collaborator

Choose a reason for hiding this comment

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

these should be added to the makefile or we replace the makefile

Copy link
Contributor Author

Choose a reason for hiding this comment

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

100%, better all together. And make is easier to use in CI

@@ -2,6 +2,7 @@
pragma solidity ^0.8.17;

import "forge-std/Test.sol";
import {MockERC20} from "@solmate/test/utils/mocks/MockERC20.sol";
Copy link
Collaborator

Choose a reason for hiding this comment

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

why are we using the solmate erc20?:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Forge-std deprecated the ERC20Mock

import {Upgrades} from "openzeppelin-foundry-upgrades/LegacyUpgrades.sol";
import {Options} from "openzeppelin-foundry-upgrades/Options.sol";

contract TestUpgrades is AragonTest {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I see this relies on the git submodules approach. Are we sure we want to go down this route?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This test can be changed to not use submodules pretty easily. But without them we lose the ability to test the full deployment and upgrade (using the factory)

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