fix reference

pull/5370/head
yann300 2 years ago
parent a4c423deff
commit 03e668bf91
  1. 6
      libs/remix-lib/src/hash.ts
  2. 4
      libs/remix-simulator/src/vm-context.ts

@ -1,6 +1,6 @@
import { keccak224, keccak384, keccak256 as k256, keccak512 } from 'ethereum-cryptography/keccak'
const createHash = require('create-hash')
import * as rlp from 'rlp'
import { encode, Input } from 'rlp'
import { toBuffer, setLengthLeft, isHexString } from '@ethereumjs/util'
/**
@ -157,8 +157,8 @@ export const ripemd160FromArray = function(a: number[], padded: boolean): Buffer
* Creates SHA-3 hash of the RLP encoded version of the input.
* @param a The input data
*/
export const rlphash = function(a: rlp.Input): Buffer {
return keccak(rlp.encode(a))
export const rlphash = function(a: Input): Buffer {
return keccak(encode(a))
}
/**

@ -2,7 +2,7 @@
'use strict'
import { hash } from '@remix-project/remix-lib'
import { bufferToHex } from '@ethereumjs/util'
import rlp from 'rlp'
import { decode } from 'rlp'
import { execution } from '@remix-project/remix-lib'
const { LogsManager } = execution
import { VmProxy } from './VmProxy'
@ -66,7 +66,7 @@ class StateManagerCommonStorageDump extends DefaultStateManager {
const stream = trie.createReadStream()
stream.on('data', (val) => {
const value = rlp.decode(val.value)
const value = decode(val.value)
storage['0x' + val.key.toString('hex')] = {
key: this.keyHashes[val.key.toString('hex')],
value: '0x' + value.toString('hex')

Loading…
Cancel
Save