1

For minting a token, I compute the minimum amount as follows:

cardano-cli transaction calculate-min-required-utxo 
  --babbage-era                                     
  --protocol-params-file protocol-parameters.json   
  --tx-out "addr_test⋯pxzl 2000000 + 1 019b⋯55f5.766963"

This gives "Lovelace 1021470", which I'd plug into the --tx-out expression of the 'transaction build' command like this:

cardano-cli transaction build
  --testnet-magic 1
  --tx-in-collateral 3a0d⋯84af#3
  --tx-in 3a0d⋯84af#3
  --tx-in 616c⋯3486#1
  --tx-in f029⋯d21b#3
  --tx-out "addr_test⋯pxzl 1021470 + 1 019b⋯55f5.766963"
  --mint "1 019b⋯55f5.766963"
  --change-address addr_test⋯pxzl
  --protocol-params-file protocol-parameters.json
  --minting-script-file policy.script
  --out-file unsigned.json

But with cardano-cli 1.35.3, this gives me:

"Command failed: transaction build Error: Minimum UTxO threshold not met for tx output: 
addr_test⋯pxzl + 1021470 lovelace + 1 019b⋯55f5.766963"
Minimum required UTxO: Lovelace 1344720

The above procedure used to work perfectly with older cardano-cli 's (last one tested: cardano-cli-1.34.1)

Question: Is cardano-cli 1.35.3's calculate-min-required-utxo underestimating, or is there a new way to compute the min-required-utxo?

1 Answer 1

2

You're using calculate-min-required-utxo with --babbage-era flag and build without any era flag. cardano-node 1.34.3 defaults to Alonzo-era.

There appears to be a bug for overestimation in this scenario: https://github.com/input-output-hk/cardano-node/issues/4297

Use --babbage-era for both cmds.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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