Problems with sending NFTs from cardano-cli to Yoroi

Hi all, as I am new to Cardano-cli, I have searched about how to mint a NFT, however, I can’t find one to make a transaction from cardano-cli wallet to Yoroi wallet. May I ask how can I do it?

Yoroi wallet allows you to copy a receiving address so the transaction does not differ from sending to any other address.

You can see here how transactions are made through the CLI:
https://www.coincashew.com/coins/overview-ada/guide-how-to-build-a-haskell-stakepool-node/18.-operational-and-maintenance-tips#18.9-send-a-simple-transaction-example

In this example they are sending ADA only. If you want to include native tokens that’s a matter of including them as part of tx-out.

More about native tokens and transactions can be found here:
https://docs.cardano.org/native-tokens/getting-started

I also had the same problem couldn’t move using cardano-cli older version but i think cardano-cli 1.34.1 has inbuilt feature which automatically calculate fee and generate transaction.

Note: This will send all ada from transaction_hash2 to address

address="Your-Testnet-Address"

transaction_hash1="Your-nft-TxHash"
transaction_hash_bal1=1400000 #TxHash balance
txix1=1 #index

transaction_hash2="TxHash with some ada"
transaction_hash_bal2=50000000 #example 50 ada
txix2=0 #index

policyid="NFT-POLICY-ID" 
tokenname="Token-Name" #should be in xxd -p format OR query utxo command output after dot

tokenamount=1 #for NFT always 1
output=50000000



# build tx

cardano-cli transaction build \
--testnet-magic 1097911063 \
--alonzo-era \
--tx-in $transaction_hash1#$txix1 \
--tx-in $transaction_hash2#$txix2 \
--tx-out $address+$output+"$tokenamount $policyid.$tokenname" \
--change-address $address \
--invalid-hereafter $slotnumber1000 \
--witness-override 2 \
--out-file matx.raw

# sign tx
cardano-cli transaction sign  \
--signing-key-file payment.skey  \
--testnet-magic 1097911063 --tx-body-file matx.raw  \
--out-file matx.signed

# submit tx
cardano-cli transaction submit --tx-file matx.signed --testnet-magic 1097911063