add get_stakers btc and strk delegations flow#29
Conversation
noa-starkware
left a comment
There was a problem hiding this comment.
Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion (waiting on @arad-starkware)
workspace/apps/staking/contracts/src/flow_test/test.cairo line 2002 at r1 (raw file):
/// FLow: /// Staker 1 stake /// Staker 2 stake
Why do we need 2 stakers? Lets add a check of staker with both delegated strk and delegated btc
arad-starkware
left a comment
There was a problem hiding this comment.
Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion (waiting on @arad-starkware and @noa-starkware)
workspace/apps/staking/contracts/src/flow_test/test.cairo line 2002 at r1 (raw file):
Previously, noa-starkware wrote…
Why do we need 2 stakers? Lets add a check of staker with both delegated strk and delegated btc
With one staker the STRK pool won't change anything in the staking power, since he'd still have all of it. Maybe have one staker with both pools and one with none?
c81b31f to
2a392cb
Compare
53c0237 to
357c939
Compare
noa-starkware
left a comment
There was a problem hiding this comment.
Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion (waiting on @arad-starkware)
workspace/apps/staking/contracts/src/flow_test/test.cairo line 2002 at r1 (raw file):
Previously, arad-starkware wrote…
With one staker the STRK pool won't change anything in the staking power, since he'd still have all of it. Maybe have one staker with both pools and one with none?
talked f2f
2a392cb to
120c70b
Compare
357c939 to
00bbd36
Compare
120c70b to
76c7451
Compare
00bbd36 to
f3f562a
Compare
f3f562a to
83822a4
Compare
76c7451 to
599fcf5
Compare
83822a4 to
767967b
Compare
767967b to
7f4eda4
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #29 +/- ##
==========================================
- Coverage 95.74% 95.43% -0.31%
==========================================
Files 47 45 -2
Lines 11159 9446 -1713
==========================================
- Hits 10684 9015 -1669
+ Misses 475 431 -44 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
7f4eda4 to
59470a4
Compare
arad-starkware
left a comment
There was a problem hiding this comment.
Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion (waiting on @noa-starkware)
workspace/apps/staking/contracts/src/flow_test/test.cairo line 2002 at r1 (raw file):
Previously, noa-starkware wrote…
talked f2f
Done.
noa-starkware
left a comment
There was a problem hiding this comment.
Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion (waiting on @arad-starkware)
workspace/apps/staking/contracts/src/flow_test/test.cairo line 2093 at r3 (raw file):
(staker_4.staker.address, staker_without_strk_delegation_staking_power, Option::None), ] .span();
test the sum of all the 4 is 100%?
arad-starkware
left a comment
There was a problem hiding this comment.
Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion (waiting on @noa-starkware)
workspace/apps/staking/contracts/src/flow_test/test.cairo line 2093 at r3 (raw file):
Previously, noa-starkware wrote…
test the sum of all the 4 is 100%?
https://reviewable.io/reviews/starkware-libs/starknet-staking/34
noa-starkware
left a comment
There was a problem hiding this comment.
Reviewable status: 0 of 2 files reviewed, all discussions resolved (waiting on @arad-starkware)

This change is
Note
Adds a new test verifying get_stakers weighting with STRK and BTC delegations across multiple stakers, plus minor test utils/import updates and a small docs tweak.
get_stakers_delegation_flow_testinflow_test/test.cairovalidatingget_stakerswith 4 stakers and bothSTRK/BTCdelegations; computes expected weights viaSTRK_WEIGHT_FACTOR,BTC_WEIGHT_FACTOR, andmul_wide_and_divand asserts results.flow_test/flow_ideas.mdunderget_stakerslist.Written by Cursor Bugbot for commit 59470a4. This will update automatically on new commits. Configure here.