Skip to content
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

fix: register fee market interfaces in codec #8

Merged
merged 36 commits into from
Nov 10, 2023
Merged
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions x/feemarket/types/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,18 @@ import (
"github.com/cosmos/cosmos-sdk/codec/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/msgservice"

"github.com/skip-mev/feemarket/x/feemarket/interfaces"
"github.com/skip-mev/feemarket/x/feemarket/plugins/defaultmarket"
)

// RegisterLegacyAminoCodec registers the necessary x/feemarket interfaces (messages) on the
// provided LegacyAmino codec.
func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {
legacy.RegisterAminoMsg(cdc, &MsgParams{}, "feemarket/MsgParams")

cdc.RegisterInterface((*interfaces.FeeMarketImplementation)(nil), nil)
cdc.RegisterConcrete(&defaultmarket.DefaultMarket{}, "feemarket/DefaultMarket", nil)
}

// RegisterInterfaces registers the x/feemarket interfaces (messages + msg server) on the
Expand All @@ -21,5 +27,11 @@ func RegisterInterfaces(registry types.InterfaceRegistry) {
&MsgParams{},
)

registry.RegisterInterface(
"feemarket.feemarket.v1.FeeMarketImplementation",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this just be x/feemarket/interfaces/FeeMarketImplementation? there is no proto for this anymore

(*interfaces.FeeMarketImplementation)(nil),
&defaultmarket.DefaultMarket{},
)

msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc)
}