0

When I try to set a single permission, it is working fine:

cleos --url https://jungle2.cryptolions.io set account permission market active '{"threshold": 1,"keys": [{"key": "MARKET PUBLIC KEY","weight": 1}],"accounts":[{"permission":{"actor":"market","permission":"eosio.code"},"weight":1}]}' owner -p market

and the result is as follows:

warning: transaction executed locally, but may not be confirmed by the network yet

meaning that the change has completed successfully, but when I try the same syntax to set multiple permissions to the same account like this:

cleos --url https://jungle2.cryptolions.io set account permission market active '{"threshold": 1,"keys": [{"key": "MARKET PUBLIC KEY","weight": 1}],"accounts":[{"permission":{"actor":"market","permission":"eosio.code"},"weight":1},{"permission":{"actor":"token","permission":"eosio.code"},"weight”:1},]}’ owner -p market

nothing happens. No JSON parsing errors. When I check using:

cleos --url https://jungle2.cryptolions.io get account market

only the initially set eosio.code permission is available.

Any ideas and suggestions about the syntax of the JSON, I am using to set multiple permissions ?

1 Answer 1

1

I have found a working solution, using different syntax:

cleos set account permission market active market --add-code
cleos set account permission market active token --add-code

account permissions:

{
  "account_name": "market",
  ...
  "permissions": [{
      "perm_name": "active",
      "parent": "owner",
      "required_auth": {
        "threshold": 1,
        "keys": [{
            "key": "market public key",
            "weight": 1
          }
        ],
        "accounts": [{
            "permission": {
              "actor": "market",
              "permission": "eosio.code"
            },
            "weight": 1
          },{
            "permission": {
              "actor": "token",
              "permission": "eosio.code"
            },
            "weight": 1
          }
        ],
        "waits": []
      }
    }
  ]
  ...
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.