Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Commit

Permalink
feat: add Hash,[Partial]Eq to test utils
Browse files Browse the repository at this point in the history
This is useful for aggregator objects that want to keep track (via
hashmap) of the number of contracts initialized inside a test.

In particular, a soon-to-be-added TransactionGenerator object will use
this.
  • Loading branch information
Gilad Chase committed Jul 11, 2024
1 parent c7aa59a commit e23b881
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crates/blockifier/src/test_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ pub const TEST_ERC20_CONTRACT_CLASS_HASH: &str = "0x1010";
pub const ERC20_CONTRACT_PATH: &str = "./ERC20/ERC20_Cairo0/ERC20_without_some_syscalls/ERC20/\
erc20_contract_without_some_syscalls_compiled.json";

#[derive(Clone, Copy, Debug)]
#[derive(Clone, Hash, PartialEq, Eq, Copy, Debug)]
pub enum CairoVersion {
Cairo0,
Cairo1,
Expand Down
2 changes: 1 addition & 1 deletion crates/blockifier/src/test_utils/contracts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const ERC20_CAIRO1_CONTRACT_PATH: &str = "./ERC20/ERC20_Cairo1/erc20.casm.json";

/// Enum representing all feature contracts.
/// The contracts that are implemented in both Cairo versions include a version field.
#[derive(Clone, Copy, Debug, EnumIter)]
#[derive(Clone, Hash, PartialEq, Eq, Copy, Debug, EnumIter)]
pub enum FeatureContract {
AccountWithLongValidate(CairoVersion),
AccountWithoutValidations(CairoVersion),
Expand Down

0 comments on commit e23b881

Please sign in to comment.