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: withdrawal cli for rewards #352

Merged
merged 6 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
4 changes: 4 additions & 0 deletions x/incentive/client/cli/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@ package cli

import (
"fmt"

sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/spf13/cobra"

"github.com/babylonlabs-io/babylon/x/incentive/types"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/client/tx"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
)

// GetTxCmd returns the transaction commands for this module
Expand Down Expand Up @@ -65,6 +67,8 @@ func NewSetWithdrawAddressCmd() *cobra.Command {
return err
}

clientCtx = clientCtx.WithAccountRetriever(authtypes.AccountRetriever{})
samricotta marked this conversation as resolved.
Show resolved Hide resolved

delAddr := clientCtx.GetFromAddress()
withdrawAddr, err := sdk.AccAddressFromBech32(args[0])
if err != nil {
Expand Down
5 changes: 5 additions & 0 deletions x/incentive/types/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,14 @@ func RegisterInterfaces(registry cdctypes.InterfaceRegistry) {
(*sdk.Msg)(nil),
&MsgWithdrawReward{},
&MsgUpdateParams{},
&MsgSetWithdrawAddress{},
)

msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc)

registry.RegisterImplementations((*sdk.Msg)(nil),
&MsgWithdrawReward{},
)
samricotta marked this conversation as resolved.
Show resolved Hide resolved
}

var (
Expand Down
Loading