Skip to content

Feature(ai-credits): batch Celo pay via Superfluid Host (approve + stream + depositFromAction)#115

Open
blueogin wants to merge 2 commits into
mainfrom
feat/ai-credits/batch-txes
Open

Feature(ai-credits): batch Celo pay via Superfluid Host (approve + stream + depositFromAction)#115
blueogin wants to merge 2 commits into
mainfrom
feat/ai-credits/batch-txes

Conversation

@blueogin

Copy link
Copy Markdown
Contributor

Description

  • Batches AI Credits Celo payment into a single Superfluid Host batchCall with up to 3 ops: G$ approve, CFA create/update/delete, and vault depositFromAction.
  • Only includes a stream op when the quoted monthly stream differs from current monthlyStreamG (supports create/update/delete); deposit-only / stream-only paths stay single-purpose.
  • Aligns with AntSeed vault depositFromAction (CALL_APP_ACTION); keeps buyer as abi.encode(buyer) in deposit data / stream userData.
  • Updates Buy Credits FAQ copy for one confirmation when deposit and stream are combined.

About # (link your issue here)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes.

Checklist:

  • PR title matches follow: (Feature|Bug|Chore) Task Name
  • My code follows the style guidelines of this project
  • I have followed all the instructions described in the initial task (check Definitions of Done)
  • I have performed a self-review of my own code
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have added reference to a related issue in the repository
  • I have added a detailed description of the changes proposed in the pull request. I am as descriptive as possible, assisting reviewers as much as possible.
  • I have added screenshots related to my pull request (for frontend tasks)
  • I have pasted a gif showing the feature.
  • @mentions of the person or team responsible for reviewing proposed changes

blueogin added 2 commits July 23, 2026 13:40
- Introduced `isStreamAmountChanged` function to determine if the stream amount has changed.
- Updated payment validation logic to require either a deposit or a change in the monthly stream amount.
- Refactored `CeloPaymentParams` to include `currentStreamAmountG` for better state management.
- Adjusted error messages and validation checks across various components to improve user feedback and clarity in the payment process.
- Introduced new batch operation types and refactored payment functions to streamline the process of approving deposits and managing streams.
- Updated the `CeloPaymentParams` interface to support new operation structures.
- Improved error handling and user feedback in payment functions.
- Clarified the FAQ in the BuyCreditsFaq component to explain the batching of transactions during the credit purchase process.
@blueogin
blueogin requested review from a team and L03TJ3 July 24, 2026 12:49
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