# How to properly export a contract abi to reuse it in another contract?

**URL:** https://forum.fuel.network/t/how-to-properly-export-a-contract-abi-to-reuse-it-in-another-contract/3406
**Category:** Sway
**Created:** [October 28, 2023, 4:53pm UTC](https://forum.fuel.network/t/how-to-properly-export-a-contract-abi-to-reuse-it-in-another-contract/3406 "2023-10-28T16:53:21Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![calldelegation](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/calldelegation/32/1484_2.png) [@calldelegation](https://forum.fuel.network/u/calldelegation)
#### Post date: [October 30, 2023, 2:56pm UTC](https://forum.fuel.network/t/how-to-properly-export-a-contract-abi-to-reuse-it-in-another-contract/3406/2 "2023-10-30T14:56:16Z")

</div>

Hey @fuel! You can structure your project by creating an `interface` folder that contains the ABIs for all necessary contracts. The directory layout would look something like this:

```auto
Project/
        ├── contracts/
        │ ├── AMM/
        │ │ └── main.sw
        │ └── Exchange/
        │ └── main.sw
        └── libraries/
            ├── interface.sw
            └── data_structures.sw

```

A prime example of this structure in action is the AMM project found in the sway applications repository. In this project, all ABIs are organized within a [separate `libraries` folder](https://github.com/FuelLabs/sway-applications/blob/master/AMM/project/libraries/src/interface.sw) and imported as required.

Specifically, in the AMM contract, which utilizes both interfaces, you can see this import process in action. The relevant code can be found [here](https://github.com/FuelLabs/sway-applications/blob/master/AMM/project/contracts/AMM-contract/src/main.sw#L8). This approach streamlines the workflow by ensuring that changes are centralized and don’t need to be duplicated across multiple locations.

---

_[View the full topic](https://forum.fuel.network/t/how-to-properly-export-a-contract-abi-to-reuse-it-in-another-contract/3406)._
