aboutsummaryrefslogtreecommitdiffstats
path: root/docs/common-patterns.rst
diff options
context:
space:
mode:
authorErik Kundt <bitshift@posteo.org>2018-07-02 22:25:54 +0800
committerErik Kundt <bitshift@posteo.org>2018-07-02 22:25:54 +0800
commite16e37f5074ce359b852f3b2e4b80095d22952dc (patch)
treea076864dbe06cfbe47121b2e8a0a3c335b28a338 /docs/common-patterns.rst
parentda60fdab37ddd6126e5ba605e7041dc6f26ab5ee (diff)
downloaddexon-solidity-e16e37f5074ce359b852f3b2e4b80095d22952dc.tar.gz
dexon-solidity-e16e37f5074ce359b852f3b2e4b80095d22952dc.tar.zst
dexon-solidity-e16e37f5074ce359b852f3b2e4b80095d22952dc.zip
Updates docs to new constructor syntax.
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..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;
}