Merge pull request #215 from serapath-contribution/master

REFACTOR npm scripts & minor code corrections
pull/7/head
chriseth 8 years ago committed by GitHub
commit 5118b61430
  1. 29
      .babelrc
  2. 33
      README.md
  3. 74
      package.json
  4. 4
      src/ui/TreeView.js
  5. 2
      test/astwalker.js
  6. 8
      test/codeManager.js
  7. 2
      test/disassembler.js
  8. 2
      test/eventManager.js
  9. 2
      test/index.js
  10. 2
      test/solidity/decodeInfo.js
  11. 4
      test/solidity/localDecoder.js
  12. 2
      test/solidity/localsTests/helper.js
  13. 14
      test/solidity/localsTests/int.js
  14. 14
      test/solidity/localsTests/misc.js
  15. 14
      test/solidity/localsTests/misc2.js
  16. 14
      test/solidity/localsTests/structArray.js
  17. 2
      test/solidity/storageDecoder.js
  18. 2
      test/solidity/storageLocation.js
  19. 2
      test/sourceMappingDecoder.js
  20. 6
      test/traceManager.js
  21. 4
      test/util.js

@ -1,29 +0,0 @@
{
"plugins": [["fast-async", {
"runtimePatten": null,
"compiler": {
"promises": true,
"es7": true,
"noRuntime": true,
"wrapAwait": true
}
}],
"check-es2015-constants",
"transform-es2015-arrow-functions",
"transform-es2015-block-scoped-functions",
"transform-es2015-block-scoping",
"transform-es2015-classes",
"transform-es2015-computed-properties",
"transform-es2015-destructuring",
"transform-es2015-duplicate-keys",
"transform-es2015-for-of",
"transform-es2015-function-name",
"transform-es2015-literals",
"transform-es2015-object-super",
"transform-es2015-parameters",
"transform-es2015-shorthand-properties",
"transform-es2015-spread",
"transform-es2015-sticky-regex",
"transform-es2015-unicode-regex",
]
}

