@ -97,13 +97,18 @@
< / div >
< / div >
< div id = "envView" >
< div id = "envView" >
< span id = "executionContext" >
< span id = "executionContext" >
< label for = "vm" title = "Execution environment does not connect to any node, everything is local and in memory only." >
< label for = "vm" >
< input id = "vm" type = "radio" value = "vm" checked name = "executionContext" >
< input id = "vm" type = "radio" value = "vm" checked name = "executionContext" >
JavaScript VM
< strong > JavaScript VM< / strong >
< p > Execution environment does not connect to any node, everything is local and in memory only.< / p >
< / label >
< / label >
< label for = "web3" title = "Execution environment connects to node at localhost, transactions will be sent to the network and can cause loss of money or worse!" >
< label for = "web3" >
< input id = "web3" type = "radio" value = "web3" name = "executionContext" >
< input id = "web3" type = "radio" value = "web3" name = "executionContext" >
Web3 Provider
< strong > Web3 Provider< / strong >
< p > Execution environment connects to node at localhost, transactions will be sent to the network and can cause loss of money or worse!< / p >
< label for = "web3Endpoint" >
< strong > Web3 Provider Endpoint< / strong > : < input type = "text" id = "web3Endpoint" value = "http://localhost:8545" >
< / label >
< / label >
< / label >
< / span >
< / span >
< / div >
< / div >
@ -222,12 +227,14 @@
var $vmToggle = $('#vm');
var $vmToggle = $('#vm');
var $web3Toggle = $('#web3');
var $web3Toggle = $('#web3');
var $web3endpoint = $('#web3Endpoint');
var executionContext = 'vm';
var executionContext = 'vm';
$vmToggle.get(0).checked = true;
$vmToggle.get(0).checked = true;
$vmToggle.on('change', executionContextChange );
$vmToggle.on('change', executionContextChange );
$web3Toggle.on('change', executionContextChange );
$web3Toggle.on('change', executionContextChange );
$web3endpoint.on('change', compile );
function executionContextChange (ev) {
function executionContextChange (ev) {
if (ev.target.value == 'web3' & & !confirm("Are you sure you want to connect to a local ethereum node?") ) {
if (ev.target.value == 'web3' & & !confirm("Are you sure you want to connect to a local ethereum node?") ) {
@ -752,6 +759,7 @@
removable: false,
removable: false,
getAddress: function(){ return $('#txorigin').val(); },
getAddress: function(){ return $('#txorigin').val(); },
removable_instances: true,
removable_instances: true,
web3endpoint: $('#web3Endpoint').val(),
renderOutputModifier: function(contractName, $contractOutput) {
renderOutputModifier: function(contractName, $contractOutput) {
var contract = data.contracts[contractName];
var contract = data.contracts[contractName];
return $contractOutput
return $contractOutput