-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
x/ibc: implement ADR 032 typed events #7762
Changes from 38 commits
5b539e7
ed85dd7
7d9919b
deb1e3c
5e11d14
171f362
f158344
faeab07
fe5f8ca
50f3f1f
45f32f8
fa6a618
625501d
526d942
6719759
d8b6883
5f472bf
a79c878
ebb07e3
b16fcd0
700f504
62be11a
7f98f3f
3324f28
2a7b622
8d7747e
123f0c2
d998bd9
5efe687
d8c41cf
f0212b1
a4d9034
5a4d5dc
f609c7e
6d92028
344614b
dfe947b
3e9169c
f9eb795
f3fa0c7
d0192c8
c00f98d
7e85d4e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
syntax = "proto3"; | ||
package ibc.applications.transfer.v1; | ||
|
||
option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/applications/transfer/types"; | ||
|
||
import "gogoproto/gogo.proto"; | ||
import "ibc/core/channel/v1/channel.proto"; | ||
|
||
// EventOnRecvPacket is a typed event emitted on receiving packet | ||
message EventOnRecvPacket { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Have a feeling this might want to be a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yea this should be under |
||
string receiver = 1; | ||
|
||
string denom = 2; | ||
|
||
uint64 amount = 3; | ||
|
||
bool success = 4; | ||
} | ||
|
||
// EventOnAcknowledgementPacket is a typed event emitted on packet acknowledgement | ||
message EventOnAcknowledgementPacket { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Have a feeling this might want to be a channel event? cc @AdityaSripal @cwgoes |
||
string receiver = 1; | ||
|
||
string denom = 2; | ||
|
||
uint64 amount = 3; | ||
|
||
ibc.core.channel.v1.Acknowledgement acknowledgement = 4 [(gogoproto.nullable) = false]; | ||
} | ||
|
||
// EventAcknowledgementSuccess is a typed event emitted on packet acknowledgement success | ||
message EventAcknowledgementSuccess { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Have a feeling this might want to be a channel event? cc @AdityaSripal @cwgoes |
||
bytes success = 1; | ||
} | ||
|
||
// EventAcknowledgementError is a typed event emitted on packet acknowledgement error | ||
message EventAcknowledgementError { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Have a feeling this might want to be a channel event? cc @AdityaSripal @cwgoes |
||
string error = 1; | ||
} | ||
|
||
// EventOnTimeoutPacket is a typed event emitted on packet timeout | ||
message EventOnTimeoutPacket { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this should be in channel along with all the events above |
||
string refund_receiver = 1; | ||
|
||
string refund_denom = 2; | ||
|
||
uint64 refund_amount = 3; | ||
} | ||
|
||
// EventTransfer is a typed event emitted on ibc transfer | ||
message EventTransfer { | ||
string sender = 1; | ||
|
||
string receiver = 2; | ||
} | ||
|
||
// EventDenominationTrace is a typed event for denomination trace | ||
message EventDenominationTrace { | ||
bytes trace_hash = 1 [(gogoproto.casttype) = "github.com/tendermint/tendermint/libs/bytes.HexBytes"]; | ||
|
||
string denom = 2; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,187 @@ | ||
syntax = "proto3"; | ||
package ibc.core.channel.v1; | ||
|
||
option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/core/04-channel/types"; | ||
|
||
import "ibc/core/channel/v1/channel.proto"; | ||
import "google/protobuf/any.proto"; | ||
import "cosmos_proto/cosmos.proto"; | ||
|
||
// EventChannelOpenInit is a typed event emitted on channel open init | ||
message EventChannelOpenInit { | ||
string port_id = 1; | ||
colin-axner marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
string channel_id = 2; | ||
|
||
string counterparty_port_id = 3; | ||
|
||
string counterparty_channel_id = 4; | ||
|
||
string connection_id = 5; | ||
} | ||
|
||
// EventChannelOpenTry is a typed event emitted on channel open try | ||
message EventChannelOpenTry { | ||
string port_id = 1; | ||
|
||
string channel_id = 2; | ||
|
||
string counterparty_port_id = 3; | ||
|
||
string counterparty_channel_id = 4; | ||
|
||
string connection_id = 5; | ||
} | ||
|
||
// EventChannelOpenAck is a typed event emitted on channel open acknowledgement | ||
message EventChannelOpenAck { | ||
string port_id = 1; | ||
|
||
string channel_id = 2; | ||
|
||
string counterparty_port_id = 3; | ||
|
||
string counterparty_channel_id = 4; | ||
|
||
string connection_id = 5; | ||
} | ||
|
||
// EventChannelCloseInit is a typed event emitted on channel close init | ||
message EventChannelCloseInit { | ||
colin-axner marked this conversation as resolved.
Show resolved
Hide resolved
|
||
string port_id = 1; | ||
|
||
string channel_id = 2; | ||
|
||
string counterparty_port_id = 3; | ||
|
||
string counterparty_channel_id = 4; | ||
|
||
string connection_id = 5; | ||
} | ||
|
||
// EventChannelOpenConfirm is a typed event emitted on channel open confirm | ||
message EventChannelOpenConfirm { | ||
string port_id = 1; | ||
|
||
string channel_id = 2; | ||
|
||
string counterparty_port_id = 3; | ||
|
||
string counterparty_channel_id = 4; | ||
|
||
string connection_id = 5; | ||
} | ||
|
||
// EventChannelCloseConfirm is a typed event emitted on channel close confirm | ||
message EventChannelCloseConfirm { | ||
string port_id = 1; | ||
|
||
string channel_id = 2; | ||
|
||
string counterparty_port_id = 3; | ||
|
||
string counterparty_channel_id = 4; | ||
|
||
string connection_id = 5; | ||
} | ||
|
||
// EventChannelSendPacket is a typed event emitted when packet is sent | ||
message EventChannelSendPacket { | ||
bytes data = 1; | ||
|
||
google.protobuf.Any timeout_height = 2 [(cosmos_proto.accepts_interface) = "Height"]; | ||
|
||
uint64 timeout_timestamp = 3; | ||
|
||
uint64 sequence = 4; | ||
|
||
string src_port = 5; | ||
|
||
string src_channel = 6; | ||
|
||
string dst_port = 7; | ||
|
||
string dst_channel = 8; | ||
|
||
Order channel_ordering = 9; | ||
} | ||
|
||
// EventChannelRecvPacket is a typed event emitted when packet is received in channel | ||
message EventChannelRecvPacket { | ||
bytes data = 1; | ||
|
||
google.protobuf.Any timeout_height = 2 [(cosmos_proto.accepts_interface) = "Height"]; | ||
|
||
uint64 timeout_timestamp = 3; | ||
|
||
uint64 sequence = 4; | ||
|
||
string src_port = 5; | ||
|
||
string src_channel = 6; | ||
|
||
string dst_port = 7; | ||
|
||
string dst_channel = 8; | ||
|
||
Order channel_ordering = 9; | ||
} | ||
|
||
// EventChannelWriteAck is a typed event emitted on write acknowledgement | ||
message EventChannelWriteAck { | ||
bytes data = 1; | ||
|
||
google.protobuf.Any timeout_height = 2 [(cosmos_proto.accepts_interface) = "Height"]; | ||
|
||
uint64 timeout_timestamp = 3; | ||
|
||
uint64 sequence = 4; | ||
|
||
string src_port = 5; | ||
|
||
string src_channel = 6; | ||
|
||
string dst_port = 7; | ||
|
||
string dst_channel = 8; | ||
|
||
bytes acknowledgement = 9; | ||
} | ||
|
||
// EventChannelAckPacket is a typed event emitted when packet acknowledgement is executed | ||
message EventChannelAckPacket { | ||
google.protobuf.Any timeout_height = 1 [(cosmos_proto.accepts_interface) = "Height"]; | ||
|
||
uint64 timeout_timestamp = 2; | ||
|
||
uint64 sequence = 3; | ||
|
||
string src_port = 4; | ||
|
||
string src_channel = 5; | ||
|
||
string dst_port = 6; | ||
|
||
string dst_channel = 7; | ||
|
||
Order channel_ordering = 8; | ||
} | ||
|
||
// EventChannelTimeoutPacket is a typed event emitted when packet is timeout | ||
message EventChannelTimeoutPacket { | ||
google.protobuf.Any timeout_height = 1 [(cosmos_proto.accepts_interface) = "Height"]; | ||
|
||
uint64 timeout_timestamp = 2; | ||
|
||
uint64 sequence = 3; | ||
|
||
string src_port = 4; | ||
|
||
string src_channel = 5; | ||
|
||
string dst_port = 6; | ||
|
||
string dst_channel = 7; | ||
|
||
Order channel_ordering = 8; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
super nit, but can we rename these proto files to
events.proto
?