eth-brownie / brownie

A Python-based development and testing framework for smart contracts targeting the Ethereum Virtual Machine.

Home Page:https://eth-brownie.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can not use Solady

magnetto90 opened this issue · comments

Solady does not have a contracts folder and looks like Brownie does not consider it a valid package.

File "brownie/project/main.py", line 907, in _install_from_github
   raise InvalidPackage(
InvalidPackage: Vectorized/solady@0.0.162 has no `contracts/` subdirectory, and multiple directories containing source files

if not contract_paths:
raise InvalidPackage(f"{package_id} does not contain any .sol or .vy files")
if install_path.joinpath("contracts").is_dir():
brownie_config["project_structure"]["contracts"] = "contracts"
elif len(contract_paths) == 1:
brownie_config["project_structure"]["contracts"] = contract_paths.pop()
else:
raise InvalidPackage(
f"{package_id} has no `contracts/` subdirectory, and "
"multiple directories containing source files"
)

workaround: Install Solady using forge and then configure remappings in brownie config file.