Warns if modifier uses msg.value in non-payable function.

This commit is contained in:
Erik Kundt
2018-09-03 18:35:57 +02:00
committed by chriseth
parent 378f691608
commit 75a92b0ffd
11 changed files with 129 additions and 65 deletions
@@ -0,0 +1,4 @@
contract C {
modifier costs(uint _amount) { require(msg.value >= _amount); _; }
function f() costs(1 ether) public payable {}
}