-
Notifications
You must be signed in to change notification settings - Fork 553
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tests on testnet are buggy when using Contract.at
#1144
Comments
After doing some more testing, it looks like the If I have in my Commenting out this line also appears to do the trick of fixing the error brownie/brownie/network/contract.py Line 231 in 4a399b1
contract._save_deployment()
_add_contract(contract)
# self._contracts.append(contract)
if CONFIG.network_type == "live":
_add_deployment(contract) |
Ok, I think I got it. It's adding a
|
|
Aha.... I should use |
Looks like we could do a few things:
Happy to help here if there are any thoughts |
Contract.at
I've gone deep down the brownie hole on this, and I think I see a few easy wins. Let me know what you think. |
@PatrickAlphaC How did you even get the tests running on Kovan? Whenever I try running tests in Brownie on a test network, I get the following error. They work fine on the mainnet-fork network though.
|
I have the same issue, kovan works when I write brownie run but not working for brownie test. UPDATE 04-08-2022: |
I just used |
Environment information
brownie
Version: 1.14.6ganache-cli
Version: N/Asolc
Version: N/AWhat was wrong?
When running tests on a live network like kovan, brownie attempts to "tear down" instances with the
close
function and calls_remove_contract
from a list it gathers:On line 468
This can bring in duplicates, so when brownie
del
s them, it runs into a keyerror since it will have already deleted it.Here is a full output:
Please include information like:
Fix
This can be fixed easily by changing that one line to:
The text was updated successfully, but these errors were encountered: