docs: update spec structure (#13768)
This commit is contained in:
parent
c3c39b9955
commit
d2e4154298
@ -7,6 +7,7 @@ sidebar_position: 1
|
||||
:::note Synopsis
|
||||
This document outlines the recommended structure of Cosmos SDK modules. These ideas are meant to be applied as suggestions. Application developers are encouraged to improve upon and contribute to module structure and development design.
|
||||
:::
|
||||
|
||||
## Structure
|
||||
|
||||
A typical Cosmos SDK module can be structured as follows:
|
||||
@ -56,11 +57,6 @@ x/{module_name}
|
||||
│ ├── genesis.go
|
||||
│ ├── operations.go
|
||||
│ └── params.go
|
||||
├── spec
|
||||
│ ├── 01_concepts.md
|
||||
│ ├── 02_state.md
|
||||
│ ├── 03_messages.md
|
||||
│ └── 04_events.md
|
||||
├── {module_name}.pb.go
|
||||
├── abci.go
|
||||
├── codec.go
|
||||
@ -74,7 +70,8 @@ x/{module_name}
|
||||
├── msgs.go
|
||||
├── params.go
|
||||
├── query.pb.go
|
||||
└── tx.pb.go
|
||||
├── tx.pb.go
|
||||
└── README.md
|
||||
```
|
||||
|
||||
* `client/`: The module's CLI client functionality implementation and the module's integration testing suite.
|
||||
@ -82,7 +79,7 @@ x/{module_name}
|
||||
* `keeper/`: The module's `Keeper` and `MsgServer` implementation.
|
||||
* `module/`: The module's `AppModule` and `AppModuleBasic` implementation.
|
||||
* `simulation/`: The module's [simulation](./13-simulator.md) package defines functions used by the blockchain simulator application (`simapp`).
|
||||
* `spec/`: The module's specification documents outlining important concepts, state storage structure, and message and event type definitions.
|
||||
* `REAMDE.md`: The module's specification documents outlining important concepts, state storage structure, and message and event type definitions. Learn more how to write module specs in the [spec guidelines](../spec/SPEC-SPEC.md).
|
||||
* The root directory includes type definitions for messages, events, and genesis state, including the type definitions generated by Protocol Buffers.
|
||||
* `abci.go`: The module's `BeginBlocker` and `EndBlocker` implementations (this file is only required if `BeginBlocker` and/or `EndBlocker` need to be defined).
|
||||
* `codec.go`: The module's registry methods for interface types.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user