Skip to content

feat: mint accepted automatic deposits#177

Draft
lpahlavi wants to merge 1 commit intolpahlavi/defi-2780-process-signatures-queuefrom
lpahlavi/defi-2780-mint-automatic-deposits
Draft

feat: mint accepted automatic deposits#177
lpahlavi wants to merge 1 commit intolpahlavi/defi-2780-process-signatures-queuefrom
lpahlavi/defi-2780-mint-automatic-deposits

Conversation

@lpahlavi
Copy link
Copy Markdown
Contributor

Summary

  • Implements mint_automatic_deposits timer that drains the accepted_deposits map and mints ckSOL via icrc1_transfer for each accepted automatic deposit
  • Wires up the new timer in setup_timers() with a 5-second interval
  • Adds mint_automatic_deposits_tests unit tests (3 tests: happy path, mint failure keeps deposit for retry, no-op when empty)
  • Adds should_automatically_mint_deposit integration test verifying the full end-to-end automatic deposit flow: update_balance → poll (getSignaturesForAddress) → signature processing (getTransaction) → minting → correct ckSOL balance

Stacks on: #176 (process signatures queue and accept automatic deposits)

Test plan

🤖 Generated with Claude Code

@lpahlavi lpahlavi marked this pull request as ready for review April 24, 2026 13:15
@lpahlavi lpahlavi requested a review from a team as a code owner April 24, 2026 13:15
@lpahlavi lpahlavi marked this pull request as draft April 24, 2026 13:16
@lpahlavi lpahlavi force-pushed the lpahlavi/defi-2780-process-signatures-queue branch 2 times, most recently from c03a2cc to 691066e Compare April 24, 2026 14:33
@lpahlavi lpahlavi force-pushed the lpahlavi/defi-2780-mint-automatic-deposits branch 2 times, most recently from 7aed2a6 to 764c2c0 Compare April 24, 2026 14:42
@lpahlavi lpahlavi force-pushed the lpahlavi/defi-2780-process-signatures-queue branch 2 times, most recently from e41c91c to 7d35feb Compare April 27, 2026 11:42
@lpahlavi lpahlavi force-pushed the lpahlavi/defi-2780-mint-automatic-deposits branch from 764c2c0 to 0d23e9f Compare April 27, 2026 11:42
@lpahlavi lpahlavi force-pushed the lpahlavi/defi-2780-process-signatures-queue branch from 7d35feb to 9600ad8 Compare April 27, 2026 13:14
@lpahlavi lpahlavi force-pushed the lpahlavi/defi-2780-mint-automatic-deposits branch from 0d23e9f to 65c11e1 Compare April 27, 2026 13:14
@lpahlavi lpahlavi force-pushed the lpahlavi/defi-2780-process-signatures-queue branch from 9600ad8 to d22faad Compare April 27, 2026 13:22
@lpahlavi lpahlavi force-pushed the lpahlavi/defi-2780-mint-automatic-deposits branch 2 times, most recently from b01b52d to 68f920d Compare April 27, 2026 13:28
@lpahlavi lpahlavi force-pushed the lpahlavi/defi-2780-process-signatures-queue branch from d22faad to d27a8ba Compare April 28, 2026 07:05
@lpahlavi lpahlavi force-pushed the lpahlavi/defi-2780-mint-automatic-deposits branch from 68f920d to 40a089d Compare April 28, 2026 07:05
@lpahlavi lpahlavi force-pushed the lpahlavi/defi-2780-process-signatures-queue branch from d27a8ba to bad6704 Compare April 28, 2026 07:17
@lpahlavi lpahlavi force-pushed the lpahlavi/defi-2780-mint-automatic-deposits branch from 40a089d to cf7c2dc Compare April 28, 2026 07:17
@lpahlavi lpahlavi force-pushed the lpahlavi/defi-2780-process-signatures-queue branch from bad6704 to 8b26721 Compare April 28, 2026 07:22
Implements the `mint_automatic_deposits` timer that drains the
`accepted_deposits` map and mints ckSOL for each entry via
`icrc1_transfer` to the ledger.

Adds a full end-to-end integration test (`should_automatically_mint_deposit`)
verifying that `update_balance` → poll → signature processing → minting
results in the correct ckSOL balance for the depositor.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@lpahlavi lpahlavi force-pushed the lpahlavi/defi-2780-mint-automatic-deposits branch from cf7c2dc to d7901c3 Compare April 28, 2026 07:23
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.

1 participant