From a2f92033e78abf3b3e04fca4bf8a5a2c27e465fb Mon Sep 17 00:00:00 2001 From: Dmitriy Merkurev Date: Tue, 21 Feb 2017 22:44:18 +0300 Subject: add payable attribute --- docs/common-patterns.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/common-patterns.rst b/docs/common-patterns.rst index fa5e68a6..a2d7ce71 100644 --- a/docs/common-patterns.rst +++ b/docs/common-patterns.rst @@ -81,7 +81,7 @@ This is as opposed to the more intuitive sending pattern: mostSent = msg.value; } - function becomeRichest() returns (bool) { + function becomeRichest() payable returns (bool) { if (msg.value > mostSent) { // Check if call succeeds to prevent an attacker // from trapping the previous person's funds in -- cgit v1.2.3