github.com/Finschia/finschia-sdk@v0.49.1/x/fbridge/types/msgs.go (about)

     1  package types
     2  
     3  import sdk "github.com/Finschia/finschia-sdk/types"
     4  
     5  var (
     6  	_ sdk.Msg = &MsgUpdateParams{}
     7  	_ sdk.Msg = &MsgTransfer{}
     8  	_ sdk.Msg = &MsgProvision{}
     9  	_ sdk.Msg = &MsgHoldTransfer{}
    10  	_ sdk.Msg = &MsgReleaseTransfer{}
    11  	_ sdk.Msg = &MsgRemoveProvision{}
    12  	_ sdk.Msg = &MsgClaimBatch{}
    13  	_ sdk.Msg = &MsgClaim{}
    14  	_ sdk.Msg = &MsgSuggestRole{}
    15  	_ sdk.Msg = &MsgAddVoteForRole{}
    16  	_ sdk.Msg = &MsgSetBridgeStatus{}
    17  )
    18  
    19  func (m MsgUpdateParams) ValidateBasic() error { return nil }
    20  
    21  func (m MsgUpdateParams) GetSigners() []sdk.AccAddress {
    22  	return []sdk.AccAddress{sdk.MustAccAddressFromBech32(m.Authority)}
    23  }
    24  
    25  func (m MsgUpdateParams) GetSignBytes() []byte {
    26  	return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m))
    27  }
    28  
    29  // Type implements the LegacyMsg.Type method.
    30  func (m MsgUpdateParams) Type() string {
    31  	return sdk.MsgTypeURL(&m)
    32  }
    33  
    34  // Route implements the LegacyMsg.Route method.
    35  func (m MsgUpdateParams) Route() string {
    36  	return RouterKey
    37  }
    38  
    39  func (m MsgTransfer) ValidateBasic() error { return nil }
    40  
    41  func (m MsgTransfer) GetSigners() []sdk.AccAddress {
    42  	return []sdk.AccAddress{sdk.MustAccAddressFromBech32(m.Sender)}
    43  }
    44  
    45  // GetSignBytes implements the LegacyMsg.GetSignBytes method.
    46  func (m MsgTransfer) GetSignBytes() []byte {
    47  	return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m))
    48  }
    49  
    50  // Type implements the LegacyMsg.Type method.
    51  func (m MsgTransfer) Type() string {
    52  	return sdk.MsgTypeURL(&m)
    53  }
    54  
    55  // Route implements the LegacyMsg.Route method.
    56  func (m MsgTransfer) Route() string {
    57  	return RouterKey
    58  }
    59  
    60  func (m MsgProvision) ValidateBasic() error { return nil }
    61  
    62  func (m MsgProvision) GetSigners() []sdk.AccAddress {
    63  	return []sdk.AccAddress{sdk.MustAccAddressFromBech32(m.From)}
    64  }
    65  
    66  // GetSignBytes implements the LegacyMsg.GetSignBytes method.
    67  func (m MsgProvision) GetSignBytes() []byte {
    68  	return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m))
    69  }
    70  
    71  // Type implements the LegacyMsg.Type method.
    72  func (m MsgProvision) Type() string {
    73  	return sdk.MsgTypeURL(&m)
    74  }
    75  
    76  // Route implements the LegacyMsg.Route method.
    77  func (m MsgProvision) Route() string {
    78  	return RouterKey
    79  }
    80  
    81  func (m MsgHoldTransfer) ValidateBasic() error { return nil }
    82  
    83  func (m MsgHoldTransfer) GetSigners() []sdk.AccAddress {
    84  	return []sdk.AccAddress{sdk.MustAccAddressFromBech32(m.From)}
    85  }
    86  
    87  // GetSignBytes implements the LegacyMsg.GetSignBytes method.
    88  func (m MsgHoldTransfer) GetSignBytes() []byte {
    89  	return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m))
    90  }
    91  
    92  // Type implements the LegacyMsg.Type method.
    93  func (m MsgHoldTransfer) Type() string {
    94  	return sdk.MsgTypeURL(&m)
    95  }
    96  
    97  // Route implements the LegacyMsg.Route method.
    98  func (m MsgHoldTransfer) Route() string {
    99  	return RouterKey
   100  }
   101  
   102  func (m MsgReleaseTransfer) ValidateBasic() error { return nil }
   103  
   104  func (m MsgReleaseTransfer) GetSigners() []sdk.AccAddress {
   105  	return []sdk.AccAddress{sdk.MustAccAddressFromBech32(m.From)}
   106  }
   107  
   108  // GetSignBytes implements the LegacyMsg.GetSignBytes method.
   109  func (m MsgReleaseTransfer) GetSignBytes() []byte {
   110  	return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m))
   111  }
   112  
   113  // Type implements the LegacyMsg.Type method.
   114  func (m MsgReleaseTransfer) Type() string {
   115  	return sdk.MsgTypeURL(&m)
   116  }
   117  
   118  // Route implements the LegacyMsg.Route method.
   119  func (m MsgReleaseTransfer) Route() string {
   120  	return RouterKey
   121  }
   122  
   123  func (m MsgRemoveProvision) ValidateBasic() error { return nil }
   124  
   125  func (m MsgRemoveProvision) GetSigners() []sdk.AccAddress {
   126  	return []sdk.AccAddress{sdk.MustAccAddressFromBech32(m.From)}
   127  }
   128  
   129  // GetSignBytes implements the LegacyMsg.GetSignBytes method.
   130  func (m MsgRemoveProvision) GetSignBytes() []byte {
   131  	return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m))
   132  }
   133  
   134  // Type implements the LegacyMsg.Type method.
   135  func (m MsgRemoveProvision) Type() string {
   136  	return sdk.MsgTypeURL(&m)
   137  }
   138  
   139  // Route implements the LegacyMsg.Route method.
   140  func (m MsgRemoveProvision) Route() string {
   141  	return RouterKey
   142  }
   143  
   144  func (m MsgClaimBatch) ValidateBasic() error { return nil }
   145  
   146  func (m MsgClaimBatch) GetSigners() []sdk.AccAddress {
   147  	return []sdk.AccAddress{sdk.MustAccAddressFromBech32(m.From)}
   148  }
   149  
   150  // GetSignBytes implements the LegacyMsg.GetSignBytes method.
   151  func (m MsgClaimBatch) GetSignBytes() []byte {
   152  	return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m))
   153  }
   154  
   155  // Type implements the LegacyMsg.Type method.
   156  func (m MsgClaimBatch) Type() string {
   157  	return sdk.MsgTypeURL(&m)
   158  }
   159  
   160  // Route implements the LegacyMsg.Route method.
   161  func (m MsgClaimBatch) Route() string {
   162  	return RouterKey
   163  }
   164  
   165  func (m MsgClaim) ValidateBasic() error { return nil }
   166  
   167  func (m MsgClaim) GetSigners() []sdk.AccAddress {
   168  	return []sdk.AccAddress{sdk.MustAccAddressFromBech32(m.From)}
   169  }
   170  
   171  // GetSignBytes implements the LegacyMsg.GetSignBytes method.
   172  func (m MsgClaim) GetSignBytes() []byte {
   173  	return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m))
   174  }
   175  
   176  // Type implements the LegacyMsg.Type method.
   177  func (m MsgClaim) Type() string {
   178  	return sdk.MsgTypeURL(&m)
   179  }
   180  
   181  // Route implements the LegacyMsg.Route method.
   182  func (m MsgClaim) Route() string {
   183  	return RouterKey
   184  }
   185  
   186  func (m MsgSuggestRole) ValidateBasic() error { return nil }
   187  
   188  func (m MsgSuggestRole) GetSigners() []sdk.AccAddress {
   189  	return []sdk.AccAddress{sdk.MustAccAddressFromBech32(m.From)}
   190  }
   191  
   192  // GetSignBytes implements the LegacyMsg.GetSignBytes method.
   193  func (m MsgSuggestRole) GetSignBytes() []byte {
   194  	return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m))
   195  }
   196  
   197  // Type implements the LegacyMsg.Type method.
   198  func (m MsgSuggestRole) Type() string {
   199  	return sdk.MsgTypeURL(&m)
   200  }
   201  
   202  // Route implements the LegacyMsg.Route method.
   203  func (m MsgSuggestRole) Route() string {
   204  	return RouterKey
   205  }
   206  
   207  func (m MsgAddVoteForRole) ValidateBasic() error { return nil }
   208  
   209  func (m MsgAddVoteForRole) GetSigners() []sdk.AccAddress {
   210  	return []sdk.AccAddress{sdk.MustAccAddressFromBech32(m.From)}
   211  }
   212  
   213  // GetSignBytes implements the LegacyMsg.GetSignBytes method.
   214  func (m MsgAddVoteForRole) GetSignBytes() []byte {
   215  	return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m))
   216  }
   217  
   218  // Type implements the LegacyMsg.Type method.
   219  func (m MsgAddVoteForRole) Type() string {
   220  	return sdk.MsgTypeURL(&m)
   221  }
   222  
   223  // Route implements the LegacyMsg.Route method.
   224  func (m MsgAddVoteForRole) Route() string {
   225  	return RouterKey
   226  }
   227  
   228  func (m MsgSetBridgeStatus) ValidateBasic() error { return nil }
   229  
   230  func (m MsgSetBridgeStatus) GetSigners() []sdk.AccAddress {
   231  	return []sdk.AccAddress{sdk.MustAccAddressFromBech32(m.Guardian)}
   232  }
   233  
   234  // GetSignBytes implements the LegacyMsg.GetSignBytes method.
   235  func (m MsgSetBridgeStatus) GetSignBytes() []byte {
   236  	return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m))
   237  }
   238  
   239  // Type implements the LegacyMsg.Type method.
   240  func (m MsgSetBridgeStatus) Type() string {
   241  	return sdk.MsgTypeURL(&m)
   242  }
   243  
   244  // Route implements the LegacyMsg.Route method.
   245  func (m MsgSetBridgeStatus) Route() string {
   246  	return RouterKey
   247  }