Truffle compile shows DeclarationError: Undeclared identifier.

0 votes

Hey. I have made some changes to truffle metacoin and when I run truffle compile command, I get the following error:

Compiling ./contracts/Migrations.sol...

/home/edureka/t/contracts/Migrations.sol:12:23: DeclarationError: Undeclared identifier.
    if (msg.sender == myaddress) _;
                      ^-------^
Compilation failed. See above.

How can I solve this?

Dec 4, 2018 in Blockchain by digger
• 27,620 points
38 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

Hey. You might have missed declaring the "myaddress"  identifier. If it is an address then you can declare it like this:

address public myaddress;
answered Dec 4, 2018 by Omkar
• 65,820 points

Related Questions In Blockchain

+4 votes
2 answers
0 votes
2 answers

Truffle compile: Cant find module error

You can install babel-register and try again. ...READ MORE

answered Feb 19 in Blockchain by Loki
37 views
0 votes
1 answer

Unboxing truffle: Shows error: Stopping to prevent overwriting data.

As mentioned in the error: unboxing or ...READ MORE

answered Nov 30, 2018 in Blockchain by Omkar
• 65,820 points
87 views
0 votes
1 answer

truffle create contract shows no network available error

In your truffle project directory, you have ...READ MORE

answered Dec 11, 2018 in Blockchain by Omkar
• 65,820 points
45 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
61 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Truffle Compile failing, ParserError: Expected token LParen got Identifier function

Your parentheses are mismatched. pragma solidity ^0.4.17; import "truffle/Assert.sol"; import ...READ MORE

answered Oct 9, 2018 in Blockchain by Omkar
• 65,820 points
126 views
0 votes
1 answer

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.