Skip to content

Commit aa39fab

Browse files
add wasm protos to release/v8.1.x (#5988)
* chore: add wasm protos * fix comment * add pb.go files * add changelog * remove wasm pb.go files
1 parent 7e01c91 commit aa39fab

File tree

6 files changed

+193
-2
lines changed

6 files changed

+193
-2
lines changed

Diff for: CHANGELOG.md

+16
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,22 @@ Ref: https://keepachangelog.com/en/1.0.0/
3434

3535
# Changelog
3636

37+
## [Unreleased]
38+
39+
### Dependencies
40+
41+
### API Breaking
42+
43+
### State Machine Breaking
44+
45+
### Improvements
46+
47+
* (proto) [\#5988](https://github.com/cosmos/ibc-go/pull/5988) Add wasm proto files.
48+
49+
### Features
50+
51+
### Bug Fixes
52+
3753
## [v8.1.0](https://github.com/cosmos/ibc-go/releases/tag/v8.1.0) - 2024-01-31
3854

3955
### Dependencies

Diff for: modules/apps/transfer/types/authz.pb.go

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

Diff for: proto/ibc/lightclients/wasm/v1/genesis.proto

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
2+
syntax = "proto3";
3+
package ibc.lightclients.wasm.v1;
4+
5+
import "gogoproto/gogo.proto";
6+
7+
option go_package = "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/types";
8+
9+
// GenesisState defines 08-wasm's keeper genesis state
10+
message GenesisState {
11+
// uploaded light client wasm contracts
12+
repeated Contract contracts = 1 [(gogoproto.nullable) = false];
13+
}
14+
15+
// Contract stores contract code
16+
message Contract {
17+
option (gogoproto.goproto_getters) = false;
18+
// contract byte code
19+
bytes code_bytes = 1;
20+
}

Diff for: proto/ibc/lightclients/wasm/v1/query.proto

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
syntax = "proto3";
2+
package ibc.lightclients.wasm.v1;
3+
4+
import "google/api/annotations.proto";
5+
import "cosmos/base/query/v1beta1/pagination.proto";
6+
7+
option go_package = "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/types";
8+
9+
// Query service for wasm module
10+
service Query {
11+
// Get all Wasm checksums
12+
rpc Checksums(QueryChecksumsRequest) returns (QueryChecksumsResponse) {
13+
option (google.api.http).get = "/ibc/lightclients/wasm/v1/checksums";
14+
}
15+
16+
// Get Wasm code for given checksum
17+
rpc Code(QueryCodeRequest) returns (QueryCodeResponse) {
18+
option (google.api.http).get = "/ibc/lightclients/wasm/v1/checksums/{checksum}/code";
19+
}
20+
}
21+
22+
// QueryChecksumsRequest is the request type for the Query/Checksums RPC method.
23+
message QueryChecksumsRequest {
24+
// pagination defines an optional pagination for the request.
25+
cosmos.base.query.v1beta1.PageRequest pagination = 1;
26+
}
27+
28+
// QueryChecksumsResponse is the response type for the Query/Checksums RPC method.
29+
message QueryChecksumsResponse {
30+
// checksums is a list of the hex encoded checksums of all wasm codes stored.
31+
repeated string checksums = 1;
32+
33+
// pagination defines the pagination in the response.
34+
cosmos.base.query.v1beta1.PageResponse pagination = 2;
35+
}
36+
37+
// QueryCodeRequest is the request type for the Query/Code RPC method.
38+
message QueryCodeRequest {
39+
// checksum is a hex encoded string of the code stored.
40+
string checksum = 1;
41+
}
42+
43+
// QueryCodeResponse is the response type for the Query/Code RPC method.
44+
message QueryCodeResponse {
45+
bytes data = 1;
46+
}

Diff for: proto/ibc/lightclients/wasm/v1/tx.proto

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
syntax = "proto3";
2+
package ibc.lightclients.wasm.v1;
3+
4+
option go_package = "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/types";
5+
6+
import "cosmos/msg/v1/msg.proto";
7+
8+
// Msg defines the ibc/08-wasm Msg service.
9+
service Msg {
10+
option (cosmos.msg.v1.service) = true;
11+
12+
// StoreCode defines a rpc handler method for MsgStoreCode.
13+
rpc StoreCode(MsgStoreCode) returns (MsgStoreCodeResponse);
14+
15+
// RemoveChecksum defines a rpc handler method for MsgRemoveChecksum.
16+
rpc RemoveChecksum(MsgRemoveChecksum) returns (MsgRemoveChecksumResponse);
17+
18+
// MigrateContract defines a rpc handler method for MsgMigrateContract.
19+
rpc MigrateContract(MsgMigrateContract) returns (MsgMigrateContractResponse);
20+
}
21+
22+
// MsgStoreCode defines the request type for the StoreCode rpc.
23+
message MsgStoreCode {
24+
option (cosmos.msg.v1.signer) = "signer";
25+
26+
// signer address
27+
string signer = 1;
28+
// wasm byte code of light client contract. It can be raw or gzip compressed
29+
bytes wasm_byte_code = 2;
30+
}
31+
32+
// MsgStoreCodeResponse defines the response type for the StoreCode rpc
33+
message MsgStoreCodeResponse {
34+
// checksum is the sha256 hash of the stored code
35+
bytes checksum = 1;
36+
}
37+
38+
// MsgRemoveChecksum defines the request type for the MsgRemoveChecksum rpc.
39+
message MsgRemoveChecksum {
40+
option (cosmos.msg.v1.signer) = "signer";
41+
42+
// signer address
43+
string signer = 1;
44+
// checksum is the sha256 hash to be removed from the store
45+
bytes checksum = 2;
46+
}
47+
48+
// MsgStoreChecksumResponse defines the response type for the StoreCode rpc
49+
message MsgRemoveChecksumResponse {}
50+
51+
// MsgMigrateContract defines the request type for the MigrateContract rpc.
52+
message MsgMigrateContract {
53+
option (cosmos.msg.v1.signer) = "signer";
54+
55+
// signer address
56+
string signer = 1;
57+
// the client id of the contract
58+
string client_id = 2;
59+
// checksum is the sha256 hash of the new wasm byte code for the contract
60+
bytes checksum = 3;
61+
// the json encoded message to be passed to the contract on migration
62+
bytes msg = 4;
63+
}
64+
65+
// MsgMigrateContractResponse defines the response type for the MigrateContract rpc
66+
message MsgMigrateContractResponse {}

Diff for: proto/ibc/lightclients/wasm/v1/wasm.proto

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
2+
syntax = "proto3";
3+
package ibc.lightclients.wasm.v1;
4+
5+
import "gogoproto/gogo.proto";
6+
import "ibc/core/client/v1/client.proto";
7+
8+
option go_package = "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/types";
9+
10+
// Wasm light client's Client state
11+
message ClientState {
12+
option (gogoproto.goproto_getters) = false;
13+
// bytes encoding the client state of the underlying light client
14+
// implemented as a Wasm contract.
15+
bytes data = 1;
16+
bytes checksum = 2;
17+
ibc.core.client.v1.Height latest_height = 3 [(gogoproto.nullable) = false];
18+
}
19+
20+
// Wasm light client's ConsensusState
21+
message ConsensusState {
22+
option (gogoproto.goproto_getters) = false;
23+
// bytes encoding the consensus state of the underlying light client
24+
// implemented as a Wasm contract.
25+
bytes data = 1;
26+
}
27+
28+
// Wasm light client message (either header(s) or misbehaviour)
29+
message ClientMessage {
30+
option (gogoproto.goproto_getters) = false;
31+
32+
bytes data = 1;
33+
}
34+
35+
// Checksums defines a list of all checksums that are stored
36+
//
37+
// Deprecated: This message is deprecated in favor of storing the checksums
38+
// using a Collections.KeySet.
39+
message Checksums {
40+
option deprecated = true;
41+
42+
repeated bytes checksums = 1;
43+
}

0 commit comments

Comments
 (0)