From 4a971be168469d17ac75be96dd77e773f2ce5473 Mon Sep 17 00:00:00 2001 From: Remco Bloemen Date: Tue, 22 May 2018 15:13:38 +0200 Subject: Fix warnings in Metacoin --- packages/metacoin/contracts/Metacoin.sol | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'packages/metacoin') diff --git a/packages/metacoin/contracts/Metacoin.sol b/packages/metacoin/contracts/Metacoin.sol index ac212b32e..dc67e6242 100644 --- a/packages/metacoin/contracts/Metacoin.sol +++ b/packages/metacoin/contracts/Metacoin.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.21; +pragma solidity ^0.4.24; pragma experimental ABIEncoderV2; contract Metacoin { @@ -16,7 +16,7 @@ contract Metacoin { uint32 callback; } - function Metacoin() public { + constructor () public { balances[msg.sender] = 10000; } @@ -24,7 +24,7 @@ contract Metacoin { if (balances[msg.sender] < transferData.amount) return false; balances[msg.sender] -= transferData.amount; balances[transferData.to] += transferData.amount; - Transfer(msg.sender, transferData.to, transferData.amount); + emit Transfer(msg.sender, transferData.to, transferData.amount); return true; } -- cgit v1.2.3