@@ -53,7 +53,7 @@ contract PLCRVotingCheckpoint is PLCRVotingCheckpointStorage, VotingCheckpoint {
53
53
withPerm (ADMIN)
54
54
{
55
55
uint256 startTime = now ;
56
- uint256 checkpointId = ISecurityToken ( securityToken) .createCheckpoint ();
56
+ uint256 checkpointId = securityToken.createCheckpoint ();
57
57
_createBallotWithCheckpoint (_commitDuration, _revealDuration, _noOfProposals, _quorumPercentage, checkpointId, startTime);
58
58
}
59
59
@@ -78,7 +78,7 @@ contract PLCRVotingCheckpoint is PLCRVotingCheckpointStorage, VotingCheckpoint {
78
78
withPerm (ADMIN)
79
79
{
80
80
// validate the checkpointId, It should be less than or equal to the current checkpointId of the securityToken
81
- require (_checkpointId <= ISecurityToken ( securityToken) .currentCheckpointId (), "Invalid checkpoint Id " );
81
+ require (_checkpointId <= securityToken.currentCheckpointId (), "Invalid checkpoint Id " );
82
82
_createBallotWithCheckpoint (_commitDuration, _revealDuration, _noOfProposals, _quorumPercentage, _checkpointId, _startTime);
83
83
}
84
84
@@ -140,7 +140,7 @@ contract PLCRVotingCheckpoint is PLCRVotingCheckpointStorage, VotingCheckpoint {
140
140
require (ballot.investorToProposal[msg .sender ].secretVote == bytes32 (0 ), "Already voted " );
141
141
require (ballot.isActive, "Inactive ballot " );
142
142
// Get the balance of the voter (i.e `msg.sender`) at the checkpoint on which ballot was created.
143
- uint256 weight = ISecurityToken ( securityToken) .balanceOfAt (msg .sender , ballot.checkpointId);
143
+ uint256 weight = securityToken.balanceOfAt (msg .sender , ballot.checkpointId);
144
144
require (weight > 0 , "Zero weight is not allowed " );
145
145
// Update the storage value. Assigned `0` as vote option it will be updated when voter reveals its vote.
146
146
ballot.investorToProposal[msg .sender ] = Vote (0 , _secretVote);
@@ -170,7 +170,7 @@ contract PLCRVotingCheckpoint is PLCRVotingCheckpointStorage, VotingCheckpoint {
170
170
"Invalid vote "
171
171
);
172
172
// Get the balance of the voter (i.e `msg.sender`) at the checkpoint on which ballot was created.
173
- uint256 weight = ISecurityToken ( securityToken) .balanceOfAt (msg .sender , ballot.checkpointId);
173
+ uint256 weight = securityToken.balanceOfAt (msg .sender , ballot.checkpointId);
174
174
bytes32 secretVote = ballot.investorToProposal[msg .sender ].secretVote;
175
175
// update the storage values
176
176
ballot.proposalToVotes[_choiceOfProposal] = ballot.proposalToVotes[_choiceOfProposal].add (weight);
@@ -283,7 +283,7 @@ contract PLCRVotingCheckpoint is PLCRVotingCheckpointStorage, VotingCheckpoint {
283
283
uint256 i = 0 ;
284
284
uint256 counter = 0 ;
285
285
uint256 maxWeight = 0 ;
286
- uint256 supplyAtCheckpoint = ISecurityToken ( securityToken) .totalSupplyAt (ballot.checkpointId);
286
+ uint256 supplyAtCheckpoint = securityToken.totalSupplyAt (ballot.checkpointId);
287
287
uint256 quorumWeight = (supplyAtCheckpoint.mul (ballot.quorum)).div (10 ** 18 );
288
288
voteWeighting = new uint256 [](ballot.totalProposals);
289
289
for (i = 0 ; i < ballot.totalProposals; i++ ) {
@@ -342,7 +342,7 @@ contract PLCRVotingCheckpoint is PLCRVotingCheckpointStorage, VotingCheckpoint {
342
342
Ballot memory ballot = ballots[_ballotId];
343
343
return (
344
344
ballot.quorum,
345
- ISecurityToken ( securityToken) .totalSupplyAt (ballot.checkpointId),
345
+ securityToken.totalSupplyAt (ballot.checkpointId),
346
346
ballot.checkpointId,
347
347
ballot.startTime,
348
348
(uint256 (ballot.startTime).add (uint256 (ballot.commitDuration))).add (uint256 (ballot.revealDuration)),
0 commit comments