-
Notifications
You must be signed in to change notification settings - Fork 415
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #739 from CosmWasm/proto_upgrade
Update IBC protobuf files
- Loading branch information
Showing
30 changed files
with
2,398 additions
and
16 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
third_party/proto/ibc/applications/transfer/v1/genesis.proto
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,19 @@ | ||
syntax = "proto3"; | ||
|
||
package ibc.applications.transfer.v1; | ||
|
||
option go_package = "github.com/cosmos/ibc-go/v2/modules/apps/transfer/types"; | ||
|
||
import "ibc/applications/transfer/v1/transfer.proto"; | ||
import "gogoproto/gogo.proto"; | ||
|
||
// GenesisState defines the ibc-transfer genesis state | ||
message GenesisState { | ||
string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; | ||
repeated DenomTrace denom_traces = 2 [ | ||
(gogoproto.castrepeated) = "Traces", | ||
(gogoproto.nullable) = false, | ||
(gogoproto.moretags) = "yaml:\"denom_traces\"" | ||
]; | ||
Params params = 3 [(gogoproto.nullable) = false]; | ||
} |
67 changes: 67 additions & 0 deletions
67
third_party/proto/ibc/applications/transfer/v1/query.proto
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,67 @@ | ||
syntax = "proto3"; | ||
|
||
package ibc.applications.transfer.v1; | ||
|
||
import "gogoproto/gogo.proto"; | ||
import "cosmos/base/query/v1beta1/pagination.proto"; | ||
import "ibc/applications/transfer/v1/transfer.proto"; | ||
import "google/api/annotations.proto"; | ||
|
||
option go_package = "github.com/cosmos/ibc-go/v2/modules/apps/transfer/types"; | ||
|
||
// Query provides defines the gRPC querier service. | ||
service Query { | ||
// DenomTrace queries a denomination trace information. | ||
rpc DenomTrace(QueryDenomTraceRequest) returns (QueryDenomTraceResponse) { | ||
option (google.api.http).get = "/ibc/apps/transfer/v1/denom_traces/{hash}"; | ||
} | ||
|
||
// DenomTraces queries all denomination traces. | ||
rpc DenomTraces(QueryDenomTracesRequest) returns (QueryDenomTracesResponse) { | ||
option (google.api.http).get = "/ibc/apps/transfer/v1/denom_traces"; | ||
} | ||
|
||
// Params queries all parameters of the ibc-transfer module. | ||
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { | ||
option (google.api.http).get = "/ibc/apps/transfer/v1/params"; | ||
} | ||
} | ||
|
||
// QueryDenomTraceRequest is the request type for the Query/DenomTrace RPC | ||
// method | ||
message QueryDenomTraceRequest { | ||
// hash (in hex format) of the denomination trace information. | ||
string hash = 1; | ||
} | ||
|
||
// QueryDenomTraceResponse is the response type for the Query/DenomTrace RPC | ||
// method. | ||
message QueryDenomTraceResponse { | ||
// denom_trace returns the requested denomination trace information. | ||
DenomTrace denom_trace = 1; | ||
} | ||
|
||
// QueryConnectionsRequest is the request type for the Query/DenomTraces RPC | ||
// method | ||
message QueryDenomTracesRequest { | ||
// pagination defines an optional pagination for the request. | ||
cosmos.base.query.v1beta1.PageRequest pagination = 1; | ||
} | ||
|
||
// QueryConnectionsResponse is the response type for the Query/DenomTraces RPC | ||
// method. | ||
message QueryDenomTracesResponse { | ||
// denom_traces returns all denominations trace information. | ||
repeated DenomTrace denom_traces = 1 [(gogoproto.castrepeated) = "Traces", (gogoproto.nullable) = false]; | ||
// pagination defines the pagination in the response. | ||
cosmos.base.query.v1beta1.PageResponse pagination = 2; | ||
} | ||
|
||
// QueryParamsRequest is the request type for the Query/Params RPC method. | ||
message QueryParamsRequest {} | ||
|
||
// QueryParamsResponse is the response type for the Query/Params RPC method. | ||
message QueryParamsResponse { | ||
// params defines the parameters of the module. | ||
Params params = 1; | ||
} |
30 changes: 30 additions & 0 deletions
30
third_party/proto/ibc/applications/transfer/v1/transfer.proto
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,30 @@ | ||
syntax = "proto3"; | ||
|
||
package ibc.applications.transfer.v1; | ||
|
||
option go_package = "github.com/cosmos/ibc-go/v2/modules/apps/transfer/types"; | ||
|
||
import "gogoproto/gogo.proto"; | ||
|
||
// DenomTrace contains the base denomination for ICS20 fungible tokens and the | ||
// source tracing information path. | ||
message DenomTrace { | ||
// path defines the chain of port/channel identifiers used for tracing the | ||
// source of the fungible token. | ||
string path = 1; | ||
// base denomination of the relayed fungible token. | ||
string base_denom = 2; | ||
} | ||
|
||
// Params defines the set of IBC transfer parameters. | ||
// NOTE: To prevent a single token from being transferred, set the | ||
// TransfersEnabled parameter to true and then set the bank module's SendEnabled | ||
// parameter for the denomination to false. | ||
message Params { | ||
// send_enabled enables or disables all cross-chain token transfers from this | ||
// chain. | ||
bool send_enabled = 1 [(gogoproto.moretags) = "yaml:\"send_enabled\""]; | ||
// receive_enabled enables or disables all cross-chain token transfers to this | ||
// chain. | ||
bool receive_enabled = 2 [(gogoproto.moretags) = "yaml:\"receive_enabled\""]; | ||
} |
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,44 @@ | ||
syntax = "proto3"; | ||
|
||
package ibc.applications.transfer.v1; | ||
|
||
option go_package = "github.com/cosmos/ibc-go/v2/modules/apps/transfer/types"; | ||
|
||
import "gogoproto/gogo.proto"; | ||
import "cosmos/base/v1beta1/coin.proto"; | ||
import "ibc/core/client/v1/client.proto"; | ||
|
||
// Msg defines the ibc/transfer Msg service. | ||
service Msg { | ||
// Transfer defines a rpc handler method for MsgTransfer. | ||
rpc Transfer(MsgTransfer) returns (MsgTransferResponse); | ||
} | ||
|
||
// MsgTransfer defines a msg to transfer fungible tokens (i.e Coins) between | ||
// ICS20 enabled chains. See ICS Spec here: | ||
// https://github.com/cosmos/ibc/tree/master/spec/app/ics-020-fungible-token-transfer#data-structures | ||
message MsgTransfer { | ||
option (gogoproto.equal) = false; | ||
option (gogoproto.goproto_getters) = false; | ||
|
||
// the port on which the packet will be sent | ||
string source_port = 1 [(gogoproto.moretags) = "yaml:\"source_port\""]; | ||
// the channel by which the packet will be sent | ||
string source_channel = 2 [(gogoproto.moretags) = "yaml:\"source_channel\""]; | ||
// the tokens to be transferred | ||
cosmos.base.v1beta1.Coin token = 3 [(gogoproto.nullable) = false]; | ||
// the sender address | ||
string sender = 4; | ||
// the recipient address on the destination chain | ||
string receiver = 5; | ||
// Timeout height relative to the current block height. | ||
// The timeout is disabled when set to 0. | ||
ibc.core.client.v1.Height timeout_height = 6 | ||
[(gogoproto.moretags) = "yaml:\"timeout_height\"", (gogoproto.nullable) = false]; | ||
// Timeout timestamp (in nanoseconds) relative to the current block timestamp. | ||
// The timeout is disabled when set to 0. | ||
uint64 timeout_timestamp = 7 [(gogoproto.moretags) = "yaml:\"timeout_timestamp\""]; | ||
} | ||
|
||
// MsgTransferResponse defines the Msg/Transfer response type. | ||
message MsgTransferResponse {} |
19 changes: 19 additions & 0 deletions
19
third_party/proto/ibc/applications/transfer/v2/packet.proto
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,19 @@ | ||
syntax = "proto3"; | ||
|
||
package ibc.applications.transfer.v2; | ||
|
||
option go_package = "github.com/cosmos/ibc-go/v2/modules/apps/transfer/types"; | ||
|
||
// FungibleTokenPacketData defines a struct for the packet payload | ||
// See FungibleTokenPacketData spec: | ||
// https://github.com/cosmos/ibc/tree/master/spec/app/ics-020-fungible-token-transfer#data-structures | ||
message FungibleTokenPacketData { | ||
// the token denomination to be transferred | ||
string denom = 1; | ||
// the token amount to be transferred | ||
string amount = 2; | ||
// the sender address | ||
string sender = 3; | ||
// the recipient address on the destination chain | ||
string receiver = 4; | ||
} |
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,148 @@ | ||
syntax = "proto3"; | ||
|
||
package ibc.core.channel.v1; | ||
|
||
option go_package = "github.com/cosmos/ibc-go/v2/modules/core/04-channel/types"; | ||
|
||
import "gogoproto/gogo.proto"; | ||
import "ibc/core/client/v1/client.proto"; | ||
|
||
// Channel defines pipeline for exactly-once packet delivery between specific | ||
// modules on separate blockchains, which has at least one end capable of | ||
// sending packets and one end capable of receiving packets. | ||
message Channel { | ||
option (gogoproto.goproto_getters) = false; | ||
|
||
// current state of the channel end | ||
State state = 1; | ||
// whether the channel is ordered or unordered | ||
Order ordering = 2; | ||
// counterparty channel end | ||
Counterparty counterparty = 3 [(gogoproto.nullable) = false]; | ||
// list of connection identifiers, in order, along which packets sent on | ||
// this channel will travel | ||
repeated string connection_hops = 4 [(gogoproto.moretags) = "yaml:\"connection_hops\""]; | ||
// opaque channel version, which is agreed upon during the handshake | ||
string version = 5; | ||
} | ||
|
||
// IdentifiedChannel defines a channel with additional port and channel | ||
// identifier fields. | ||
message IdentifiedChannel { | ||
option (gogoproto.goproto_getters) = false; | ||
|
||
// current state of the channel end | ||
State state = 1; | ||
// whether the channel is ordered or unordered | ||
Order ordering = 2; | ||
// counterparty channel end | ||
Counterparty counterparty = 3 [(gogoproto.nullable) = false]; | ||
// list of connection identifiers, in order, along which packets sent on | ||
// this channel will travel | ||
repeated string connection_hops = 4 [(gogoproto.moretags) = "yaml:\"connection_hops\""]; | ||
// opaque channel version, which is agreed upon during the handshake | ||
string version = 5; | ||
// port identifier | ||
string port_id = 6; | ||
// channel identifier | ||
string channel_id = 7; | ||
} | ||
|
||
// State defines if a channel is in one of the following states: | ||
// CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. | ||
enum State { | ||
option (gogoproto.goproto_enum_prefix) = false; | ||
|
||
// Default State | ||
STATE_UNINITIALIZED_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "UNINITIALIZED"]; | ||
// A channel has just started the opening handshake. | ||
STATE_INIT = 1 [(gogoproto.enumvalue_customname) = "INIT"]; | ||
// A channel has acknowledged the handshake step on the counterparty chain. | ||
STATE_TRYOPEN = 2 [(gogoproto.enumvalue_customname) = "TRYOPEN"]; | ||
// A channel has completed the handshake. Open channels are | ||
// ready to send and receive packets. | ||
STATE_OPEN = 3 [(gogoproto.enumvalue_customname) = "OPEN"]; | ||
// A channel has been closed and can no longer be used to send or receive | ||
// packets. | ||
STATE_CLOSED = 4 [(gogoproto.enumvalue_customname) = "CLOSED"]; | ||
} | ||
|
||
// Order defines if a channel is ORDERED or UNORDERED | ||
enum Order { | ||
option (gogoproto.goproto_enum_prefix) = false; | ||
|
||
// zero-value for channel ordering | ||
ORDER_NONE_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "NONE"]; | ||
// packets can be delivered in any order, which may differ from the order in | ||
// which they were sent. | ||
ORDER_UNORDERED = 1 [(gogoproto.enumvalue_customname) = "UNORDERED"]; | ||
// packets are delivered exactly in the order which they were sent | ||
ORDER_ORDERED = 2 [(gogoproto.enumvalue_customname) = "ORDERED"]; | ||
} | ||
|
||
// Counterparty defines a channel end counterparty | ||
message Counterparty { | ||
option (gogoproto.goproto_getters) = false; | ||
|
||
// port on the counterparty chain which owns the other end of the channel. | ||
string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; | ||
// channel end on the counterparty chain | ||
string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; | ||
} | ||
|
||
// Packet defines a type that carries data across different chains through IBC | ||
message Packet { | ||
option (gogoproto.goproto_getters) = false; | ||
|
||
// number corresponds to the order of sends and receives, where a Packet | ||
// with an earlier sequence number must be sent and received before a Packet | ||
// with a later sequence number. | ||
uint64 sequence = 1; | ||
// identifies the port on the sending chain. | ||
string source_port = 2 [(gogoproto.moretags) = "yaml:\"source_port\""]; | ||
// identifies the channel end on the sending chain. | ||
string source_channel = 3 [(gogoproto.moretags) = "yaml:\"source_channel\""]; | ||
// identifies the port on the receiving chain. | ||
string destination_port = 4 [(gogoproto.moretags) = "yaml:\"destination_port\""]; | ||
// identifies the channel end on the receiving chain. | ||
string destination_channel = 5 [(gogoproto.moretags) = "yaml:\"destination_channel\""]; | ||
// actual opaque bytes transferred directly to the application module | ||
bytes data = 6; | ||
// block height after which the packet times out | ||
ibc.core.client.v1.Height timeout_height = 7 | ||
[(gogoproto.moretags) = "yaml:\"timeout_height\"", (gogoproto.nullable) = false]; | ||
// block timestamp (in nanoseconds) after which the packet times out | ||
uint64 timeout_timestamp = 8 [(gogoproto.moretags) = "yaml:\"timeout_timestamp\""]; | ||
} | ||
|
||
// PacketState defines the generic type necessary to retrieve and store | ||
// packet commitments, acknowledgements, and receipts. | ||
// Caller is responsible for knowing the context necessary to interpret this | ||
// state as a commitment, acknowledgement, or a receipt. | ||
message PacketState { | ||
option (gogoproto.goproto_getters) = false; | ||
|
||
// channel port identifier. | ||
string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; | ||
// channel unique identifier. | ||
string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; | ||
// packet sequence. | ||
uint64 sequence = 3; | ||
// embedded data that represents packet state. | ||
bytes data = 4; | ||
} | ||
|
||
// Acknowledgement is the recommended acknowledgement format to be used by | ||
// app-specific protocols. | ||
// NOTE: The field numbers 21 and 22 were explicitly chosen to avoid accidental | ||
// conflicts with other protobuf message formats used for acknowledgements. | ||
// The first byte of any message with this format will be the non-ASCII values | ||
// `0xaa` (result) or `0xb2` (error). Implemented as defined by ICS: | ||
// https://github.com/cosmos/ibc/tree/master/spec/core/ics-004-channel-and-packet-semantics#acknowledgement-envelope | ||
message Acknowledgement { | ||
// response contains either a result or an error and must be non-empty | ||
oneof response { | ||
bytes result = 21; | ||
string error = 22; | ||
} | ||
} |
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,32 @@ | ||
syntax = "proto3"; | ||
|
||
package ibc.core.channel.v1; | ||
|
||
option go_package = "github.com/cosmos/ibc-go/v2/modules/core/04-channel/types"; | ||
|
||
import "gogoproto/gogo.proto"; | ||
import "ibc/core/channel/v1/channel.proto"; | ||
|
||
// GenesisState defines the ibc channel submodule's genesis state. | ||
message GenesisState { | ||
repeated IdentifiedChannel channels = 1 [(gogoproto.casttype) = "IdentifiedChannel", (gogoproto.nullable) = false]; | ||
repeated PacketState acknowledgements = 2 [(gogoproto.nullable) = false]; | ||
repeated PacketState commitments = 3 [(gogoproto.nullable) = false]; | ||
repeated PacketState receipts = 4 [(gogoproto.nullable) = false]; | ||
repeated PacketSequence send_sequences = 5 | ||
[(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"send_sequences\""]; | ||
repeated PacketSequence recv_sequences = 6 | ||
[(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"recv_sequences\""]; | ||
repeated PacketSequence ack_sequences = 7 | ||
[(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"ack_sequences\""]; | ||
// the sequence for the next generated channel identifier | ||
uint64 next_channel_sequence = 8 [(gogoproto.moretags) = "yaml:\"next_channel_sequence\""]; | ||
} | ||
|
||
// PacketSequence defines the genesis type necessary to retrieve and store | ||
// next send and receive sequences. | ||
message PacketSequence { | ||
string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; | ||
string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; | ||
uint64 sequence = 3; | ||
} |
Oops, something went wrong.