Commit b0974cde authored by Kevin Ho's avatar Kevin Ho Committed by GitHub

Fix rlp encoding bug in contract dump (#137)

* fix rlp encoding bug in contract dump

* lint
parent 644e437c
......@@ -44,8 +44,10 @@ const getStorageDump = async (
const stream = trie.createReadStream()
stream.on('data', (val: any) => {
storage['0x' + val.key.toString('hex')] =
'0x' + val.value.toString('hex').slice(2)
const storageSlotValue = ethers.utils.RLP.decode(
'0x' + val.value.toString('hex')
)
storage['0x' + val.key.toString('hex')] = storageSlotValue
})
stream.on('end', () => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment