Skip to content

Can´t run Brownie Console on a Testnet After selfdestruct Contract #1716

@zzjose

Description

@zzjose

Hi, Im am not sure if is a bug but mith be. I am new on programing on vyper and blockchain related

What was wrong?

I am deploying contracts to Bsc Testnet from brownie and until now no problem at all.
However in the last test i deployed the contract and then run a SEF-DESTRUCT FUNCTION on Test-net.
After that i keep done changes on code and wanted to try a new deployment to test.
When i run "brownie console --network bsc-test" i get this error: ContractNotFound: No contract deployed at 0xEeCe0a7EA6636FaA3b6B6276714996eeD398eCEc

This contract can be found on testnet and was selfdestructed, but now i cant deploy more contracts, and dont understand why?
It seems that brownie try to load all my deployments made to testnet and check if they are there, and because contract was selfdestructed it cant be Loaded of contracts.py of brownie.

Flow:

1. Deploy a contract in bsc testnet
2. verify contract on bsc testnet scanner
3. Self destruct the same contract
4. try to run brownie console --network bsc-test to deploy new contract to testnet
5. get this error
: File "C:\Users\josefeio\AppData\Local\Programs\Python\Python39\lib\site-packages\brownie_cli_main_.py", line 64, in main

importlib.import_module(f"brownie._cli.{cmd}").main()

File "C:\Users\josefeio\AppData\Local\Programs\Python\Python39\lib\site-packages\brownie_cli\console.py", line 58, in main
network.connect(CONFIG.argv["network"])
File "C:\Users\josefeio\AppData\Local\Programs\Python\Python39\lib\site-packages\brownie\network\main.py", line 55, in connect
p._load_deployments()
File "C:\Users\josefeio\AppData\Local\Programs\Python\Python39\lib\site-packages\brownie\project\main.py", line 382, in _load_deployments
contract = ProjectContract(self, build, build_json.stem)
File "C:\Users\josefeio\AppData\Local\Programs\Python\Python39\lib\site-packages\brownie\network\contract.py", line 1308, in init
_DeployedContractBase.init(self, address, owner, tx)
File "C:\Users\josefeio\AppData\Local\Programs\Python\Python39\lib\site-packages\brownie\network\contract.py", line 708, in init
raise ContractNotFound(f"No contract deployed at {address}")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions