Skip to content

Commit

Permalink
add balance to test account
Browse files Browse the repository at this point in the history
  • Loading branch information
kariy committed May 16, 2024
1 parent 085028d commit 1b3c1d6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion crates/katana/storage/provider/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,17 @@ futures = { workspace = true, optional = true }
starknet = { workspace = true, optional = true }
tokio = { workspace = true, optional = true }

alloy-primitives = { workspace = true, optional = true }
serde_json = { workspace = true, optional = true }

[features]
default = [ "fork", "in-memory" ]
fork = [ "dep:futures", "dep:starknet", "dep:tokio", "in-memory" ]
in-memory = [ ]
test-utils = [ "dep:serde_json" ]
test-utils = [ "dep:alloy-primitives", "dep:serde_json" ]

[dev-dependencies]
alloy-primitives.workspace = true
katana-core.workspace = true
katana-runner.workspace = true
lazy_static.workspace = true
Expand Down
3 changes: 2 additions & 1 deletion crates/katana/storage/provider/src/test_utils.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use std::sync::Arc;

use alloy_primitives::U256;
use katana_db::mdbx::{test_utils, DbEnvKind};
use katana_primitives::block::{BlockHash, FinalityStatus};
use katana_primitives::class::CompiledClass;
Expand Down Expand Up @@ -64,7 +65,7 @@ pub fn create_genesis_for_testing() -> Genesis {
};

// setup test account
let (_, account) = DevGenesisAccount::new(felt!("0x1"), class_hash);
let (_, account) = DevGenesisAccount::new_with_balance(felt!("0x1"), class_hash, U256::MAX);
let account = GenesisAllocation::Account(GenesisAccountAlloc::DevAccount(account));

let mut genesis = Genesis::default();
Expand Down

0 comments on commit 1b3c1d6

Please sign in to comment.