Skip to content

types issue with modelsv2.DryrunRequest #410

@ratik21

Description

@ratik21

Subject

While constructing a new algosdk.modelsv2.DryrunRequest({..}) in a typescript project, all parameters are required (apps, accounts, round, timestamp ..etc). However, only txns should be required. Please let me know if that's not the case.

export class DryrunRequest extends BaseModel {
  public accounts: Account[]; // should be optional

  public apps: Application[]; // should be optional OR required in case of stateful programs

  public latestTimestamp: number | bigint; // should be optional

  public protocolVersion: string;  // should be optional

  public round: number | bigint;  // should be optional

  public sources: DryrunSource[];  // not sure about this, but should be optional as well

  public txns: EncodedSignedTransaction[]; // this should be required
}

Steps to reproduce

Running this script in typescript should reproduce the type errors: https://github.com/algorand/docs/blob/master/examples/smart_contracts/v2/javascript/dryrunDebugging.js#L132

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions