From 1cddefc295b97e47c442c859258f06a7b4113d94 Mon Sep 17 00:00:00 2001 From: ppedziwiatr Date: Wed, 31 Jan 2024 12:22:11 +0100 Subject: [PATCH] chore: sortKey for dryWrite --- src/contract/Contract.ts | 4 +++- src/contract/HandlerBasedContract.ts | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/contract/Contract.ts b/src/contract/Contract.ts index e33d6105..f1b2c3b6 100644 --- a/src/contract/Contract.ts +++ b/src/contract/Contract.ts @@ -186,13 +186,15 @@ export interface Contract { * @param caller - an option to override the caller - if available, this value will overwrite the caller evaluated * from the wallet connected to this contract. * @param vrf - whether a mock VRF data should be generated + * @param sortKey - sortKey at which the state will be loaded prior to applying input */ dryWrite( input: Input, caller?: string, tags?: Tags, transfer?: ArTransfer, - vrf?: boolean + vrf?: boolean, + sortKey?: string ): Promise>; applyInput( diff --git a/src/contract/HandlerBasedContract.ts b/src/contract/HandlerBasedContract.ts index 556360b6..c062eb7c 100644 --- a/src/contract/HandlerBasedContract.ts +++ b/src/contract/HandlerBasedContract.ts @@ -312,10 +312,11 @@ export class HandlerBasedContract implements Contract { caller?: string, tags?: Tags, transfer?: ArTransfer, - vrf?: boolean + vrf?: boolean, + sortKey?: string ): Promise> { this.logger.info('Dry-write for', this._contractTxId); - return await this.callContract(input, 'write', caller, undefined, tags, transfer, undefined, vrf); + return await this.callContract(input, 'write', caller, sortKey, tags, transfer, undefined, vrf); } async applyInput(