This repository was archived by the owner on Aug 4, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22pragma solidity ^ 0.8.0 ;
33
44import {RLPReader} from "optimism/packages/contracts-bedrock/src/libraries/rlp/RLPReader.sol " ;
5- import {MerkleTrie} from "optimism/packages/contracts-bedrock/src/libraries/trie/MerkleTrie.sol " ;
65import {SecureMerkleTrie} from "optimism/packages/contracts-bedrock/src/libraries/trie/SecureMerkleTrie.sol " ;
76
87import {SSZ} from "./SSZ.sol " ;
@@ -113,10 +112,12 @@ library StateValidator {
113112 bytes32 stateRoot ,
114113 AccountProofParameters memory accountProofParams
115114 ) internal pure returns (bool ) {
116- // Derive the account key that shows up in the execution client's merkle trie
117- bytes memory accountKey = abi.encodePacked (keccak256 (abi.encodePacked (account)));
118115 // Use the account proof to derive the RLP-encoded account metadata
119- bytes memory encodedAccount = MerkleTrie.get (accountKey, accountProofParams.accountProof, stateRoot);
116+ bytes memory encodedAccount = SecureMerkleTrie.get ({
117+ _key: abi.encodePacked (account),
118+ _proof: accountProofParams.accountProof,
119+ _root: stateRoot
120+ });
120121
121122 // Extract storage root from account data
122123 bytes32 storageRoot = _extractStorageRoot (encodedAccount);
You can’t perform that action at this time.
0 commit comments