i can set active permission success and cmd like this.
cleos set account permission auth1user active '{"threshold": 1,"keys": [{"key": "EOS5WDrQEdP3CdKYAbF5pi9YKqYCt4UbLNum3yLWb7PF24U3AUHY7","weight": 1}],"accounts": [{"permission":{"actor":"updateauth","permission":"eosio.code"},"weight":1}]}' owner -p auth1user@owner
but when i try to set owner permission and cmd like following
cleos set account permission auth1user owner '{"threshold": 1,"keys": [{"key": "EOS5WDrQEdP3CdKYAbF5pi9YKqYCt4UbLNum3yLWb7PF24U3AUHY7","weight": 1}],"accounts": [{"permission":{"actor":"updateauth","permission":"eosio.code"},"weight":1}]}' owner -p auth1user@owner
nodes will send error
Cannot set an authority as its own parent
{}
thread-0 eosio_contract.cpp:214 apply_eosio_updateauth
pending console output:
{"console":""}
thread-0 apply_context.cpp:61 exec_one
2018-07-21T03:31:55.005 thread-0 producer_plugin.cpp:1194 produce_block ] Produced block 00020aa9ef59513c... #133801 @ 2018-07-21T03:31:55.000 signed by eosio [trxs: 0, lib: 133800, confirmed: 0]
how can i do when i want add eosio.code to owner ?
i have solve it ,my error lol!
so, just need
cleos create account produceracc testuser EOS6ey1111111dbEGR EOS6tv222222dfnugMjvyjbh
cleos set account permission testuser active '{"threshold": 1,"keys": [{"key": "EOS6ey1111111dbEGR","weight": 1}],"accounts": [{"permission":{"actor":"mycontract","permission":"eosio.code"},"weight":1}]}' owner -p testuser @owner
Most helpful comment
so, just need
cleos create account produceracc testuser EOS6ey1111111dbEGR EOS6tv222222dfnugMjvyjbh
cleos set account permission testuser active '{"threshold": 1,"keys": [{"key": "EOS6ey1111111dbEGR","weight": 1}],"accounts": [{"permission":{"actor":"mycontract","permission":"eosio.code"},"weight":1}]}' owner -p testuser @owner