# Contract call should be type library, not contract

**URL:** <https://forum.fuel.network/t/contract-call-should-be-type-library-not-contract/2963>\
**Category:** Sway\
**Created:** [August 2, 2023, 1:38pm UTC](https://forum.fuel.network/t/contract-call-should-be-type-library-not-contract/2963 "2023-08-02T13:38:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![carlos](https://avatars.discourse-cdn.com/v4/letter/c/ecae2f/32.png) [@carlos](https://forum.fuel.network/u/carlos)\
**Post date:** [August 2, 2023, 1:38pm UTC](https://forum.fuel.network/t/contract-call-should-be-type-library-not-contract/2963/1 "2023-08-02T13:38:06Z")

</div>

Hi. I would like to make a call to another contract described in the docs:  
[https://fuellabs.github.io/sway/v0.42.0/book/blockchain-development/calling\_contracts.html](https://fuellabs.github.io/sway/v0.42.0/book/blockchain-development/calling_contracts.html)

However i get the issue: error: This imported file must be a library. It must start with “library;”

instead of use contract::Contract is use mod contract to import the module, then in abi(contract::Contract,url).

---

<div class="post-metadata">

**Author:** ![sandusky](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/sandusky/32/1313_2.png) [@sandusky](https://forum.fuel.network/u/sandusky)\
**Post date:** [August 2, 2023, 3:57pm UTC](https://forum.fuel.network/t/contract-call-should-be-type-library-not-contract/2963/2 "2023-08-02T15:57:01Z")

</div>

Hello there @carlos  
Please attach the output of

```auto
 $ fuelup show

```

So we can know the version of the toolchain you are working with.

Thanks 🌴

---

<div class="post-metadata">

**Author:** ![carlos](https://avatars.discourse-cdn.com/v4/letter/c/ecae2f/32.png) [@carlos](https://forum.fuel.network/u/carlos)\
**Post date:** [August 2, 2023, 4:18pm UTC](https://forum.fuel.network/t/contract-call-should-be-type-library-not-contract/2963/3 "2023-08-02T16:18:14Z")

</div>

> [@sandusky](#):
>
> `fuelup show`

Default host: aarch64-apple-darwin  
fuelup home: /Users/.fuelup

## installed toolchains

beta-3-aarch64-apple-darwin  
latest-aarch64-apple-darwin (default)

## active toolchain

latest-aarch64-apple-darwin (default)  
forc : 0.42.1  
- forc-client  
- forc-deploy : 0.42.1  
- forc-run : 0.42.1  
- forc-doc : 0.42.1  
- forc-explore : 0.28.1  
- forc-fmt : 0.42.1  
- forc-index : 0.18.5  
- forc-lsp : 0.42.1  
- forc-tx : 0.42.1  
- forc-wallet : 0.2.4  
fuel-core : 0.18.3  
fuel-indexer : 0.18.5

## fuels versions

forc : 0.43  
forc-wallet : 0.44.0

---

<div class="post-metadata">

**Author:** ![carlos](https://avatars.discourse-cdn.com/v4/letter/c/ecae2f/32.png) [@carlos](https://forum.fuel.network/u/carlos)\
**Post date:** [August 3, 2023, 3:38pm UTC](https://forum.fuel.network/t/contract-call-should-be-type-library-not-contract/2963/4 "2023-08-03T15:38:07Z")

</div>

In the end i split up the contract and abi (which is type library) into two files. However that is not clear from the docs. Now it works!

---

<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:** [August 24, 2023, 11:38am UTC](https://forum.fuel.network/t/contract-call-should-be-type-library-not-contract/2963/5 "2023-08-24T11:38:46Z")

</div>

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