1

I have a generated wallet, so I need to use these commands to transfer my minted NFT's out.

I'm not stuck with this very odd and annoying stuff, saying OutputTooSmallUTxO... I really don't know what to do about it, I'm copying here the commands I'm trying omitting the names and policy ids for privacy and easy for you guys to helping me out...

cardano-cli transaction build-raw \
--mary-era \
--fee 0 \
--tx-in $tx_id#0 \
--tx-out $sender+6506622+"1 token1 + 1 token2 + 1 token3 + 1 token4 + 1 token5 + 1 token6 + 1 token7 + 16 token8 + 101 token9" \
--tx-out $recipient+0+"1 token1 + 1 token2 + 1 token3 + 1 token4 + 1 token5 + 1 token6 + 1 token7 + 16 token8 + 101 token9" \
--out-file tx.raw

fee=$(cardano-cli transaction calculate-min-fee \
  --tx-body-file tx.raw \
  --tx-in-count 1 \
  --tx-out-count 2 \
  --witness-count 1 \
  --mainnet \
  --protocol-params-file protocol.json | awk '{ print $1 }')
afterfee=$(($total_balance-$fee-2000000))

cardano-cli transaction build-raw \
--mary-era \
--fee $fee \
--tx-in $tx_id#0 \
--tx-out $sender+$afterfee+"1 token1 + 1 token2 + 1 token3 + 1 token4 + 1 token5 + 1 token6 + 1 token7 + 16 token8 + 101 token9" \
--tx-out $recipient+2000000+"1 token1 + 1 token2 + 1 token3 + 1 token4 + 1 token5 + 1 token6 + 1 token7 + 16 token8 + 101 token9" \
--out-file rec_matx.raw

Error:

    Command failed: transaction submit  Error: Error while submitting tx: ShelleyTxValidationError ShelleyBasedEraMary (ApplyTxError [UtxowFailure (UtxoFailure (**OutputTooSmallUTxO** [(Addr Mainnet (KeyHashObj (KeyHash "...")) (StakeRefBase (KeyHashObj (KeyHash "..."))),Value 2000000 (fromList [(PolicyID {policyID = ScriptHash "..."},fromList [("x",1)]),(PolicyID {policyID = ScriptHash "..."},fromList [("token1",1),("token2",1),("token3",1),("token4",1),("token5",1),("token6",1)]),

(PolicyID {policyID = ScriptHash "..."},fromList [("x",16),("x",101)])]))])),UtxowFailure (UtxoFailure (ValueNotConservedUTxO (Value 8506622 (fromList [(PolicyID {policyID = ScriptHash "mmmmmm....."},fromList 

[("y",1)]),(PolicyID {policyID = ScriptHash "..."},fromList [("x",1),("a",1),("x",1),("x",1),("b",1),("x",1)]),(PolicyID {policyID = ScriptHash "xxxxx"},fromList [("n",16),("a",101)])])) (Value 8506622 (fromList [(PolicyID 

{policyID = ScriptHash "..."},fromList [("x",2)]),(PolicyID {policyID = ScriptHash "..."},fromList [token list]),
(PolicyID {policyID = ScriptHash "..."},fromList [token list])]))))])

The final goal is to transfer out all these tokens to another wallet in order to clean this out because I have to mint more 23 NFT's now...

1 Answer 1

1

On first glance it seems like your not building your outputs in the transactions properly.

When using the same address to mint multiple tokens and NFTs, you need to build an output for them when building a transaction. On testnet you may want to use fresh addresses to avoid this.

1
  • yeah I just did it again using a new walet. thanks Commented Jun 29, 2021 at 9:06

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.