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.
Issue: The function
calculateErgoTreeSizewas callingget_ergotree_hexwith only one argument instead of the expected two. The second argument,version, is required and has typecontract_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 typedversionargument of typecontract_version, ensuring TypeScript type safety.Benefits:
Context: Raising this issue for The Unstoppable Hackathon, under team name: EtherX.