---
title: "Comment by Hossein ghasemi on \"Building Rastakhmind: Decentralized State Verification & Layer 4 Architecture on EVM\" | Hashnode"
description: "// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; contract RastakhState { bytes32 public latestStateRoot; uint256 public lastUpdatedTimestamp; event Stat"
url: "https://hashnode.com/posts/building-rastakhmind-decentralized-state-verification-layer-4-architecture-on-evm/6aad78320e5decc552afae9b/comment/6aad7b2c2654862e7e814fa2"
---

[Discussion](https://hashnode.com/posts/building-rastakhmind-decentralized-state-verification-layer-4-architecture-on-evm/6aad78320e5decc552afae9b)

Comment [Building Rastakhmind: Decentralized State Verification & Layer 4 Architecture on EVM](https://hashnode.com/posts/building-rastakhmind-decentralized-state-verification-layer-4-architecture-on-evm/6aad78320e5decc552afae9b)

[Hossein ghasemi](https://hashnode.com/@rastakh-1)

[Sep 18](https://hashnode.com/posts/building-rastakhmind-decentralized-state-verification-layer-4-architecture-on-evm/6aad78320e5decc552afae9b/comment/6aad7b2c2654862e7e814fa2)

// SPDX-License-Identifier: MIT pragma solidity ^0.8.20;

contract RastakhState { bytes32 public latestStateRoot; uint256 public lastUpdatedTimestamp;

```
event StateUpdated(bytes32 indexed newRoot, uint256 timestamp);

function updateStateRoot(bytes32 _newRoot) external {
    latestStateRoot = _newRoot;
    lastUpdatedTimestamp = block.timestamp;
    emit StateUpdated(_newRoot, block.timestamp);
}
```

}
