I have minted a token to the testnet and now i want to sent it to deadalus testnet wallet but i am getting error. And the steps which i am following is this.
Make a transaction
cardano-cli transaction build-raw --fee 177381 --tx-in 8e6ece3c2fde93fb741bee62ececb886c1108d3a1c287ab29cc6a887c33b757e#0 --tx-out addr_test1qp62uukdt5q588ggeu0j7hwe2jdjrqecmvt6mc4hy4luvlvvdm7hkdy4dtdmsvxg3gc0ddg52etkffmf0sx4rl5zwv7sg5vcyv+"2 $(cat policy/tokens/policy.id).eduladderTestCoin" --tx-out $(cat payment.addr)+"998 $(cat policy/tokens/policy.id).eduladderTestCoin" --out-file token_tx.raw
Create the protocol.
cardano-cli query protocol-parameters \ --testnet-magic 1097911063 \ --out-file protocol.json
Get the fee.
cardano-cli transaction calculate-min-fee \ --tx-body-file token_tx.raw \ --tx-in-count 1 \ --tx-out-count 1 \ --witness-count 1 \ --byron-witness-count 0 \ --testnet-magic 1097911063 \ --protocol-params-file protocol.json
Again with the updated fee.
cardano-cli transaction build-raw --fee 177381 --tx-in 8e6ece3c2fde93fb741bee62ececb886c1108d3a1c287ab29cc6a887c33b757e#0 --tx-out addr_test1qp62uukdt5q588ggeu0j7hwe2jdjrqecmvt6mc4hy4luvlvvdm7hkdy4dtdmsvxg3gc0ddg52etkffmf0sx4rl5zwv7sg5vcyv+"2 $(cat policy/tokens/policy.id).eduladderTestCoin" --tx-out $(cat payment.addr)+"998 $(cat policy/tokens/policy.id).eduladderTestCoin" --out-file token_tx.raw
Now sign the transaction.
cardano-cli transaction sign \ --signing-key-file payment.skey \ --signing-key-file policy/policy.skey \ --testnet-magic 1097911063 \ --tx-body-file alien_babies_tx.raw \ --out-file token_tx.raw.signed
Now sent the same
cardano-cli transaction submit \ --tx-file token_tx.raw.signed \ --testnet-magic 1097911063
But i am getting the following error.
Command failed: transaction submit Error: Error while submitting tx: ShelleyTxValidationError ShelleyBasedEraAlonzo (ApplyTxError [UtxowFailure (WrappedShelleyEraFailure (UtxoFailure (OutputTooSmallUTxO [(Addr Testnet (KeyHashObj (KeyHash "74ae72cd5d01439d08cf1f2f5dd9549b218338db17ade2b7257fc67d")) (StakeRefBase (KeyHashObj (KeyHash "8c6efd7b34956adbb830c88a30f6b514565764a7697c0d51fe82733d"))),Value 0 (fromList [(PolicyID {policyID = ScriptHash "c5edbeaed052fa6e3e3f1ced8e39fdb9900b910622ead746ee938cff"},fromList [("eduladderTestCoin",2)])]),SNothing),(Addr Testnet (KeyHashObj (KeyHash "6baa0d059efc68aefaf4d30c639d62a894b2568b874e06d4f5a39c15")) StakeRefNull,Value 0 (fromList [(PolicyID {policyID = ScriptHash "c5edbeaed052fa6e3e3f1ced8e39fdb9900b910622ead746ee938cff"},fromList [("eduladderTestCoin",998)])]),SNothing)]))),UtxowFailure (WrappedShelleyEraFailure (UtxoFailure (ValueNotConservedUTxO (Value 9811135 (fromList [(PolicyID {policyID = ScriptHash "c5edbeaed052fa6e3e3f1ced8e39fdb9900b910622ead746ee938cff"},fromList [("eduladderTestCoin",1000)])])) (Value 188865 (fromList [(PolicyID {policyID = ScriptHash "c5edbeaed052fa6e3e3f1ced8e39fdb9900b910622ead746ee938cff"},fromList [("eduladderTestCoin",1000)])])))))])
How do i debug this? What wrong is going on?