1+ pragma solidity 0.8.17 ;
2+
3+ import "../core/Governance/MoonwellApolloGovernor.sol " ;
4+
5+ contract GovernorApolloTestHarness is MoonwellGovernorApollo {
6+ constructor (
7+ address timelock_ ,
8+ address well_ ,
9+ address distributor_ ,
10+ address safetyModule_ ,
11+ address breakGlassGuardian_ ,
12+ address governanceReturnAddress_ ,
13+ address governanceReturnGuardian_ ,
14+ uint guardianSunset_ ,
15+ uint currentQuorum_ ,
16+ uint lowerQuorumCap_ ,
17+ uint upperQuorumCap_
18+ ) MoonwellGovernorApollo (
19+ timelock_,
20+ well_,
21+ distributor_,
22+ safetyModule_,
23+ breakGlassGuardian_,
24+ governanceReturnAddress_,
25+ governanceReturnGuardian_,
26+ guardianSunset_,
27+ currentQuorum_,
28+ lowerQuorumCap_,
29+ upperQuorumCap_
30+ ) {
31+ }
32+
33+ /// @notice Public function to expose adjust quorum for testing.
34+ function harnessAdjustQuorum () external {
35+ super ._adjustQuorum ();
36+ }
37+
38+
39+ /// @notice Public function that adds a proposal without checking proposal threshold or state requirements.
40+ /// NOTE: We implicitly initialize targets, values, signatures and calldatas to the empty array because adding them
41+ // as parameters causes the solidity compiler to barf with 'callstack too deep'.
42+ function addProposal (
43+ uint eta ,
44+ uint startTimestamp ,
45+ uint endTimestamp ,
46+ uint startBlock ,
47+ uint forVotes ,
48+ uint againstVotes ,
49+ uint abstainVotes ,
50+ bool canceled ,
51+ bool executed ,
52+ uint quorum ,
53+ bool quorumAdjusted
54+ ) external {
55+ proposalCount++ ;
56+
57+ Proposal storage newProposal = proposals[proposalCount];
58+ newProposal.id = proposalCount;
59+
60+ newProposal.proposer = msg .sender ;
61+ newProposal.eta = eta;
62+ newProposal.startTimestamp = startTimestamp;
63+ newProposal.endTimestamp = endTimestamp;
64+ newProposal.startBlock = startBlock;
65+ newProposal.forVotes = forVotes;
66+ newProposal.againstVotes = againstVotes;
67+ newProposal.abstainVotes = abstainVotes;
68+ newProposal.totalVotes = forVotes + againstVotes + abstainVotes;
69+ newProposal.canceled = canceled;
70+ newProposal.executed = executed;
71+ newProposal.quorum = quorum;
72+ newProposal.quorumAdjusted = quorumAdjusted;
73+ }
74+ }
0 commit comments