diff --git a/core/blockchain.go b/core/blockchain.go index bca7cef643..da5c93c5c0 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -1809,8 +1809,10 @@ func (bc *BlockChain) writeBlockWithState(block *types.Block, receipts []*types. rawdb.WriteBlobSidecars(blockBatch, block.Hash(), block.NumberU64(), block.Sidecars()) } if bc.db.StateStore() != nil { + rawdb.WriteTransferLogs(bc.db.StateStore(), block.Hash(), block.NumberU64(), state.TransferLogs()) rawdb.WritePreimages(bc.db.StateStore(), state.Preimages()) } else { + rawdb.WriteTransferLogs(blockBatch, block.Hash(), block.NumberU64(), state.TransferLogs()) rawdb.WritePreimages(blockBatch, state.Preimages()) } if err := blockBatch.Write(); err != nil { diff --git a/internal/web3ext/web3ext.go b/internal/web3ext/web3ext.go index ae2c5af239..46c2f85bd6 100644 --- a/internal/web3ext/web3ext.go +++ b/internal/web3ext/web3ext.go @@ -505,6 +505,12 @@ web3._extend({ params: 1, inputFormatter: [null], }), + new web3._extend.Method({ + name: 'getTransferLogs', + call: 'debug_getTransferLogs', + params: 1, + inputFormatter: [null], + }), new web3._extend.Method({ name: 'getBlockReceipts', call: 'debug_getBlockReceipts',