TX Help - Unable to send transaction errors

cardano-cli query utxo \
--address $(cat keys/payment.addr) \
--mainnet \
--allegra-era

                           TxHash                                 TxIx        Amount
--------------------------------------------------------------------------------------
3cb6142f56212759e40f86c61a002c824fef6d9468f52b8638ce226e4edb09e3     0        1000000
492e76213a0a2a38822a10b0b17c725ee6c5e5bbc17850d636fda420ec695603     0        5000000
bcba40888dfd99deb276ad2928958d817f3bd3b95bf47c84f61919ae6ace7953     0        502011024

cardano-cli transaction build-raw \
--tx-in bcba40888dfd99deb276ad2928958d817f3bd3b95bf47c84f61919ae6ace7953#0 \
--tx-in 492e76213a0a2a38822a10b0b17c725ee6c5e5bbc17850d636fda420ec695603#0 \
--tx-in 3cb6142f56212759e40f86c61a002c824fef6d9468f52b8638ce226e4edb09e3#0 \
--tx-out addr1qyqgpa2upfmuyjtm2myjc43l6u4f5hahj0hnghex9dm5y6xrzdkdfapgx33rm343s85ps8nzczu978n0yrkjxn3chwysp27ccg+0 \
--tx-out $(cat keys/payment.addr)+0 \
--invalid-hereafter 0 \
--fee 0 \
--out-file tx.draft

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

508011024 - 503011024 - 183101 = 4816899

cardano-cli transaction build-raw \
--tx-in bcba40888dfd99deb276ad2928958d817f3bd3b95bf47c84f61919ae6ace7953#0 \
--tx-in 492e76213a0a2a38822a10b0b17c725ee6c5e5bbc17850d636fda420ec695603#0 \
--tx-in 3cb6142f56212759e40f86c61a002c824fef6d9468f52b8638ce226e4edb09e3#0 \
--tx-out addr1qyqgpa2upfmuyjtm2myjc43l6u4f5hahj0hnghex9dm5y6xrzdkdfapgx33rm343s85ps8nzczu978n0yrkjxn3chwysp27ccg+503011024 \
--tx-out $(cat keys/payment.addr)+4816899 \
--invalid-hereafter 21815237 \
--fee 183101 \
--out-file tx.draft

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

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

Gives the error:

Command failed: transaction submit  Error: Error while submitting tx: ShelleyTxValidationError ShelleyBasedEraAllegra (ApplyTxError [LedgerFailure (UtxowFailure (UtxoFailure (OutsideValidityIntervalUTxO (ValidityInterval {invalidBefore = SNothing, invalidHereafter = SJust (SlotNo 21807823)}) (SlotNo 21815670)))),LedgerFailure (UtxowFailure (UtxoFailure (BadInputsUTxO (fromList [TxInCompact (TxId {_unTxId = "4e..."}) 4])))),LedgerFailure (UtxowFailure (UtxoFailure (ValueNotConservedUTxO (DeltaCoin 0) (DeltaCoin 177557)))),LedgerFailure (UtxowFailure (UtxoFailure (OutputTooSmallUTxO [(Addr Mainnet (KeyHashObj (KeyHash "ed...")) (StakeRefBase (KeyHashObj (KeyHash "6e..."))),Coin 0)])))])

I’m querying cardano-cli query tip --mainnet and taking the slot + 200 as well. I really don’t understand what I’m doing wrong here, can anyone please help?

1 Like

Hi!

try to use only 1 tx-in address - the 3rd one with the most ADA. there is another topic with similar issue. perhaps there is a tx with less than 1 ADA after the transaction…

1 Like

Still no luck, however, I ended up registering my stake pool with the 500ADA. Fingers crossed [DOGE] DogePool | Cardano Staking is a success :D!

This shouldn’t be marked as “solution” though :slight_smile:
I just got the same issue and got my hopes up… but nope…

Change --out-file:

cardano-cli transaction build-raw \
[...]
--out-file tx.draft

to:

cardano-cli transaction build-raw \
[...]
--out-file tx.raw

so that you are signing the appropriate transaction.

When sending the full amount, you do not need to send yourself back the change.
eg: 508011024 - 183101 = 507827923. The only time minUTxOValue takes effect is when you create a UTxO with change.

Hi, I have similar problem, i am doing exactly whats in the tutorial (sending simple transaction) : Guide: How to build a Cardano Stake Pool - CoinCashew

Everything seems OK, until i run last part of code :
cardano-cli transaction submit
–tx-file tx.signed
–mainnet

It gives me error :

Shelley command failed: transaction submit Error: Error while submitting tx: ApplyTxError
[LedgerFailure (UtxowFailure (UtxoFailure (BadInputsUTxO (fromList [TxInCompact (TxId
{_unTxId = “9d2a28fbe34b33cb89961e8ef767a25083dadf3dddee553264fe1fcd4e2e9a37”}) 0])))),
LedgerFailure (UtxowFailure (UtxoFailure (ValueNotConservedUTxO (DeltaCoin 0) (DeltaCoin 6095240671))))]

I have 1.24.2 cardano-cli version, do you know what is the problem?
Thanks

1 Like

Have you used allegra or mary era to build your transactions?

cardano-cli transaction build-raw
{tx_in} \ --tx-out (cat payment.addr)+{txOut} \ --tx-out {destinationAddress}+{amountToSend} \ --invalid-hereafter (( {currentSlot} + 10000)) \ --fee {fee}
–allegra-era
–out-file tx.raw

so allegra

Try using mary-era instead, mary-hardfork has been released, use mary for every command instead of allegra in the future :smiley:

Hi! I got the same issue and I added the --mary-era option, but I’m having the same problem:

Command failed: transaction submit Error: Error while submitting tx: ShelleyTxValidationError ShelleyBasedEraMary (ApplyTxError [UtxowFailure (UtxoFailure (ValueNotConservedUTxO (Value 1000000000 (fromList [])) (Value 2000000000 (fromList [])))),UtxowFailure (UtxoFailure (OutsideValidityIntervalUTxO (ValidityInterval {invalidBefore = SNothing, invalidHereafter = SJust (SlotNo 28443327)}) (SlotNo 28447251))),DelegsFailure (DelplFailure (DelegFailure (StakeDelegationImpossibleDELEG (KeyHashObj (KeyHash "3a887bc794b6f2feff6de1a87583bb2afa95b5d8123e8e8967e0b1d6")))))])