Skip to content

Commit 98be2b8

Browse files
authored
docs(x/accounts): improve comments (#22339)
1 parent 1515856 commit 98be2b8

File tree

11 files changed

+79
-60
lines changed

11 files changed

+79
-60
lines changed

api/cosmos/accounts/defaults/lockup/v1/tx.pulsar.go

Lines changed: 3 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/cosmos/accounts/defaults/multisig/v1/multisig.pulsar.go

Lines changed: 17 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

server/v2/api/telemetry/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package telemetry
33
func DefaultConfig() *Config {
44
return &Config{
55
Enable: true,
6-
Address: "localhost:1318",
6+
Address: "localhost:1327",
77
ServiceName: "",
88
EnableHostname: false,
99
EnableHostnameLabel: false,

simapp/go.mod

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ require (
1414
cosmossdk.io/store v1.1.1
1515
cosmossdk.io/tools/confix v0.0.0-20230613133644-0a778132a60f
1616
cosmossdk.io/x/accounts v0.0.0-20240913065641-0064ccbce64e
17+
cosmossdk.io/x/accounts/defaults/base v0.0.0-00010101000000-000000000000
1718
cosmossdk.io/x/accounts/defaults/lockup v0.0.0-20240417181816-5e7aae0db1f5
19+
cosmossdk.io/x/accounts/defaults/multisig v0.0.0-00010101000000-000000000000
1820
cosmossdk.io/x/authz v0.0.0-00010101000000-000000000000
1921
cosmossdk.io/x/bank v0.0.0-20240226161501-23359a0b6d91
2022
cosmossdk.io/x/circuit v0.0.0-20230613133644-0a778132a60f
@@ -43,13 +45,8 @@ require (
4345
github.com/spf13/viper v1.19.0
4446
github.com/stretchr/testify v1.9.0
4547
go.uber.org/mock v0.5.0
46-
google.golang.org/protobuf v1.35.1
47-
)
48-
49-
require (
50-
cosmossdk.io/x/accounts/defaults/base v0.0.0-00010101000000-000000000000
51-
cosmossdk.io/x/accounts/defaults/multisig v0.0.0-00010101000000-000000000000
5248
google.golang.org/grpc v1.67.1
49+
google.golang.org/protobuf v1.35.1
5350
)
5451

5552
require (

tools/confix/data/v2-app.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ skip-fast-storage-upgrade = true
8585
# Enable enables the application telemetry functionality. When enabled, an in-memory sink is also enabled by default. Operators may also enabled other sinks such as Prometheus.
8686
enable = true
8787
# Address defines the metrics server address to bind to.
88-
address = 'localhost:1318'
88+
address = 'localhost:1327'
8989
# Prefixed with keys to separate services.
9090
service-name = ''
9191
# Enable prefixing gauge values with hostname.

x/accounts/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,9 @@ To implement the `Authentication` interface in x/accounts, an account must expos
360360

361361
The key message type for authentication is `MsgAuthenticate`, which is defined in the module's protocol buffer files:
362362

363-
[interfaces/account_abstraction/v1/interface.proto](./proto/cosmos/accounts/interfaces/account_abstraction/v1/interface.proto)
363+
```go reference
364+
https://github.com/cosmos/cosmos-sdk/blob/main/x/accounts/proto/cosmos/accounts/interfaces/account_abstraction/v1/interface.proto#L9-L24
365+
```
364366

365367
### Authentication Mechanism
366368

x/accounts/defaults/lockup/TUTORIAL.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
# Using lockup account on Cosmos sdk
22

3-
* [Setup](#setup)
4-
* [Init](#init)
5-
* [Execution](#execution)
3+
* [Using lockup account on Cosmos sdk](#using-lockup-account-on-cosmos-sdk)
4+
* [Setup](#setup)
5+
* [Init](#init)
6+
* [Execution](#execution)
67
* [Delegate](#delegate)
78
* [Undelegate](#undelegate)
89
* [Withdraw reward](#withdraw-reward)
910
* [Withdraw unlocked token](#withdraw-unlocked-token)
1011
* [Send coins](#send-coins)
11-
* [Query](#query)
12+
* [Query](#query)
1213
* [Query account info](#query-account-info)
1314
* [Query periodic lockup account locking periods](#query-periodic-lockup-account-locking-periods)
1415

@@ -207,7 +208,7 @@ To query a lockup account state, we can use the command below:
207208

208209
```bash
209210
querycontents=$(cat query.json)
210-
simd tx accounts query <account_address> <query-request-type-url> $querycontents --from owner
211+
simd tx accounts query <account_address> <query-request-type-url> $querycontents
211212
```
212213

213214
### Query account info

x/accounts/defaults/lockup/v1/tx.pb.go

Lines changed: 3 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

x/accounts/defaults/multisig/v1/multisig.pb.go

Lines changed: 17 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

x/accounts/proto/cosmos/accounts/defaults/lockup/v1/tx.proto

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,17 @@ import "google/protobuf/timestamp.proto";
1212

1313
option go_package = "cosmossdk.io/x/accounts/defaults/lockup/v1";
1414

15-
//-------------------------------------- INIT --------------------------------------
16-
17-
// MsgInitLockupAccount defines a message that enables creating a lockup
18-
// account.
15+
// MsgInitLockupAccount defines a message that enables creating a lockup account.
1916
message MsgInitLockupAccount {
20-
option (amino.name) = "cosmos-sdk/MsgInitLockupAccount";
21-
17+
option (amino.name) = "cosmos-sdk/MsgInitLockupAccount";
2218
option (gogoproto.equal) = true;
2319

2420
// owner of the vesting account
2521
string owner = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
26-
27-
// end of lockup
22+
// end_time is end of lockup
2823
google.protobuf.Timestamp end_time = 2
2924
[(gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.stdtime) = true];
30-
// start of lockup
25+
// start_time is start of lockup
3126
google.protobuf.Timestamp start_time = 3
3227
[(gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.stdtime) = true];
3328
}
@@ -38,8 +33,7 @@ message MsgInitLockupAccountResponse {}
3833
// MsgInitPeriodicLockingAccount defines a message that enables creating a periodic locking
3934
// account.
4035
message MsgInitPeriodicLockingAccount {
41-
option (amino.name) = "cosmos-sdk/MsgInitPeriodLockupAccount";
42-
36+
option (amino.name) = "cosmos-sdk/MsgInitPeriodLockupAccount";
4337
option (gogoproto.equal) = false;
4438

4539
// owner of the lockup account
@@ -56,8 +50,7 @@ message MsgInitPeriodicLockingAccountResponse {}
5650

5751
// MsgDelegate defines a message that enable lockup account to execute delegate message
5852
message MsgDelegate {
59-
option (cosmos.msg.v1.signer) = "sender";
60-
53+
option (cosmos.msg.v1.signer) = "sender";
6154
option (gogoproto.equal) = false;
6255
option (gogoproto.goproto_getters) = false;
6356

@@ -69,8 +62,7 @@ message MsgDelegate {
6962

7063
// MsgUndelegate defines a message that enable lockup account to execute undelegate message
7164
message MsgUndelegate {
72-
option (cosmos.msg.v1.signer) = "sender";
73-
65+
option (cosmos.msg.v1.signer) = "sender";
7466
option (gogoproto.equal) = false;
7567
option (gogoproto.goproto_getters) = false;
7668

@@ -81,8 +73,7 @@ message MsgUndelegate {
8173

8274
// MsgWithdrawReward defines a message that enable lockup account to execute withdraw reward message
8375
message MsgWithdrawReward {
84-
option (cosmos.msg.v1.signer) = "sender";
85-
76+
option (cosmos.msg.v1.signer) = "sender";
8677
option (gogoproto.equal) = false;
8778
option (gogoproto.goproto_getters) = false;
8879

@@ -92,8 +83,7 @@ message MsgWithdrawReward {
9283

9384
// MsgSend defines a message that enable lockup account to execute send message
9485
message MsgSend {
95-
option (cosmos.msg.v1.signer) = "sender";
96-
86+
option (cosmos.msg.v1.signer) = "sender";
9787
option (gogoproto.equal) = false;
9888
option (gogoproto.goproto_getters) = false;
9989

@@ -115,8 +105,7 @@ message MsgExecuteMessagesResponse {
115105
// MsgWithdraw defines a message that the owner of the lockup can perform to withdraw unlocked token to an account of
116106
// choice
117107
message MsgWithdraw {
118-
option (cosmos.msg.v1.signer) = "withdrawer";
119-
108+
option (cosmos.msg.v1.signer) = "withdrawer";
120109
option (gogoproto.equal) = false;
121110
option (gogoproto.goproto_getters) = false;
122111

0 commit comments

Comments
 (0)