-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -155,7 +155,7 @@ contract MACI is IMACI, Params, Utilities, Ownable { | |
PubKey memory _pubKey, | ||
bytes memory _signUpGatekeeperData, | ||
bytes memory _initialVoiceCreditProxyData | ||
) public { | ||
) public virtual { | ||
// ensure we do not have more signups than what the circuits support | ||
if (numSignUps == uint256(TREE_ARITY) ** uint256(stateTreeDepth)) revert TooManySignups(); | ||
|
||
|
@@ -200,7 +200,7 @@ contract MACI is IMACI, Params, Utilities, Ownable { | |
address _verifier, | ||
address _vkRegistry, | ||
bool useSubsidy | ||
) public onlyOwner returns (PollContracts memory pollAddr) { | ||
) public virtual onlyOwner returns (PollContracts memory pollAddr) { | ||
// cache the poll to a local variable so we can increment it | ||
uint256 pollId = nextPollId; | ||
|
||
|
@@ -240,17 +240,17 @@ contract MACI is IMACI, Params, Utilities, Ownable { | |
} | ||
|
||
/// @inheritdoc IMACI | ||
function mergeStateAqSubRoots(uint256 _numSrQueueOps, uint256 _pollId) public override onlyPoll(_pollId) { | ||
function mergeStateAqSubRoots(uint256 _numSrQueueOps, uint256 _pollId) public onlyPoll(_pollId) { | ||
Check warning Code scanning / Slither Conformance to Solidity naming conventions Warning
Parameter MACI.mergeStateAqSubRoots(uint256,uint256)._numSrQueueOps is not in mixedCase
Check warning Code scanning / Slither Conformance to Solidity naming conventions Warning
Parameter MACI.mergeStateAqSubRoots(uint256,uint256)._pollId is not in mixedCase
|
||
stateAq.mergeSubRoots(_numSrQueueOps); | ||
} | ||
|
||
/// @inheritdoc IMACI | ||
function mergeStateAq(uint256 _pollId) public override onlyPoll(_pollId) returns (uint256 root) { | ||
function mergeStateAq(uint256 _pollId) public onlyPoll(_pollId) returns (uint256 root) { | ||
Check warning Code scanning / Slither Conformance to Solidity naming conventions Warning
Parameter MACI.mergeStateAq(uint256)._pollId is not in mixedCase
|
||
root = stateAq.merge(stateTreeDepth); | ||
} | ||
|
||
/// @inheritdoc IMACI | ||
function getStateAqRoot() public view override returns (uint256 root) { | ||
function getStateAqRoot() public view returns (uint256 root) { | ||
root = stateAq.getMainRoot(stateTreeDepth); | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -142,7 +142,7 @@ contract Poll is Params, Utilities, SnarkCommon, Ownable, EmptyBallotRoots, IPol | |
} | ||
|
||
/// @inheritdoc IPoll | ||
function topup(uint256 stateIndex, uint256 amount) public isWithinVotingDeadline { | ||
function topup(uint256 stateIndex, uint256 amount) public virtual isWithinVotingDeadline { | ||
// we check that we do not exceed the max number of messages | ||
if (numMessages == maxValues.maxMessages) revert TooManyMessages(); | ||
|
||
|
@@ -163,7 +163,7 @@ contract Poll is Params, Utilities, SnarkCommon, Ownable, EmptyBallotRoots, IPol | |
} | ||
Check warning Code scanning / Slither Unused return Medium
Poll.topup(uint256,uint256) ignores return value by extContracts.messageAq.enqueue(messageLeaf)
Check notice Code scanning / Slither Reentrancy vulnerabilities Low
Reentrancy in Poll.topup(uint256,uint256):
External calls: - extContracts.topupCredit.transferFrom(msg.sender,address(this),amount) - extContracts.messageAq.enqueue(messageLeaf) Event emitted after the call(s): - TopupMessage(_message) |
||
|
||
/// @inheritdoc IPoll | ||
function publishMessage(Message calldata _message, PubKey calldata _encPubKey) public isWithinVotingDeadline { | ||
function publishMessage(Message calldata _message, PubKey calldata _encPubKey) public virtual isWithinVotingDeadline { | ||
Check warning Code scanning / Slither Conformance to Solidity naming conventions Warning
Parameter Poll.publishMessage(DomainObjs.Message,DomainObjs.PubKey)._encPubKey is not in mixedCase
Check warning Code scanning / Slither Conformance to Solidity naming conventions Warning
Parameter Poll.publishMessage(DomainObjs.Message,DomainObjs.PubKey)._message is not in mixedCase
|
||
// we check that we do not exceed the max number of messages | ||
if (numMessages == maxValues.maxMessages) revert TooManyMessages(); | ||
|
||
|