ContractNotFound:0x6 处没有部署合约

ContractNotFound: No contract deployed at 0x6

我重新启动了 Ganache,然后当我再次 运行 [brownie 运行 scripts/deploy.py --network ganache-local] 时,我得到了一个错误。不过还没重启就成功了

我该如何解决这个错误?

我尝试删除旧网络并重建一个新网络,但是没有用。

from operator import network, config
from brownie import FundMe, MockV3Aggregator, network, config
from scripts.helpful_scripts import (
    get_account,
    deploy_mocks,
    LOCAL_BLOCKCHAIN_ENVIRONMENTS,
)


def deploy_fund_me():
    account = get_account()
    if network.show_active() not in LOCAL_BLOCKCHAIN_ENVIRONMENTS:
        price_feed_address = config["networks"].[network.show_active()][
            "eth_usd_price_feed"
        ]
    else:
        deploy_mocks()
        price_feed_address = MockV3Aggregator[-1].address

    fund_me = FundMe.deploy(
        price_feed_address,
        {"from": account},
        publish_source=config["networks"].[network.show_active()].get("verify"),
    )
    print(f"Contract deployed to {fund_me.address}")


def main():
    deploy_fund_me()

Ganache --->>> ganache-local

我的项目

好的,最后,我删除了构建文件夹和 re-compile-->>“布朗尼编译”。问题解决了~