Skip to content

Commit

Permalink
fix: Add Governance owner as constructor param
Browse files Browse the repository at this point in the history
  • Loading branch information
bingen committed Nov 8, 2024
1 parent 9a645d2 commit 1bb2b28
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 2 deletions.
1 change: 1 addition & 0 deletions script/DeploySepolia.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ contract DeploySepoliaScript is Script, Deployers {
epochDuration: EPOCH_DURATION,
epochVotingCutoff: EPOCH_VOTING_CUTOFF
}),
deployer,
initialInitiatives
);
assert(governance == uniV4Donations.governance());
Expand Down
3 changes: 2 additions & 1 deletion src/Governance.sol
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,9 @@ contract Governance is Multicall, UserProxyFactory, ReentrancyGuard, Ownable, IG
address _stakingV1,
address _bold,
Configuration memory _config,
address _owner,
address[] memory _initiatives
) UserProxyFactory(_lqty, _lusd, _stakingV1) Ownable(msg.sender) {
) UserProxyFactory(_lqty, _lusd, _stakingV1) Ownable(_owner) {
stakingV1 = ILQTYStaking(_stakingV1);
lqty = IERC20(_lqty);
bold = IERC20(_bold);
Expand Down
1 change: 1 addition & 0 deletions test/BribeInitiative.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ contract BribeInitiativeTest is Test {
epochDuration: EPOCH_DURATION,
epochVotingCutoff: EPOCH_VOTING_CUTOFF
}),
address(this),
initialInitiatives
);

Expand Down
1 change: 1 addition & 0 deletions test/CurveV2GaugeRewards.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ contract CurveV2GaugeRewardsTest is Test {
epochDuration: EPOCH_DURATION,
epochVotingCutoff: EPOCH_VOTING_CUTOFF
}),
address(this),
initialInitiatives
);

Expand Down
1 change: 1 addition & 0 deletions test/E2E.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ contract E2ETests is Test {
epochDuration: EPOCH_DURATION,
epochVotingCutoff: EPOCH_VOTING_CUTOFF
}),
address(this),
initialInitiatives
);
}
Expand Down
18 changes: 17 additions & 1 deletion test/Governance.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ contract GovernanceInternal is Governance {
address _bold,
Configuration memory _config,
address[] memory _initiatives
) Governance(_lqty, _lusd, _stakingV1, _bold, _config, _initiatives) {}
) Governance(_lqty, _lusd, _stakingV1, _bold, _config, msg.sender, _initiatives) {}

function averageAge(uint32 _currentTimestamp, uint32 _averageTimestamp) external pure returns (uint32) {
return _averageAge(_currentTimestamp, _averageTimestamp);
Expand Down Expand Up @@ -119,6 +119,7 @@ contract GovernanceTest is Test {
epochDuration: EPOCH_DURATION,
epochVotingCutoff: EPOCH_VOTING_CUTOFF
}),
address(this),
initialInitiatives
);

Expand Down Expand Up @@ -407,6 +408,7 @@ contract GovernanceTest is Test {
epochDuration: EPOCH_DURATION,
epochVotingCutoff: EPOCH_VOTING_CUTOFF
}),
address(this),
initialInitiatives
);

Expand Down Expand Up @@ -449,6 +451,7 @@ contract GovernanceTest is Test {
epochDuration: EPOCH_DURATION,
epochVotingCutoff: EPOCH_VOTING_CUTOFF
}),
address(this),
initialInitiatives
);

Expand Down Expand Up @@ -497,6 +500,7 @@ contract GovernanceTest is Test {
epochDuration: EPOCH_DURATION,
epochVotingCutoff: EPOCH_VOTING_CUTOFF
}),
address(this),
initialInitiatives
);

Expand Down Expand Up @@ -1639,6 +1643,7 @@ contract GovernanceTest is Test {
epochDuration: EPOCH_DURATION,
epochVotingCutoff: EPOCH_VOTING_CUTOFF
}),
address(this),
initialInitiatives
);

Expand Down Expand Up @@ -1758,6 +1763,7 @@ contract GovernanceTest is Test {
epochDuration: EPOCH_DURATION,
epochVotingCutoff: EPOCH_VOTING_CUTOFF
}),
address(this),
initialInitiatives
);

