# ABI not including certain structs

**URL:** <https://forum.fuel.network/t/abi-not-including-certain-structs/5179>\
**Category:** General\
**Created:** [April 25, 2024, 8:58am UTC](https://forum.fuel.network/t/abi-not-including-certain-structs/5179 "2024-04-25T08:58:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cctdaniel](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/cctdaniel/32/2762_2.png) [@cctdaniel](https://forum.fuel.network/u/cctdaniel)\
**Post date:** [April 25, 2024, 8:58am UTC](https://forum.fuel.network/t/abi-not-including-certain-structs/5179/1 "2024-04-25T08:58:07Z")

</div>

> <https://github.com/cctdaniel/pyth-fuel/blob/governance/pyth-contract/out/debug/pyth-contract-abi.json>

I’m trying to use the `GovernanceInstruction` struct in my rust test file but I can’t seem to find it in the abi even though its [part of the contract](https://github.com/cctdaniel/pyth-fuel/blob/governance/pyth-contract/src/data_structures/governance_instruction.sw):

- how does the abi choose which struct gets compiled?
- if you need to use a struct in sway but its not in the abi, how can you access it in rust?

---

<div class="post-metadata">

**Author:** ![segfault-magnet](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/segfault-magnet/32/3567_2.png) [@segfault-magnet](https://forum.fuel.network/u/segfault-magnet)\
**Post date:** [April 25, 2024, 11:14am UTC](https://forum.fuel.network/t/abi-not-including-certain-structs/5179/2 "2024-04-25T11:14:51Z")

</div>

1. Only types that are used in the contract methods (as parameters or returns), logged or used as configurables will show up in the ABI.
2. Make it part of the public interface via any of the above.

---

<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:** [May 16, 2024, 7:15am UTC](https://forum.fuel.network/t/abi-not-including-certain-structs/5179/3 "2024-05-16T07:15:49Z")

</div>

Closed on May 16, 2024, 7:15am UTC

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