Merge pull request #1453 from ethereum/yann300-patch-21

Add swarmgw to the remix terminal
pull/3094/head
yann300 6 years ago committed by GitHub
commit b66fc945c8
  1. 2
      package.json
  2. 2
      src/app/compiler/compiler-imports.js
  3. 2
      src/app/contract/publishOnSwarm.js
  4. 2
      src/app/panels/terminal.js

@ -45,7 +45,7 @@
"rimraf": "^2.6.1", "rimraf": "^2.6.1",
"selenium-standalone": "^6.0.1", "selenium-standalone": "^6.0.1",
"standard": "^8.5.0", "standard": "^8.5.0",
"swarmgw": "^0.2.0", "swarmgw": "^0.3.1",
"tape": "^4.5.1", "tape": "^4.5.1",
"uglify-js": "^2.8.16", "uglify-js": "^2.8.16",
"vm-browserify": "0.0.4", "vm-browserify": "0.0.4",

@ -1,6 +1,6 @@
'use strict' 'use strict'
var base64 = require('js-base64').Base64 var base64 = require('js-base64').Base64
var swarmgw = require('swarmgw') var swarmgw = require('swarmgw')()
var request = require('request') var request = require('request')
module.exports = class CompilerImports { module.exports = class CompilerImports {

@ -1,7 +1,7 @@
'use strict' 'use strict'
var async = require('async') var async = require('async')
var swarmgw = require('swarmgw') var swarmgw = require('swarmgw')()
module.exports = (contract, fileManager, cb, swarmVerifiedPublishCallBack) => { module.exports = (contract, fileManager, cb, swarmVerifiedPublishCallBack) => {
// gather list of files to publish // gather list of files to publish

@ -8,6 +8,7 @@ var vm = require('vm')
var remixLib = require('remix-lib') var remixLib = require('remix-lib')
var EventManager = remixLib.EventManager var EventManager = remixLib.EventManager
var Web3 = require('web3') var Web3 = require('web3')
var swarmgw = require('swarmgw')()
var CommandInterpreterAPI = require('../../lib/cmdInterpreterAPI') var CommandInterpreterAPI = require('../../lib/cmdInterpreterAPI')
var executionContext = require('../../execution-context') var executionContext = require('../../execution-context')
@ -575,6 +576,7 @@ class Terminal {
function domTerminalFeatures (self, scopedCommands) { function domTerminalFeatures (self, scopedCommands) {
return { return {
swarmgw,
ethers, ethers,
remix: self._components.cmdInterpreter, remix: self._components.cmdInterpreter,
web3: executionContext.getProvider() !== 'vm' ? new Web3(executionContext.web3().currentProvider) : null, web3: executionContext.getProvider() !== 'vm' ? new Web3(executionContext.web3().currentProvider) : null,

Loading…
Cancel
Save