@@ -137,16 +137,16 @@ contract GovernorAlpha {
137137 }
138138
139139 function propose (address [] memory targets , uint [] memory values , string [] memory signatures , bytes [] memory calldatas , string memory description ) public returns (uint ) {
140- require (tribe.getPriorVotes (msg .sender , sub256 (block .number , 1 )) > proposalThreshold (), "GovernorAlpha::propose: proposer votes below proposal threshold " );
141- require (targets.length == values.length && targets.length == signatures.length && targets.length == calldatas.length , "GovernorAlpha::propose: proposal function information arity mismatch " );
142- require (targets.length != 0 , "GovernorAlpha::propose: must provide actions " );
143- require (targets.length <= proposalMaxOperations (), "GovernorAlpha::propose: too many actions " );
140+ require (tribe.getPriorVotes (msg .sender , sub256 (block .number , 1 )) > proposalThreshold (), "GovernorAlpha: proposer votes below proposal threshold " );
141+ require (targets.length == values.length && targets.length == signatures.length && targets.length == calldatas.length , "GovernorAlpha: proposal function information arity mismatch " );
142+ require (targets.length != 0 , "GovernorAlpha: must provide actions " );
143+ require (targets.length <= proposalMaxOperations (), "GovernorAlpha: too many actions " );
144144
145145 uint latestProposalId = latestProposalIds[msg .sender ];
146146 if (latestProposalId != 0 ) {
147147 ProposalState proposersLatestProposalState = state (latestProposalId);
148- require (proposersLatestProposalState != ProposalState.Active, "GovernorAlpha::propose: one live proposal per proposer, found an already active proposal " );
149- require (proposersLatestProposalState != ProposalState.Pending, "GovernorAlpha::propose: one live proposal per proposer, found an already pending proposal " );
148+ require (proposersLatestProposalState != ProposalState.Active, "GovernorAlpha: one live proposal per proposer, found an already active proposal " );
149+ require (proposersLatestProposalState != ProposalState.Pending, "GovernorAlpha: one live proposal per proposer, found an already pending proposal " );
150150 }
151151
152152 uint startBlock = add256 (block .number , votingDelay ());
@@ -177,7 +177,7 @@ contract GovernorAlpha {
177177 }
178178
179179 function queue (uint proposalId ) public {
180- require (state (proposalId) == ProposalState.Succeeded, "GovernorAlpha::queue: proposal can only be queued if it is succeeded " );
180+ require (state (proposalId) == ProposalState.Succeeded, "GovernorAlpha: proposal can only be queued if it is succeeded " );
181181 Proposal storage proposal = proposals[proposalId];
182182 // solhint-disable-next-line not-rely-on-time
183183 uint eta = add256 (block .timestamp , timelock.delay ());
@@ -189,12 +189,12 @@ contract GovernorAlpha {
189189 }
190190
191191 function _queueOrRevert (address target , uint value , string memory signature , bytes memory data , uint eta ) internal {
192- require (! timelock.queuedTransactions (keccak256 (abi.encode (target, value, signature, data, eta))), "GovernorAlpha::_queueOrRevert: proposal action already queued at eta " );
192+ require (! timelock.queuedTransactions (keccak256 (abi.encode (target, value, signature, data, eta))), "GovernorAlpha: proposal action already queued at eta " );
193193 timelock.queueTransaction (target, value, signature, data, eta);
194194 }
195195
196196 function execute (uint proposalId ) public payable {
197- require (state (proposalId) == ProposalState.Queued, "GovernorAlpha::execute: proposal can only be executed if it is queued " );
197+ require (state (proposalId) == ProposalState.Queued, "GovernorAlpha: proposal can only be executed if it is queued " );
198198 Proposal storage proposal = proposals[proposalId];
199199 proposal.executed = true ;
200200 for (uint i = 0 ; i < proposal.targets.length ; i++ ) {
@@ -205,10 +205,10 @@ contract GovernorAlpha {
205205
206206 function cancel (uint proposalId ) public {
207207 ProposalState state = state (proposalId);
208- require (state != ProposalState.Executed, "GovernorAlpha::cancel: cannot cancel executed proposal " );
208+ require (state != ProposalState.Executed, "GovernorAlpha: cannot cancel executed proposal " );
209209
210210 Proposal storage proposal = proposals[proposalId];
211- require (msg .sender == guardian || tribe.getPriorVotes (proposal.proposer, sub256 (block .number , 1 )) < proposalThreshold (), "GovernorAlpha::cancel: proposer above threshold " );
211+ require (msg .sender == guardian || tribe.getPriorVotes (proposal.proposer, sub256 (block .number , 1 )) < proposalThreshold (), "GovernorAlpha: proposer above threshold " );
212212
213213 proposal.canceled = true ;
214214 for (uint i = 0 ; i < proposal.targets.length ; i++ ) {
@@ -228,7 +228,7 @@ contract GovernorAlpha {
228228 }
229229
230230 function state (uint proposalId ) public view returns (ProposalState) {
231- require (proposalCount >= proposalId && proposalId > 0 , "GovernorAlpha::state: invalid proposal id " );
231+ require (proposalCount >= proposalId && proposalId > 0 , "GovernorAlpha: invalid proposal id " );
232232 Proposal storage proposal = proposals[proposalId];
233233 if (proposal.canceled) {
234234 return ProposalState.Canceled;
@@ -259,15 +259,15 @@ contract GovernorAlpha {
259259 bytes32 structHash = keccak256 (abi.encode (BALLOT_TYPEHASH, proposalId, support));
260260 bytes32 digest = keccak256 (abi.encodePacked ("\x19\x01 " , domainSeparator, structHash));
261261 address signatory = ecrecover (digest, v, r, s);
262- require (signatory != address (0 ), "GovernorAlpha::castVoteBySig: invalid signature " );
262+ require (signatory != address (0 ), "GovernorAlpha: invalid signature " );
263263 return _castVote (signatory, proposalId, support);
264264 }
265265
266266 function _castVote (address voter , uint proposalId , bool support ) internal {
267- require (state (proposalId) == ProposalState.Active, "GovernorAlpha::_castVote: voting is closed " );
267+ require (state (proposalId) == ProposalState.Active, "GovernorAlpha: voting is closed " );
268268 Proposal storage proposal = proposals[proposalId];
269269 Receipt storage receipt = proposal.receipts[voter];
270- require (receipt.hasVoted == false , "GovernorAlpha::_castVote: voter already voted " );
270+ require (receipt.hasVoted == false , "GovernorAlpha: voter already voted " );
271271 uint96 votes = tribe.getPriorVotes (voter, proposal.startBlock);
272272
273273 if (support) {
@@ -284,22 +284,22 @@ contract GovernorAlpha {
284284 }
285285
286286 function __acceptAdmin () public {
287- require (msg .sender == guardian, "GovernorAlpha::__acceptAdmin: sender must be gov guardian " );
287+ require (msg .sender == guardian, "GovernorAlpha: sender must be gov guardian " );
288288 timelock.acceptAdmin ();
289289 }
290290
291291 function __abdicate () public {
292- require (msg .sender == guardian, "GovernorAlpha::__abdicate: sender must be gov guardian " );
292+ require (msg .sender == guardian, "GovernorAlpha: sender must be gov guardian " );
293293 guardian = address (0 );
294294 }
295295
296296 function __queueSetTimelockPendingAdmin (address newPendingAdmin , uint eta ) public {
297- require (msg .sender == guardian, "GovernorAlpha::__queueSetTimelockPendingAdmin: sender must be gov guardian " );
297+ require (msg .sender == guardian, "GovernorAlpha: sender must be gov guardian " );
298298 timelock.queueTransaction (address (timelock), 0 , "setPendingAdmin(address) " , abi.encode (newPendingAdmin), eta);
299299 }
300300
301301 function __executeSetTimelockPendingAdmin (address newPendingAdmin , uint eta ) public {
302- require (msg .sender == guardian, "GovernorAlpha::__executeSetTimelockPendingAdmin: sender must be gov guardian " );
302+ require (msg .sender == guardian, "GovernorAlpha: sender must be gov guardian " );
303303 timelock.executeTransaction (address (timelock), 0 , "setPendingAdmin(address) " , abi.encode (newPendingAdmin), eta);
304304 }
305305
0 commit comments