# How to provide UTXO to script call

**URL:** https://forum.fuel.network/t/how-to-provide-utxo-to-script-call/2548
**Category:** TypeScript SDK
**Created:** [May 5, 2023, 3:19pm UTC](https://forum.fuel.network/t/how-to-provide-utxo-to-script-call/2548 "2023-05-05T15:19:47Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![sway](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/sway/32/103_2.png) [@sway](https://forum.fuel.network/u/sway)
#### Post date: [May 5, 2023, 3:19pm UTC](https://forum.fuel.network/t/how-to-provide-utxo-to-script-call/2548/1 "2023-05-05T15:19:47Z")

</div>

I have a call of script that creates order  
Link to script is [here](https://github.com/compolabs/spark/blob/master/services/predicate-orders-builder/create_order_script/src/main.sw)

When I provide required object as argument it fails with “NotEnoughBalance” error, I assume it can be fixed by providing UTXO, but I couldn’t find any example how to attach it to script call function.

My code

```auto
 const orderObject = {
      id,
      predicate_address: { value: predicateAddress },
      asset0: { value: token0 },
      amount0: "450000",
      asset1: { value: token1 },
      amount1: "100000",
      owner: this.rootStore.accountStore.addressInput,
    } as CreateOrderParamsInput;
 const { value, logs } = await createOrderScript.functions
      .main(orderObject)
      .call();

```

---

<div class="post-metadata">

### Author: ![stacio](https://avatars.discourse-cdn.com/v4/letter/s/bcef8e/32.png) [@stacio](https://forum.fuel.network/u/stacio)
#### Post date: [May 10, 2023, 11:00am UTC](https://forum.fuel.network/t/how-to-provide-utxo-to-script-call/2548/2 "2023-05-10T11:00:50Z")

</div>

When executing a Script that requires funds, you have some options;

1. Create a Script Instance with a Account Instance, this account instance can be of types `Predicate` or `WalletUnlocked/Locked`. [Calling a script | Fuels-ts](https://fuellabs.github.io/fuels-ts/guide/scripts/calling-a-script.html)

2. Create a Script Instance, and add specifics Inputs and Outputs by changing the transactionRequest. `script.`

3. Create a Transaction Request instance directly and update the data on it;

---

<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 31, 2023, 7:01am UTC](https://forum.fuel.network/t/how-to-provide-utxo-to-script-call/2548/3 "2023-05-31T07:01:01Z")

</div>

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