Skip to content

Commit 65bf377

Browse files
authored
Add proto annotation for feeabs v8. (#191)
1 parent 4048791 commit 65bf377

16 files changed

+249
-239
lines changed

Makefile

+10-6
Original file line numberDiff line numberDiff line change
@@ -153,20 +153,24 @@ build-integration-binary:
153153
.PHONY: build-integration-binary
154154

155155
###############################################################################
156-
### Proto ###
156+
### Protobuf ###
157157
###############################################################################
158-
PROTO_BUILDER_IMAGE=ghcr.io/cosmos/proto-builder:0.14.0
158+
protoVer=0.14.0
159+
protoImageName=ghcr.io/cosmos/proto-builder:$(protoVer)
160+
protoImage=$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(protoImageName)
159161

160-
proto-all: proto-format proto-gen
162+
proto-all: proto-format proto-lint proto-gen format
161163

162164
proto-gen:
163165
@echo "Generating Protobuf files"
164-
@$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(PROTO_BUILDER_IMAGE) sh ./scripts/protocgen.sh
166+
@$(protoImage) sh ./scripts/protocgen.sh
165167

166168
proto-format:
167169
@echo "Formatting Protobuf files"
168-
@$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace tendermintdev/docker-build-proto \
169-
find ./proto -name "*.proto" -exec clang-format -i {} \;
170+
@$(protoImage) find ./ -name "*.proto" -exec clang-format -i {} \;
171+
172+
proto-swagger-gen:
173+
@./scripts/protoc-swagger-gen.sh
170174

171175
proto-lint:
172176
@$(DOCKER_BUF) lint --error-format=json

proto/buf.yaml

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
version: v1
2-
name: buf.build/osmosis-labs/fee-abstraction
2+
name: buf.build/cosmwasm/wasmd
33
deps:
4-
- buf.build/cosmos/cosmos-sdk:v0.47.0
4+
- buf.build/cosmos/cosmos-sdk:v0.50.0
55
- buf.build/cosmos/cosmos-proto:1935555c206d4afb9e94615dfd0fad31
66
- buf.build/cosmos/gogo-proto:a14993478f40695898ed8a86931094b6656e8a5d
77
- buf.build/googleapis/googleapis:8d7204855ec14631a499bd7393ce1970
@@ -20,5 +20,4 @@ lint:
2020
- SERVICE_SUFFIX
2121
- PACKAGE_VERSION_SUFFIX
2222
- RPC_REQUEST_STANDARD_NAME
23-
ignore:
24-
- tendermint
23+
- PACKAGE_DIRECTORY_MATCH

proto/feeabstraction/feeabs/v1beta1/epoch.proto

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import "google/protobuf/timestamp.proto";
77

88
option go_package = "github.com/osmosis-labs/fee-abstraction/v8/x/feeabs/types";
99

10+
// EpochInfo defines information of a epoch
1011
message EpochInfo {
1112
// identifier is a unique reference to this particular timer.
1213
string identifier = 1;
@@ -64,6 +65,7 @@ message EpochInfo {
6465
int64 current_epoch_start_height = 8;
6566
}
6667

68+
// ExponentialBackoff defines backoff epoch
6769
message ExponentialBackoff {
6870
int64 jump = 1;
6971
int64 future_epoch = 2;

proto/feeabstraction/feeabs/v1beta1/genesis.proto

-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ syntax = "proto3";
22
package feeabstraction.feeabs.v1beta1;
33

44
import "gogoproto/gogo.proto";
5-
import "google/api/annotations.proto";
6-
import "cosmos/base/query/v1beta1/pagination.proto";
75
import "feeabstraction/feeabs/v1beta1/params.proto";
86
import "feeabstraction/feeabs/v1beta1/epoch.proto";
97

proto/feeabstraction/feeabs/v1beta1/osmosisibc.proto

+4-1
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ package feeabstraction.feeabs.v1beta1;
33

44
import "gogoproto/gogo.proto";
55
import "google/protobuf/timestamp.proto";
6-
import "google/api/annotations.proto";
76
import "tendermint/abci/types.proto";
87

98
option go_package = "github.com/osmosis-labs/fee-abstraction/v8/x/feeabs/types";
109

10+
// QueryArithmeticTwapToNowRequest
1111
message QueryArithmeticTwapToNowRequest {
1212
uint64 pool_id = 1;
1313
string base_asset = 2;
@@ -19,6 +19,7 @@ message QueryArithmeticTwapToNowRequest {
1919
];
2020
}
2121

22+
// QueryArithmeticTwapToNowResponse
2223
message QueryArithmeticTwapToNowResponse {
2324
string arithmetic_twap = 1 [
2425
(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
@@ -27,6 +28,7 @@ message QueryArithmeticTwapToNowResponse {
2728
];
2829
}
2930

31+
// InterchainQueryRequest
3032
message InterchainQueryRequest {
3133
bytes data = 1;
3234
string path = 2;
@@ -43,6 +45,7 @@ message InterchainQueryPacketData {
4345
// non-deterministic fields left empty (e.g. Codespace, Log, Info and ...).
4446
message InterchainQueryPacketAck { bytes data = 1; }
4547

48+
// InterchainQueryRequestPacket
4649
message InterchainQueryRequestPacket {
4750
repeated InterchainQueryRequest requests = 1 [ (gogoproto.nullable) = false ];
4851
}

proto/feeabstraction/feeabs/v1beta1/params.proto

-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
syntax = "proto3";
22
package feeabstraction.feeabs.v1beta1;
33

4-
import "gogoproto/gogo.proto";
5-
import "google/api/annotations.proto";
6-
import "cosmos/base/query/v1beta1/pagination.proto";
7-
import "google/protobuf/duration.proto";
8-
94
option go_package = "github.com/osmosis-labs/fee-abstraction/v8/x/feeabs/types";
105

116
// Params defines the parameters for the feeabs module.

proto/feeabstraction/feeabs/v1beta1/proposal.proto

+5-2
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@ syntax = "proto3";
22
package feeabstraction.feeabs.v1beta1;
33

44
import "gogoproto/gogo.proto";
5-
import "google/protobuf/timestamp.proto";
6-
import "google/api/annotations.proto";
75

86
option go_package = "github.com/osmosis-labs/fee-abstraction/v8/x/feeabs/types";
97

8+
// HostChainFeeAbsStatus
109
enum HostChainFeeAbsStatus {
1110
UPDATED = 0;
1211
OUTDATED = 1;
1312
FROZEN = 2;
1413
}
1514

15+
// HostChainFeeAbsConfig
1616
message HostChainFeeAbsConfig {
1717
// ibc token is allowed to be used as fee token
1818
string ibc_denom = 1 [ (gogoproto.moretags) = "yaml:\"allowed_token\"" ];
@@ -24,6 +24,7 @@ message HostChainFeeAbsConfig {
2424
HostChainFeeAbsStatus status = 4;
2525
}
2626

27+
// AddHostZoneProposal
2728
message AddHostZoneProposal {
2829
option (gogoproto.goproto_getters) = false;
2930
// the title of the proposal
@@ -34,6 +35,7 @@ message AddHostZoneProposal {
3435
HostChainFeeAbsConfig host_chain_config = 3;
3536
}
3637

38+
// DeleteHostZoneProposal
3739
message DeleteHostZoneProposal {
3840
option (gogoproto.goproto_getters) = false;
3941
// the title of the proposal
@@ -44,6 +46,7 @@ message DeleteHostZoneProposal {
4446
string ibc_denom = 3;
4547
}
4648

49+
// SetHostZoneProposal
4750
message SetHostZoneProposal {
4851
option (gogoproto.goproto_getters) = false;
4952
// the title of the proposal

proto/feeabstraction/feeabs/v1beta1/query.proto

+8-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ package feeabstraction.feeabs.v1beta1;
33

44
import "gogoproto/gogo.proto";
55
import "google/api/annotations.proto";
6-
import "feeabstraction/feeabs/v1beta1/params.proto";
7-
import "feeabstraction/feeabs/v1beta1/osmosisibc.proto";
86
import "feeabstraction/feeabs/v1beta1/proposal.proto";
97
import "cosmos/base/v1beta1/coin.proto";
108

@@ -24,21 +22,25 @@ service Query {
2422
option (google.api.http).get = "/fee-abstraction/feeabs/v1/module-balances";
2523
}
2624

25+
// HostChainConfig
2726
rpc HostChainConfig(QueryHostChainConfigRequest)
2827
returns (QueryHostChainConfigResponse) {
2928
option (google.api.http).get =
3029
"/fee-abstraction/feeabs/v1/host-chain-config/{ibc_denom}";
3130
}
3231

32+
// AllHostChainConfig
3333
rpc AllHostChainConfig(AllQueryHostChainConfigRequest)
3434
returns (AllQueryHostChainConfigResponse) {
3535
option (google.api.http).get =
3636
"/fee-abstraction/feeabs/v1/all-host-chain-config";
3737
}
3838
}
3939

40+
// QueryHostChainConfigRequest
4041
message QueryHostChainConfigRequest { string ibc_denom = 1; }
4142

43+
// QueryHostChainConfigResponse
4244
message QueryHostChainConfigResponse {
4345
HostChainFeeAbsConfig host_chain_config = 1 [
4446
(gogoproto.moretags) = "yaml:\"host_chain_config\"",
@@ -50,6 +52,7 @@ message QueryHostChainConfigResponse {
5052
// RPC method.
5153
message QueryOsmosisArithmeticTwapRequest { string ibc_denom = 1; }
5254

55+
// QueryOsmosisArithmeticTwapResponse
5356
message QueryOsmosisArithmeticTwapResponse {
5457
string arithmetic_twap = 1 [
5558
(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
@@ -62,6 +65,7 @@ message QueryOsmosisArithmeticTwapResponse {
6265
// method.
6366
message QueryFeeabsModuleBalacesRequest {}
6467

68+
// QueryFeeabsModuleBalacesResponse
6569
message QueryFeeabsModuleBalacesResponse {
6670
repeated cosmos.base.v1beta1.Coin balances = 1 [
6771
(gogoproto.nullable) = false,
@@ -71,8 +75,10 @@ message QueryFeeabsModuleBalacesResponse {
7175
string address = 2;
7276
}
7377

78+
// AllQueryHostChainConfigRequest
7479
message AllQueryHostChainConfigRequest {}
7580

81+
// AllQueryHostChainConfigResponse
7682
message AllQueryHostChainConfigResponse {
7783
repeated HostChainFeeAbsConfig all_host_chain_config = 1 [
7884
(gogoproto.moretags) = "yaml:\"all_host_chain_config\"",

proto/feeabstraction/feeabs/v1beta1/tx.proto

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ syntax = "proto3";
22
package feeabstraction.feeabs.v1beta1;
33

44
import "gogoproto/gogo.proto";
5-
import "feeabstraction/feeabs/v1beta1/params.proto";
6-
import "feeabstraction/feeabs/v1beta1/epoch.proto";
5+
import "cosmos/msg/v1/msg.proto";
76
import "cosmos/base/v1beta1/coin.proto";
8-
import "google/protobuf/timestamp.proto";
97

108
option go_package = "github.com/osmosis-labs/fee-abstraction/v8/x/feeabs/types";
119

1210
service Msg {
11+
option (cosmos.msg.v1.service) = true;
12+
1313
rpc SendQueryIbcDenomTWAP(MsgSendQueryIbcDenomTWAP)
1414
returns (MsgSendQueryIbcDenomTWAPResponse);
1515
rpc SwapCrossChain(MsgSwapCrossChain) returns (MsgSwapCrossChainResponse);

x/feeabs/types/epoch.pb.go

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

x/feeabs/types/genesis.pb.go

+20-25
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)