@@ -52,81 +52,75 @@ contract XDCValidator {
5252
5353 modifier onlyValidCandidateCap () {
5454 // anyone can deposit X XDC to become a candidate
55- require (msg .value >= minCandidateCap, "onlyValidCandidateCap " );
55+ require (msg .value >= minCandidateCap, "Low Candidate Cap " );
5656 _;
5757 }
5858
5959 modifier onlyValidVoterCap () {
60- require (msg .value >= minVoterCap, "onlyValidVoterCap " );
60+ require (msg .value >= minVoterCap, "Low Voter Cap " );
6161 _;
6262 }
6363
6464 modifier onlyKYCWhitelisted () {
6565 require (
6666 kycString[msg .sender ].length != 0 ||
6767 ownerToCandidate[msg .sender ].length > 0 ,
68- "onlyKYCWhitelisted "
68+ "Not KYC Whitelisted "
6969 );
7070 _;
7171 }
7272
7373 modifier onlyOwner (address _candidate ) {
74- require (validatorsState[_candidate].owner == msg .sender , "onlyOwner " );
74+ require (validatorsState[_candidate].owner == msg .sender , "Not Owner " );
7575 _;
7676 }
7777
7878 modifier onlyCandidate (address _candidate ) {
79- require (validatorsState[_candidate].isCandidate, "onlyCandidate " );
79+ require (validatorsState[_candidate].isCandidate, "Not Candidate " );
8080 _;
8181 }
8282
8383 modifier onlyValidCandidate (address _candidate ) {
84- require (validatorsState[_candidate].isCandidate, "onlyValidCandidate " );
84+ require (validatorsState[_candidate].isCandidate, "Not Valid Candidate " );
8585 _;
8686 }
8787
8888 modifier onlyNotCandidate (address _candidate ) {
89- require (! validatorsState[_candidate].isCandidate, "onlyNotCandidate " );
89+ require (! validatorsState[_candidate].isCandidate, "Already Candidate " );
9090 _;
9191 }
9292
9393 modifier onlyValidVote (address _candidate , uint256 _cap ) {
9494 require (
9595 validatorsState[_candidate].voters[msg .sender ] >= _cap,
96- "onlyValidVote validatorsState[_candidate].voters[msg.sender] >= _cap is false "
96+ "Insufficient Vote Cap "
9797 );
9898 if (validatorsState[_candidate].owner == msg .sender ) {
9999 require (
100100 validatorsState[_candidate].voters[msg .sender ].sub (_cap) >=
101101 minCandidateCap,
102- "onlyValidVote validatorsState[_candidate].voters[msg.sender] - (_cap) >= minCandidateCap is false "
102+ "Below Min Cap "
103103 );
104104 }
105105 _;
106106 }
107107
108108 modifier onlyValidWithdraw (uint256 _blockNumber , uint256 _index ) {
109- require (
110- _blockNumber > 0 ,
111- "onlyValidWithdraw _blockNumber > 0 is false "
112- );
113- require (
114- block .number >= _blockNumber,
115- "onlyValidWithdraw block.number >= _blockNumber is false "
116- );
109+ require (_blockNumber > 0 , "Invalid Block Number " );
110+ require (block .number >= _blockNumber, "Block Number Too High " );
117111 require (
118112 withdrawsState[msg .sender ].caps[_blockNumber] > 0 ,
119- "onlyValidWithdraw withdrawsState[msg.sender].caps[_blockNumber] > 0 is false "
113+ "Invalid Withdraw Cap "
120114 );
121115 require (
122116 withdrawsState[msg .sender ].blockNumbers[_index] == _blockNumber,
123- "onlyValidWithdraw withdrawsState[msg.sender].blockNumbers[_index] == _blockNumber is false "
117+ "Mismatch Block Number "
124118 );
125119 _;
126120 }
127121
128122 modifier onlyGrandMaster () {
129- require (grandMasterMap[msg .sender ] == true , "onlyGrandMaster " );
123+ require (grandMasterMap[msg .sender ] == true , "Not Grand Master " );
130124 _;
131125 }
132126
@@ -313,10 +307,7 @@ contract XDCValidator {
313307 }
314308
315309 function checkMinCandidateNum () private view {
316- require (
317- candidates.length >= minCandidateNum,
318- "cadidates must greater than minCandidateNum "
319- );
310+ require (candidates.length >= minCandidateNum, "Low Candidate Count " );
320311 }
321312
322313 // voteInvalidKYC : any candidate can vote for invalid KYC i.e. a particular candidate's owner has uploaded a bad KYC.
@@ -332,7 +323,7 @@ contract XDCValidator {
332323 address _invalidMasternode = getCandidateOwner (_invalidCandidate);
333324 require (
334325 ! hasVotedInvalid[candidateOwner][_invalidMasternode],
335- "!hasVotedInvalid[candidateOwner][_invalidMasternode] "
326+ "Already Voted Invalid "
336327 );
337328 hasVotedInvalid[candidateOwner][_invalidMasternode] = true ;
338329 invalidKYCCount[_invalidMasternode]++ ;
0 commit comments