Commit c83cf095 authored by soad003's avatar soad003

Static Analysis: Warn on selfdestruct, suggestions by axic

parent d122a40f
......@@ -17,10 +17,9 @@ selfdestruct.prototype.visit = function (node) {
selfdestruct.prototype.report = function () {
return this.relevantNodes.map(function (item, i) {
return {
warning: yo`<span>Use of selfdestruct: can block calling contracts unexpectedly<br />
Please, be especially carefull if this contract is referenced by other contracts (i.e. library contracts, interactions). Selfdestruction of called contracts can render callers inoperable.</span>`,
warning: yo`<span>Use of selfdestruct: can block calling contracts unexpectedly. Be especially careful if this contract is planed to be used by other contracts (i.e. library contracts, interactions). Selfdestruction of the callee contract can leave callers in an inoperable state.</span>`,
location: item.src,
more: 'https://www.coindesk.com/ethereum-client-bug-freezes-user-funds-fallout-remains-uncertain/'
more: 'https://paritytech.io/blog/security-alert.html'
}
})
}
......
contract sd {
uint120 x;
function() public payable { }
function c () public constant {
//x++;
selfdestruct(address(0xdeadbeef));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment