diff --git a/solidity/contracts/StorageMirrorRootRegistry.sol b/solidity/contracts/StorageMirrorRootRegistry.sol index abccd89..0bbed98 100644 --- a/solidity/contracts/StorageMirrorRootRegistry.sol +++ b/solidity/contracts/StorageMirrorRootRegistry.sol @@ -30,6 +30,11 @@ contract StorageMirrorRootRegistry is IStorageMirrorRootRegistry { */ bytes32 public latestVerifiedStorageMirrorStorageRoot; + /** + * @notice The latest verified block number of the Home chain + */ + uint256 public latestVerifiedBlockNumber; + constructor(address _storageMirror, IVerifierModule _verifierModule, IBlockHeaderOracle _blockHeaderOracle) { STORAGE_MIRROR = _storageMirror; VERIFIER_MODULE = _verifierModule; @@ -49,6 +54,7 @@ contract StorageMirrorRootRegistry is IStorageMirrorRootRegistry { VERIFIER_MODULE.extractStorageMirrorStorageRoot(_blockHeader, _accountProof); latestVerifiedStorageMirrorStorageRoot = _latestVerifiedStorageMirrorStorageRoot; + latestVerifiedBlockNumber = _blockNumber; emit VerifiedStorageMirrorStorageRoot(_blockNumber, latestVerifiedStorageMirrorStorageRoot); } diff --git a/solidity/interfaces/IStorageMirrorRootRegistry.sol b/solidity/interfaces/IStorageMirrorRootRegistry.sol index 51c0049..165686a 100644 --- a/solidity/interfaces/IStorageMirrorRootRegistry.sol +++ b/solidity/interfaces/IStorageMirrorRootRegistry.sol @@ -38,6 +38,12 @@ interface IStorageMirrorRootRegistry { */ function BLOCK_HEADER_ORACLE() external view returns (IBlockHeaderOracle _blockHeaderOracle); + /** + * @notice The latest verified block number of the Home chain + * @return _latestVerifiedBlockNumber The latest verified block number of the Home chain + */ + function latestVerifiedBlockNumber() external view returns (uint256 _latestVerifiedBlockNumber); + /** * @notice The latest verified storage root of the StorageMirror contract in Home chain * @return _latestVerifiedStorageMirrorStorageRoot The latest verified storage root of the StorageMirror contract in Home chain