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,720 points
1,464 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,190 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,160 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,190 points
679 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,190 points
471 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,007 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
• 69,190 points
1,521 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,190 points
1,350 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP