-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into dependabot/go_modules/github.com/cometbft/co…
…metbft-db-0.12.0
- Loading branch information
Showing
12 changed files
with
360 additions
and
222 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package keeper | ||
|
||
import ( | ||
"context" | ||
|
||
sdk "github.com/cosmos/cosmos-sdk/types" | ||
"github.com/umee-network/umee/v6/x/auction" | ||
) | ||
|
||
// Querier implements a QueryServer for the x/uibc module. | ||
type Querier struct { | ||
Builder | ||
} | ||
|
||
func NewQuerier(kb Builder) auction.QueryServer { | ||
return Querier{Builder: kb} | ||
} | ||
|
||
// Params returns params of the x/auction module. | ||
func (q Querier) RewardsParams(goCtx context.Context, _ *auction.QueryRewardsParams) ( | ||
*auction.QueryRewardsParamsResponse, error, | ||
) { | ||
ctx := sdk.UnwrapSDKContext(goCtx) | ||
params := q.Keeper(&ctx).GetRewardsParams() | ||
|
||
return &auction.QueryRewardsParamsResponse{Params: params}, nil | ||
} | ||
|
||
// RewardsAuction returns params of the x/auction module. | ||
func (q Querier) RewardsAuction(goCtx context.Context, _ *auction.QueryRewardsAuction) ( | ||
*auction.QueryRewardsAuctionResponse, error, | ||
) { | ||
ctx := sdk.UnwrapSDKContext(goCtx) | ||
b := q.Keeper(&ctx) | ||
return b.currentRewardsAuction() | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
package keeper | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/umee-network/umee/v6/util/checkers" | ||
"github.com/umee-network/umee/v6/util/sdkutil" | ||
"github.com/umee-network/umee/v6/x/auction" | ||
) | ||
|
||
var _ auction.MsgServer = msgServer{} | ||
|
||
type msgServer struct { | ||
kb Builder | ||
} | ||
|
||
// NewMsgServer returns an implementation of auction.MsgServer | ||
func NewMsgServer(kb Builder) auction.MsgServer { | ||
return &msgServer{kb: kb} | ||
} | ||
|
||
// GovSetRewardsParams implements types.MsgServer | ||
func (m msgServer) GovSetRewardsParams(ctx context.Context, msg *auction.MsgGovSetRewardsParams) ( | ||
*auction.MsgGovSetRewardsParamsResponse, error, | ||
) { | ||
sdkCtx, err := sdkutil.StartMsg(ctx, msg) | ||
if err != nil { | ||
return nil, err | ||
} | ||
|
||
k := m.kb.Keeper(&sdkCtx) | ||
byEmergencyGroup, err := checkers.EmergencyGroupAuthority(msg.Authority, k.ugov) | ||
if err != nil { | ||
return nil, err | ||
} | ||
|
||
if err := k.SetRewardsParams(msg, byEmergencyGroup); err != nil { | ||
return nil, err | ||
} | ||
return &auction.MsgGovSetRewardsParamsResponse{}, nil | ||
} | ||
|
||
// RewardsBid implements types.MsgServer | ||
func (m msgServer) RewardsBid(ctx context.Context, msg *auction.MsgRewardsBid) ( | ||
*auction.MsgRewardsBidResponse, error, | ||
) { | ||
sdkCtx, err := sdkutil.StartMsg(ctx, msg) | ||
if err != nil { | ||
return nil, err | ||
} | ||
|
||
k := m.kb.Keeper(&sdkCtx) | ||
if err := k.rewardsBid(msg); err != nil { | ||
return nil, err | ||
} | ||
return &auction.MsgRewardsBidResponse{}, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package keeper | ||
|
||
import ( | ||
"github.com/umee-network/umee/v6/x/auction" | ||
) | ||
|
||
// GetRewardsParams gets the x/uibc module's parameters. | ||
func (k Keeper) GetRewardsParams() (params auction.RewardsParams) { | ||
panic("not implemented") | ||
} | ||
|
||
// SetRewardsParams sets params | ||
func (k Keeper) SetRewardsParams(msg *auction.MsgGovSetRewardsParams, byEmergencyGroup bool) error { | ||
panic("not implemented") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package keeper | ||
|
||
import ( | ||
"github.com/umee-network/umee/v6/x/auction" | ||
) | ||
|
||
func (k Keeper) rewardsBid(msg *auction.MsgRewardsBid) error { | ||
panic("not implemented") | ||
} | ||
|
||
func (k Keeper) currentRewardsAuction() (*auction.QueryRewardsAuctionResponse, error) { | ||
panic("not implemented") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.