From 742312b2573cccc22a2dfb54f1245a9bce079795 Mon Sep 17 00:00:00 2001 From: IshaVenikar Date: Thu, 19 Sep 2024 12:11:55 +0530 Subject: [PATCH] Update auction type --- src/index.ts | 18 +++++++----------- src/laconic-client.ts | 10 +++++----- src/types/cerc/auction/message.ts | 4 +--- 3 files changed, 13 insertions(+), 19 deletions(-) diff --git a/src/index.ts b/src/index.ts index b172584..b076726 100644 --- a/src/index.ts +++ b/src/index.ts @@ -508,8 +508,7 @@ export class Registry { revealsDuration, commitFee, revealFee, - minimumBid, - signer + minimumBid }: MsgCreateVickreyAuction, privateKey: string, fee: StdFee | number = DEFAULT_GAS_ESTIMATION_MULTIPLIER): Promise { @@ -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 ); } } diff --git a/src/laconic-client.ts b/src/laconic-client.ts index 07076cc..669acf6 100644 --- a/src/laconic-client.ts +++ b/src/laconic-client.ts @@ -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, diff --git a/src/types/cerc/auction/message.ts b/src/types/cerc/auction/message.ts index 72ac7d8..834c9d7 100644 --- a/src/types/cerc/auction/message.ts +++ b/src/types/cerc/auction/message.ts @@ -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; }