Skip to content

Commit 374493e

Browse files
committed
rename ProcessStateRootUpdated -> ProcessStateTransitioned
1 parent 94416a1 commit 374493e

File tree

4 files changed

+20
-6
lines changed

4 files changed

+20
-6
lines changed

docs/ProcessRegistry.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ Submits a state transition with zero-knowledge proof.
307307

308308
- Updates latest state root
309309
- Increments vote counts
310-
- Emits `ProcessStateRootUpdated`
310+
- Emits `ProcessStateTransitioned`
311311

312312
#### setProcessResults
313313

@@ -418,10 +418,10 @@ event ProcessDurationChanged(bytes32 indexed processId, uint256 duration)
418418

419419
Emitted when process duration is modified.
420420

421-
### ProcessStateRootUpdated
421+
### ProcessStateTransitioned
422422

423423
```solidity
424-
event ProcessStateRootUpdated(
424+
event ProcessStateTransitioned(
425425
bytes32 indexed processId,
426426
address indexed sender,
427427
uint256 newStateRoot

src/ProcessRegistry.sol

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,14 @@ contract ProcessRegistry is IProcessRegistry {
263263
p.voteOverwriteCount += decompressedInput[3];
264264
p.batchNumber++;
265265

266-
emit ProcessStateRootUpdated(processId, msg.sender, decompressedInput[1]);
266+
emit ProcessStateTransitioned(
267+
processId,
268+
msg.sender,
269+
decompressedInput[0],
270+
decompressedInput[1],
271+
p.voteCount,
272+
p.voteOverwriteCount
273+
);
267274
}
268275

269276
/// @inheritdoc IProcessRegistry

src/interfaces/IProcessRegistry.sol

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,14 @@ interface IProcessRegistry {
3535
* @param sender The address of the sender.
3636
* @param newStateRoot The new state root of the process.
3737
*/
38-
event ProcessStateRootUpdated(bytes32 indexed processId, address indexed sender, uint256 newStateRoot);
38+
event ProcessStateTransitioned(
39+
bytes32 indexed processId,
40+
address indexed sender,
41+
uint256 oldStateRoot,
42+
uint256 newStateRoot,
43+
uint256 newVoteCount,
44+
uint256 newVoteOverwrittenCount
45+
);
3946

4047
/*
4148
* @notice Emitted when the results of a process are set.

test/ProcessRegistry.t.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -925,7 +925,7 @@ contract ProcessRegistryTest is Test, TestHelpers {
925925
vm.mockCall(KZG_PRECOMPILE, "", abi.encode(FIELD_ELEMENTS_PER_BLOB, BLS_MODULUS));
926926

927927
// Submit state transition
928-
emit IProcessRegistry.ProcessStateRootUpdated(processId, address(this), ROOT_HASH_AFTER);
928+
emit IProcessRegistry.ProcessStateTransitioned(processId, address(this), ROOT_HASH_AFTER);
929929
processRegistry.submitStateTransition(processId, stateTransitionZKProof, stateTransitionInputs());
930930

931931
// Verify state after transition

0 commit comments

Comments
 (0)