# Log type with logId 'XXX' doesn't exist in the ABI

**URL:** <https://forum.fuel.network/t/log-type-with-logid-xxx-doesnt-exist-in-the-abi/6476>\
**Category:** TypeScript SDK\
**Created:** [August 16, 2024, 3:25am UTC](https://forum.fuel.network/t/log-type-with-logid-xxx-doesnt-exist-in-the-abi/6476 "2024-08-16T03:25:58Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![xpluscal](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/xpluscal/32/3337_2.png) [@xpluscal](https://forum.fuel.network/u/xpluscal)\
**Post date:** [August 16, 2024, 3:25am UTC](https://forum.fuel.network/t/log-type-with-logid-xxx-doesnt-exist-in-the-abi/6476/1 "2024-08-16T03:25:59Z")

</div>

I’ve created typegen using `pnpm dlx fuels build`

When trying to call contract functions and await the result I get errors like:

```auto
FuelError: Log type with logId '8719680026594948895' doesn't exist in the ABI.

```

Any help appreciated.

Toolchain:  
latest-x86\_64-apple-darwin (default)

**forc** : 0.62.0

- **forc-client**

- **forc-deploy** : 0.62.0

- **forc-run** : 0.62.0

- **forc-crypto** : 0.62.0

- **forc-debug** : 0.62.0

- **forc-doc** : 0.62.0

- **forc-fmt** : 0.62.0

- **forc-lsp** : 0.62.0

- **forc-tx** : 0.62.0

- **forc-wallet** : 0.8.2

**fuel-core** : 0.31.0

**fuel-core-keygen** : 0.31.0

---

<div class="post-metadata">

**Author:** ![xpluscal](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/xpluscal/32/3337_2.png) [@xpluscal](https://forum.fuel.network/u/xpluscal)\
**Post date:** [August 16, 2024, 3:49am UTC](https://forum.fuel.network/t/log-type-with-logid-xxx-doesnt-exist-in-the-abi/6476/2 "2024-08-16T03:49:03Z")

</div>

The rust tests and all check out perfectly. The issue seems to be solely in the types created by typegen somehow not being like by decoding it.

It’s to note that the logs are custom event types like:

```auto
pub struct ContractCreatedEvent {
    pub owner: Identity,
    pub name: String,
    pub symbol: String,
    pub price: u64,
    pub start: u64,
    pub end: u64
}

```

---

<div class="post-metadata">

**Author:** ![xpluscal](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/xpluscal/32/3337_2.png) [@xpluscal](https://forum.fuel.network/u/xpluscal)\
**Post date:** [August 16, 2024, 4:09am UTC](https://forum.fuel.network/t/log-type-with-logid-xxx-doesnt-exist-in-the-abi/6476/3 "2024-08-16T04:09:48Z")

</div>

Ok, got an idea now.  
It’s because the contract A is calling contract B and contract B logs an Event.

This event is not on the ABI of contract A, hence the decode error. How best would this be solved?

---

<div class="post-metadata">

**Author:** ![p.s](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/p.s/32/2491_2.png) [@p.s](https://forum.fuel.network/u/p.s)\
**Post date:** [August 16, 2024, 5:09am UTC](https://forum.fuel.network/t/log-type-with-logid-xxx-doesnt-exist-in-the-abi/6476/4 "2024-08-16T05:09:23Z")

</div>

Hey @xpluscal 👋

Without an example or a reproduction of the contract call, it’s difficult to pin point the exact issue issue. From what you’ve describe, it sounds like you’re using inter-contract calls and potentially missing an `addContracts` call.

The following documentation on [inter-contract calls](https://docs.fuel.network/docs/fuels-ts/contracts/inter-contract-calls/#inter-contract-calls-using-the-sdk) has an example of it’s usage.

---

<div class="post-metadata">

**Author:** ![xpluscal](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/xpluscal/32/3337_2.png) [@xpluscal](https://forum.fuel.network/u/xpluscal)\
**Post date:** [August 17, 2024, 12:53am UTC](https://forum.fuel.network/t/log-type-with-logid-xxx-doesnt-exist-in-the-abi/6476/5 "2024-08-17T00:53:43Z")

</div>

The issue was solved by forcing “addContract” on the TS SDK when calling the contract. That helped the logs resolve.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex022/uploads/fuel/original/2X/5/57d5a345cc15a64b636e0d56e042857f8a0e80b1.png) [@system](https://forum.fuel.network/u/system)\
**Post date:** [September 6, 2024, 8:53pm UTC](https://forum.fuel.network/t/log-type-with-logid-xxx-doesnt-exist-in-the-abi/6476/6 "2024-09-06T20:53:58Z")

</div>

Closed on September 6, 2024, 8:53pm UTC

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.
