user2080: I'm having trouble using the cardano-cli to send one tx. I have one address with 9 ADA and 10,000,000 each of two tokens with the same minting policy and I want to send 5,000,000 ADA of each token to a foreign address which has 10 ADA and no tokens.
For example
Address that has the native assets I want to send:
TxHash: 123456789123465
TxIx: 0
Amount: 9000000 lovelace + 10000000 1234567891234.token1 + 10000000 1234567891234.token2 + TxOutDatumHashNone
Address which I want to send native assets to:
TxHash: 123456789123456
TxIx: 0
Amount: 10000000
What commands/steps exactly are needed using the cardano-cli from here in order to accomplish sending 5,000,000 of each native token?
Thanks, Myles

user127: MY_ADDR=addr_test1qzl6m...
#Send lovelace change to my address
CHANGE_ADDR=$MY_ADDR      
MY_UTXO_IN=123456789123465#0
RECEPIENT_ADDR=addr_test1...

# Build tx
cardano_cli transaction build \
--alonzo-era \
--tx-in $MY_UTXO_IN \
--tx-out $RECEPIENT_ADDR+9000000+"10000000 1234567891234.token1"+"10000000 1234567891234.token2") \
--change-address $CHANGE_ADDR \
--testnet-magic 1097911063 \
--out-file tx.build


If you have change in native tokens then you need to add another --tx-out to return to your address for example:
TOKEN1_CHANGE=1000
TOKEN2_CHNAGE=2000
--tx-out $CHANGE_ADDR+1400000+"$TOKEN1_CHANGE 1234567891234.token1"+"$TOKEN2_CHANGE 1234567891234.token2"

Sign and submit
# Sign tx
echo "Sign Tx ..."
cardano_cli transaction sign \
--signing-key-file my_payment.skey \
--tx-body-file tx.build \
--out-file tx.sign
echo "Done."

# Submit tx
echo "Submiting Tx ..."
cardano-cli transaction submit --testnet-magic 1097911063 --tx-file tx.sign

Here you can find various examples for sending token and other stuff https://github.com/invictusappscom/cardano-terminal-wallet especially this script https://github.com/invictusappscom/cardano-terminal-wallet/blob/master/send-token.sh

2080: <p>I'm having trouble using the cardano-cli to send one tx. I have one address with 9 ADA and 10,000,000 each of two tokens with the same minting policy and I want to send 5,000,000 ADA of each token to a foreign address which has 10 ADA and no tokens.</p>
<p><em><strong>For example</strong></em></p>
<p><strong>Address that has the native assets I want to send:</strong></p>
<p>TxHash: 123456789123465</p>
<p>TxIx: 0</p>
<p>Amount: 9000000 lovelace + 10000000 1234567891234.token1 + 10000000 1234567891234.token2 + TxOutDatumHashNone</p>
<p><strong>Address which I want to send native assets to:</strong></p>
<p>TxHash: 123456789123456</p>
<p>TxIx: 0</p>
<p>Amount: 10000000</p>
<p><strong>What commands/steps exactly</strong> are needed using the cardano-cli from here in order to accomplish sending 5,000,000 of each native token?</p>
<p>Thanks, Myles</p>
 127: <pre><code>MY_ADDR=addr_test1qzl6m...
#Send lovelace change to my address
CHANGE_ADDR=$MY_ADDR      
MY_UTXO_IN=123456789123465#0
RECEPIENT_ADDR=addr_test1...

# Build tx
cardano_cli transaction build \
--alonzo-era \
--tx-in $MY_UTXO_IN \
--tx-out $RECEPIENT_ADDR+9000000+&quot;10000000 1234567891234.token1&quot;+&quot;10000000 1234567891234.token2&quot;) \
--change-address $CHANGE_ADDR \
--testnet-magic 1097911063 \
--out-file tx.build

</code></pre>
<p>If you have change in native tokens then you need to add another <code>--tx-out</code> to return to your address for example:</p>
<pre><code>TOKEN1_CHANGE=1000
TOKEN2_CHNAGE=2000
--tx-out $CHANGE_ADDR+1400000+&quot;$TOKEN1_CHANGE 1234567891234.token1&quot;+&quot;$TOKEN2_CHANGE 1234567891234.token2&quot;
</code></pre>
<p>Sign and submit</p>
<pre><code># Sign tx
echo &quot;Sign Tx ...&quot;
cardano_cli transaction sign \
--signing-key-file my_payment.skey \
--tx-body-file tx.build \
--out-file tx.sign
echo &quot;Done.&quot;

# Submit tx
echo &quot;Submiting Tx ...&quot;
cardano-cli transaction submit --testnet-magic 1097911063 --tx-file tx.sign
</code></pre>
<p>Here you can find various examples for sending token and other stuff <a href="https://github.com/invictusappscom/cardano-terminal-wallet" rel="nofollow noreferrer">https://github.com/invictusappscom/cardano-terminal-wallet</a> especially this script <a href="https://github.com/invictusappscom/cardano-terminal-wallet/blob/master/send-token.sh" rel="nofollow noreferrer">https://github.com/invictusappscom/cardano-terminal-wallet/blob/master/send-token.sh</a></p>
