From 495b62edd366eba9a73bbd0e4a4bfbe9c393c0f3 Mon Sep 17 00:00:00 2001 From: gs8nrv <55771972+GuillaumeNervoXS@users.noreply.github.com> Date: Tue, 16 Jul 2024 10:27:06 +0200 Subject: [PATCH] fix: compilation --- lib/utils | 2 +- test/invariant/DelegationInvariants.t.sol | 5 ++--- test/invariant/MainnetGovernorInvariants.t.sol | 2 +- test/invariant/actors/Proposer.t.sol | 4 ++-- test/unit/SimulationSetup.t.sol | 5 ++++- 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/lib/utils b/lib/utils index 68f85f5..e64751f 160000 --- a/lib/utils +++ b/lib/utils @@ -1 +1 @@ -Subproject commit 68f85f572e730690e9ed0bd056eafcc6f85641f0 +Subproject commit e64751fc263a2f3a7f52563da3c010a13195cb6b diff --git a/test/invariant/DelegationInvariants.t.sol b/test/invariant/DelegationInvariants.t.sol index ea9c33c..73b259b 100644 --- a/test/invariant/DelegationInvariants.t.sol +++ b/test/invariant/DelegationInvariants.t.sol @@ -26,7 +26,7 @@ contract DelegationInvariants is Fixture { _paramHandler = new Param(_NUM_PARAMS, ANGLE); // Label newly created addresses - for (uint256 i; i < _NUM_DELEGATORS; i++) { + for (uint256 i; i < _NUM_DELEGATORS; i++) vm.label(_delegatorHandler.actors(i), string.concat("Delegator ", Strings.toString(i))); vm.label({ account: address(_paramHandler), newLabel: "Param" }); @@ -85,9 +85,8 @@ contract DelegationInvariants is Fixture { for (uint256 i; i < _NUM_DELEGATORS; i++) { address actor = _delegatorHandler.actors(i); address delegatee = _delegatorHandler.delegations(actor); - if (delegatee != address(0) && delegatee != actor) { + if (delegatee != address(0) && delegatee != actor) assertEq(token.getVotes(actor), 0, "Delegator should have null vote"); - } } } diff --git a/test/invariant/MainnetGovernorInvariants.t.sol b/test/invariant/MainnetGovernorInvariants.t.sol index 197dd0b..142e716 100644 --- a/test/invariant/MainnetGovernorInvariants.t.sol +++ b/test/invariant/MainnetGovernorInvariants.t.sol @@ -10,7 +10,7 @@ import { Proposer } from "./actors/Proposer.t.sol"; import { BadVoter } from "./actors/BadVoter.t.sol"; import { Fixture, AngleGovernor } from "../Fixture.t.sol"; import { ProposalStore, Proposal } from "./stores/ProposalStore.sol"; -import { IGovernor } from "oz/governance/IGovernor.sol"; +import { IGovernor } from "oz-v5/governance/IGovernor.sol"; //solhint-disable import { console } from "forge-std/console.sol"; diff --git a/test/invariant/actors/Proposer.t.sol b/test/invariant/actors/Proposer.t.sol index 9cc9b13..80a1bb4 100644 --- a/test/invariant/actors/Proposer.t.sol +++ b/test/invariant/actors/Proposer.t.sol @@ -3,9 +3,9 @@ pragma solidity ^0.8.19; import { BaseActor, IERC20, IERC20Metadata, AngleGovernor, TestStorage } from "./BaseActor.t.sol"; import { console } from "forge-std/console.sol"; -import { IGovernor } from "oz/governance/IGovernor.sol"; +import { IGovernor } from "oz-v5/governance/IGovernor.sol"; import { ProposalStore, Proposal } from "../stores/ProposalStore.sol"; -import { IERC5805 } from "oz/interfaces/IERC5805.sol"; +import { IERC5805 } from "oz-v5/interfaces/IERC5805.sol"; contract Proposer is BaseActor { AngleGovernor internal _angleGovernor; diff --git a/test/unit/SimulationSetup.t.sol b/test/unit/SimulationSetup.t.sol index 9c0f24c..6926226 100644 --- a/test/unit/SimulationSetup.t.sol +++ b/test/unit/SimulationSetup.t.sol @@ -51,7 +51,10 @@ contract SimulationSetup is Test, CommonUtils { mapChainIds[10] = "OPTIMISM"; setUpForks(); - // TODO Complete with all deployed chains + if (vm.envExists("ETH_NODE_URI_FORK")) { + chainFork = vm.createFork(vm.envString("ETH_NODE_URI_FORK")); + forkIdentifier[CHAIN_FORK] = chainFork; + } veANGLEDelegation = new VeANGLEVotingDelegation(address(veANGLE), "veANGLE Delegation", "1");