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

Allow calls to target a specific block height #586

Closed
iamdefinitelyahuman opened this issue Jun 1, 2020 · 0 comments · Fixed by #596
Closed

Allow calls to target a specific block height #586

iamdefinitelyahuman opened this issue Jun 1, 2020 · 0 comments · Fixed by #596
Labels
enhancement New feature or request

Comments

@iamdefinitelyahuman
Copy link
Member

iamdefinitelyahuman commented Jun 1, 2020

Overview

It should be possible to make a call to a contract at a specific block height.

web3.py exposes this through a block_identifier kwarg:

Eth.call(transaction, block_identifier=web3.eth.defaultBlock)

Specification

In keeping with familiar syntax, I think adding the kwarg to the tx params makes sense:

Token.balanceOf(accounts[0], {'block_identifier': web3.eth.defaultBlock})
@iamdefinitelyahuman iamdefinitelyahuman added the enhancement New feature or request label Jun 1, 2020
@iamdefinitelyahuman iamdefinitelyahuman added this to the Brownie 1.9.0 milestone Jun 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant