Skip to content

test: add get_stakers increase stake flow#32

Merged
arad-starkware merged 1 commit intomainfrom
arad/test_add_get_stakers_increase_stake_flow
Nov 20, 2025
Merged

test: add get_stakers increase stake flow#32
arad-starkware merged 1 commit intomainfrom
arad/test_add_get_stakers_increase_stake_flow

Conversation

@arad-starkware
Copy link
Collaborator

@arad-starkware arad-starkware commented Nov 19, 2025

This change is Reviewable


Note

Adds a test validating get_stakers before/after a staker increases stake and removes the corresponding idea from flow_ideas.md.

  • Tests:
    • Add get_stakers_increase_stake_flow_test in workspace/apps/staking/contracts/src/flow_test/test.cairo to verify get_stakers results in the same epoch and after K epochs when a staker increases stake.
  • Docs:
    • Remove completed scenario from workspace/apps/staking/contracts/src/flow_test/flow_ideas.md under get_stakers.

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

@arad-starkware arad-starkware marked this pull request as ready for review November 19, 2025 13:02
Copy link
Collaborator

@noa-starkware noa-starkware left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion (waiting on @arad-starkware)


workspace/apps/staking/contracts/src/flow_test/test.cairo line 2378 at r1 (raw file):

    // Staker 1 increase stake.
    system.increase_stake(staker: staker_1, amount: stake_amount);

test here its the same

Copy link
Collaborator Author

@arad-starkware arad-starkware left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 2 files reviewed, all discussions resolved (waiting on @arad-starkware)


workspace/apps/staking/contracts/src/flow_test/test.cairo line 2378 at r1 (raw file):

Previously, noa-starkware wrote…

test here its the same

Done

@arad-starkware arad-starkware force-pushed the arad/test_add_get_stakers_increase_stake_flow branch 2 times, most recently from 986b446 to 494b83c Compare November 19, 2025 13:39
@arad-starkware arad-starkware force-pushed the arad/test_add_get_stakers_enable_disable_tokens_flow branch from 3a4dc96 to 7e21e0d Compare November 19, 2025 13:41
@arad-starkware arad-starkware force-pushed the arad/test_add_get_stakers_increase_stake_flow branch from 494b83c to 7b1c4df Compare November 19, 2025 13:41
@arad-starkware arad-starkware force-pushed the arad/test_add_get_stakers_enable_disable_tokens_flow branch from 7e21e0d to 9ef4317 Compare November 19, 2025 14:26
@arad-starkware arad-starkware force-pushed the arad/test_add_get_stakers_increase_stake_flow branch from 7b1c4df to 1ee509f Compare November 19, 2025 14:27
@arad-starkware arad-starkware force-pushed the arad/test_add_get_stakers_enable_disable_tokens_flow branch from 9ef4317 to edc0883 Compare November 19, 2025 14:29
@arad-starkware arad-starkware force-pushed the arad/test_add_get_stakers_increase_stake_flow branch from 1ee509f to c409301 Compare November 19, 2025 14:29
Copy link
Collaborator

@noa-starkware noa-starkware left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion (waiting on @arad-starkware)


workspace/apps/staking/contracts/src/flow_test/test.cairo line 2396 at r2 (raw file):

        (staker_1.staker.address, STRK_WEIGHT_FACTOR / 2, Option::None),
        (staker_2.staker.address, STRK_WEIGHT_FACTOR / 2, Option::None),
    ]

same as above

Code quote:

    let expected_stakers = array![
        (staker_1.staker.address, STRK_WEIGHT_FACTOR / 2, Option::None),
        (staker_2.staker.address, STRK_WEIGHT_FACTOR / 2, Option::None),
    ]

@arad-starkware arad-starkware force-pushed the arad/test_add_get_stakers_increase_stake_flow branch from c409301 to c265e2e Compare November 20, 2025 08:15
@arad-starkware arad-starkware force-pushed the arad/test_add_get_stakers_enable_disable_tokens_flow branch 2 times, most recently from 2278ae9 to 4346593 Compare November 20, 2025 08:17
@arad-starkware arad-starkware force-pushed the arad/test_add_get_stakers_increase_stake_flow branch 2 times, most recently from 1908dd3 to c428848 Compare November 20, 2025 08:20
@arad-starkware arad-starkware force-pushed the arad/test_add_get_stakers_enable_disable_tokens_flow branch from 4346593 to 8c8ba72 Compare November 20, 2025 08:20
@arad-starkware arad-starkware force-pushed the arad/test_add_get_stakers_increase_stake_flow branch from c428848 to 93ede53 Compare November 20, 2025 08:28
@arad-starkware arad-starkware force-pushed the arad/test_add_get_stakers_enable_disable_tokens_flow branch from 8c8ba72 to 42dc49f Compare November 20, 2025 08:28
Copy link
Collaborator Author

@arad-starkware arad-starkware left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 2 files reviewed, all discussions resolved (waiting on @arad-starkware)


workspace/apps/staking/contracts/src/flow_test/test.cairo line 2396 at r2 (raw file):

Previously, noa-starkware wrote…

same as above

Done

@arad-starkware arad-starkware force-pushed the arad/test_add_get_stakers_increase_stake_flow branch from 93ede53 to cc0c679 Compare November 20, 2025 08:31
@arad-starkware arad-starkware force-pushed the arad/test_add_get_stakers_enable_disable_tokens_flow branch from 42dc49f to c246f17 Compare November 20, 2025 09:40
@arad-starkware arad-starkware force-pushed the arad/test_add_get_stakers_increase_stake_flow branch 2 times, most recently from 920d336 to 9a7c1ae Compare November 20, 2025 09:50
@arad-starkware arad-starkware force-pushed the arad/test_add_get_stakers_enable_disable_tokens_flow branch from c246f17 to 5609a0f Compare November 20, 2025 09:50
Copy link
Collaborator

@noa-starkware noa-starkware left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewable status: 0 of 2 files reviewed, all discussions resolved (waiting on @arad-starkware)

@arad-starkware arad-starkware force-pushed the arad/test_add_get_stakers_enable_disable_tokens_flow branch 2 times, most recently from cb8e7e1 to 26ceb20 Compare November 20, 2025 11:02
@arad-starkware arad-starkware force-pushed the arad/test_add_get_stakers_increase_stake_flow branch from 9a7c1ae to 280e737 Compare November 20, 2025 11:03
@arad-starkware arad-starkware changed the base branch from arad/test_add_get_stakers_enable_disable_tokens_flow to graphite-base/32 November 20, 2025 11:07
@arad-starkware arad-starkware force-pushed the arad/test_add_get_stakers_increase_stake_flow branch from 280e737 to 323336e Compare November 20, 2025 11:07
@graphite-app graphite-app bot changed the base branch from graphite-base/32 to main November 20, 2025 11:07
@arad-starkware arad-starkware force-pushed the arad/test_add_get_stakers_increase_stake_flow branch from 323336e to 72468ce Compare November 20, 2025 11:07
@codecov
Copy link

codecov bot commented Nov 20, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.51%. Comparing base (a28d60e) to head (72468ce).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #32      +/-   ##
==========================================
+ Coverage   95.43%   95.51%   +0.07%     
==========================================
  Files          45       45              
  Lines        9446     9607     +161     
==========================================
+ Hits         9015     9176     +161     
  Misses        431      431              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@arad-starkware arad-starkware merged commit 9f9cf2c into main Nov 20, 2025
6 of 7 checks passed
Copy link
Collaborator Author

Merge activity

@arad-starkware arad-starkware deleted the arad/test_add_get_stakers_increase_stake_flow branch November 20, 2025 11:12
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