Skip to content

Conversation

@felipemadero
Copy link
Collaborator

Why this should be merged

The CLI depends on debug RPC methods (debug_traceTransaction and debug_traceCall) throughout all flows that use the SDK to extract and map Solidity errors to user-friendly error messages. This includes:

  • ICM messenger flows (via sendMsg command using GetTxTrace)
  • All L1 validator manager flows (via SDK TxToMethod and TxToMethodWithWarpMessage)
  • Any transaction execution that needs error mapping

These debug methods:

  • Require special node configuration and are often disabled
  • Are not available on most public RPC endpoints
  • Are not part of the standard JSON-RPC API

This creates compatibility issues and prevents the CLI from working with many EVM endpoints.

How this works

Updates the CLI to use the new SDK version that eliminates all debug RPC dependencies:

  1. SDK error extraction: The SDK now extracts Solidity errors directly from standard RPC error responses during eth_estimateGas and eth_call

  2. Transaction simulation: Failed transactions are re-simulated using standard eth_call at BlockNumber-1 instead of debug_traceTransaction

  3. Error enrichment: When no error mapping is found, errors are automatically enriched with error selector and revert data

  4. CLI sendMsg updates: Replace GetTxTrace with SimulateTransaction and extract error details for user display

Update sendMsg to use the new SimulateTransaction function which uses
standard eth_call instead of debug_traceTransaction. When a transaction
fails, extract and display the error selector and revert data to help
users debug the issue.

Update SDK dependency to version that eliminates debug RPC method dependency,
ensuring all CLI flows work with any standard EVM RPC endpoint.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants