docs: update module interfaces (#9322)

* update transaction commands

* update query commands

* update command flags

* update grpc and rest

* update command examples

* remove legacy rest

* update code snippets

* Update docs/building-modules/module-interfaces.md

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>

Co-authored-by: ryanchrypto <12519942+ryanchrypto@users.noreply.github.com>
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Tyler <48813565+technicallyty@users.noreply.github.com>
This commit is contained in:
Ryan Christoffersen
2021-05-19 20:00:57 +00:00
committed by GitHub
co-authored by Aleksandr Bezobchuk ryanchrypto mergify[bot] Tyler
parent 53fe03eca6
commit e5abed1c3b
2 changed files with 71 additions and 142 deletions
+1 -4
View File
@@ -34,9 +34,6 @@ x/{module_name}
│   ├── cli
│   │ ├── query.go
│   │   └── tx.go
│   ├── rest
│   │   ├── query.go
│   │   └── tx.go
│   └── testutil
│   ├── cli_test.go
│   └── suite.go
@@ -79,7 +76,7 @@ x/{module_name}
└── tx.pb.go
```
- `client/`: The module's CLI and REST client functionality implementation and the module's integration testing suite.
- `client/`: The module's CLI client functionality implementation and the module's integration testing suite.
- `exported/`: The module's exported types - typically interface types. If a module relies on keepers from another module, it is expected to receive the keepers as interface contracts through the `expected_keepers.go` file (see below) in order to avoid a direct dependency on the module implementing the keepers. However, these interface contracts can define methods that operate on and/or return types that are specific to the module that is implementing the keepers and this is where `exported/` comes into play. The interface types that are defined in `exported/` use canonical types, allowing for the module to receive the keepers as interface contracts through the `expected_keepers.go` file. This pattern allows for code to remain DRY and also alleviates import cycle chaos.
- `keeper/`: The module's `Keeper` and `MsgServer` implementation.
- `module/`: The module's `AppModule` and `AppModuleBasic` implementation.