truffle-box / react-box

Truffle, Webpack and React boilerplate.
https://truffle-box.github.io/
MIT License
736 stars 251 forks source link

Compilation failure because of a deprecation warning from Migrations.sol:11:3: #58

Closed ghost closed 5 years ago

ghost commented 6 years ago

Issue

When I try to compile react-box tutorial, I get failed to compile because of a warning from Migrations.sol:11:3

I made a pull request for this issue: https://github.com/truffle-box/react-box/pull/57

Expected Behavior

you compile with truffle successfully

Actual Behavior

When you compile with truffle, this compilation warning encountered:

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).

Steps to Reproduce the Problem

  1. run truffle unbox react-box
  2. run truffle compile
  3. get the warning from Migrations.sol:11:3:

Environment

Operating System: macOS high Sierra 10.13.3 Ethereum client: Ganache Truffle version (truffle version): v4.1.11 (core: 4.1.11) Solidity version: Solidity v0.4.24 (solc-js) node version (node --version): v10.3.0 npm version (npm --version): 6.1.0