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

Expose nonce parameter #488

Merged
merged 3 commits into from
May 5, 2020

Conversation

matnad
Copy link
Collaborator

@matnad matnad commented May 5, 2020

What I did

  • changed transfer, deploy and transact functionality to expose the nonce parameter
  • minor clarification in error messages
  • added test cases for manual nonce

Related issue: #484

How I did it

Added nonce as kwarg or dict element when creating a transaction. E.g.:
accounts[0].transfer(accounts[1], nonce=5)
tester.doNothing({"from": accounts[0], "nonce": 5})

How to verify it

run tests

Checklist

  • I have confirmed that my PR passes all linting checks
  • I have included test cases
  • I have updated the documentation
  • I have added an entry to the changelog

matnad added 3 commits May 5, 2020 12:20
- changed transfer, deploy and transact functionality to expose the nonce parameter
- minor clarification in error messages
- added test cases for manual nonce
Also re-ordered params for Account.transfer() to be consistent with undo() and redo()
@codecov-io
Copy link

codecov-io commented May 5, 2020

Codecov Report

Merging #488 into master will increase coverage by 9.44%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #488      +/-   ##
==========================================
+ Coverage   78.89%   88.33%   +9.44%     
==========================================
  Files          56       56              
  Lines        6089     6089              
  Branches     1338     1338              
==========================================
+ Hits         4804     5379     +575     
+ Misses       1086      489     -597     
- Partials      199      221      +22     
Impacted Files Coverage Δ
brownie/network/account.py 93.18% <ø> (+1.36%) ⬆️
brownie/network/contract.py 90.76% <100.00%> (ø)
brownie/project/compiler/solidity.py 92.30% <0.00%> (+0.66%) ⬆️
brownie/network/state.py 94.59% <0.00%> (+5.40%) ⬆️
brownie/project/main.py 90.24% <0.00%> (+9.09%) ⬆️
brownie/project/scripts.py 87.14% <0.00%> (+15.71%) ⬆️
brownie/test/coverage.py 100.00% <0.00%> (+55.55%) ⬆️
brownie/test/__init__.py 100.00% <0.00%> (+57.89%) ⬆️
brownie/test/managers/utils.py 66.66% <0.00%> (+66.66%) ⬆️
... and 7 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d2878bb...c89e9b8. Read the comment docs.

Copy link
Member

@iamdefinitelyahuman iamdefinitelyahuman left a comment

Choose a reason for hiding this comment

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

LGTM

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.

3 participants