starknet 5.10.1 → 5.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -2650,6 +2650,14 @@ function parseCalldataValue(element, type, structs) {
2650
2650
  return acc.concat(parsedData);
2651
2651
  }, []);
2652
2652
  }
2653
+ if (isTypeUint256(type)) {
2654
+ if (typeof element === "object") {
2655
+ const { low, high } = element;
2656
+ return [felt(low), felt(high)];
2657
+ }
2658
+ const el_uint256 = uint256(element);
2659
+ return [felt(el_uint256.low), felt(el_uint256.high)];
2660
+ }
2653
2661
  if (typeof element === "object") {
2654
2662
  throw Error(`Parameter ${element} do not align with abi parameter ${type}`);
2655
2663
  }
@@ -2667,14 +2675,8 @@ function parseCalldataField(argsIterator, input, structs) {
2667
2675
  value = splitLongString(value);
2668
2676
  }
2669
2677
  return parseCalldataValue(value, input.type, structs);
2670
- case (isTypeStruct(type, structs) || isTypeTuple(type)):
2678
+ case (isTypeStruct(type, structs) || isTypeTuple(type) || isTypeUint256(type)):
2671
2679
  return parseCalldataValue(value, type, structs);
2672
- case isTypeUint256(type):
2673
- if (typeof value === "object") {
2674
- return [felt(value.low), felt(value.high)];
2675
- }
2676
- const el_uint256 = uint256(value);
2677
- return [felt(el_uint256.low), felt(el_uint256.high)];
2678
2680
  default:
2679
2681
  return parseBaseTypes(type, value);
2680
2682
  }