Skip to content

Add tests for transfer staked keys #576

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

Merged
merged 10 commits into from
Jan 3, 2025
Merged

Add tests for transfer staked keys #576

merged 10 commits into from
Jan 3, 2025

Conversation

CryptITAustria
Copy link
Collaborator

Added testcases for transfer staked keys:

1) Should update staked count when transferring all staked keys and claim open dividends
2) Should update staked count when transferring some staked keys and claim open dividends
3) Should not allow the owner to transfer staked genesis key
4) Should not allow transfer pending unstake request keys
5) Should fail on transfer more than staked keys in a pool
6) Should fail on transfer non owned key

Added the upgraded contract versions for fixinf the fixture:

  • NodeLicense10
  • Referee11
  • PoolFactory3
  • StakingPool3

[sc-6857]
Update the NodeLicense transfer functions to check for unstaked key amount.

[sc-6858]
Update testcase to check for unstaked keyamount on transfer ✔ Should not allow more than unstaked key count to be transferred

Testsuite passes except the 6 new tests 169 passing | 6 failing

Refactor transfer unstaked keays to work with balance and assignedKey count.
Update Fixture to deploy upgrades.
Add script for deploying upgrades
Copy link
Contributor

@craigbranscom craigbranscom left a comment

Choose a reason for hiding this comment

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

Test suite returns errors - all failing with not implemented reason.

      1) Should update staked count when transferring all staked keys and claim open dividends
      2) Should update staked count when transferring some staked keys and claim open dividends
      3) Should not allow the owner to transfer staked genesis key
      4) Should not allow transfer pending unstake request keys
      5) Should fail on transfer more than staked keys in a pool
      6) Should fail on transfer non owned key

Are we expecting these to pass when we merge with the implementation PR?

@CryptITAustria
Copy link
Collaborator Author

Are we expecting these to pass when we merge with the implementation PR?

@craigbranscom Actually the implementations went from this branch so you can run the passing tests there.

@CryptITAustria CryptITAustria merged commit 2c12617 into develop Jan 3, 2025
@CryptITAustria CryptITAustria deleted the feat/sc-6398 branch January 3, 2025 17:43
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