Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add permissions, auth links, tables, config to genesis-info #633,#647,#650 #654

Merged
merged 1 commit into from May 15, 2019

Conversation

zxcat
Copy link

@zxcat zxcat commented May 15, 2019

  • Most config parameters moved to genesis_info.golos
  • Accounts defined in genesis-info now support custom permissions
  • auth_links added to describe contracts/actions linked to permissions of account
  • tables added to insert custom tables rows in genesis
  • some logging improvements

Notes:

  1. account.permissions should be ordered by hierarchy: permission should be created before using it as parent.
  2. In most cases account.permission.parent can be omitted, default value (depending on permission name) will be used.
  3. golos.sys_max_supply and golos.max_supply are integer parts of asset, there is no need to pre-multiply them by precision.

sample usage:

{
    "accounts": [
        {
            "name": "gls",
            "permissions": [
                {"name": "owner", "key": "INITIAL"},
                {"name": "active", "key": "INITIAL", "accounts": ["gls.ctrl@cyber.code", "gls.emit@cyber.code"]},
                {"name": "issue", "keys": ["INITIAL", "GLS5a2eDuRETEg7uy8eHbiCqGZM3wnh2pLjiXrFduLWBKVZKCkB62"]},
                {"name": "witn.smajor", "key": "INITIAL"},
                {"name": "witn.major", "parent": "witn.smajor", "key": "INITIAL"},
                {"name": "witn.minor", "parent": "witn.major", "key": "INITIAL"}
            ]
        }
    ],
    "auth_links": [
        {
            "permission": "cyber@createuser",
            "links": ["cyber:newaccount", "cyber.token:open", "gls.vesting:open"]
        }, {
            "permission": "gls@issue",
            "links": ["cyber.token:issue", "cyber.token:transfer"]
        }
    ],
    "tables": [
        {
            "code": "",
            "table": "domain",
            "abi_type": "domain_object",
            "rows": [
                {"scope":"cyber", "payer": "cyber", "pk": 1, "data": {
                    "id": 1,
                    "owner": "zxcat",
                    "linked_to": "",
                    "creation_date": "2019-05-14T15:00:00.000",
                    "name": "zxcat"
                }}
            ]
        }
    ],

…650

+ Most config parameters moved to `genesis_info.golos`
+ Accounts defined in genesis-info now support custom permissions
+ `auth_links` added to describe contracts/actions linked to permissions of account
+ `tables` added to insert custom tables rows in genesis
+ some logging improvements
@zxcat zxcat merged commit e7194d4 into develop May 15, 2019
@zxcat zxcat deleted the 633-647-650-genesis-info branch May 15, 2019 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants