|
|
@ -1,5 +1,6 @@ |
|
|
|
'use strict' |
|
|
|
'use strict' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var $ = require('jquery') |
|
|
|
var csjs = require('csjs-inject') |
|
|
|
var csjs = require('csjs-inject') |
|
|
|
var yo = require('yo-yo') |
|
|
|
var yo = require('yo-yo') |
|
|
|
var async = require('async') |
|
|
|
var async = require('async') |
|
|
@ -441,6 +442,31 @@ Please make a backup of your contracts and start using http://remix.ethereum.org |
|
|
|
test: new TestTab(self._components.registry, compileTab) |
|
|
|
test: new TestTab(self._components.registry, compileTab) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let transactionContextAPI = { |
|
|
|
|
|
|
|
getAddress: (cb) => { |
|
|
|
|
|
|
|
cb(null, $('#txorigin').val()) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
getValue: (cb) => { |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
var number = document.querySelector('#value').value |
|
|
|
|
|
|
|
var select = document.getElementById('unit') |
|
|
|
|
|
|
|
var index = select.selectedIndex |
|
|
|
|
|
|
|
var selectedUnit = select.querySelectorAll('option')[index].dataset.unit |
|
|
|
|
|
|
|
var unit = 'ether' // default
|
|
|
|
|
|
|
|
if (['ether', 'finney', 'gwei', 'wei'].indexOf(selectedUnit) >= 0) { |
|
|
|
|
|
|
|
unit = selectedUnit |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
cb(null, executionContext.web3().toWei(number, unit)) |
|
|
|
|
|
|
|
} catch (e) { |
|
|
|
|
|
|
|
cb(e) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
getGasLimit: (cb) => { |
|
|
|
|
|
|
|
cb(null, $('#gasLimit').val()) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
udapp.resetAPI(transactionContextAPI) |
|
|
|
|
|
|
|
|
|
|
|
// ---------------- Righthand-panel --------------------
|
|
|
|
// ---------------- Righthand-panel --------------------
|
|
|
|
self._components.righthandpanel = new RighthandPanel({ tabs, pluginManager }) |
|
|
|
self._components.righthandpanel = new RighthandPanel({ tabs, pluginManager }) |
|
|
|
self._view.rightpanel.appendChild(self._components.righthandpanel.render()) |
|
|
|
self._view.rightpanel.appendChild(self._components.righthandpanel.render()) |
|
|
|