1

This is my raw transaction:

{ "nonce": "0x0", "gasPrice": "0x2540be4000", "gasLimit": "0x493e0", "data": "0x6060604052341561000f57600080fd5b6040516103233803806103238339810160405280805190910190505b5b60008054600160a060020a03191633600160a060020a03161790555b600181805161005b929160200190610063565b505b50610103565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106100a457805160ff19168380011785556100d1565b828001600101855582156100d1579182015b828111156100d15782518255916020019190600101906100b6565b5b506100de9291506100e2565b5090565b61010091905b808211156100de57600081556001016100e8565b5090565b90565b610211806101126000396000f300606060405263ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166341c0e1b58114610048578063cfae32171461005d575b600080fd5b341561005357600080fd5b61005b6100e8565b005b341561006857600080fd5b61007061012a565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156100ad5780820151818401525b602001610094565b50505050905090810190601f1680156100da5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6000543373ffffffffffffffffffffffffffffffffffffffff908116911614156101275760005473ffffffffffffffffffffffffffffffffffffffff16ff5b5b565b6101326101d3565b60018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156101c85780601f1061019d576101008083540402835291602001916101c8565b820191906000526020600020905b8154815290600101906020018083116101ab57829003601f168201915b505050505090505b90565b602060405190810160405260008152905600a165627a7a72305820d63cc84def14df264bf09bc46021c8a0a0efa6d9d4806f5f654d92875625eb550029", "from": "0xad4d5b5be2d68b4c4c2e1c4bc5e85d86d8b2a5dc" }

I'm stuck getting the error: Error: invalid argument 0: missing 0x prefix for hex data

I have seen similar examples and I don't know what I'm missing

1

The problem was not in the raw transaction:

I'm serializing using ethereumjs-tx, and the problem was that '0x' is not added automatically after Tx.serialize

  • happy for you to solve your issue would you please accept your own answer. – Badr Bellaj Aug 13 '17 at 21:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.