Skip to content
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

Ensure contract address exists in contract map before deleting #1689

Merged
merged 2 commits into from
Jan 29, 2024

Conversation

calina-c
Copy link
Contributor

Closes #1144

What I did

A simple check that the Key exists to avoid KeyError

Related issue: #1144

How I did it

How to verify it

Local and GitHub Action tests used to fail with KeyError in https://github.com/oceanprotocol/df-py/
Investigated against the existing issue in the brownie repo (#1144). Using from_abi did not fix it when used as a combination (both at and from_abi). Currently in df-py we are rewriting the problematic line from brownie/network/state.py using a sed command:

https://github.com/oceanprotocol/df-py/blob/ee7a5f9b1449ed3d308639add306d0c0f98a4a7e/.github/workflows/test.yml#L57

However, it seems like a no-hassle fix and would help a lot of devs using brownie.

Checklist

  • I have confirmed that my PR passes all linting checks
  • I have included test cases
  • I have updated the documentation
  • I have added an entry to the changelog

Co-authored-by: Charles Cooper <cooper.charles.m@gmail.com>
@iamdefinitelyahuman iamdefinitelyahuman merged commit e894aa9 into eth-brownie:master Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tests on testnet are buggy when using Contract.at
3 participants