Getting error "DeclarationError: Identifier not found or not unique" while adding onlyOwner

I am working on Smart contract 201 course and I am at step - Ethereum Smart Contract Programming 201 / Categories / Project - Building a Decentralized Exchange / Finishing Wallet

Getting the following error when I add ‘onlyOwner’. The contract compiles fine till that point. Can you please guide me on where I am going wrong?

image

1 Like

Hey @Vasu, hope you are ok.

It might be that your contract is not importing properly the openzeppelin contract.

try to remove the ../node_modules/ from the imported path and check again.

Carlos Z