-
Notifications
You must be signed in to change notification settings - Fork 628
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add wasm protos to
release/v8.2.x
(#5987)
* add wasm protos * add pb.go files * add wasm proto files * remove wasm pb.go files
- Loading branch information
Carlos Rodriguez
authored
Mar 14, 2024
1 parent
a96bf50
commit fae72e3
Showing
6 changed files
with
179 additions
and
2 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,20 @@ | ||
|
||
syntax = "proto3"; | ||
package ibc.lightclients.wasm.v1; | ||
|
||
import "gogoproto/gogo.proto"; | ||
|
||
option go_package = "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/types"; | ||
|
||
// GenesisState defines 08-wasm's keeper genesis state | ||
message GenesisState { | ||
// uploaded light client wasm contracts | ||
repeated Contract contracts = 1 [(gogoproto.nullable) = false]; | ||
} | ||
|
||
// Contract stores contract code | ||
message Contract { | ||
option (gogoproto.goproto_getters) = false; | ||
// contract byte code | ||
bytes code_bytes = 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,46 @@ | ||
syntax = "proto3"; | ||
package ibc.lightclients.wasm.v1; | ||
|
||
import "google/api/annotations.proto"; | ||
import "cosmos/base/query/v1beta1/pagination.proto"; | ||
|
||
option go_package = "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/types"; | ||
|
||
// Query service for wasm module | ||
service Query { | ||
// Get all Wasm checksums | ||
rpc Checksums(QueryChecksumsRequest) returns (QueryChecksumsResponse) { | ||
option (google.api.http).get = "/ibc/lightclients/wasm/v1/checksums"; | ||
} | ||
|
||
// Get Wasm code for given checksum | ||
rpc Code(QueryCodeRequest) returns (QueryCodeResponse) { | ||
option (google.api.http).get = "/ibc/lightclients/wasm/v1/checksums/{checksum}/code"; | ||
} | ||
} | ||
|
||
// QueryChecksumsRequest is the request type for the Query/Checksums RPC method. | ||
message QueryChecksumsRequest { | ||
// pagination defines an optional pagination for the request. | ||
cosmos.base.query.v1beta1.PageRequest pagination = 1; | ||
} | ||
|
||
// QueryChecksumsResponse is the response type for the Query/Checksums RPC method. | ||
message QueryChecksumsResponse { | ||
// checksums is a list of the hex encoded checksums of all wasm codes stored. | ||
repeated string checksums = 1; | ||
|
||
// pagination defines the pagination in the response. | ||
cosmos.base.query.v1beta1.PageResponse pagination = 2; | ||
} | ||
|
||
// QueryCodeRequest is the request type for the Query/Code RPC method. | ||
message QueryCodeRequest { | ||
// checksum is a hex encoded string of the code stored. | ||
string checksum = 1; | ||
} | ||
|
||
// QueryCodeResponse is the response type for the Query/Code RPC method. | ||
message QueryCodeResponse { | ||
bytes data = 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,66 @@ | ||
syntax = "proto3"; | ||
package ibc.lightclients.wasm.v1; | ||
|
||
option go_package = "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/types"; | ||
|
||
import "cosmos/msg/v1/msg.proto"; | ||
|
||
// Msg defines the ibc/08-wasm Msg service. | ||
service Msg { | ||
option (cosmos.msg.v1.service) = true; | ||
|
||
// StoreCode defines a rpc handler method for MsgStoreCode. | ||
rpc StoreCode(MsgStoreCode) returns (MsgStoreCodeResponse); | ||
|
||
// RemoveChecksum defines a rpc handler method for MsgRemoveChecksum. | ||
rpc RemoveChecksum(MsgRemoveChecksum) returns (MsgRemoveChecksumResponse); | ||
|
||
// MigrateContract defines a rpc handler method for MsgMigrateContract. | ||
rpc MigrateContract(MsgMigrateContract) returns (MsgMigrateContractResponse); | ||
} | ||
|
||
// MsgStoreCode defines the request type for the StoreCode rpc. | ||
message MsgStoreCode { | ||
option (cosmos.msg.v1.signer) = "signer"; | ||
|
||
// signer address | ||
string signer = 1; | ||
// wasm byte code of light client contract. It can be raw or gzip compressed | ||
bytes wasm_byte_code = 2; | ||
} | ||
|
||
// MsgStoreCodeResponse defines the response type for the StoreCode rpc | ||
message MsgStoreCodeResponse { | ||
// checksum is the sha256 hash of the stored code | ||
bytes checksum = 1; | ||
} | ||
|
||
// MsgRemoveChecksum defines the request type for the MsgRemoveChecksum rpc. | ||
message MsgRemoveChecksum { | ||
option (cosmos.msg.v1.signer) = "signer"; | ||
|
||
// signer address | ||
string signer = 1; | ||
// checksum is the sha256 hash to be removed from the store | ||
bytes checksum = 2; | ||
} | ||
|
||
// MsgStoreChecksumResponse defines the response type for the StoreCode rpc | ||
message MsgRemoveChecksumResponse {} | ||
|
||
// MsgMigrateContract defines the request type for the MigrateContract rpc. | ||
message MsgMigrateContract { | ||
option (cosmos.msg.v1.signer) = "signer"; | ||
|
||
// signer address | ||
string signer = 1; | ||
// the client id of the contract | ||
string client_id = 2; | ||
// checksum is the sha256 hash of the new wasm byte code for the contract | ||
bytes checksum = 3; | ||
// the json encoded message to be passed to the contract on migration | ||
bytes msg = 4; | ||
} | ||
|
||
// MsgMigrateContractResponse defines the response type for the MigrateContract rpc | ||
message MsgMigrateContractResponse {} |
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,43 @@ | ||
|
||
syntax = "proto3"; | ||
package ibc.lightclients.wasm.v1; | ||
|
||
import "gogoproto/gogo.proto"; | ||
import "ibc/core/client/v1/client.proto"; | ||
|
||
option go_package = "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/types"; | ||
|
||
// Wasm light client's Client state | ||
message ClientState { | ||
option (gogoproto.goproto_getters) = false; | ||
// bytes encoding the client state of the underlying light client | ||
// implemented as a Wasm contract. | ||
bytes data = 1; | ||
bytes checksum = 2; | ||
ibc.core.client.v1.Height latest_height = 3 [(gogoproto.nullable) = false]; | ||
} | ||
|
||
// Wasm light client's ConsensusState | ||
message ConsensusState { | ||
option (gogoproto.goproto_getters) = false; | ||
// bytes encoding the consensus state of the underlying light client | ||
// implemented as a Wasm contract. | ||
bytes data = 1; | ||
} | ||
|
||
// Wasm light client message (either header(s) or misbehaviour) | ||
message ClientMessage { | ||
option (gogoproto.goproto_getters) = false; | ||
|
||
bytes data = 1; | ||
} | ||
|
||
// Checksums defines a list of all checksums that are stored | ||
// | ||
// Deprecated: This message is deprecated in favor of storing the checksums | ||
// using a Collections.KeySet. | ||
message Checksums { | ||
option deprecated = true; | ||
|
||
repeated bytes checksums = 1; | ||
} |