Skip to content

Commit

Permalink
feat: add comments for the events of oracle and crosschain modules (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
yutianwu authored Feb 8, 2023
1 parent fadd1f3 commit 609d247
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 18 deletions.
9 changes: 9 additions & 0 deletions proto/cosmos/crosschain/v1/event.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,22 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/crosschain/types";

// EventCrossChain is emitted when there is a cross chain package created
message EventCrossChain {
// Source chain id of the cross chain package
uint32 src_chain_id = 1;
// Destination chain id of the cross chainpackage
uint32 dest_chain_id = 2;
// Channel id of the cross chain package
uint32 channel_id = 3;
// Sequence of the cross chain package
uint64 sequence = 4;
// Package type of the cross chain package, like SYN, ACK and FAIL_ACK
uint32 package_type = 5;
// Timestamp of the cross chain package
uint64 timestamp = 6;
// Payload of the cross chain package
string package_load = 7;
// Relayer fee for the cross chain package
string relayer_fee = 8;
// Relayer fee for the ACK or FAIL_ACK package of this cross chain package
string ack_relayer_fee = 9;
}
10 changes: 10 additions & 0 deletions proto/cosmos/oracle/v1/event.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,24 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/oracle/types";

// EventPackageClaim is emitted when a cross chain package is processed
message EventPackageClaim {
// Source chain id of the package
uint32 src_chain_id = 1;
// Destination chain id of the package
uint32 dest_chain_id = 2;
// Channel id of the package
uint32 channel_id = 3;
// Package type of the package, like SYN, ACK and FAIL_ACK
uint32 package_type = 4;
// Receive sequence of the package
uint64 receive_sequence = 5;
// Send sequence of the corresponding ACK package or FAIL_ACK package
int64 send_sequence = 6;
// Crash status for the handle of this package
bool crash = 7;
// Error message for the handle of this package
string error_msg = 8;
// Relayer fee paid for this package
string relayer_fee = 9;
// Relayer fee paid for the ACK or FAIL_ACK package
string ack_relayer_fee = 10;
}
4 changes: 4 additions & 0 deletions proto/cosmos/oracle/v1/oracle.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/oracle/types";

// Params holds parameters for the oracle module.
message Params {
// Timeout for the in turn relayer
uint64 relayer_timeout = 1; // in s
// Backoff time for the other relayers
uint64 relayer_backoff_time = 2; // in s
// Reward share for the relayer sends the claim message,
// the other relayers signed the bls message will share the reward evenly.
uint32 relayer_reward_share = 3; // in percentage
}
25 changes: 17 additions & 8 deletions x/crosschain/types/event.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 19 additions & 9 deletions x/oracle/types/event.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion x/oracle/types/oracle.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 609d247

Please sign in to comment.