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

✅ Tested starknet_getTransactionStatus #26

Merged
merged 7 commits into from
Jan 11, 2024

Conversation

Trantorian1
Copy link
Member

👍 Tests include:

  • invalid transaction
  • transaction accepted on L1
  • transaction accepted on L2: uses latest transaction from latest block
  • transaction reverted on L1

👎 Test do not include:

  • Reverted L2 transactions: complicated since this would require parsing the latest block for REVERTED transaction (which is not guaranteed).
  • Received transaction: transaction won't even be added to latest block until it is accepted, so this isn't possible unless a mock sequencer is set up to hold transaction in RECEIVED state.
  • Rejected: again complicated, since REJECTED transactions are not added to blocks and cannot be found on explorers.

TLDR: a mock sequencer would be a good idea in the future.

@Trantorian1 Trantorian1 requested a review from antiyro January 10, 2024 14:14
@Trantorian1 Trantorian1 self-assigned this Jan 10, 2024
@Trantorian1
Copy link
Member Author

Formatted code to pass clippy checks in 64c4829

@antiyro antiyro merged commit b074f4b into KasarLabs:main Jan 11, 2024
1 check passed
@Trantorian1 Trantorian1 deleted the test/get_transaction_status branch January 12, 2024 11:03
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.

2 participants