Add methods for creating auctions and add auction tests #28

Merged
nabarun merged 32 commits from deep-stack/registry-sdk:iv-create-auction-test into main 2024-09-25 13:21:05 +00:00
3 changed files with 13 additions and 19 deletions
Showing only changes of commit 742312b257 - Show all commits

View File

@ -508,8 +508,7 @@ export class Registry {
revealsDuration,
commitFee,
revealFee,
minimumBid,
signer
minimumBid
}: MsgCreateVickreyAuction,
privateKey: string,
fee: StdFee | number = DEFAULT_GAS_ESTIMATION_MULTIPLIER): Promise<MsgCreateAuctionResponse> {
@ -518,17 +517,16 @@ export class Registry {
const laconicClient = await this.getLaconicClient(account);
return laconicClient.createAuction(
account.address,
'vickrey',
commitsDuration,
revealsDuration,
commitFee,
revealFee,
minimumBid,
signer,
'vickrey',
undefined,
0,
fee,
privateKey
fee
);
}
@ -537,7 +535,6 @@ export class Registry {
revealsDuration,
commitFee,
revealFee,
signer,
maxPrice,
numProviders
}: MsgCreateProviderAuction,
@ -548,17 +545,16 @@ export class Registry {
const laconicClient = await this.getLaconicClient(account);
return laconicClient.createAuction(
account.address,
'provider',
commitsDuration,
revealsDuration,
commitFee,
revealFee,
undefined,
signer,
'provider',
maxPrice,
numProviders,
fee,
privateKey
fee
);
}
}

View File

@ -416,13 +416,13 @@ export class LaconicClient extends SigningStargateClient {
}
public async createAuction (
commitsDuration: Duration | undefined,
revealsDuration: Duration | undefined,
commitFee: Coin | undefined,
revealFee: Coin | undefined,
minimumBid: Coin | undefined,
signer: string,
kind: string,
commitsDuration: Duration,
revealsDuration: Duration,
commitFee: Coin,
revealFee: Coin,
minimumBid: Coin | undefined,
maxPrice: Coin | undefined,
numProviders: number,
fee: StdFee | 'auto' | number,

View File

@ -1,7 +1,7 @@
import { EncodeObject, GeneratedType } from '@cosmjs/proto-signing';
import { Coin } from '@cosmjs/amino';
import { MsgCommitBidResponse, MsgCommitBid, MsgRevealBid, MsgRevealBidResponse, MsgCreateAuction, MsgCreateAuctionResponse } from '../../../proto/cerc/auction/v1/tx';
import { Coin } from '@cosmjs/amino';
import { Duration } from '../../../proto/google/protobuf/duration';
export const typeUrlMsgCreateAuction = '/cerc.auction.v1.MsgCreateAuction';
@ -51,7 +51,6 @@ export interface MsgCreateVickreyAuction {
commitFee: Coin;
revealFee: Coin;
minimumBid: Coin;
signer: string;
}
export interface MsgCreateProviderAuction {
@ -61,5 +60,4 @@ export interface MsgCreateProviderAuction {
revealFee: Coin;
maxPrice: Coin;
numProviders: number;
signer: string;
}