Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix]: parsing fixed #4

Merged
merged 3 commits into from
May 11, 2024
Merged

[fix]: parsing fixed #4

merged 3 commits into from
May 11, 2024

Conversation

Mohiiit
Copy link
Contributor

@Mohiiit Mohiiit commented May 9, 2024

  1. Fixed parsing as per the documentation here: https://docs.starknet.io/documentation/architecture_and_concepts/Network_Architecture/on-chain-data/
    main changes were:
  2. Added a new function to decode the da_word extract_bits_v2
  3. In the data we also have class declaration, the parser function was only returning Vec< ContractUpdate> but now it would be returning DataJson which is:
pub struct DataJson {
    pub state_update_size: u64,
    pub state_update: Vec<ContractUpdate>,
    pub class_declaration_size: u64,
    pub class_declaration: Vec<ClassDeclaration>,
}

crates/types/src/serde.rs Outdated Show resolved Hide resolved
crates/types/src/serde.rs Outdated Show resolved Hide resolved
crates/types/src/serde.rs Outdated Show resolved Hide resolved
crates/types/src/serde.rs Outdated Show resolved Hide resolved
Copy link
Owner

@AbdelStark AbdelStark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm

@AbdelStark AbdelStark merged commit 21aa29a into AbdelStark:main May 11, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants