Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
kariy committed Apr 18, 2024
1 parent 7b31334 commit 603959a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 2 additions & 5 deletions crates/katana/primitives/src/genesis/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ impl Builder {
self.classes.entry(hash).or_insert(class);
}

// TODO(kariy): update fee token balance in the genesis
for (address, alloc) in &mut self.allocations {
let class_hash = alloc.class_hash().ok_or(GenesisBuilderError::MissingClassHash)?;
if !self.classes.contains_key(&class_hash) {
Expand Down Expand Up @@ -195,8 +194,6 @@ impl From<Genesis> for Builder {

#[cfg(test)]
mod tests {
use crate::genesis::allocation::GenesisAccount;

use super::*;

#[test]
Expand All @@ -208,7 +205,7 @@ mod tests {
.timestamp(0)
.sequencer_address(ContractAddress::default())
.gas_prices(GasPrices::default())
// .fee_token(FeeTokenConfig::default())
.fee_token(FeeTokenConfig::default())
.add_classes([])
.add_accounts([])
.add_contracts([])
Expand All @@ -221,7 +218,7 @@ mod tests {
assert_eq!(genesis.timestamp, 0);
assert_eq!(genesis.sequencer_address, ContractAddress::default());
assert_eq!(genesis.gas_prices, GasPrices::default());
// assert_eq!(genesis.fee_token, FeeTokenConfig::default());
assert_eq!(genesis.fee_token, FeeTokenConfig::default());
assert_eq!(genesis.classes, HashMap::new());
assert_eq!(genesis.allocations, BTreeMap::new());
}
Expand Down
2 changes: 1 addition & 1 deletion crates/katana/primitives/src/genesis/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ use crate::version::CURRENT_STARKNET_VERSION;
use crate::FieldElement;

#[serde_with::serde_as]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[derive(Debug, Clone, Serialize, Deserialize, Default, PartialEq, Eq)]
pub struct FeeTokenConfig {
/// The name of the fee token.
pub name: String,
Expand Down

0 comments on commit 603959a

Please sign in to comment.