Skip to content

Update Payments FAQ #7845

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Update Payments FAQ #7845

wants to merge 2 commits into from

Conversation

saminacodes
Copy link
Member

@saminacodes saminacodes commented Aug 12, 2025


PR-Codex overview

This PR adds a new FAQ entry to the payments section, detailing how to split payments between multiple destination wallet addresses using the Split contract.

Detailed summary

  • Added a new FAQ entry on splitting payments.
  • Explained the use of the Split contract for managing multiple beneficiary addresses.
  • Provided steps for deploying the contract and distributing funds using the distribute() function.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Summary by CodeRabbit

  • Documentation
    • Added an FAQ explaining how to split a payment across multiple wallet addresses using a split contract: deploying with beneficiary addresses and allocations, setting the sale recipient to the split contract, and using the distribute action. Clarifies that funds are automatically split per configured percentages and that recipient lists and allocations are fixed at deployment. No runtime/product behavior changes.

Signed-off-by: samina <[email protected]>
@saminacodes saminacodes requested review from a team as code owners August 12, 2025 18:25
Copy link

changeset-bot bot commented Aug 12, 2025

⚠️ No Changeset found

Latest commit: bcbdc3b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Aug 12, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Project Deployment Preview Comments Updated (UTC)
docs-v2 Ready Preview Comment Aug 12, 2025 7:37pm
4 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
nebula ⬜️ Skipped Aug 12, 2025 7:37pm
thirdweb_playground ⬜️ Skipped Aug 12, 2025 7:37pm
thirdweb-www ⬜️ Skipped Aug 12, 2025 7:37pm
wallet-ui ⬜️ Skipped Aug 12, 2025 7:37pm

Copy link
Contributor

graphite-app bot commented Aug 12, 2025

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • merge-queue - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

Copy link
Contributor

coderabbitai bot commented Aug 12, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

Adds a new FAQ entry to the payments portal documenting how to split a payment across multiple wallet addresses using a Thirdweb Split contract, including deploying the Split with beneficiaries, setting the sale recipient to the Split contract address, and calling distribute() to release funds.

Changes

Cohort / File(s) Summary
Payments FAQ Docs
apps/portal/src/app/payments/faq/page.mdx
Added FAQ explaining payment splitting via Thirdweb Split contract: deploy with immutable beneficiaries, set sale recipient to the Split contract address, and call distribute() to distribute received funds according to deployment allocations.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Warning

Review ran into problems

🔥 Problems

Errors were encountered while retrieving linked issues.

Errors (1)
  • TEAM-0000: Entity not found: Issue - Could not find referenced Issue.

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 702e7c7 and bcbdc3b.

📒 Files selected for processing (1)
  • apps/portal/src/app/payments/faq/page.mdx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/portal/src/app/payments/faq/page.mdx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
  • GitHub Check: E2E Tests (pnpm, webpack)
  • GitHub Check: E2E Tests (pnpm, esbuild)
  • GitHub Check: Build Packages
  • GitHub Check: Size
  • GitHub Check: E2E Tests (pnpm, vite)
  • GitHub Check: Unit Tests
  • GitHub Check: Lint Packages
  • GitHub Check: Analyze (javascript)
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch payments-FAQ

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added the Portal Involves changes to the Portal (docs) codebase. label Aug 12, 2025
Copy link

codecov bot commented Aug 12, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 56.33%. Comparing base (8665e8f) to head (bcbdc3b).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7845      +/-   ##
==========================================
- Coverage   56.34%   56.33%   -0.01%     
==========================================
  Files         905      905              
  Lines       58830    58834       +4     
  Branches     4149     4158       +9     
==========================================
  Hits        33147    33147              
- Misses      25577    25582       +5     
+ Partials      106      105       -1     
Flag Coverage Δ
packages 56.33% <ø> (-0.01%) ⬇️
see 8 files with indirect coverage changes
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (3)
apps/portal/src/app/payments/faq/page.mdx (3)

30-30: Clarify the target context (“Payments configuration”).

Being explicit avoids ambiguity across other product configs.

Apply this diff:

-- Set the Split contract address as the sale recipient in your configuration.
+- Set the Split contract address as the sale recipient in your Payments configuration.

33-33: Avoid implying automatic payout; clarify distribution timing.

Funds are split upon distribution, not “automatically” at receipt.

Apply this diff:

-This will automatically split payments according to the allocation you defined during deployment.
+When you trigger distribution, funds will be split among recipients according to the allocation defined at deployment.

33-35: Add a note about immutability and how to update recipients/shares.

This preempts common questions about editing recipients later.

Apply this diff:

-This will automatically split payments according to the allocation you defined during deployment.
+When you trigger distribution, funds will be split among recipients according to the allocation defined at deployment.
+
+Note: Recipients and allocations cannot be changed after deployment. To make changes, deploy a new Split and update your Payments configuration to point to the new contract.
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0d7e5e5 and 702e7c7.

📒 Files selected for processing (1)
  • apps/portal/src/app/payments/faq/page.mdx (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
  • GitHub Check: E2E Tests (pnpm, esbuild)
  • GitHub Check: E2E Tests (pnpm, vite)
  • GitHub Check: Size
  • GitHub Check: Unit Tests
  • GitHub Check: E2E Tests (pnpm, webpack)
  • GitHub Check: Lint Packages
  • GitHub Check: Analyze (javascript)

<Details summary="How can I split the payment between multiple destination wallet addresses?">
You can use the thirdweb [Split contract](https://thirdweb.com/thirdweb.eth/Split) to handle this.

- Deploy the Split contract with the set of beneficiary addresses. (These are immutable and fixed at deploy time.
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Fix unclosed parenthesis in bullet point.

There’s an opening parenthesis that never closes.

Apply this diff:

-- Deploy the Split contract with the set of beneficiary addresses. (These are immutable and fixed at deploy time.
+- Deploy the Split contract with the set of beneficiary addresses and their allocation percentages. (These are immutable and fixed at deploy time.)
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- Deploy the Split contract with the set of beneficiary addresses. (These are immutable and fixed at deploy time.
- Deploy the Split contract with the set of beneficiary addresses and their allocation percentages. (These are immutable and fixed at deploy time.)
🤖 Prompt for AI Agents
In apps/portal/src/app/payments/faq/page.mdx around line 29, the bullet point
"Deploy the Split contract with the set of beneficiary addresses. (These are
immutable and fixed at deploy time." has an unclosed parenthesis; fix it by
adding the missing closing parenthesis and proper punctuation so the sentence
reads e.g. "Deploy the Split contract with the set of beneficiary addresses.
(These are immutable and fixed at deploy time.)"


- Deploy the Split contract with the set of beneficiary addresses. (These are immutable and fixed at deploy time.
- Set the Split contract address as the sale recipient in your configuration.
- Distribute the funds at any time by calling the distribute() function on the contract.
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Distribution function name may differ for ERC20 vs native assets—avoid hardcoding distribute().

Split contracts typically have separate distribution methods for native tokens and ERC20 tokens. Calling out the token-specific path improves correctness.

Apply this diff:

-- Distribute the funds at any time by calling the distribute() function on the contract.
+- Distribute funds by calling the contract’s distribution function. For native tokens, call the distribute() function; for ERC20 tokens, use the token-specific distribution method.

If you want to verify the exact function names for the Thirdweb Split contract, please run this web query:


🌐 Web query:

What are the function names/signatures used by the thirdweb Split contract to distribute native assets and ERC20 tokens?

💡 Result:

Short answer — there are two overloaded distribute functions:

  • Native (network native token, e.g. ETH):

  • ERC‑20 token:

    • Solidity-style: function distribute(address token) external; (nonpayable)
    • SDK helper: distributeByToken({ tokenAddress }) — prepares a call to the contract's distribute(address) function. (portal.thirdweb.com, thirdweb.com)

If you want the exact ABI entry, the ERC‑20 variant is shown with inputs: (token: address) and stateMutability: "nonpayable" in the thirdweb docs. (portal.thirdweb.com)

Citations:


Clarify distribution methods for native vs ERC-20 tokens

The Thirdweb Split contract exposes two overloaded functions for fund distribution:

  • distribute() for native tokens
  • distribute(address token) for ERC-20 tokens (SDK helper: distributeByToken({ tokenAddress }))

Please update the copy in apps/portal/src/app/payments/faq/page.mdx as follows:

- Distribute the funds at any time by calling the distribute() function on the contract.
+ Distribute funds at any time:
+ - For native tokens, call `distribute()`.
+ - For ERC-20 tokens, call `distribute(address token)` (or use the SDK’s `distributeByToken({ tokenAddress })` helper).
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- Distribute the funds at any time by calling the distribute() function on the contract.
Distribute funds at any time:
- For native tokens, call `distribute()`.
- For ERC-20 tokens, call `distribute(address token)` (or use the SDK’s `distributeByToken({ tokenAddress })` helper).
🤖 Prompt for AI Agents
In apps/portal/src/app/payments/faq/page.mdx around line 31, the sentence about
distributing funds is ambiguous; update the copy to distinguish the two Split
contract overloads by stating that distribute() is for native tokens and
distribute(address token) (or SDK helper distributeByToken({ tokenAddress })) is
for ERC-20 tokens, replacing the current single line with a short clear
explanation of both methods and the SDK helper usage.

Copy link
Contributor

github-actions bot commented Aug 12, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 64.06 KB (0%) 1.3 s (0%) 121 ms (+178.67% 🔺) 1.5 s
thirdweb (cjs) 357.05 KB (0%) 7.2 s (0%) 370 ms (+14.44% 🔺) 7.6 s
thirdweb (minimal + tree-shaking) 5.73 KB (0%) 115 ms (0%) 42 ms (+1644.42% 🔺) 157 ms
thirdweb/chains (tree-shaking) 526 B (0%) 11 ms (0%) 48 ms (+5227.41% 🔺) 59 ms
thirdweb/react (minimal + tree-shaking) 19.15 KB (0%) 383 ms (0%) 55 ms (+966.13% 🔺) 438 ms

Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
Signed-off-by: samina <[email protected]>
@vercel vercel bot temporarily deployed to Preview – wallet-ui August 12, 2025 19:28 Inactive
@vercel vercel bot temporarily deployed to Preview – nebula August 12, 2025 19:28 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground August 12, 2025 19:28 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb-www August 12, 2025 19:28 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Portal Involves changes to the Portal (docs) codebase.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants