Skip to content

Commit 24afd8c

Browse files
committed
feat(contracts): only use tally in execute
1 parent 2043803 commit 24afd8c

File tree

3 files changed

+17
-19
lines changed

3 files changed

+17
-19
lines changed

packages/contracts/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
"maci-domainobjs": "^2.5.0"
2020
},
2121
"devDependencies": {
22-
"@aragon/osx-commons-configs": "0.4.0",
23-
"@aragon/osx-commons-sdk": "0.0.1-alpha.11",
24-
"@aragon/osx-ethers": "1.4.0-alpha.0",
22+
"@aragon/osx-commons-configs": "^0.8.0",
23+
"@aragon/osx-commons-sdk": "^0.2.0",
24+
"@aragon/osx-ethers": "^1.4.0",
2525
"@ethersproject/abi": "5.7.0",
2626
"@ethersproject/abstract-signer": "5.7.0",
2727
"@ethersproject/bignumber": "5.7.0",

packages/contracts/src/MaciVoting.sol

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,15 +337,14 @@ contract MaciVoting is PluginUUPSUpgradeable, ProposalUpgradeable, IMaciVoting {
337337
Proposal storage proposal_ = proposals[_proposalId];
338338

339339
IMACI.PollContracts memory pollContracts = maci.getPoll(proposal_.pollId);
340-
IPoll poll_ = IPoll(pollContracts.poll);
341340
Tally tally_ = Tally(pollContracts.tally);
342341

343342
// Verify that the proposal has not been executed already.
344343
if (proposal_.executed) {
345344
return false;
346345
}
347346
// Verify that the proposal poll has ended.
348-
if (block.timestamp < poll_.endDate()) {
347+
if (!tally_.isTallied()) {
349348
return false;
350349
}
351350
// Check if the minimum participation threshold has been reached based on final voting results.

packages/contracts/yarn.lock

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
resolved "https://registry.yarnpkg.com/@adraffy/ens-normalize/-/ens-normalize-1.10.1.tgz#63430d04bd8c5e74f8d7d049338f1cd9d4f02069"
88
integrity sha512-96Z2IP3mYmF1Xg2cDm8f1gWGf/HUVedQ3FMifV4kG/PQ4yEP51xDtRAEfhVNt5f/uzpNkZHwWQuUcu6D6K+Ekw==
99

10-
"@aragon/osx-commons-configs@0.4.0", "@aragon/osx-commons-configs@^0.4.0":
11-
version "0.4.0"
12-
resolved "https://registry.yarnpkg.com/@aragon/osx-commons-configs/-/osx-commons-configs-0.4.0.tgz#5b6ae025de1ccf7f9a135bfbcb0aa822c774acf9"
13-
integrity sha512-/2wIQCbv/spMRdOjRXK0RrXG1TK5aMcbD73RvMgMwQwSrKcA1dCntUuSxmTm2W8eEtOzs8E1VPjqZk0cXL4SSQ==
10+
"@aragon/osx-commons-configs@^0.8.0":
11+
version "0.8.0"
12+
resolved "https://registry.yarnpkg.com/@aragon/osx-commons-configs/-/osx-commons-configs-0.8.0.tgz#71e27c7063c3ca7a26a2c5ae12594063800bd9db"
13+
integrity sha512-O8CIKxm+jCN4sq8DBAISlo+Y75VKY03uMqGVP1bUxshqW3ax42r2vlYtTRE/0dJgS9Yh5ElO1tVfDutsGoYWoA==
1414
dependencies:
1515
tslib "^2.6.2"
1616

@@ -22,24 +22,23 @@
2222
"@openzeppelin/contracts" "4.9.6"
2323
"@openzeppelin/contracts-upgradeable" "4.9.6"
2424

25-
"@aragon/osx-commons-sdk@0.0.1-alpha.11":
26-
version "0.0.1-alpha.11"
27-
resolved "https://registry.yarnpkg.com/@aragon/osx-commons-sdk/-/osx-commons-sdk-0.0.1-alpha.11.tgz#1e3e39aac3351b6649921a5e373a5146b86b2c92"
28-
integrity sha512-/FgTLnS73QY0JxZYQlHwpd2ZuMPkPKdIlci9T4jgH9E4Eyyxh6GX7fJK+HekCcf6oMS5tTZ/Cb3sVyyzoO95iw==
25+
"@aragon/osx-commons-sdk@^0.2.0":
26+
version "0.2.0"
27+
resolved "https://registry.yarnpkg.com/@aragon/osx-commons-sdk/-/osx-commons-sdk-0.2.0.tgz#e5ca5db172866775a02337c22af3a05ac16541fa"
28+
integrity sha512-bxzvIbxdQtObqLPrJlJcPuy2cMzrE9TI7zlNMcbKnyr4swp44ZHZi5NKcwX1eFAf+oZc1aFlehb1gPwPMvaT8Q==
2929
dependencies:
30-
"@aragon/osx-commons-configs" "^0.4.0"
30+
"@aragon/osx-commons-configs" "^0.8.0"
3131
"@ethersproject/address" "5.7.0"
3232
"@ethersproject/bignumber" "5.7.0"
3333
"@ethersproject/contracts" "5.7.0"
3434
"@ethersproject/hash" "5.7.0"
3535
"@ethersproject/logger" "5.7.0"
3636
"@ethersproject/providers" "5.7.2"
37-
ipfs-http-client "^51.0.0"
3837

39-
"@aragon/osx-ethers@1.4.0-alpha.0":
40-
version "1.4.0-alpha.0"
41-
resolved "https://registry.yarnpkg.com/@aragon/osx-ethers/-/osx-ethers-1.4.0-alpha.0.tgz#329f1ac27660b486fa0b296dddeb004ce352001c"
42-
integrity sha512-fFsrG/XMIjZe3MxVQdf87gqAC4q0Z/eBp72QUuzXJQ0gMSTSj/4TvveFn1N8toLN6KsJolMEkaTamyCGYR+5iA==
38+
"@aragon/osx-ethers@^1.4.0":
39+
version "1.4.0"
40+
resolved "https://registry.yarnpkg.com/@aragon/osx-ethers/-/osx-ethers-1.4.0.tgz#b36b61973ef50798706c2645056a4ff6dc357f4a"
41+
integrity sha512-7DoidZNuFHkps9oYuU+da/NJ+ItPXpfu9wja5vHtS0ExFMcU8ZbCDJGBaDMc0m/Q0kNeFIinCeQS6e1lUDx7VA==
4342
dependencies:
4443
ethers "^5.6.2"
4544

0 commit comments

Comments
 (0)