@fuel-ts/account 0.0.0-pr-2364-20240523131518 → 0.0.0-pr-2364-20240523174104

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.

Potentially problematic release.


This version of @fuel-ts/account might be problematic. Click here for more details.

@@ -31573,14 +31573,20 @@ This unreleased fuel-core build may include features and updates not yet support
31573
31573
  constructor(abi, argument) {
31574
31574
  this.abi = abi;
31575
31575
  this.name = argument.name;
31576
- const type3 = findTypeById(abi, argument.type);
31577
- this.type = type3.type;
31576
+ const jsonABIType = findTypeById(abi, argument.type);
31577
+ if (jsonABIType.type.length > 256) {
31578
+ throw new FuelError(
31579
+ ErrorCode.INVALID_COMPONENT,
31580
+ `The provided ABI type is too long: ${jsonABIType.type}.`
31581
+ );
31582
+ }
31583
+ this.type = jsonABIType.type;
31578
31584
  this.originalTypeArguments = argument.typeArguments;
31579
31585
  this.components = ResolvedAbiType.getResolvedGenericComponents(
31580
31586
  abi,
31581
31587
  argument,
31582
- type3.components,
31583
- type3.typeParameters ?? ResolvedAbiType.getImplicitGenericTypeParameters(abi, type3.components)
31588
+ jsonABIType.components,
31589
+ jsonABIType.typeParameters ?? ResolvedAbiType.getImplicitGenericTypeParameters(abi, jsonABIType.components)
31584
31590
  );
31585
31591
  }
31586
31592
  static getResolvedGenericComponents(abi, arg, components, typeParameters) {