Skip to content

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
 

‎docs/learn/beginner/03-accounts.md

+20
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,26 @@ https://github.com/cosmos/cosmos-sdk/blob/v0.52.0-beta.2/codec/address/bech32_co
9595
| Validator Operator | cosmosvaloper |
9696
| Consensus Nodes | cosmosvalcons |
9797

98+
99+
### Module Accounts
100+
101+
Module accounts are special accounts used by modules to perform specific operations within the blockchain. These accounts are not controlled by users but by the modules themselves. Each module account has a unique name and a set of permissions that define what operations it can perform. Examples of module accounts include the distribution module account, which handles the distribution of staking rewards and the governance module account, which manages the funds related to governance proposals.
102+
103+
104+
#### Address Generation
105+
106+
Module account addresses are generated deterministically from the module name, as defined in [ADR-028](../../architecture/adr-028-public-key-addresses.md)
107+
108+
Definition of account permissions is done during the app initialization.
109+
110+
```go reference
111+
https://github.com/cosmos/cosmos-sdk/blob/3a03804c148d0da8d6df1ad839b08c50f6896fa1/simapp/app.go#L130-L141
112+
```
113+
114+
```go reference
115+
https://github.com/cosmos/cosmos-sdk/blob/3a03804c148d0da8d6df1ad839b08c50f6896fa1/simapp/app.go#L328
116+
```
117+
98118
### Public Keys
99119

100120
Public keys in Cosmos SDK are defined by `cryptotypes.PubKey` interface. Since public keys are saved in a store, the `cryptotypes.PubKey` extends the `proto.Message` interface:

0 commit comments

Comments
 (0)
Please sign in to comment.