Skip to content

Instantly share code, notes, and snippets.

@blockpane
Last active February 2, 2021 22:52
Show Gist options
  • Save blockpane/118d718239f4f1ea25673c9534c5f842 to your computer and use it in GitHub Desktop.
Save blockpane/118d718239f4f1ea25673c9534c5f842 to your computer and use it in GitHub Desktop.
linkauth

Linkauth cheatsheet

given two keys:

account granting permissions:

Account Name:   produceracct

key that will use the grant:

Public Key:     FIO8aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
Account Name:   claimaccount

...

create a permission:

clio set account permission produceracct maintenance '{
    "threshold": 1,
    "keys": [
      {
        "key": "FIO8aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
        "weight": 1
      }
    ],
    "accounts": [],
    "waits": []
  }
' 1000000000 active -p produceracct

link the permission to the actions needed for maintenance:

clio set action permission produceracct fio.address burnexpired \
     maintenance 400000000 -p produceracct

clio set action permission produceracct fio.treasury bpclaim \
     maintenance 400000000 -p produceracct

clio set action permission produceracct fio.treasury tpidclaim \
     maintenance 400000000 -p produceracct

clio set action permission produceracct fio.fee setfeemult \
     maintenance 400000000 -p produceracct

clio set action permission produceracct fio.fee computefees \
     maintenance 400000000 -p produceracct

clio set action permission produceracct fio.fee setfeevote \
    maintenance 400000000 -p produceracct

Using

now when using the second key, change the actor in FIO calls to the produceracct account, and specify -p produceracct@maintenance as the permission used when making calls.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment