Compilations warning due to depricated calls
marcogbarcellos opened this issue · 1 comments
marcogbarcellos commented
when running truffle compile
, I'm getting this:
Compilation warnings encountered:
/Users/decentralemployee/workspace/personal/drizzle-box/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/decentralemployee/workspace/personal/drizzle-box/contracts/ComplexStorage.sol:34:3: Warning: Use of the "var" keyword is deprecated.
var dev1 = DeviceData("deviceBrand", "deviceYear", "wearLevel");
^------^
,/Users/decentralemployee/workspace/personal/drizzle-box/contracts/ComplexStorage.sol:35:3: Warning: Use of the "var" keyword is deprecated.
var dev2 = DeviceData("deviceBrand2", "deviceYear2", "wearLevel2");
^------^
,/Users/decentralemployee/workspace/personal/drizzle-box/contracts/ComplexStorage.sol:36:9: Warning: Use of the "var" keyword is deprecated.
var dev3 = DeviceData("deviceBrand3", "deviceYear3", "wearLevel3");
^------^
,/Users/decentralemployee/workspace/personal/drizzle-box/contracts/Migrations.sol:11:3: Warning: Defining constructors as functions with the same name as the contract is deprecated. Use "constructor(...) { ... }" instead.
function Migrations() public {
^ (Relevant source part starts here and spans across multiple lines).
,/Users/decentralemployee/workspace/personal/drizzle-box/contracts/SimpleStorage.sol:13:5: Warning: Invoking events without "emit" prefix is deprecated.
StorageSet("Data stored successfully!");
^-------------------------------------^
marcogbarcellos commented
created a PR to address this : #39