Skip to content

Fix args passed to get_ergotree_hex in calculateErgoTreeSize #107

@Heeral03

Description

@Heeral03

Issue: The function calculateErgoTreeSize was calling get_ergotree_hex with only one argument instead of the expected two. The second argument, version, is required and has type contract_version.

Impact: This causes TypeScript type errors:

  • Expected 2 arguments, but got 1.ts(2554)
  • Argument of type 'string' is not assignable to parameter of type 'contract_version'.ts(2345)

Fix: Update calculateErgoTreeSize (and all related calls, e.g., getErgoTreeSize) to pass a properly typed version argument of type contract_version, ensuring TypeScript type safety.

Benefits:

  • Eliminates type errors
  • Ensures correct versioning when calculating ErgoTree hex
  • Improves code maintainability and clarity

Context: Raising this issue for The Unstoppable Hackathon, under team name: EtherX.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions