We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b4e2731 commit 17cd3d5Copy full SHA for 17cd3d5
tutorial-14/EtherTransfer.sol
@@ -1,7 +1,7 @@
1
-pragma solidity ^0.4.0;
+pragma solidity ^0.5.0;
2
3
contract EtherTransferTo {
4
- function () public payable {
+ function () external payable {
5
}
6
7
function getBalance() public returns (uint) {
@@ -13,7 +13,7 @@ contract EtherTransferFrom {
13
14
EtherTransferTo private _instance;
15
16
- function EtherTransferFrom() public {
+ constructor() public {
17
// _instance = EtherTransferTo(address(this));
18
_instance = new EtherTransferTo();
19
@@ -27,7 +27,7 @@ contract EtherTransferFrom {
27
return _instance.getBalance();
28
29
30
31
//msg.sender.send(msg.value);
32
address(_instance).send(msg.value);
33
0 commit comments