0

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?

1 Answer 1

0

The issue here is probably you're missing the minimum amount of Ada required to be sent along with any tokens.By design this is required to limit the overall size of the ledger.

See more info on this here: https://docs.cardano.org/native-tokens/minimum-ada-value-requirement

It is impossible to make outputs containing only custom tokens

Requiring some amount of ada to be included in every UTXO (where that amount is based on the size of the UTXO, in bytes), limits the maximum total size taken up by UTXO entries on the ledger at any given time.

5
  • I have tried with ada in it as well. But that also not working attaching the command below cardano-cli transaction build-raw --fee 177381 --tx-in 8e6ece3c2fde93fb741bee62ececb886c1108d3a1c287ab29cc6a887c33b757e#0 --tx-out addr_test1qp62uukdt5q588ggeu0j7hwe2jdjrqecmvt6mc4hy4luvlvvdm7hkdy4dtdmsvxg3gc0ddg52etkffmf0sx4rl5zwv7sg5vcyv+2+"2 $(cat policy/tokens/policy.id).eduladderTestCoin" --tx-out $(cat payment.addr)+9633752+"998 $(cat policy/tokens/policy.id).eduladderTestCoin" --out-file token_tx.raw
    – arunwebber
    Feb 28, 2022 at 6:33
  • the "2" for the ada in your first output probably needs to be "2000000" because it's in lovelace
    – sean
    Feb 28, 2022 at 11:53
  • It is not in ada it is in lovelace.
    – arunwebber
    Feb 28, 2022 at 15:52
  • okay right, but 2 lovelace is too little then - you'll need to send a minimum of around ~1.6 Ada - which is 1600000 lovelace - together with the token
    – sean
    Feb 28, 2022 at 16:43
  • Okey. The transaction was successfull.
    – arunwebber
    Feb 28, 2022 at 17:35

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.