如何在EOS中添加多个帐户权限

时间:2018-11-15 03:53:14

标签: eos

命令如下:

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
错误消息如下:    权限验证失败!确保密钥,帐户和等待时间是    排序并且该阈值有效且可满足!

出了什么问题?我认为json的格式应该可以。

1 个答案:

答案 0 :(得分:0)

尝试一下:

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

例如:

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

然后使用cleos get account me

进行检查

输出:

  

创建的:2019-03-01T12:49:08.500
  权限:
      所有者1:1 EOS6MRyXXXXXXXXXcfnVPJqcVpscN5So8BhtXXXXXX
      活动的1:1 EOS6MRyXXXXXXXXcfnVPJqcVpscN5So8BhtXXXXXX,1   alice @ eosio.code,1 bob @ eosio.code,1 foo @ eosio.code,1 bar@eosio.code   内存:
      配额:无限使用:2.785 KiB

     

净带宽:
      二手货:无限
      可用:无限制
      限制:无限制

     

cpu带宽:
      二手货:无限
      可用:无限制
      限制:无限制