Skip to content

Commit

Permalink
fix: failed deserialization when accessible_scopes is missing (#534)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
xJonathanLEI authored Dec 26, 2023
1 parent 6cadb19 commit c974e5c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions starknet-core/src/types/contract/legacy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ pub struct RawLegacyEntryPoint {
#[derive(Debug, Clone, Serialize, Deserialize)]
#[cfg_attr(feature = "no_unknown_fields", serde(deny_unknown_fields))]
pub struct LegacyAttribute {
#[serde(default)]
pub accessible_scopes: Vec<String>,
pub end_pc: u64,
#[serde(skip_serializing_if = "Option::is_none")]
Expand Down

0 comments on commit c974e5c

Please sign in to comment.