Skip to content

Commit

Permalink
add message definition
Browse files Browse the repository at this point in the history
  • Loading branch information
lumtis committed Sep 23, 2024
1 parent e503026 commit 38bc5fc
Showing 1 changed file with 152 additions and 0 deletions.
152 changes: 152 additions & 0 deletions x/crosschain/types/legacy_msgs.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
package types

import (
sdk "github.com/cosmos/cosmos-sdk/types"

"github.com/zeta-chain/node/pkg/authz"
)

// MsgVoteOnObservedInboundTx

var _ sdk.Msg = &MsgVoteOnObservedInboundTx{}

func (msg *MsgVoteOnObservedInboundTx) Route() string {
return RouterKey

Check warning on line 14 in x/crosschain/types/legacy_msgs.go

View check run for this annotation

Codecov / codecov/patch

x/crosschain/types/legacy_msgs.go#L13-L14

Added lines #L13 - L14 were not covered by tests
}

func (msg *MsgVoteOnObservedInboundTx) Type() string {
return authz.InboundVoter.String()

Check warning on line 18 in x/crosschain/types/legacy_msgs.go

View check run for this annotation

Codecov / codecov/patch

x/crosschain/types/legacy_msgs.go#L17-L18

Added lines #L17 - L18 were not covered by tests
}

func (msg *MsgVoteOnObservedInboundTx) GetSigners() []sdk.AccAddress {
creator, err := sdk.AccAddressFromBech32(msg.Creator)
if err != nil {
panic(err)

Check warning on line 24 in x/crosschain/types/legacy_msgs.go

View check run for this annotation

Codecov / codecov/patch

x/crosschain/types/legacy_msgs.go#L21-L24

Added lines #L21 - L24 were not covered by tests
}
return []sdk.AccAddress{creator}

Check warning on line 26 in x/crosschain/types/legacy_msgs.go

View check run for this annotation

Codecov / codecov/patch

x/crosschain/types/legacy_msgs.go#L26

Added line #L26 was not covered by tests
}

func (msg *MsgVoteOnObservedInboundTx) GetSignBytes() []byte {
bz := ModuleCdc.MustMarshalJSON(msg)
return sdk.MustSortJSON(bz)

Check warning on line 31 in x/crosschain/types/legacy_msgs.go

View check run for this annotation

Codecov / codecov/patch

x/crosschain/types/legacy_msgs.go#L29-L31

Added lines #L29 - L31 were not covered by tests
}

func (msg *MsgVoteOnObservedInboundTx) ValidateBasic() error {
return nil

Check warning on line 35 in x/crosschain/types/legacy_msgs.go

View check run for this annotation

Codecov / codecov/patch

x/crosschain/types/legacy_msgs.go#L34-L35

Added lines #L34 - L35 were not covered by tests
}

// MsgVoteOnObservedOutboundTx

var _ sdk.Msg = &MsgVoteOnObservedOutboundTx{}

func (msg *MsgVoteOnObservedOutboundTx) Route() string {
return RouterKey

Check warning on line 43 in x/crosschain/types/legacy_msgs.go

View check run for this annotation

Codecov / codecov/patch

x/crosschain/types/legacy_msgs.go#L42-L43

Added lines #L42 - L43 were not covered by tests
}

func (msg *MsgVoteOnObservedOutboundTx) Type() string {
return authz.OutboundVoter.String()

Check warning on line 47 in x/crosschain/types/legacy_msgs.go

View check run for this annotation

Codecov / codecov/patch

x/crosschain/types/legacy_msgs.go#L46-L47

Added lines #L46 - L47 were not covered by tests
}

func (msg *MsgVoteOnObservedOutboundTx) GetSigners() []sdk.AccAddress {
creator, err := sdk.AccAddressFromBech32(msg.Creator)
if err != nil {
panic(err)

Check warning on line 53 in x/crosschain/types/legacy_msgs.go

View check run for this annotation

Codecov / codecov/patch

x/crosschain/types/legacy_msgs.go#L50-L53

Added lines #L50 - L53 were not covered by tests
}
return []sdk.AccAddress{creator}

Check warning on line 55 in x/crosschain/types/legacy_msgs.go

View check run for this annotation

Codecov / codecov/patch

x/crosschain/types/legacy_msgs.go#L55

Added line #L55 was not covered by tests
}

func (msg *MsgVoteOnObservedOutboundTx) GetSignBytes() []byte {
bz := ModuleCdc.MustMarshalJSON(msg)
return sdk.MustSortJSON(bz)

Check warning on line 60 in x/crosschain/types/legacy_msgs.go

View check run for this annotation

Codecov / codecov/patch

x/crosschain/types/legacy_msgs.go#L58-L60

Added lines #L58 - L60 were not covered by tests
}

func (msg *MsgVoteOnObservedOutboundTx) ValidateBasic() error {
return nil

Check warning on line 64 in x/crosschain/types/legacy_msgs.go

View check run for this annotation

Codecov / codecov/patch

x/crosschain/types/legacy_msgs.go#L63-L64

Added lines #L63 - L64 were not covered by tests
}

// MsgAddToInTxTracker

var _ sdk.Msg = &MsgAddToInTxTracker{}

func (msg *MsgAddToInTxTracker) Route() string {
return RouterKey

Check warning on line 72 in x/crosschain/types/legacy_msgs.go

View check run for this annotation

Codecov / codecov/patch

x/crosschain/types/legacy_msgs.go#L71-L72

Added lines #L71 - L72 were not covered by tests
}

func (msg *MsgAddToInTxTracker) Type() string {
return "AddToInTxTracker"

Check warning on line 76 in x/crosschain/types/legacy_msgs.go

View check run for this annotation

Codecov / codecov/patch

x/crosschain/types/legacy_msgs.go#L75-L76

Added lines #L75 - L76 were not covered by tests
}

func (msg *MsgAddToInTxTracker) GetSigners() []sdk.AccAddress {
creator, err := sdk.AccAddressFromBech32(msg.Creator)
if err != nil {
panic(err)

Check warning on line 82 in x/crosschain/types/legacy_msgs.go

View check run for this annotation

Codecov / codecov/patch

x/crosschain/types/legacy_msgs.go#L79-L82

Added lines #L79 - L82 were not covered by tests
}
return []sdk.AccAddress{creator}

Check warning on line 84 in x/crosschain/types/legacy_msgs.go

View check run for this annotation

Codecov / codecov/patch

x/crosschain/types/legacy_msgs.go#L84

Added line #L84 was not covered by tests
}

func (msg *MsgAddToInTxTracker) GetSignBytes() []byte {
bz := ModuleCdc.MustMarshalJSON(msg)
return sdk.MustSortJSON(bz)

Check warning on line 89 in x/crosschain/types/legacy_msgs.go

View check run for this annotation

Codecov / codecov/patch

x/crosschain/types/legacy_msgs.go#L87-L89

Added lines #L87 - L89 were not covered by tests
}

func (msg *MsgAddToInTxTracker) ValidateBasic() error {
return nil

Check warning on line 93 in x/crosschain/types/legacy_msgs.go

View check run for this annotation

Codecov / codecov/patch

x/crosschain/types/legacy_msgs.go#L92-L93

Added lines #L92 - L93 were not covered by tests
}

// MsgAddToOutTxTracker

var _ sdk.Msg = &MsgAddToOutTxTracker{}

func (msg *MsgAddToOutTxTracker) Route() string {
return RouterKey

Check warning on line 101 in x/crosschain/types/legacy_msgs.go

View check run for this annotation

Codecov / codecov/patch

x/crosschain/types/legacy_msgs.go#L100-L101

Added lines #L100 - L101 were not covered by tests
}

func (msg *MsgAddToOutTxTracker) Type() string {
return "AddToOutTxTracker"

Check warning on line 105 in x/crosschain/types/legacy_msgs.go

View check run for this annotation

Codecov / codecov/patch

x/crosschain/types/legacy_msgs.go#L104-L105

Added lines #L104 - L105 were not covered by tests
}

func (msg *MsgAddToOutTxTracker) GetSigners() []sdk.AccAddress {
creator, err := sdk.AccAddressFromBech32(msg.Creator)
if err != nil {
panic(err)

Check warning on line 111 in x/crosschain/types/legacy_msgs.go

View check run for this annotation

Codecov / codecov/patch

x/crosschain/types/legacy_msgs.go#L108-L111

Added lines #L108 - L111 were not covered by tests
}
return []sdk.AccAddress{creator}

Check warning on line 113 in x/crosschain/types/legacy_msgs.go

View check run for this annotation

Codecov / codecov/patch

x/crosschain/types/legacy_msgs.go#L113

Added line #L113 was not covered by tests
}

func (msg *MsgAddToOutTxTracker) GetSignBytes() []byte {
bz := ModuleCdc.MustMarshalJSON(msg)
return sdk.MustSortJSON(bz)

Check warning on line 118 in x/crosschain/types/legacy_msgs.go

View check run for this annotation

Codecov / codecov/patch

x/crosschain/types/legacy_msgs.go#L116-L118

Added lines #L116 - L118 were not covered by tests
}

func (msg *MsgAddToOutTxTracker) ValidateBasic() error {
return nil

Check warning on line 122 in x/crosschain/types/legacy_msgs.go

View check run for this annotation

Codecov / codecov/patch

x/crosschain/types/legacy_msgs.go#L121-L122

Added lines #L121 - L122 were not covered by tests
}

// MsgRemoveFromOutTxTracker

var _ sdk.Msg = &MsgRemoveFromOutTxTracker{}

func (msg *MsgRemoveFromOutTxTracker) Route() string {
return RouterKey

Check warning on line 130 in x/crosschain/types/legacy_msgs.go

View check run for this annotation

Codecov / codecov/patch

x/crosschain/types/legacy_msgs.go#L129-L130

Added lines #L129 - L130 were not covered by tests
}

func (msg *MsgRemoveFromOutTxTracker) Type() string {
return "RemoveFromOutTxTracker"

Check warning on line 134 in x/crosschain/types/legacy_msgs.go

View check run for this annotation

Codecov / codecov/patch

x/crosschain/types/legacy_msgs.go#L133-L134

Added lines #L133 - L134 were not covered by tests
}

func (msg *MsgRemoveFromOutTxTracker) GetSigners() []sdk.AccAddress {
creator, err := sdk.AccAddressFromBech32(msg.Creator)
if err != nil {
panic(err)

Check warning on line 140 in x/crosschain/types/legacy_msgs.go

View check run for this annotation

Codecov / codecov/patch

x/crosschain/types/legacy_msgs.go#L137-L140

Added lines #L137 - L140 were not covered by tests
}
return []sdk.AccAddress{creator}

Check warning on line 142 in x/crosschain/types/legacy_msgs.go

View check run for this annotation

Codecov / codecov/patch

x/crosschain/types/legacy_msgs.go#L142

Added line #L142 was not covered by tests
}

func (msg *MsgRemoveFromOutTxTracker) GetSignBytes() []byte {
bz := ModuleCdc.MustMarshalJSON(msg)
return sdk.MustSortJSON(bz)

Check warning on line 147 in x/crosschain/types/legacy_msgs.go

View check run for this annotation

Codecov / codecov/patch

x/crosschain/types/legacy_msgs.go#L145-L147

Added lines #L145 - L147 were not covered by tests
}

func (msg *MsgRemoveFromOutTxTracker) ValidateBasic() error {
return nil

Check warning on line 151 in x/crosschain/types/legacy_msgs.go

View check run for this annotation

Codecov / codecov/patch

x/crosschain/types/legacy_msgs.go#L150-L151

Added lines #L150 - L151 were not covered by tests
}

0 comments on commit 38bc5fc

Please sign in to comment.