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
• 26,740 points
2,177 views

1 answer to this question.

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
• 69,210 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, 2019 in Blockchain by Loki
2,748 views
0 votes
1 answer

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

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

answered Dec 1, 2018 in Blockchain by Omkar
• 69,210 points
906 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
• 69,210 points
890 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
1,702 views
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
1,237 views
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
• 69,210 points
2,252 views
0 votes
1 answer

truffle compile shows error: TypeError: Invalid type for argument in function call.

You are getting this error because you ...READ MORE

answered Dec 5, 2018 in Blockchain by Omkar
• 69,210 points
1,914 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP