# How to handle TransactionResultReceipt in getDecodedLogs

**URL:** <https://forum.fuel.network/t/how-to-handle-transactionresultreceipt-in-getdecodedlogs/5997>\
**Category:** TypeScript SDK\
**Created:** [June 23, 2024, 12:06am UTC](https://forum.fuel.network/t/how-to-handle-transactionresultreceipt-in-getdecodedlogs/5997 "2024-06-23T00:06:39Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![danielbate](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/danielbate/32/1617_2.png) [@danielbate](https://forum.fuel.network/u/danielbate)\
**Post date:** [June 28, 2024, 10:27am UTC](https://forum.fuel.network/t/how-to-handle-transactionresultreceipt-in-getdecodedlogs/5997/10 "2024-06-28T10:27:42Z")

</div>

As you’ve got the event data (`data` property on the receipt), and you know the shape of the log, you could instantiate the `StructCoder` directly. But as @maschad states, the easiest way to do this is via the ABI, then you can just call the `ABICoder` directly rather than having to manage coders yourself, as documented [here](https://docs.fuel.network/docs/fuels-ts/encoding/encode-and-decode/#encode-and-decode).

But heres how I’d expect it to work based off your description:

```ts
    const data = arrayify(
      '0x40000000667753a24000000068588722000000000000000b6d796e616d652e7377617900000000000000003e15247411a05edc60391d7410eabc3d0ee2eb5f8b2bd8102b41e7e94b22fbf2'
    );

    const identityCoder = new EnumCoder('Identity', {
      Address: new StructCoder('Address', {
        bits: new B256Coder(),
      }),
      ContractId: new StructCoder('ContractId', {
        bits: new B256Coder(),
      }),
    });

    const buyEventCoder = new StructCoder('BuyEvent', {
      time: new BigNumberCoder('u64'),
      price: new BigNumberCoder('u64'),
      strings: new StdStringCoder(),
      buyer: identityCoder,
      seller: identityCoder,
    });

    const [decoded] = buyEventCoder.decode(data, 0);

```

However I’m getting some decoding errors so I expect the shape isn’t as we expect. So if you share the ABI, we can can match it to a `logId`, which will equate to a type which we can then pass to the `ABICoder`. All the coders and their expected bytes can be found [here](https://docs.fuel.network/docs/fuels-ts/encoding/working-with-bytes/).

---

_[View the full topic](https://forum.fuel.network/t/how-to-handle-transactionresultreceipt-in-getdecodedlogs/5997)._
