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

Brownie 2.0.0 breaking changes #399

Open
iamdefinitelyahuman opened this issue Apr 9, 2020 · 1 comment
Open

Brownie 2.0.0 breaking changes #399

iamdefinitelyahuman opened this issue Apr 9, 2020 · 1 comment
Labels
code structure Refactoring, reformatting, cleanup Discussion Under discussion - not yet ready for implementation
Milestone

Comments

@iamdefinitelyahuman
Copy link
Member

iamdefinitelyahuman commented Apr 9, 2020

This is a list of breaking changes planned for Brownie 2.0.0 that aren't big enough to warrant their own issues. It is not exhaustive or final. Feel free to comment if you have ideas for other minor changes.

Change

  • Change Account.balance to a @property method
  • Rename Account.transfer to Account.transact
  • Rename ContractMethod.signature to selector and expose the human-readable function signature as signature
  • Adjust language in browne.network.contract to refer to contract functions instead of contract methods
  • Merge _ContractBase.get_method and _DeployedContractBase.get_method_object
  • split compile_source into compile_solidity and compile_vyper
  • in network settings, explorer should only be declared once per chain ID (enable Contract.from_explorer when using a forked mainnet #435)
  • Ganache's gas_limit setting should be called block_gas_limit. The gas_limit setting within brownie-config.yaml can be tx_gas_limit.
  • Use HexBytes everywhere
  • change bytecode/deployedBytecode to creationBytecode / runtimeBytecode
  • Wei should not implicitly convert None to 0 (why is this even a thing?!)

Remove

  • Remove a as a fixture - in the console the shorthand is fine, but in tests it feels sloppy
  • Remove support for old json-format config files
  • Remove pytest.reverts (Move pytest.reverts to brownie.reverts #329)
  • Do not expose config in the public API
    • Unified network settings and removal of config file #408 made first steps in refactoring for how config settings are handled. The ARGV dict was originally meant to hold commandline args, but morphed into a sort-of "internal config" to hold settings that should not be exposed to the user. With config gone from the public API, it will be possible to refactoring how config settings are handled in general. The current implementation is not very intuitive at times.
  • Remove offset and sourcePath fields from compiler artifact
  • remove interface_sources as a kwarg in the compiler functions (Adjust compile path #427)
  • In project.main.new, remove the ignore_subfolder kwarg
  • Remove _ContractBase.signatures
@iamdefinitelyahuman iamdefinitelyahuman added code structure Refactoring, reformatting, cleanup Discussion Under discussion - not yet ready for implementation labels Apr 9, 2020
@iamdefinitelyahuman iamdefinitelyahuman added this to the Brownie 2.0.0 milestone Apr 9, 2020
@iamdefinitelyahuman iamdefinitelyahuman pinned this issue Apr 9, 2020
@matnad
Copy link
Collaborator

matnad commented May 4, 2020

Maybe also remove the ignore_subfolder parameter from project.new() if there are no plans to re-introduce this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code structure Refactoring, reformatting, cleanup Discussion Under discussion - not yet ready for implementation
Projects
None yet
Development

No branches or pull requests

2 participants