-
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.
- Loading branch information
1 parent
6dccda9
commit cd38047
Showing
10 changed files
with
3,167 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
syntax = "proto3"; | ||
package umee.auction.v1; | ||
|
||
import "gogoproto/gogo.proto"; | ||
|
||
option go_package = "github.com/umee-network/umee/v6/x/auction"; | ||
option (gogoproto.goproto_getters_all) = false; | ||
|
||
// RewardsParams defines parameters for the rewards auction. | ||
message RewardsParams { | ||
// auction_duration is duration in seconds. | ||
int64 auction_duration = 1; | ||
// min_bid_increment (nominal) in the base denom for each consequitive bid. | ||
int64 min_bid_increment = 2; | ||
} |
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,19 @@ | ||
syntax = "proto3"; | ||
package umee.auction.v1; | ||
|
||
import "cosmos/base/v1beta1/coin.proto"; | ||
import "gogoproto/gogo.proto"; | ||
import "umee/auction/v1/auction.proto"; | ||
|
||
option go_package = "github.com/umee-network/umee/v6/x/auction"; | ||
|
||
option (gogoproto.goproto_getters_all) = false; | ||
// option (gogoproto.equal_all) = false; | ||
|
||
// GenesisState defines the x/auction module's genesis state. | ||
message GenesisState { | ||
RewardsParams rewards_params = 1 [(gogoproto.nullable) = false]; | ||
uint64 reward_round = 2; | ||
string highest_bidder = 3; | ||
repeated cosmos.base.v1beta1.Coin reward_tokens = 4 [(gogoproto.nullable) = false]; | ||
} |
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,40 @@ | ||
syntax = "proto3"; | ||
package umee.auction.v1; | ||
|
||
import "google/api/annotations.proto"; | ||
import "gogoproto/gogo.proto"; | ||
import "umee/auction/v1/auction.proto"; | ||
import "cosmos/base/v1beta1/coin.proto"; | ||
|
||
option go_package = "github.com/umee-network/umee/v6/x/auction"; | ||
|
||
// Query defines the gRPC querier service. | ||
service Query { | ||
// RewardParams queries parameters for the reward auciton. | ||
rpc RewardParams(QueryRewardParams) returns (QueryRewardParamsResp) { | ||
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. | ||
rpc RewardAuction(QueryRewardAuction) returns (QueryRewardAuctionResp) { | ||
option (google.api.http).get = "/umee/auction/v1/rewards/{id}"; | ||
} | ||
} | ||
|
||
message QueryRewardParams {} | ||
|
||
message QueryRewardParamsResp { | ||
RewardsParams params = 1 [(gogoproto.nullable) = false]; | ||
} | ||
|
||
message QueryRewardAuction { | ||
// If zero or not present, the current auction is returned | ||
uint32 id = 1; | ||
} | ||
|
||
message QueryRewardAuctionResp { | ||
uint32 id = 1; | ||
// highest bidder | ||
string bidder = 2; | ||
repeated cosmos.base.v1beta1.Coin rewards = 3 [(gogoproto.nullable) = false]; | ||
} |
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,49 @@ | ||
syntax = "proto3"; | ||
package umee.auction.v1; | ||
|
||
import "cosmos/base/v1beta1/coin.proto"; | ||
import "cosmos_proto/cosmos.proto"; | ||
import "cosmos/msg/v1/msg.proto"; | ||
import "gogoproto/gogo.proto"; | ||
import "umee/auction/v1/auction.proto"; | ||
|
||
option go_package = "github.com/umee-network/umee/v6/x/auction"; | ||
option (gogoproto.goproto_getters_all) = false; | ||
|
||
// Msg defines the x/auction module's Msg service. | ||
service Msg { | ||
// | ||
// Rewards auction: bid umee for protocol rewards | ||
// | ||
|
||
rpc GovSetRewardsParams(MsgGovSetRewardsParams) returns (MsgGovSetRewardsParamsResp); | ||
Check failure on line 19 in proto/umee/auction/v1/tx.proto GitHub Actions / buf-lint
|
||
rpc RewardsBid(MsgRewardsBid) returns (MsgRewardsBidResp); | ||
Check failure on line 20 in proto/umee/auction/v1/tx.proto GitHub Actions / buf-lint
|
||
} | ||
|
||
// MsgGovSetRewardsParams updates rewards parameters. | ||
message MsgGovSetRewardsParams { | ||
option (gogoproto.equal) = true; | ||
option (gogoproto.goproto_getters) = false; | ||
option (cosmos.msg.v1.signer) = "authority"; | ||
|
||
// authority must be the address of the governance account. | ||
string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; | ||
RewardsParams params = 2 [(gogoproto.nullable) = false]; | ||
} | ||
|
||
// MsgGovSetRewardsParamsResp defines the Msg/GovSetRewardsParams response type. | ||
message MsgGovSetRewardsParamsResp {} | ||
|
||
// MsgRewardsBid places a bid for a reword auction. | ||
message MsgRewardsBid { | ||
option (gogoproto.equal) = false; | ||
option (gogoproto.goproto_getters) = false; | ||
string sender = 1; | ||
// amount of the bid in the base tokens | ||
cosmos.base.v1beta1.Coin bid_amount = 2 [(gogoproto.nullable) = false]; | ||
// the current auction ID being bid on. Fails if the ID is not an ID of the current auction. | ||
uint32 id = 3; | ||
} | ||
|
||
// MsgRewardsBidResp response type for Msg/RewardsBid | ||
message MsgRewardsBidResp {} |
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.