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."
Ethereum Stack Exchange is a question and answer site for users of Ethereum, the decentralized application platform and smart contract enabled blockchain. It only takes a minute to sign up.
Sign up to join this communitymodifier 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."
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.