syntax = "proto3";
package auction.v1;

import "google/api/annotations.proto";

option go_package = "github.com/Gravity-Bridge/Gravity-Bridge/module/x/auction/types";

// Msg defines the state transitions possible within auction
service Msg {
    rpc Bid(MsgBid) returns (MsgBidResponse) {
        option (google.api.http).post = "/auction/v1/bid";
    }
}

// MsgBid is a message type for placing a bid on an auction with given `auction_id`
// `bidder` is the signer of the Msg
// `amount` is the native token amount locked by the auction module if the bid is accepted as the highest bid
// `bid_fee` is the native token amount sent to the auction pool, and should be at least equal to the min bid fee param
//
// Additionally, all bids must meet or exceed `min_bid_amount`
message MsgBid {
    uint64 auction_id = 1; // ID of the auction to bid on
    string bidder = 2; // Address of the bidder
    uint64 amount = 3; // Amount of the bid
    uint64 bid_fee = 4; // Fee amount
}

message MsgBidResponse { }