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

Refactor Starknet test setup #494

Merged
merged 8 commits into from
Jun 17, 2024
Merged

Refactor Starknet test setup #494

merged 8 commits into from
Jun 17, 2024

Conversation

FabijanC
Copy link
Contributor

@FabijanC FabijanC commented Jun 14, 2024

Usage related changes

  • None, hopefully

Development related changes

  • Replace the multiple fn setup(acc_balance: Option<u128>) -> (Starknet, ContractAddress, ...) definitions with:
    • fn setup_starknet_with_no_signature_check_account(acc_balance: u128)
    • fn setup_starknet_with_no_signature_check_account_and_state_capacity(acc_balance: u128, state_archive: StateArchiveCapacity)
  • Instead of passing around the fee token addresses, rely on starknet.block_context.chain_info()
  • Created while implementing the proposal in Memory exhaustion  #272 (comment)
    • With this PR it should be easier
  • Extract (FlattenedSierraClass, FieldElement) to SierraWithCasmHash

Checklist:

  • Checked out the contribution guidelines
  • Applied formatting - ./scripts/format.sh
  • No linter errors - ./scripts/clippy_check.sh
  • No unused dependencies - ./scripts/check_unused_deps.sh
  • No spelling errors - ./scripts/check_spelling.sh
  • Performed code self-review
  • Rebased to the latest commit of the target branch (or merged it into my branch)
  • Updated the docs if needed - ./website/README.md
  • Linked the issues resolvable by this PR - linking info
  • Updated the tests if needed; all passing - execution info

@FabijanC FabijanC marked this pull request as ready for review June 14, 2024 10:48
@FabijanC FabijanC changed the title Refactor test setup Refactor Starknet test setup Jun 14, 2024
@FabijanC FabijanC merged commit 3ad8145 into main Jun 17, 2024
@FabijanC FabijanC deleted the refactor-test-setup branch June 17, 2024 10:21
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.

None yet

2 participants