@maci-protocol/contracts 0.0.0-ci.d0dddbc → 0.0.0-ci.d4be71b

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (177) hide show
  1. package/build/artifacts/@excubiae/contracts/contracts/checker/BaseChecker.sol/BaseChecker.dbg.json +1 -1
  2. package/build/artifacts/@excubiae/contracts/contracts/extensions/anonAadhaar/AnonAadhaarChecker.sol/AnonAadhaarChecker.dbg.json +1 -1
  3. package/build/artifacts/@excubiae/contracts/contracts/extensions/anonAadhaar/AnonAadhaarCheckerFactory.sol/AnonAadhaarCheckerFactory.dbg.json +1 -1
  4. package/build/artifacts/@excubiae/contracts/contracts/extensions/anonAadhaar/AnonAadhaarPolicy.sol/AnonAadhaarPolicy.dbg.json +1 -1
  5. package/build/artifacts/@excubiae/contracts/contracts/extensions/anonAadhaar/AnonAadhaarPolicyFactory.sol/AnonAadhaarPolicyFactory.dbg.json +1 -1
  6. package/build/artifacts/@excubiae/contracts/contracts/extensions/anonAadhaar/IAnonAadhaar.sol/IAnonAadhaar.dbg.json +1 -1
  7. package/build/artifacts/@excubiae/contracts/contracts/extensions/eas/EASChecker.sol/EASChecker.dbg.json +1 -1
  8. package/build/artifacts/@excubiae/contracts/contracts/extensions/eas/EASCheckerFactory.sol/EASCheckerFactory.dbg.json +1 -1
  9. package/build/artifacts/@excubiae/contracts/contracts/extensions/eas/EASPolicy.sol/EASPolicy.dbg.json +1 -1
  10. package/build/artifacts/@excubiae/contracts/contracts/extensions/eas/EASPolicyFactory.sol/EASPolicyFactory.dbg.json +1 -1
  11. package/build/artifacts/@excubiae/contracts/contracts/extensions/eas/IEAS.sol/IEAS.dbg.json +1 -1
  12. package/build/artifacts/@excubiae/contracts/contracts/extensions/erc20/ERC20Checker.sol/ERC20Checker.dbg.json +1 -1
  13. package/build/artifacts/@excubiae/contracts/contracts/extensions/erc20/ERC20CheckerFactory.sol/ERC20CheckerFactory.dbg.json +1 -1
  14. package/build/artifacts/@excubiae/contracts/contracts/extensions/erc20/ERC20Policy.sol/ERC20Policy.dbg.json +1 -1
  15. package/build/artifacts/@excubiae/contracts/contracts/extensions/erc20/ERC20PolicyFactory.sol/ERC20PolicyFactory.dbg.json +1 -1
  16. package/build/artifacts/@excubiae/contracts/contracts/extensions/erc20votes/ERC20VotesChecker.sol/ERC20VotesChecker.dbg.json +1 -1
  17. package/build/artifacts/@excubiae/contracts/contracts/extensions/erc20votes/ERC20VotesCheckerFactory.sol/ERC20VotesCheckerFactory.dbg.json +1 -1
  18. package/build/artifacts/@excubiae/contracts/contracts/extensions/erc20votes/ERC20VotesPolicy.sol/ERC20VotesPolicy.dbg.json +1 -1
  19. package/build/artifacts/@excubiae/contracts/contracts/extensions/erc20votes/ERC20VotesPolicyFactory.sol/ERC20VotesPolicyFactory.dbg.json +1 -1
  20. package/build/artifacts/@excubiae/contracts/contracts/extensions/freeForAll/FreeForAllChecker.sol/FreeForAllChecker.dbg.json +1 -1
  21. package/build/artifacts/@excubiae/contracts/contracts/extensions/freeForAll/FreeForAllCheckerFactory.sol/FreeForAllCheckerFactory.dbg.json +1 -1
  22. package/build/artifacts/@excubiae/contracts/contracts/extensions/freeForAll/FreeForAllPolicy.sol/FreeForAllPolicy.dbg.json +1 -1
  23. package/build/artifacts/@excubiae/contracts/contracts/extensions/freeForAll/FreeForAllPolicyFactory.sol/FreeForAllPolicyFactory.dbg.json +1 -1
  24. package/build/artifacts/@excubiae/contracts/contracts/extensions/gitcoin/GitcoinPassportChecker.sol/GitcoinPassportChecker.dbg.json +1 -1
  25. package/build/artifacts/@excubiae/contracts/contracts/extensions/gitcoin/GitcoinPassportCheckerFactory.sol/GitcoinPassportCheckerFactory.dbg.json +1 -1
  26. package/build/artifacts/@excubiae/contracts/contracts/extensions/gitcoin/GitcoinPassportPolicy.sol/GitcoinPassportPolicy.dbg.json +1 -1
  27. package/build/artifacts/@excubiae/contracts/contracts/extensions/gitcoin/GitcoinPassportPolicyFactory.sol/GitcoinPassportPolicyFactory.dbg.json +1 -1
  28. package/build/artifacts/@excubiae/contracts/contracts/extensions/gitcoin/IGitcoinPassportDecoder.sol/IGitcoinPassportDecoder.dbg.json +1 -1
  29. package/build/artifacts/@excubiae/contracts/contracts/extensions/hats/HatsChecker.sol/HatsChecker.dbg.json +1 -1
  30. package/build/artifacts/@excubiae/contracts/contracts/extensions/hats/HatsCheckerFactory.sol/HatsCheckerFactory.dbg.json +1 -1
  31. package/build/artifacts/@excubiae/contracts/contracts/extensions/hats/HatsPolicy.sol/HatsPolicy.dbg.json +1 -1
  32. package/build/artifacts/@excubiae/contracts/contracts/extensions/hats/HatsPolicyFactory.sol/HatsPolicyFactory.dbg.json +1 -1
  33. package/build/artifacts/@excubiae/contracts/contracts/extensions/hats/IHats.sol/IHats.dbg.json +1 -1
  34. package/build/artifacts/@excubiae/contracts/contracts/extensions/merkle/MerkleProofChecker.sol/MerkleProofChecker.dbg.json +1 -1
  35. package/build/artifacts/@excubiae/contracts/contracts/extensions/merkle/MerkleProofCheckerFactory.sol/MerkleProofCheckerFactory.dbg.json +1 -1
  36. package/build/artifacts/@excubiae/contracts/contracts/extensions/merkle/MerkleProofPolicy.sol/MerkleProofPolicy.dbg.json +1 -1
  37. package/build/artifacts/@excubiae/contracts/contracts/extensions/merkle/MerkleProofPolicyFactory.sol/MerkleProofPolicyFactory.dbg.json +1 -1
  38. package/build/artifacts/@excubiae/contracts/contracts/extensions/semaphore/ISemaphore.sol/ISemaphore.dbg.json +1 -1
  39. package/build/artifacts/@excubiae/contracts/contracts/extensions/semaphore/SemaphoreChecker.sol/SemaphoreChecker.dbg.json +1 -1
  40. package/build/artifacts/@excubiae/contracts/contracts/extensions/semaphore/SemaphoreCheckerFactory.sol/SemaphoreCheckerFactory.dbg.json +1 -1
  41. package/build/artifacts/@excubiae/contracts/contracts/extensions/semaphore/SemaphorePolicy.sol/SemaphorePolicy.dbg.json +1 -1
  42. package/build/artifacts/@excubiae/contracts/contracts/extensions/semaphore/SemaphorePolicyFactory.sol/SemaphorePolicyFactory.dbg.json +1 -1
  43. package/build/artifacts/@excubiae/contracts/contracts/extensions/token/TokenChecker.sol/TokenChecker.dbg.json +1 -1
  44. package/build/artifacts/@excubiae/contracts/contracts/extensions/token/TokenCheckerFactory.sol/TokenCheckerFactory.dbg.json +1 -1
  45. package/build/artifacts/@excubiae/contracts/contracts/extensions/token/TokenPolicy.sol/TokenPolicy.dbg.json +1 -1
  46. package/build/artifacts/@excubiae/contracts/contracts/extensions/token/TokenPolicyFactory.sol/TokenPolicyFactory.dbg.json +1 -1
  47. package/build/artifacts/@excubiae/contracts/contracts/extensions/zupass/ZupassChecker.sol/ZupassChecker.dbg.json +1 -1
  48. package/build/artifacts/@excubiae/contracts/contracts/extensions/zupass/ZupassCheckerFactory.sol/ZupassCheckerFactory.dbg.json +1 -1
  49. package/build/artifacts/@excubiae/contracts/contracts/extensions/zupass/ZupassGroth16Verifier.sol/ZupassGroth16Verifier.dbg.json +1 -1
  50. package/build/artifacts/@excubiae/contracts/contracts/extensions/zupass/ZupassPolicy.sol/ZupassPolicy.dbg.json +1 -1
  51. package/build/artifacts/@excubiae/contracts/contracts/extensions/zupass/ZupassPolicyFactory.sol/ZupassPolicyFactory.dbg.json +1 -1
  52. package/build/artifacts/@excubiae/contracts/contracts/interfaces/IBaseChecker.sol/IBaseChecker.dbg.json +1 -1
  53. package/build/artifacts/@excubiae/contracts/contracts/interfaces/IBasePolicy.sol/IBasePolicy.dbg.json +1 -1
  54. package/build/artifacts/@excubiae/contracts/contracts/interfaces/IClone.sol/IClone.dbg.json +1 -1
  55. package/build/artifacts/@excubiae/contracts/contracts/interfaces/IFactory.sol/IFactory.dbg.json +1 -1
  56. package/build/artifacts/@excubiae/contracts/contracts/interfaces/IPolicy.sol/IPolicy.dbg.json +1 -1
  57. package/build/artifacts/@excubiae/contracts/contracts/policy/BasePolicy.sol/BasePolicy.dbg.json +1 -1
  58. package/build/artifacts/@excubiae/contracts/contracts/policy/Policy.sol/Policy.dbg.json +1 -1
  59. package/build/artifacts/@excubiae/contracts/contracts/proxy/Clone.sol/Clone.dbg.json +1 -1
  60. package/build/artifacts/@excubiae/contracts/contracts/proxy/Factory.sol/Factory.dbg.json +1 -1
  61. package/build/artifacts/@excubiae/contracts/contracts/test/extensions/mocks/MockAnonAadhaar.sol/MockAnonAadhaar.dbg.json +1 -1
  62. package/build/artifacts/@excubiae/contracts/contracts/test/extensions/mocks/MockEAS.sol/MockEAS.dbg.json +1 -1
  63. package/build/artifacts/@excubiae/contracts/contracts/test/extensions/mocks/MockGitcoinPassportDecoder.sol/MockGitcoinPassportDecoder.dbg.json +1 -1
  64. package/build/artifacts/@excubiae/contracts/contracts/test/extensions/mocks/MockHatsProtocol.sol/MockHatsProtocol.dbg.json +1 -1
  65. package/build/artifacts/@excubiae/contracts/contracts/test/extensions/mocks/MockToken.sol/MockToken.dbg.json +1 -1
  66. package/build/artifacts/@openzeppelin/contracts/access/Ownable.sol/Ownable.dbg.json +1 -1
  67. package/build/artifacts/@openzeppelin/contracts/governance/utils/IVotes.sol/IVotes.dbg.json +1 -1
  68. package/build/artifacts/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC1155Errors.dbg.json +1 -1
  69. package/build/artifacts/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC20Errors.dbg.json +1 -1
  70. package/build/artifacts/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC721Errors.dbg.json +1 -1
  71. package/build/artifacts/@openzeppelin/contracts/token/ERC20/ERC20.sol/ERC20.dbg.json +1 -1
  72. package/build/artifacts/@openzeppelin/contracts/token/ERC20/IERC20.sol/IERC20.dbg.json +1 -1
  73. package/build/artifacts/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol/IERC20Metadata.dbg.json +1 -1
  74. package/build/artifacts/@openzeppelin/contracts/token/ERC721/ERC721.sol/ERC721.dbg.json +1 -1
  75. package/build/artifacts/@openzeppelin/contracts/token/ERC721/IERC721.sol/IERC721.dbg.json +1 -1
  76. package/build/artifacts/@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol/IERC721Receiver.dbg.json +1 -1
  77. package/build/artifacts/@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol/IERC721Metadata.dbg.json +1 -1
  78. package/build/artifacts/@openzeppelin/contracts/token/ERC721/utils/ERC721Utils.sol/ERC721Utils.dbg.json +1 -1
  79. package/build/artifacts/@openzeppelin/contracts/utils/Context.sol/Context.dbg.json +1 -1
  80. package/build/artifacts/@openzeppelin/contracts/utils/Panic.sol/Panic.dbg.json +1 -1
  81. package/build/artifacts/@openzeppelin/contracts/utils/Strings.sol/Strings.dbg.json +1 -1
  82. package/build/artifacts/@openzeppelin/contracts/utils/cryptography/Hashes.sol/Hashes.dbg.json +1 -1
  83. package/build/artifacts/@openzeppelin/contracts/utils/cryptography/MerkleProof.sol/MerkleProof.dbg.json +1 -1
  84. package/build/artifacts/@openzeppelin/contracts/utils/introspection/ERC165.sol/ERC165.dbg.json +1 -1
  85. package/build/artifacts/@openzeppelin/contracts/utils/introspection/IERC165.sol/IERC165.dbg.json +1 -1
  86. package/build/artifacts/@openzeppelin/contracts/utils/math/Math.sol/Math.dbg.json +1 -1
  87. package/build/artifacts/@openzeppelin/contracts/utils/math/SafeCast.sol/SafeCast.dbg.json +1 -1
  88. package/build/artifacts/@openzeppelin/contracts/utils/math/SignedMath.sol/SignedMath.dbg.json +1 -1
  89. package/build/artifacts/build-info/{6371f9711b736db1530606bc0a6a869d.json → 7186b3e55c44d2bb2951e13e1bdc91fc.json} +1 -1
  90. package/build/artifacts/contracts/MACI.sol/MACI.dbg.json +1 -1
  91. package/build/artifacts/contracts/MessageProcessor.sol/MessageProcessor.dbg.json +1 -1
  92. package/build/artifacts/contracts/MessageProcessorFactory.sol/MessageProcessorFactory.dbg.json +1 -1
  93. package/build/artifacts/contracts/Poll.sol/Poll.dbg.json +1 -1
  94. package/build/artifacts/contracts/PollFactory.sol/PollFactory.dbg.json +1 -1
  95. package/build/artifacts/contracts/Tally.sol/Tally.dbg.json +1 -1
  96. package/build/artifacts/contracts/Tally.sol/Tally.json +34 -41
  97. package/build/artifacts/contracts/TallyFactory.sol/TallyFactory.dbg.json +1 -1
  98. package/build/artifacts/contracts/TallyFactory.sol/TallyFactory.json +6 -6
  99. package/build/artifacts/contracts/VerifyingKeysRegistry.sol/VerifyingKeysRegistry.dbg.json +1 -1
  100. package/build/artifacts/contracts/crypto/BabyJubJub.sol/CurveBabyJubJub.dbg.json +1 -1
  101. package/build/artifacts/contracts/crypto/Hasher.sol/Hasher.dbg.json +1 -1
  102. package/build/artifacts/contracts/crypto/Pairing.sol/Pairing.dbg.json +1 -1
  103. package/build/artifacts/contracts/crypto/PoseidonT3.sol/PoseidonT3.dbg.json +1 -1
  104. package/build/artifacts/contracts/crypto/PoseidonT4.sol/PoseidonT4.dbg.json +1 -1
  105. package/build/artifacts/contracts/crypto/PoseidonT5.sol/PoseidonT5.dbg.json +1 -1
  106. package/build/artifacts/contracts/crypto/PoseidonT6.sol/PoseidonT6.dbg.json +1 -1
  107. package/build/artifacts/contracts/crypto/SnarkCommon.sol/SnarkCommon.dbg.json +1 -1
  108. package/build/artifacts/contracts/crypto/SnarkConstants.sol/SnarkConstants.dbg.json +1 -1
  109. package/build/artifacts/contracts/crypto/Verifier.sol/Verifier.dbg.json +1 -1
  110. package/build/artifacts/contracts/initialVoiceCreditProxy/ConstantInitialVoiceCreditProxy.sol/ConstantInitialVoiceCreditProxy.dbg.json +1 -1
  111. package/build/artifacts/contracts/initialVoiceCreditProxy/ConstantInitialVoiceCreditProxyFactory.sol/ConstantInitialVoiceCreditProxyFactory.dbg.json +1 -1
  112. package/build/artifacts/contracts/initialVoiceCreditProxy/ERC20VotesInitialVoiceCreditProxy.sol/ERC20VotesInitialVoiceCreditProxy.dbg.json +1 -1
  113. package/build/artifacts/contracts/initialVoiceCreditProxy/ERC20VotesInitialVoiceCreditProxyFactory.sol/ERC20VotesInitialVoiceCreditProxyFactory.dbg.json +1 -1
  114. package/build/artifacts/contracts/interfaces/IInitialVoiceCreditProxy.sol/IInitialVoiceCreditProxy.dbg.json +1 -1
  115. package/build/artifacts/contracts/interfaces/IMACI.sol/IMACI.dbg.json +1 -1
  116. package/build/artifacts/contracts/interfaces/IMessageProcessor.sol/IMessageProcessor.dbg.json +1 -1
  117. package/build/artifacts/contracts/interfaces/IMessageProcessorFactory.sol/IMessageProcessorFactory.dbg.json +1 -1
  118. package/build/artifacts/contracts/interfaces/IPoll.sol/IPoll.dbg.json +1 -1
  119. package/build/artifacts/contracts/interfaces/IPollFactory.sol/IPollFactory.dbg.json +1 -1
  120. package/build/artifacts/contracts/interfaces/ISemaphore.sol/ISemaphore.dbg.json +1 -1
  121. package/build/artifacts/contracts/interfaces/ITally.sol/ITally.dbg.json +1 -1
  122. package/build/artifacts/contracts/interfaces/ITally.sol/ITally.json +2 -298
  123. package/build/artifacts/contracts/interfaces/ITallyFactory.sol/ITallyFactory.dbg.json +1 -1
  124. package/build/artifacts/contracts/interfaces/IVerifier.sol/IVerifier.dbg.json +1 -1
  125. package/build/artifacts/contracts/interfaces/IVerifyingKeysRegistry.sol/IVerifyingKeysRegistry.dbg.json +1 -1
  126. package/build/artifacts/contracts/mocks/MockERC20.sol/MockERC20.dbg.json +1 -1
  127. package/build/artifacts/contracts/mocks/MockERC20Votes.sol/MockERC20Votes.dbg.json +1 -1
  128. package/build/artifacts/contracts/mocks/MockSemaphore.sol/MockSemaphore.dbg.json +1 -1
  129. package/build/artifacts/contracts/mocks/MockTally.sol/MockTally.dbg.json +4 -0
  130. package/build/artifacts/contracts/mocks/MockTally.sol/MockTally.json +114 -0
  131. package/build/artifacts/contracts/mocks/MockVerifier.sol/MockVerifier.dbg.json +1 -1
  132. package/build/artifacts/contracts/mocks/Mocker.sol/Mocker.dbg.json +1 -1
  133. package/build/artifacts/contracts/trees/LazyIMT.sol/InternalLazyIMT.dbg.json +1 -1
  134. package/build/artifacts/contracts/trees/LeanIMT.sol/InternalLeanIMT.dbg.json +1 -1
  135. package/build/artifacts/contracts/utilities/DomainObjs.sol/DomainObjs.dbg.json +1 -1
  136. package/build/artifacts/contracts/utilities/Params.sol/Params.dbg.json +1 -1
  137. package/build/artifacts/contracts/utilities/Utilities.sol/Utilities.dbg.json +1 -1
  138. package/build/artifacts/solady/src/utils/LibClone.sol/LibClone.dbg.json +1 -1
  139. package/build/tsconfig.build.tsbuildinfo +1 -1
  140. package/build/typechain-types/contracts/Tally.d.ts +19 -21
  141. package/build/typechain-types/contracts/Tally.d.ts.map +1 -1
  142. package/build/typechain-types/contracts/interfaces/ITally.d.ts +1 -171
  143. package/build/typechain-types/contracts/interfaces/ITally.d.ts.map +1 -1
  144. package/build/typechain-types/contracts/mocks/MockTally.d.ts +80 -0
  145. package/build/typechain-types/contracts/mocks/MockTally.d.ts.map +1 -0
  146. package/build/typechain-types/contracts/mocks/MockTally.js +3 -0
  147. package/build/typechain-types/contracts/mocks/MockTally.js.map +1 -0
  148. package/build/typechain-types/contracts/mocks/index.d.ts +1 -0
  149. package/build/typechain-types/contracts/mocks/index.d.ts.map +1 -1
  150. package/build/typechain-types/factories/contracts/TallyFactory__factory.d.ts +1 -1
  151. package/build/typechain-types/factories/contracts/TallyFactory__factory.d.ts.map +1 -1
  152. package/build/typechain-types/factories/contracts/TallyFactory__factory.js +1 -1
  153. package/build/typechain-types/factories/contracts/TallyFactory__factory.js.map +1 -1
  154. package/build/typechain-types/factories/contracts/Tally__factory.d.ts +19 -24
  155. package/build/typechain-types/factories/contracts/Tally__factory.d.ts.map +1 -1
  156. package/build/typechain-types/factories/contracts/Tally__factory.js +25 -32
  157. package/build/typechain-types/factories/contracts/Tally__factory.js.map +1 -1
  158. package/build/typechain-types/factories/contracts/interfaces/ITally__factory.d.ts +2 -230
  159. package/build/typechain-types/factories/contracts/interfaces/ITally__factory.d.ts.map +1 -1
  160. package/build/typechain-types/factories/contracts/interfaces/ITally__factory.js +2 -298
  161. package/build/typechain-types/factories/contracts/interfaces/ITally__factory.js.map +1 -1
  162. package/build/typechain-types/factories/contracts/mocks/MockTally__factory.d.ts +103 -0
  163. package/build/typechain-types/factories/contracts/mocks/MockTally__factory.d.ts.map +1 -0
  164. package/build/typechain-types/factories/contracts/mocks/MockTally__factory.js +143 -0
  165. package/build/typechain-types/factories/contracts/mocks/MockTally__factory.js.map +1 -0
  166. package/build/typechain-types/factories/contracts/mocks/index.d.ts +1 -0
  167. package/build/typechain-types/factories/contracts/mocks/index.d.ts.map +1 -1
  168. package/build/typechain-types/factories/contracts/mocks/index.js +3 -1
  169. package/build/typechain-types/factories/contracts/mocks/index.js.map +1 -1
  170. package/build/typechain-types/index.d.ts +2 -0
  171. package/build/typechain-types/index.d.ts.map +1 -1
  172. package/build/typechain-types/index.js +3 -1
  173. package/build/typechain-types/index.js.map +1 -1
  174. package/contracts/Tally.sol +52 -15
  175. package/contracts/interfaces/ITally.sol +3 -93
  176. package/contracts/mocks/MockTally.sol +37 -0
  177. package/package.json +6 -6
