trufflesuite / truffle

:warning: The Truffle Suite is being sunset. For information on ongoing support, migration options and FAQs, visit the Consensys blog. Thank you for all the support over the years.
https://consensys.io/blog/consensys-announces-the-sunset-of-truffle-and-ganache-and-new-hardhat?utm_source=github&utm_medium=referral&utm_campaign=2023_Sep_truffle-sunset-2023_announcement_
MIT License
14.02k stars 2.32k forks source link

MetaCoin example compilation emmits warnings #955

Closed drasko closed 6 years ago

drasko commented 6 years ago
drasko@Marx:~/truffle/metacoin$ truffle unbox MetaCoin
Downloading...
Unpacking...
Setting up...
Unbox successful. Sweet!

Commands:

  Compile contracts: truffle compile
  Migrate contracts: truffle migrate
  Test contracts:    truffle test

drasko@Marx:~/truffle/metacoin$ ls
contracts  migrations  test  truffle-config.js  truffle.js

drasko@Marx:~/truffle/metacoin$ truffle compile
Compiling ./contracts/ConvertLib.sol...
Compiling ./contracts/MetaCoin.sol...
Compiling ./contracts/Migrations.sol...

Compilation warnings encountered:

/home/drasko/truffle/metacoin/contracts/MetaCoin.sol:15:2: Warning: Defining constructors as functions with the same name as the contract is deprecated. Use "constructor(...) { ... }" instead.
    function MetaCoin() public {
 ^ (Relevant source part starts here and spans across multiple lines).
,/home/drasko/truffle/metacoin/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).
,/home/drasko/truffle/metacoin/contracts/MetaCoin.sol:23:3: Warning: Invoking events without "emit" prefix is deprecated.
        Transfer(msg.sender, receiver, amount);
        ^------------------------------------^

Writing artifacts to ./build/contracts
cgewecke commented 6 years ago

Thanks @drasko - this should be fixed now.