Expand Down Expand Up @@ -1841,6 +1847,7 @@ contract GovernanceTest is Test {
epochDuration: EPOCH_DURATION,
epochVotingCutoff: EPOCH_VOTING_CUTOFF
}),
address(this),
initialInitiatives
);

Expand Down Expand Up @@ -1899,6 +1906,7 @@ contract GovernanceTest is Test {
epochDuration: EPOCH_DURATION,
epochVotingCutoff: EPOCH_VOTING_CUTOFF
}),
address(this),
initialInitiatives
);

Expand Down Expand Up @@ -1948,6 +1956,7 @@ contract GovernanceTest is Test {
epochDuration: EPOCH_DURATION,
epochVotingCutoff: EPOCH_VOTING_CUTOFF
}),
address(this),
initialInitiatives
);

Expand Down Expand Up @@ -1998,6 +2007,7 @@ contract GovernanceTest is Test {
epochDuration: EPOCH_DURATION,
epochVotingCutoff: EPOCH_VOTING_CUTOFF
}),
address(this),
initialInitiatives
);

Expand Down Expand Up @@ -2048,6 +2058,7 @@ contract GovernanceTest is Test {
epochDuration: EPOCH_DURATION,
epochVotingCutoff: EPOCH_VOTING_CUTOFF
}),
address(this),
initialInitiatives
);

Expand Down Expand Up @@ -2104,6 +2115,7 @@ contract GovernanceTest is Test {
epochDuration: EPOCH_DURATION,
epochVotingCutoff: EPOCH_VOTING_CUTOFF
}),
address(this),
initialInitiatives
);

Expand Down Expand Up @@ -2177,6 +2189,7 @@ contract GovernanceTest is Test {
epochDuration: EPOCH_DURATION,
epochVotingCutoff: EPOCH_VOTING_CUTOFF
}),
address(this),
initialInitiatives
);

Expand Down Expand Up @@ -2249,6 +2262,7 @@ contract GovernanceTest is Test {
epochDuration: EPOCH_DURATION,
epochVotingCutoff: EPOCH_VOTING_CUTOFF
}),
address(this),
initialInitiatives
);

Expand Down Expand Up @@ -2311,6 +2325,7 @@ contract GovernanceTest is Test {
epochDuration: EPOCH_DURATION,
epochVotingCutoff: EPOCH_VOTING_CUTOFF
}),
address(this),
initialInitiatives
);

Expand Down Expand Up @@ -2358,6 +2373,7 @@ contract GovernanceTest is Test {
epochDuration: EPOCH_DURATION,
epochVotingCutoff: EPOCH_VOTING_CUTOFF
}),
address(this),
initialInitiatives
);

Expand Down
1 change: 1 addition & 0 deletions test/GovernanceAttacks.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ contract GovernanceTest is Test {
epochDuration: EPOCH_DURATION,
epochVotingCutoff: EPOCH_VOTING_CUTOFF
}),
address(this),
initialInitiatives
);
}
Expand Down
1 change: 1 addition & 0 deletions test/UniV4Donations.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ contract UniV4DonationsTest is Test, Deployers {
epochDuration: EPOCH_DURATION,
epochVotingCutoff: EPOCH_VOTING_CUTOFF
}),
address(this),
initialInitiatives
);
}
Expand Down
1 change: 1 addition & 0 deletions test/VotingPower.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ contract VotingPowerTest is Test {
epochDuration: EPOCH_DURATION,
epochVotingCutoff: EPOCH_VOTING_CUTOFF
}),
address(this),
initialInitiatives
);
}
Expand Down
1 change: 1 addition & 0 deletions test/recon/Setup.sol
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ abstract contract Setup is BaseSetup {
epochDuration: EPOCH_DURATION,
epochVotingCutoff: EPOCH_VOTING_CUTOFF
}),
address(this),
deployedInitiatives // no initial initiatives passed in because don't have cheatcodes for calculating address where gov will be deployed
);

Expand Down

0 comments on commit 1bb2b28

Please sign in to comment.