Skip to content

Commit

Permalink
update for wasmbinding permission check
Browse files Browse the repository at this point in the history
  • Loading branch information
jelysn committed Dec 1, 2023
1 parent 155cc14 commit 91ff5cf
Show file tree
Hide file tree
Showing 29 changed files with 129 additions and 60 deletions.
10 changes: 5 additions & 5 deletions wasmbindings/client/register_custom_plugins.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,19 +79,19 @@ func RegisterCustomPlugins(
clockMessenger := clockclientwasm.NewMessenger(clock)

commitmentQuerier := commitmentclientwasm.NewQuerier(commitment, staking, epochs)
commitmentMessenger := commitmentclientwasm.NewMessenger(commitment, staking, assetprofile, stablestake)
commitmentMessenger := commitmentclientwasm.NewMessenger(commitment, staking, assetprofile, stablestake, parameter)

epochsQuerier := epochsclientwasm.NewQuerier(epochs)
epochsMessenger := epochsclientwasm.NewMessenger(epochs)

incentiveQuerier := incentiveclientwasm.NewQuerier(incentive, staking)
incentiveMessenger := incentiveclientwasm.NewMessenger(incentive, staking, commitment)
incentiveMessenger := incentiveclientwasm.NewMessenger(incentive, staking, commitment, parameter)

leveragelpQuerier := leveragelpclientwasm.NewQuerier(leveragelp)
leveragelpMessenger := leveragelpclientwasm.NewMessenger(leveragelp)
leveragelpMessenger := leveragelpclientwasm.NewMessenger(leveragelp, parameter)

marginQuerier := marginclientwasm.NewQuerier(margin)
marginMessenger := marginclientwasm.NewMessenger(margin)
marginMessenger := marginclientwasm.NewMessenger(margin, parameter)

oracleQuerier := oracleclientwasm.NewQuerier(oracle)
oracleMessenger := oracleclientwasm.NewMessenger(oracle)
Expand All @@ -100,7 +100,7 @@ func RegisterCustomPlugins(
parameterMessenger := parameterclientwasm.NewMessenger(parameter)

stablestakeQuerier := stablestakeclientwasm.NewQuerier(stablestake)
stablestakeMessenger := stablestakeclientwasm.NewMessenger(stablestake)
stablestakeMessenger := stablestakeclientwasm.NewMessenger(stablestake, parameter)

tokenomicsQuerier := tokenomicsclientwasm.NewQuerier(tokenomics)
tokenomicsMessenger := tokenomicsclientwasm.NewMessenger(tokenomics)
Expand Down
2 changes: 1 addition & 1 deletion wasmbindings/externals/auth/query_accounts.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
)

func (oq *Querier) queryAccounts(ctx sdk.Context, req *types.QueryAccountsRequest) ([]byte, error) {
res, err := oq.keeper.Accounts(ctx, req)
res, err := oq.keeper.Accounts(sdk.WrapSDKContext(ctx), req)
if err != nil {
return nil, errorsmod.Wrap(err, "failed to get accounts")
}
Expand Down
21 changes: 12 additions & 9 deletions x/commitment/client/wasm/messenger.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,26 @@ import (
wasmbindingstypes "github.com/elys-network/elys/wasmbindings/types"
apKeeper "github.com/elys-network/elys/x/assetprofile/keeper"
"github.com/elys-network/elys/x/commitment/keeper"
parameterkeeper "github.com/elys-network/elys/x/parameter/keeper"
stableKeeper "github.com/elys-network/elys/x/stablestake/keeper"
)

// Messenger handles messages for the Commitment module.
type Messenger struct {
keeper *keeper.Keeper
stakingKeeper *stakingkeeper.Keeper
apKeeper *apKeeper.Keeper
stableKeeper *stableKeeper.Keeper
keeper *keeper.Keeper
stakingKeeper *stakingkeeper.Keeper
apKeeper *apKeeper.Keeper
stableKeeper *stableKeeper.Keeper
parameterKeeper *parameterkeeper.Keeper
}

func NewMessenger(keeper *keeper.Keeper, stakingKeeper *stakingkeeper.Keeper, apKeeper *apKeeper.Keeper, stableKeeper *stableKeeper.Keeper) *Messenger {
func NewMessenger(keeper *keeper.Keeper, stakingKeeper *stakingkeeper.Keeper, apKeeper *apKeeper.Keeper, stableKeeper *stableKeeper.Keeper, parameterKeeper *parameterkeeper.Keeper) *Messenger {
return &Messenger{
keeper: keeper,
stakingKeeper: stakingKeeper,
apKeeper: apKeeper,
stableKeeper: stableKeeper,
keeper: keeper,
stakingKeeper: stakingKeeper,
apKeeper: apKeeper,
stableKeeper: stableKeeper,
parameterKeeper: parameterKeeper,
}
}

Expand Down
5 changes: 3 additions & 2 deletions x/commitment/client/wasm/msg_cancel_vest.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ func (m *Messenger) msgCancelVest(ctx sdk.Context, contractAddr sdk.AccAddress,
return nil, nil, wasmvmtypes.InvalidRequest{Err: "cancel vest null msg"}
}

if msgCancelVest.Creator != contractAddr.String() {
brokerAddress := m.parameterKeeper.GetParams(ctx).BrokerAddress
if msgCancelVest.Creator != contractAddr.String() && contractAddr.String() != brokerAddress {
return nil, nil, wasmvmtypes.InvalidRequest{Err: "cancel vest wrong sender"}
}

Expand Down Expand Up @@ -54,7 +55,7 @@ func performMsgCancelVestEden(f *commitmentkeeper.Keeper, ctx sdk.Context, contr
return nil, errorsmod.Wrap(err, "failed validating msgMsgCancelVest")
}

_, err := msgServer.CancelVest(ctx, msgMsgCancelVest) // Discard the response because it's empty
_, err := msgServer.CancelVest(sdk.WrapSDKContext(ctx), msgMsgCancelVest) // Discard the response because it's empty
if err != nil {
return nil, errorsmod.Wrap(err, "eden vesting msg")
}
Expand Down
3 changes: 2 additions & 1 deletion x/commitment/client/wasm/msg_commit_liquid_tokens.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ func (m *Messenger) msgCommitLiquidTokens(ctx sdk.Context, contractAddr sdk.AccA
return nil, nil, wasmvmtypes.InvalidRequest{Err: "CommitLiquidTokens null msg"}
}

if msg.Creator != contractAddr.String() {
brokerAddress := m.parameterKeeper.GetParams(ctx).BrokerAddress
if msg.Creator != contractAddr.String() && contractAddr.String() != brokerAddress {
return nil, nil, wasmvmtypes.InvalidRequest{Err: "commit liquid tokens wrong sender"}
}

Expand Down
3 changes: 2 additions & 1 deletion x/commitment/client/wasm/msg_commit_unclaimed_rewards.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ func (m *Messenger) msgCommitClaimedRewards(ctx sdk.Context, contractAddr sdk.Ac
return nil, nil, wasmvmtypes.InvalidRequest{Err: "CommitUnclaimedRewards null msg"}
}

if msg.Creator != contractAddr.String() {
brokerAddress := m.parameterKeeper.GetParams(ctx).BrokerAddress
if msg.Creator != contractAddr.String() && contractAddr.String() != brokerAddress {
return nil, nil, wasmvmtypes.InvalidRequest{Err: "commit unclaimed rewards wrong sender"}
}

Expand Down
7 changes: 4 additions & 3 deletions x/commitment/client/wasm/msg_stake.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ func (m *Messenger) msgStake(ctx sdk.Context, contractAddr sdk.AccAddress, msgSt
return nil, nil, wasmvmtypes.InvalidRequest{Err: "Invalid staking parameter"}
}

if msgStake.Creator != contractAddr.String() {
brokerAddress := m.parameterKeeper.GetParams(ctx).BrokerAddress
if msgStake.Creator != contractAddr.String() && contractAddr.String() != brokerAddress {
return nil, nil, wasmvmtypes.InvalidRequest{Err: "stake wrong sender"}
}

Expand All @@ -39,7 +40,7 @@ func (m *Messenger) msgStake(ctx sdk.Context, contractAddr sdk.AccAddress, msgSt
return nil, nil, errorsmod.Wrap(err, "failed validating msgMsgBond")
}

_, err = msgServer.Bond(ctx, msgMsgBond)
_, err = msgServer.Bond(sdk.WrapSDKContext(ctx), msgMsgBond)
if err != nil { // Discard the response because it's empty
return nil, nil, errorsmod.Wrap(err, "usdc staking msg")
}
Expand All @@ -56,7 +57,7 @@ func (m *Messenger) msgStake(ctx sdk.Context, contractAddr sdk.AccAddress, msgSt
return nil, nil, errorsmod.Wrap(err, "failed validating msgMsgStake")
}

res, err = msgServer.Stake(ctx, msgMsgStake)
res, err = msgServer.Stake(sdk.WrapSDKContext(ctx), msgMsgStake)
if err != nil { // Discard the response because it's empty
return nil, nil, errorsmod.Wrap(err, "elys staking msg")
}
Expand Down
3 changes: 2 additions & 1 deletion x/commitment/client/wasm/msg_uncommit_tokens.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ func (m *Messenger) msgUncommitTokens(ctx sdk.Context, contractAddr sdk.AccAddre
return nil, nil, wasmvmtypes.InvalidRequest{Err: "UncommitTokens null msg"}
}

if msg.Creator != contractAddr.String() {
brokerAddress := m.parameterKeeper.GetParams(ctx).BrokerAddress
if msg.Creator != contractAddr.String() && contractAddr.String() != brokerAddress {
return nil, nil, wasmvmtypes.InvalidRequest{Err: "uncommit tokens wrong sender"}
}

Expand Down
7 changes: 4 additions & 3 deletions x/commitment/client/wasm/msg_unstake.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ func (m *Messenger) msgUnstake(ctx sdk.Context, contractAddr sdk.AccAddress, msg
return nil, nil, wasmvmtypes.InvalidRequest{Err: "Invalid unstaking parameter"}
}

if msgUnstake.Creator != contractAddr.String() {
brokerAddress := m.parameterKeeper.GetParams(ctx).BrokerAddress
if msgUnstake.Creator != contractAddr.String() && contractAddr.String() != brokerAddress {
return nil, nil, wasmvmtypes.InvalidRequest{Err: "unstake wrong sender"}
}

Expand All @@ -39,7 +40,7 @@ func (m *Messenger) msgUnstake(ctx sdk.Context, contractAddr sdk.AccAddress, msg
return nil, nil, errorsmod.Wrap(err, "failed validating msgMsgBond")
}

_, err = msgServer.Unbond(ctx, msgMsgUnBond)
_, err = msgServer.Unbond(sdk.WrapSDKContext(ctx), msgMsgUnBond)
if err != nil { // Discard the response because it's empty
return nil, nil, errorsmod.Wrap(err, "usdc unstaking msg")
}
Expand All @@ -55,7 +56,7 @@ func (m *Messenger) msgUnstake(ctx sdk.Context, contractAddr sdk.AccAddress, msg
return nil, nil, errorsmod.Wrap(err, "failed validating msgMsgUnstake")
}

res, err = msgServer.Unstake(ctx, msgMsgUnstake)
res, err = msgServer.Unstake(sdk.WrapSDKContext(ctx), msgMsgUnstake)
if err != nil { // Discard the response because it's empty
return nil, nil, errorsmod.Wrap(err, "elys unstaking msg")
}
Expand Down
3 changes: 2 additions & 1 deletion x/commitment/client/wasm/msg_update_vesting_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ func (m *Messenger) msgUpdateVestingInfo(ctx sdk.Context, contractAddr sdk.AccAd
return nil, nil, wasmvmtypes.InvalidRequest{Err: "UpdateVestingInfo null msg"}
}

if msg.Authority != contractAddr.String() {
brokerAddress := m.parameterKeeper.GetParams(ctx).BrokerAddress
if msg.Authority != contractAddr.String() && contractAddr.String() != brokerAddress {
return nil, nil, wasmvmtypes.InvalidRequest{Err: "update vesting info wrong sender"}
}

Expand Down
5 changes: 3 additions & 2 deletions x/commitment/client/wasm/msg_vest.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ func (m *Messenger) msgVest(ctx sdk.Context, contractAddr sdk.AccAddress, msgVes
return nil, nil, wasmvmtypes.InvalidRequest{Err: "Vest null msg"}
}

if msgVest.Creator != contractAddr.String() {
brokerAddress := m.parameterKeeper.GetParams(ctx).BrokerAddress
if msgVest.Creator != contractAddr.String() && contractAddr.String() != brokerAddress {
return nil, nil, wasmvmtypes.InvalidRequest{Err: "vest wrong sender"}
}

Expand Down Expand Up @@ -54,7 +55,7 @@ func performMsgVestEden(f *commitmentkeeper.Keeper, ctx sdk.Context, contractAdd
return nil, errorsmod.Wrap(err, "failed validating msgVest")
}

_, err := msgServer.Vest(ctx, msgMsgVest) // Discard the response because it's empty
_, err := msgServer.Vest(sdk.WrapSDKContext(ctx), msgMsgVest) // Discard the response because it's empty
if err != nil {
return nil, errorsmod.Wrap(err, "eden vesting msg")
}
Expand Down
3 changes: 2 additions & 1 deletion x/commitment/client/wasm/msg_vest_now.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ func (m *Messenger) msgVestNow(ctx sdk.Context, contractAddr sdk.AccAddress, msg
return nil, nil, wasmvmtypes.InvalidRequest{Err: "VestNow null msg"}
}

if msg.Creator != contractAddr.String() {
brokerAddress := m.parameterKeeper.GetParams(ctx).BrokerAddress
if msg.Creator != contractAddr.String() && contractAddr.String() != brokerAddress {
return nil, nil, wasmvmtypes.InvalidRequest{Err: "vest now wrong sender"}
}

Expand Down
2 changes: 1 addition & 1 deletion x/commitment/client/wasm/query_params.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
)

func (oq *Querier) queryParams(ctx sdk.Context, req *types.QueryParamsRequest) ([]byte, error) {
res, err := oq.keeper.Params(ctx, req)
res, err := oq.keeper.Params(sdk.WrapSDKContext(ctx), req)
if err != nil {
return nil, errorsmod.Wrap(err, "failed to get params")
}
Expand Down
9 changes: 8 additions & 1 deletion x/incentive/client/wasm/messenger.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,23 @@ import (
wasmbindingstypes "github.com/elys-network/elys/wasmbindings/types"
commitmentkeeper "github.com/elys-network/elys/x/commitment/keeper"
"github.com/elys-network/elys/x/incentive/keeper"
parameterkeeper "github.com/elys-network/elys/x/parameter/keeper"
)

// Messenger handles messages for the Incentive module.
type Messenger struct {
keeper *keeper.Keeper
stakingKeeper *stakingkeeper.Keeper
commitmentKeeper *commitmentkeeper.Keeper
parameterKeeper *parameterkeeper.Keeper
}

func NewMessenger(keeper *keeper.Keeper, stakingKeeper *stakingkeeper.Keeper, commitmentKeeper *commitmentkeeper.Keeper) *Messenger {
func NewMessenger(
keeper *keeper.Keeper,
stakingKeeper *stakingkeeper.Keeper,
commitmentKeeper *commitmentkeeper.Keeper,
parameterKeeper *parameterkeeper.Keeper,
) *Messenger {
return &Messenger{
keeper: keeper,
stakingKeeper: stakingKeeper,
Expand Down
8 changes: 7 additions & 1 deletion x/incentive/client/wasm/msg_begin_redelegate.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ import (
func (m *Messenger) msgBeginRedelegate(ctx sdk.Context, contractAddr sdk.AccAddress, msgRedelegate *stakingtypes.MsgBeginRedelegate) ([]sdk.Event, [][]byte, error) {
var res *wasmbindingstypes.RequestResponse
var err error

brokerAddress := m.parameterKeeper.GetParams(ctx).BrokerAddress
if msgRedelegate.DelegatorAddress != contractAddr.String() && contractAddr.String() != brokerAddress {
return nil, nil, wasmvmtypes.InvalidRequest{Err: "wrong sender"}
}

if msgRedelegate.Amount.Denom != paramtypes.Elys {
return nil, nil, errorsmod.Wrap(err, "invalid asset!")
}
Expand Down Expand Up @@ -61,7 +67,7 @@ func performMsgRedelegateElys(f *stakingkeeper.Keeper, ctx sdk.Context, contract
return nil, errorsmod.Wrap(err, "failed validating msgMsgDelegate")
}

_, err = msgServer.BeginRedelegate(ctx, msgMsgRedelegate) // Discard the response because it's empty
_, err = msgServer.BeginRedelegate(sdk.WrapSDKContext(ctx), msgMsgRedelegate) // Discard the response because it's empty
if err != nil {
return nil, errorsmod.Wrap(err, "elys redelegation msg")
}
Expand Down
8 changes: 7 additions & 1 deletion x/incentive/client/wasm/msg_cancel_unbonding_delegation.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ import (
func (m *Messenger) msgCancelUnbondingDelegation(ctx sdk.Context, contractAddr sdk.AccAddress, msgCancelUnbonding *stakingtypes.MsgCancelUnbondingDelegation) ([]sdk.Event, [][]byte, error) {
var res *wasmbindingstypes.RequestResponse
var err error

brokerAddress := m.parameterKeeper.GetParams(ctx).BrokerAddress
if msgCancelUnbonding.DelegatorAddress != contractAddr.String() && contractAddr.String() != brokerAddress {
return nil, nil, wasmvmtypes.InvalidRequest{Err: "wrong sender"}
}

if msgCancelUnbonding.Amount.Denom != paramtypes.Elys {
return nil, nil, errorsmod.Wrap(err, "invalid asset!")
}
Expand Down Expand Up @@ -56,7 +62,7 @@ func performMsgCancelUnbondingElys(f *stakingkeeper.Keeper, ctx sdk.Context, con
return nil, errorsmod.Wrap(err, "failed validating msgCancelUnbonding")
}

_, err = msgServer.CancelUnbondingDelegation(ctx, msgMsgCancelUnbonding)
_, err = msgServer.CancelUnbondingDelegation(sdk.WrapSDKContext(ctx), msgMsgCancelUnbonding)
if err != nil {
return nil, errorsmod.Wrap(err, "elys cancel bonding msg")
}
Expand Down
7 changes: 6 additions & 1 deletion x/incentive/client/wasm/msg_withdraw_rewards.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ func (m *Messenger) msgWithdrawRewards(ctx sdk.Context, contractAddr sdk.AccAddr
var res *wasmbindingstypes.RequestResponse
var err error

brokerAddress := m.parameterKeeper.GetParams(ctx).BrokerAddress
if msgWithdrawRewards.DelegatorAddress != contractAddr.String() && contractAddr.String() != brokerAddress {
return nil, nil, wasmvmtypes.InvalidRequest{Err: "wrong sender"}
}

res, err = performMsgWithdrawRewards(m.keeper, ctx, contractAddr, msgWithdrawRewards)
if err != nil {
return nil, nil, errorsmod.Wrap(err, "perform withdraw rewards")
Expand Down Expand Up @@ -48,7 +53,7 @@ func performMsgWithdrawRewards(f *incentivekeeper.Keeper, ctx sdk.Context, contr
return nil, errorsmod.Wrap(err, "failed validating msgMsgWithdrawRewards")
}

_, err = msgServer.WithdrawRewards(ctx, msgMsgWithdrawRewards) // Discard the response because it's empty
_, err = msgServer.WithdrawRewards(sdk.WrapSDKContext(ctx), msgMsgWithdrawRewards) // Discard the response because it's empty
if err != nil {
return nil, errorsmod.Wrap(err, "withdraw rewards msg")
}
Expand Down
7 changes: 6 additions & 1 deletion x/incentive/client/wasm/msg_withdraw_validator_commission.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ func (m *Messenger) msgWithdrawValidatorCommission(ctx sdk.Context, contractAddr
var res *wasmbindingstypes.RequestResponse
var err error

brokerAddress := m.parameterKeeper.GetParams(ctx).BrokerAddress
if msgWithdrawValidatorCommission.DelegatorAddress != contractAddr.String() && contractAddr.String() != brokerAddress {
return nil, nil, wasmvmtypes.InvalidRequest{Err: "wrong sender"}
}

res, err = performMsgWithdrawValidatorCommissions(m.keeper, ctx, contractAddr, msgWithdrawValidatorCommission)
if err != nil {
return nil, nil, errorsmod.Wrap(err, "perform withdraw validator commission")
Expand Down Expand Up @@ -53,7 +58,7 @@ func performMsgWithdrawValidatorCommissions(f *incentivekeeper.Keeper, ctx sdk.C
return nil, errorsmod.Wrap(err, "failed validating msgWithdrawValidatorCommission")
}

_, err = msgServer.WithdrawValidatorCommission(ctx, msgMsgWithdrawValidatorCommissions) // Discard the response because it's empty
_, err = msgServer.WithdrawValidatorCommission(sdk.WrapSDKContext(ctx), msgMsgWithdrawValidatorCommissions) // Discard the response because it's empty
if err != nil {
return nil, errorsmod.Wrap(err, "withdraw validator commission msg")
}
Expand Down
14 changes: 11 additions & 3 deletions x/leveragelp/client/wasm/messenger.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,23 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
wasmbindingstypes "github.com/elys-network/elys/wasmbindings/types"
"github.com/elys-network/elys/x/leveragelp/keeper"
parameterkeeper "github.com/elys-network/elys/x/parameter/keeper"
)

// Messenger handles messages for the Leverage LP module.
type Messenger struct {
keeper *keeper.Keeper
keeper *keeper.Keeper
parameterKeeper *parameterkeeper.Keeper
}

func NewMessenger(keeper *keeper.Keeper) *Messenger {
return &Messenger{keeper: keeper}
func NewMessenger(
keeper *keeper.Keeper,
parameterKeeper *parameterkeeper.Keeper,
) *Messenger {
return &Messenger{
keeper: keeper,
parameterKeeper: parameterKeeper,
}
}

func (m *Messenger) HandleMsg(ctx sdk.Context, contractAddr sdk.AccAddress, contractIBCPortID string, msg wasmbindingstypes.ElysMsg) ([]sdk.Event, [][]byte, error) {
Expand Down
5 changes: 3 additions & 2 deletions x/leveragelp/client/wasm/msg_close.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ func (m *Messenger) msgClose(ctx sdk.Context, contractAddr sdk.AccAddress, msgCl
return nil, nil, wasmvmtypes.InvalidRequest{Err: "Close null msg"}
}

if msgClose.Creator != contractAddr.String() {
brokerAddress := m.parameterKeeper.GetParams(ctx).BrokerAddress
if msgClose.Creator != contractAddr.String() && contractAddr.String() != brokerAddress {
return nil, nil, wasmvmtypes.InvalidRequest{Err: "close wrong sender"}
}

Expand Down Expand Up @@ -46,7 +47,7 @@ func PerformMsgClose(f *leveragelpkeeper.Keeper, ctx sdk.Context, contractAddr s
return nil, errorsmod.Wrap(err, "failed validating msgMsgClose")
}

_, err := msgServer.Close(ctx, msgMsgClose) // Discard the response because it's empty
_, err := msgServer.Close(sdk.WrapSDKContext(ctx), msgMsgClose) // Discard the response because it's empty

if err != nil {
return nil, errorsmod.Wrap(err, "leveragelp close msg")
Expand Down
Loading

0 comments on commit 91ff5cf

Please sign in to comment.