-
Notifications
You must be signed in to change notification settings - Fork 77
getNonce and addInvokeTransaction TxV1 on RPC v0.1 #303
getNonce and addInvokeTransaction TxV1 on RPC v0.1 #303
Conversation
c96a293
to
abdb148
Compare
Hi, I've tested the change with an integration test on Caigo and it works fine. I think it provides the ability to address #275 before we can migration to v0.2 of the protocol. This would provide the same level of feature than eqlabs/pathfinder#632. I am sorry, I do not know how to write the associated tests |
abdb148
to
560591b
Compare
560591b
to
e0fc61c
Compare
Hi @gregoryguillou , thanks! |
I saw the PR and I am looking forward to having it on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I read the discussion and we will first merge your PR, @gregoryguillou. Can you first make sure that you formatted the code?
LGTM: ./scripts/format.sh
The currently activated Python version 3.10.6 is not supported by the project (>=3.8,<3.10).
Trying to find and use a compatible version.
Using python3.9 (3.9.14)
All done! ✨ 🍰 ✨
79 files left unchanged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I unchecked a point in your checklist ("Documented the changes") since your PR introduces an implementation for method starknet_getNonce
, but page/docs/guide/json-rpc-api.md
was unchanged.
Regarding tests, you can take a look at test/rpc/test_rpc_transactions.py. Perhaps using pytest.mark.parametrize will be of use; you could modify some of the existing tests to add an extra case where entry_point_selector or nonce is omitted.
|
Usage related changes
This PR enables
starknet_getNonce
and allow to collect and pass theNonce
from RPC v0.1 to the gateway. This also enables to execute an v1 transaction on RPC v0.1 by makingentry_point_selector
optional as expected by v1 from what I understand.Development related changes
There are 3 changes associated with this PR:
get_nonce
in RPCnonce
withhex
inadd_invoke_transaction
to make it consistent withversion
ormax_fee
entry_point_selector
optional onmake_invoke_function
in RPC and updateadd_invoke_transaction
to also make it optionalChecklist:
./scripts/format.sh
./scripts/lint.sh
I am sorry for the tests but I do not know how to handle it properly