Skip to content

Set custom permission seems not working  #140

@Patrick-Shih

Description

@Patrick-Shih

I follow https://eosfactory.io/build/html/patterns/set/set_account_permission.html#weights-and-threshold and try to add eosio.code permission to account as follow

alice.set_account_permission(
    Permission.ACTIVE, {
        "threshold":
            1,
        "keys": [],
        "accounts": [{
            "permission": {
                "actor": str(alice),
                "permission": "active"
            },
            "weight": 1
        }, {
            "permission": {
                "actor": str(alice),
                "permission": "eosio.code"
            },
            "weight": 1
        }]
    }, Permission.OWNER, (alice, Permission.OWNER))

The eosio.code permission is working but original alice@active is not working anymore. For example when doing a push action like

host.push_action("hi", {"player": alice}, permission=(alice, Permission.ACTIVE))

it shows

eosfactory.core.errors.Error: ERROR:
Error 3090003: Provided keys, permissions, and delays do not satisfy declared authorizations
Ensure that you have the related private keys inside your wallet and your wallet is unlocked.
Error Details:
transaction declares authority '{"actor":"alice","permission":"active"}', but does not have signatures for it.

I do not know if this is a bug or I just use the wrong way to set permission?

BTW, alice.info() looks perfect

Account object name: alice
name: alice
created: 2019-02-20T10:47:46.000
permissions:
     owner     1:    1 alice@owner
        active     1:    1 alice@active, 1 alice@eosio.code
memory:
     quota:       unlimited  used:     2.674 KiB

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

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

My environment

  • Eosfactory 2.4
  • python 3.7.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions