Repository navigation
docs(examples/base-mainnet): note that MERCHANT_WALLET can be a contract address - #27
Merged
Revinand merged 2 commits intoOct 23, 2026
Merged
Conversation
Member
|
Thanks for this and for listing what you checked and what you could not test. The claim holds: the gateway uses Before I merge:
Suggested section: ## Paying into a contract address
`MERCHANT_WALLET` sets the x402 `payTo` address, which can be a contract such as a revenue splitter on Base. USDC's EIP-3009 `transferWithAuthorization` transfers tokens without invoking a recipient callback, so the contract needs no receive handler.
Before using a contract:
- Confirm it can send USDC onward, for example through its `distribute` function. Otherwise, the funds stay at that address.
- Verify its deployment on each offer's network. Do not reuse the address on another network unless the intended contract is also deployed there.Moving the general rule to |
Drop the caveat that treated MERCHANT_WALLET as a signer. State that a contract exists only on the chain where it was deployed, unlike an EOA, and pad the edited table row with Prettier. Co-authored-by: SCDO Laboratory <SCDOLAB@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds a short "Paying into a contract address" section to
examples/base-mainnet/README.md. It covers a question I had while setting up the gateway: canMERCHANT_WALLETbe a contract, such as a revenue-split contract on Base, rather than an EOA?What I checked:
MERCHANT_WALLETset to a Base contract address,validatepasses onexamples/base-mainnet/config.yaml.payTo(settle.tspayee). Nothing signs with it, and the only check is the Anvil dev-address guard.Not tested: a live mainnet settlement through this gateway. I don't have CDP credentials. I tried
examples/base-mainnet-payai, butstartcrashed my box with a segfault, because itsbetter-sqlite3native build failed there (nomake). That's my environment, not the gateway. The USDC behaviour itself (transferWithAuthorizationto a contractto) is standard EIP-3009 and doesn't call the recipient.The change is docs only. I'm happy to reword it or move it to
docs/configuration.md.