0

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))))])
New contributor
Tetiana Diachenko is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

1 Answer 1

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.

New contributor
Michiel Bellen is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

Your Answer

Tetiana Diachenko is a new contributor. Be nice, and check out our Code of Conduct.

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.