0

I'm following the official documentation to send a transaction but I'm still getting the same issue even after to double checked my protocol.json. Based on the protocol, it's supposed to be "minUTxOValue": 1000000

On my account on the mainnet we can see my UTXO

// cardano-cli query utxo --address $(cat payment.addr) --mainnet

                           TxHash                                 TxIx        Amount
--------------------------------------------------------------------------------------
0c1188f9b5eed8ed8c4b7031ba0bd05cd3d38fea947f1acb1467bcc5baba9583     0        40000000 lovelace + TxOutDatumNone
e663b2e14f180ae341a49bcbde247d074d944942cc3b8794277645ac1e49d377     0        8336205 lovelace + TxOutDatumNone

And I'm running this to submit my transaction:

cardano-cli transaction build-raw \
    --tx-in 0c1188f9b5eed8ed8c4b7031ba0bd05cd3d38fea947f1acb1467bcc5baba9583#0 \
    --tx-out $(cat payment2.addr)+20000000 \
    --tx-out $(cat payment.addr)+20000000 \
    --invalid-hereafter 0 \
    --fee 0 \
    --out-file tx.draft

I know the fees can change but keep in mind I'm using the most recent everytime.

cardano-cli transaction calculate-min-fee \
    --tx-body-file tx.draft \
    --tx-in-count 1 \
    --tx-out-count 2 \
    --witness-count 1 \
    --byron-witness-count 0 \
    --mainnet \
    --protocol-params-file protocol.json

The result for this one is: 176765

expr 40000000 - 20000000 - 176765

For this one the result will be: 19823235.

Then, to update my draft I'm doing this:

cardano-cli transaction build-raw \
    --tx-in 0c1188f9b5eed8ed8c4b7031ba0bd05cd3d38fea947f1acb1467bcc5baba9583#0 \
    --tx-out $(cat payment2.addr)+20000000 \
    --tx-out $(cat payment.addr)+19823235 \
    --invalid-hereafter 75301753 \
    --fee 176765 \
    --out-file tx.draft

Finally I'm signing and sending like this:

// to sign
cardano-cli transaction sign \
    --tx-body-file tx.raw \
    --signing-key-file payment.skey \
    --mainnet \
    --out-file tx.signed

// to submit
cardano-cli transaction submit \
    --tx-file tx.signed \
    --mainnet

The result is every time is:

Command failed: transaction submit  Error: Error while submitting tx: ShelleyTxValidationError ShelleyBasedEraBabbage (ApplyTxError [UtxowFailure (UtxoFailure (BabbageOutputTooSmallUTxO [((Addr Mainnet (KeyHashObj (KeyHash "fe424f32d70231494b27921b57a2485fe4e293ae76b7620216703f9c")) (StakeRefBase (KeyHashObj (KeyHash "5d452ab59c3d40e339da2cc8fe5b57d280363eddd5152374adc4cd23"))),Value 826271 (fromList []),NoDatum,SNothing),Coin 969750)])),UtxowFailure (UtxoFailure (FromAlonzoUtxoFail (OutsideValidityIntervalUTxO (ValidityInterval {invalidBefore = SNothing, invalidHereafter = SJust (SlotNo 75259418)}) (SlotNo 75302578))))])

This is my environment:

cardano-cli 1.35.3 - linux-x86_64 - ghc-8.10

I was wondering if it's an issue from Cardano because I'm clearly following the official documentation. Thank you so much to the people who can help me.

1 Answer 1

2

You're building tx.draft then signing tx.raw. Check you're not using an old txbody.

1

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.