I'm following the Solidity, Blockchain, and Smart Contract Course lessons from Free Code Camp and I noticed that Patrick sometimes seems to import mock Chainlink aggregators and mock token contracts into his Python scripts from Brownie without adding the interface files.

My brownie-config.yaml file is configured the exact same as him, and I have all the proper information in the .env file. I attached an image of the error I see when I try to import interfaces the way he shows in the video. This is the Github space of the project I'm following along with.enter image description here

For anyone trying to Google this exact same question, the error is as follows:

ImportError: cannot import name 'LinkToken' from 'brownie'

1 Answer 1


It turns out all the imports were supposed to be in this test directory of the contracts. I should have realized by now that these are necessary when trying to run the scripts on local network.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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