commit
478560e160
@ -1,11 +1,10 @@ |
||||
{ |
||||
"lerna": "2.10.2", |
||||
"packages": [ |
||||
"remix-core", |
||||
"remix-debug", |
||||
"remix-debugger", |
||||
"remix-lib", |
||||
"remix-solidity" |
||||
"remix-solidity", |
||||
"remix-analyzer" |
||||
], |
||||
"version": "independent" |
||||
} |
||||
|
@ -0,0 +1,5 @@ |
||||
var CodeAnalysis = require('./src/solidity-analyzer') |
||||
|
||||
module.exports = { |
||||
CodeAnalysis: CodeAnalysis |
||||
} |
@ -0,0 +1,41 @@ |
||||
{ |
||||
"name": "remix-analyzer", |
||||
"version": "0.2.0", |
||||
"description": "Remix Analyzer", |
||||
"main": "./index.js", |
||||
"contributors": [ |
||||
{ |
||||
"name": "Alex Beregszaszi", |
||||
"email": "alex@rtfs.hu" |
||||
}, |
||||
{ |
||||
"name": "Iuri Matias", |
||||
"email": "iuri@ethereum.org" |
||||
}, |
||||
{ |
||||
"name": "Yann Levreau", |
||||
"email": "yann@ethdev.com" |
||||
} |
||||
], |
||||
"dependencies": { |
||||
"babel-eslint": "^7.1.1", |
||||
"babel-plugin-transform-object-assign": "^6.22.0", |
||||
"babel-preset-es2015": "^6.24.0", |
||||
"remix-lib": "^0.3.0", |
||||
"solc": "^0.4.24", |
||||
"standard": "^7.0.1", |
||||
"tape": "^4.6.0" |
||||
}, |
||||
"scripts": { |
||||
"test": "standard && tape ./test/tests.js" |
||||
}, |
||||
"standard": { |
||||
"ignore": [ |
||||
"node_modules/*" |
||||
], |
||||
"parser": "babel-eslint" |
||||
}, |
||||
"author": "Remix Team", |
||||
"license": "MIT", |
||||
"homepage": "https://github.com/ethereum/remix#readme" |
||||
} |
@ -1,6 +1,6 @@ |
||||
var test = require('tape') |
||||
|
||||
var common = require('../../src/analysis/modules/staticAnalysisCommon') |
||||
var common = require('../../src/solidity-analyzer/modules/staticAnalysisCommon') |
||||
|
||||
function escapeRegExp (str) { |
||||
return str.replace(/[-[\]/{}()+?.\\^$|]/g, '\\$&') |
@ -1,7 +1,3 @@ |
||||
require('./decoder/decodeInfo.js') |
||||
require('./decoder/storageLocation.js') |
||||
require('./decoder/storageDecoder.js') |
||||
require('./decoder/localDecoder.js') |
||||
|
||||
require('./analysis/staticAnalysisCommon-test.js') |
||||
require('./analysis/staticAnalysisIntegration-test.js') |
@ -1,165 +0,0 @@ |
||||
# `remix-core` |
||||
|
||||
Provides: |
||||
|
||||
```javascript |
||||
{ |
||||
code: { |
||||
CodeManager: CodeManager, |
||||
BreakpointManager: BreakpointManager |
||||
}, |
||||
storage: { |
||||
StorageViewer: StorageViewer, |
||||
StorageResolver: StorageResolver |
||||
}, |
||||
trace: { |
||||
TraceManager: TraceManager |
||||
} |
||||
} |
||||
``` |
||||
|
||||
|
||||
TraceManager is a convenient way to access a VM Trace and resolve some value from it. |
||||
|
||||
`TraceManager()` : |
||||
|
||||
`function resolveTrace(stepIndex, tx)` |
||||
|
||||
`function init(stepIndex, tx)` |
||||
|
||||
`function inRange(stepIndex, tx)` |
||||
|
||||
`function isLoaded(stepIndex, tx)` |
||||
|
||||
`function getLength(stepIndex, tx)` |
||||
|
||||
`function accumulateStorageChanges(stepIndex, tx)` |
||||
|
||||
`function getAddresses(stepIndex, tx)` |
||||
|
||||
`function getCallDataAt(stepIndex, tx)` |
||||
|
||||
`function getCallStackAt(stepIndex, tx)` |
||||
|
||||
`function getStackAt(stepIndex, tx)` |
||||
|
||||
`function getLastCallChangeSince(stepIndex, tx)` |
||||
|
||||
`function getCurrentCalledAddressAt(stepIndex, tx)` |
||||
|
||||
`function getContractCreationCode(stepIndex, tx)` |
||||
|
||||
`function getMemoryAt(stepIndex, tx)` |
||||
|
||||
`function getCurrentPC(stepIndex, tx)` |
||||
|
||||
`function getReturnValue(stepIndex, tx)` |
||||
|
||||
`function getCurrentStep(stepIndex, tx)` |
||||
|
||||
`function getMemExpand(stepIndex, tx)` |
||||
|
||||
`function getStepCost(stepIndex, tx)` |
||||
|
||||
`function getRemainingGas(stepIndex, tx)` |
||||
|
||||
`function getStepCost(stepIndex, tx)` |
||||
|
||||
`function isCreationStep(stepIndex, tx)` |
||||
|
||||
`function findStepOverBack(stepIndex, tx)` |
||||
|
||||
`function findStepOverForward(stepIndex, tx)` |
||||
|
||||
`function findStepOverBack(stepIndex, tx)` |
||||
|
||||
`function findNextCall(stepIndex, tx)` |
||||
|
||||
`function findStepOut(stepIndex, tx)` |
||||
|
||||
`function checkRequestedStep(stepIndex, tx)` |
||||
|
||||
`function waterfall(stepIndex, tx)` |
||||
|
||||
|
||||
- - - - |
||||
|
||||
`CodeManager(_traceManager)` : |
||||
|
||||
`function getCode(stepIndex, tx)` : |
||||
Resolve the code of the given @arg stepIndex and trigger appropriate event |
||||
|
||||
`function resolveStep(address, cb)` : |
||||
Retrieve the code located at the given @arg address |
||||
|
||||
`function getFunctionFromStep(stepIndex, sourceMap, ast)` : |
||||
Retrieve the called function for the current vm step |
||||
|
||||
`function getInstructionIndex(address, step, callback)` : |
||||
Retrieve the instruction index of the given @arg step |
||||
|
||||
`function getFunctionFromPC(address, pc, sourceMap, ast)` : |
||||
Retrieve the called function for the given @arg pc and @arg address |
||||
|
||||
- - - - |
||||
|
||||
`BreakpointManager(_ethdebugger, _locationToRowConverter)` : |
||||
|
||||
`function jumpNextBreakpoint(defaultToLimit)` : |
||||
start looking for the next breakpoint |
||||
|
||||
`function jumpPreviousBreakpoint(defaultToLimit)` : |
||||
start looking for the previous breakpoint |
||||
|
||||
`function jump(direction, defaultToLimit)` : |
||||
start looking for the previous or next breakpoint |
||||
|
||||
`function hasBreakpointAtLine((fileIndex, line)` : |
||||
check the given pair fileIndex/line against registered breakpoints |
||||
|
||||
`function hasBreakpoint()` : |
||||
return true if current manager has breakpoint |
||||
|
||||
`function add(sourceLocation)` : |
||||
add a new breakpoint to the manager |
||||
|
||||
`function remove(sourceLocation)` : |
||||
remove a breakpoint from the manager |
||||
|
||||
- - - - |
||||
|
||||
`StorageViewer(_context, _storageResolver, _traceManager)` : |
||||
|
||||
`function storageRange(defaultToLimit)` : |
||||
return the storage for the current context (address and vm trace index) |
||||
|
||||
`function storageSlot(defaultToLimit)` : |
||||
return a slot value for the current context (address and vm trace index) |
||||
|
||||
`function isComplete(direction, defaultToLimit)` : |
||||
return True if the storage at @arg address is complete |
||||
|
||||
`function initialMappingsLocation((fileIndex, line)` : |
||||
return all the possible mappings locations for the current context (cached) do not return state changes during the current transaction |
||||
|
||||
`function mappingsLocation()` : |
||||
return all the possible mappings locations for the current context (cached) and current mapping slot. returns state changes during the current transaction |
||||
|
||||
`function extractMappingsLocationChanges(sourceLocation)` : |
||||
retrieve mapping location changes from the storage changes. |
||||
|
||||
- - - - |
||||
|
||||
`StorageResolver()` : |
||||
|
||||
`function storageRange(tx, stepIndex, address, callback)` : |
||||
return the storage for the current context (address and vm trace index) |
||||
|
||||
`function initialPreimagesMappings(tx, stepIndex, address, callback)` : |
||||
return a slot value for the current context (address and vm trace index) |
||||
|
||||
`function storageSlot(slot, tx, stepIndex, address, callback)` : |
||||
return True if the storage at @arg address is complete |
||||
|
||||
`function isComplete(address)` : |
||||
return all the possible mappings locations for the current context (cached) do not return state changes during the current transaction |
@ -1,19 +0,0 @@ |
||||
var CodeManager = require('./src/code/codeManager') |
||||
var BreakpointManager = require('./src/code/breakpointManager') |
||||
var StorageViewer = require('./src/storage/storageViewer') |
||||
var StorageResolver = require('./src/storage/storageResolver') |
||||
var TraceManager = require('./src/trace/traceManager') |
||||
|
||||
module.exports = { |
||||
code: { |
||||
CodeManager: CodeManager, |
||||
BreakpointManager: BreakpointManager |
||||
}, |
||||
storage: { |
||||
StorageViewer: StorageViewer, |
||||
StorageResolver: StorageResolver |
||||
}, |
||||
trace: { |
||||
TraceManager: TraceManager |
||||
} |
||||
} |
@ -1,79 +0,0 @@ |
||||
{ |
||||
"name": "remix-core", |
||||
"version": "0.0.15", |
||||
"description": "Ethereum IDE and tools for the web", |
||||
"contributors": [ |
||||
{ |
||||
"name": "Yann Levreau", |
||||
"email": "yann@ethereum.com" |
||||
}, |
||||
{ |
||||
"name": "Liana Husikyan", |
||||
"email": "liana@ethereum.com" |
||||
} |
||||
], |
||||
"main": "./index.js", |
||||
"dependencies": { |
||||
"babel-eslint": "^7.1.1", |
||||
"babel-plugin-transform-object-assign": "^6.22.0", |
||||
"babel-preset-es2015": "^6.24.0", |
||||
"babelify": "^7.3.0", |
||||
"fast-async": "^6.1.2", |
||||
"remix-lib": "^0.2.9", |
||||
"standard": "^7.0.1", |
||||
"tape": "^4.6.0" |
||||
}, |
||||
"scripts": { |
||||
"test": "standard && tape ./test/tests.js" |
||||
}, |
||||
"standard": { |
||||
"ignore": [ |
||||
"node_modules/*", |
||||
"build/*", |
||||
"test/resources/*" |
||||
], |
||||
"parser": "babel-eslint" |
||||
}, |
||||
"repository": { |
||||
"type": "git", |
||||
"url": "git+https://github.com/ethereum/remix.git" |
||||
}, |
||||
"author": "cpp-ethereum team", |
||||
"license": "MIT", |
||||
"bugs": { |
||||
"url": "https://github.com/ethereum/remix/issues" |
||||
}, |
||||
"homepage": "https://github.com/ethereum/remix#readme", |
||||
"browserify": { |
||||
"transform": [ |
||||
[ |
||||
"babelify", |
||||
{ |
||||
"plugins": [ |
||||
[ |
||||
"fast-async", |
||||
{ |
||||
"runtimePatten": null, |
||||
"compiler": { |
||||
"promises": true, |
||||
"es7": true, |
||||
"noRuntime": true, |
||||
"wrapAwait": true |
||||
} |
||||
} |
||||
], |
||||
"transform-object-assign" |
||||
] |
||||
} |
||||
], |
||||
[ |
||||
"babelify", |
||||
{ |
||||
"presets": [ |
||||
"es2015" |
||||
] |
||||
} |
||||
] |
||||
] |
||||
} |
||||
} |
@ -1,3 +0,0 @@ |
||||
require('./traceManager.js') |
||||
require('./codeManager.js') |
||||
require('./disassembler.js') |
@ -0,0 +1,11 @@ |
||||
var SolidityProxy = require('./solidityProxy') |
||||
var stateDecoder = require('./stateDecoder') |
||||
var localDecoder = require('./localDecoder') |
||||
var InternalCallTree = require('./internalCallTree') |
||||
|
||||
module.exports = { |
||||
SolidityProxy: SolidityProxy, |
||||
stateDecoder: stateDecoder, |
||||
localDecoder: localDecoder, |
||||
InternalCallTree: InternalCallTree |
||||
} |
@ -1,14 +1,14 @@ |
||||
'use strict' |
||||
var tape = require('tape') |
||||
var compiler = require('solc') |
||||
var astHelper = require('../../src/decoder/astHelper') |
||||
var decodeInfo = require('../../src/decoder/decodeInfo') |
||||
var stateDecoder = require('../../src/decoder/stateDecoder') |
||||
var astHelper = require('../../src/solidity-decoder/astHelper') |
||||
var decodeInfo = require('../../src/solidity-decoder/decodeInfo') |
||||
var stateDecoder = require('../../src/solidity-decoder/stateDecoder') |
||||
var contracts = require('./contracts/miscContracts') |
||||
var simplecontracts = require('./contracts/simpleContract') |
||||
var remixLib = require('remix-lib') |
||||
var compilerInput = remixLib.helpers.compiler.compilerInput |
||||
var util = require('../../src/decoder/types/util') |
||||
var util = require('../../src/solidity-decoder/types/util') |
||||
|
||||
tape('solidity', function (t) { |
||||
t.test('astHelper, decodeInfo', function (st) { |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue