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

fix(tests-integration): deploy tx constructors #1052

Open
wants to merge 1 commit into
base: gilad/simplify-feature-account
Choose a base branch
from

Conversation

giladchase
Copy link
Contributor

@giladchase giladchase commented Sep 26, 2024

  • DeployAccountTransactions cannot possibly be constructed through the AccountTransactionGenerator, since the generator will soon needs a deploy account tx in its constructor, to ensure consistent sender ad dresses for the account.

  • Added salt, will also be needed later.

  • Removed unused deploy_account_tx function.


This change is Reviewable

- Move `DeployAccountTransaction`s out of tx generator: it cannot
possibly be constructed through the `AccountTransactionGenerator`,
since the generator will soon needs a deploy account tx in its
constructor, to ensure consistent sender addresses for the account.

- Added salt, will also be needed later.

- Removed unused `deploy_account_tx` function.
@giladchase giladchase force-pushed the gilad/move-deploy-account-constructors branch from a966a02 to af2d84b Compare September 26, 2024 16:23
Copy link

codecov bot commented Sep 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 14.64%. Comparing base (62fa5ac) to head (af2d84b).

Additional details and impacted files
@@                       Coverage Diff                       @@
##           gilad/simplify-feature-account    #1052   +/-   ##
===============================================================
  Coverage                           14.64%   14.64%           
===============================================================
  Files                                  32       32           
  Lines                                2766     2766           
  Branches                             2766     2766           
===============================================================
  Hits                                  405      405           
  Misses                               2341     2341           
  Partials                               20       20           
Flag Coverage Δ
14.64% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@elintul elintul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @giladchase and @Yael-Starkware)


crates/mempool_test_utils/src/starknet_api_test_utils.rs line 198 at r1 (raw file):

}

pub fn generate_default_deploy_account_with_salt(

Why not a method of the generator, as for invoke?

Code quote:

generate_default_deploy_account_with_salt

crates/mempool_test_utils/src/starknet_api_test_utils.rs line 199 at r1 (raw file):

//  TODO(Yael 18/6/2024): Get a final decision from product whether to support Cairo0.
pub fn deploy_account_tx() -> RpcTransaction {

Wan't this used anywhere?

Code quote:

deploy_account_tx

crates/mempool_test_utils/src/starknet_api_test_utils.rs line 204 at r1 (raw file):

    let deploy_account_args = deploy_account_tx_args!(
        class_hash: account.get_class_hash(),
        resource_bounds: test_resource_bounds_mapping(),

Is default zeroed values, while "test" declares some money for the transaction?

Code quote:

resource_bounds: test_resource_bounds_mapping(),

Copy link
Collaborator

@elintul elintul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @giladchase and @Yael-Starkware)


crates/mempool_test_utils/src/starknet_api_test_utils.rs line 198 at r1 (raw file):

Previously, elintul (Elin) wrote…

Why not a method of the generator, as for invoke?

Commit message answered!


crates/mempool_test_utils/src/starknet_api_test_utils.rs line 199 at r1 (raw file):

Previously, elintul (Elin) wrote…

Wan't this used anywhere?

Need to start with reading your commit message... 😬

Copy link
Collaborator

@elintul elintul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @giladchase and @Yael-Starkware)

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