I copied this code from the Ethereum website and changed the outdated code that the compiler would not accept. However, previously I had no trouble with this modifier (show in the picture) as it now requires me to make the expression an lvalue.



You're doing an assignment, not a comparison. You need == for the comparison, not =.

require(msg.sender == owner);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.