Skip to content

Commit 863b63d

Browse files
authored
Merge branch 'main' into julien/autocli-comments
2 parents a3a2fe6 + 9c2f464 commit 863b63d

42 files changed

Lines changed: 9174 additions & 396 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

api/cosmos/accounts/testing/counter/v1/counter.pulsar.go

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

api/cosmos/accounts/v1/query.pulsar.go

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

api/cosmos/accounts/v1/query_grpc.pb.go

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

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

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

crypto/keys/secp256k1/internal/secp256k1/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,17 @@
33
This package is copied from https://github.com/ethereum/go-ethereum/tree/8fddf27a989e246659fd018ea9be37b2b4f55326/crypto/secp256k1
44

55
Unlike the rest of go-ethereum it is [3-clause BSD](https://opensource.org/licenses/BSD-3-Clause) licensed so compatible with our Apache2.0 license. We opt to copy in here rather than depend on go-ethereum to avoid issues with vendoring of the GPL parts of that repository by downstream.
6+
7+
## Duplicate Symbols
8+
9+
If a project is importing [go-ethereum](https://github.com/ethereum/go-ethereum) and the Cosmos SDK, cgo secp256k1 will only work on linux operating systems due to duplicated symbols. If you are testing on a mac, we recommend using a docker container or something similar.
10+
11+
To avoid duplicate symbol errors `ldflags` must be set to allow for multiple definitions.
12+
13+
#### Gcc
14+
15+
+ `go build -tags libsecp256k1_sdk -ldflags=all="-extldflags=-Wl,--allow-multiple-definition"`
16+
17+
#### Clang
18+
19+
+ `go build -tags libsecp256k1_sdk -ldflags=all="-extldflags=-zmuldefs"`
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
syntax = "proto3";
2+
3+
package cosmos.accounts.testing.counter.v1;
4+
5+
// MsgInit defines a message which initializes the counter with a given amount.
6+
message MsgInit {
7+
// initial_value is the initial amount to set the counter to.
8+
uint64 initial_value = 1;
9+
}
10+
11+
// MsgInitResponse defines the MsgInit response type.
12+
message MsgInitResponse {}
13+
14+
// MsgIncreaseCounter defines a message which increases the counter by a given amount.
15+
message MsgIncreaseCounter {
16+
// amount is the amount to increase the counter by.
17+
uint64 amount = 1;
18+
}
19+
20+
// MsgIncreaseCounterResponse defines the MsgIncreaseCounter response type.
21+
// Returns the new counter value.
22+
message MsgIncreaseCounterResponse {
23+
// new_amount defines the new counter value after the increase.
24+
uint64 new_amount = 1;
25+
}
26+
27+
// QueryCounterRequest is used to query the counter value.
28+
message QueryCounterRequest {}
29+
30+
// QueryCounterResponse returns the counter value.
31+
message QueryCounterResponse {
32+
// value defines the value of the counter.
33+
uint64 value = 1;
34+
}

proto/cosmos/accounts/v1/query.proto

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ option go_package = "cosmossdk.io/x/accounts/v1";
88
service Query {
99
// AccountQuery runs an account query.
1010
rpc AccountQuery(AccountQueryRequest) returns (AccountQueryResponse) {};
11+
// Schema returns an x/account schema. Unstable.
12+
rpc Schema(SchemaRequest) returns (SchemaResponse) {};
13+
// AccountType returns the account type for an address.
14+
rpc AccountType(AccountTypeRequest) returns (AccountTypeResponse) {};
1115
}
1216

1317
// AccountQueryRequest is the request type for the Query/AccountQuery RPC
@@ -23,3 +27,40 @@ message AccountQueryResponse {
2327
// response defines the query response of the account.
2428
bytes response = 1;
2529
}
30+
31+
// SchemaResponse is the response type for the Query/Schema RPC method.
32+
message SchemaRequest {
33+
// account_type defines the account type to query the schema for.
34+
string account_type = 1;
35+
}
36+
37+
// SchemaResponse is the response type for the Query/Schema RPC method.
38+
message SchemaResponse {
39+
// Handler defines a schema descriptor for a handler.
40+
// Where request and response are names that can be used to lookup the
41+
// reflection descriptor.
42+
message Handler {
43+
// request is the request name
44+
string request = 1;
45+
// response is the response name
46+
string response = 2;
47+
}
48+
// init_schema defines the schema descriptor for the Init account method.
49+
Handler init_schema = 1;
50+
// execute_handlers defines the schema descriptor for the Execute account method.
51+
repeated Handler execute_handlers = 2;
52+
// query_handlers defines the schema descriptor for the Query account method.
53+
repeated Handler query_handlers = 3;
54+
}
55+
56+
// AccountTypeRequest is the request type for the Query/AccountType RPC method.
57+
message AccountTypeRequest {
58+
// address defines the address to query the account type for.
59+
string address = 1;
60+
}
61+
62+
// AccountTypeResponse is the response type for the Query/AccountType RPC method.
63+
message AccountTypeResponse {
64+
// account_type defines the account type for the address.
65+
string account_type = 1;
66+
}

proto/cosmos/accounts/v1/tx.proto

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@ package cosmos.accounts.v1;
44

55
option go_package = "cosmossdk.io/x/accounts/v1";
66

7+
import "cosmos/msg/v1/msg.proto";
8+
79
// Msg defines the Msg service for the x/accounts module.
810
service Msg {
11+
option (cosmos.msg.v1.service) = true;
12+
913
// Init creates a new account in the chain.
1014
rpc Init(MsgInit) returns (MsgInitResponse);
1115

@@ -15,6 +19,8 @@ service Msg {
1519

1620
// MsgInit defines the Create request type for the Msg/Create RPC method.
1721
message MsgInit {
22+
option (cosmos.msg.v1.signer) = "sender";
23+
1824
// sender is the address of the sender of this message.
1925
string sender = 1;
2026
// account_type is the type of the account to be created.
@@ -35,6 +41,7 @@ message MsgInitResponse {
3541

3642
// MsgExecute defines the Execute request type for the Msg/Execute RPC method.
3743
message MsgExecute {
44+
option (cosmos.msg.v1.signer) = "sender";
3845
// sender is the address of the sender of this message.
3946
string sender = 1;
4047
// target is the address of the account to be executed.

0 commit comments

Comments
 (0)