Merge branch 'master' into improve_remix_sim

pull/5370/head
yann300 6 years ago committed by GitHub
commit 223d78f952
  1. 2
      README.md
  2. 2
      package.json
  3. 21
      release-process.md
  4. 4
      remix-analyzer/package.json
  5. 5
      remix-debug/package.json
  6. 9
      remix-debug/src/Ethdebugger.js
  7. 4
      remix-lib/package.json
  8. 31
      remix-lib/src/execution/eventsDecoder.js
  9. 1
      remix-lib/src/execution/execution-context.js
  10. 2
      remix-lib/src/execution/txHelper.js
  11. 4
      remix-lib/src/universalDapp.js
  12. 4
      remix-simulator/package.json
  13. 4
      remix-solidity/package.json
  14. 2
      remix-solidity/src/compiler/compiler.js
  15. 8
      remix-tests/package.json

@ -50,6 +50,8 @@ Remix is built out of several different modules:
+ [`remix-lib`](remix-lib/README.md)
+ [`remix-debug`](remix-debug/README.md) allo debuggin transaction.
+ [`remix-tests`](remix-tests/README.md) provides unit testing for solidity.
+ [`remix-astwalker`](remix-tests/README.md) provides a tool for parsing solidity AST.
+ [`remix-url-resolver`](remix-url-resolver/README.md) provides helpers for resolving external content (github, swarm, ipfs, ...).
+ [`remixd`](https://github.com/ethereum/remixd/tree/master) CLI which allow accessing local element from Remix IDE (see https://remix.readthedocs.io/en/latest/tutorial_remixd_filesystem.html)
Each generally has their own npm package and test suite, as well as basic documentation.

@ -1,5 +1,5 @@
{
"version": "0.1.9",
"version": "0.1.10",
"devDependencies": {
"gulp": "^3.9.1",
"lerna": "^2.10.2"

@ -2,9 +2,6 @@
This document details steps for publishing packages and tag the code base accordingly:
# Case where we deploy a remix module that is a dependency for another remix module:
**remix-lib** , **remix-simulator** , **remix-solidity**
1) publish (using lerna) all the modules that depends on one of the newly published module:
- checkout a new branch from master
@ -26,21 +23,3 @@ This document details steps for publishing packages and tag the code base accord
- in changelog put list of published packages with version
# Case where we deploy a top level library
**remix-debug** , **remix-tests** , **remix-url-resolver** , **remix-analyzer**
1) publish the module:
- checkout a new branch from master
- cd in the module folder
- increment package.json version
- npm run publish
2) create a tag (using the package.json version)
- checkout latest origin/master
- git tag <module-name>@<version>
- git push --tags
- github-changes -o ethereum -r remix -a --only-pulls --use-commit-body --only-merges --between-tags previous_version...next_version
- keep only PRs related to changes in the published module
- create a new release out of the changelog.md

@ -1,6 +1,6 @@
{
"name": "remix-analyzer",
"version": "0.3.5",
"version": "0.3.6",
"description": "Remix Analyzer",
"main": "./index.js",
"contributors": [
@ -18,7 +18,7 @@
}
],
"dependencies": {
"remix-lib": "0.4.5"
"remix-lib": "0.4.6"
},
"scripts": {
"lint": "standard",

@ -1,6 +1,6 @@
{
"name": "remix-debug",
"version": "0.3.5",
"version": "0.3.6",
"description": "Ethereum IDE and tools for the web",
"contributors": [
{
@ -22,7 +22,8 @@
"ethereumjs-util": "^4.5.0",
"ethereumjs-vm": "3.0.0",
"fast-async": "^6.1.2",
"remix-lib": "0.4.5"
"remix-lib": "0.4.6",
"web3": "0.20.6"
},
"devDependencies": {
"babel-eslint": "^7.1.1",

@ -160,15 +160,6 @@ Ethdebugger.prototype.updateWeb3 = function (web3) {
this.setManagers()
}
Ethdebugger.prototype.debug = function (tx) {
this.setCompilationResult(this.opts.compilationResult())
if (tx instanceof Object) {
this.txBrowser.load(tx.hash)
} else if (tx instanceof String) {
this.txBrowser.load(tx)
}
}
Ethdebugger.prototype.unLoad = function () {
this.traceManager.init()
this.codeManager.clear()

@ -1,6 +1,6 @@
{
"name": "remix-lib",
"version": "0.4.5",
"version": "0.4.6",
"description": "Ethereum IDE and tools for the web",
"contributors": [
{
@ -19,7 +19,7 @@
"ethereumjs-tx": "^1.3.3",
"ethereumjs-util": "^5.1.2",
"ethereumjs-vm": "3.0.0",
"ethers": "^3.0.15",
"ethers": "^4.0.27",
"fast-async": "^6.1.2",
"solc": "^0.5.0",
"web3": "0.20.6"

@ -1,5 +1,4 @@
'use strict'
var ethJSUtil = require('ethereumjs-util')
var ethers = require('ethers')
var txHelper = require('./txHelper')
@ -39,10 +38,10 @@ class EventsDecoder {
_eventABI (contract) {
var eventABI = {}
var abi = new ethers.Interface(contract.abi)
var abi = new ethers.utils.Interface(contract.abi)
for (var e in abi.events) {
var event = abi.events[e]
eventABI[ethJSUtil.sha3(Buffer.from(event.signature)).toString('hex')] = { event: event.name, inputs: event.inputs, object: event }
eventABI[event.topic.replace('0x', '')] = { event: event.name, inputs: event.inputs, object: event, abi: abi }
}
return eventABI
}
@ -64,6 +63,21 @@ class EventsDecoder {
return null
}
_stringifyBigNumber (value) {
return value._ethersType === 'BigNumber' ? value.toString() : value
}
_stringifyEvent (value) {
if (value === null || value === undefined) return ' - '
if (value._ethersType) value.type = value._ethersType
if (Array.isArray(value)) {
// for struct && array
return value.map((item) => { return this._stringifyEvent(item) })
} else {
return this._stringifyBigNumber(value)
}
}
_decodeEvents (tx, logs, contractName, compiledContracts, cb) {
var eventsABI = this._eventsABI(compiledContracts)
var events = []
@ -71,9 +85,14 @@ class EventsDecoder {
// [address, topics, mem]
var log = logs[i]
var topicId = log.topics[0]
var abi = this._event(topicId.replace('0x', ''), eventsABI)
if (abi) {
events.push({ from: log.address, topic: topicId, event: abi.event, args: abi.object.parse(log.topics, log.data) })
var eventAbi = this._event(topicId.replace('0x', ''), eventsABI)
if (eventAbi) {
var decodedlog = eventAbi.abi.parseLog(log)
let decoded = {}
for (const v in decodedlog.values) {
decoded[v] = this._stringifyEvent(decodedlog.values[v])
}
events.push({ from: log.address, topic: topicId, event: eventAbi.event, args: decoded })
} else {
events.push({ from: log.address, data: log.data, topics: log.topics })
}

@ -130,6 +130,7 @@ function ExecutionContext () {
else if (id === '2') name = 'Morden (deprecated)'
else if (id === '3') name = 'Ropsten'
else if (id === '4') name = 'Rinkeby'
else if (id === '5') name = 'Görli'
else if (id === '42') name = 'Kovan'
else name = 'Custom'

@ -30,7 +30,7 @@ module.exports = {
encodeFunctionId: function (funABI) {
if (funABI.type === 'fallback') return '0x'
var abi = new ethers.Interface([funABI])
var abi = new ethers.utils.Interface([funABI])
abi = abi.functions[funABI.name]
return abi.sighash
},

@ -47,7 +47,7 @@ UniversalDApp.prototype.resetEnvironment = function () {
executionContext.detectNetwork(cb)
},
personalMode: () => {
return this.config.get('settings/personal-mode')
return this._deps.config.get('settings/personal-mode')
}
})
this.txRunner.event.register('transactionBroadcasted', (txhash) => {
@ -70,7 +70,7 @@ UniversalDApp.prototype.createVMAccount = function (privateKey, balance, cb) {
UniversalDApp.prototype.newAccount = function (password, passwordPromptCb, cb) {
if (!executionContext.isVM()) {
if (!this.config.get('settings/personal-mode')) {
if (!this._deps.config.get('settings/personal-mode')) {
return cb('Not running in personal mode')
}
passwordPromptCb((passphrase) => {

@ -1,6 +1,6 @@
{
"name": "remix-simulator",
"version": "0.1.5",
"version": "0.1.6",
"description": "Ethereum IDE and tools for the web",
"contributors": [
{
@ -22,7 +22,7 @@
"express-ws": "^4.0.0",
"fast-async": "^6.3.7",
"merge": "^1.2.0",
"remix-lib": "0.4.5",
"remix-lib": "0.4.6",
"ethereumjs-vm": "3.0.0",
"ethereumjs-util": "^5.1.2",
"standard": "^10.0.3",

@ -1,6 +1,6 @@
{
"name": "remix-solidity",
"version": "0.3.5",
"version": "0.3.6",
"description": "Ethereum IDE and tools for the web",
"contributors": [
{
@ -17,7 +17,7 @@
"ethereumjs-util": "^4.5.0",
"ethereumjs-vm": "3.0.0",
"fast-async": "^6.1.2",
"remix-lib": "0.4.5",
"remix-lib": "0.4.6",
"solc": "^0.5.0",
"webworkify": "^1.2.1"
},

@ -74,7 +74,7 @@ function Compiler (handleImportCall) {
if (worker === null) {
var compiler
var userAgent = (typeof (navigator) !== 'undefined') && navigator.userAgent ? navigator.userAgent.toLowerCase() : '-'
if (typeof (window) === 'undefined' || userAgent.indexOf(' electron/') > -1) {
if (typeof (window) === 'undefined') {
compiler = require('solc')
} else {
compiler = solc(window.Module)

@ -1,6 +1,6 @@
{
"name": "remix-tests",
"version": "0.1.6",
"version": "0.1.7",
"description": "Tests for the Ethereum tool suite Remix",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
@ -42,9 +42,9 @@
"change-case": "^3.0.1",
"colors": "^1.1.2",
"commander": "^2.13.0",
"remix-lib": "0.4.5",
"remix-simulator": "0.1.5",
"remix-solidity": "0.3.5",
"remix-lib": "0.4.6",
"remix-simulator": "0.1.6",
"remix-solidity": "0.3.6",
"signale": "^1.2.1",
"web3": "1.0.0-beta.36",
"winston": "^3.0.0"

Loading…
Cancel
Save