Skip to content

Commit

Permalink
add missing codec
Browse files Browse the repository at this point in the history
  • Loading branch information
beer-1 committed Sep 3, 2024
1 parent 02f7334 commit 245cd3d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 0 additions & 1 deletion x/opchild/keeper/oracle.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ func (k L2OracleHandler) UpdateOracle(ctx context.Context, height uint64, extCom
return err
}

//nolint:gosec
h := int64(height)
if hostStoreLastHeight > h {
return types.ErrInvalidOracleHeight
Expand Down
4 changes: 4 additions & 0 deletions x/opchild/types/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {
legacy.RegisterAminoMsg(cdc, &MsgFinalizeTokenDeposit{}, "opchild/MsgFinalizeTokenDeposit")
legacy.RegisterAminoMsg(cdc, &MsgInitiateTokenWithdrawal{}, "opchild/MsgInitiateTokenWithdrawal")
legacy.RegisterAminoMsg(cdc, &MsgUpdateOracle{}, "opchild/MsgUpdateOracle")
legacy.RegisterAminoMsg(cdc, &MsgSetBridgeInfo{}, "opchild/MsgSetBridgeInfo")
legacy.RegisterAminoMsg(cdc, &MsgSpendFeePool{}, "opchild/MsgSpendFeePool")

cdc.RegisterConcrete(Params{}, "opchild/Params", nil)
}
Expand All @@ -32,6 +34,8 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) {
&MsgFinalizeTokenDeposit{},
&MsgInitiateTokenWithdrawal{},
&MsgUpdateOracle{},
&MsgSetBridgeInfo{},
&MsgSpendFeePool{},
)

msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc)
Expand Down
2 changes: 2 additions & 0 deletions x/ophost/types/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {
legacy.RegisterAminoMsg(cdc, &MsgUpdateChallengers{}, "ophost/MsgUpdateChallengers")
legacy.RegisterAminoMsg(cdc, &MsgUpdateBatchInfo{}, "ophost/MsgUpdateBatchInfo")
legacy.RegisterAminoMsg(cdc, &MsgUpdateParams{}, "ophost/MsgUpdateParams")
legacy.RegisterAminoMsg(cdc, &MsgUpdateMetadata{}, "ophost/MsgUpdateMetadata")

Check warning on line 24 in x/ophost/types/codec.go

View check run for this annotation

Codecov / codecov/patch

x/ophost/types/codec.go#L24

Added line #L24 was not covered by tests

cdc.RegisterConcrete(Params{}, "ophost/Params", nil)
cdc.RegisterConcrete(&BridgeAccount{}, "ophost/BridgeAccount", nil)
Expand All @@ -39,6 +40,7 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) {
&MsgUpdateChallengers{},
&MsgUpdateBatchInfo{},
&MsgUpdateParams{},
&MsgUpdateMetadata{},

Check warning on line 43 in x/ophost/types/codec.go

View check run for this annotation

Codecov / codecov/patch

x/ophost/types/codec.go#L43

Added line #L43 was not covered by tests
)

// auth account registration
Expand Down

0 comments on commit 245cd3d

Please sign in to comment.