FuelLabs/fuel-core · error

Unable to find any coins to pay for the fee

Error message

Unable to find any coins to pay for the fee

What it means

In the fee-covering loop, when the fee payer's current base-asset inputs are insufficient the assembler queries the node for more spendable base-asset coins (respecting the exclude list). If the query returns no coins at all, there is nothing to pay gas with and assembly aborts.

Source

Thrown at crates/fuel-core/src/schema/tx/assemble_tx.rs:979

                    max: self.arguments.consensus_parameters.tx_params().max_inputs(),
                }
                .into());
            }

            let how_much_to_add = need_to_cover.saturating_sub(total_base_asset);
            let coins = self
                .arguments
                .coins(
                    fee_payer_account.owner(),
                    base_asset_id,
                    how_much_to_add,
                    remaining_input_slots,
                    true,
                )
                .await?;

            if coins.is_empty() {
                return Err(anyhow::anyhow!(
                    "Unable to find any coins to pay for the fee"
                ));
            }

            for coin in coins.into_iter().take(remaining_input_slots as usize) {
                total_base_asset = total_base_asset.checked_add(coin.amount()).ok_or(
                    anyhow::anyhow!(
                        "The total base asset amount \
                        became too big when tried to cover fee"
                    ),
                )?;
                self.add_input_and_witness_and_change(&fee_payer_account, coin)?;
            }

            // In the case when predicates iterates over the inputs,
            // it increases its used gas. So we need to re-estimate predicates.
            self = self.estimate_predicates().await?;
        }

View on GitHub (pinned to b9d4d170da)

Solutions

  1. Fund the fee account with base-asset coins and retry
  2. Make requiredBalances[feeAddressIndex] an account that actually holds the base asset
  3. Trim the excludeInput list and avoid submitting conflicting transactions from the same UTXO set concurrently

Example fix

# before
node is unfunded for 0xfee...

# after
fuels provider fund-wallet 0xfeePayer... # or transfer BASE_ASSET to the fee account
# then retry the same assembleTransaction call
Defensive patterns

Strategy: validation

Validate before calling

// confirm the fee account can pay before assembling
const bal = await client.request(BALANCE_QUERY(feeAccountAddress, BASE_ASSET));
const spendable = BigInt(bal.balance.balanceAmount);
if (spendable < estimatedFee + reservedBaseAsset) {
  throw new Error(`fee account short: ${spendable} < ${estimatedFee + reservedBaseAsset}; fund it first`);
}

Try / catch

catch (e) { if (/Unable to find any coins to pay for the fee/.test(e.message)) { /* fund the fee payer with base asset, clear stale excludes, retry */ } else throw e; }

Prevention

When it happens

Trigger: The fee account (requiredBalances[feeAddressIndex]'s account) has no spendable base-asset coins beyond those already used: empty or drained wallet, all UTXOs excluded via excludeInput, or coins locked/spent in other pending txs.

Common situations: Forgot to fund the fee payer; paying gas from an account that only holds non-base assets; over-aggressive excludeInput lists after retries; concurrent submissions spending the same UTXOs.

Related errors


AI-assisted analysis of FuelLabs/fuel-core@b9d4d170da (2026-08-16). Data as JSON: /api/errors/f8e37151be3ca9c6. Report an issue: GitHub.