ProjectOpenSea / seadrop

Smart contracts for primary drops on EVM chains

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

can not find the foundry dependencies from parent module of the hardhat project

Stevewu1234 opened this issue · comments

I have tried to import seadrop into my token contract which is based on hardhat and finish the foundry installation on hardhat project. But when I try to compile the token contract which has imported ERC721Seadrop.sol, it failed and reports:

Error HH404: File operator-filter-registry/DefaultOperatorFilterer.sol, imported from lib/seadrop/src/ERC721SeaDrop.sol, not found.
Error HH413: File utility-contracts/TwoStepOwnable.sol => lib/seadrop/lib/utility-contracts/TwoStepOwnable.sol, imported from lib/seadrop/src/ERC721ContractMetadata.sol, not found.

It seems the submodule fail to remapping dependencies, how can I do?

You'll need to add the hardhat-preprocess step as written here to rewrite the imports:

You'll want to update remappings.txt to point to the right lib location.

Alternatively you could write the tests in foundry and it should work with the remappings already available.