RPC Provider
Loop Decoder requires an RPC provider to fetch transaction data. To configure RPC providers, implement a getPublicClient
function that returns a PublicClientObject
based on the chain ID.
PublicClientObject Structure
The PublicClientObject
consists of two properties:
client
- An instance of Viem’s
PublicClient
- See the Viem documentation for more details
config
An optional configuration object with the following properties:
traceAPI
: Specifies the tracing API to use (default:parity
)parity
- for Parity/OpenEthereum RPC nodesgeth
- for Geth RPC nodesnone
- when tracing is not supported