Skip to content

Conversation

@Shvandre
Copy link
Collaborator

@Shvandre Shvandre commented Jul 4, 2025

Closes #96
Closes #21

@Shvandre Shvandre requested review from Kaladin13 and Copilot July 4, 2025 08:24
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Refactors the liquidity deposit flow to allow specifying an LP token recipient and simplifies error handling by leveraging contract-level require calls.

  • Adds lpTokensReceiver to payloads, message types, and contract constructors in place of the old depositor field.
  • Replaces the single integer status bitmask with two boolean flags and a Status struct.
  • Removes manual reject-message handlers and consolidates checks into require statements.

Reviewed Changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
sources/utils/testUtils.ts Pass lpTokensReceiver: null in test payloads
sources/utils/environment.ts Updated createLiquidityDepositSetup calls to include two new boolean flags
sources/tests/proofs.spec.ts Added lpTokensReceiver: null to proof fixtures
sources/tests/liquidity-deposit.spec.ts Removed old randomInt import, updated status checks, dropped legacy error tests
sources/tests/factory.spec.ts Renamed depositorlpTokensReceiver and added new boolean args
sources/scripts/deploy.ts Updated deploy script to pass lpTokensReceiver and boolean flags
sources/contracts/vaults/vault-interface.tact Added lpTokensReceiver nullable field; removed reject handler interface
sources/contracts/vaults/ton-vault.tact Propagate lpTokensReceiver or default sender; removed deprecated reject logic
sources/contracts/vaults/jetton-vault.tact Use lpTokensReceiver fallback; removed reject logic
sources/contracts/infra/factory.tact Renamed depositorlpTokensReceiver and updated arguments
sources/contracts/core/messages.tact Replaced depositor with lpTokensReceiver in LiquidityDeposit message
sources/contracts/core/liquidity-deposit.tact Swapped depositor for lpTokensReceiver, moved to booleans & struct-based status
sources/contracts/core/amm-pool.tact Forward lpTokensReceiver instead of depositor in pool interactions
Comments suppressed due to low confidence (1)

sources/tests/liquidity-deposit.spec.ts:102

  • The legacy error-handling test cases for mismatched or repeated deposits were removed. Please add new tests covering rejection scenarios under the updated require logic to ensure mis-provision is still blocked.
        })

Copy link
Collaborator

@Kaladin13 Kaladin13 left a comment

Choose a reason for hiding this comment

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

I am not sure about removing if -> again checks

@Kaladin13 Kaladin13 merged commit edc191d into main Jul 7, 2025
1 check passed
@Kaladin13 Kaladin13 deleted the B4cksl4sh/specify-lp-tokens-receiver branch July 7, 2025 12:52
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.

Remove error handling in LP Deposit Vaults: Add the ability to specify LP Tokens receiver

2 participants