[docs-agent] Use real, live-verified example values across arbtrace_* methods#1378
Open
alchemy-bot wants to merge 1 commit into
Open
[docs-agent] Use real, live-verified example values across arbtrace_* methods#1378alchemy-bot wants to merge 1 commit into
alchemy-bot wants to merge 1 commit into
Conversation
Three classes of fixes:
1. Lowercase all hex block numbers ("0x152DD07" → "0x152dd07"). The uint schema pattern in evm/base-types.yaml is lowercase-only (`^0x([1-9a-f]+[0-9a-f]*|0)$`), so Fern's Try It form rejected the previous examples with "Enter a value in the required format" — reported by Caleigh on arbtrace_replayBlockTransactions in the same thread that opened DOCS-113.
2. Replace the fabricated transaction hash "0xd2ea43b18e2f0acb66b36e773f20a4e9a1ee2df00a9794f63c2f4d0519cbe12a" (which doesn't exist on Arbitrum One or Nova) with the real first transaction in block 22,207,751 ("0xe749c9fc0d9c613378ae9112efb4d8fab18bd63f9f10e4598f7407ba1124cd38" — a Uniswap V3 SwapRouter02 multicall). Used in arbtrace_get, arbtrace_replayTransaction, arbtrace_transaction.
3. Replace the synthetic placeholder calls in arbtrace_call and arbtrace_callMany with real ones (USDC and WETH totalSupply() reads from an EOA that was active in pre-Nitro block 0x152dd07). Replace the arbtrace_filter fromAddress with one that actually originated traces in the example block (the SwapRouter's internal call address 0xc31e54c7a869b9fcbecc14363cf510d1c41fa443, count: 3 to match the actual number of matching traces — count > 3 crashes the upstream handler for this address+block combo).
Each example payload (lowercase block, real tx hash, real call object) was live-verified against https://arb-mainnet.g.alchemy.com/v2/docs-demo and returned a real result. The static result.value in each method now mirrors a real (slightly trimmed) live response.
Refs DOCS-113
Requested-by: @SahilAujla
🔗 Preview Mode
|
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
Fixes the broken Try It examples across the existing
arbtrace_*method group insrc/openrpc/chains/_components/arbtrace/methods.yaml. Reported by Caleigh in the same Slack thread that opened DOCS-113:arbtrace_replayBlockTransactionsTry It was rejecting the default example with "Enter a value in the required format.".Three classes of fix:
1. Lowercase block-number hex
The
uintschema insrc/openrpc/chains/_components/evm/base-types.yamlis lowercase-only (^0x([1-9a-f]+[0-9a-f]*|0)$). Every existing arbtrace example used"0x152DD07"(uppercaseD), so Fern's Try It form rejected it before submission. Lowercased to"0x152dd07"(block 22,207,751, the last pre-Nitro block we sanity-checked) inarbtrace_block,arbtrace_call,arbtrace_callMany,arbtrace_filter,arbtrace_replayBlockTransactions.2. Real transaction hash
The previous example tx hash
0xd2ea43b18e2f0acb66b36e773f20a4e9a1ee2df00a9794f63c2f4d0519cbe12ais fabricated —eth_getTransactionByHashreturns null on ARB_MAINNET, ARBNOVA, and ARB_SEPOLIA. Replaced with0xe749c9fc0d9c613378ae9112efb4d8fab18bd63f9f10e4598f7407ba1124cd38(the real first transaction in block 0x152dd07 — a Uniswap V3 SwapRouter02 multicall). Used inarbtrace_get,arbtrace_replayTransaction,arbtrace_transaction.3. Real call objects and filter parameters
Replaced the synthetic placeholders in
arbtrace_callandarbtrace_callManywith real calls (USDC and WETHtotalSupply()reads from0xdf59b7740f4c5038b5fa6e46eae38ffd201b22a8, an EOA that was active in the example block). Forarbtrace_filter, replaced the Arbitrum system precompile address with0xc31e54c7a869b9fcbecc14363cf510d1c41fa443(a real "from" address for traces in the block). Filtercountset to3— that's how many traces the SwapRouter's internal address actually originated in the block, andcount > 3crashes the upstream handler for this address+block combo ("method handler crashed").Verification
Every revised example payload was live-tested against
https://arb-mainnet.g.alchemy.com/v2/docs-demoand returned a real result (no errors). The staticresult.valuein each method now mirrors a slightly-trimmed real live response (full call inputs are too large to inline cleanly, so I dropped the call payload to the function selector in the static example — the live Try It response shows the full payload).pnpm run generate:rpc— cleanpnpm run validate:rpc— cleannpx prettier --check— cleanScope
This PR only touches the 8 existing methods (
arbtrace_block,arbtrace_call,arbtrace_callMany,arbtrace_filter,arbtrace_get,arbtrace_replayBlockTransactions,arbtrace_replayTransaction,arbtrace_transaction). Thearbtrace_rawTransactiondefinition was already removed in PR #1376 (merged before this branch was created); no changes here related to it.Linear
DOCS-113
Requested by
@SahilAujla (via Slack thread)