Update solidity scripts for latest solidity version, to avoid truffle compile warning.
sweatyc opened this issue · comments
Sweaty Chair commented
Compilation warnings encountered:
/Users/fur/Projects/Block42/landpot-dapp/contracts/ComplexStorage.sol:27:2: Warning: Defining constructors as functions with the same name as the contract is deprecated. Use "constructor(...) { ... }" instead.
function ComplexStorage() public {
^ (Relevant source part starts here and spans across multiple lines).
,/Users/fur/Projects/Block42/landpot-dapp/contracts/ComplexStorage.sol:34:3: Warning: Use of the "var" keyword is deprecated.
var dev1 = DeviceData("deviceBrand", "deviceYear", "wearLevel");
^------^
,/Users/fur/Projects/Block42/landpot-dapp/contracts/ComplexStorage.sol:35:3: Warning: Use of the "var" keyword is deprecated.
var dev2 = DeviceData("deviceBrand2", "deviceYear2", "wearLevel2");
^------^
,/Users/fur/Projects/Block42/landpot-dapp/contracts/ComplexStorage.sol:36:9: Warning: Use of the "var" keyword is deprecated.
var dev3 = DeviceData("deviceBrand3", "deviceYear3", "wearLevel3");
^------^
,/Users/fur/Projects/Block42/landpot-dapp/contracts/SimpleStorage.sol:13:5: Warning: Invoking events without "emit" prefix is deprecated.
StorageSet("Data stored successfully!");
^-------------------------------------^
Sweaty Chair commented
Duplicated with #38