mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Updates docs to new constructor syntax.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user