I am trying to add a the "eosio.code" permission to an account on testnet. I am using the following command:
cleos -u https://api.testnet.eos.io set account permission lsqkeotnnpyu active '{"threshold":1,"keys":[{"permission":{"key":"EOS57G...Ua9","permission":"active"},"weight":1}],"accounts":[{"permission":{"actor":"lsqkeotnnpyu","permission":"eosio.code"},"weight":1}]}' owner -p lsqkeotnnpyu@active
However I get the following error:
Error 3050003: eosio_assert_message assertion failure Error Details: assertion failure with message: key which is used during account creation (can be checked in eosio:eosio:accountkeys table) must not be removed
I couldn't find a way to fix the error so far, thanks for the help.