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,550 points
82 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
• 67,660 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
205 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
• 67,660 points
197 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
• 67,660 points
88 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
169 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
• 67,660 points
266 views
0 votes
1 answer