Skip to content

Ability to manual set nonce of tx for transfer, deploy, transact methods was added.#169

Merged
q9f merged 3 commits intoq9f:mainfrom
d4mk0:feature/customizable_nonce
Nov 30, 2022
Merged

Ability to manual set nonce of tx for transfer, deploy, transact methods was added.#169
q9f merged 3 commits intoq9f:mainfrom
d4mk0:feature/customizable_nonce

Conversation

@d4mk0
Copy link
Contributor

@d4mk0 d4mk0 commented Nov 24, 2022

Sometimes we need to replace already submitted pending tx, or plan our work with creating array of transactions to send, and it requires manual setting of nonce value. This PR give ability to set tx nonce manually.

Copy link
Owner

@q9f q9f left a comment

Choose a reason for hiding this comment

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

Great!

# @param **nonce [Integer] optional specific nonce for transaction.
# @return [String] the local transaction hash.
def transfer(destination, amount, sender_key = nil, legacy = false)
def transfer(destination, amount, sender_key = nil, legacy = false, **kwargs)
Copy link
Owner

Choose a reason for hiding this comment

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

Do you mind tow rewrite the sender key and legacy transaction toggle to kwargs too? I meant to do this for a while. 🙏🏼

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I thought about it, but it will crash backward compatibility.

Ok, I will do next steps for this PR:

  • move some args to kwargs
  • code quality
  • conflicts resolving

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done with ef5a07e

@q9f q9f added the enhancement New feature or request label Nov 26, 2022
@codecov-commenter
Copy link

codecov-commenter commented Nov 26, 2022

Codecov Report

Merging #169 (81c638e) into main (3e08bd3) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #169   +/-   ##
=======================================
  Coverage   99.75%   99.75%           
=======================================
  Files          70       70           
  Lines        4023     4058   +35     
=======================================
+ Hits         4013     4048   +35     
  Misses         10       10           
Impacted Files Coverage Δ
lib/eth/client.rb 100.00% <100.00%> (ø)
spec/eth/client_spec.rb 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@q9f q9f merged commit 7b3c67a into q9f:main Nov 30, 2022
@q9f q9f added the breaking change Should clearly be documented label Nov 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking change Should clearly be documented enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants