I am trying to understand the math here. Trying a small transaction. I created a payment address (payment.addr). And transferred 2 ADAs into it using two transactions of 1-1 each. Now the query results into this:
$cardano-cli query utxo --address $(cat payment.addr) --mainnet
TxHash TxIx Amount
--------------------------------------------------------------------------------------
8bd2d968c3adb9983cb1f6cb8c515b541adf7aedf99feab9398ceee4e8a6cf54 0 1000000 lovelace
afc92eadc28ccee4b138ecf4d5a515fce967cf81b34c6b67f226741c9e4a67a2 0 1000000 lovelace
Now, how can I transfer 200,000 Lovelace from this account to some other account? Because "minUTxOValue": 1000000,
. If I pick one of the TxHash, it will leave less than 1000000 Lovelace. But we know that the balance in account is 2 ADAs.
I am following instructions from here: https://github.com/input-output-hk/cardano-node/blob/master/doc/stake-pool-operations/simple_transaction.md.
The full output of the submit command is:
$ cardano-cli transaction submit --tx-file tx.signed --mainnet
Command failed: transaction submit Error: Error while submitting tx: ShelleyTxValidationError ShelleyBasedEraMary (ApplyTxError [UtxowFailure (UtxoFailure (OutputTooSmallUTxO [(Addr Mainnet (KeyHashObj (KeyHash β141e397ad8b556dbfa855031311ee96599ae5fe322e3ef45b1b47c2dβ)) (StakeRefBase (KeyHashObj (KeyHash β141e397ad8b556dbfa855031311ee96599ae5fe322e3ef45b1b47c2dβ))),Value 200000 (fromList ))])),UtxowFailure (UtxoFailure (ValueNotConservedUTxO (Value 1000000 (fromList )) (Value 2000000 (fromList )))),UtxowFailure (UtxoFailure (OutsideValidityIntervalUTxO (ValidityInterval {invalidBefore = SNothing, invalidHereafter = SJust (SlotNo 32710357)}) (SlotNo 32710400)))])
Update - even with 2 ADAs in TxHash it did not work:
I tried one more thing. I transferred 2 ADAs from some other account to this acount. So the query output is:
$ cardano-cli query utxo --address $(cat payment.addr) --mainnet
TxHash TxIx Amount
--------------------------------------------------------------------------------------
8bd2d968c3adb9983cb1f6cb8c515b541adf7aedf99feab9398ceee4e8a6cf54 0 1000000 lovelace
afc92eadc28ccee4b138ecf4d5a515fce967cf81b34c6b67f226741c9e4a67a2 0 1000000 lovelace
f6eb9cfb0f9cf70392d65c0eefe0a9962c1304f97b0aa32e80733bb1e43ab749 0 2000000 lovelace
Even when I am using the last TxHash the submit output is same:
$ cardano-cli transaction submit --tx-file tx.signed --mainnet
Command failed: transaction submit Error: Error while submitting tx: ShelleyTxValidationError ShelleyBasedEraMary (ApplyTxError [UtxowFailure (UtxoFailure (OutputTooSmallUTxO [(Addr Mainnet (KeyHashObj (KeyHash β141e397ad8b556dbfa855031311ee96599ae5fe322e3ef45b1b47c2dβ)) (StakeRefBase (KeyHashObj (KeyHash β141e397ad8b556dbfa855031311ee96599ae5fe322e3ef45b1b47c2dβ))),Value 200000 (fromList ))])),UtxowFailure (UtxoFailure (OutsideValidityIntervalUTxO (ValidityInterval {invalidBefore = SNothing, invalidHereafter = SJust (SlotNo 32711855)}) (SlotNo 32711855)))])