-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(x/accounts): wire x/accounts to simapp #18253
Changes from all commits
222bbd7
d3a76c4
97f4d12
7fdd822
2784b8a
78e3c74
5e91277
5818be6
df2b814
1f5ec83
3d5a5fc
26d52f6
c9d47a6
919b33d
350ef5a
2dd30a7
c4282a9
1b376bf
5d97973
03d1492
87efff8
1cfce44
0b7b866
06a02f7
7ccfb8e
2cf02a4
b8c03d2
d977173
e1d9f6a
72886e8
ff0dcf9
e2c0ebf
d6435db
ca09df7
30cf96b
fc7ecdc
cd993b6
5ad7e23
8a992d1
2348ca7
c2e6f4f
ac8a779
3819541
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
syntax = "proto3"; | ||
|
||
package cosmos.accounts.testing.counter.v1; | ||
|
||
// MsgInit defines a message which initializes the counter with a given amount. | ||
message MsgInit { | ||
// initial_value is the initial amount to set the counter to. | ||
uint64 initial_value = 1; | ||
} | ||
|
||
// MsgInitResponse defines the MsgInit response type. | ||
message MsgInitResponse {} | ||
|
||
// MsgIncreaseCounter defines a message which increases the counter by a given amount. | ||
message MsgIncreaseCounter { | ||
// amount is the amount to increase the counter by. | ||
uint64 amount = 1; | ||
} | ||
|
||
// MsgIncreaseCounterResponse defines the MsgIncreaseCounter response type. | ||
// Returns the new counter value. | ||
message MsgIncreaseCounterResponse { | ||
// new_amount defines the new counter value after the increase. | ||
uint64 new_amount = 1; | ||
} | ||
|
||
// QueryCounterRequest is used to query the counter value. | ||
message QueryCounterRequest {} | ||
|
||
// QueryCounterResponse returns the counter value. | ||
message QueryCounterResponse { | ||
// value defines the value of the counter. | ||
uint64 value = 1; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,10 @@ option go_package = "cosmossdk.io/x/accounts/v1"; | |
service Query { | ||
// AccountQuery runs an account query. | ||
rpc AccountQuery(AccountQueryRequest) returns (AccountQueryResponse) {}; | ||
// Schema returns an x/account schema. Unstable. | ||
rpc Schema(SchemaRequest) returns (SchemaResponse) {}; | ||
// AccountType returns the account type for an address. | ||
rpc AccountType(AccountTypeRequest) returns (AccountTypeResponse) {}; | ||
} | ||
|
||
// AccountQueryRequest is the request type for the Query/AccountQuery RPC | ||
|
@@ -23,3 +27,40 @@ message AccountQueryResponse { | |
// response defines the query response of the account. | ||
bytes response = 1; | ||
} | ||
|
||
// SchemaResponse is the response type for the Query/Schema RPC method. | ||
message SchemaRequest { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. these are approximate schema definitions which represent the init/query/exec messages an account can process.
tac0turtle marked this conversation as resolved.
Show resolved
Hide resolved
|
||
// account_type defines the account type to query the schema for. | ||
string account_type = 1; | ||
} | ||
|
||
// SchemaResponse is the response type for the Query/Schema RPC method. | ||
message SchemaResponse { | ||
// Handler defines a schema descriptor for a handler. | ||
// Where request and response are names that can be used to lookup the | ||
// reflection descriptor. | ||
message Handler { | ||
// request is the request name | ||
string request = 1; | ||
// response is the response name | ||
string response = 2; | ||
} | ||
// init_schema defines the schema descriptor for the Init account method. | ||
Handler init_schema = 1; | ||
// execute_handlers defines the schema descriptor for the Execute account method. | ||
repeated Handler execute_handlers = 2; | ||
// query_handlers defines the schema descriptor for the Query account method. | ||
repeated Handler query_handlers = 3; | ||
} | ||
|
||
// AccountTypeRequest is the request type for the Query/AccountType RPC method. | ||
message AccountTypeRequest { | ||
// address defines the address to query the account type for. | ||
string address = 1; | ||
} | ||
|
||
// AccountTypeResponse is the response type for the Query/AccountType RPC method. | ||
message AccountTypeResponse { | ||
// account_type defines the account type for the address. | ||
string account_type = 1; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a test account protofile, to use for simd testing