You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This would fail because tx is in status (NOT_RECEIVED, RECEIVED) when tx1 start and request nonce, so nonce would be the same as the first one (as it only get updated once tx status is in ACCEPTED_ON_L2).
To resolve this contract class should store local transaction hashes, and when a new invoke is executed check the status of the latest transaction. If the status is NOT_RECEIVED or RECEIVED instead of getNonce request increment local nonce counter, else proceed with getNonce request.
This should be the default configuration, also there could be a flag to disable this behavior and always use getNonce?
Take care that if tx fail in Starknet,tx1 and all following invokes (with the same account) will fail.
Not sure it has to be managed inside Starknet.js.
Users are responsible of their sequencing, and can use multiCall if they do not want to wait L2 acceptation between each transaction.
Describe the bug
This would fail because tx is in status (NOT_RECEIVED, RECEIVED) when tx1 start and request nonce, so nonce would be the same as the first one (as it only get updated once tx status is in ACCEPTED_ON_L2).
To resolve this contract class should store local transaction hashes, and when a new invoke is executed check the status of the latest transaction. If the status is NOT_RECEIVED or RECEIVED instead of getNonce request increment local nonce counter, else proceed with getNonce request.
This should be the default configuration, also there could be a flag to disable this behavior and always use getNonce?
To Reproduce
Run Test
https://github.com/0xs34n/starknet.js/blob/e564033273ac49e971bbf1db843fb3de236976c0/__tests__/cairo1v2.test.ts#L281
Expected behavior
To PASS not to FAIL with
Additional context
@janek26 @dhruvkelawala
The text was updated successfully, but these errors were encountered: