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

contract.py does way too much, refactor it #86

Closed
4 tasks done
trentmc opened this issue Aug 24, 2023 · 0 comments · Fixed by #87
Closed
4 tasks done

contract.py does way too much, refactor it #86

trentmc opened this issue Aug 24, 2023 · 0 comments · Fixed by #87
Labels
Type: Enhancement New feature or request

Comments

@trentmc
Copy link
Member

trentmc commented Aug 24, 2023

Background / motivation

utils/contract.py is pretty large. It has

  • network support functions like send_encrypted_tx()
  • Web3Config
  • class definition wrappers for: Token, PredictoorContract, FixedRate, ERC721Factory, DataNft

This also means that utils/test_contract.py is extra-large

TODOs

  • Break contract.py into a few modules:
    • networkutil.py
    • web3util.py
    • ../models/token.py (holding Token), ../models/predictoor_contract.py (holding Predictoor), etc
    • contract.py - what's left: address mgmt, abi, etc
  • Update test structure accordingly
  • Rename utils/ -> util/
  • Tests pass in PR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant