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

Commit

Permalink
fix pallet test
Browse files Browse the repository at this point in the history
  • Loading branch information
Juul-Mc-Goa committed Dec 4, 2023
1 parent 268e24b commit 952ea7d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/pallets/starknet/src/genesis_loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ mod tests {
let genesis_loader = GenesisData {
contract_classes: vec![(class_hash, class)],
contracts: vec![(contract_address, class_hash)],
predeployed_accounts: Vec::new(),
storage: vec![((contract_address, storage_key), storage_value)],
fee_token_address,
seq_addr_updated: false,
Expand All @@ -189,7 +190,7 @@ mod tests {
let serialized_loader = serde_json::to_string(&genesis_loader).unwrap();

// Then
let expected = r#"{"contract_classes":[["0x1",{"path":"cairo-contracts/ERC20.json","version":0}]],"contracts":[["0x2","0x1"]],"storage":[[["0x2","0x3"],"0x4"]],"fee_token_address":"0x5","seq_addr_updated":false}"#;
let expected = r#"{"contract_classes":[["0x1",{"path":"cairo-contracts/ERC20.json","version":0}]],"contracts":[["0x2","0x1"]],"predeployed_accounts":[],"storage":[[["0x2","0x3"],"0x4"]],"fee_token_address":"0x5","seq_addr_updated":false}"#;
assert_eq!(expected, serialized_loader);
}
}
8 changes: 8 additions & 0 deletions crates/pallets/starknet/src/tests/mock/genesis.json
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,14 @@
"0x92000"
]
],
"predeployed_accounts": [
[
"0x02356b628d108863baf8644c945d97bad70190af5957031f4852d00d0f690a77",
"0x03bcec8de953ba8e305e2ce2db52c91504aefa7c56c91211873b4d6ba36e8c32",
"No validation account",
null
]
],
"storage": [
[
[
Expand Down

0 comments on commit 952ea7d

Please sign in to comment.