{"record":{"id":"7d949ca7dc08e45b","repo":"FuelLabs/fuel-core","slug":"the-total-base-asset-amount-became-too-big-when-tr","errorCode":null,"errorMessage":"The total base asset amount became too big when tried to cover fee","messagePattern":"The total base asset amount became too big when tried to cover fee","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/fuel-core/src/schema/tx/assemble_tx.rs","lineNumber":986,"sourceCode":"                .arguments\n                .coins(\n                    fee_payer_account.owner(),\n                    base_asset_id,\n                    how_much_to_add,\n                    remaining_input_slots,\n                    true,\n                )\n                .await?;\n\n            if coins.is_empty() {\n                return Err(anyhow::anyhow!(\n                    \"Unable to find any coins to pay for the fee\"\n                ));\n            }\n\n            for coin in coins.into_iter().take(remaining_input_slots as usize) {\n                total_base_asset = total_base_asset.checked_add(coin.amount()).ok_or(\n                    anyhow::anyhow!(\n                        \"The total base asset amount \\\n                        became too big when tried to cover fee\"\n                    ),\n                )?;\n                self.add_input_and_witness_and_change(&fee_payer_account, coin)?;\n            }\n\n            // In the case when predicates iterates over the inputs,\n            // it increases its used gas. So we need to re-estimate predicates.\n            self = self.estimate_predicates().await?;\n        }\n\n        set_max_fee(\n            &mut self.tx,\n            &self.arguments.consensus_parameters,\n            self.arguments.reserve_gas,\n            self.arguments.gas_price,\n            self.original_max_fee,","sourceCodeStart":968,"sourceCodeEnd":1004,"githubUrl":"https://github.com/FuelLabs/fuel-core/blob/b9d4d170da3a31c9ace5f963d633b326348e0d42/crates/fuel-core/src/schema/tx/assemble_tx.rs#L968-L1004","documentation":"While adding the coins fetched to cover the fee, their amounts are accumulated into total_base_asset with checked_add. The error fires if that running sum overflows u64 — i.e. the fee coins returned sum above u64::MAX, a defensive arithmetic guard.","triggerScenarios":"The coin selection for fee coverage returns coins whose total exceeds u64::MAX; only reachable on chains minting near-maximum coin amounts.","commonSituations":"Test/dev chains with gigantic minted values; practically unreachable with production tokenomics.","solutions":["On test chains, mint realistic coin amounts","Split the operation so the fee account holds smaller coins","Report upstream as an invariant breach if amounts look sane"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"catch (e) { if (/became too big when tried to cover fee/.test(e.message)) { /* split tx / mint realistic amounts on dev chains */ } else throw e; }","preventionTips":["Keep individual coin amounts far below u64::MAX on custom chains","Treat occurrence as an invariant breach and report upstream"],"tags":["fee","overflow","base-asset","unreachable","assemble-tx"],"backgroundTag":null,"analyzedSha":"b9d4d170da3a31c9ace5f963d633b326348e0d42","analyzedAt":"2026-08-16T08:56:42.692Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}