feat(e2e): add coinbase express server and facilitator with MoneyParser#12
Merged
feat(e2e): add coinbase express server and facilitator with MoneyParser#12
Conversation
Implement e2e tests for coinbase v2 SDK using MoneyParser for DHLU token. - Add coinbase components in e2e/coinbase - Support MoneyParser for EVM DHLU mapping - Integrate with existing e2e discovery and setup framework - Restrict coinbase implementations to EVM only as requested
boboliu-1010
pushed a commit
that referenced
this pull request
Apr 27, 2026
Followup to the 2026-04-27 Nile evaluation. Two GasFree quirks were worth correcting in user-facing code rather than just documenting. balance: query the chain directly, not GasFree API - New src/onchain.ts: getTrc20Balance() hits the Tron full-node /wallet/triggerconstantcontract endpoint with hand-built calldata. No tronweb abi-encoder, no signature, no broadcast. - balance command now surfaces both chainBalance + apiBalance per asset, plus an apiBalanceStale flag and a stderr warning when the two disagree. Verified live: chain=23.2948 USDT vs api=0 → stale warning fired correctly. - New balance test covers the stale path (chain ≠ api → warning + flag). transfer --dry-run: surface GasFree fee economics - Computes feeAsPercentageOfAmount = (transferFee + activateFee) / amount. Also emits a stderr WARNING when fees ≥ 10% of payment. At our default 0.001 USDT test amount the warning is 10000.0% — loud on purpose; users should know GasFree has flat per-tx fees and is uneconomical for sub-dollar payments. Documentation: - docs/solutions.md #11: GasFree assets[].balance can lag the chain; always read from the contract. - docs/solutions.md #12: GasFree fee structure is flat-per-tx; small payments have huge fee/amount ratios. Recommends switching to ERC-3009 exact for micropayments. - typescript/packages/cli/README.md: new "GasFree economics" section before the configuration reference, with the break-even rule of thumb and a pointer to the new solutions entries. Tests: 94 (was 93). All green. balance.test.ts gained one stale-flag test; transfer/dry-run continues to assert the wrapped envelope shape. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
7 tasks
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.
Summary
e2e/coinbase/.MoneyParsermechanism for EVM DHLU token mapping ($0.001 -> 1000 DHLU).pnpm --filter @bankofai/x402-e2e test --servers=coinbase-express --facilitators=coinbase-typescript --clients=axios --families=evm.Changes
e2e/coinbase/servers/expressusing@x402/expressand@x402/core.e2e/coinbase/facilitators/typescriptusing@x402/coreand@x402/evm.e2e/src/discovery.tsto include coinbase directories in test discovery.e2e/setup.shande2e/package.jsonwith--coinbasesupport.e2e/pnpm-workspace.yamlto include the new packages.