Giter VIP home page Giter VIP logo

brownie-token-tester's People

Contributors

agureevroman avatar iamdefinitelyahuman avatar romanagureev avatar samwerner avatar skellet0r avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

brownie-token-tester's Issues

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

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

BrownieEnvironmentError: Functionality not available in local environment

Environment information

  • brownie Version: v1.19.0
  • brownie-token-tester Version: 0.3.2
  • ganache-cli Version: v6.12.2
  • Python Version: 3.8.13
  • OS: osx/linux/win: macOs Monterey, bash Unix shell

What was wrong?

Functionality not available: I tired installing brownie-token-tester using pipx, pip and setuptools.
I am in anaconda environment and I can see it has been installed.

  • what command you ran
    brownie run scripts/stake.py --network mainnet-fork-dev

  • the code that caused the failure in stake.py:

from brownie_tokens import MintableForkToken
....
dai = MintableForkToken(dai_addr)
  • full output of the error you received:
Brownie v1.19.0 - Python development framework for Ethereum

CurveFiProject is the active project.

Launching 'ganache-cli --accounts 10 --fork https://eth-mainnet.alchemyapi.io/v2/c40U6PVX1zEFdcRfYVjXMC2X1RBpNKpx --mnemonic brownie --port 8545 --hardfork istanbul'...

Running 'scripts/stake.py::main'...
0x66aB6D9362d4F35596279692F0251Db635165871
0x33A4622B82D4c04a53e170c638B944ce27cffce3
  File "brownie/_cli/run.py", line 55, in main
    _include_frame=True,
  File "brownie/project/scripts.py", line 110, in run
    return_value = f_locals[method_name](*args, **kwargs)
  File "./scripts/stake.py", line 19, in main
    dai = MintableForkToken(dai_addr)
  File "brownie/network/contract.py", line 884, in __init__
    build, sources = _get_deployment(alias=address_or_alias)
  File "brownie/network/state.py", line 603, in _get_deployment
    raise BrownieEnvironmentError("Functionality not available in local environment") from None
BrownieEnvironmentError: Functionality not available in local environment

How can it be fixed?

Fill this in if you know how the bug could be fixed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.