how to add multiple account permissions in eos

480 views Asked by At

the command is below:

cleos set account permission mcdonald active '{"threshold": 1, "keys": [{"key": "EOS7BZwiFi3nyBi9rQJua6wQv37my7G21YYNZo5ZeVKcGZQNFYEjd", "weight": 1}, {"key": "EOS63ZXCNHSAr9ZqXCpAgLNox4CLYZ2u2oCVnNZeVCSp5W82qLb4i", "weight": 1}], "accounts":[{"permission":{"actor":"mcdonald","permission":"active"},"weight":1}, {"permission":{"actor":"mcdonald","permission":"active"},"weight":1}]}' owner
The error message is as follows: Authority failed validation! ensure that keys, accounts, and waits are sorted and that the threshold is valid and satisfiable!

What went wrong? I think the format of json should be fine.

1

There are 1 answers

0
An Qiuyu On

try this:

cleos set account permission <your_account> active <contract_account> --add-code

for example:

cleos set account permission me active bob --add-code
cleos set account permission me active alice --add-code
cleos set account permission me active foo --add-code
cleos set account permission me active bar --add-code

then check with cleos get account me

output:

created: 2019-03-01T12:49:08.500
permissions:
owner 1: 1 EOS6MRyXXXXXXXXXcfnVPJqcVpscN5So8BhtXXXXXX
active 1: 1 EOS6MRyXXXXXXXXcfnVPJqcVpscN5So8BhtXXXXXX, 1 [email protected], 1 [email protected], 1 [email protected], 1 [email protected] memory:
quota: unlimited used: 2.785 KiB

net bandwidth:
used: unlimited
available: unlimited
limit: unlimited

cpu bandwidth:
used: unlimited
available: unlimited
limit: unlimited