Skip to content

Commit c974e5c

Browse files
authored
fix: failed deserialization when accessible_scopes is missing (#534)
Some legacy contract classes are missing this field. Thankfully, this patch does not affect class hash calculation, as `accessible_scopes` is skipped when empty in the first place.
1 parent 6cadb19 commit c974e5c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

starknet-core/src/types/contract/legacy.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ pub struct RawLegacyEntryPoint {
7878
#[derive(Debug, Clone, Serialize, Deserialize)]
7979
#[cfg_attr(feature = "no_unknown_fields", serde(deny_unknown_fields))]
8080
pub struct LegacyAttribute {
81+
#[serde(default)]
8182
pub accessible_scopes: Vec<String>,
8283
pub end_pc: u64,
8384
#[serde(skip_serializing_if = "Option::is_none")]

0 commit comments

Comments
 (0)