0

I'm trying to perform a simple Swap from DAI to WETH with Uniswap in my own SmartContract on the Kovan Testnet. Unfortuanatly my transaction keeps getting reverted even after setting the gas limit manually.

I also discoverd that I can not verify the contract on Kovan via etherscan-API nor manually. Instead I keep getting this error for every library I import:

Source "@uniswap/v3-periphery/contracts/interfaces/ISwapRouter.sol" not found: File import callback not supported

Accordingly I have the feeling something is going wrong during compilation and I'm stuck without any further ideas to work out my problem.

Here are a couple infos on what I've tried so far and how to reproduce: Brownie Version 1.16.4, Tested on Windows 10 and Ubuntu 21.04

I've tried:

  • Importing libraries with Brownie package manager
  • Importing libraries with npm and using relative paths
  • All kinds of different compiler remappings in the brownie-config.yaml
  • Adding all dependency files to project folders manually

Here's a link to my code for reproducing my error: https://github.com/MjCage/swap-demo

It'd be fantastic if someone could help.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.