Skip to content

Commit

Permalink
Update proto-builder image version, and add missing directives to x/a…
Browse files Browse the repository at this point in the history
…ddresses protos
  • Loading branch information
cbrit committed Oct 7, 2024
1 parent 3143444 commit cf334d5
Show file tree
Hide file tree
Showing 17 changed files with 90 additions and 61 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,12 @@ test-docker-push: test-docker
###############################################################################
### Protobuf ###
###############################################################################
protoVer=0.13.1
protoVer=0.15.1
protoImageName=ghcr.io/cosmos/proto-builder:$(protoVer)
protoImage=$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(protoImageName)

proto-all: proto-format proto-lint proto-gen

proto-gen:
@echo "Generating Protobuf files"
# todo: figure out why this old method was failing
Expand Down
6 changes: 5 additions & 1 deletion proto/addresses/v1/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,28 @@ import "addresses/v1/genesis.proto";
import "gogoproto/gogo.proto";
import "google/api/annotations.proto";
import "cosmos/base/query/v1beta1/pagination.proto";

import "cosmos/query/v1/query.proto";

option go_package = "github.com/peggyjv/sommelier/v7/x/addresses/types";

service Query {
rpc QueryParams(QueryParamsRequest) returns (QueryParamsResponse) {
option (cosmos.query.v1.module_query_safe) = true;
option (google.api.http).get = "/sommelier/addresses/v1/params";
}

rpc QueryAddressMappings(QueryAddressMappingsRequest) returns (QueryAddressMappingsResponse) {
option (cosmos.query.v1.module_query_safe) = true;
option (google.api.http).get = "/sommelier/addresses/v1/address_mappings";
}

rpc QueryAddressMappingByEVMAddress(QueryAddressMappingByEVMAddressRequest) returns (QueryAddressMappingByEVMAddressResponse) {
option (cosmos.query.v1.module_query_safe) = true;
option (google.api.http).get = "/sommelier/addresses/v1/address_mappings/evm/{evm_address}";
}

rpc QueryAddressMappingByCosmosAddress(QueryAddressMappingByCosmosAddressRequest) returns (QueryAddressMappingByCosmosAddressResponse) {
option (cosmos.query.v1.module_query_safe) = true;
option (google.api.http).get = "/sommelier/addresses/v1/address_mappings/cosmos/{cosmos_address}";
}
}
Expand Down
8 changes: 8 additions & 0 deletions proto/addresses/v1/tx.proto
Original file line number Diff line number Diff line change
@@ -1,23 +1,31 @@
syntax = "proto3";
package addresses.v1;

import "cosmos/msg/v1/msg.proto";

option go_package = "github.com/peggyjv/sommelier/v7/x/addresses/types";

service Msg {
option (cosmos.msg.v1.service) = true;

// Adds a mapping between the cosmos address of the sender and the provided EVM address
rpc AddAddressMapping (MsgAddAddressMapping) returns (MsgAddAddressMappingResponse);
// Removes the mapping containing the cosmos address of the sender
rpc RemoveAddressMapping (MsgRemoveAddressMapping) returns (MsgRemoveAddressMappingResponse);
}

message MsgAddAddressMapping {
option (cosmos.msg.v1.signer) = "signer";

string evm_address = 1;
string signer = 2;
}

message MsgAddAddressMappingResponse {}

message MsgRemoveAddressMapping {
option (cosmos.msg.v1.signer) = "signer";

string signer = 1;
}

Expand Down
4 changes: 2 additions & 2 deletions proto/buf.lock
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ deps:
- remote: buf.build
owner: googleapis
repository: googleapis
commit: 8bc2c51e08c447cd8886cdea48a73e14
digest: shake256:a969155953a5cedc5b2df5b42c368f2bc66ff8ce1804bc96e0f14ff2ee8a893687963058909df844d1643cdbc98ff099d2daa6bc9f9f5b8886c49afdc60e19af
commit: e7f8d366f5264595bcc4cd4139af9973
digest: shake256:e5e5f1c12f82e028ea696faa43b4f9dc6258a6d1226282962a8c8b282e10946281d815884f574bd279ebd9cd7588629beb3db17b892af6c33b56f92f8f67f509
80 changes: 41 additions & 39 deletions x/addresses/types/query.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 21 additions & 17 deletions x/addresses/types/tx.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions x/auction/types/query.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions x/auction/types/tx.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions x/axelarcork/types/query.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions x/axelarcork/types/tx.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions x/cellarfees/types/v1/query.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions x/cellarfees/types/v2/query.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions x/cork/types/v2/query.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions x/cork/types/v2/tx.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions x/incentives/types/query.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions x/pubsub/types/query.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions x/pubsub/types/tx.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit cf334d5

Please sign in to comment.