@ -5,9 +5,9 @@ Ethereum IDE and tools for the web
## REMIX WEBSITE: ## REMIX WEBSITE:
Remix is avalaible at http://ethereum.github.io/remix. Remix is avalaible at http://ethereum.github.io/remix.
You can use it either inside Mist or by connecting to geth or eth. You can use it either inside Mist or by connecting to geth or eth.
Note that connecting to Geth does not work through https. Note that connecting to Geth does not work through https.
You'll have to run your own node using the following parameters: You'll have to run your own node using the following parameters:
@ -16,7 +16,7 @@ You'll have to run your own node using the following parameters:
Using Geth: Using Geth:
geth --rpc --rpcapi 'web3,eth,debug' --rpcport 8545 --rpccorsdomain '*' geth --rpc --rpcapi 'web3,eth,debug' --rpcport 8545 --rpccorsdomain '*'
Using Eth: Using Eth:
eth -j --rpccorsdomain '*' eth -j --rpccorsdomain '*'
@ -32,11 +32,26 @@ Brief instructions to build for linux(Todo add other platforms) we will add deta
Install eth or geth, npm and node.js (see https://docs.npmjs.com/getting-started/installing-node), then do: Install eth or geth, npm and node.js (see https://docs.npmjs.com/getting-started/installing-node), then do:
git clone https://github.com/ethereum/remix * `git clone https://github.com/ethereum/remix`
cd remix * `cd remix`
npm install && npm run build && npm run start_node * `npm install`
* `npm start`
open `remix/index.html` in your browser.
## TEST:
* For unit tests run `npm test`
open remix/index.html in your browser. * For local headless browser tests
* run once to install selenium: `npm run selenium-install`
* every time you want to run local browser tests, run: `npm run test-browser`
## DEVELOPING:
Run `npm run start_dev` and open `http://127.0.0.1:8080` in your browser.
Start developing and see your browser live reload when you save files
## REMIX First Step: ## REMIX First Step:
@ -45,7 +60,7 @@ There's two way of doing that:
- using a block number and a transaction index. - using a block number and a transaction index.
- using a transaction hash. - using a transaction hash.
When loading the transaction succeed, the hash, from and to field will show up. When loading the transaction succeed, the hash, from and to field will show up.
Then the vm trace is loaded. Then the vm trace is loaded.
The debugger itself contains several controls that allow stepping over the trace and seing the current state of a selected step. The debugger itself contains several controls that allow stepping over the trace and seing the current state of a selected step.
@ -61,7 +76,7 @@ Stepping actions are:
- Jump Next Call (this will select the next state that refers to a context changes - CALL, CALLCODE, DELEGATECALL, CREATE) - Jump Next Call (this will select the next state that refers to a context changes - CALL, CALLCODE, DELEGATECALL, CREATE)
#### State Viewer: #### State Viewer:
The upper right panel contains basic informations about the current step: The upper right panel contains basic informations about the current step:
- VMTraceStep: the index in the trace of the current step. - VMTraceStep: the index in the trace of the current step.
- Step - Step

@ -17,59 +17,50 @@
"which": "^1.2.10" "which": "^1.2.10"
}, },
"devDependencies": { "devDependencies": {
"babel-cli": "^6.16.0",
"babel-eslint": "^7.1.1", "babel-eslint": "^7.1.1",
"babel-plugin-check-es2015-constants": "^6.8.0", "babel-preset-es2015": "^6.24.0",
"babel-plugin-transform-es2015-arrow-functions": "^6.8.0",
"babel-plugin-transform-es2015-block-scoped-functions": "^6.8.0",
"babel-plugin-transform-es2015-block-scoping": "^6.18.0",
"babel-plugin-transform-es2015-classes": "^6.18.0",
"babel-plugin-transform-es2015-computed-properties": "^6.8.0",
"babel-plugin-transform-es2015-destructuring": "^6.18.0",
"babel-plugin-transform-es2015-duplicate-keys": "^6.8.0",
"babel-plugin-transform-es2015-for-of": "^6.18.0",
"babel-plugin-transform-es2015-function-name": "^6.9.0",
"babel-plugin-transform-es2015-literals": "^6.8.0",
"babel-plugin-transform-es2015-object-super": "^6.8.0",
"babel-plugin-transform-es2015-parameters": "^6.18.0",
"babel-plugin-transform-es2015-shorthand-properties": "^6.18.0",
"babel-plugin-transform-es2015-spread": "^6.8.0",
"babel-plugin-transform-es2015-sticky-regex": "^6.8.0",
"babel-plugin-transform-es2015-template-literals": "^6.8.0",
"babel-plugin-transform-es2015-unicode-regex": "^6.11.0",
"babel-plugin-transform-regenerator": "^6.16.1",
"babelify": "^7.3.0", "babelify": "^7.3.0",
"browserify": "^13.0.1", "browserify": "^13.0.1",
"ethereum-common": "0.0.18", "ethereum-common": "0.0.18",
"ethereumjs-block": "^1.2.2",
"ethereumjs-tx": "^1.1.1",
"ethereumjs-util": "^4.5.0", "ethereumjs-util": "^4.5.0",
"ethereumjs-vm": "^2.0.1",
"fast-async": "^6.1.2", "fast-async": "^6.1.2",
"http-server": "^0.9.0", "http-server": "^0.9.0",
"nightwatch": "^0.9.5", "nightwatch": "^0.9.5",
"selenium-standalone": "^6.0.1",
"solc": "^0.4.3", "solc": "^0.4.3",
"standard": "^7.0.1", "standard": "^7.0.1",
"standard-reporter": "^1.0.5", "standard-reporter": "^1.0.5",
"tape": "^4.6.0", "tape": "^4.6.0",
"web3": "^0.15.3", "web3": "^0.15.3",
"yo-yo": "^1.2.1", "yo-yo": "^1.2.1",
"yo-yoify": "^3.1.0", "yo-yoify": "^3.1.0"
"ethereumjs-block": "^1.2.2",
"ethereumjs-tx": "^1.1.1",
"ethereumjs-vm": "^2.0.1"
}, },
"scripts": { "scripts": {
"start_node": "./runNode.sh", "build": "mkdirp build; browserify src/index.js > build/app.js",
"start_eth": "npm run warning_message; eth -j --rpccorsdomain '*'", "lint": "standard | notify-error",
"start_geth": "npm run warning_message; geth --rpc --rpcapi 'web3,eth,debug' --rpcport 8545 --rpccorsdomain '*'",
"build": "mkdir build; browserify src/index.js -g yo-yoify -o build/app.js -t [ babelify ]; babel --plugins=transform-es2015-template-literals build/app.js --out-file build/app.js",
"test": "standard; babel src --out-dir babelify-src; tape ./test/tests.js",
"serve": "http-server .",
"nightwatch_local": "nightwatch --config nightwatch.js --env local", "nightwatch_local": "nightwatch --config nightwatch.js --env local",
"nightwatch_remote_firefox": "nightwatch --config nightwatch.js --env default",
"nightwatch_remote_chrome": "nightwatch --config nightwatch.js --env chrome", "nightwatch_remote_chrome": "nightwatch --config nightwatch.js --env chrome",
"nightwatch_remote_safari": "nightwatch --config nightwatch.js --env safari", "nightwatch_remote_firefox": "nightwatch --config nightwatch.js --env default",
"nightwatch_remote_ie": "nightwatch --config nightwatch.js --env ie", "nightwatch_remote_ie": "nightwatch --config nightwatch.js --env ie",
"nightwatch_remote_parallel": "nightwatch --config nightwatch.js --env ie,safari,chrome,default", "nightwatch_remote_parallel": "nightwatch --config nightwatch.js --env ie,safari,chrome,default",
"warning_message": "echo 'DO NOT DO THIS IF eth/geth STORES PRIVATE KEYS!! External system might be able to access your node through the RPC server.\n\n';" "nightwatch_remote_safari": "nightwatch --config nightwatch.js --env safari",
"onchange": "onchange build/app.js -- npm run lint",
"prepublish": "npm run build",
"selenium": "selenium-standalone start",
"selenium-install": "selenium-standalone install",
"serve": "http-server .",
"start": "./runNode.sh",
"start_dev": "npm-run-all -lpr serve watch onchange",
"start_eth": "npm run warning_message; eth -j --rpccorsdomain '*'",
"start_geth": "npm run warning_message; geth --rpc --rpcapi 'web3,eth,debug' --rpcport 8545 --rpccorsdomain '*'",
"test": "standard; tape ./test/tests.js",
"test-browser": "npm-run-all -lpr selenium serve waittest",
"waittest": "sleep 5 && npm run nightwatch_local",
"warning_message": "echo 'DO NOT DO THIS IF eth/geth STORES PRIVATE KEYS!! External system might be able to access your node through the RPC server.\n\n';",
"watch": "mkdirp build; watchify src/index.js -p [ browserify-livereload --host 127.0.0.1 --port 1337 ] -dv -o build/app.js"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
@ -91,8 +82,21 @@
}, },
"browserify": { "browserify": {
"transform": [ "transform": [
["babelify"], ["babelify", {
["yo-yoify"] "plugins": [
["fast-async", {
"runtimePatten": null,
"compiler": {
"promises": true,
"es7": true,
"noRuntime": true,
"wrapAwait": true
}
}]
]
}],
["yo-yoify"],
["babelify", { "presets": ["es2015"] }]
] ]
} }
} }

@ -6,10 +6,6 @@ var ui = require('../helpers/ui')
class TreeView { class TreeView {
constructor (opts) { constructor (opts) {
function noop (node) {
}
this.beforeJsonNodeRendered = opts.beforeJsonNodeRendered || noop
this.beforeJsonValueRendered = opts.beforeJsonValueRendered || noop
this.extractData = opts.extractData || this.extractDataDefault this.extractData = opts.extractData || this.extractDataDefault
this.formatSelf = opts.formatSelf || this.formatSelfDefault this.formatSelf = opts.formatSelf || this.formatSelfDefault
this.view = null this.view = null

@ -1,6 +1,6 @@
'use strict' 'use strict'
var tape = require('tape') var tape = require('tape')
var AstWalker = require('../babelify-src/util/astWalker') var AstWalker = require('../src/util/astWalker')
var node = require('./resources/ast') var node = require('./resources/ast')
tape('ASTWalker', function (t) { tape('ASTWalker', function (t) {

@ -1,10 +1,10 @@
'use strict' 'use strict'
var tape = require('tape') var tape = require('tape')
var Web3Providers = require('../babelify-src/web3Provider/web3Providers') var Web3Providers = require('../src/web3Provider/web3Providers')
var TraceManager = require('../babelify-src/trace/traceManager') var TraceManager = require('../src/trace/traceManager')
var CodeManager = require('../babelify-src/code/codeManager') var CodeManager = require('../src/code/codeManager')
var web3Test = require('./resources/testWeb3') var web3Test = require('./resources/testWeb3')
var util = require('../babelify-src/helpers/global') var util = require('../src/helpers/global')
tape('CodeManager', function (t) { tape('CodeManager', function (t) {
var codeManager var codeManager

@ -1,7 +1,7 @@
'use strict' 'use strict'
var tape = require('tape') var tape = require('tape')
var disassemble = require('../babelify-src/code/disassembler').disassemble var disassemble = require('../src/code/disassembler').disassemble
tape('Disassembler', function (t) { tape('Disassembler', function (t) {
t.test('empty', function (st) { t.test('empty', function (st) {

@ -1,6 +1,6 @@
'use strict' 'use strict'
var tape = require('tape') var tape = require('tape')
var EventManager = require('../babelify-src/lib/eventManager') var EventManager = require('../src/lib/eventManager')
tape('eventManager', function (t) { tape('eventManager', function (t) {
t.test('eventManager', function (st) { t.test('eventManager', function (st) {
var events = new EventManager() var events = new EventManager()

@ -1,6 +1,6 @@
'use strict' 'use strict'
var tape = require('tape') var tape = require('tape')
var init = require('../babelify-src/helpers/init') var init = require('../src/helpers/init')
tape('index', function (t) { tape('index', function (t) {
t.test('loadContext - web3', function (st) { t.test('loadContext - web3', function (st) {
var web3 = init.loadWeb3() var web3 = init.loadWeb3()

@ -1,7 +1,7 @@
'use strict' 'use strict'
var tape = require('tape') var tape = require('tape')
var compiler = require('solc') var compiler = require('solc')
var index = require('../../babelify-src/index') var index = require('../../src/index')
var contracts = require('./contracts/miscContracts') var contracts = require('./contracts/miscContracts')
var simplecontracts = require('./contracts/simpleContract') var simplecontracts = require('./contracts/simpleContract')

@ -6,8 +6,8 @@ var miscLocal = require('./contracts/miscLocal')
var structArrayLocal = require('./contracts/structArrayLocal') var structArrayLocal = require('./contracts/structArrayLocal')
var VM = require('ethereumjs-vm') var VM = require('ethereumjs-vm')
var utileth = require('ethereumjs-util') var utileth = require('ethereumjs-util')
var Web3Providers = require('../../babelify-src/web3Provider/web3Providers') var Web3Providers = require('../../src/web3Provider/web3Providers')
var util = require('../../babelify-src/helpers/global') var util = require('../../src/helpers/global')
var intLocalTest = require('./localsTests/int') var intLocalTest = require('./localsTests/int')
var miscLocalTest = require('./localsTests/misc') var miscLocalTest = require('./localsTests/misc')
var misc2LocalTest = require('./localsTests/misc2') var misc2LocalTest = require('./localsTests/misc2')

@ -1,5 +1,5 @@
'use strict' 'use strict'
var localDecoder = require('../../../babelify-src/solidity/localDecoder') var localDecoder = require('../../../src/solidity/localDecoder')
/* /*
Decode local variable Decode local variable

@ -1,12 +1,12 @@
'use strict' 'use strict'
var TraceManager = require('../../../babelify-src/trace/traceManager') var TraceManager = require('../../../src/trace/traceManager')
var CodeManager = require('../../../babelify-src/code/codeManager') var CodeManager = require('../../../src/code/codeManager')
var vmSendTx = require('./vmCall') var vmSendTx = require('./vmCall')
var traceHelper = require('../../../babelify-src/helpers/traceHelper') var traceHelper = require('../../../src/helpers/traceHelper')
var util = require('../../../babelify-src/helpers/global') var util = require('../../../src/helpers/global')
var SolidityProxy = require('../../../babelify-src/solidity/solidityProxy') var SolidityProxy = require('../../../src/solidity/solidityProxy')
var InternalCallTree = require('../../../babelify-src/util/internalCallTree') var InternalCallTree = require('../../../src/util/internalCallTree')
var EventManager = require('../../../babelify-src/lib/eventManager') var EventManager = require('../../../src/lib/eventManager')
var helper = require('./helper') var helper = require('./helper')
module.exports = function (st, vm, privateKey, contractBytecode, compilationResult, cb) { module.exports = function (st, vm, privateKey, contractBytecode, compilationResult, cb) {

@ -1,12 +1,12 @@
'use strict' 'use strict'
var TraceManager = require('../../../babelify-src/trace/traceManager') var TraceManager = require('../../../src/trace/traceManager')
var CodeManager = require('../../../babelify-src/code/codeManager') var CodeManager = require('../../../src/code/codeManager')
var vmSendTx = require('./vmCall') var vmSendTx = require('./vmCall')
var traceHelper = require('../../../babelify-src/helpers/traceHelper') var traceHelper = require('../../../src/helpers/traceHelper')
var util = require('../../../babelify-src/helpers/global') var util = require('../../../src/helpers/global')
var SolidityProxy = require('../../../babelify-src/solidity/solidityProxy') var SolidityProxy = require('../../../src/solidity/solidityProxy')
var InternalCallTree = require('../../../babelify-src/util/internalCallTree') var InternalCallTree = require('../../../src/util/internalCallTree')
var EventManager = require('../../../babelify-src/lib/eventManager') var EventManager = require('../../../src/lib/eventManager')
var helper = require('./helper') var helper = require('./helper')
module.exports = function (st, vm, privateKey, contractBytecode, compilationResult, cb) { module.exports = function (st, vm, privateKey, contractBytecode, compilationResult, cb) {

@ -1,12 +1,12 @@
'use strict' 'use strict'
var TraceManager = require('../../../babelify-src/trace/traceManager') var TraceManager = require('../../../src/trace/traceManager')
var CodeManager = require('../../../babelify-src/code/codeManager') var CodeManager = require('../../../src/code/codeManager')
var vmSendTx = require('./vmCall') var vmSendTx = require('./vmCall')
var traceHelper = require('../../../babelify-src/helpers/traceHelper') var traceHelper = require('../../../src/helpers/traceHelper')
var util = require('../../../babelify-src/helpers/global') var util = require('../../../src/helpers/global')
var SolidityProxy = require('../../../babelify-src/solidity/solidityProxy') var SolidityProxy = require('../../../src/solidity/solidityProxy')
var InternalCallTree = require('../../../babelify-src/util/internalCallTree') var InternalCallTree = require('../../../src/util/internalCallTree')
var EventManager = require('../../../babelify-src/lib/eventManager') var EventManager = require('../../../src/lib/eventManager')
var helper = require('./helper') var helper = require('./helper')
module.exports = function (st, vm, privateKey, contractBytecode, compilationResult, cb) { module.exports = function (st, vm, privateKey, contractBytecode, compilationResult, cb) {

@ -1,12 +1,12 @@
'use strict' 'use strict'
var TraceManager = require('../../../babelify-src/trace/traceManager') var TraceManager = require('../../../src/trace/traceManager')
var CodeManager = require('../../../babelify-src/code/codeManager') var CodeManager = require('../../../src/code/codeManager')
var vmSendTx = require('./vmCall') var vmSendTx = require('./vmCall')
var traceHelper = require('../../../babelify-src/helpers/traceHelper') var traceHelper = require('../../../src/helpers/traceHelper')
var util = require('../../../babelify-src/helpers/global') var util = require('../../../src/helpers/global')
var SolidityProxy = require('../../../babelify-src/solidity/solidityProxy') var SolidityProxy = require('../../../src/solidity/solidityProxy')
var InternalCallTree = require('../../../babelify-src/util/internalCallTree') var InternalCallTree = require('../../../src/util/internalCallTree')
var EventManager = require('../../../babelify-src/lib/eventManager') var EventManager = require('../../../src/lib/eventManager')
var helper = require('./helper') var helper = require('./helper')
module.exports = function (st, vm, privateKey, contractBytecode, compilationResult, cb) { module.exports = function (st, vm, privateKey, contractBytecode, compilationResult, cb) {

@ -1,7 +1,7 @@
'use strict' 'use strict'
var tape = require('tape') var tape = require('tape')
var compiler = require('solc') var compiler = require('solc')
var stateDecoder = require('../../babelify-src/index').solidity.stateDecoder var stateDecoder = require('../../src/index').solidity.stateDecoder
tape('solidity', function (t) { tape('solidity', function (t) {
t.test('storage decoder', function (st) { t.test('storage decoder', function (st) {

@ -1,7 +1,7 @@
'use strict' 'use strict'
var tape = require('tape') var tape = require('tape')
var compiler = require('solc') var compiler = require('solc')
var index = require('../../babelify-src/index') var index = require('../../src/index')
var contracts = require('./contracts/miscContracts') var contracts = require('./contracts/miscContracts')
tape('solidity', function (t) { tape('solidity', function (t) {

@ -1,6 +1,6 @@
'use strict' 'use strict'
var tape = require('tape') var tape = require('tape')
var SourceMappingDecoder = require('../babelify-src/util/sourceMappingDecoder') var SourceMappingDecoder = require('../src/util/sourceMappingDecoder')
var compiler = require('solc') var compiler = require('solc')
tape('SourceMappingDecoder', function (t) { tape('SourceMappingDecoder', function (t) {

@ -1,8 +1,8 @@
'use strict' 'use strict'
var TraceManager = require('../babelify-src/trace/traceManager') var TraceManager = require('../src/trace/traceManager')
var tape = require('tape') var tape = require('tape')
var Web3Providers = require('../babelify-src/web3Provider/web3Providers') var Web3Providers = require('../src/web3Provider/web3Providers')
var util = require('../babelify-src/helpers/global') var util = require('../src/helpers/global')
var web3Test = require('./resources/testWeb3') var web3Test = require('./resources/testWeb3')
tape('TraceManager', function (t) { tape('TraceManager', function (t) {

@ -1,8 +1,8 @@
'use strict' 'use strict'
var sourceMapping = require('./resources/sourceMapping') var sourceMapping = require('./resources/sourceMapping')
var index = require('../babelify-src/index') var index = require('../src/index')
var tape = require('tape') var tape = require('tape')
var util = require('../babelify-src/helpers/util') var util = require('../src/helpers/util')
tape('Util', function (t) { tape('Util', function (t) {
t.test('lowerbound', function (st) { t.test('lowerbound', function (st) {

Loading…
Cancel
Save