Closed Aviksaikat closed 1 year ago
When I changed the version of Uniswap-v3-core
to 1.0.1
& tried to run ape pm compile
I got version doesn't exist. Then I again changed the version to 1.0.0
for some reason it compiled successfully. But this doesn't solved the issue with the Uniswap-v3-periphery
I was able to repro and am investigating.
I had to do several things here to get this to work. There are some issues with your config.
Basically, a good strategy is to try and compile the dependencies individually and figure out the configuration needed in those cases. Then, once you understand that, piece things back together in a central config and make-use of the config_override
config for each dependency.
Here are some of the issues:
test/
contracts because they cause issuesBy far, v3-periphery was the most challenging dependency to compile of them all. If you need some of the contracts that require libraries, that will be an additional challenge.
However, I was able to run ape pm compile
with the following config:
name: Raise-warnings-if-value
plugins:
- name: solidity
- name: alchemy
- name: foundry
ethereum:
default_network: mainnet-fork
mainnet_fork:
default_provider: foundry
transaction_acceptance_timeout: 99999999
mainnet:
transaction_acceptance_timeout: 99999999
ganache:
fork:
ethereum:
mainnet:
upstream_provider: alchemy
foundry:
host: auto
fork:
ethereum:
mainnet:
upstream_provider: alchemy
dependencies:
- name: Uniswap-periphery
github: uniswap/v3-periphery
ref: 1.3.0
config_override:
compile:
exclude:
- test/*
solidity:
version: 0.7.6
import_remapping:
- "@uniswap/v3-core/contracts=Uniswap-core/main"
- "@uniswap/v2-core/contracts=Uniswap-core-v2/master"
- "@uniswap/lib/contracts=Uniswap-lib/master"
- "@openzeppelin/contracts=OpenZeppelin/v3.4.2"
- "base64-sol=base64-sol/main"
- name: Uniswap-core
github: uniswap/v3-core
ref: 1.0.0
config_override:
compile:
exclude:
- test/*
solidity:
version: 0.7.6
- name: OpenZeppelin
github: OpenZeppelin/openzeppelin-contracts
version: 3.4.2
- name: Uniswap-lib
github: uniswap/solidity-lib
ref: master
config_override:
compile:
exclude:
- test/*
solidity:
version: 0.7.6
- name: Uniswap-core
github: uniswap/v3-core
ref: main
config_override:
compile:
exclude:
- test/*
- name: Uniswap-core-v2
github: uniswap/v2-core
ref: master
config_override:
compile:
exclude:
- test/*
- name: base64-sol
github: Brechtpd/base64
ref: main
contracts_folder: .
test:
mnemonic: test test test test test test test test test test test junk
number_of_accounts: 10
But I also had to fix a bug in Ape related to config_override
to get it work right.
The PR for this bugfix is here: https://github.com/ApeWorX/ape/issues/1656
Note: I just edited the config in my comment above because i forgot some things, but it should be good now!
Environment information
ape
and plugin versions:ape-config.yaml
(NOTE: do not post anything private like RPC urls or secrets!):What went wrong?
Please include information like:
ape pm compile
How can it be fixed?