I restarted Ganache, and then when I ran the [brownie run scripts/deploy.py --network ganache-local] again, I got an error. However, it was a success before restarting.
How can I fix this error?
I tried deleting the old network and rebuilding a new one, but it didn't work.
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
My project
Ok, finally, I delete the build folder and re-compile-->> "brownie compile". The issue was done~