Skip to main content
Glama
dewanshparashar

Arbitrum MCP Server

assertion_status

Monitor assertion creation and confirmation activity on Arbitrum chains to ensure rollup validation status. Tracks NodeCreated and NodeConfirmed events for chain security and finality monitoring, essential for project managers and support teams.

Instructions

Monitor assertion creation and confirmation activity. Tracks NodeCreated vs NodeConfirmed events to understand rollup validation status. Critical for PM and support teams to monitor chain security and finality.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainNameNoChain name (e.g., 'Xai', 'Arbitrum One') - will auto-resolve to RPC URL
parentRpcUrlYesParent chain RPC URL (e.g., Ethereum mainnet RPC)
rollupAddressYesRollup contract address
rpcUrlNoThe RPC URL of the Arbitrum chain (optional if default is set)

Implementation Reference

  • MCP tool handler for 'assertion_status': resolves RPC URL using chainName or rpcUrl, instantiates ArbitrumChainClient, calls getAssertionStatus with parentRpcUrl and rollupAddress, returns JSON stringified status.
    case "assertion_status": { const rpcUrl = await this.resolveRpcUrl( (args.rpcUrl as string) || (args.chainName as string) ); const chainDataClient = new ArbitrumChainClient(rpcUrl); const status = await chainDataClient.getAssertionStatus( args.parentRpcUrl as string, args.rollupAddress as string ); return { content: [ { type: "text", text: JSON.stringify(status, null, 2), }, ], }; }
  • Input schema and tool definition for 'assertion_status', including description, properties for rpcUrl, chainName (optional), parentRpcUrl and rollupAddress (required). Used for both validation and tool listing/registration.
    { name: "assertion_status", description: "Monitor assertion creation and confirmation activity. Tracks NodeCreated vs NodeConfirmed events to understand rollup validation status. Critical for PM and support teams to monitor chain security and finality.", inputSchema: { type: "object" as const, properties: { rpcUrl: { type: "string", description: "The RPC URL of the Arbitrum chain (optional if default is set)", }, chainName: { type: "string", description: "Chain name (e.g., 'Xai', 'Arbitrum One') - will auto-resolve to RPC URL", }, parentRpcUrl: { type: "string", description: "Parent chain RPC URL (e.g., Ethereum mainnet RPC)", }, rollupAddress: { type: "string", description: "Rollup contract address", }, }, required: ["parentRpcUrl", "rollupAddress"], }, },
  • Core helper function getAssertionStatus that queries recent NodeCreated and NodeConfirmed events from the rollup contract on parent chain to determine latest assertions created/confirmed and the confirmation gap.
    async getAssertionStatus( parentRpcUrl: string, rollupAddress: string ): Promise<AssertionStatus> { try { const parentClient = createPublicClient({ transport: http(parentRpcUrl), }); const nodeCreatedEventAbi = { anonymous: false, inputs: [ { indexed: true, name: "nodeNum", type: "uint64" }, { indexed: true, name: "parentNodeHash", type: "bytes32" }, { indexed: true, name: "nodeHash", type: "bytes32" }, { indexed: false, name: "executionHash", type: "bytes32" }, ], name: "NodeCreated", type: "event", } as const; const nodeConfirmedEventAbi = { anonymous: false, inputs: [ { indexed: true, name: "nodeNum", type: "uint64" }, { indexed: false, name: "blockHash", type: "bytes32" }, { indexed: false, name: "sendRoot", type: "bytes32" }, ], name: "NodeConfirmed", type: "event", } as const; const latestBlockNumber = await parentClient.getBlockNumber(); const fromBlock = latestBlockNumber - BigInt(50000); const [createdLogs, confirmedLogs] = await Promise.all([ parentClient.getLogs({ address: rollupAddress as `0x${string}`, event: nodeCreatedEventAbi, fromBlock, toBlock: latestBlockNumber, }), parentClient.getLogs({ address: rollupAddress as `0x${string}`, event: nodeConfirmedEventAbi, fromBlock, toBlock: latestBlockNumber, }) ]); const latestCreatedAssertion = createdLogs.length > 0 ? createdLogs[createdLogs.length - 1].args?.nodeNum || null : null; const latestConfirmedAssertion = confirmedLogs.length > 0 ? confirmedLogs[confirmedLogs.length - 1].args?.nodeNum || null : null; const creationConfirmationGap = (latestCreatedAssertion && latestConfirmedAssertion) ? latestCreatedAssertion - latestConfirmedAssertion : 0n; const summary = `Latest created assertion: ${latestCreatedAssertion || 'None'}, Latest confirmed: ${latestConfirmedAssertion || 'None'}. Gap: ${creationConfirmationGap}`; return { latestCreatedAssertion: latestCreatedAssertion ? latestCreatedAssertion.toString() : null, latestConfirmedAssertion: latestConfirmedAssertion ? latestConfirmedAssertion.toString() : null, creationConfirmationGap: creationConfirmationGap.toString(), summary }; } catch (error) { return { latestCreatedAssertion: null, latestConfirmedAssertion: null, creationConfirmationGap: "0", summary: `Error checking assertions: ${error instanceof Error ? error.message : 'Unknown error'}` }; } }
  • TypeScript interface defining the output structure of AssertionStatus returned by getAssertionStatus.
    export interface AssertionStatus { latestCreatedAssertion: string | null; latestConfirmedAssertion: string | null; creationConfirmationGap: string; summary: string; }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/dewanshparashar/arbitrum-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server