@@ -2,16 +2,8 @@
2
2
  pragma solidity ^0.8.28;
3
3
 
4
4
  /// @title ITally
5
- /// @notice Complete Tally interface
5
+ /// @notice Tally interface
6
6
  interface ITally {
7
- /// @notice Tally result
8
- struct TallyResult {
9
- /// Tally results value from tally.json
10
- uint256 value;
11
- /// Flag that this value was set and initialized
12
- bool isSet;
13
- }
14
-
15
7
  /// @notice tally result args
16
8
  struct AddTallyResultsArgs {
17
9
  /// @param voteOptionIndices Vote option index.
@@ -35,67 +27,6 @@ interface ITally {
35
27
  uint256 perVOSpentVoiceCreditsHash;
36
28
  }
37
29
 
38
- /// @notice Add and verify tally results by batch.
39
- /// @param args add tally result args
40
- function addTallyResults(AddTallyResultsArgs calldata args) external;
41
-
42
- /// @notice Update the state and ballot root commitment
43
- function updateSbCommitment() external;
44
-
45
- /// @notice Verify the result of a tally batch
46
- /// @param _newTallyCommitment the new tally commitment to be verified
47
- /// @param _proof the proof generated after tallying this batch
48
- function tallyVotes(uint256 _newTallyCommitment, uint256[8] calldata _proof) external;
49
-
50
- /// @notice Check if all ballots are tallied
51
- /// @return tallied whether all ballots are tallied
52
- function isTallied() external view returns (bool tallied);
53
-
54
- /// @notice Get the tally commitment
55
- /// @return The current tally commitment
56
- function tallyCommitment() external view returns (uint256);
57
-
58
- /// @notice Get the tally batch number
59
- /// @return The current tally batch number
60
- function tallyBatchNum() external view returns (uint256);
61
-
62
- /// @notice Get the final state and ballot commitment
63
- /// @return The sb commitment
64
- function sbCommitment() external view returns (uint256);
65
-
66
- /// @notice Get tally results for a specific index
67
- /// @param index The index to query
68
- /// @return The tally result
69
- function getTallyResults(uint256 index) external view returns (TallyResult memory);
70
-
71
- /// @notice Get the total number of tally results
72
- /// @return The total tally results count
73
- function totalTallyResults() external view returns (uint256);
74
-
75
- /// @notice Get the total spent voice credits
76
- /// @return The total spent amount
77
- function totalSpent() external view returns (uint256);
78
-
79
- /// @notice Get public circuit inputs.
80
- /// @param _batchStartIndex the batch start index
81
- /// @param _newTallyCommitment the new tally commitment to be verified
82
- /// @return publicInputs public circuit inputs
83
- function getPublicCircuitInputs(
84
- uint256 _batchStartIndex,
85
- uint256 _newTallyCommitment
86
- ) external view returns (uint256[] memory publicInputs);
87
-
88
- /// @notice Verify the tally proof using the verifying key
89
- /// @param _batchStartIndex the batch start index
90
- /// @param _newTallyCommitment the new tally commitment to be verified
91
- /// @param _proof the proof generated after processing all messages
92
- /// @return isValid whether the proof is valid
93
- function verifyTallyProof(
94
- uint256 _batchStartIndex,
95
- uint256 _newTallyCommitment,
96
- uint256[8] calldata _proof
97
- ) external view returns (bool isValid);
98
-
99
30
  /// @notice Verify the number of spent voice credits per vote option from the tally.json
100
31
  /// @param _voteOptionIndex the index of the vote option where credits were spent
101
32
  /// @param _spent the spent voice credits for a given vote option index
@@ -114,38 +45,17 @@ interface ITally {
114
45
  uint8 _voteOptionTreeDepth,
115
46
  uint256 _spentVoiceCreditsHash,
116
47
  uint256 _resultCommitment
117
- ) external view returns (bool isValid);
48
+ ) external view returns (bool);
118
49
 
119
50
  /// @notice Verify the number of spent voice credits from the tally.json
120
51
  /// @param _totalSpent spent field retrieved in the totalSpentVoiceCredits object
121
52
  /// @param _totalSpentSalt the corresponding salt in the totalSpentVoiceCredit object
122
53
  /// @param _resultCommitment hashLeftRight(merkle root of the results.tally, results.salt) in tally.json file
123
54
  /// @param _perVoteOptionSpentVoiceCreditsHash only for QV - hashLeftRight(merkle root of the no spent voice credits, salt)
124
- /// @return isValid Whether the provided values are valid
125
55
  function verifySpentVoiceCredits(
126
56
  uint256 _totalSpent,
127
57
  uint256 _totalSpentSalt,
128
58
  uint256 _resultCommitment,
129
59
  uint256 _perVoteOptionSpentVoiceCreditsHash
130
- ) external view returns (bool isValid);
131
-
132
- /// @notice Verify the result generated from the tally.json
133
- /// @param _voteOptionIndex the index of the vote option to verify the correctness of the tally
134
- /// @param _tallyResult Flattened array of the tally
135
- /// @param _tallyResultProof Corresponding proof of the tally result
136
- /// @param _tallyResultSalt the respective salt in the results object in the tally.json
137
- /// @param _voteOptionTreeDepth depth of the vote option tree
138
- /// @param _spentVoiceCreditsHash hashLeftRight(number of spent voice credits, spent salt)
139
- /// @param _perVoteOptionSpentVoiceCreditsHash hashLeftRight(merkle root of the no spent voice
140
- /// credits per vote option, perVoteOptionSpentVoiceCredits salt)
141
- /// @return isValid Whether the provided proof is valid
142
- function verifyTallyResult(
143
- uint256 _voteOptionIndex,
144
- uint256 _tallyResult,
145
- uint256[][] calldata _tallyResultProof,
146
- uint256 _tallyResultSalt,
147
- uint8 _voteOptionTreeDepth,
148
- uint256 _spentVoiceCreditsHash,
149
- uint256 _perVoteOptionSpentVoiceCreditsHash
150
- ) external view returns (bool isValid);
60
+ ) external view returns (bool);
151
61
  }
