smartcontractkit / chainlink-brownie-contracts

A repository for automatically using the latest chainlink repo from the core chainlink repo.
329 stars 70 forks source link

Callback not supported #8

Open wombyz opened 2 years ago

wombyz commented 2 years ago

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!

PatrickAlphaC commented 2 years ago

What version of the chainlink contracts are you using?

wombyz commented 2 years ago

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/chainlink-brownie-contracts@1.1.1
compiler:
  solc:
    remappings:
      - '@chainlink=smartcontractkit/chainlink-brownie-contracts@1.1.1'
JBush511 commented 2 years ago

I had to switch over to versions 0.2.1 at one point.

kjones86 commented 2 years ago

@wombyz did you ever resolve your issue? I'm experiencing something similar.

AureliusAi commented 2 years ago

@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

JBush511 commented 2 years ago

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.

1NoobDev commented 2 years ago

@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..