chainlink-brownie-contracts
chainlink-brownie-contracts copied to clipboard
Callback not supported
Getting error "Source "@chainlink/contracts/src/v0.6/vendor/SafeMathChainlink.sol" not found: File import callback not supported" when working on the brownie fund me project.
Have played around with everything but even though they are downloaded and installed they are not used when compiling.
Reason I say that they are not being used is I get this error:
CompilerError:solc returned the following errors:
contracts/FundMe.sol:28:16: DeclarationError: Undeclared identifier.
return priceFeed.version();
Meaning when creating the priceFeed object in the constructor it is not being created properly of type AggregatorV3Interface(____).
constructor(address _priceFeed) public {
priceFeed = AggregatorV3Interface(_priceFeed);
owner = msg.sender;
}
Spent a few hours trying to solve this and still nothing so would be great to get a hand so I can proceed with the course!
What version of the chainlink contracts are you using?
In FundMe.sol:
import "@chainlink/contracts/src/v0.6/interfaces/AggregatorV3Interface.sol";
import "@chainlink/contracts/src/v0.6/vendor/SafeMathChainlink.sol";
In yaml:
dependencies:
# - <organization/repo>@<version>
- smartcontractkit/[email protected]
compiler:
solc:
remappings:
- '@chainlink=smartcontractkit/[email protected]'
I had to switch over to versions 0.2.1 at one point.
@wombyz did you ever resolve your issue? I'm experiencing something similar.
@wombyz where did you get version 1.1.1 from? latest version of smartcontractkit/chainlink-brownie-contracts as of Feb 11 2022 is 0.4.0
I believe I saw the edit for the updated version somewhere on GitHub. Might have been in the actual depository. It wasn’t working for me, I realized it could have been an outdated version, and it was.
Jonathan Bush
On Apr 26, 2022, at 11:04 AM, Paul Markus @.***> wrote:
@wombyz where did you get version 1.1.1 from? latest version of smartcontractkit/chainlink-brownie-contracts as of Feb 11 2022 is 0.4.0
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.
@wombyz where did you get version 1.1.1 from? latest version of smartcontractkit/chainlink-brownie-contracts as of Feb 11 2022 is 0.4.0
They changed the version numbering to match the version numbers in their NPM packages.. Hence it used to be v1++ and those have been down to 0.4.x at the time of writing..