You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ape is having trouble importing/finding multiple versions of OpenZepplin.
imports in solidity file separate versions of OZ based on version number, like so:
import {SafeMath} from "@openzeppelin-3.4.2/contracts/math/SafeMath.sol";
other versions of OZ are also present:
import "@openzeppelin-4.3.0/contracts/access/Ownable.sol";
import "@openzeppelin-4.3.0/contracts/security/ReentrancyGuard.sol";
This is in a situation where certain contract dependency files need to use lower solidity versions and using
pragma solidity >=0.6.0 <0.9.0 does not work in the OZ 3.4.2 SafeMath file (required for older .sol files in deployment) due to unchecked error.
different versions of OZ are in the ape.config file:
dependencies:
however, when loading VS Code instance, env slows down due to package not being found in cache and this error appears
Error: Dependency openzepplin-3.4.2 is declared on config file, but we could not find it inside [directory]. Try installing your dependencies ..
however, running ape compile sometimes shows the dependency is present
Compiling using Solidity compiler '0.6.10+commit.00c0fcaf'.
Input:
contracts/.cache/openzeppelin-3.4.2/3.4.2
Other times the dependency is skipped.
Screen shot of packages folder is included. Multiple OZ versions are present.
When commenting out that version of OZ (3.4.2) from the ape.config file, and running ape compile -f
this error appears:
Source "@openzeppelin-3.4.2/contracts/math/SafeMath.sol" not found: File not found.
import {SafeMath} from "@openzeppelin-3.4.2/contracts/math/SafeMath.sol";
Please include information like:
what command you ran
the code that caused the failure (see this link for help with formatting code)
full output of the error you received
How can it be fixed?
Resolving contracts/.cache file listing versus packages
Fill this in if you have ideas on how the bug could be fixed.
The text was updated successfully, but these errors were encountered:
Environment information
ape
and plugin versions:Installed Plugins
alchemy 0.8.0
ens 0.8.0
etherscan 0.8.2
foundry 0.8.4
hardhat 0.8.1
infura 0.8.0
solidity 0.8.3
template 0.8.0
tokens 0.8.0
vyper 0.8.4
Description: Debian GNU/Linux trixie/sid
Release: n/a
Codename: trixie
What went wrong?
Ape is having trouble importing/finding multiple versions of OpenZepplin.
imports in solidity file separate versions of OZ based on version number, like so:
import {SafeMath} from "@openzeppelin-3.4.2/contracts/math/SafeMath.sol";
other versions of OZ are also present:
import "@openzeppelin-4.3.0/contracts/access/Ownable.sol";
import "@openzeppelin-4.3.0/contracts/security/ReentrancyGuard.sol";
This is in a situation where certain contract dependency files need to use lower solidity versions and using
pragma solidity >=0.6.0 <0.9.0 does not work in the OZ 3.4.2 SafeMath file (required for older .sol files in deployment) due to unchecked error.
different versions of OZ are in the ape.config file:
dependencies:
github: OpenZeppelin/openzeppelin-contracts
version: 3.4.2
github: OpenZeppelin/openzeppelin-contracts
version: 4.5.0
github: OpenZeppelin/openzeppelin-contracts
version: 4.3.0
however, when loading VS Code instance, env slows down due to package not being found in cache and this error appears
Error: Dependency openzepplin-3.4.2 is declared on config file, but we could not find it inside [directory]. Try installing your dependencies ..
however, running ape compile sometimes shows the dependency is present
Compiling using Solidity compiler '0.6.10+commit.00c0fcaf'.
Input:
contracts/.cache/openzeppelin-3.4.2/3.4.2
Screen shot of packages folder is included. Multiple OZ versions are present.
When commenting out that version of OZ (3.4.2) from the ape.config file, and running ape compile -f
this error appears:
Source "@openzeppelin-3.4.2/contracts/math/SafeMath.sol" not found: File not found.
import {SafeMath} from "@openzeppelin-3.4.2/contracts/math/SafeMath.sol";
Please include information like:
How can it be fixed?
Resolving contracts/.cache file listing versus packages
Fill this in if you have ideas on how the bug could be fixed.
The text was updated successfully, but these errors were encountered: