Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Using AuthZ #64

Open
zmanian opened this issue Jan 15, 2022 · 0 comments
Open

Using AuthZ #64

zmanian opened this issue Jan 15, 2022 · 0 comments

Comments

@zmanian
Copy link
Contributor

zmanian commented Jan 15, 2022

Authz is a function that lets an account in the Cosmos SDK delegate functionality to another another accounts.

Authz has two broad categories of modes. It has sub-programs that enables constrained functionality for certain delegations like sending funds with a daily limit or delegating tokens to only a permitted list of validators. There is also functionality that allows you to delegate any Cosmos SDK message type.

The grant interface is the default client is very good and the only real user interface footgun I've found is getting the type string for the Protobuf wrong.

Executing Authz messages in the normal CLI is a worse experience. Every invocation of message requires two CLI commands. First you need to construct a message from granter accounts using --generate-only and then use authz exec to sign and send from the grantee account.

The current flow is

tx gov vote 6 "yes" --from granter --generate-only --chain-id test > vote_yes.json
tx authz exec vote_yes --from grantee

a better flow would be

tx gov vote 6 "yes" --from granter --generate-only --chain-id test --authz grantee

It seems like lens would be a good opportunity because the SDK client doesn't want to leak the authz module into all the other modules CLI but lens doesn't have this constraint.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants