diff --git a/es/2/7-storage.md b/es/2/7-storage.md index 711b3997a5..ca9e78985d 100644 --- a/es/2/7-storage.md +++ b/es/2/7-storage.md @@ -6,7 +6,7 @@ material: language: sol startingCode: "zombiefeeding.sol": | - pragma solidity ^0.4.19; + pragma solidity ^0.4.25; import "./zombiefactory.sol"; @@ -16,7 +16,7 @@ material: } "zombiefactory.sol": | - pragma solidity ^0.4.19; + pragma solidity ^0.4.25; contract ZombieFactory { @@ -39,11 +39,11 @@ material: uint id = zombies.push(Zombie(_name, _dna)) - 1; zombieToOwner[id] = msg.sender; ownerZombieCount[msg.sender]++; - NewZombie(id, _name, _dna); + emit NewZombie(id, _name, _dna); } function _generateRandomDna(string _str) private view returns (uint) { - uint rand = uint(keccak256(_str)); + uint rand = uint(keccak256(abi.encodePacked(_str))); return rand % dnaModulus; } @@ -55,7 +55,7 @@ material: } answer: > - pragma solidity ^0.4.19; + pragma solidity ^0.4.25; import "./zombiefactory.sol";