Skip to content

Commit

Permalink
docs: update admin module spec
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanchristo committed Aug 27, 2024
1 parent cdb40e7 commit 759e553
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 25 deletions.
4 changes: 3 additions & 1 deletion admin/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# admin

See [admin module specification](./spec/README.md)
The `admin` module is a blockchain application module built with [Cosmos SDK](https://docs.cosmos.network).

See the [admin module specification](./spec/README.md) for more information.
4 changes: 2 additions & 2 deletions admin/spec/01_concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

## Admin

The admin is an account that has permission to update module parameters. Only the admin account has permission to update the admin account.
The admin is an account with permissions to update module parameters. Only the admin can update the admin, i.e. only the admin account can transfer its permissions to another account.

The admin account can be any account, i.e. a module account, a group account, a multi-sig account, or an individual user account. For example, the admin account could be a module account that is managed by another module (e.g. a module that implements an on-chain governance process), or the admin account could be a group account that defines its own governance processes.
The admin can be set to any account, i.e. a module account, a group account, a multi-sig account, or an individual user account. For example, the admin can be set to a module account managed by another module that programmatically enforces an on-chain governance process, or the admin can be set to a group account managed by trusted members that enforce their own governance processes.
8 changes: 3 additions & 5 deletions admin/spec/02_msg.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@

The `admin` module provides a message service for interacting with the state of the module.

## Draft Definitions

`MsgUpdate` - Only the admin account can update the admin account. The admin account can be any account, i.e. a module account, a group account, a user account, etc.

## Proto Definitions

~~The messages are defined in proto files available to view on [Buf Schema Registry](https://buf.build/chora/admin).~~
The messages are defined in proto files available to view on [Buf Schema Registry](https://buf.build/chora/admin).

<!-- listed alphabetically -->

- [UpdateAdmin](https://buf.build/chora/admin/docs/main:chora.admin.v1#chora.admin.v1.Msg.UpdateAdmin)
8 changes: 3 additions & 5 deletions admin/spec/03_query.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@

The `admin` module provides a query service for querying the state of the module.

## Draft Definitions

`QueryAdmin` - Returns the address of the admin account.

## Proto Definitions

~~The queries are defined in the proto files available to view on [Buf Schema Registry](https://buf.build/chora/admin).~~
The queries are defined in the proto files available to view on [Buf Schema Registry](https://buf.build/chora/admin).

<!-- listed alphabetically -->

- [Admin](https://buf.build/chora/admin/docs/main:chora.admin.v1#chora.admin.v1.Query.Admin)
8 changes: 3 additions & 5 deletions admin/spec/04_state.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@ The `admin` module uses the `orm` module as an abstraction layer over the `KVSto

For more information about the `orm` module, see [Cosmos SDK ADR 055: ORM](https://docs.cosmos.network/main/architecture/adr-055-orm).

## Draft Definitions

`Admin` - A singleton table that stores the address of the admin account.

## Proto Definitions

~~The state is defined in the proto files available to view on [Buf Schema Registry](https://buf.build/chora/admin).~~
The state is defined in the proto files available to view on [Buf Schema Registry](https://buf.build/chora/admin).

<!-- listed alphabetically -->

- [Admin](https://buf.build/chora/admin/docs/main:chora.admin.v1#chora.admin.v1.Admin)
8 changes: 3 additions & 5 deletions admin/spec/05_events.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@

The `admin` module emits events upon the successful execution of messages.

## Draft Definitions

`EventUpdate` - An event emitted when the admin account has been updated.

## Proto Definitions

~~The events are defined in the proto files available to view on [Buf Schema Registry](https://buf.build/chora/admin).~~
The events are defined in the proto files available to view on [Buf Schema Registry](https://buf.build/chora/admin).

<!-- listed alphabetically -->

- [EventUpdateAdmin](https://buf.build/chora/admin/docs/main:chora.admin.v1#chora.admin.v1.EventUpdateAdmin)
4 changes: 2 additions & 2 deletions admin/spec/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

The `admin` module enables a network to have a dynamic network admin. A network admin is an account that has permission to update module parameters.

Depending on how each module is configured in a blockchain application, the admin account can have full control over module parameters (i.e. all modules are configured to use the admin account) or partial control over module parameters (i.e. only some modules are configured to use the admin account).
Depending on how each module is configured in a blockchain application, the admin account can have full control over module parameters, i.e. all modules are configured to use the admin module, or partial control over module parameters, i.e. only some modules are configured to use the admin module.

A network could also have multiple admin accounts depending on how the blockchain application is configured (i.e. the application is configured to run multiple instances of the module and permissions to update module parameters are distributed among the admin accounts).
A network could also have multiple network admins depending on how the blockchain application is configured, i.e. the blockchain application could be configured to run multiple instances of the admin module and permissions to update module parameters are distributed among admins.

## Contents

Expand Down

0 comments on commit 759e553

Please sign in to comment.