From e16e37f5074ce359b852f3b2e4b80095d22952dc Mon Sep 17 00:00:00 2001 From: Erik Kundt Date: Mon, 2 Jul 2018 16:25:54 +0200 Subject: Updates docs to new constructor syntax. --- docs/common-patterns.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'docs/common-patterns.rst') diff --git a/docs/common-patterns.rst b/docs/common-patterns.rst index 739e136f..e61e8667 100644 --- a/docs/common-patterns.rst +++ b/docs/common-patterns.rst @@ -28,7 +28,7 @@ become the new richest. :: - pragma solidity ^0.4.11; + pragma solidity ^0.4.24; contract WithdrawalContract { address public richest; @@ -36,7 +36,7 @@ become the new richest. mapping (address => uint) pendingWithdrawals; - function WithdrawalContract() public payable { + constructor() public payable { richest = msg.sender; mostSent = msg.value; } @@ -65,13 +65,13 @@ This is as opposed to the more intuitive sending pattern: :: - pragma solidity ^0.4.11; + pragma solidity ^0.4.24; contract SendContract { address public richest; uint public mostSent; - function SendContract() public payable { + constructor() public payable { richest = msg.sender; mostSent = msg.value; } -- cgit