InsufficientFeeAmount Error

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

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

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

@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:

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

Sure!

1- You can see here

2-

[
  {
    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> }
]

@fsociety

This seems to be a bug indeed. I have created an issue for it.

Can you try this approach?

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

Hey @fsociety :wave:

Just wanted to follow up with the issue you raised - we’ve now released a fix for this, as of v0.80.0. Have you had a chance to retry?

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