diff --git a/src/app/contract/publishOnSwarm.js b/src/app/contract/publishOnSwarm.js
index fb10b99a53..bf9768f4aa 100644
--- a/src/app/contract/publishOnSwarm.js
+++ b/src/app/contract/publishOnSwarm.js
@@ -51,7 +51,6 @@ module.exports = (contract, appAPI, cb) => {
})
}
-
function swarmVerifiedPublish (content, expectedHash, cb) {
swarmgw.put(content, function (err, ret) {
if (err) {
diff --git a/src/app/files/file-explorer.js b/src/app/files/file-explorer.js
index eb8879b83b..02664f30ee 100755
--- a/src/app/files/file-explorer.js
+++ b/src/app/files/file-explorer.js
@@ -316,9 +316,10 @@ function fileExplorer (appAPI, files) {
self.element = el
}
}
-/******************************************************************************
+
+/*
HELPER FUNCTIONS
-******************************************************************************/
+*/
function adaptEnvironment (label, focus, hover) {
var li = getLiFrom(label)
li.style.position = 'relative'
diff --git a/src/app/panels/file-panel.js b/src/app/panels/file-panel.js
index e78021df72..18cd0f316a 100644
--- a/src/app/panels/file-panel.js
+++ b/src/app/panels/file-panel.js
@@ -1,4 +1,5 @@
/* global confirm, prompt */
+var $ = require('jquery')
var csjs = require('csjs-inject')
var yo = require('yo-yo')
var minixhr = require('minixhr') // simple and small cross-browser XMLHttpRequest (XHR)
diff --git a/src/app/staticanalysis/modules/blockBlockhash.js b/src/app/staticanalysis/modules/blockBlockhash.js
index 529220f8ce..094c2d33d4 100644
--- a/src/app/staticanalysis/modules/blockBlockhash.js
+++ b/src/app/staticanalysis/modules/blockBlockhash.js
@@ -14,7 +14,10 @@ blockBlockhash.prototype.visit = function (node) {
blockBlockhash.prototype.report = function (compilationResults) {
return this.warningNodes.map(function (item, i) {
return {
- warning: `use of "block.blockhash": "block.blockhash" is used to access the last 256 block hashes. A miner computes the block hash by "summing up" the information in the current block mined. By "summing up" the information in a clever way a miner can try to influence the outcome of a transaction in the current block. This is especially easy if there are only a small number of equally likely outcomes.`,
+ warning: `use of "block.blockhash": "block.blockhash" is used to access the last 256 block hashes.
+ A miner computes the block hash by "summing up" the information in the current block mined.
+ By "summing up" the information in a clever way a miner can try to influence the outcome of a transaction in the current block.
+ This is especially easy if there are only a small number of equally likely outcomes.`,
location: item.src
}
})
diff --git a/src/app/staticanalysis/modules/blockTimestamp.js b/src/app/staticanalysis/modules/blockTimestamp.js
index 7fdbec27e2..a91d77ff81 100644
--- a/src/app/staticanalysis/modules/blockTimestamp.js
+++ b/src/app/staticanalysis/modules/blockTimestamp.js
@@ -16,13 +16,15 @@ blockTimestamp.prototype.visit = function (node) {
blockTimestamp.prototype.report = function (compilationResults) {
return this.warningNowNodes.map(function (item, i) {
return {
- warning: `use of "now": "now" does not mean current time. Now is an alias for block.timestamp. Block.timestamp can be influenced by miners to a certain degree, be careful.`,
+ warning: `use of "now": "now" does not mean current time. Now is an alias for block.timestamp.
+ Block.timestamp can be influenced by miners to a certain degree, be careful.`,
location: item.src,
more: 'http://solidity.readthedocs.io/en/develop/frequently-asked-questions.html#are-timestamps-now-block-timestamp-reliable'
}
}).concat(this.warningblockTimestampNodes.map(function (item, i) {
return {
- warning: `use of "block.timestamp": "block.timestamp" can be influenced by miners to a certain degree. That means that a miner can "choose" the block.timestamp, to a certain degree, to change the outcome of a transaction in the mined block.`,
+ warning: `use of "block.timestamp": "block.timestamp" can be influenced by miners to a certain degree.
+ That means that a miner can "choose" the block.timestamp, to a certain degree, to change the outcome of a transaction in the mined block.`,
location: item.src,
more: 'http://solidity.readthedocs.io/en/develop/frequently-asked-questions.html#are-timestamps-now-block-timestamp-reliable'
}
diff --git a/src/app/staticanalysis/modules/inlineAssembly.js b/src/app/staticanalysis/modules/inlineAssembly.js
index 9b5f6abef5..ab9b6e1d03 100644
--- a/src/app/staticanalysis/modules/inlineAssembly.js
+++ b/src/app/staticanalysis/modules/inlineAssembly.js
@@ -14,7 +14,8 @@ inlineAssembly.prototype.visit = function (node) {
inlineAssembly.prototype.report = function (compilationResults) {
return this.inlineAssNodes.map((node) => {
return {
- warning: `CAUTION: The Contract uses inline assembly, this is only advised in rare cases. Additionally static analysis modules do not parse inline Assembly, this can lead to wrong analysis results.`,
+ warning: `CAUTION: The Contract uses inline assembly, this is only advised in rare cases.
+ Additionally static analysis modules do not parse inline Assembly, this can lead to wrong analysis results.`,
location: node.src,
more: 'http://solidity.readthedocs.io/en/develop/assembly.html#solidity-assembly'
}
diff --git a/src/app/staticanalysis/modules/lowLevelCalls.js b/src/app/staticanalysis/modules/lowLevelCalls.js
index 148932e611..c56aa81e6c 100644
--- a/src/app/staticanalysis/modules/lowLevelCalls.js
+++ b/src/app/staticanalysis/modules/lowLevelCalls.js
@@ -25,21 +25,30 @@ lowLevelCalls.prototype.report = function (compilationResults) {
var morehref = null
switch (item.type) {
case common.lowLevelCallTypes.CALL:
- text = `use of "call": the use of low level "call" should be avoided whenever possible. It can lead to unexpected behavior if return value is not handled properly. Please use Direct Calls via specifying the called contract's interface.
`
- morehref = `http://solidity.readthedocs.io/en/develop/control-structures.html?#external-function-calls`
+ text = `use of "call": the use of low level "call" should be avoided whenever possible.
+ It can lead to unexpected behavior if return value is not handled properly.
+ Please use Direct Calls via specifying the called contract's interface.
`
+ morehref = 'http://solidity.readthedocs.io/en/develop/control-structures.html?#external-function-calls'
// http://solidity.readthedocs.io/en/develop/frequently-asked-questions.html?#why-is-the-low-level-function-call-less-favorable-than-instantiating-a-contract-with-a-variable-contractb-b-and-executing-its-functions-b-dosomething
break
case common.lowLevelCallTypes.CALLCODE:
- text = `use of "callcode": the use of low level "callcode" should be avoided whenever possible. External code that is called can change the state of the calling contract and send ether form the caller's balance. If this is wantend behaviour use the Solidity library feature if possible.
`
- morehref = `http://solidity.readthedocs.io/en/develop/contracts.html#libraries`
+ text = `use of "callcode": the use of low level "callcode" should be avoided whenever possible.
+ External code that is called can change the state of the calling contract and send ether form the caller's balance.
+ If this is wantend behaviour use the Solidity library feature if possible.
`
+ morehref = 'http://solidity.readthedocs.io/en/develop/contracts.html#libraries'
break
case common.lowLevelCallTypes.DELEGATECALL:
- text = `use of "delegatecall": the use of low level "delegatecall" should be avoided whenever possible. External code that is called can change the state of the calling contract and send ether form the caller's balance. If this is wantend behaviour use the Solidity library feature if possible.
`
- morehref = `http://solidity.readthedocs.io/en/develop/contracts.html#libraries`
+ text = `use of "delegatecall": the use of low level "delegatecall" should be avoided whenever possible.
+ External code that is called can change the state of the calling contract and send ether form the caller's balance.
+ If this is wantend behaviour use the Solidity library feature if possible.
`
+ morehref = 'http://solidity.readthedocs.io/en/develop/contracts.html#libraries'
break
case common.lowLevelCallTypes.SEND:
- text = `use of "send": "send" does not throw an exception when not successful, make sure you deal with the failure case accordingly. Use "transfer" whenever failure of the ether transfer should rollback the whole transaction. Note: if you "send/transfer" ether to a contract the fallback function is called, the callees fallback function is very limited due to the limited amount of gas provided by "send/transfer". No state changes are possible but the callee can log the event or revert the transfer. "send/transfer" is syntactic sugar for a "call" to the fallback function with 2300 gas and a specified ether value.
`
- morehref = `http://solidity.readthedocs.io/en/develop/security-considerations.html#sending-and-receiving-ether`
+ text = `use of "send": "send" does not throw an exception when not successful, make sure you deal with the failure case accordingly.
+ Use "transfer" whenever failure of the ether transfer should rollback the whole transaction.
+ Note: if you "send/transfer" ether to a contract the fallback function is called, the callees fallback function is very limited due to the limited amount of gas provided by "send/transfer".
+ No state changes are possible but the callee can log the event or revert the transfer. "send/transfer" is syntactic sugar for a "call" to the fallback function with 2300 gas and a specified ether value.
`
+ morehref = 'http://solidity.readthedocs.io/en/develop/security-considerations.html#sending-and-receiving-ether'
break
}
return { warning: text, more: morehref, location: item.node.src }
diff --git a/src/app/staticanalysis/modules/thisLocal.js b/src/app/staticanalysis/modules/thisLocal.js
index 04e7eaeab7..2ca7a5975c 100644
--- a/src/app/staticanalysis/modules/thisLocal.js
+++ b/src/app/staticanalysis/modules/thisLocal.js
@@ -14,7 +14,7 @@ thisLocal.prototype.visit = function (node) {
thisLocal.prototype.report = function (compilationResults) {
return this.warningNodes.map(function (item, i) {
return {
- warning: `Use of "this" for local functions: Never use this to call functions in the same contract, it only consumes more gas than normal local calls.`,
+ warning: 'Use of "this" for local functions: Never use this to call functions in the same contract, it only consumes more gas than normal local calls.',
location: item.src,
more: 'http://solidity.readthedocs.io/en/develop/control-structures.html#external-function-calls'
}
diff --git a/src/app/tabs/run-tab.js b/src/app/tabs/run-tab.js
index 431f92a9ad..996d6fec93 100644
--- a/src/app/tabs/run-tab.js
+++ b/src/app/tabs/run-tab.js
@@ -212,7 +212,6 @@ function updateAccountBalances (container, appAPI) {
}
function updatePendingTxs (container, appAPI) {
-
container.querySelector('#pendingtxs').innerText = Object.keys(appAPI.udapp().pendingTransactions()).length + ' pending'
}
diff --git a/test-browser/tests/sharedFolderExplorer.js b/test-browser/tests/sharedFolderExplorer.js
index 07245897b7..9ec29539d6 100644
--- a/test-browser/tests/sharedFolderExplorer.js
+++ b/test-browser/tests/sharedFolderExplorer.js
@@ -5,7 +5,7 @@ var sauce = require('./sauce')
var sources = {
'sources': {
- 'localhost/folder1/contract2.sol': `contract test2 { function get () returns (uint) { return 11; }}`
+ 'localhost/folder1/contract2.sol': 'contract test2 { function get () returns (uint) { return 11; }}'
}
}