<p>It seems that there is a special syntax in Electrum to send an OP_RETURN memo on the GUI when sending to many:</p>
<pre><code>script(OP_RETURN 5468697320697320612074657374),0
tb1qerzrlxcfu24davlur5sqmgzzgsal6wusda40er,0.00003
</code></pre>
<p>The syntax seems to not documented, but it is mentioned on <a href="https://github.com/spesmilo/electrum/blob/32d5e1724934f7d2976c675d577fde0e632d4855/tests/test_payment_identifier.py#L191" rel="nofollow noreferrer">some unit tests</a>.</p>
<p>As far as I could test, the OP_RETURN should be a HEX encoded string. Here is <a href="https://blockstream.info/testnet/tx/f4cc1349ef407ad3163118c19ef3a29f17b25f846f7cea68fa6efc7615bcd92b" rel="nofollow noreferrer">the resulting transaction</a></p>

CC BY-SA 4.0
2024-05-06T14:08:16.907Z
Why would you write memos into the transaction instead of storing them in your wallet and backing up your wallet?!
Murch
CC BY-SA 4.0
2024-05-06T14:18:36.340Z
To interact with others, like Maya chain for example, that use those memos for some functionality.
eloyesp
CC BY-SA 4.0
2024-05-06T01:54:07.670Z
2024-05-06T02:28:51.207Z
2024-05-06T02:28:51.207Z
eloyesp
<p>The idea is to build a complex transaction that have many outputs and some of them are MEMOs (using OP_RETURN) and spend one (or many) UTXOs.</p>
<p>A GUI tool would be awesome, but a CLI tool would also work. The important stuff is adding visibility for the fee for example, as a bad constructed transaction could be quite expensive.</p>
<p>In <a href="https://bitcoin.stackexchange.com/questions/13034/is-there-a-user-friendly-tool-for-creating-and-signing-raw-transactions">this this looking like question</a> Electrum is mentioned, but it does not support adding a memo (as far as I understand).</p>

CC BY-SA 4.0
2024-05-05T21:36:14.810Z
Standard transactiions can only have a single OP_RETURN output
Murch
<raw-transaction><tools>
Is there any easy tool to write raw transactions with a memo?
eloyesp
# Is there any easy tool to write raw transactions with a memo?

(Asked by: username_0 on 2024-05-05)

The idea is to build a complex transaction that have many outputs and some of them are MEMOs (using OP\_RETURN) and spend one (or many) UTXOs.

A GUI tool would be awesome, but a CLI tool would also work. The important stuff is adding visibility for the fee for example, as a bad constructed transaction could be quite expensive.

In [this this looking like question](https://bitcoin.stackexchange.com/questions/13034/is-there-a-user-friendly-tool-for-creating-and-signing-raw-transactions) Electrum is mentioned, but it does not support adding a memo (as far as I understand).

**Tags:** raw-transaction, tools

> **Comments:**
> **username_1**: Standard transactiions can only have a single OP_RETURN output  

---

## 1 answers

### Answer by username_0 on 2024-05-06. Score: 0

It seems that there is a special syntax in Electrum to send an OP_RETURN memo on the GUI when sending to many:
script(OP_RETURN 5468697320697320612074657374),0
tb1qerzrlxcfu24davlur5sqmgzzgsal6wusda40er,0.00003

The syntax seems to not documented, but it is mentioned on some unit tests.
As far as I could test, the OP_RETURN should be a HEX encoded string. Here is the resulting transaction

> **Comments:**
> **username_1**: Why would you write memos into the transaction instead of storing them in your wallet and backing up your wallet?!  
> **username_0**: To interact with others, like Maya chain for example, that use those memos for some functionality.  

---

