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

dev: write tests for tx v3 #1574

Closed
tdelabro opened this issue Apr 26, 2024 · 7 comments · Fixed by #1607
Closed

dev: write tests for tx v3 #1574

tdelabro opened this issue Apr 26, 2024 · 7 comments · Fixed by #1607
Assignees
Labels
enhancement New feature or request

Comments

@tdelabro
Copy link
Collaborator

tdelabro commented Apr 26, 2024

TXs V3 were added in the latest rebase.

We need both pallet and RPC tests for those.
Pallet to tests failure, edge-cases, and so on.
RPC to test the generic flow.
And Tx computation too

@tdelabro tdelabro added the enhancement New feature or request label Apr 26, 2024
@Gerson2102
Copy link
Contributor

I would like to try this.

@tdelabro
Copy link
Collaborator Author

@Gerson2102 enjoy!

@Gerson2102
Copy link
Contributor

@tdelabro Hello mate. Can you tell me the files where is located what i have to test? And if there is other tests that i can use as examples to help me with this issue please?

@Gerson2102
Copy link
Contributor

I'm exploring the starknet-rpc-test directory, i dont know if those tests can help me or something.

@tdelabro
Copy link
Collaborator Author

tdelabro commented May 6, 2024

@Gerson2102
The exectution of tx is tested in files like crates/pallets/starknet/src/tests/invoke_tx.rs.
You can probably add a tests for each type of tx at the end of the dedicated file, using TxV3 for each one.

@tdelabro
Copy link
Collaborator Author

tdelabro commented May 6, 2024

I'm exploring the starknet-rpc-test directory, i dont know if those tests can help me or something.

I think you can add a TxV3 test file under RPC where you use all three declare, deploy and invoke txV3 consecutively in the same test.
This one should come after the pallet ones

@tdelabro
Copy link
Collaborator Author

tdelabro commented May 6, 2024

Also can you write test for the txV3 hashes_computation please.
Under crates/primitives/transactions/src/compute_hash.rs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants