-
Notifications
You must be signed in to change notification settings - Fork 619
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
Update Payments FAQ #7845
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -23,6 +23,17 @@ health, price, and speed to guarantee the best path every time. | |||||||||
| Yes, Payments is designed to be agnostic to wallet infrastructure. You can use it with any wallet service. | ||||||||||
| </Details> | ||||||||||
|
|
||||||||||
| <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. | ||||||||||
|
||||||||||
| - 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.)"
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.
Uh oh!
There was an error while loading. Please reload this page.