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

add RedeemStake to autopilot #1012

Merged
merged 16 commits into from
Jan 8, 2024
Merged

add RedeemStake to autopilot #1012

merged 16 commits into from
Jan 8, 2024

Conversation

asalzmann
Copy link
Contributor

Closes: #771

Context and purpose of the change

Add RedeemStake to autopilot.

Brief Changelog

  • Add integration test for RedeemStake
  • Add unittest for RedeemStake
  • Integrate with autopilot module

@asalzmann asalzmann requested a review from a team December 5, 2023 03:36
Copy link
Contributor

@Vvaradinov Vvaradinov left a comment

Choose a reason for hiding this comment

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

LGTM! 👍🏻 Excited to test this with the outpost.

@sampocs sampocs added the v17 label Dec 6, 2023
Copy link
Collaborator

@sampocs sampocs left a comment

Choose a reason for hiding this comment

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

looks good! mostly nit's

So much easier to reason about without the transfer back haha

I'll review the unit tests tomorrow!

dockernet/tests/integration_tests.bats Outdated Show resolved Hide resolved
dockernet/tests/integration_tests.bats Outdated Show resolved Hide resolved
dockernet/tests/integration_tests.bats Outdated Show resolved Hide resolved
x/stakeibc/types/message_liquid_stake.go Outdated Show resolved Hide resolved
x/autopilot/keeper/redeem_stake.go Outdated Show resolved Hide resolved
x/autopilot/keeper/redeem_stake.go Outdated Show resolved Hide resolved
x/autopilot/keeper/redeem_stake.go Outdated Show resolved Hide resolved
x/autopilot/keeper/redeem_stake.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@sampocs sampocs left a comment

Choose a reason for hiding this comment

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

Coverage on the tests looks good! But they are a bit bloated - I can take a pass at slimming them down if it'd help!

x/autopilot/keeper/redeem_stake_test.go Outdated Show resolved Hide resolved
x/autopilot/keeper/redeem_stake_test.go Outdated Show resolved Hide resolved
x/autopilot/keeper/redeem_stake_test.go Outdated Show resolved Hide resolved
x/autopilot/keeper/redeem_stake_test.go Outdated Show resolved Hide resolved
x/autopilot/keeper/redeem_stake_test.go Outdated Show resolved Hide resolved
x/autopilot/keeper/redeem_stake_test.go Outdated Show resolved Hide resolved
x/autopilot/keeper/redeem_stake_test.go Outdated Show resolved Hide resolved
x/autopilot/keeper/redeem_stake_test.go Outdated Show resolved Hide resolved
Copy link
Contributor

@shellvish shellvish left a comment

Choose a reason for hiding this comment

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

Looks great to me! A couple of nit suggestions, but overall very clean flow 🙂

x/autopilot/keeper/redeem_stake.go Outdated Show resolved Hide resolved
x/autopilot/keeper/redeem_stake_test.go Outdated Show resolved Hide resolved
x/autopilot/module_ibc.go Show resolved Hide resolved
Copy link
Contributor

@riley-stride riley-stride left a comment

Choose a reason for hiding this comment

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

Looking very good! Added some light comments, main ones are potential issues with IsStAssetDenom and HostZoneDenomFromStAssetDenom, and testing the case where you redeem twice in one day.

dockernet/tests/integration_tests.bats Show resolved Hide resolved
dockernet/tests/integration_tests.bats Outdated Show resolved Hide resolved
x/autopilot/module_ibc.go Show resolved Hide resolved
x/autopilot/keeper/redeem_stake_test.go Show resolved Hide resolved
x/stakeibc/types/message_liquid_stake.go Outdated Show resolved Hide resolved
Copy link
Contributor

@riley-stride riley-stride left a comment

Choose a reason for hiding this comment

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

The new integration test looks great, thanks for adding that!

@sampocs sampocs changed the base branch from autopilot-ls-and-forward to main January 8, 2024 21:13
@sampocs sampocs added the A:automerge Automatically merge PR once checks pass label Jan 8, 2024
@mergify mergify bot merged commit 349fce3 into main Jan 8, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A:automerge Automatically merge PR once checks pass C:stakeibc T:build v17
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants