Shelley command failed: transaction calculate-min-fee

Hi Guys,

I accidentally deleted the tx.raw and tx.signed in my folder and now it seems I can’t generate a tx as I am getting the following error:

Shelley command failed: transaction calculate-min-fee Error: tx.raw: tx.raw: openBinaryFile: does not exist (No such file or directory).

What’s the best way to solve this problem? Thanks for your help!

S.

That shouldn’t be a problem if you start over the whole transaction again: start with build a " raw" transaction: cardano-cli transaction build-raw –tx-in xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx#0 --tx-out (cat payment.addr)+0 --tx-out (cat payment.addr)+0 --ttl 0 --fee 0 --out-file tx.raw
It has to define a new tx.raw.

Hi there,

Thanks for helping out I think you’ve solved my problem! Just want to clarify one more thing as I’m trying to create a tx.draft first using the following:

cardano-cli shelley transaction build-raw
–tx-in #
–tx-out $(cat payment.addr)+0
–ttl 0
–fee 0
–out-file tx.draft
–certificate-file pool-registration.cert
–certificate-file delegation.cert

That produces a tx.draft file. Then I run the following command:

cardano-cli shelley transaction calculate-min-fee
–tx-body-file tx.raw
–tx-in-count 1
–tx-out-count 1
–mainnet
–witness-count 1
–byron-witness-count 0
–protocol-params-file protocol.json

I’m then getting the: Error: tx.raw: tx.raw: openBinaryFile: does not exist (No such file or directory)

I think I got something confused with the filenames etc? I guess if there is no tx.raw file to begin with I need to replace change the output file in the first step from tx.draft to tx.raw in order for the second command to work properly?

Many thanks for your help!

S.

1 Like

Hi,

As u can see when you built the tx you saved as tx.draft and when you are traying to run the 2nd script u are calling for tx.raw file which doesn’t exist because it was saved as tx.draft

1st script save as

eg:

–out-file tx.raw instead tx.draft

cardano-cli transaction build-raw
–tx-in 4e3a6e7fdcb0d0efa17bf79c13aed2b4cb9baf37fb1aa2e39553d5bd720c5c99#1 \
–tx-out (cat payment2.addr)+100000000 \ --tx-out (cat payment.addr)+0
–ttl 0
–fee 0
–out-file tx.raw

Thx

2 Likes

Hi Alexd1985,

Thanks for the clarification. Will use the tx.raw for both scripts from now on!

Cheers!

S.

1 Like