Skip to content
This repository has been archived by the owner on Jan 8, 2025. It is now read-only.

dev: test account_contract entrypoints #929

Open
enitrat opened this issue Sep 12, 2024 · 0 comments
Open

dev: test account_contract entrypoints #929

enitrat opened this issue Sep 12, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@enitrat
Copy link
Contributor

enitrat commented Sep 12, 2024

  • Execute from outside is already tested in test_execute_from_outside.cairo

  • Some tests are already implemented in test_contract_account.cairo

  • Add tests for other entrypoints, using starknet-foudry.

  • Modify existing tests, avoiding contract deployment if possible. For example, to test the get_nonce / set_nonce entrypoints, I can use a combination of store / load and internal state of the contract; which is easier than deploying everything.
    Avoid deploying contracts if possible: for simple use cases, you should be able to use a combination of store, load, and internal testing using contract_state_for_testing.

see https://book.cairo-lang.org/ch17-02-testing-smart-contracts.html#accessing-internal-functions-with-contract_state_for_testing

@enitrat enitrat added the enhancement New feature or request label Sep 12, 2024
@github-project-automation github-project-automation bot moved this to 🆕 Backlog in Kakarot on Starknet Sep 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
No open projects
Status: 🆕 Backlog
Development

No branches or pull requests

1 participant