Skip to content

Parsing Soroban Operations from Horizon

Piyal Basu edited this page Jun 22, 2023 · 1 revision

When you call an invokeHostFunction operation, Horizon keeps a record of it. To understand what contract method was invoked, you will need to parse the XDR included in the Horizon record.

Here's an example of this from the Freighter repo. You will need to use js-soroban-client to create a transaction envelope from the XDR and then call .rootInvocation to build the contract call. You will then able parse the contract function name along with the params that were passed.

Clone this wiki locally