Skip to content

Commit

Permalink
chore: sortKey for dryWrite
Browse files Browse the repository at this point in the history
  • Loading branch information
ppedziwiatr committed Jan 31, 2024
1 parent 5801737 commit 1cddefc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/contract/Contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,13 +186,15 @@ export interface Contract<State = unknown> {
* @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: Input,
caller?: string,
tags?: Tags,
transfer?: ArTransfer,
vrf?: boolean
vrf?: boolean,
sortKey?: string
): Promise<InteractionResult<State, unknown>>;

applyInput<Input>(
Expand Down
5 changes: 3 additions & 2 deletions src/contract/HandlerBasedContract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -312,10 +312,11 @@ export class HandlerBasedContract<State> implements Contract<State> {
caller?: string,
tags?: Tags,
transfer?: ArTransfer,
vrf?: boolean
vrf?: boolean,
sortKey?: string
): Promise<InteractionResult<State, unknown>> {
this.logger.info('Dry-write for', this._contractTxId);
return await this.callContract<Input>(input, 'write', caller, undefined, tags, transfer, undefined, vrf);
return await this.callContract<Input>(input, 'write', caller, sortKey, tags, transfer, undefined, vrf);
}

async applyInput<Input>(
Expand Down

0 comments on commit 1cddefc

Please sign in to comment.