<p>This could be related to the underlying version of cardano-node to which the transaction is being submitted. There was a recent bug on Testnet which looks to be related: <a href="https://github.com/input-output-hk/cardano-node/issues/4236" rel="nofollow noreferrer">https://github.com/input-output-hk/cardano-node/issues/4236</a></p>
<p>So this might not be related to your own code.</p>

CC BY-SA 4.0
2022-08-05T10:06:54.303Z
2022-08-05T10:06:54.303Z
Michiel Bellen
<p>I've been playing around with <code>cardano-serialization-lib</code> and building different types of transactions with <code>TransactionBuilder</code>. However, when I calculate fee and change using <code>add_change_if_needed(addr)</code> for a transaction, that interacts with a plutus script (in my case - the alwayssucceeds script, deployed on Testnet), I get the <code>FeeTooSmallUtxo</code> error, when submitting the transaction via <code>Yoroi</code> or <code>Typhon</code> wallet. At the same time, <code>Nami</code> wallet submits the tx without a problem. I am very confused as to why it is so.</p>
<p>Can anybody help me figure this out?</p>
<p>Here is a code snippet from a function that builds a transaction to send ADA to the contract address:</p>
<pre><code>txBuilder.add_change_if_needed(shelleyChangeAddress);

let txBody = txBuilder.build();
let txHash = CardanoWasm.hash_transaction(txBody);

let witnesses = CardanoWasm.TransactionWitnessSet.new();
let transaction = CardanoWasm.Transaction.new(txBody, witnesses, undefined);

let witnessCBOR = await walletconnected.signTx(buf2hex(transaction.to_bytes()), true);
witnesses = CardanoWasm.TransactionWitnessSet.from_bytes(hex2buf(witnessCBOR));

transaction = CardanoWasm.Transaction.new(txBody, witnesses, undefined);
let trHash = await walletconnected.submitTx(buf2hex(transaction.to_bytes()));
</code></pre>
<p>And here is the error I get from <code>Yoroi</code>:</p>
<pre><code>transaction submit error ShelleyTxValidationError ShelleyBasedEraBabbage 
(ApplyTxError [UtxowFailure (UtxoFailure (FromAlonzoUtxoFail 
(FeeTooSmallUTxO (Coin 174125) (Coin 169901))))])
</code></pre>

<plutus><yoroi><fee>
Yoroi and Typhon return FeeTooSmallUtxo error when submitting transaction
# Yoroi and Typhon return FeeTooSmallUtxo error when submitting transaction

(Asked by: username_0 on 2022-08-05)

I've been playing around with cardano-serialization-lib and building different types of transactions with TransactionBuilder. However, when I calculate fee and change using add_change_if_needed(addr) for a transaction, that interacts with a plutus script (in my case - the alwayssucceeds script, deployed on Testnet), I get the FeeTooSmallUtxo error, when submitting the transaction via Yoroi or Typhon wallet. At the same time, Nami wallet submits the tx without a problem. I am very confused as to why it is so.
Can anybody help me figure this out?
Here is a code snippet from a function that builds a transaction to send ADA to the contract address:
txBuilder.add_change_if_needed(shelleyChangeAddress);

let txBody = txBuilder.build();
let txHash = CardanoWasm.hash_transaction(txBody);

let witnesses = CardanoWasm.TransactionWitnessSet.new();
let transaction = CardanoWasm.Transaction.new(txBody, witnesses, undefined);

let witnessCBOR = await walletconnected.signTx(buf2hex(transaction.to_bytes()), true);
witnesses = CardanoWasm.TransactionWitnessSet.from_bytes(hex2buf(witnessCBOR));

transaction = CardanoWasm.Transaction.new(txBody, witnesses, undefined);
let trHash = await walletconnected.submitTx(buf2hex(transaction.to_bytes()));

And here is the error I get from Yoroi:
transaction submit error ShelleyTxValidationError ShelleyBasedEraBabbage 
(ApplyTxError [UtxowFailure (UtxoFailure (FromAlonzoUtxoFail 
(FeeTooSmallUTxO (Coin 174125) (Coin 169901))))])

**Tags:** plutus, yoroi, fee

---

## 1 answers

### Answer by username_1 on 2022-08-05. Score: 0

This could be related to the underlying version of cardano-node to which the transaction is being submitted. There was a recent bug on Testnet which looks to be related: <https://github.com/input-output-hk/cardano-node/issues/4236>

So this might not be related to your own code.


---

