Make ERC827 methods payable (#838)

* Make ERC827 methods payable

* Suppress linter errors

* Add some ERC827 payable tests

* Remove failOnBuy method from MessageHelper

* Fix linter warning

* Fix tests
This commit is contained in:
Anton Bukov
2018-04-23 16:16:55 +03:00
committed by Augusto Lemble
parent 16535fbb87
commit 8f2a4785cb
4 changed files with 218 additions and 12 deletions

View File

@ -4,12 +4,22 @@ pragma solidity ^0.4.21;
contract MessageHelper {
event Show(bytes32 b32, uint256 number, string text);
event Buy(bytes32 b32, uint256 number, string text, uint256 value);
function showMessage( bytes32 message, uint256 number, string text ) public returns (bool) {
emit Show(message, number, text);
return true;
}
function buyMessage( bytes32 message, uint256 number, string text ) public payable returns (bool) {
emit Buy(
message,
number,
text,
msg.value);
return true;
}
function fail() public {
require(false);
}