1

guys!I am a beginner of eos.
As it is said on the title, i want to create accounts by the way other than using cleos.

I have traversed the doc of eos, but not seen the interface to create an account directly.
I have tried the way by using RPC API abi_json_to_bin,sending json data like:

{ "code": "eosio",
"action": "newaccount",
"args": {
"creator": "eosio",
"name": "acctest",
"owner": {
"threshold": 1,
"keys": [
{
"key": "EOS4ufZoTw95yHJS6Cyz3h4w5a2W4cyYpMYRnd7gbFZuCfPxUFS6r",
"weight": 1
}
],
"accounts": [],
"waits": []
}, "active": { "threshold": 1, "keys": [
{
"key": "EOS4ufZoTw95yHJS6Cyz3h4w5a2W4cyYpMYRnd7gbFZuCfPxUFS6r",
"weight": 1
}
],
"accounts": [],
"waits": []
}
}
}

and got response like:

{"code":500,"message":"Internal Service Error","error":{"code":4,"name":"parse_error_exception","what":"Parse Error","details":[{"message":"Expected '\"' but read 'E'","file":"json.cpp","line_number":100,"method":"stringFromStream"},{"message":"while parsing token ''","file":"json.cpp","line_number":123,"method":"stringFromStream"},{"message":"Error parsing object","file":"json.cpp","line_number":218,"method":"objectFromStream"},{"message":"Attempting to parse array []","file":"json.cpp","line_number":249,"method":"arrayFromStream"},{"message":"Error parsing object","file":"json.cpp","line_number":218,"method":"objectFromStream"},{"message":"Error parsing object","file":"json.cpp","line_number":218,"method":"objectFromStream"},{"message":"Error parsing object","file":"json.cpp","line_number":218,"method":"objectFromStream"},{"message":"","file":"json.cpp","line_number":460,"method":"from_string"}]}}

have spent a couple of days on this single question,hope to solve it as soon as possible.
thanks!

  • not good at english, plz forgive me~.~ – michaelhjy Jun 21 '18 at 4:39
0

Seems like there is an error in your request.

abi_json_to_bin is needed to convert action data from json format to binary hex format, which will be used for the data field in push_transaction.

Try this and check the Note section below.

  • json format wrong. – michaelhjy Jun 25 '18 at 7:27

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.