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

Stake: test for migrating the stake contract #432

Merged
merged 11 commits into from
Jan 31, 2025

Conversation

gangov
Copy link
Collaborator

@gangov gangov commented Jan 30, 2025

No description provided.

@gangov gangov self-assigned this Jan 30, 2025
@gangov gangov changed the title Stake: old contract Stake: test for migrating the stake contract Jan 30, 2025
Comment on lines 279 to 281
fn unbond_deprecated(env: Env, sender: Address, stake_amount: i128, stake_timestamp: u64) {
sender.require_auth();
env.storage()
Copy link
Member

Choose a reason for hiding this comment

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

This one is the new one, not the deprecated.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

that was a quick draft, I think I might be able to optimize both. Actually needed this because of how we check for pending rewards

Comment on lines +525 to +526
fn withdraw_rewards_deprecated(env: Env, sender: Address) {
env.storage()
Copy link
Member

Choose a reason for hiding this comment

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

The old function were supposed to become a deprecated ones.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

what I understand is withdraw_rewards from the current main branch is supposed to become withdraw_rewards_deprecated and the function withdraw_rewards is from the stake contract tag v1.0.0. Is it vice versa?

@gangov gangov marked this pull request as ready for review January 31, 2025 11:12
@gangov
Copy link
Collaborator Author

gangov commented Jan 31, 2025

merging into the feature branch of the stake replacement

@gangov gangov merged commit fbeded9 into kalo/original-rewards-impl Jan 31, 2025
@gangov gangov deleted the 430-test-for-migrating-stake branch January 31, 2025 11:13
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