chainlink-brownie-contracts icon indicating copy to clipboard operation
chainlink-brownie-contracts copied to clipboard

Callback not supported

Open wombyz opened this issue 2 years ago • 7 comments

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!

wombyz avatar Jan 08 '22 04:01 wombyz

What version of the chainlink contracts are you using?

PatrickAlphaC avatar Jan 11 '22 04:01 PatrickAlphaC

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]'

wombyz avatar Jan 12 '22 01:01 wombyz

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

JBush511 avatar Jan 20 '22 07:01 JBush511

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

kjones86 avatar Mar 06 '22 20:03 kjones86

@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

AureliusAi avatar Apr 26 '22 15:04 AureliusAi

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.

JBush511 avatar Apr 27 '22 11:04 JBush511

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

1NoobDev avatar Aug 31 '22 16:08 1NoobDev