diff --git a/Makefile b/Makefile index c7a52ab..3a429d9 100644 --- a/Makefile +++ b/Makefile @@ -33,6 +33,10 @@ ft-mode-sepolia-fork-110 :; forge test --match-contract TestE2EV1_1_0 \ --rpc-url https://sepolia.mode.network \ -vvvvv +ft-mode-sepolia-fork-120 :; forge test --match-contract TestE2EV1_2_0 \ + --rpc-url https://sepolia.mode.network \ + -vvvvv + # Fork testing - mode mainnet ft-mode-fork-100 :; forge test --match-contract TestE2E \ --rpc-url https://mainnet.mode.network/ \ @@ -41,7 +45,23 @@ ft-mode-fork-100 :; forge test --match-contract TestE2E \ ft-mode-fork-110 :; forge test --match-contract TestE2EV1_1_0 \ --rpc-url https://mainnet.mode.network/ \ -vvvvv - + +ft-mode-fork-120 :; forge test --match-contract TestE2EV1_2_0 \ + --rpc-url https://mainnet.mode.network/ \ + -vvvvv + +# Fork testing - sepolia +ft-sepolia-fork-100 :; forge test --match-contract TestE2E \ + --rpc-url $(RPC_URL) \ + -vvvvv + +ft-sepolia-fork-110 :; forge test --match-contract TestE2EV1_1_0 \ + --rpc-url $(RPC_URL) \ + -vvvvv + +ft-sepolia-fork-120 :; forge test --match-contract TestE2EV1_2_0 \ + --rpc-url $(RPC_URL) \ + -vvvvv ## Upgrade testing ft-mode-upgrade-fork :; forge test --match-contract UpgradeModeTo110 \ diff --git a/test/v1_2_0/fork/e2e.t.sol b/test/v1_2_0/fork/e2e.t.sol index 0b583e4..1d54bc2 100644 --- a/test/v1_2_0/fork/e2e.t.sol +++ b/test/v1_2_0/fork/e2e.t.sol @@ -9,7 +9,7 @@ import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import {DAO} from "@aragon/osx/core/dao/DAO.sol"; import {Multisig, MultisigSetup} from "@aragon/multisig/MultisigSetup.sol"; import {UUPSUpgradeable as UUPS} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; -import {VotingEscrow, Clock, Lock, QuadraticIncreasingEscrow, ExitQueue, SimpleGaugeVoter, SimpleGaugeVoterSetup, ISimpleGaugeVoterSetupParams, IWithdrawalQueueErrors, IGaugeVote, IEscrowCurveTokenStorage, GaugesDaoFactory, GaugePluginSet, Deployment, DeployGauges, DeploymentParameters} from "../versions.sol"; +import {VotingEscrow, Clock, Lock, QuadraticIncreasingEscrow, ExitQueue, SimpleGaugeVoter, SimpleGaugeVoterSetup, ISimpleGaugeVoterSetupParams, IWithdrawalQueueErrors, IGaugeVote, IEscrowCurveTokenStorage, GaugesDaoFactory, GaugePluginSet, Deployment, DeploymentParameters, DeployGauges} from "../versions.sol"; interface IERC20Mint is IERC20 { function mint(address _to, uint256 _amount) external; @@ -43,7 +43,7 @@ contract MultisigReceiver is GhettoMultisig { * 4. A more robust suite for admininstration of the contracts * 5. Ability to connect to an existing deployment and test on the real network */ -contract TestE2E is AragonTest, IWithdrawalQueueErrors, IGaugeVote, IEscrowCurveTokenStorage { +contract TestE2EV1_2_0 is AragonTest, IWithdrawalQueueErrors, IGaugeVote, IEscrowCurveTokenStorage { error VotingInactive(); error OnlyEscrow(); error GaugeDoesNotExist(address _pool); @@ -1394,7 +1394,6 @@ contract TestE2E is AragonTest, IWithdrawalQueueErrors, IGaugeVote, IEscrowCurve assertEq(1, clock.currentSeasonIndex(), "SeasonIndex should be 1"); - assertEq(escrow.votingPower(1), depositAlice0, "Alice should have voting power"); assertTrue(curve.isWarm(1), "Alice should be warm"); @@ -1405,12 +1404,12 @@ contract TestE2E is AragonTest, IWithdrawalQueueErrors, IGaugeVote, IEscrowCurve //_startNewSeason(); // fast forward to the checkpoint interval carol is warm - goToEpochStartPlus(clock.checkpointInterval() + 2 days); + goToEpochStartPlus(clock.checkpointInterval() + 3 days - 1); assertEq(escrow.votingPower(1), 260932937932153600000, "Alice vp should have more voting power"); - assertEq(escrow.votingPower(2), 260932937932153600000, "Carol vp should have more voting power"); assertTrue(curve.isWarm(2), "Carol should be warm"); + assertEq(escrow.votingPower(2), 260932937932153600000, "Carol vp should have more voting power"); // start a withdrawal that finish before the new season vm.startPrank(alice); @@ -1420,8 +1419,6 @@ contract TestE2E is AragonTest, IWithdrawalQueueErrors, IGaugeVote, IEscrowCurve } vm.stopPrank(); - assertEq(escrow.votingPower(1), 260932937932153600000, "Alice vp should still be not zero"); - goToEpochStartPlus(clock.checkpointInterval() * 2); assertEq(escrow.votingPower(1), 0, "Alice should have no voting power");