@@ -0,0 +1,37 @@
1
+ // SPDX-License-Identifier: MIT
2
+ pragma solidity ^0.8.28;
3
+
4
+ import { ITally } from "../interfaces/ITally.sol";
5
+
6
+ contract MockTally is ITally {
7
+ bool public returnValue = true;
8
+
9
+ /// @notice Flip the return value
10
+ /// @dev used for mock testing
11
+ function flipReturnValue() external {
12
+ returnValue = !returnValue;
13
+ }
14
+
15
+ /// @inheritdoc ITally
16
+ function verifyPerVoteOptionSpentVoiceCredits(
17
+ uint256 _voteOptionIndex,
18
+ uint256 _spent,
19
+ uint256[][] calldata _spentProof,
20
+ uint256 _spentSalt,
21
+ uint8 _voteOptionTreeDepth,
22
+ uint256 _spentVoiceCreditsHash,
23
+ uint256 _resultCommitment
24
+ ) external view returns (bool) {
25
+ return returnValue;
26
+ }
27
+
28
+ /// @inheritdoc ITally
29
+ function verifySpentVoiceCredits(
30
+ uint256 _totalSpent,
31
+ uint256 _totalSpentSalt,
32
+ uint256 _resultCommitment,
33
+ uint256 _perVoteOptionSpentVoiceCreditsHash
34
+ ) external view returns (bool) {
35
+ return returnValue;
36
+ }
37
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maci-protocol/contracts",
3
- "version": "0.0.0-ci.d0dddbc",
3
+ "version": "0.0.0-ci.d4be71b",
4
4
  "private": false,
5
5
  "description": "Solidity Smart Contracts for MACI (Minimal Anti-Collusion Infrastructure)",
6
6
  "main": "build/ts/index.js",
@@ -222,9 +222,9 @@
222
222
  },
