Closed Aletheios42 closed 3 months ago
This will be attended to appropriately as soon as possible.
Hello @AlejandroPintosAlcarazo, the source of the problem here is that Chainlink keeps changing occasionally and moving things over.
The solution is to add shared
to the import like this:
import {AggregatorV3Interface} from "@chainlink/contracts/src/v0.8/shared/interfaces/AggregatorV3Interface.sol";
I have to ask, though, @AlejandroPintosAlcarazo, you mentioned that on the video, the import goes like this:
import {AggregatorV3Interface} from "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol";
Without the shared
.
Am I missing something?
now i understand what happened: in seccion 3 fund me:
but in 26. Deploying To Zksync the import looks like this: import {AggregatorV3Interface} from "@chainlink/contracts/src/v0.8/shared/interfaces/AggregatorV3Interface.sol"; (with share/)
i just used the same code i build in the cap 14 to deploy to in sepolia, to deploy in zksync as well, the code changed between caps (i think without any indication), that s why i couldnt compile...
i checked now and if you add share it actually deploy in zksync.
so to sum up:
the version of the import in cap 14 and cap 26 doesnt match.
Excellent context, @AlejandroPintosAlcarazo. I will add and update section 14 to assess the import difference.
Section
Section 3 | FUNDME
Could you please leave a link to the Cyfrin Updraft Lesson (or YouTube video timestamp) where this error occurs? (You can right click a video and "copy video URL at current time")
https://updraft.cyfrin.io/courses/solidity/fund-me/deploying-to-zksync?lesson_format=video
Describe the bug
while deploying fundme.sol to zksync:
In the video you say you can import interfaz like this: import {AggregatorV3Interface} from "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol";
but it gives this compiling error:
so the way i solve it was bu creating a file AggregatorV3Interface.sol where i explicitly write down the interfaz like this:
and by doing that, and the rest of the tasks , moving files to contracts repository, moving library to Fundme.sol and chaing oracle address now compiles and the contract is ready to be deployed
TO SUM UP: change npm import for explicit interfaz in another file, and import that interfaz file