@@ -54,6 +54,7 @@ type Database interface {
5454 // Arbitrum: Read activated Stylus contracts
5555 ActivatedAsm (moduleHash common.Hash ) (asm []byte , err error )
5656 ActivatedModule (moduleHash common.Hash ) (module []byte , err error )
57+ WasmStore () ethdb.KeyValueStore
5758
5859 // OpenTrie opens the main account trie.
5960 OpenTrie (root common.Hash ) (Trie , error )
@@ -164,6 +165,7 @@ func NewDatabaseWithConfig(db ethdb.Database, config *trie.Config) Database {
164165 activatedModuleCache : lru.NewSizeConstrainedCache [common.Hash , []byte ](activatedWasmCacheSize ),
165166
166167 disk : db ,
168+ wasmdb : db .WasmDataBase (),
167169 codeSizeCache : lru.NewCache [common.Hash , int ](codeSizeCacheSize ),
168170 codeCache : lru.NewSizeConstrainedCache [common.Hash , []byte ](codeCacheSize ),
169171 triedb : trie .NewDatabase (db , config ),
@@ -179,6 +181,7 @@ func NewDatabaseWithNodeDB(db ethdb.Database, triedb *trie.Database) Database {
179181 activatedModuleCache : lru.NewSizeConstrainedCache [common.Hash , []byte ](activatedWasmCacheSize ),
180182
181183 disk : db ,
184+ wasmdb : db .WasmDataBase (),
182185 codeSizeCache : lru.NewCache [common.Hash , int ](codeSizeCacheSize ),
183186 codeCache : lru.NewSizeConstrainedCache [common.Hash , []byte ](codeCacheSize ),
184187 triedb : triedb ,
@@ -192,11 +195,16 @@ type cachingDB struct {
192195 activatedModuleCache * lru.SizeConstrainedCache [common.Hash , []byte ]
193196
194197 disk ethdb.KeyValueStore
198+ wasmdb ethdb.KeyValueStore
195199 codeSizeCache * lru.Cache [common.Hash , int ]
196200 codeCache * lru.SizeConstrainedCache [common.Hash , []byte ]
197201 triedb * trie.Database
198202}
199203
204+ func (db * cachingDB ) WasmStore () ethdb.KeyValueStore {
205+ return db .wasmdb
206+ }
207+
200208// OpenTrie opens the main account trie at a specific root hash.
201209func (db * cachingDB ) OpenTrie (root common.Hash ) (Trie , error ) {
202210 if db .triedb .IsVerkle () {
0 commit comments