From 02b414b437fb7195fc0534316d41c2130c0786d7 Mon Sep 17 00:00:00 2001 From: ppedziwiatr Date: Wed, 31 Jan 2024 12:52:25 +0100 Subject: [PATCH] [FEATURE] - support sortKey or blockHeight in viewState #504 --- src/contract/Contract.ts | 3 ++- src/contract/HandlerBasedContract.ts | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/contract/Contract.ts b/src/contract/Contract.ts index f1b2c3b6..4d6da3c5 100644 --- a/src/contract/Contract.ts +++ b/src/contract/Contract.ts @@ -155,7 +155,8 @@ export interface Contract { tags?: Tags, transfer?: ArTransfer, caller?: string, - signal?: AbortSignal + signal?: AbortSignal, + sortKey?: string ): Promise>; /** diff --git a/src/contract/HandlerBasedContract.ts b/src/contract/HandlerBasedContract.ts index c062eb7c..093f05a7 100644 --- a/src/contract/HandlerBasedContract.ts +++ b/src/contract/HandlerBasedContract.ts @@ -281,14 +281,15 @@ export class HandlerBasedContract implements Contract { tags: Tags = [], transfer: ArTransfer = emptyTransfer, caller?: string, - signal?: AbortSignal + signal?: AbortSignal, + sortKey?: string ): Promise> { this.logger.info('View state for', this._contractTxId); return await this.callContract( input, 'view', caller, - undefined, + sortKey, tags, transfer, false,