1
modifier require(bool condition) {
    if (! condition) revert();
    _;
}

When I try to truffle compile my contract I get an error here: "Warning: This declaration shadows a builtin symbol."

1

Your problem is in the require modifier name. require is a reserved keyword in Solidity which is used for checking some condition(s) and throwing an error (reverting) if the condition is not met.

Just rename your modifier something else and you'll be fine.

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.