-
Notifications
You must be signed in to change notification settings - Fork 567
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
base: main
Are you sure you want to change the base?
Update Payments FAQ #7845
Conversation
Signed-off-by: samina <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
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. |
Note Other AI code review bot(s) detectedCodeRabbit 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. WalkthroughAdds 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
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (1)
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ 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)
✨ Finishing Touches🧪 Generate unit tests
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov Report✅ All modified and coverable lines are covered by tests. 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
🚀 New features to boost your workflow:
|
There was a problem hiding this 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
📒 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
- 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. |
There was a problem hiding this comment.
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):
- Solidity-style: function distribute() external; (nonpayable)
- SDK helper: distribute() (thirdweb extension). (thirdweb.com, portal.thirdweb.com)
-
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:
- 1: https://thirdweb.com/thirdweb.eth/Split/5.0.1?utm_source=chatgpt.com
- 2: https://portal.thirdweb.com/references/typescript/v5/split/distribute?utm_source=chatgpt.com
- 3: https://portal.thirdweb.com/references/typescript/v5/split/distributeByToken
- 4: https://thirdweb.com/thirdweb.eth/Split/5.0.1?utm_source=chatgpt.com
- 5: https://portal.thirdweb.com/references/typescript/v5/split/distributeByToken
Clarify distribution methods for native vs ERC-20 tokens
The Thirdweb Split contract exposes two overloaded functions for fund distribution:
distribute()
for native tokensdistribute(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.
- 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.
size-limit report 📦
|
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com> Signed-off-by: samina <[email protected]>
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
Split contract
for managing multiple beneficiary addresses.distribute()
function.Summary by CodeRabbit