# InsufficientFeeAmount Error

**URL:** <https://forum.fuel.network/t/insufficientfeeamount-error/4985>\
**Category:** TypeScript SDK\
**Created:** [March 29, 2024, 12:55pm UTC](https://forum.fuel.network/t/insufficientfeeamount-error/4985 "2024-03-29T12:55:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![fsociety](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/fsociety/32/508_2.png) [@fsociety](https://forum.fuel.network/u/fsociety)\
**Post date:** [March 29, 2024, 12:55pm UTC](https://forum.fuel.network/t/insufficientfeeamount-error/4985/1 "2024-03-29T12:55:01Z")

</div>

I am using `multicall` in TS SDK v0.75.0 for bulk minting. Sometimes I can execute the tx successfully but often I get this error:

`FuelError: Validity(InsufficientFeeAmount { expected: 136191, provided: 51577 })`

This is how I use `multicall` for bulk txs

```auto
const { minGasPrice } = contract.provider.getGasConfig()
await contract.multiCall(mintCalls)
            .txParams({gasPrice: minGasPrice, variableOutputs: amount})
            .call();

```

and this is the call I execute in bulk in `multicall`

```auto
const mintCall = contract.functions
            .mint(_to, stringSubId, 1)
            .txParams({gasPrice: 1, variableOutputs: 1})

```

---

<div class="post-metadata">

**Author:** ![Torres-ssf](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/torres-ssf/32/1380_2.png) [@Torres-ssf](https://forum.fuel.network/u/Torres-ssf)\
**Post date:** [April 1, 2024, 1:32pm UTC](https://forum.fuel.network/t/insufficientfeeamount-error/4985/2 "2024-04-01T13:32:28Z")

</div>

@fsociety Sorry about this error.

Can you help me with something to fully understand this error and better assist you?

I need 2 things:

1 - A code snippet of this specific contract mint function (the whole function)

2 - A `console.log` of the receipts returned by a `getTransactionCost` of this call scope:

```ts
const { receipts } = await contract.multiCall(mintCalls)
            .txParams({gasPrice: minGasPrice, variableOutputs: amount})
            .getTransactionCost();

```

---

<div class="post-metadata">

**Author:** ![fsociety](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/fsociety/32/508_2.png) [@fsociety](https://forum.fuel.network/u/fsociety)\
**Post date:** [April 1, 2024, 7:08pm UTC](https://forum.fuel.network/t/insufficientfeeamount-error/4985/3 "2024-04-01T19:08:33Z")

</div>

Sure!

1- You can see [here](https://github.com/FuelLabs/sway-applications/blob/master/NFT/NFT-contract/src/main.sw)

2-

```auto
[
  {
    type: 0,
    from: '0x0000000000000000000000000000000000000000000000000000000000000000',
    to: '0x1b2add35516a0895d4c59e05f196165da272dcb9d32ca4dcd3f2cf2453a20e73',
    amount: <BN: 0x0>,
    assetId: '0x0000000000000000000000000000000000000000000000000000000000000000',
    gas: <BN: 0x197f59b>,
    param1: <BN: 0xd663697c>,
    param2: <BN: 0x2988>,
    pc: <BN: 0x3778>,
    is: <BN: 0x3778>
  },
  {
    type: 11,
    subId: '0x0000000000000000000000000000000000000000000000000000000000000380',
    contractId: '0x1b2add35516a0895d4c59e05f196165da272dcb9d32ca4dcd3f2cf2453a20e73',
    assetId: '0xfad07ba081be44108ebde55cac051bca71a06c6267e83debc94daa43ff359a0a',
    val: <BN: 0x1>,
    pc: <BN: 0x54dc>,
    is: <BN: 0x3778>
  },
  {
    type: 8,
    from: '0x1b2add35516a0895d4c59e05f196165da272dcb9d32ca4dcd3f2cf2453a20e73',
    to: '0x833ad9964a5b32c6098dfd8a1490f1790fc6459e239b07b74371607f21a2d307',
    amount: <BN: 0x1>,
    assetId: '0xfad07ba081be44108ebde55cac051bca71a06c6267e83debc94daa43ff359a0a',
    pc: <BN: 0x57a0>,
    is: <BN: 0x3778>
  },
  {
    type: 1,
    id: '0x1b2add35516a0895d4c59e05f196165da272dcb9d32ca4dcd3f2cf2453a20e73',
    val: <BN: 0x0>,
    pc: <BN: 0x57a4>,
    is: <BN: 0x3778>
  },
  {
    type: 0,
    from: '0x0000000000000000000000000000000000000000000000000000000000000000',
    to: '0x1b2add35516a0895d4c59e05f196165da272dcb9d32ca4dcd3f2cf2453a20e73',
    amount: <BN: 0x0>,
    assetId: '0x0000000000000000000000000000000000000000000000000000000000000000',
    gas: <BN: 0x1947e45>,
    param1: <BN: 0xd663697c>,
    param2: <BN: 0x2a30>,
    pc: <BN: 0x3778>,
    is: <BN: 0x3778>
  },
  {
    type: 11,
    subId: '0x0000000000000000000000000000000000000000000000000000000000000381',
    contractId: '0x1b2add35516a0895d4c59e05f196165da272dcb9d32ca4dcd3f2cf2453a20e73',
    assetId: '0x2c886892c4787d7533e34cf9530705ef829ae95ea7b301c0a4576c6f9f04dd42',
    val: <BN: 0x1>,
    pc: <BN: 0x54dc>,
    is: <BN: 0x3778>
  },
  {
    type: 8,
    from: '0x1b2add35516a0895d4c59e05f196165da272dcb9d32ca4dcd3f2cf2453a20e73',
    to: '0x833ad9964a5b32c6098dfd8a1490f1790fc6459e239b07b74371607f21a2d307',
    amount: <BN: 0x1>,
    assetId: '0x2c886892c4787d7533e34cf9530705ef829ae95ea7b301c0a4576c6f9f04dd42',
    pc: <BN: 0x57a0>,
    is: <BN: 0x3778>
  },
  {
    type: 1,
    id: '0x1b2add35516a0895d4c59e05f196165da272dcb9d32ca4dcd3f2cf2453a20e73',
    val: <BN: 0x0>,
    pc: <BN: 0x57a4>,
    is: <BN: 0x3778>
  },
  {
    type: 0,
    from: '0x0000000000000000000000000000000000000000000000000000000000000000',
    to: '0x1b2add35516a0895d4c59e05f196165da272dcb9d32ca4dcd3f2cf2453a20e73',
    amount: <BN: 0x0>,
    assetId: '0x0000000000000000000000000000000000000000000000000000000000000000',
    gas: <BN: 0x1910633>,
    param1: <BN: 0xd663697c>,
    param2: <BN: 0x2ad8>,
    pc: <BN: 0x3778>,
    is: <BN: 0x3778>
  },
  {
    type: 11,
    subId: '0x0000000000000000000000000000000000000000000000000000000000000382',
    contractId: '0x1b2add35516a0895d4c59e05f196165da272dcb9d32ca4dcd3f2cf2453a20e73',
    assetId: '0xe86457f4b6b05bda351bdef72d30e43c4aab59b7494e5c5d19566c76e4bb98be',
    val: <BN: 0x1>,
    pc: <BN: 0x54dc>,
    is: <BN: 0x3778>
  },
  {
    type: 8,
    from: '0x1b2add35516a0895d4c59e05f196165da272dcb9d32ca4dcd3f2cf2453a20e73',
    to: '0x833ad9964a5b32c6098dfd8a1490f1790fc6459e239b07b74371607f21a2d307',
    amount: <BN: 0x1>,
    assetId: '0xe86457f4b6b05bda351bdef72d30e43c4aab59b7494e5c5d19566c76e4bb98be',
    pc: <BN: 0x57a0>,
    is: <BN: 0x3778>
  },
  {
    type: 1,
    id: '0x1b2add35516a0895d4c59e05f196165da272dcb9d32ca4dcd3f2cf2453a20e73',
    val: <BN: 0x0>,
    pc: <BN: 0x57a4>,
    is: <BN: 0x3778>
  },
  {
    type: 0,
    from: '0x0000000000000000000000000000000000000000000000000000000000000000',
    to: '0x1b2add35516a0895d4c59e05f196165da272dcb9d32ca4dcd3f2cf2453a20e73',
    amount: <BN: 0x0>,
    assetId: '0x0000000000000000000000000000000000000000000000000000000000000000',
    gas: <BN: 0x18d8d65>,
    param1: <BN: 0xd663697c>,
    param2: <BN: 0x2b80>,
    pc: <BN: 0x3778>,
    is: <BN: 0x3778>
  },
  {
    type: 11,
    subId: '0x0000000000000000000000000000000000000000000000000000000000000383',
    contractId: '0x1b2add35516a0895d4c59e05f196165da272dcb9d32ca4dcd3f2cf2453a20e73',
    assetId: '0x300e7b5b854a8f55fae52e4de43fdb8c60d8d30085972c400f7ecdd07e89252c',
    val: <BN: 0x1>,
    pc: <BN: 0x54dc>,
    is: <BN: 0x3778>
  },
  {
    type: 8,
    from: '0x1b2add35516a0895d4c59e05f196165da272dcb9d32ca4dcd3f2cf2453a20e73',
    to: '0x833ad9964a5b32c6098dfd8a1490f1790fc6459e239b07b74371607f21a2d307',
    amount: <BN: 0x1>,
    assetId: '0x300e7b5b854a8f55fae52e4de43fdb8c60d8d30085972c400f7ecdd07e89252c',
    pc: <BN: 0x57a0>,
    is: <BN: 0x3778>
  },
  {
    type: 1,
    id: '0x1b2add35516a0895d4c59e05f196165da272dcb9d32ca4dcd3f2cf2453a20e73',
    val: <BN: 0x0>,
    pc: <BN: 0x57a4>,
    is: <BN: 0x3778>
  },
  {
    type: 0,
    from: '0x0000000000000000000000000000000000000000000000000000000000000000',
    to: '0x1b2add35516a0895d4c59e05f196165da272dcb9d32ca4dcd3f2cf2453a20e73',
    amount: <BN: 0x0>,
    assetId: '0x0000000000000000000000000000000000000000000000000000000000000000',
    gas: <BN: 0x18a13db>,
    param1: <BN: 0xd663697c>,
    param2: <BN: 0x2c28>,
    pc: <BN: 0x3778>,
    is: <BN: 0x3778>
  },
  {
    type: 11,
    subId: '0x0000000000000000000000000000000000000000000000000000000000000384',
    contractId: '0x1b2add35516a0895d4c59e05f196165da272dcb9d32ca4dcd3f2cf2453a20e73',
    assetId: '0xca05d869a40ed4dc6ff57ed2f3f6ce557819b776900e6580b4907637fff7e37b',
    val: <BN: 0x1>,
    pc: <BN: 0x54dc>,
    is: <BN: 0x3778>
  },
  {
    type: 8,
    from: '0x1b2add35516a0895d4c59e05f196165da272dcb9d32ca4dcd3f2cf2453a20e73',
    to: '0x833ad9964a5b32c6098dfd8a1490f1790fc6459e239b07b74371607f21a2d307',
    amount: <BN: 0x1>,
    assetId: '0xca05d869a40ed4dc6ff57ed2f3f6ce557819b776900e6580b4907637fff7e37b',
    pc: <BN: 0x57a0>,
    is: <BN: 0x3778>
  },
  {
    type: 1,
    id: '0x1b2add35516a0895d4c59e05f196165da272dcb9d32ca4dcd3f2cf2453a20e73',
    val: <BN: 0x0>,
    pc: <BN: 0x57a4>,
    is: <BN: 0x3778>
  },
  {
    type: 0,
    from: '0x0000000000000000000000000000000000000000000000000000000000000000',
    to: '0x1b2add35516a0895d4c59e05f196165da272dcb9d32ca4dcd3f2cf2453a20e73',
    amount: <BN: 0x0>,
    assetId: '0x0000000000000000000000000000000000000000000000000000000000000000',
    gas: <BN: 0x1869995>,
    param1: <BN: 0xd663697c>,
    param2: <BN: 0x2cd0>,
    pc: <BN: 0x3778>,
    is: <BN: 0x3778>
  },
  {
    type: 11,
    subId: '0x0000000000000000000000000000000000000000000000000000000000000385',
    contractId: '0x1b2add35516a0895d4c59e05f196165da272dcb9d32ca4dcd3f2cf2453a20e73',
    assetId: '0x2cca065e85e09a34ae328d67e9af7124ff033a6df2ed073f827d19697683fb93',
    val: <BN: 0x1>,
    pc: <BN: 0x54dc>,
    is: <BN: 0x3778>
  },
  {
    type: 8,
    from: '0x1b2add35516a0895d4c59e05f196165da272dcb9d32ca4dcd3f2cf2453a20e73',
    to: '0x833ad9964a5b32c6098dfd8a1490f1790fc6459e239b07b74371607f21a2d307',
    amount: <BN: 0x1>,
    assetId: '0x2cca065e85e09a34ae328d67e9af7124ff033a6df2ed073f827d19697683fb93',
    pc: <BN: 0x57a0>,
    is: <BN: 0x3778>
  },
  {
    type: 1,
    id: '0x1b2add35516a0895d4c59e05f196165da272dcb9d32ca4dcd3f2cf2453a20e73',
    val: <BN: 0x0>,
    pc: <BN: 0x57a4>,
    is: <BN: 0x3778>
  },
  {
    type: 0,
    from: '0x0000000000000000000000000000000000000000000000000000000000000000',
    to: '0x1b2add35516a0895d4c59e05f196165da272dcb9d32ca4dcd3f2cf2453a20e73',
    amount: <BN: 0x0>,
    assetId: '0x0000000000000000000000000000000000000000000000000000000000000000',
    gas: <BN: 0x1831e93>,
    param1: <BN: 0xd663697c>,
    param2: <BN: 0x2d78>,
    pc: <BN: 0x3778>,
    is: <BN: 0x3778>
  },
  {
    type: 11,
    subId: '0x0000000000000000000000000000000000000000000000000000000000000386',
    contractId: '0x1b2add35516a0895d4c59e05f196165da272dcb9d32ca4dcd3f2cf2453a20e73',
    assetId: '0x58ccfe9db7d8945f3521d96594d627925603cda4604920d648bf44a17cd20780',
    val: <BN: 0x1>,
    pc: <BN: 0x54dc>,
    is: <BN: 0x3778>
  },
  {
    type: 8,
    from: '0x1b2add35516a0895d4c59e05f196165da272dcb9d32ca4dcd3f2cf2453a20e73',
    to: '0x833ad9964a5b32c6098dfd8a1490f1790fc6459e239b07b74371607f21a2d307',
    amount: <BN: 0x1>,
    assetId: '0x58ccfe9db7d8945f3521d96594d627925603cda4604920d648bf44a17cd20780',
    pc: <BN: 0x57a0>,
    is: <BN: 0x3778>
  },
  {
    type: 1,
    id: '0x1b2add35516a0895d4c59e05f196165da272dcb9d32ca4dcd3f2cf2453a20e73',
    val: <BN: 0x0>,
    pc: <BN: 0x57a4>,
    is: <BN: 0x3778>
  },
  {
    type: 0,
    from: '0x0000000000000000000000000000000000000000000000000000000000000000',
    to: '0x1b2add35516a0895d4c59e05f196165da272dcb9d32ca4dcd3f2cf2453a20e73',
    amount: <BN: 0x0>,
    assetId: '0x0000000000000000000000000000000000000000000000000000000000000000',
    gas: <BN: 0x17fa2d5>,
    param1: <BN: 0xd663697c>,
    param2: <BN: 0x2e20>,
    pc: <BN: 0x3778>,
    is: <BN: 0x3778>
  },
  {
    type: 11,
    subId: '0x0000000000000000000000000000000000000000000000000000000000000387',
    contractId: '0x1b2add35516a0895d4c59e05f196165da272dcb9d32ca4dcd3f2cf2453a20e73',
    assetId: '0xd2cf2d558a2135550e3816f856c8649f44e0ed79db48b0b509033cd5bb990dcf',
    val: <BN: 0x1>,
    pc: <BN: 0x54dc>,
    is: <BN: 0x3778>
  },
  {
    type: 8,
    from: '0x1b2add35516a0895d4c59e05f196165da272dcb9d32ca4dcd3f2cf2453a20e73',
    to: '0x833ad9964a5b32c6098dfd8a1490f1790fc6459e239b07b74371607f21a2d307',
    amount: <BN: 0x1>,
    assetId: '0xd2cf2d558a2135550e3816f856c8649f44e0ed79db48b0b509033cd5bb990dcf',
    pc: <BN: 0x57a0>,
    is: <BN: 0x3778>
  },
  {
    type: 1,
    id: '0x1b2add35516a0895d4c59e05f196165da272dcb9d32ca4dcd3f2cf2453a20e73',
    val: <BN: 0x0>,
    pc: <BN: 0x57a4>,
    is: <BN: 0x3778>
  },
  {
    type: 0,
    from: '0x0000000000000000000000000000000000000000000000000000000000000000',
    to: '0x1b2add35516a0895d4c59e05f196165da272dcb9d32ca4dcd3f2cf2453a20e73',
    amount: <BN: 0x0>,
    assetId: '0x0000000000000000000000000000000000000000000000000000000000000000',
    gas: <BN: 0x17c265b>,
    param1: <BN: 0xd663697c>,
    param2: <BN: 0x2ec8>,
    pc: <BN: 0x3778>,
    is: <BN: 0x3778>
  },
  {
    type: 11,
    subId: '0x0000000000000000000000000000000000000000000000000000000000000388',
    contractId: '0x1b2add35516a0895d4c59e05f196165da272dcb9d32ca4dcd3f2cf2453a20e73',
    assetId: '0xf4f3034f7d769bbbefb5944f774125ea2eced7ab41d9d7aea8f7ce9fe6bded4b',
    val: <BN: 0x1>,
    pc: <BN: 0x54dc>,
    is: <BN: 0x3778>
  },
  {
    type: 8,
    from: '0x1b2add35516a0895d4c59e05f196165da272dcb9d32ca4dcd3f2cf2453a20e73',
    to: '0x833ad9964a5b32c6098dfd8a1490f1790fc6459e239b07b74371607f21a2d307',
    amount: <BN: 0x1>,
    assetId: '0xf4f3034f7d769bbbefb5944f774125ea2eced7ab41d9d7aea8f7ce9fe6bded4b',
    pc: <BN: 0x57a0>,
    is: <BN: 0x3778>
  },
  {
    type: 1,
    id: '0x1b2add35516a0895d4c59e05f196165da272dcb9d32ca4dcd3f2cf2453a20e73',
    val: <BN: 0x0>,
    pc: <BN: 0x57a4>,
    is: <BN: 0x3778>
  },
  {
    type: 0,
    from: '0x0000000000000000000000000000000000000000000000000000000000000000',
    to: '0x1b2add35516a0895d4c59e05f196165da272dcb9d32ca4dcd3f2cf2453a20e73',
    amount: <BN: 0x0>,
    assetId: '0x0000000000000000000000000000000000000000000000000000000000000000',
    gas: <BN: 0x178a925>,
    param1: <BN: 0xd663697c>,
    param2: <BN: 0x2f70>,
    pc: <BN: 0x3778>,
    is: <BN: 0x3778>
  },
  {
    type: 11,
    subId: '0x0000000000000000000000000000000000000000000000000000000000000389',
    contractId: '0x1b2add35516a0895d4c59e05f196165da272dcb9d32ca4dcd3f2cf2453a20e73',
    assetId: '0x9c99e1ec68f598b490e8305b03ca85b9103dcb87c0cbfcf449010de87b6f68da',
    val: <BN: 0x1>,
    pc: <BN: 0x54dc>,
    is: <BN: 0x3778>
  },
  {
    type: 8,
    from: '0x1b2add35516a0895d4c59e05f196165da272dcb9d32ca4dcd3f2cf2453a20e73',
    to: '0x833ad9964a5b32c6098dfd8a1490f1790fc6459e239b07b74371607f21a2d307',
    amount: <BN: 0x1>,
    assetId: '0x9c99e1ec68f598b490e8305b03ca85b9103dcb87c0cbfcf449010de87b6f68da',
    pc: <BN: 0x57a0>,
    is: <BN: 0x3778>
  },
  {
    type: 1,
    id: '0x1b2add35516a0895d4c59e05f196165da272dcb9d32ca4dcd3f2cf2453a20e73',
    val: <BN: 0x0>,
    pc: <BN: 0x57a4>,
    is: <BN: 0x3778>
  },
  {
    type: 1,
    id: '0x0000000000000000000000000000000000000000000000000000000000000000',
    val: <BN: 0x1>,
    pc: <BN: 0x2928>,
    is: <BN: 0x2860>
  },
  { type: 9, result: <BN: 0x0>, gasUsed: <BN: 0x22cd45> }
]

```

---

<div class="post-metadata">

**Author:** ![Torres-ssf](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/torres-ssf/32/1380_2.png) [@Torres-ssf](https://forum.fuel.network/u/Torres-ssf)\
**Post date:** [April 2, 2024, 10:58am UTC](https://forum.fuel.network/t/insufficientfeeamount-error/4985/4 "2024-04-02T10:58:15Z")

</div>

@fsociety

This seems to be a bug indeed. I have created an [issue](https://github.com/FuelLabs/fuels-ts/issues/1999) for it.

Can you try this approach?

```ts
const { minGasPrice } = contract.provider.getGasConfig()
await contract.multiCall(mintCalls)
            .txParams({gasPrice: minGasPrice, variableOutputs: amount, maxFee: 150000 })
            .call();

```

---

<div class="post-metadata">

**Author:** ![p.s](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/p.s/32/2491_2.png) [@p.s](https://forum.fuel.network/u/p.s)\
**Post date:** [April 26, 2024, 9:03am UTC](https://forum.fuel.network/t/insufficientfeeamount-error/4985/5 "2024-04-26T09:03:19Z")

</div>

Hey @fsociety 👋

Just wanted to follow up with the issue you raised - we’ve now released a [fix](https://github.com/FuelLabs/fuels-ts/pull/2034) for this, as of [v0.80.0](https://github.com/FuelLabs/fuels-ts/pull/1968). Have you had a chance to retry?

Would be great to know if this has alleviated the issue you were experiencing 🙂
