Unverified Commit be8fedb6 authored by yann300's avatar yann300 Committed by GitHub

ignore mapping if struct in memory (#1308)

parent 360ddee8
......@@ -38,7 +38,7 @@ export class Mapping extends RefType {
decodeFromMemoryInternal (offset, memory) {
// mappings can only exist in storage and not in memory
// so this should never be called
return { value: '<not implemented>', length: '0x', type: this.typeName }
return { value: '', length: '0x0', type: this.typeName }
}
async decodeMappingsLocation (preimages, location, storageResolver) {
......
'use strict'
import { add } from './util'
import { RefType } from './RefType'
import { Mapping } from './Mapping'
export class Struct extends RefType {
members
......@@ -33,7 +34,7 @@ export class Struct extends RefType {
var contentOffset = offset
var member = item.type.decodeFromMemory(contentOffset, memory)
ret[item.name] = member
offset += 32
if (!(item.type instanceof Mapping)) offset += 32
})
return { value: ret, type: this.typeName }
}
......
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