Problem
When a proposal wins and its execution batch reverts (e.g., insufficient funds, invalid target, contract error), the entire announceWinner transaction reverts. The Winner event never emits, so the subgraph never updates the proposal status. The proposal stays "Active" forever in the frontend even after voting has ended.
Example: Argus org has proposals #1, #10, #12 stuck as "Active" despite their voting period ending.
Root Cause
HybridVotingCore.sol line 225:
```solidity
l.executor.execute(id, batch); // reverts → whole tx reverts → no Winner event
```
Fix (Smart Contracts) — DONE
Wrapped executor call in try-catch in both HybridVoting and DirectDemocracyVoting:
```solidity
try l.executor.execute(id, batch) {
didExecute = true;
emit ProposalExecuted(id, winner, batch.length);
} catch (bytes memory reason) {
emit ProposalExecutionFailed(id, winner, reason);
}
emit Winner(id, winner, valid, didExecute, uint64(block.timestamp));
```
New event: `ProposalExecutionFailed(uint256 indexed id, uint256 indexed winningIdx, bytes reason)`
Tests pass (1211). Needs beacon upgrade (HybridVoting v9 + DirectDemocracyVoting v9).
Remaining Work
Subgraph
- Add `ProposalExecutionFailed` event handler
- Set proposal status to "ExecutionFailed" or "Completed" when this event fires
- Add `executionFailed` and `executionError` fields to Proposal entity
Frontend
- Display "Execution Failed" status for proposals that won but failed to execute
- Show the revert reason if available
- Allow re-calling `announceWinner` for proposals where the underlying issue has been fixed
Deploy
- Deploy HybridVoting v9 + DirectDemocracyVoting v9 via existing `UpgradeVotingSelfTarget.s.sol` script
Problem
When a proposal wins and its execution batch reverts (e.g., insufficient funds, invalid target, contract error), the entire
announceWinnertransaction reverts. TheWinnerevent never emits, so the subgraph never updates the proposal status. The proposal stays "Active" forever in the frontend even after voting has ended.Example: Argus org has proposals #1, #10, #12 stuck as "Active" despite their voting period ending.
Root Cause
HybridVotingCore.solline 225:```solidity
l.executor.execute(id, batch); // reverts → whole tx reverts → no Winner event
```
Fix (Smart Contracts) — DONE
Wrapped executor call in try-catch in both HybridVoting and DirectDemocracyVoting:
```solidity
try l.executor.execute(id, batch) {
didExecute = true;
emit ProposalExecuted(id, winner, batch.length);
} catch (bytes memory reason) {
emit ProposalExecutionFailed(id, winner, reason);
}
emit Winner(id, winner, valid, didExecute, uint64(block.timestamp));
```
New event: `ProposalExecutionFailed(uint256 indexed id, uint256 indexed winningIdx, bytes reason)`
Tests pass (1211). Needs beacon upgrade (HybridVoting v9 + DirectDemocracyVoting v9).
Remaining Work
Subgraph
Frontend
Deploy