@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.

@@ -35280,14 +35280,20 @@ This unreleased fuel-core build may include features and updates not yet support
35280
35280
  constructor(abi, argument) {
35281
35281
  this.abi = abi;
35282
35282
  this.name = argument.name;
35283
- const type3 = findTypeById(abi, argument.type);
35284
- this.type = type3.type;
35283
+ const jsonABIType = findTypeById(abi, argument.type);
35284
+ if (jsonABIType.type.length > 256) {
35285
+ throw new FuelError(
35286
+ ErrorCode.INVALID_COMPONENT,
35287
+ `The provided ABI type is too long: ${jsonABIType.type}.`
35288
+ );
35289
+ }
35290
+ this.type = jsonABIType.type;
35285
35291
  this.originalTypeArguments = argument.typeArguments;
35286
35292
  this.components = ResolvedAbiType.getResolvedGenericComponents(
35287
35293
  abi,
35288
35294
  argument,
35289
- type3.components,
35290
- type3.typeParameters ?? ResolvedAbiType.getImplicitGenericTypeParameters(abi, type3.components)
35295
+ jsonABIType.components,
35296
+ jsonABIType.typeParameters ?? ResolvedAbiType.getImplicitGenericTypeParameters(abi, jsonABIType.components)
35291
35297
  );
35292
35298
  }
35293
35299
  static getResolvedGenericComponents(abi, arg, components, typeParameters) {