Trying to craft an OP_RETURN tx with Peercoin Qt. Anyone tried this? This will not work:
createrawtransaction '[{"txid":"e7f37f2ce8b2f323d43204a6f7d46b2bc1f6489598902643eae4caa04ac5955c","vout":2}]''{"data":"596573204920736565","mgwwb8SiGG3DtwokRfUMfgG4tidyCdP8eh":0.5}'
If you’re entering it directly into the console, try escaping the the quotation marks that are part of the content:
createrawtransaction “[{\“txid\”:\“e7f37f2ce8b2f323d43204a6f7d46b2bc1f6489598902643eae6caa04ac5955c\”,\“vout\”:2}]” “{\“data\”:\“596573204920736565\”,\“mgwwb8SiGG3DtwokRfUMfgG4tidyCdP8eh\”:0.5}”
Thanks, but that didn’t work.
I escaped the escape characters for the post and I think that the message board converted the straight double quotes to open/closed quotes. Just replace them back with straight double quotes ("). I ran it through the console and it works fine.
edit: Here’s how it should read – sorry for not using the preformatted option in the first place
createrawtransaction "[{\"txid\":\"e7f37f2ce8b2f323d43204a6f7d46b2bc1f6489598902643eae6caa04ac5955c\",\"vout\":2}]" "{\"data\":\"596573204920736565\",\"mgwwb8SiGG3DtwokRfUMfgG4tidyCdP8eh\":0.5}"
1 Like
I think that I typo’d the last bit of that original txid. If you’re still using e7f37f2ce8b2f323d43204a6f7d46b2bc1f6489598902643eae4caa04ac5955c recreate the raw transaction with the correct txid. Note that if you use the testnet block explorer on that txid (PeerCoin TestNet Transaction) there is no vout 2 only 0 and also note that if you don’t include a change address with an adjusted amount the rest of the vout gets lost as a very large fee. Or you can just send the whole vout minus a smaller fee like 0.01 tPPC:
createrawtransaction "[{\"txid\":\"e7f37f2ce8b2f323d43204a6f7d46b2bc1f6489598902643eae4caa04ac5955c\",\"vout\":0}]" "{\"data\":\"596573204920736565\",\"mgwwb8SiGG3DtwokRfUMfgG4tidyCdP8eh\":83.356487}"
Hopefully that makes sense and hopefully I haven’t made any more syntax errors.
2 Likes