Prathamesh Musale
213c390c37
Some checks failed
Integration Tests / test-integration (push) Successful in 2m48s
E2E Tests / test-e2e (push) Successful in 4m56s
Lint / Run golangci-lint (push) Successful in 5m6s
Unit Tests / test-unit (push) Successful in 3m22s
SDK Tests / sdk_tests_nameservice_expiry (push) Successful in 10m40s
SDK Tests / sdk_tests (push) Successful in 10m55s
SDK Tests / sdk_tests_auctions (push) Failing after 16m7s
Part of https://www.notion.so/Rename-laconic2d-to-laconicd-9028d0c020d24d1288e92ebcb773d7a7 Co-authored-by: neeraj <neeraj.rtly@gmail.com> Reviewed-on: cerc-io/laconic2d#26 Co-authored-by: Prathamesh Musale <prathamesh@noreply.git.vdb.to> Co-committed-by: Prathamesh Musale <prathamesh@noreply.git.vdb.to>
99 lines
3.0 KiB
Go
99 lines
3.0 KiB
Go
package module
|
|
|
|
import (
|
|
autocliv1 "cosmossdk.io/api/cosmos/autocli/v1"
|
|
"cosmossdk.io/client/v2/autocli"
|
|
|
|
auctionv1 "git.vdb.to/cerc-io/laconicd/api/cerc/auction/v1"
|
|
)
|
|
|
|
var _ autocli.HasAutoCLIConfig = AppModule{}
|
|
|
|
// AutoCLIOptions implements the autocli.HasAutoCLIConfig interface.
|
|
func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
|
|
return &autocliv1.ModuleOptions{
|
|
Query: &autocliv1.ServiceCommandDescriptor{
|
|
Service: auctionv1.Query_ServiceDesc.ServiceName,
|
|
RpcCommandOptions: []*autocliv1.RpcCommandOptions{
|
|
{
|
|
RpcMethod: "Params",
|
|
Use: "params",
|
|
Short: "Get the current auction parameters",
|
|
PositionalArgs: []*autocliv1.PositionalArgDescriptor{},
|
|
},
|
|
{
|
|
RpcMethod: "Auctions",
|
|
Use: "list",
|
|
Short: "List auctions",
|
|
PositionalArgs: []*autocliv1.PositionalArgDescriptor{},
|
|
},
|
|
{
|
|
RpcMethod: "GetAuction",
|
|
Use: "get [auction-id]",
|
|
Short: "Get auction info by auction id",
|
|
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
|
|
{ProtoField: "id"},
|
|
},
|
|
},
|
|
{
|
|
RpcMethod: "AuctionsByOwner",
|
|
Use: "by-owner [owner-address]",
|
|
Short: "Get auctions list by owner / creator address",
|
|
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
|
|
{ProtoField: "owner_address"},
|
|
},
|
|
},
|
|
{
|
|
RpcMethod: "GetBid",
|
|
Use: "get-bid [auction-id] [bidder]",
|
|
Short: "Get auction bid by auction id and bidder",
|
|
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
|
|
{ProtoField: "auction_id"},
|
|
{ProtoField: "bidder"},
|
|
},
|
|
},
|
|
{
|
|
RpcMethod: "GetBids",
|
|
Use: "get-bids [auction-id]",
|
|
Short: "Get all auction bids",
|
|
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
|
|
{ProtoField: "auction_id"},
|
|
},
|
|
},
|
|
{
|
|
RpcMethod: "AuctionsByBidder",
|
|
Use: "by-bidder [bidder]",
|
|
Short: "Get auctions list by bidder",
|
|
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
|
|
{ProtoField: "bidder_address"},
|
|
},
|
|
},
|
|
{
|
|
RpcMethod: "GetAuctionModuleBalance",
|
|
Use: "balance",
|
|
Short: "Get auction module account balances",
|
|
PositionalArgs: []*autocliv1.PositionalArgDescriptor{},
|
|
},
|
|
},
|
|
},
|
|
Tx: &autocliv1.ServiceCommandDescriptor{
|
|
Service: auctionv1.Msg_ServiceDesc.ServiceName,
|
|
RpcCommandOptions: []*autocliv1.RpcCommandOptions{
|
|
{
|
|
RpcMethod: "CreateAuction",
|
|
Use: "create [commits-duration] [reveals-duration] [commit-fee] [reveal-fee] [minimum-bid]",
|
|
Short: "Create an auction",
|
|
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
|
|
{ProtoField: "commits_duration"},
|
|
{ProtoField: "reveals_duration"},
|
|
{ProtoField: "commit_fee"},
|
|
{ProtoField: "reveal_fee"},
|
|
{ProtoField: "minimum_bid"},
|
|
},
|
|
},
|
|
},
|
|
EnhanceCustomCommand: true, // Allow additional manual commands
|
|
},
|
|
}
|
|
}
|