-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
92 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
syntax = "proto3"; | ||
package addressmap.v1; | ||
|
||
option go_package = "github.com/peggyjv/sommelier/v7/x/addressmap/types/v1"; | ||
|
||
message AddressMapping { | ||
string cosmos_address = 1; | ||
string evm_address = 2; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
syntax = "proto3"; | ||
package addressmap.v1; | ||
|
||
option go_package = "github.com/peggyjv/sommelier/v7/x/addressmap/types/v1"; | ||
|
||
import "addressmap/v1/addressmap.proto"; | ||
|
||
message GenesisState { | ||
repeated AddressMapping address_mappings = 1; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
syntax = "proto3"; | ||
|
||
package addressmap.v1; | ||
|
||
import "addressmap/v1/addressmap.proto"; | ||
import "gogoproto/gogo.proto"; | ||
import "google/api/annotations.proto"; | ||
import "cosmos/base/query/v1beta1/pagination.proto"; | ||
|
||
|
||
option go_package = "github.com/peggyjv/sommelier/v7/x/addressmap/types/v1"; | ||
|
||
service Query { | ||
rpc QueryAddressMappings(QueryAddressMappingsRequest) returns (QueryAddressMappingsResponse) { | ||
option (google.api.http).get = "/sommelier/addressmap/v1/address_mappings/{?pagination.limit,pagination.offset,pagination.count_total}"; | ||
} | ||
|
||
rpc QueryAddressMappingByEVMAddress(QueryAddressMappingByEVMAddressRequest) returns (QueryAddressMappingByEVMAddressResponse) { | ||
option (google.api.http).get = "/sommelier/addressmap/v1/address_mappings/evm/{evm_address}"; | ||
} | ||
|
||
rpc QueryAddressMappingByCosmosAddress(QueryAddressMappingByCosmosAddressRequest) returns (QueryAddressMappingByCosmosAddressResponse) { | ||
option (google.api.http).get = "/sommelier/addressmap/v1/address_mappings/cosmos/{cosmos_address}"; | ||
} | ||
} | ||
|
||
message QueryAddressMappingsRequest { | ||
cosmos.base.query.v1beta1.PageRequest pagination = 1 [ (gogoproto.nullable) = false ]; | ||
} | ||
|
||
message QueryAddressMappingsResponse { | ||
repeated AddressMapping address_mappings = 1; | ||
cosmos.base.query.v1beta1.PageResponse pagination = 2 [ (gogoproto.nullable) = false ]; | ||
} | ||
|
||
message QueryAddressMappingByEVMAddressRequest { | ||
string evm_address = 1; | ||
} | ||
|
||
message QueryAddressMappingByEVMAddressResponse { | ||
AddressMapping address_mapping = 1; | ||
} | ||
|
||
message QueryAddressMappingByCosmosAddressRequest { | ||
string cosmos_address = 1; | ||
} | ||
|
||
message QueryAddressMappingByCosmosAddressResponse { | ||
AddressMapping address_mapping = 1; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
syntax = "proto3"; | ||
package addressmap.v1; | ||
|
||
option go_package = "github.com/peggyjv/sommelier/v7/x/addressmap/types/v1"; | ||
|
||
service Msg { | ||
// Adds a mapping between the cosmos address of the sender and the provided EVM address | ||
rpc AddAddressMapping (MsgSetAddressMappingRequest) returns (MsgSetAddressMappingResponse); | ||
// Removes the mapping containing the cosmos address of the sender | ||
rpc RemoveAddressMapping (MsgRemoveAddressMappingRequest) returns (MsgRemoveAddressMappingResponse); | ||
} | ||
|
||
message MsgAddAddressMappingRequest { | ||
string evm_address = 1; | ||
} | ||
|
||
message MsgAddAddressMappingResponse {} | ||
|
||
message MsgRemoveAddressMappingRequest {} | ||
|
||
message MsgRemoveAddressMappingResponse {} | ||
|