Lesson 7 - Cannot import 'MockV3Aggregator' from 'brownie' Error ? #991
-
|
Hi, I am getting this frustrating error when running "brownie run scripts/deploy_lottery.py" Error is: Here is a screen shot showing the file structure and the helpful_scripts file Here is the deploy_lottery.py and the helpful_scripts.py and my brownie-config.yaml I have these under the tests sub-dir - is that correct ? Hope someone can spot my mistake. Many thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
I think it could be that your |
Beta Was this translation helpful? Give feedback.
-
|
@freddie71010 is most likely correct, double check your folder structure and be sure the contracts are on the correct folder. |
Beta Was this translation helpful? Give feedback.

I think it could be that your
LinkToken.sol, MockV3Aggregator.sol, VRFCoordinatorMock.solfiles are in the wrong test folder. Nest those 3 files in a folder calledtestslocated within the contracts folder like this:contracts -> tests -> LinkToken.sol, MockV3Aggregator.sol, VRFCoordinatorMock.solcontracts -> Lottery.sol