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

removed trade route dead code #1189

Merged
merged 14 commits into from
May 14, 2024
Merged

removed trade route dead code #1189

merged 14 commits into from
May 14, 2024

Conversation

sampocs
Copy link
Collaborator

@sampocs sampocs commented May 8, 2024

Context

Now that trades are executed off-chain, the ICA swapping code can be removed.

Brief Changelog

  • Deprecated TradeConfig
  • Deprecated trade_config field in TradeRoute and added min_transfer_amount field (only field from TradeConfig that's still used
  • Deprecated fields in CreateTradeRoute and UpdateTradeRoute txs
  • Updated references of MinSwapAmount to MinTransferAmount
  • Updated txs to not set deprecated fields
  • Removed unused hook entry points
    • SwapAllRewardTokens
    • UpdateAllSwapPrices
  • Removed unused hook business logic
    *SwapRewardTokens
    • TradeRewardBalanceQuery (initiates query of USDC)
    • PoolPriceQuery
    • BuildSwapMsg
  • Removed unused ICQ callbacks
    • PoolPriceCallback
    • TradeRewardBalanceCallback (query of USDC in trade account)
  • Fixed unit tests
  • Added trade route migration

Copy link
Contributor

@ethan-stride ethan-stride left a comment

Choose a reason for hiding this comment

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

LGTM
So many lines of code removed. Wow. Much simpler design now

proto/stride/stakeibc/trade_route.proto Show resolved Hide resolved
@sampocs sampocs merged commit 6c53680 into main May 14, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants