From c7f30962c7ab6a2c62255c095326723b0ddba50f Mon Sep 17 00:00:00 2001 From: James Lockhart Date: Thu, 24 Oct 2019 19:49:10 +0100 Subject: [PATCH] Made tutorial 2 work with the latest version of Solidity --- tutorial-02/myfirstcontract.sol | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tutorial-02/myfirstcontract.sol b/tutorial-02/myfirstcontract.sol index af0d797..f94fce1 100644 --- a/tutorial-02/myfirstcontract.sol +++ b/tutorial-02/myfirstcontract.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.0; +pragma solidity ^0.5.0; interface Regulator { function checkValue(uint amount) external returns (bool); @@ -40,11 +40,11 @@ contract MyFirstContract is Bank(10) { string private name; uint private age; - function setName(string newName) public { + function setName(string memory newName) public { name = newName; } - function getName() public view returns (string) { + function getName() public view returns (string memory) { return name; }