diff --git a/libs/remix-debug/src/solidity-decoder/decodeInfo.ts b/libs/remix-debug/src/solidity-decoder/decodeInfo.ts index 44c620615a..f141a7e1f9 100644 --- a/libs/remix-debug/src/solidity-decoder/decodeInfo.ts +++ b/libs/remix-debug/src/solidity-decoder/decodeInfo.ts @@ -11,6 +11,7 @@ import { Struct as StructType } from './types/Struct' import { Int as IntType } from './types/Int' import { Uint as UintType } from './types/Uint' import { Mapping as MappingType } from './types/Mapping' +import { FunctionType } from './types/FunctionType' import { extractLocation, removeLocation } from './types/util' /** @@ -78,6 +79,10 @@ function bool (type) { return new BoolType() } +function functionType (type, stateDefinitions, contractName, location) { + return new FunctionType(type, stateDefinitions, contractName, location) +} + /** * DynamicByteArray decode the given @arg type * @@ -300,7 +305,8 @@ function parseType (type, stateDefinitions, contractName, location) { struct: struct, int: int, uint: uint, - mapping: mapping + mapping: mapping, + function: functionType } const currentType = typeClass(type) if (currentType === null) { diff --git a/libs/remix-debug/src/solidity-decoder/types/FunctionType.ts b/libs/remix-debug/src/solidity-decoder/types/FunctionType.ts new file mode 100644 index 0000000000..765edcf980 --- /dev/null +++ b/libs/remix-debug/src/solidity-decoder/types/FunctionType.ts @@ -0,0 +1,12 @@ +'use strict' +import { ValueType } from './ValueType' + +export class FunctionType extends ValueType { + constructor (type, stateDefinitions, contractName, location) { + super(1, 8, 'function') + } + + decodeValue (value) { + return value + } +}