File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 2
2
pragma solidity ^ 0.8.0 ;
3
3
4
4
import {RLPReader} from "optimism/packages/contracts-bedrock/src/libraries/rlp/RLPReader.sol " ;
5
- import {MerkleTrie} from "optimism/packages/contracts-bedrock/src/libraries/trie/MerkleTrie.sol " ;
6
5
import {SecureMerkleTrie} from "optimism/packages/contracts-bedrock/src/libraries/trie/SecureMerkleTrie.sol " ;
7
6
8
7
import {SSZ} from "./SSZ.sol " ;
@@ -113,10 +112,12 @@ library StateValidator {
113
112
bytes32 stateRoot ,
114
113
AccountProofParameters memory accountProofParams
115
114
) 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)));
118
115
// 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
+ });
120
121
121
122
// Extract storage root from account data
122
123
bytes32 storageRoot = _extractStorageRoot (encodedAccount);
You can’t perform that action at this time.
0 commit comments