Skip to content

Commit

Permalink
style
Browse files Browse the repository at this point in the history
  • Loading branch information
kariy committed May 14, 2024
1 parent 2ad4e10 commit b8d7072
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions crates/katana/storage/provider/src/test_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ pub fn create_genesis_for_testing() -> Genesis {
let class_hash = felt!("0x111");
let address = ContractAddress::from(felt!("0x1"));

// TODO: we should have a genesis builder that can do all of this for us.
let class = {
let json = include_str!("../test-data/simple_account.sierra.json");
let json = serde_json::from_str(json).unwrap();
Expand All @@ -67,8 +68,8 @@ pub fn create_genesis_for_testing() -> Genesis {
let account = GenesisAllocation::Account(GenesisAccountAlloc::DevAccount(account));

let mut genesis = Genesis::default();
genesis.classes.insert(class_hash, class); // insert the test class
genesis.extend_allocations([(address, account)]); // insert the test account

// insert test account class and contract
genesis.classes.insert(class_hash, class);
genesis.extend_allocations([(address, account)]);
genesis
}

0 comments on commit b8d7072

Please sign in to comment.