Skip to content

apollo_staking: implement get_previous_epoch_data in mock staking contract#12901

Open
dafnamatsry wants to merge 1 commit intomain-v0.14.2from
dafna/mock-staking-get-previous-epoch-data
Open

apollo_staking: implement get_previous_epoch_data in mock staking contract#12901
dafnamatsry wants to merge 1 commit intomain-v0.14.2from
dafna/mock-staking-get-previous-epoch-data

Conversation

@dafnamatsry
Copy link
Collaborator

@dafnamatsry dafnamatsry commented Feb 26, 2026

Note

Medium Risk
Changes the mock contract ABI and storage layout by adding a new optional previous-epoch path, and regenerates the compiled CASM artifact; this can break tests/fixtures that assume the prior interface or bytecode offsets.

Overview
Extends the Cairo1 mock_staking test contract to support a previous epoch alongside the current epoch.

Adds set_previous_epoch plus a new view get_previous_epoch_data that returns Option<(Epoch, BlockNumber, u32)>, backed by new storage fields (has_previous_epoch, previous_epoch). Updates the compiled mock_staking.casm.json accordingly (new bytecode/entry points/segment lengths) to match the ABI change.

Written by Cursor Bugbot for commit e14599a. This will update automatically on new commits. Configure here.

@reviewable-StarkWare
Copy link

This change is Reviewable

Copy link
Collaborator Author

dafnamatsry commented Feb 26, 2026

@dafnamatsry dafnamatsry force-pushed the dafna/mock-staking-get-previous-epoch-data branch from fabaf19 to e14599a Compare February 26, 2026 12:38
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.

2 participants