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

if already initialised as interface.ERC20, MintableForkToken Contract does not have mint attributes #22

Open
gosuto-inzasheru opened this issue Feb 14, 2022 · 0 comments

Comments

@gosuto-inzasheru
Copy link

gosuto-inzasheru commented Feb 14, 2022

Environment information

  • brownie Version: 1.17.0
  • brownie-token-tester Version: 0.3.2
  • ganache-cli Version: 6.12.2
  • Python Version: 3.9.10
  • OS: macos

What was wrong?

tokens that already have been initialised with brownie.interface.ERC20 do not have the mint attribute:

AttributeError: Contract 'ERC20' object has no attribute 'mint'

How can it be fixed?

instead of simply inheriting Contract, i think the MintableForkToken class should use a custom, hardcoded interface which extends brownie.interface.ERC20 with the necessary functions:

  • mint
  • updateGlobalPoolContract
  • createTokens
  • changeMaxSupply
  • issue
  • configureMinter
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

No branches or pull requests

1 participant