# Error: Type not supported: u256

**URL:** <https://forum.fuel.network/t/error-type-not-supported-u256/4420>\
**Category:** TypeScript SDK\
**Created:** [February 23, 2024, 6:21pm UTC](https://forum.fuel.network/t/error-type-not-supported-u256/4420 "2024-02-23T18:21:20Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![theAusicist](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/theausicist/32/1987_2.png) [@theAusicist](https://forum.fuel.network/u/theAusicist)\
**Post date:** [February 23, 2024, 6:21pm UTC](https://forum.fuel.network/t/error-type-not-supported-u256/4420/1 "2024-02-23T18:21:20Z")

</div>

Have a contract which uses the `u256` datatype. Previously was using `u64` but had to switch to `u256` because of large arithmetic calculations that could potentially overflow `u64`. However, I’m unable to generate Typescript types via `fuels typegen` because of this error: `error: Type not supported: u256`. Any idea how to circumvent this, and generate types successfully?

---

<div class="post-metadata">

**Author:** ![anderson](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/anderson/32/320_2.png) [@anderson](https://forum.fuel.network/u/anderson)\
**Post date:** [February 23, 2024, 6:22pm UTC](https://forum.fuel.network/t/error-type-not-supported-u256/4420/2 "2024-02-23T18:22:23Z")

</div>

It’s ongoing via:

- [Add support for the `u256` type · Issue #1797 · FuelLabs/fuels-ts · GitHub](https://github.com/FuelLabs/fuels-ts/issues/1797)

---

<div class="post-metadata">

**Author:** ![theAusicist](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/theausicist/32/1987_2.png) [@theAusicist](https://forum.fuel.network/u/theAusicist)\
**Post date:** [February 23, 2024, 6:30pm UTC](https://forum.fuel.network/t/error-type-not-supported-u256/4420/3 "2024-02-23T18:30:35Z")

</div>

oh wow, that’s neat. as I understand the only bottleneck is the Typescript typegen right? will I still be able to deploy said contract, but not be able to use the TS SDK to interact with the contracts, right?

---

<div class="post-metadata">

**Author:** ![Dhaiwat10](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/dhaiwat10/32/1283_2.png) [@Dhaiwat10](https://forum.fuel.network/u/Dhaiwat10)\
**Post date:** [February 23, 2024, 6:38pm UTC](https://forum.fuel.network/t/error-type-not-supported-u256/4420/4 "2024-02-23T18:38:28Z")

</div>

@theAusicist that’s correct. The TS SDK cannot encode/decode any `u256` elements at the moment, but the fix should be out very soon. We’re actively working on it

---

<div class="post-metadata">

**Author:** ![anderson](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/anderson/32/320_2.png) [@anderson](https://forum.fuel.network/u/anderson)\
**Post date:** [February 26, 2024, 8:31pm UTC](https://forum.fuel.network/t/error-type-not-supported-u256/4420/5 "2024-02-26T20:31:29Z")

</div>

~~Released in: v0.75.0~~

EDIT: False alarm, issue [#1797](https://github.com/FuelLabs/fuels-ts/issues/1797) hasn’t been released yet.

---

<div class="post-metadata">

**Author:** ![svimes](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/svimes/32/2136_2.png) [@svimes](https://forum.fuel.network/u/svimes)\
**Post date:** [February 26, 2024, 10:41pm UTC](https://forum.fuel.network/t/error-type-not-supported-u256/4420/6 "2024-02-26T22:41:37Z")

</div>

Edit: This feature failed a check because of too many requests to a npm link and didn’t make it into the release. [feat!: add support for the `u256` type by Dhaiwat10 · Pull Request #1799 · FuelLabs/fuels-ts · GitHub](https://github.com/FuelLabs/fuels-ts/pull/1799)  
~~  
I’m running 0.75.0 and still running into a typegen error with u256.~~

 

Fuels version

```auto
❯ yarn list --pattern fuels
yarn list v1.22.19
├─ @fuels/assets@0.1.5
├─ @fuels/react@0.15.2
├─ @fuels/vm-asm@0.42.1
└─ fuels@0.75.0

```

Typegen command

```auto
❯ yarn fuels typegen -i ../contracts/out/debug/**-abi.json -o ./types
error: Type not supported: u256
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

```

The offending struct:

```auto
struct Stream {
// ...other fields
field: u256,
}

```

---

<div class="post-metadata">

**Author:** ![anderson](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/anderson/32/320_2.png) [@anderson](https://forum.fuel.network/u/anderson)\
**Post date:** [February 27, 2024, 9:11am UTC](https://forum.fuel.network/t/error-type-not-supported-u256/4420/7 "2024-02-27T09:11:28Z")

</div>

My bad, you are right.

This feature wasn’t included in the last release @ `0.75.0`.

I will let you know when it is released.

---

<div class="post-metadata">

**Author:** ![anderson](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/anderson/32/320_2.png) [@anderson](https://forum.fuel.network/u/anderson)\
**Post date:** [February 29, 2024, 9:18pm UTC](https://forum.fuel.network/t/error-type-not-supported-u256/4420/8 "2024-02-29T21:18:06Z")

</div>

Released in [v0.76.0](https://github.com/FuelLabs/fuels-ts/releases/tag/v0.76.0).
