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

feat: stake and delegation transfer tools for L2 #786

Merged
merged 22 commits into from
Jun 23, 2023

Conversation

pcarranzav
Copy link
Member

@pcarranzav pcarranzav commented Jan 20, 2023

@pcarranzav pcarranzav force-pushed the pcv/l2-gns-migration-owner-only branch from b53a0fd to 18eb0a2 Compare January 24, 2023 15:32
@pcarranzav pcarranzav force-pushed the pcv/l2-stake-migration branch 2 times, most recently from 74cfbfa to fa0f97e Compare January 24, 2023 19:47
@codecov
Copy link

codecov bot commented Jan 25, 2023

Codecov Report

Patch coverage: 99.55% and project coverage change: +0.91 🎉

Comparison is base (3f0f113) 93.53% compared to head (8374f92) 94.44%.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #786      +/-   ##
==========================================
+ Coverage   93.53%   94.44%   +0.91%     
==========================================
  Files          44       49       +5     
  Lines        2257     2429     +172     
  Branches      401      436      +35     
==========================================
+ Hits         2111     2294     +183     
+ Misses        146      135      -11     
Flag Coverage Δ
unittests 94.44% <99.55%> (+0.91%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
contracts/staking/StakingExtension.sol 98.70% <98.70%> (ø)
contracts/l2/staking/L2Staking.sol 100.00% <100.00%> (ø)
contracts/staking/L1Staking.sol 100.00% <100.00%> (ø)
contracts/staking/Staking.sol 99.33% <100.00%> (+3.05%) ⬆️
...acts/tests/L1GraphTokenLockTransferToolBadMock.sol 100.00% <100.00%> (ø)
...ntracts/tests/L1GraphTokenLockTransferToolMock.sol 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@pcarranzav pcarranzav changed the title (WIP) stake and delegation migration helpers for L2 feat: stake and delegation migration helpers for L2 Feb 14, 2023
@pcarranzav pcarranzav marked this pull request as ready for review February 14, 2023 20:57
Base automatically changed from pcv/l2-gns-migration-owner-only to pcv/l2-gns-migration March 3, 2023 19:58
require(_amount >= __minimumIndexerStake, "!minimumIndexerStake sent");
}
// Ensure minimum stake
indexerStake.tokensStaked = indexerStake.tokensStaked.sub(_amount);
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we could use indexerStake.release(_amount) here but it's fine

tokensDelegatedCap
);
require(
indexerStake.tokensUsed() <= indexerStake.tokensStaked.add(tokensDelegatedCapacity),
Copy link
Contributor

Choose a reason for hiding this comment

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

Thinking this might be replaced by getIndexerCapacity(_indexer) > 0

Base automatically changed from pcv/l2-gns-migration to dev May 24, 2023 14:35
@pcarranzav pcarranzav changed the title feat: stake and delegation migration helpers for L2 feat: stake and delegation transfer tools for L2 Jun 22, 2023
@pcarranzav pcarranzav requested a review from abarmat June 22, 2023 20:13
@pcarranzav pcarranzav merged commit 99d7c97 into dev Jun 23, 2023
6 checks passed
@pcarranzav pcarranzav deleted the pcv/l2-stake-migration branch June 23, 2023 20:34
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.

None yet

3 participants