Skip to content

Commit 995c341

Browse files
alexander-seiclaude
andcommitted
fix(evm-explorer): clear stale result on network switch; surface explorer on EVM home
Addresses Monty's review feedback on #30: - Reset requestResult whenever the active endpoint changes (network segment switch or custom-URL edit) so a response from one endpoint is never left showing under a different network's label. - Promote the JSON-RPC explorer on the EVM home page: add a "JSON-RPC Explorer" card to Development Tools and replace the buried trailing text link in RPC Endpoints with a prominent card. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 3e446eb commit 995c341

2 files changed

Lines changed: 12 additions & 2 deletions

File tree

‎evm/index.mdx‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,16 @@ keywords: ["sei evm", "ethereum virtual machine", "web3 development", "blockchai
5252

5353
## Development Tools
5454

55-
<CardGroup cols={2}>
55+
<CardGroup cols={3}>
5656
<Card horizontal title="Deploy with Hardhat" icon="terminal" href="/evm/evm-hardhat">
5757
Deploy smart contracts on Sei EVM using Hardhat. Simple setup, fast results.
5858
</Card>
5959
<Card horizontal title="Deploy with Foundry" icon="cube" href="/evm/evm-foundry">
6060
Use Foundry to build and deploy on Sei EVM. Fast testing, simple deployment.
6161
</Card>
62+
<Card horizontal title="JSON-RPC Explorer" icon="compass" href="/evm/reference">
63+
Browse every Sei EVM JSON-RPC method, run live requests, and copy ready-to-use code.
64+
</Card>
6265
</CardGroup>
6366

6467
## Use Cases
@@ -96,4 +99,6 @@ Choose from official Sei Foundation endpoints or community-maintained alternativ
9699
</Tab>
97100
</Tabs>
98101

99-
For the complete list of JSON-RPC methods, see the [EVM reference](/evm/reference).
102+
<Card horizontal title="Interactive JSON-RPC Explorer" icon="code" href="/evm/reference">
103+
Search every Sei EVM JSON-RPC method with Sei-specific behavior notes, switch between mainnet, testnet, and custom endpoints, run live requests, and generate ready-to-use client code.
104+
</Card>

‎snippets/rpc-methods-viewer.jsx‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,11 @@ const isMutation = (name) => name === 'eth_sendRawTransaction' || name === 'eth_
295295

296296
useEffect(() => { if (consoleActive) validateEndpoint(); }, [validateEndpoint, consoleActive]);
297297

298+
// Clear any prior run result when the target endpoint changes (network switch
299+
// or custom-URL edit), so a response from one endpoint is never left showing
300+
// under a different network's label.
301+
useEffect(() => { setRequestResult(null); }, [endpoint]);
302+
298303
const allMethods = useMemo(() => SEI_RPC_METHODS.map((m) => ({ ...m, meta: NAMESPACE_META[m.namespace] || { label: m.namespace, color: '#6b7280' } })), []);
299304

300305
const filteredMethods = useMemo(() => {

0 commit comments

Comments
 (0)