223
223
  "dependencies": {
224
224
  "@excubiae/contracts": "^0.11.0",
225
- "@maci-protocol/core": "0.0.0-ci.d0dddbc",
226
- "@maci-protocol/crypto": "0.0.0-ci.d0dddbc",
227
- "@maci-protocol/domainobjs": "0.0.0-ci.d0dddbc",
225
+ "@maci-protocol/core": "0.0.0-ci.d4be71b",
226
+ "@maci-protocol/crypto": "0.0.0-ci.d4be71b",
227
+ "@maci-protocol/domainobjs": "0.0.0-ci.d4be71b",
228
228
  "@nomicfoundation/hardhat-ethers": "^3.0.9",
229
229
  "@nomicfoundation/hardhat-toolbox": "^5.0.0",
230
230
  "@nomicfoundation/hardhat-verify": "^2.0.14",
@@ -249,7 +249,7 @@
249
249
  "@types/circomlibjs": "^0.1.6",
250
250
  "@types/lowdb": "^1.0.15",
251
251
  "@types/mocha": "^10.0.10",
252
- "@types/node": "^24.0.1",
252
+ "@types/node": "^22.15.17",
253
253
  "@types/sinon": "^17.0.4",
254
254
  "@types/snarkjs": "^0.7.9",
255
255
  "@types/uuid": "^10.0.0",
@@ -262,5 +262,5 @@
262
262
  "ts-node": "^10.9.1",
263
263
  "typescript": "^5.8.3"
264
264
  },
265
- "gitHead": "f41939d7f430a8b5c9b3729d6d12ca15d94cf181"
265
+ "gitHead": "e23a1a52f7a9ede9c18c13cadd7aebb27a66aa88"
266
266
  }