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

Block identifier #596

Merged
merged 4 commits into from
Jun 3, 2020
Merged

Block identifier #596

merged 4 commits into from
Jun 3, 2020

Conversation

iamdefinitelyahuman
Copy link
Member

What I did

Expose block_identifier when making contract calls

Closes #586

How I did it

Added the block_identifier kwarg where it made sense. This is the same syntax that web3.py uses.

The only non-trivial thing I encountered was the case where calls are always handled as transactions (when evaluating coverage, for example). In this case, if the kwarg is provided I've opted to forgo running it as a transaction - since we can't very effectively perform a tx against historic state.

How to verify it

Run tests. I added some new test cases.

Copy link
Collaborator

@matnad matnad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@iamdefinitelyahuman iamdefinitelyahuman merged commit 95955d3 into master Jun 3, 2020
@iamdefinitelyahuman iamdefinitelyahuman deleted the feat-block-identifier branch June 3, 2020 13:18
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.

Allow calls to target a specific block height
2 participants