<p>The maximum <em>transaction</em> size is specified in the genesis configuration of the chain. For reference, here is a genesis config for the <a href="https://hydra.iohk.io/build/6782523/download/1/testnet-shelley-genesis.json" rel="noreferrer">Shelley Testnet</a>.</p>
<p>The <code>maxTxSize</code> is set to <code>16384</code> (bytes, I assume).</p>
<pre><code>&quot;maxTxSize&quot;: 16384,
</code></pre>
<p>So. Yes, there is definitely a limit to how many different tokens you could include in a UTxO.</p>
<p>This doesn't answer the question on limits to the number of inputs for a transaction. Obviously these couldn't result in an output larger than <code>maxTxSize</code>, but I can't say if there are additional constraints on the number of inputs. I'm curious to know so I might keep looking. In the mean time, I hope that helps.</p>

CC BY-SA 4.0
2021-07-09T21:34:14.807Z
2021-07-10T05:20:58.103Z
2021-07-10T05:20:58.103Z
Mitchell Turner
<p>We can simulate this in the playground. I set up three tokens T1,T2 and T3 and gave one of each to Wallet 1 at the beginning.</p>
<p>Then I sent three separate transactions, sending each token in its own transaction to Wallet 2, resulting in 3 new UTxOs in Wallet 2, one for each token.</p>
<p>I then paid all the tokens back to Wallet 1 in a single transaction.</p>
<p>If you zoom in on the image, you can see that there are four inputs, which are the lovelace for fees plus one UTxO for each token. One of the outputs to Wallet 1 is a single UTxO with all three tokens included. The other output is the change given back to Wallet 2 after Lovelace fees are deducted.</p>
<p>As mentioned by Aoaddeola, there should be no theoretical limit to the number of tokens this can scale for.</p>
<p><a href="https://i.sstatic.net/0inWY.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/0inWY.png" alt="Plutus Playground Simulation" /></a></p>

CC BY-SA 4.0
2021-07-09T17:50:31.210Z
2021-07-09T18:01:39.763Z
2021-07-09T18:01:39.763Z
Chrismo
<p>To the best of my knowledge, there is no limit to the amount of tokens a transaction can contain.</p>
<p>A <code>Value</code> itself has the following Signature <code>Map CurrencySymbol (Map TokenName Integer)</code>. Which literarily means an unlimited number of tokens, since <code>Map</code> poses no limit to the amount of elements it can contain.</p>

CC BY-SA 4.0
2021-07-09T13:28:56.237Z
2021-07-09T13:28:56.237Z
Aoaddeola
<p>Let's say someone has 10'000 different tokens on one address. Each token is in a single UTxO. Would it be possible to send them all in one transaction to another address (or the same address), so they are all in one UTxO? Or is there a limit on how many distinct tokens one can send in a single transaction?</p>

<transaction><cardano-cli><native-assets>
Is there a limit on how many distinct tokens can be sent in one transaction?
# Is there a limit on how many distinct tokens can be sent in one transaction?

(Asked by: username_0 on 2021-07-09)

Let's say someone has 10'000 different tokens on one address. Each token is in a single UTxO. Would it be possible to send them all in one transaction to another address (or the same address), so they are all in one UTxO? Or is there a limit on how many distinct tokens one can send in a single transaction?

**Tags:** transaction, cardano-cli, native-assets

---

## 3 answers

### Answer by username_1 on 2021-07-09. Score: 6 | Accepted answer

The maximum transaction size is specified in the genesis configuration of the chain. For reference, here is a genesis config for the Shelley Testnet.
The maxTxSize is set to 16384 (bytes, I assume).
"maxTxSize": 16384,

So. Yes, there is definitely a limit to how many different tokens you could include in a UTxO.
This doesn't answer the question on limits to the number of inputs for a transaction. Obviously these couldn't result in an output larger than maxTxSize, but I can't say if there are additional constraints on the number of inputs. I'm curious to know so I might keep looking. In the mean time, I hope that helps.


---

### Answer by username_2 on 2021-07-09. Score: 3

We can simulate this in the playground. I set up three tokens T1,T2 and T3 and gave one of each to Wallet 1 at the beginning.

Then I sent three separate transactions, sending each token in its own transaction to Wallet 2, resulting in 3 new UTxOs in Wallet 2, one for each token.

I then paid all the tokens back to Wallet 1 in a single transaction.

If you zoom in on the image, you can see that there are four inputs, which are the lovelace for fees plus one UTxO for each token. One of the outputs to Wallet 1 is a single UTxO with all three tokens included. The other output is the change given back to Wallet 2 after Lovelace fees are deducted.

As mentioned by Aoaddeola, there should be no theoretical limit to the number of tokens this can scale for.

[![Plutus Playground Simulation](https://i.sstatic.net/0inWY.png)](https://i.sstatic.net/0inWY.png)


---

### Answer by username_3 on 2021-07-09. Score: 2

To the best of my knowledge, there is no limit to the amount of tokens a transaction can contain.

A `Value` itself has the following Signature `Map CurrencySymbol (Map TokenName Integer)`. Which literarily means an unlimited number of tokens, since `Map` poses no limit to the amount of elements it can contain.


---

