diff options
author | Remco Bloemen <remco@wicked.ventures> | 2018-05-22 21:13:38 +0800 |
---|---|---|
committer | Remco Bloemen <remco@wicked.ventures> | 2018-05-22 21:19:40 +0800 |
commit | 4a971be168469d17ac75be96dd77e773f2ce5473 (patch) | |
tree | ec6bcb8cd5290d0e3dcd61266bb56f7869cf07ae /packages/metacoin | |
parent | f657a3d811461cd7924fa1f949bcde610aa22fef (diff) | |
download | dexon-sol-tools-4a971be168469d17ac75be96dd77e773f2ce5473.tar dexon-sol-tools-4a971be168469d17ac75be96dd77e773f2ce5473.tar.gz dexon-sol-tools-4a971be168469d17ac75be96dd77e773f2ce5473.tar.bz2 dexon-sol-tools-4a971be168469d17ac75be96dd77e773f2ce5473.tar.lz dexon-sol-tools-4a971be168469d17ac75be96dd77e773f2ce5473.tar.xz dexon-sol-tools-4a971be168469d17ac75be96dd77e773f2ce5473.tar.zst dexon-sol-tools-4a971be168469d17ac75be96dd77e773f2ce5473.zip |
Fix warnings in Metacoin
Diffstat (limited to 'packages/metacoin')
-rw-r--r-- | packages/metacoin/contracts/Metacoin.sol | 6 |
1 files changed, 3 insertions, 3 deletions
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; } |