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

User-defined wait time for broadcasted transactions #587

Closed
iamdefinitelyahuman opened this issue Jun 1, 2020 · 1 comment · Fixed by #593
Closed

User-defined wait time for broadcasted transactions #587

iamdefinitelyahuman opened this issue Jun 1, 2020 · 1 comment · Fixed by #593
Assignees
Labels
enhancement New feature or request

Comments

@iamdefinitelyahuman
Copy link
Member

Overview

Allow users to specify the number of confirmations they wish to wait for a transaction.

Specification

When broadcasting a transaction, the required_confs kwarg can determine how many confirmations to wait for. Value can be 0 for a non-blocking action that returns a pending TransactionReceipt. The default value is 1.

accounts[0].transfer(accounts[1], required_confs=n)
Token.transfer(accounts[1], 10000, {'from': accounts[0], 'required_confs': n)

Once a tx is broadcast, it should also be possible to wait for confirmations via a wait method. If the number of confirmations is already greater than n, nothing happens.

tx.wait(n)

Once this is added, the old and half-broken logic around CTRL-C in the console can also be removed.

@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
@matnad matnad self-assigned this Jun 2, 2020
@matnad
Copy link
Collaborator

matnad commented Jun 2, 2020

starting on this

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.

2 participants