require only computeOffsets in stateDecoder

refactor_remix_debug5_ab
Iuri Matias 4 years ago
parent 151c8bcc2b
commit 5bf88490f4
  1. 4
      libs/remix-debug/src/solidity-decoder/decodeInfo.js
  2. 4
      libs/remix-debug/src/solidity-decoder/stateDecoder.js

@ -369,8 +369,8 @@ function computeOffsets (types, stateDefinitions, contractName, location) {
}
module.exports = {
parseType: parseType,
computeOffsets: computeOffsets,
parseType,
computeOffsets,
Uint: uint,
Address: address,
Bool: bool,

@ -1,5 +1,5 @@
const astHelper = require('./astHelper')
const decodeInfo = require('./decodeInfo')
const {computeOffsets} = require('./decodeInfo')
/**
* decode the contract state storage
@ -40,7 +40,7 @@ function extractStateVariables (contractName, sourcesList) {
return []
}
const types = states[contractName].stateVariables
const offsets = decodeInfo.computeOffsets(types, states, contractName, 'storage')
const offsets = computeOffsets(types, states, contractName, 'storage')
if (!offsets) {
return [] // TODO should maybe return an error
}

Loading…
Cancel
Save