Pages:
Author

Topic: [WTB] Teach me to manually create an OP_RETURN tx - page 2. (Read 6229 times)

sr. member
Activity: 448
Merit: 250
From my point of view, this is a nice illustration, the op might honor dexX7 well with some coins.
legendary
Activity: 1106
Merit: 1024
Okay, I'll try. I created f3784ea6df802af5de7bfd8dd6af8eb07cf317b873f09f895586cd09892e897b a few minutes ago and will use this as example.

Start up your Bitcoin-Qt/bitcoind v0.9 client and go Help - Debug. Enter: "getrawtransaction f3784ea6df802af5de7bfd8dd6af8eb07cf317b873f09f895586cd09892e897b".

You will then see the transaction as hex*:

Code:
01000000015d475fab463fee15d6d32b33151748cbc4eb7c8f06166f50ad77224ddc07bbc8000000006b483045022100fd8c5227976363b79c6c2c72592e98148090ca26d89707f60dfaa19d5c59519f02207a34c47f2a55b9513d152520dd035fb9842d689c0c3350f4c0145e827e61604d01210391b373843e77f5ac1f05db4afb5151190e67cfee5a48f7925d71da7c5e919422ffffffff0100000000000000004e6a4c4b6f64617920697320466562203232203230313420616e642074686973206973206465785820402062697477617463682e636f2e2043686565727320616e64207374617920666c756666792100000000

This is the raw transaction with descriptions:

Code:
01000000          < Version
01                < Number of inputs
5d475fab463fee15d6d32b33151748cbc4eb7c8f06166f50ad77224ddc07bbc8  < Input transaction id
00000000          < Vout
00                < scriptSig length*
ffffffff          < Sequence number
01                < Number of outputs
0000000000000000  < Value
4e                < Push 78 byte (it's 78 hex encoded)
6a                < OP_RETURN
4c                < Push 76 byte (it's 76 hex encoded)
4974277320466562203232203230313420616e642074686973206973206465785820402062697477617463682e636f2e2043686565727320616c6c20616e64207374617920666c7566667921  < Payload with length of 76 byte
00000000          < Lock time

*I removed the actual scriptSig for this example.

You may notice that some data is flipped, for example the input transaction hash (compare: c8bb07dc4d2277ad506f16068f7cebc4cb481715332bd3d615ee3f46ab5f475d vs. 5d475fab463fee15d6d32b33151748cbc4eb7c8f06166f50ad77224ddc07bbc8).

To create an OP_RETURN transaction yourself, you may use this template:

Code:
0100000001AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABB00000000ffffffff0100000000000000004e6a4cCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC00000000

Replace AA...A with the input transaction hash flipped, BB with vout, CC...C with your payload/message.

Go back to your debug console and type "decoderawtransaction XXX", whereby XXX is your modified transaction hex. If everything is fine, this should return some information about your transaction.

You may adjust the payload length by changing the 4e and 4c. Use a calculator to convert the numbers.

http://brainwallet.org/#converter has a hex to text and vice versa converter.

When you are finished, type: "signrawtransaction XXX", whereby XXX is your transaction hex. It should show a longer hex followed by "complete".

Copy that longer hash and type "sendrawtransaction YYY", whereby YYY is the signed transaction hex.

Last note: make sure you use only an input with 0.0001-ish BTC. It will all be considered as miner fee unless you add more outputs.

Hope that helps. Smiley


Edit: max length is now 40 byte, so you must adjust the length.
hero member
Activity: 793
Merit: 1016
I'm looking for somebody to teach me how to manually create and sign an OP_RETURN tx in Windows.

I don't care how you do it-- it can be working with me, you can just send me a step-by-step guide, or it can be a video you make -- whatever method you choose is fine as long as afterwards I can, on my own, create a tx with an OP_RETURN output that the Eligius pool would mine.

I have no idea how simple or complicated a task teaching me to do this is, so I'm asking for bids before I commit to some price.

My experience level is that I consider myself pretty computer savvy, but not a programmer.  I've written some simple scripts in autohotkey, I can read most programming languages and understand what the code is doing, I know the JSON format and have registered some domains with namecoind via the Windows cmd.exe.  I'm reasonably tech-savvy, but I'm not a programmer, and I use Windows.  I do NOT know ECC, and I don't know how to use point multiplication to get a public key from a private key-- I've been using Casascius' Bitcoin Address Utility for that type of thing.

So that's what you'd be working with.  Please post here or PM if you think this is something you could help me with and let me know what you'd charge.

Thanks guys!!
Pages:
Jump to: