Skip to content

Commit 17cd3d5

Browse files
author
James Lockhart
committed
Fixed tutorial 14 to work with the latest version of solidity
1 parent b4e2731 commit 17cd3d5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tutorial-14/EtherTransfer.sol

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
pragma solidity ^0.4.0;
1+
pragma solidity ^0.5.0;
22

33
contract EtherTransferTo {
4-
function () public payable {
4+
function () external payable {
55
}
66

77
function getBalance() public returns (uint) {
@@ -13,7 +13,7 @@ contract EtherTransferFrom {
1313

1414
EtherTransferTo private _instance;
1515

16-
function EtherTransferFrom() public {
16+
constructor() public {
1717
// _instance = EtherTransferTo(address(this));
1818
_instance = new EtherTransferTo();
1919
}
@@ -27,7 +27,7 @@ contract EtherTransferFrom {
2727
return _instance.getBalance();
2828
}
2929

30-
function () public payable {
30+
function () external payable {
3131
//msg.sender.send(msg.value);
3232
address(_instance).send(msg.value);
3333
}

0 commit comments

Comments
 (0)