user1052: Is there a way to append metadata to transactions that are send from plutus code?
Right now we send transactions from the contracts like follows (or something alike):
ledgerTx <- submitTxConstraintsWith @Cube constraints tx
void $ awaitTxConfirmed $ txId ledgerTx

I know Alonzo is still in development/testing phase, but I was wondering if there is already something in the API do this or there will be (I cant find anything in the code base as of right now).

user255: I'm not sure in what context you need to append metadata to a transaction, but you may want to check this documentation for any of these helper functions used for creating TxContraints:

mustIncludeDatum :: forall i o. Datum -> TxConstraints i o
mustPayToOtherScript :: forall i o. ValidatorHash -> Datum -> Value -> TxConstraints i o
mustPayToTheScript :: forall i o. IsData o => o -> Value -> TxConstraints i o

The first two require a Datum while the last one could be any arbitrary data type converted to a Data using PlutusTx.unstableMakeIsData or its equivalents.
EDIT:
You might want to look into StateMachines. Especially the transition function (which also requires TxConstraints). You may start with this documentation,

user28: No, it is not possible right now.
To change that, we would need a hard fork introducing this functionality.

1052: <p>Is there a way to append metadata to transactions that are send from plutus code?</p>
<p>Right now we send transactions from the contracts like follows (or something alike):</p>
<pre><code>ledgerTx &lt;- submitTxConstraintsWith @Cube constraints tx
void $ awaitTxConfirmed $ txId ledgerTx
</code></pre>
<p>I know Alonzo is still in development/testing phase, but I was wondering if there is already something in the API do this or there will be (I cant find anything in the code base as of right now).</p>
 255: <p>I'm not sure in what context you need to append metadata to a transaction, but you may want to check <a href="https://alpha.marlowe.iohkdev.io/doc/haddock/plutus-ledger/html/Ledger-Constraints-TxConstraints.html" rel="nofollow noreferrer">this documentation</a> for any of these helper functions used for creating <code>TxContraints</code>:</p>
<ul>
<li><code>mustIncludeDatum :: forall i o. Datum -&gt; TxConstraints i o</code></li>
<li><code>mustPayToOtherScript :: forall i o. ValidatorHash -&gt; Datum -&gt; Value -&gt; TxConstraints i o</code></li>
<li><code>mustPayToTheScript :: forall i o. IsData o =&gt; o -&gt; Value -&gt; TxConstraints i o</code></li>
</ul>
<p>The first two require a <code>Datum</code> while the last one could be any arbitrary data type converted to a <code>Data</code> using <code>PlutusTx.unstableMakeIsData</code> or its equivalents.</p>
<p>EDIT:</p>
<p>You might want to look into <code>StateMachine</code>s. Especially the transition function (which also requires <code>TxConstraints</code>). <a href="https://alpha.marlowe.iohkdev.io/doc/haddock/plutus-contract/html/Plutus-Contract-StateMachine-OnChain.html" rel="nofollow noreferrer">You may start with this documentation</a>,</p>
 28: <p>No, it is not possible right now.</p>
<p>To change that, we would need a hard fork introducing this functionality.</p>
