MPP.Methods.EVM.RPC (mpp v0.18.0)

Copy Markdown View Source

Shared EVM JSON-RPC helpers used by hash, authorization, and transaction paths.

Summary

Functions

Normalize a 0x-prefixed transaction hash to lowercase.

Require a non-negative integer chain_id in method config.

Build Onchain.RPC options from an RPC URL and optional Req overrides.

Functions

canonicalize_hash(hash)

@spec canonicalize_hash(String.t()) :: String.t()

Normalize a 0x-prefixed transaction hash to lowercase.

require_chain_id(config)

@spec require_chain_id(map()) :: {:ok, non_neg_integer()} | {:error, MPP.Errors.t()}

Require a non-negative integer chain_id in method config.

rpc_opts(rpc_url, config)

@spec rpc_opts(String.t(), map()) :: keyword()

Build Onchain.RPC options from an RPC URL and optional Req overrides.