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

Add chain object #681

Merged
merged 15 commits into from
Jul 13, 2020
Merged

Add chain object #681

merged 15 commits into from
Jul 13, 2020

Conversation

iamdefinitelyahuman
Copy link
Member

What I did

  • Add the chain object
  • Move time travel / snapshot / mining methods from rpc to chain, mark rpc methods as deprecated
  • Updates to documentation

Closes #611

How I did it

  • Chain is a singleton that emulates list syntax to provide access to web3.eth.blockNumber and web3.eth.getBlock
  • the revert registry has been moved from rpc to state
  • Chain.get_transaction provides a public API for generating TransactionReceipt objects when the tx didn't originate in Brownie - imo this is much nicer than having to manually import TransactionReceipt

How to verify it

Run tests. I added some new cases and converted over quite a few existing ones.

@iamdefinitelyahuman iamdefinitelyahuman merged commit 9fd74d4 into master Jul 13, 2020
@iamdefinitelyahuman iamdefinitelyahuman deleted the feat-chain branch July 19, 2020 22:01
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.

Add an object for easy access to block data
1 participant