mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-11-13 03:25:20 +00:00
18 lines
395 B
Go
18 lines
395 B
Go
|
package kavadist
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
|
||
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||
|
)
|
||
|
|
||
|
// NewHandler creates an sdk.Handler for kavadist messages
|
||
|
func NewHandler(k Keeper) sdk.Handler {
|
||
|
return func(ctx sdk.Context, msg sdk.Msg) sdk.Result {
|
||
|
switch msg := msg.(type) {
|
||
|
default:
|
||
|
errMsg := fmt.Sprintf("unrecognized cdp msg type: %T", msg)
|
||
|
return sdk.ErrUnknownRequest(errMsg).Result()
|
||
|
}
|
||
|
}
|
||
|
}
|