Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/go_modules/github.com/cosmos/ibc-…
Browse files Browse the repository at this point in the history
…go/v7-7.5.0
  • Loading branch information
gsk967 authored May 16, 2024
2 parents 54ef62f + 695c641 commit 6ab447c
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 85 deletions.
2 changes: 0 additions & 2 deletions proto/umee/auction/v1/events.proto
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ option (gogoproto.goproto_getters_all) = false;
message EventRewardsAuctionResult {
uint32 id = 1;
string bidder = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// Auctioned tokens.
repeated cosmos.base.v1beta1.Coin rewards = 4 [(gogoproto.nullable) = false];
}

// EventFundRewardsAuction is emitted when sending rewards to auction module
Expand Down
2 changes: 1 addition & 1 deletion proto/umee/auction/v1/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ service Query {
option (google.api.http).get = "/umee/auction/v1/rewards/params";
}
// RewardAuction queries the information of the auction by ID. If ID is ommitted, returns
// current reward auction params.
// current reward auction.
rpc RewardsAuction(QueryRewardsAuction) returns (QueryRewardsAuctionResponse) {
option (google.api.http).get = "/umee/auction/v1/rewards";
}
Expand Down
2 changes: 1 addition & 1 deletion sdkclient/query/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func NewClient(logger *log.Logger, grpcEndpoint string, queryTimeout time.Durati
}

func (c *Client) dialGrpcConn() (err error) {
c.GrpcConn, err = grpc.Dial(
c.GrpcConn, err = grpc.NewClient(
c.grpcEndpoint,
grpc.WithTransportCredentials(insecure.NewCredentials()),
grpc.WithContextDialer(dialerFunc),
Expand Down
99 changes: 21 additions & 78 deletions x/auction/events.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion x/auction/keeper/rewards.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (

"github.com/umee-network/umee/v6/util"
"github.com/umee-network/umee/v6/util/coin"
"github.com/umee-network/umee/v6/util/sdkutil"
"github.com/umee-network/umee/v6/util/store"
"github.com/umee-network/umee/v6/x/auction"
)
Expand All @@ -33,7 +34,10 @@ func (k Keeper) FinalizeRewardsAuction() error {
if err != nil {
return fmt.Errorf("can't burn rewards auction bid [%w]", err)
}

sdkutil.Emit(k.ctx, &auction.EventRewardsAuctionResult{
Id: id,
Bidder: sdk.AccAddress(bid.Bidder).String(),
})
} else if len(a.Rewards) != 0 {
// rollover the past rewards if there was no bidder
newCoins = newCoins.Add(a.Rewards...)
Expand Down
4 changes: 2 additions & 2 deletions x/auction/query.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6ab447c

Please sign in to comment.