aboutsummaryrefslogtreecommitdiffstats
path: root/docs/common-patterns.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/common-patterns.rst')
-rw-r--r--docs/common-patterns.rst8
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/common-patterns.rst b/docs/common-patterns.rst
index 739e136f..7c38b0e7 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;
}