Bitcoin Forum
June 01, 2024, 02:28:23 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: [SOLVED] 0.8.6 createrawtransaction in console (json error)  (Read 1575 times)
DannyHamilton (OP)
Legendary
*
Offline Offline

Activity: 3416
Merit: 4658



View Profile
March 16, 2014, 01:04:58 PM
Last edit: March 16, 2014, 03:31:23 PM by DannyHamilton
 #1

I'm trying to use createrawtransaction in the console on 0.8.6 Bitcoin-Qt

It's been a while since I've used createrawtransaction (I think I last did it with 0.8.5), so I suppose I might have forgotten the proper syntax. Can anyone please point out for me where my mistake is?

The exact text that I'm pasting into the console is:

Code:
createrawtransaction [{\"txid\”:\”3eb5dc45142efe52d4b2ac5aa33e29412add4e7d8583ce8160e19bc5256e85b7\”,\”vout\”:1}] {\”1Ar4sPQjkPJWNQa29M4pDMQFtmD42fyisa\”:0.02106080}

The console reports the following:



Thanks in advance for any assistance provided.
fsb4000
Legendary
*
Offline Offline

Activity: 1400
Merit: 1000



View Profile
March 16, 2014, 01:39:34 PM
 #2

Code:
createrawtransaction '[{"txid":"3eb5dc45142efe52d4b2ac5aa33e29412add4e7d8583ce8160e19bc5256e85b7","vout":1}]' '{"1Ar4sPQjkPJWNQa29M4pDMQFtmD42fyisa":0.02106080}'
output:
Code:
0100000001b7856e25c59be16081ce83857d4edd2a41293ea35aacb2d452fe2e1445dcb53e0100000000ffffffff01e0222000000000001976a9146c00be5ee0c9c84ee345d0fd70883a2b69db866588ac00000000
DannyHamilton (OP)
Legendary
*
Offline Offline

Activity: 3416
Merit: 4658



View Profile
March 16, 2014, 01:48:49 PM
Last edit: March 16, 2014, 02:05:44 PM by DannyHamilton
 #3

Code:
createrawtransaction '[{"txid":"3eb5dc45142efe52d4b2ac5aa33e29412add4e7d8583ce8160e19bc5256e85b7","vout":1}]' '{"1Ar4sPQjkPJWNQa29M4pDMQFtmD42fyisa":0.02106080}'

Interesting.  This is some sort of change for 0.8.6?

I'm nearly certain that I didn't used to have to enclose the elements in single quotes when I've used createrawtransaction in the past.

Anyhow, I tried your suggestion and it worked. Thanks for the help.

fsb4000
Legendary
*
Offline Offline

Activity: 1400
Merit: 1000



View Profile
March 16, 2014, 02:02:31 PM
 #4

Interesting.  This is some sort of change for 0.8.6?

I'm nearly certain that I didn't used to have to enclose the elements in single quotes when I've used createrawtransaction in the past.

Anyhow, thanks for the help.
You're welcome.
As far as I know there was no change for 0.8.6
I've always used single quotes...
August 29, 2012, 08:53:50 https://bitcointalk.org/index.php?topic=104512.msg1144379#msg1144379

DannyHamilton (OP)
Legendary
*
Offline Offline

Activity: 3416
Merit: 4658



View Profile
March 16, 2014, 02:05:53 PM
 #5

However, I tried the following for spending 2 unspent inputs, and it doesn't work.  What mistake am I making here?

Code:
createrawtransaction '[{"txid":"3eb5dc45142efe52d4b2ac5aa33e29412add4e7d8583ce8160e19bc5256e85b7","vout”:1},{"txid":"51e4441c4fdca0e8ca8f1a196d5151dde9b80b99e8b19016320e194cd0f5c796","vout":1}]' ‘{\”1Ar4sPQjkPJWNQa29M4pDMQFtmD42fyisa\”:0.02116080}’

fsb4000
Legendary
*
Offline Offline

Activity: 1400
Merit: 1000



View Profile
March 16, 2014, 02:18:55 PM
 #6

Code:
createrawtransaction '[{"txid":"3eb5dc45142efe52d4b2ac5aa33e29412add4e7d8583ce8160e19bc5256e85b7","vout":1},{"txid":"51e4441c4fdca0e8ca8f1a196d5151dde9b80b99e8b19016320e194cd0f5c796","vout":1}]' '{"1Ar4sPQjkPJWNQa29M4pDMQFtmD42fyisa":0.02116080}'
output:
Code:
0100000002b7856e25c59be16081ce83857d4edd2a41293ea35aacb2d452fe2e1445dcb53e0100000000ffffffff96c7f5d04c190e321690b1e8990bb8e9dd51516d191a8fcae8a0dc4f1c44e4510100000000ffffffff01f0492000000000001976a9146c00be5ee0c9c84ee345d0fd70883a2b69db866588ac00000000

I changed "slanted" quotation marks to "straight" quotation marks and removed  slashes  Wink
DannyHamilton (OP)
Legendary
*
Offline Offline

Activity: 3416
Merit: 4658



View Profile
March 16, 2014, 02:28:27 PM
 #7

Code:
createrawtransaction '[{"txid":"3eb5dc45142efe52d4b2ac5aa33e29412add4e7d8583ce8160e19bc5256e85b7","vout":1},{"txid":"51e4441c4fdca0e8ca8f1a196d5151dde9b80b99e8b19016320e194cd0f5c796","vout":1}]' '{"1Ar4sPQjkPJWNQa29M4pDMQFtmD42fyisa":0.02116080}'
output:
Code:
0100000002b7856e25c59be16081ce83857d4edd2a41293ea35aacb2d452fe2e1445dcb53e0100000000ffffffff96c7f5d04c190e321690b1e8990bb8e9dd51516d191a8fcae8a0dc4f1c44e4510100000000ffffffff01f0492000000000001976a9146c00be5ee0c9c84ee345d0fd70883a2b69db866588ac00000000

I changed "slanted" quotation marks to "straight" quotation marks and removed  slashes  Wink

Thanks, I had tried it both with and without the slashes.

I hadn't tried alternative single quote marks.  I'll try that now.

EDIT: Yep, that did it!  Thanks again.
DannyHamilton (OP)
Legendary
*
Offline Offline

Activity: 3416
Merit: 4658



View Profile
March 16, 2014, 03:22:36 PM
 #8

For anyone else that might be having a similar problem...

After a bit more research, I've discovered that my problem wasn't that I upgraded to 0.8.6, but rather that I started using a new text editor to compose my rawtransaction before pasting it into Bitcoin-Qt.

The new text editor that I started using was auto-replacing my plain old regular "dumb" double-quotes (0x22) with "smart quotes" (0xe2 0x80 0x9d) as I was typing and I hadn't noticed.  Apparently Bitcoin-Qt doesn't like "smart quotes"

I figured out how to turn off the feature in the text editor that was causing the problem, and now my original method (escaping the double quotes with a backslash, instead of enclosing elements in single quotes) works again.

Problem solved. Locking topic.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!