Bitcoin Forum

Bitcoin => Electrum => Topic started by: flexiroute on January 12, 2018, 05:31:05 AM



Title: How to create op_return transaction in electrum?
Post by: flexiroute on January 12, 2018, 05:31:05 AM
I was browsing coinsecrets.org and I came up with this type of tx https://blockchain.info/tx/84566b60c48fcf3098c58864c341c9da63aecaeda7002143d717cc5aea78d9b8
The addresses start with "bc1q"
I just wanted to know how to construct these type of transactions?
How to create OP_RETURN transactions in electrum?


Title: Re: How to create op_return transaction in electrum?
Post by: pooya87 on January 13, 2018, 04:14:13 AM
addresses starting with "bc1" have nothing to do with OP_Return. these addresses are the new format known as Bech32[1] which are used for SegWit transactions.

as for OP_Return, the transaction you posted here has been dropped from mempool apparently so i can't see what it was. but you can see examples of it here: https://www.smartbit.com.au/op-returns

as for creating them with Electrum, i don't know any easy way of doing it apart from creating them elsewhere and then just using Electrum for signing the final transaction. be careful with these things if you are not familiar with them.

[1] https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki


Title: Re: How to create op_return transaction in electrum?
Post by: byteball on May 25, 2018, 04:58:38 AM
Hi flexiroute,

if you still need this knowledge I may write a short article about this if there's enough interest.

To be short, you create an usual tx in Electrum, export it to file as "hex", edit it in some way,
check with deserialize() in console, edit again until you are happy with the result, signtransaction(), broadcast()

It's important not to burn coins that you didn't intend to burn, and not to give away too much to the miner in the process :=)


Title: Re: How to create op_return transaction in electrum?
Post by: jkister0 on August 01, 2018, 01:12:44 AM
if you still need this knowledge I may write a short article about this if there's enough interest.

Google brought me here because I was interested.


Title: Re: How to create op_return transaction in electrum?
Post by: bellajbadr on August 01, 2018, 08:17:07 AM
Hi flexiroute,

if you still need this knowledge I may write a short article about this if there's enough interest.

To be short, you create an usual tx in Electrum, export it to file as "hex", edit it in some way,
check with deserialize() in console, edit again until you are happy with the result, signtransaction(), broadcast()

It's important not to burn coins that you didn't intend to burn, and not to give away too much to the miner in the process :=)

can you share the article's Url


Title: Re: How to create op_return transaction in electrum?
Post by: Abdussamad on August 01, 2018, 12:36:02 PM
you can enter script in the payto field on the send tab. so just enter your opcodes there.


Title: Re: How to create op_return transaction in electrum?
Post by: byteball on August 01, 2018, 01:41:36 PM
you can enter script in the payto field on the send tab. so just enter your opcodes there.
Didn't know this, thanks!
I probably used a lot more difficult way. The article hasn't been written (about my way), and it was a while ago.
Next time I need OP_RETURN I will try payto.