From 72fc6d6762d9f5cb8a36828b263797953ca112ba Mon Sep 17 00:00:00 2001 From: nedsalk Date: Tue, 3 Sep 2024 16:01:01 +0200 Subject: [PATCH 001/126] parser scaffolding --- packages/abi/src/coder/abi-coder.ts | 11 +- packages/abi/src/gen/abi-gen.ts | 10 +- packages/abi/src/parse/AbiParser.ts | 1 - .../abi/src/parse/specifications/v1/index.ts | 1 - packages/abi/src/parse/types.ts | 1 - packages/abi/src/parser/abi-parser-types.ts | 86 +++++++ packages/abi/src/parser/abi-parser.ts | 24 ++ packages/abi/src/parser/index.ts | 3 + .../specifications/v1/abi-specification-v1.ts | 97 ++++++++ .../src/parser/specifications/v1/abi-v1.ts | 66 +++++ .../specifications/v1/make-resolved-type.ts | 21 ++ .../specifications/v1/resolvable-type.ts | 228 ++++++++++++++++++ .../parser/specifications/v1/resolved-type.ts | 23 ++ 13 files changed, 566 insertions(+), 6 deletions(-) delete mode 100644 packages/abi/src/parse/AbiParser.ts delete mode 100644 packages/abi/src/parse/specifications/v1/index.ts delete mode 100644 packages/abi/src/parse/types.ts create mode 100644 packages/abi/src/parser/abi-parser-types.ts create mode 100644 packages/abi/src/parser/abi-parser.ts create mode 100644 packages/abi/src/parser/index.ts create mode 100644 packages/abi/src/parser/specifications/v1/abi-specification-v1.ts create mode 100644 packages/abi/src/parser/specifications/v1/abi-v1.ts create mode 100644 packages/abi/src/parser/specifications/v1/make-resolved-type.ts create mode 100644 packages/abi/src/parser/specifications/v1/resolvable-type.ts create mode 100644 packages/abi/src/parser/specifications/v1/resolved-type.ts diff --git a/packages/abi/src/coder/abi-coder.ts b/packages/abi/src/coder/abi-coder.ts index 38325e4eff3..0b6d1b06578 100644 --- a/packages/abi/src/coder/abi-coder.ts +++ b/packages/abi/src/coder/abi-coder.ts @@ -1,2 +1,9 @@ -// Placeholder -export class AbiCoder {} +import type { Abi } from '../parser'; +import { parseJsonAbi, type ParsableJsonAbi } from '../parser/abi-parser'; + +export class AbiCoder { + private abi: Abi; + constructor(parsableAbi: ParsableJsonAbi) { + this.abi = parseJsonAbi(parsableAbi); + } +} diff --git a/packages/abi/src/gen/abi-gen.ts b/packages/abi/src/gen/abi-gen.ts index e0ad4905d2f..c3def410484 100644 --- a/packages/abi/src/gen/abi-gen.ts +++ b/packages/abi/src/gen/abi-gen.ts @@ -1 +1,9 @@ -export class AbiGen {} +import type { Abi } from '../parser'; +import { parseJsonAbi, type ParsableJsonAbi } from '../parser/abi-parser'; + +export class AbiGen { + private abi: Abi; + constructor(parsableAbi: ParsableJsonAbi) { + this.abi = parseJsonAbi(parsableAbi); + } +} diff --git a/packages/abi/src/parse/AbiParser.ts b/packages/abi/src/parse/AbiParser.ts deleted file mode 100644 index 10051c76805..00000000000 --- a/packages/abi/src/parse/AbiParser.ts +++ /dev/null @@ -1 +0,0 @@ -// Placeholder diff --git a/packages/abi/src/parse/specifications/v1/index.ts b/packages/abi/src/parse/specifications/v1/index.ts deleted file mode 100644 index 10051c76805..00000000000 --- a/packages/abi/src/parse/specifications/v1/index.ts +++ /dev/null @@ -1 +0,0 @@ -// Placeholder diff --git a/packages/abi/src/parse/types.ts b/packages/abi/src/parse/types.ts deleted file mode 100644 index 10051c76805..00000000000 --- a/packages/abi/src/parse/types.ts +++ /dev/null @@ -1 +0,0 @@ -// Placeholder diff --git a/packages/abi/src/parser/abi-parser-types.ts b/packages/abi/src/parser/abi-parser-types.ts new file mode 100644 index 00000000000..afe064c75a0 --- /dev/null +++ b/packages/abi/src/parser/abi-parser-types.ts @@ -0,0 +1,86 @@ +export interface AbiType { + // Concrete type ID + typeId: string; + // This will reference the metadata type + // Fallback to concrete type when no metadata type is referenced (i.e. for built in types) + swayType: string; + components?: AbiTypeComponent[]; +} + +export interface AbiTypeComponent { + name: string; + type: AbiType; +} + +export interface AbiFunctionInput { + name: string; + type: AbiType; +} + +export interface AbiFunction { + name: string; + inputs: AbiFunctionInput[]; + output: AbiType; + attributes?: readonly AbiFunctionAttribute[]; +} + +export interface AbiLoggedType { + logId: string; + type: AbiType; +} + +export interface AbiMessageType { + messageId: string; + type: AbiType; +} + +export interface AbiConfigurable { + name: string; + offset: number; + type: AbiType; +} + +export interface Abi { + specVersion: string; + encodingVersion: string; + programType: string; + + functions: AbiFunction[]; + loggedTypes: AbiLoggedType[]; + messageTypes: AbiMessageType[]; + configurables: AbiConfigurable[]; +} + +type AbiFunctionAttribute = + | StorageAttr + | PayableAttr + | TestAttr + | InlineAttr + | DocCommentAttr + | DocAttr; + +export interface PayableAttr { + readonly name: 'payable'; +} + +export interface StorageAttr { + readonly name: 'storage'; + readonly arguments: readonly ('read' | 'write')[]; +} + +export interface TestAttr { + readonly name: 'test'; +} +export interface InlineAttr { + readonly name: 'inline'; + readonly arguments: 'never' | 'always'; +} + +export interface DocCommentAttr { + readonly name: 'doc-comment'; + readonly arguments: string[]; +} + +export interface DocAttr { + readonly name: 'doc'; +} diff --git a/packages/abi/src/parser/abi-parser.ts b/packages/abi/src/parser/abi-parser.ts new file mode 100644 index 00000000000..6464464da11 --- /dev/null +++ b/packages/abi/src/parser/abi-parser.ts @@ -0,0 +1,24 @@ +import type { Abi } from './abi-parser-types'; +import type { JsonAbi_V1 } from './specifications/v1/abi-specification-v1'; +import { AbiV1 } from './specifications/v1/abi-v1'; + +/** + * A typed ABI object or a stringified json of a Sway program's ABI + */ +export type ParsableJsonAbi = string | JsonAbi_V1; + +/** + * Parses an ABI in JSON format. + * + * @param abi a JSON ABI of a Sway program + * @returns a parsed ABI + */ +export function parseJsonAbi(abi: ParsableJsonAbi): Abi { + const theAbi = typeof abi === 'string' ? (JSON.parse(abi) as { specVersion: string }) : abi; + switch (theAbi.specVersion) { + case '1': + return new AbiV1(abi as JsonAbi_V1); + default: + throw new Error('unsupported abi specification version'); + } +} diff --git a/packages/abi/src/parser/index.ts b/packages/abi/src/parser/index.ts new file mode 100644 index 00000000000..f08b3a8939b --- /dev/null +++ b/packages/abi/src/parser/index.ts @@ -0,0 +1,3 @@ +export { parseJsonAbi as parseAbi } from './abi-parser'; +export * from './abi-parser-types'; +export { JsonAbi_V1 } from './specifications/v1/abi-specification-v1'; diff --git a/packages/abi/src/parser/specifications/v1/abi-specification-v1.ts b/packages/abi/src/parser/specifications/v1/abi-specification-v1.ts new file mode 100644 index 00000000000..393c954ffbe --- /dev/null +++ b/packages/abi/src/parser/specifications/v1/abi-specification-v1.ts @@ -0,0 +1,97 @@ +/** + * Types for Fuel JSON ABI Format specification v1, as defined on: + * https://github.com/FuelLabs/fuel-specs/blob/master/src/abi/json-abi-format.md + */ + +// eslint-disable-next-line @typescript-eslint/naming-convention +export interface JsonAbi_V1 { + readonly specVersion: string; + readonly encodingVersion: string; + readonly programType: string; + readonly concreteTypes: readonly ConcreteType[]; + readonly metadataTypes: readonly MetadataType[]; + readonly functions: readonly AbiFunction[]; + readonly loggedTypes: readonly LoggedType[]; + readonly messagesTypes: readonly MessageType[]; + readonly configurables: readonly Configurable[]; +} + +export interface ConcreteType { + readonly type: string; + readonly concreteTypeId: string; + readonly metadataTypeId?: number; + readonly typeArguments?: readonly string[]; +} + +export interface MetadataType { + readonly type: string; + readonly metadataTypeId: number; + readonly components?: readonly Component[]; + readonly typeParameters?: readonly number[]; +} + +export interface Component extends TypeArgument { + readonly name: string; +} + +export interface TypeArgument { + readonly typeId: number | string; // the type metadata declaration ID or type concrete declaration hash based ID of the type of the component. + readonly typeArguments?: readonly TypeArgument[]; +} + +export interface AbiFunction { + readonly name: string; + readonly inputs: readonly AbiFunctionInput[]; + readonly output: string; + readonly attributes: readonly AbiFunctionAttributeTodo[] | null; +} + +export interface AbiFunctionInput { + readonly name: string; + readonly concreteTypeId: string; +} + +type AbiFunctionAttributeTodo = + | StorageAttr + | PayableAttr + | TestAttr + | InlineAttr + | DocCommentAttr + | DocAttr; + +export interface PayableAttr { + readonly name: 'payable'; +} +export interface StorageAttr { + readonly name: 'storage'; + readonly arguments: readonly ('read' | 'write')[]; +} +export interface TestAttr { + readonly name: 'test'; +} +export interface InlineAttr { + readonly name: 'inline'; + readonly arguments: 'never' | 'always'; +} +export interface DocCommentAttr { + readonly name: 'doc-comment'; + readonly arguments: string[]; +} +export interface DocAttr { + readonly name: 'doc'; +} + +export interface LoggedType { + readonly logId: string; + readonly concreteTypeId: string; // the _type concrete declaration_ hash based ID of the value being logged. +} + +export interface MessageType { + readonly message_id: string; + readonly concreteTypeId: string; +} +export interface Configurable { + readonly name: string; + readonly concreteTypeId: string; + readonly offset: number; +} diff --git a/packages/abi/src/parser/specifications/v1/abi-v1.ts b/packages/abi/src/parser/specifications/v1/abi-v1.ts new file mode 100644 index 00000000000..8b052467f0a --- /dev/null +++ b/packages/abi/src/parser/specifications/v1/abi-v1.ts @@ -0,0 +1,66 @@ +import type { + Abi, + AbiConfigurable, + AbiFunction, + AbiLoggedType, + AbiMessageType, +} from '../../abi-parser-types'; + +import type { JsonAbi_V1 } from './abi-specification-v1'; +import { makeResolvedType } from './make-resolved-type'; +import { ResolvableType } from './resolvable-type'; + +export class AbiV1 implements Abi { + public specVersion: string; + public encodingVersion: string; + public programType: string; + public functions: AbiFunction[]; + public loggedTypes: AbiLoggedType[]; + public messageTypes: AbiMessageType[]; + public configurables: AbiConfigurable[]; + + constructor(public jsonAbi: JsonAbi_V1) { + const resolvableTypes = jsonAbi.metadataTypes.map( + (mt) => new ResolvableType(jsonAbi, mt.metadataTypeId, undefined) + ); + + const types = jsonAbi.concreteTypes.map((t) => + makeResolvedType(jsonAbi, resolvableTypes, t.concreteTypeId).toAbiType() + ); + + this.specVersion = jsonAbi.specVersion; + this.encodingVersion = jsonAbi.encodingVersion; + this.programType = jsonAbi.programType; + + this.functions = jsonAbi.functions.map((fn) => ({ + attributes: fn.attributes ?? undefined, + name: fn.name, + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + output: types.find((t) => t.typeId === fn.output)!, + inputs: fn.inputs.map((i) => ({ + name: i.name, + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + type: types.find((t) => t.typeId === i.concreteTypeId)!, + })), + })); + + this.loggedTypes = jsonAbi.loggedTypes.map((lt) => ({ + logId: lt.logId, + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + type: types.find((t) => t.typeId === lt.concreteTypeId)!, + })); + + this.messageTypes = jsonAbi.messagesTypes.map((mt) => ({ + messageId: mt.message_id, + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + type: types.find((t) => t.typeId === mt.concreteTypeId)!, + })); + + this.configurables = jsonAbi.configurables.map((c) => ({ + name: c.name, + offset: c.offset, + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + type: types.find((t) => t.typeId === c.concreteTypeId)!, + })); + } +} diff --git a/packages/abi/src/parser/specifications/v1/make-resolved-type.ts b/packages/abi/src/parser/specifications/v1/make-resolved-type.ts new file mode 100644 index 00000000000..d0a3ce0c98d --- /dev/null +++ b/packages/abi/src/parser/specifications/v1/make-resolved-type.ts @@ -0,0 +1,21 @@ +import type { ConcreteType, JsonAbi_V1 } from './abi-specification-v1'; +import type { ResolvableType } from './resolvable-type'; +import { ResolvedType } from './resolved-type'; + +export function makeResolvedType( + abi: JsonAbi_V1, + resolvableTypes: ResolvableType[], + concreteTypeId: string +) { + const concreteType = abi.concreteTypes.find( + (ct) => ct.concreteTypeId === concreteTypeId + ) as ConcreteType; + + const resolvableType = resolvableTypes.find( + (rmt) => rmt.metadataTypeId === concreteType.metadataTypeId + ); + + return resolvableType + ? resolvableType.resolve(abi, concreteType) + : new ResolvedType(concreteType.type, concreteType.concreteTypeId, undefined, undefined); +} diff --git a/packages/abi/src/parser/specifications/v1/resolvable-type.ts b/packages/abi/src/parser/specifications/v1/resolvable-type.ts new file mode 100644 index 00000000000..9ec941931cc --- /dev/null +++ b/packages/abi/src/parser/specifications/v1/resolvable-type.ts @@ -0,0 +1,228 @@ +import type { + MetadataType, + Component, + TypeArgument, + ConcreteType, + JsonAbi_V1, +} from './abi-specification-v1'; +import { ResolvedType } from './resolved-type'; + +export function isVector(type: string) { + const MATCH_REGEX: RegExp = /^struct (std::vec::)?Vec/m; + const IGNORE_REGEX: RegExp = /^struct (std::vec::)?RawVec$/m; + + return MATCH_REGEX.test(type) && !IGNORE_REGEX.test(type); +} + +export const genericRegEx = /^generic.+$/; + +interface ResolvableComponent { + name: string; + type: ResolvableType | ResolvedType; +} + +export class ResolvableType { + private metadataType: MetadataType; + type: string; + components: ResolvableComponent[] | undefined; + + constructor( + abi: JsonAbi_V1, + public metadataTypeId: number, + public typeParamsArgsMap: Array<[number, ResolvedType | ResolvableType]> | undefined + ) { + const metadataType = abi.metadataTypes.find( + (tm) => tm.metadataTypeId === metadataTypeId + ) as MetadataType; + + this.metadataType = metadataType; + this.type = metadataType.type; + + this.typeParamsArgsMap ??= ResolvableType.mapTypeParametersAndArgs( + abi, + metadataType, + undefined + ); + + let components = metadataType.components; + + if (isVector(metadataType.type)) { + components = components?.map((c) => { + if (c.name === 'buf') { + return c.typeArguments?.[0]; + } + return c; + }) as Component[]; + } + + this.components = components?.map((c) => ResolvableType.handleComponent(abi, c)); + } + + private static mapTypeParametersAndArgs( + abi: JsonAbi_V1, + metadataType: MetadataType, + args: (ResolvableType | ResolvedType)[] | undefined + ): Array<[number, ResolvedType | ResolvableType]> | undefined { + if (!args) { + return metadataType.typeParameters?.map((typeParameter) => [ + typeParameter, + new ResolvableType(abi, typeParameter, undefined), + ]); + } + + return metadataType.typeParameters?.map((typeParameter, idx) => [typeParameter, args[idx]]); + } + + private static handleComponent( + abi: JsonAbi_V1, + c: Component | TypeArgument + ): ResolvableComponent { + const name = (c as Component).name; + + if (typeof c.typeId === 'string') { + const concreteType = abi.concreteTypes.find( + (ct) => ct.concreteTypeId === c.typeId + ) as ConcreteType; + return { + name, + type: ResolvableType.resolveConcreteType(abi, concreteType), + }; + } + + const mt = abi.metadataTypes.find((tm) => tm.metadataTypeId === c.typeId) as MetadataType; + + return { + name, + type: ResolvableType.handleMetadataType(abi, mt, c.typeArguments), + }; + } + + private static resolveConcreteType(abi: JsonAbi_V1, type: ConcreteType): ResolvedType { + const concreteType = type; + if (concreteType.metadataTypeId === undefined) { + return new ResolvedType(concreteType.type, concreteType.concreteTypeId, undefined, undefined); + } + + if (!concreteType.typeArguments) { + return new ResolvableType(abi, concreteType.metadataTypeId, undefined).resolveInternal( + concreteType.concreteTypeId, + undefined + ); + } + + const metadataType = abi.metadataTypes.find( + (mt) => mt.metadataTypeId === concreteType.metadataTypeId + ) as MetadataType; + + const concreteTypeArgs = concreteType.typeArguments.map((ta) => { + const concreteTypeArg = abi.concreteTypes.find( + (ct) => ct.concreteTypeId === ta + ) as ConcreteType; + return this.resolveConcreteType(abi, concreteTypeArg); + }); + + return new ResolvableType( + abi, + concreteType.metadataTypeId, + ResolvableType.mapTypeParametersAndArgs(abi, metadataType, concreteTypeArgs) + ).resolveInternal(concreteType.concreteTypeId, undefined); + } + + private static handleMetadataType( + abi: JsonAbi_V1, + mt: MetadataType, + typeArguments: Component['typeArguments'] + ): ResolvableType | ResolvedType { + if (genericRegEx.test(mt.type)) { + return new ResolvableType(abi, mt.metadataTypeId, undefined); + } + + if (!mt.components) { + /** + * types like u8, u16 can make their way into metadata types + * if they aren't used _directly_ in a function-input/function-output/log/configurable/messageType + * These types are characterized by not having components and we can resolve then as-is + */ + return new ResolvableType(abi, mt.metadataTypeId, undefined).resolveInternal( + mt.metadataTypeId, + undefined + ); + } + + const typeArgs = typeArguments?.map((ta) => this.handleComponent(abi, ta).type); + + const resolvable = new ResolvableType( + abi, + mt.metadataTypeId, + this.mapTypeParametersAndArgs(abi, mt, typeArgs) + ); + + if (typeArgs?.every((ta) => ta instanceof ResolvedType)) { + return resolvable.resolveInternal(mt.metadataTypeId, undefined); + } + + if (resolvable.components?.every((comp) => comp.type instanceof ResolvedType)) { + return resolvable.resolveInternal(mt.metadataTypeId, undefined); + } + + return resolvable; + } + + private resolveInternal( + typeId: string | number, + typeParamsArgsMap: Array<[number, ResolvedType]> | undefined + ): ResolvedType { + const typeArgs = this.resolveTypeArgs(typeParamsArgsMap); + + const components: ResolvedType['components'] = this.components?.map((c) => { + if (c.type instanceof ResolvedType) { + return c as { name: string; type: ResolvedType }; + } + + const resolvedGenericType = typeArgs?.find( + ([tp]) => (c.type as ResolvableType).metadataTypeId === tp + )?.[1]; + if (resolvedGenericType) { + return { + name: c.name, + type: resolvedGenericType, + }; + } + + return { name: c.name, type: c.type.resolveInternal(c.type.metadataTypeId, typeArgs) }; + }); + return new ResolvedType(this.metadataType.type, typeId, components, typeArgs); + } + + private resolveTypeArgs( + typeParamsArgsMap: Array<[number, ResolvedType]> | undefined + ): [number, ResolvedType][] | undefined { + return this.typeParamsArgsMap === undefined + ? typeParamsArgsMap + : this.typeParamsArgsMap.map(([typeParameter, value]) => { + if (value instanceof ResolvedType) { + return [+typeParameter, value]; + } + + const resolved = typeParamsArgsMap?.find(([tp]) => tp === value.metadataTypeId)?.[1]; + return [+typeParameter, resolved as ResolvedType]; + }); + } + + public resolve(abi: JsonAbi_V1, concreteType: ConcreteType) { + const concreteTypeArgs = concreteType.typeArguments?.map((ta) => { + const concreteTypeArg = abi.concreteTypes.find( + (ct) => ct.concreteTypeId === ta + ) as ConcreteType; + return ResolvableType.resolveConcreteType(abi, concreteTypeArg); + }); + + const typeParamsArgsMap = ResolvableType.mapTypeParametersAndArgs( + abi, + this.metadataType, + concreteTypeArgs + ) as Array<[number, ResolvedType]>; + + return this.resolveInternal(concreteType.concreteTypeId, typeParamsArgsMap); + } +} diff --git a/packages/abi/src/parser/specifications/v1/resolved-type.ts b/packages/abi/src/parser/specifications/v1/resolved-type.ts new file mode 100644 index 00000000000..1c3d025dff2 --- /dev/null +++ b/packages/abi/src/parser/specifications/v1/resolved-type.ts @@ -0,0 +1,23 @@ +import type { AbiType } from '../../abi-parser-types'; + +export interface ResolvedComponent { + name: string; + type: ResolvedType; +} + +export class ResolvedType { + constructor( + public type: string, + public typeId: string | number, + public components: ResolvedComponent[] | undefined, + public typeParamsArgsMap: Array<[number, ResolvedType]> | undefined + ) {} + + public toAbiType(): AbiType { + return { + swayType: this.type, + typeId: this.typeId as string, + components: this.components?.map((c) => ({ name: c.name, type: c.type.toAbiType() })), + }; + } +} From 451b1db98af40ac27fae70817b5a5ee193cd7b1a Mon Sep 17 00:00:00 2001 From: nedsalk Date: Wed, 4 Sep 2024 10:59:00 +0200 Subject: [PATCH 002/126] lint fix --- packages/abi/src/parser/abi-parser.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/abi/src/parser/abi-parser.ts b/packages/abi/src/parser/abi-parser.ts index 6464464da11..129113fb139 100644 --- a/packages/abi/src/parser/abi-parser.ts +++ b/packages/abi/src/parser/abi-parser.ts @@ -10,7 +10,7 @@ export type ParsableJsonAbi = string | JsonAbi_V1; /** * Parses an ABI in JSON format. * - * @param abi a JSON ABI of a Sway program + * @param abi - a JSON ABI of a Sway program * @returns a parsed ABI */ export function parseJsonAbi(abi: ParsableJsonAbi): Abi { From e7c55d5acdc5510941c8aba71c19bf7f85d7746f Mon Sep 17 00:00:00 2001 From: Peter Smith Date: Fri, 13 Sep 2024 14:54:02 +0100 Subject: [PATCH 003/126] chore: ABI parser - API alterations (#3164) --- packages/abi/src/coder/abi-coder.ts | 7 +- packages/abi/src/gen/abi-gen.ts | 7 +- packages/abi/src/parser/abi-parser.ts | 48 ++++++--- .../parser/{abi-parser-types.ts => abi.ts} | 0 packages/abi/src/parser/index.ts | 6 +- .../abi/src/parser/specifications/index.ts | 2 + .../specifications/v1/abi-specification-v1.ts | 97 ----------------- .../src/parser/specifications/v1/abi-v1.ts | 66 ------------ .../specifications/v1/make-resolved-type.ts | 6 +- .../src/parser/specifications/v1/parser.ts | 60 +++++++++++ .../specifications/v1/resolvable-type.ts | 55 +++++----- .../parser/specifications/v1/resolved-type.ts | 2 +- .../parser/specifications/v1/specification.ts | 101 ++++++++++++++++++ 13 files changed, 238 insertions(+), 219 deletions(-) rename packages/abi/src/parser/{abi-parser-types.ts => abi.ts} (100%) create mode 100644 packages/abi/src/parser/specifications/index.ts delete mode 100644 packages/abi/src/parser/specifications/v1/abi-specification-v1.ts delete mode 100644 packages/abi/src/parser/specifications/v1/abi-v1.ts create mode 100644 packages/abi/src/parser/specifications/v1/parser.ts create mode 100644 packages/abi/src/parser/specifications/v1/specification.ts diff --git a/packages/abi/src/coder/abi-coder.ts b/packages/abi/src/coder/abi-coder.ts index 0b6d1b06578..562990d4048 100644 --- a/packages/abi/src/coder/abi-coder.ts +++ b/packages/abi/src/coder/abi-coder.ts @@ -1,9 +1,10 @@ import type { Abi } from '../parser'; -import { parseJsonAbi, type ParsableJsonAbi } from '../parser/abi-parser'; +import type { AbiSpecification } from '../parser/abi-parser'; +import { AbiParser } from '../parser/abi-parser'; export class AbiCoder { private abi: Abi; - constructor(parsableAbi: ParsableJsonAbi) { - this.abi = parseJsonAbi(parsableAbi); + constructor(parsableAbi: AbiSpecification) { + this.abi = AbiParser.parse(parsableAbi); } } diff --git a/packages/abi/src/gen/abi-gen.ts b/packages/abi/src/gen/abi-gen.ts index c3def410484..ee377b9747b 100644 --- a/packages/abi/src/gen/abi-gen.ts +++ b/packages/abi/src/gen/abi-gen.ts @@ -1,9 +1,10 @@ import type { Abi } from '../parser'; -import { parseJsonAbi, type ParsableJsonAbi } from '../parser/abi-parser'; +import type { AbiSpecification } from '../parser/abi-parser'; +import { AbiParser } from '../parser/abi-parser'; export class AbiGen { private abi: Abi; - constructor(parsableAbi: ParsableJsonAbi) { - this.abi = parseJsonAbi(parsableAbi); + constructor(parsableAbi: AbiSpecification) { + this.abi = AbiParser.parse(parsableAbi); } } diff --git a/packages/abi/src/parser/abi-parser.ts b/packages/abi/src/parser/abi-parser.ts index 129113fb139..2e329b099a7 100644 --- a/packages/abi/src/parser/abi-parser.ts +++ b/packages/abi/src/parser/abi-parser.ts @@ -1,24 +1,38 @@ -import type { Abi } from './abi-parser-types'; -import type { JsonAbi_V1 } from './specifications/v1/abi-specification-v1'; -import { AbiV1 } from './specifications/v1/abi-v1'; +import type { Abi } from './abi'; +import type { AbiSpecificationV1 } from './specifications'; +import { AbiParserV1 } from './specifications'; /** * A typed ABI object or a stringified json of a Sway program's ABI */ -export type ParsableJsonAbi = string | JsonAbi_V1; +export type AbiSpecification = AbiSpecificationV1; -/** - * Parses an ABI in JSON format. - * - * @param abi - a JSON ABI of a Sway program - * @returns a parsed ABI - */ -export function parseJsonAbi(abi: ParsableJsonAbi): Abi { - const theAbi = typeof abi === 'string' ? (JSON.parse(abi) as { specVersion: string }) : abi; - switch (theAbi.specVersion) { - case '1': - return new AbiV1(abi as JsonAbi_V1); - default: - throw new Error('unsupported abi specification version'); +export class AbiParser { + /** + * ABI specifications transpilers + */ + private static specifications = { + '1': AbiParserV1.parse, + } as const; + + /** + * Parses an ABI in JSON format. + * + * @param abi - a JSON ABI of a Sway program + * @returns an public interface for the Abi + */ + static parse(abi: AbiSpecification): Abi { + if (typeof abi.specVersion !== 'string') { + // TODO: change to FuelError + throw new Error('Invalid ABI: specVersion is not a string'); + } + + const parse = AbiParser.specifications[abi.specVersion]; + if (!parse) { + // TODO: change to FuelError + throw new Error(`Unsupported ABI specVersion: ${abi.specVersion}`); + } + + return parse(abi); } } diff --git a/packages/abi/src/parser/abi-parser-types.ts b/packages/abi/src/parser/abi.ts similarity index 100% rename from packages/abi/src/parser/abi-parser-types.ts rename to packages/abi/src/parser/abi.ts diff --git a/packages/abi/src/parser/index.ts b/packages/abi/src/parser/index.ts index f08b3a8939b..1d0b7a7f86b 100644 --- a/packages/abi/src/parser/index.ts +++ b/packages/abi/src/parser/index.ts @@ -1,3 +1,3 @@ -export { parseJsonAbi as parseAbi } from './abi-parser'; -export * from './abi-parser-types'; -export { JsonAbi_V1 } from './specifications/v1/abi-specification-v1'; +export { AbiParser } from './abi-parser'; +export * from './abi'; +export * from './specifications/v1/specification'; diff --git a/packages/abi/src/parser/specifications/index.ts b/packages/abi/src/parser/specifications/index.ts new file mode 100644 index 00000000000..788ae99a778 --- /dev/null +++ b/packages/abi/src/parser/specifications/index.ts @@ -0,0 +1,2 @@ +export { AbiParserV1 } from './v1/parser'; +export * from './v1/specification'; diff --git a/packages/abi/src/parser/specifications/v1/abi-specification-v1.ts b/packages/abi/src/parser/specifications/v1/abi-specification-v1.ts deleted file mode 100644 index 393c954ffbe..00000000000 --- a/packages/abi/src/parser/specifications/v1/abi-specification-v1.ts +++ /dev/null @@ -1,97 +0,0 @@ -/** - * Types for Fuel JSON ABI Format specification v1, as defined on: - * https://github.com/FuelLabs/fuel-specs/blob/master/src/abi/json-abi-format.md - */ - -// eslint-disable-next-line @typescript-eslint/naming-convention -export interface JsonAbi_V1 { - readonly specVersion: string; - readonly encodingVersion: string; - readonly programType: string; - readonly concreteTypes: readonly ConcreteType[]; - readonly metadataTypes: readonly MetadataType[]; - readonly functions: readonly AbiFunction[]; - readonly loggedTypes: readonly LoggedType[]; - readonly messagesTypes: readonly MessageType[]; - readonly configurables: readonly Configurable[]; -} - -export interface ConcreteType { - readonly type: string; - readonly concreteTypeId: string; - readonly metadataTypeId?: number; - readonly typeArguments?: readonly string[]; -} - -export interface MetadataType { - readonly type: string; - readonly metadataTypeId: number; - readonly components?: readonly Component[]; - readonly typeParameters?: readonly number[]; -} - -export interface Component extends TypeArgument { - readonly name: string; -} - -export interface TypeArgument { - readonly typeId: number | string; // the type metadata declaration ID or type concrete declaration hash based ID of the type of the component. - readonly typeArguments?: readonly TypeArgument[]; -} - -export interface AbiFunction { - readonly name: string; - readonly inputs: readonly AbiFunctionInput[]; - readonly output: string; - readonly attributes: readonly AbiFunctionAttributeTodo[] | null; -} - -export interface AbiFunctionInput { - readonly name: string; - readonly concreteTypeId: string; -} - -type AbiFunctionAttributeTodo = - | StorageAttr - | PayableAttr - | TestAttr - | InlineAttr - | DocCommentAttr - | DocAttr; - -export interface PayableAttr { - readonly name: 'payable'; -} -export interface StorageAttr { - readonly name: 'storage'; - readonly arguments: readonly ('read' | 'write')[]; -} -export interface TestAttr { - readonly name: 'test'; -} -export interface InlineAttr { - readonly name: 'inline'; - readonly arguments: 'never' | 'always'; -} -export interface DocCommentAttr { - readonly name: 'doc-comment'; - readonly arguments: string[]; -} -export interface DocAttr { - readonly name: 'doc'; -} - -export interface LoggedType { - readonly logId: string; - readonly concreteTypeId: string; // the _type concrete declaration_ hash based ID of the value being logged. -} - -export interface MessageType { - readonly message_id: string; - readonly concreteTypeId: string; -} -export interface Configurable { - readonly name: string; - readonly concreteTypeId: string; - readonly offset: number; -} diff --git a/packages/abi/src/parser/specifications/v1/abi-v1.ts b/packages/abi/src/parser/specifications/v1/abi-v1.ts deleted file mode 100644 index 8b052467f0a..00000000000 --- a/packages/abi/src/parser/specifications/v1/abi-v1.ts +++ /dev/null @@ -1,66 +0,0 @@ -import type { - Abi, - AbiConfigurable, - AbiFunction, - AbiLoggedType, - AbiMessageType, -} from '../../abi-parser-types'; - -import type { JsonAbi_V1 } from './abi-specification-v1'; -import { makeResolvedType } from './make-resolved-type'; -import { ResolvableType } from './resolvable-type'; - -export class AbiV1 implements Abi { - public specVersion: string; - public encodingVersion: string; - public programType: string; - public functions: AbiFunction[]; - public loggedTypes: AbiLoggedType[]; - public messageTypes: AbiMessageType[]; - public configurables: AbiConfigurable[]; - - constructor(public jsonAbi: JsonAbi_V1) { - const resolvableTypes = jsonAbi.metadataTypes.map( - (mt) => new ResolvableType(jsonAbi, mt.metadataTypeId, undefined) - ); - - const types = jsonAbi.concreteTypes.map((t) => - makeResolvedType(jsonAbi, resolvableTypes, t.concreteTypeId).toAbiType() - ); - - this.specVersion = jsonAbi.specVersion; - this.encodingVersion = jsonAbi.encodingVersion; - this.programType = jsonAbi.programType; - - this.functions = jsonAbi.functions.map((fn) => ({ - attributes: fn.attributes ?? undefined, - name: fn.name, - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - output: types.find((t) => t.typeId === fn.output)!, - inputs: fn.inputs.map((i) => ({ - name: i.name, - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - type: types.find((t) => t.typeId === i.concreteTypeId)!, - })), - })); - - this.loggedTypes = jsonAbi.loggedTypes.map((lt) => ({ - logId: lt.logId, - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - type: types.find((t) => t.typeId === lt.concreteTypeId)!, - })); - - this.messageTypes = jsonAbi.messagesTypes.map((mt) => ({ - messageId: mt.message_id, - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - type: types.find((t) => t.typeId === mt.concreteTypeId)!, - })); - - this.configurables = jsonAbi.configurables.map((c) => ({ - name: c.name, - offset: c.offset, - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - type: types.find((t) => t.typeId === c.concreteTypeId)!, - })); - } -} diff --git a/packages/abi/src/parser/specifications/v1/make-resolved-type.ts b/packages/abi/src/parser/specifications/v1/make-resolved-type.ts index d0a3ce0c98d..1ef8cf2249f 100644 --- a/packages/abi/src/parser/specifications/v1/make-resolved-type.ts +++ b/packages/abi/src/parser/specifications/v1/make-resolved-type.ts @@ -1,15 +1,15 @@ -import type { ConcreteType, JsonAbi_V1 } from './abi-specification-v1'; import type { ResolvableType } from './resolvable-type'; import { ResolvedType } from './resolved-type'; +import type { AbiConcreteTypeV1, AbiSpecificationV1 } from './specification'; export function makeResolvedType( - abi: JsonAbi_V1, + abi: AbiSpecificationV1, resolvableTypes: ResolvableType[], concreteTypeId: string ) { const concreteType = abi.concreteTypes.find( (ct) => ct.concreteTypeId === concreteTypeId - ) as ConcreteType; + ) as AbiConcreteTypeV1; const resolvableType = resolvableTypes.find( (rmt) => rmt.metadataTypeId === concreteType.metadataTypeId diff --git a/packages/abi/src/parser/specifications/v1/parser.ts b/packages/abi/src/parser/specifications/v1/parser.ts new file mode 100644 index 00000000000..f0598b4ebf6 --- /dev/null +++ b/packages/abi/src/parser/specifications/v1/parser.ts @@ -0,0 +1,60 @@ +import type { Abi } from '../../abi'; + +import { makeResolvedType } from './make-resolved-type'; +import { ResolvableType } from './resolvable-type'; +import type { + AbiConfigurableV1, + AbiFunctionInputV1, + AbiFunctionV1, + AbiLoggedTypeV1, + AbiMessageTypeV1, + AbiSpecificationV1, +} from './specification'; + +export class AbiParserV1 { + static parse(abi: AbiSpecificationV1): Abi { + const resolvableTypes = abi.metadataTypes.map( + (metadataType) => new ResolvableType(abi, metadataType.metadataTypeId, undefined) + ); + + const types = abi.concreteTypes.map((t) => + makeResolvedType(abi, resolvableTypes, t.concreteTypeId).toAbiType() + ); + + const getType = (typeId: string | number) => { + const type = types.find((t) => t.typeId === typeId); + if (type === undefined) { + throw new Error(`Type with typeId ${typeId} not found`); + } + return type; + }; + + return { + specVersion: abi.specVersion, + encodingVersion: abi.encodingVersion, + programType: abi.programType, + functions: abi.functions.map((fn: AbiFunctionV1) => ({ + attributes: fn.attributes ?? undefined, + name: fn.name, + output: getType(fn.output), + inputs: fn.inputs.map((input: AbiFunctionInputV1) => ({ + name: input.name, + type: getType(input.concreteTypeId), + })), + })), + loggedTypes: abi.loggedTypes.map((loggedType: AbiLoggedTypeV1) => ({ + logId: loggedType.logId, + type: getType(loggedType.concreteTypeId), + })), + messageTypes: abi.messagesTypes.map((messageType: AbiMessageTypeV1) => ({ + messageId: messageType.messageId, + type: getType(messageType.concreteTypeId), + })), + configurables: abi.configurables.map((configurable: AbiConfigurableV1) => ({ + name: configurable.name, + offset: configurable.offset, + type: getType(configurable.concreteTypeId), + })), + }; + } +} diff --git a/packages/abi/src/parser/specifications/v1/resolvable-type.ts b/packages/abi/src/parser/specifications/v1/resolvable-type.ts index 9ec941931cc..13c839a362d 100644 --- a/packages/abi/src/parser/specifications/v1/resolvable-type.ts +++ b/packages/abi/src/parser/specifications/v1/resolvable-type.ts @@ -1,11 +1,11 @@ -import type { - MetadataType, - Component, - TypeArgument, - ConcreteType, - JsonAbi_V1, -} from './abi-specification-v1'; import { ResolvedType } from './resolved-type'; +import type { + AbiComponentV1, + AbiConcreteTypeV1, + AbiMetadataTypeV1, + AbiSpecificationV1, + AbiTypeArgumentV1, +} from './specification'; export function isVector(type: string) { const MATCH_REGEX: RegExp = /^struct (std::vec::)?Vec/m; @@ -22,18 +22,18 @@ interface ResolvableComponent { } export class ResolvableType { - private metadataType: MetadataType; + private metadataType: AbiMetadataTypeV1; type: string; components: ResolvableComponent[] | undefined; constructor( - abi: JsonAbi_V1, + abi: AbiSpecificationV1, public metadataTypeId: number, public typeParamsArgsMap: Array<[number, ResolvedType | ResolvableType]> | undefined ) { const metadataType = abi.metadataTypes.find( (tm) => tm.metadataTypeId === metadataTypeId - ) as MetadataType; + ) as AbiMetadataTypeV1; this.metadataType = metadataType; this.type = metadataType.type; @@ -52,15 +52,15 @@ export class ResolvableType { return c.typeArguments?.[0]; } return c; - }) as Component[]; + }) as AbiComponentV1[]; } this.components = components?.map((c) => ResolvableType.handleComponent(abi, c)); } private static mapTypeParametersAndArgs( - abi: JsonAbi_V1, - metadataType: MetadataType, + abi: AbiSpecificationV1, + metadataType: AbiMetadataTypeV1, args: (ResolvableType | ResolvedType)[] | undefined ): Array<[number, ResolvedType | ResolvableType]> | undefined { if (!args) { @@ -74,22 +74,22 @@ export class ResolvableType { } private static handleComponent( - abi: JsonAbi_V1, - c: Component | TypeArgument + abi: AbiSpecificationV1, + c: AbiComponentV1 | AbiTypeArgumentV1 ): ResolvableComponent { - const name = (c as Component).name; + const name = (c as AbiComponentV1).name; if (typeof c.typeId === 'string') { const concreteType = abi.concreteTypes.find( (ct) => ct.concreteTypeId === c.typeId - ) as ConcreteType; + ) as AbiConcreteTypeV1; return { name, type: ResolvableType.resolveConcreteType(abi, concreteType), }; } - const mt = abi.metadataTypes.find((tm) => tm.metadataTypeId === c.typeId) as MetadataType; + const mt = abi.metadataTypes.find((tm) => tm.metadataTypeId === c.typeId) as AbiMetadataTypeV1; return { name, @@ -97,7 +97,10 @@ export class ResolvableType { }; } - private static resolveConcreteType(abi: JsonAbi_V1, type: ConcreteType): ResolvedType { + private static resolveConcreteType( + abi: AbiSpecificationV1, + type: AbiConcreteTypeV1 + ): ResolvedType { const concreteType = type; if (concreteType.metadataTypeId === undefined) { return new ResolvedType(concreteType.type, concreteType.concreteTypeId, undefined, undefined); @@ -112,12 +115,12 @@ export class ResolvableType { const metadataType = abi.metadataTypes.find( (mt) => mt.metadataTypeId === concreteType.metadataTypeId - ) as MetadataType; + ) as AbiMetadataTypeV1; const concreteTypeArgs = concreteType.typeArguments.map((ta) => { const concreteTypeArg = abi.concreteTypes.find( (ct) => ct.concreteTypeId === ta - ) as ConcreteType; + ) as AbiConcreteTypeV1; return this.resolveConcreteType(abi, concreteTypeArg); }); @@ -129,9 +132,9 @@ export class ResolvableType { } private static handleMetadataType( - abi: JsonAbi_V1, - mt: MetadataType, - typeArguments: Component['typeArguments'] + abi: AbiSpecificationV1, + mt: AbiMetadataTypeV1, + typeArguments: AbiComponentV1['typeArguments'] ): ResolvableType | ResolvedType { if (genericRegEx.test(mt.type)) { return new ResolvableType(abi, mt.metadataTypeId, undefined); @@ -209,11 +212,11 @@ export class ResolvableType { }); } - public resolve(abi: JsonAbi_V1, concreteType: ConcreteType) { + public resolve(abi: AbiSpecificationV1, concreteType: AbiConcreteTypeV1) { const concreteTypeArgs = concreteType.typeArguments?.map((ta) => { const concreteTypeArg = abi.concreteTypes.find( (ct) => ct.concreteTypeId === ta - ) as ConcreteType; + ) as AbiConcreteTypeV1; return ResolvableType.resolveConcreteType(abi, concreteTypeArg); }); diff --git a/packages/abi/src/parser/specifications/v1/resolved-type.ts b/packages/abi/src/parser/specifications/v1/resolved-type.ts index 1c3d025dff2..4ec58e1b2fe 100644 --- a/packages/abi/src/parser/specifications/v1/resolved-type.ts +++ b/packages/abi/src/parser/specifications/v1/resolved-type.ts @@ -1,4 +1,4 @@ -import type { AbiType } from '../../abi-parser-types'; +import type { AbiType } from '../../abi'; export interface ResolvedComponent { name: string; diff --git a/packages/abi/src/parser/specifications/v1/specification.ts b/packages/abi/src/parser/specifications/v1/specification.ts new file mode 100644 index 00000000000..5c718108005 --- /dev/null +++ b/packages/abi/src/parser/specifications/v1/specification.ts @@ -0,0 +1,101 @@ +/** + * Types for Fuel JSON ABI Format specification v1, as defined on: + * https://github.com/FuelLabs/fuel-specs/blob/master/src/abi/json-abi-format.md + */ +export interface AbiSpecificationV1 { + readonly specVersion: '1'; + readonly encodingVersion: string; + readonly programType: string; + readonly concreteTypes: readonly AbiConcreteTypeV1[]; + readonly metadataTypes: readonly AbiMetadataTypeV1[]; + readonly functions: readonly AbiFunctionV1[]; + readonly loggedTypes: readonly AbiLoggedTypeV1[]; + readonly messagesTypes: readonly AbiMessageTypeV1[]; + readonly configurables: readonly AbiConfigurableV1[]; +} + +export interface AbiConcreteTypeV1 { + readonly type: string; + readonly concreteTypeId: string; + readonly metadataTypeId?: number; + readonly typeArguments?: readonly string[]; +} + +export interface AbiMetadataTypeV1 { + readonly type: string; + readonly metadataTypeId: number; + readonly components?: readonly AbiComponentV1[]; + readonly typeParameters?: readonly number[]; +} + +export interface AbiComponentV1 extends AbiTypeArgumentV1 { + readonly name: string; +} + +export interface AbiTypeArgumentV1 { + readonly typeId: number | string; // the type metadata declaration ID or type concrete declaration hash based ID of the type of the component. + readonly typeArguments?: readonly AbiTypeArgumentV1[]; +} + +export interface AbiFunctionV1 { + readonly name: string; + readonly inputs: readonly AbiFunctionInputV1[]; + readonly output: string; + readonly attributes: readonly AbiFunctionAttributeV1[] | null; +} + +export interface AbiFunctionInputV1 { + readonly name: string; + readonly concreteTypeId: string; +} + +export interface AbiLoggedTypeV1 { + readonly logId: string; + // the _type concrete declaration_ hash based ID of the value being logged. + readonly concreteTypeId: string; +} + +export interface AbiMessageTypeV1 { + readonly messageId: string; + readonly concreteTypeId: string; +} +export interface AbiConfigurableV1 { + readonly name: string; + readonly concreteTypeId: string; + readonly offset: number; +} + +export type AbiFunctionAttributeV1 = + | StorageAttrV1 + | PayableAttrV1 + | TestAttrV1 + | InlineAttrV1 + | DocCommentAttrV1 + | DocAttrV1; + +export interface PayableAttrV1 { + readonly name: 'payable'; +} + +export interface StorageAttrV1 { + readonly name: 'storage'; + readonly arguments: readonly ('read' | 'write')[]; +} + +export interface TestAttrV1 { + readonly name: 'test'; +} + +export interface InlineAttrV1 { + readonly name: 'inline'; + readonly arguments: 'never' | 'always'; +} + +export interface DocCommentAttrV1 { + readonly name: 'doc-comment'; + readonly arguments: string[]; +} + +export interface DocAttrV1 { + readonly name: 'doc'; +} From 51f78578048f7ba9bd4cffad3053fa717307362e Mon Sep 17 00:00:00 2001 From: nedsalk Date: Thu, 3 Oct 2024 14:56:20 +0200 Subject: [PATCH 004/126] Add `AbiTypeMetadata` and fix bug --- packages/abi/src/parser/abi.ts | 39 +++++++----- .../specifications/v1/make-resolved-type.ts | 8 ++- .../src/parser/specifications/v1/parser.ts | 12 ++-- .../specifications/v1/resolvable-type.ts | 63 +++++++++++++------ .../parser/specifications/v1/resolved-type.ts | 11 +++- 5 files changed, 92 insertions(+), 41 deletions(-) diff --git a/packages/abi/src/parser/abi.ts b/packages/abi/src/parser/abi.ts index afe064c75a0..962d0bec2a0 100644 --- a/packages/abi/src/parser/abi.ts +++ b/packages/abi/src/parser/abi.ts @@ -1,10 +1,30 @@ +export interface Abi { + specVersion: string; + encodingVersion: string; + programType: string; + metadataTypes: AbiTypeMetadata[]; + types: AbiType[]; + functions: AbiFunction[]; + loggedTypes: AbiLoggedType[]; + messageTypes: AbiMessageType[]; + configurables: AbiConfigurable[]; +} + export interface AbiType { - // Concrete type ID - typeId: string; - // This will reference the metadata type - // Fallback to concrete type when no metadata type is referenced (i.e. for built in types) swayType: string; + concreteTypeId: string; components?: AbiTypeComponent[]; + metadata?: { + metadataTypeId: number; + typeArguments?: AbiType[]; + }; +} + +export interface AbiTypeMetadata { + metadataTypeId: number; + swayType: string; + components?: { name: string; type: AbiType | AbiTypeMetadata }[]; + typeParameters?: AbiTypeMetadata[]; } export interface AbiTypeComponent { @@ -40,17 +60,6 @@ export interface AbiConfigurable { type: AbiType; } -export interface Abi { - specVersion: string; - encodingVersion: string; - programType: string; - - functions: AbiFunction[]; - loggedTypes: AbiLoggedType[]; - messageTypes: AbiMessageType[]; - configurables: AbiConfigurable[]; -} - type AbiFunctionAttribute = | StorageAttr | PayableAttr diff --git a/packages/abi/src/parser/specifications/v1/make-resolved-type.ts b/packages/abi/src/parser/specifications/v1/make-resolved-type.ts index 1ef8cf2249f..bee7f889eaf 100644 --- a/packages/abi/src/parser/specifications/v1/make-resolved-type.ts +++ b/packages/abi/src/parser/specifications/v1/make-resolved-type.ts @@ -17,5 +17,11 @@ export function makeResolvedType( return resolvableType ? resolvableType.resolve(abi, concreteType) - : new ResolvedType(concreteType.type, concreteType.concreteTypeId, undefined, undefined); + : new ResolvedType( + concreteType.type, + concreteType.concreteTypeId, + undefined, + undefined, + undefined + ); } diff --git a/packages/abi/src/parser/specifications/v1/parser.ts b/packages/abi/src/parser/specifications/v1/parser.ts index f0598b4ebf6..b07d0a163ec 100644 --- a/packages/abi/src/parser/specifications/v1/parser.ts +++ b/packages/abi/src/parser/specifications/v1/parser.ts @@ -13,16 +13,18 @@ import type { export class AbiParserV1 { static parse(abi: AbiSpecificationV1): Abi { - const resolvableTypes = abi.metadataTypes.map( - (metadataType) => new ResolvableType(abi, metadataType.metadataTypeId, undefined) - ); + const resolvableTypes = abi.metadataTypes + .map((metadataType) => new ResolvableType(abi, metadataType.metadataTypeId, undefined)) + .filter( + (x) => x.type !== 'struct std::vec::RawVec' && x.type !== 'struct std::bytes::RawBytes' + ); const types = abi.concreteTypes.map((t) => makeResolvedType(abi, resolvableTypes, t.concreteTypeId).toAbiType() ); const getType = (typeId: string | number) => { - const type = types.find((t) => t.typeId === typeId); + const type = types.find((t) => t.concreteTypeId === typeId); if (type === undefined) { throw new Error(`Type with typeId ${typeId} not found`); } @@ -30,6 +32,8 @@ export class AbiParserV1 { }; return { + metadataTypes: resolvableTypes.map((rt) => rt.toAbiType()), + types, specVersion: abi.specVersion, encodingVersion: abi.encodingVersion, programType: abi.programType, diff --git a/packages/abi/src/parser/specifications/v1/resolvable-type.ts b/packages/abi/src/parser/specifications/v1/resolvable-type.ts index 13c839a362d..37be5b1caa2 100644 --- a/packages/abi/src/parser/specifications/v1/resolvable-type.ts +++ b/packages/abi/src/parser/specifications/v1/resolvable-type.ts @@ -1,3 +1,6 @@ +import { swayTypeMatchers } from '../../../matchers/sway-type-matchers'; +import type { AbiTypeMetadata } from '../../abi'; + import { ResolvedType } from './resolved-type'; import type { AbiComponentV1, @@ -7,15 +10,6 @@ import type { AbiTypeArgumentV1, } from './specification'; -export function isVector(type: string) { - const MATCH_REGEX: RegExp = /^struct (std::vec::)?Vec/m; - const IGNORE_REGEX: RegExp = /^struct (std::vec::)?RawVec$/m; - - return MATCH_REGEX.test(type) && !IGNORE_REGEX.test(type); -} - -export const genericRegEx = /^generic.+$/; - interface ResolvableComponent { name: string; type: ResolvableType | ResolvedType; @@ -26,6 +20,15 @@ export class ResolvableType { type: string; components: ResolvableComponent[] | undefined; + toAbiType(): AbiTypeMetadata { + return { + metadataTypeId: this.metadataTypeId, + components: this.components?.map((c) => ({ name: c.name, type: c.type.toAbiType() })), + swayType: this.type, + typeParameters: this.typeParamsArgsMap?.map(([, t]) => (t as ResolvableType).toAbiType()), + }; + } + constructor( abi: AbiSpecificationV1, public metadataTypeId: number, @@ -46,7 +49,7 @@ export class ResolvableType { let components = metadataType.components; - if (isVector(metadataType.type)) { + if (swayTypeMatchers.vector(metadataType.type)) { components = components?.map((c) => { if (c.name === 'buf') { return c.typeArguments?.[0]; @@ -55,7 +58,7 @@ export class ResolvableType { }) as AbiComponentV1[]; } - this.components = components?.map((c) => ResolvableType.handleComponent(abi, c)); + this.components = components?.map((c) => ResolvableType.handleComponent(this, abi, c)); } private static mapTypeParametersAndArgs( @@ -74,6 +77,7 @@ export class ResolvableType { } private static handleComponent( + parent: ResolvableType, abi: AbiSpecificationV1, c: AbiComponentV1 | AbiTypeArgumentV1 ): ResolvableComponent { @@ -93,7 +97,7 @@ export class ResolvableType { return { name, - type: ResolvableType.handleMetadataType(abi, mt, c.typeArguments), + type: ResolvableType.handleMetadataType(parent, abi, mt, c.typeArguments), }; } @@ -103,7 +107,13 @@ export class ResolvableType { ): ResolvedType { const concreteType = type; if (concreteType.metadataTypeId === undefined) { - return new ResolvedType(concreteType.type, concreteType.concreteTypeId, undefined, undefined); + return new ResolvedType( + concreteType.type, + concreteType.concreteTypeId, + undefined, + undefined, + undefined + ); } if (!concreteType.typeArguments) { @@ -132,12 +142,17 @@ export class ResolvableType { } private static handleMetadataType( + parent: ResolvableType, abi: AbiSpecificationV1, mt: AbiMetadataTypeV1, typeArguments: AbiComponentV1['typeArguments'] ): ResolvableType | ResolvedType { - if (genericRegEx.test(mt.type)) { - return new ResolvableType(abi, mt.metadataTypeId, undefined); + if (swayTypeMatchers.generic(mt.type)) { + const resolvedTypeParameter = parent.typeParamsArgsMap?.find( + ([tp]) => tp === mt.metadataTypeId + )?.[1]; + + return resolvedTypeParameter ?? new ResolvableType(abi, mt.metadataTypeId, undefined); } if (!mt.components) { @@ -152,7 +167,7 @@ export class ResolvableType { ); } - const typeArgs = typeArguments?.map((ta) => this.handleComponent(abi, ta).type); + const typeArgs = typeArguments?.map((ta) => this.handleComponent(parent, abi, ta).type); const resolvable = new ResolvableType( abi, @@ -191,10 +206,15 @@ export class ResolvableType { type: resolvedGenericType, }; } - return { name: c.name, type: c.type.resolveInternal(c.type.metadataTypeId, typeArgs) }; }); - return new ResolvedType(this.metadataType.type, typeId, components, typeArgs); + return new ResolvedType( + this.metadataType.type, + typeId, + components, + typeArgs, + this.metadataTypeId + ); } private resolveTypeArgs( @@ -208,7 +228,12 @@ export class ResolvableType { } const resolved = typeParamsArgsMap?.find(([tp]) => tp === value.metadataTypeId)?.[1]; - return [+typeParameter, resolved as ResolvedType]; + + if (resolved) { + return [+typeParameter, resolved]; + } + + return [+typeParameter, value.resolveInternal(value.metadataTypeId, typeParamsArgsMap)]; }); } diff --git a/packages/abi/src/parser/specifications/v1/resolved-type.ts b/packages/abi/src/parser/specifications/v1/resolved-type.ts index 4ec58e1b2fe..124ce033e0c 100644 --- a/packages/abi/src/parser/specifications/v1/resolved-type.ts +++ b/packages/abi/src/parser/specifications/v1/resolved-type.ts @@ -10,14 +10,21 @@ export class ResolvedType { public type: string, public typeId: string | number, public components: ResolvedComponent[] | undefined, - public typeParamsArgsMap: Array<[number, ResolvedType]> | undefined + public typeParamsArgsMap: Array<[number, ResolvedType]> | undefined, + private metadataTypeId: number | undefined ) {} public toAbiType(): AbiType { return { swayType: this.type, - typeId: this.typeId as string, + concreteTypeId: this.typeId as string, components: this.components?.map((c) => ({ name: c.name, type: c.type.toAbiType() })), + metadata: this.metadataTypeId + ? { + metadataTypeId: this.metadataTypeId, + typeArguments: this.typeParamsArgsMap?.map((tpa) => tpa[1].toAbiType()), + } + : undefined, }; } } From 8fc8e0885f5d8c6c9baad8cd8c0e67aaf10fe773 Mon Sep 17 00:00:00 2001 From: Peter Smith Date: Mon, 25 Nov 2024 19:39:47 +0000 Subject: [PATCH 005/126] chore: adjust attributes to match spec --- packages/abi/package.json | 4 ++- packages/abi/src/parser/abi.ts | 11 ++---- .../parser/specifications/v1/map-attribute.ts | 34 +++++++++++++++++++ .../src/parser/specifications/v1/parser.ts | 3 +- .../parser/specifications/v1/specification.ts | 9 ++--- pnpm-lock.yaml | 6 +++- 6 files changed, 50 insertions(+), 17 deletions(-) create mode 100644 packages/abi/src/parser/specifications/v1/map-attribute.ts diff --git a/packages/abi/package.json b/packages/abi/package.json index 8ad5a2b2cbd..b650ae9074f 100644 --- a/packages/abi/package.json +++ b/packages/abi/package.json @@ -25,6 +25,8 @@ "build": "tsup", "postbuild": "tsx ../../scripts/postbuild.ts" }, - "dependencies": {}, + "dependencies": { + "@fuel-ts/utils": "workspace:*" + }, "devDependencies": {} } diff --git a/packages/abi/src/parser/abi.ts b/packages/abi/src/parser/abi.ts index 962d0bec2a0..78dd97973af 100644 --- a/packages/abi/src/parser/abi.ts +++ b/packages/abi/src/parser/abi.ts @@ -60,13 +60,12 @@ export interface AbiConfigurable { type: AbiType; } -type AbiFunctionAttribute = +export type AbiFunctionAttribute = | StorageAttr | PayableAttr | TestAttr | InlineAttr - | DocCommentAttr - | DocAttr; + | DocCommentAttr; export interface PayableAttr { readonly name: 'payable'; @@ -87,9 +86,5 @@ export interface InlineAttr { export interface DocCommentAttr { readonly name: 'doc-comment'; - readonly arguments: string[]; -} - -export interface DocAttr { - readonly name: 'doc'; + readonly arguments: readonly string[]; } diff --git a/packages/abi/src/parser/specifications/v1/map-attribute.ts b/packages/abi/src/parser/specifications/v1/map-attribute.ts new file mode 100644 index 00000000000..59e5dfe4650 --- /dev/null +++ b/packages/abi/src/parser/specifications/v1/map-attribute.ts @@ -0,0 +1,34 @@ +import { assertUnreachable } from '@fuel-ts/utils'; + +import type { AbiFunctionAttribute } from '../../abi'; + +import type { AbiFunctionAttributeV1 } from './specification'; + +export const mapAttribute = (attribute: AbiFunctionAttributeV1): AbiFunctionAttribute => { + switch (attribute.name) { + case 'inline': + return { + name: attribute.name, + arguments: attribute.arguments[0] === 'never' ? 'never' : 'always', + }; + + case 'storage': + return { + name: attribute.name, + arguments: attribute.arguments, + }; + + case 'doc-comment': + return { + name: attribute.name, + arguments: attribute.arguments, + }; + + case 'payable': + case 'test': + return { name: attribute.name }; + + default: + return assertUnreachable(attribute); + } +}; diff --git a/packages/abi/src/parser/specifications/v1/parser.ts b/packages/abi/src/parser/specifications/v1/parser.ts index b07d0a163ec..3c6d31d3eac 100644 --- a/packages/abi/src/parser/specifications/v1/parser.ts +++ b/packages/abi/src/parser/specifications/v1/parser.ts @@ -1,6 +1,7 @@ import type { Abi } from '../../abi'; import { makeResolvedType } from './make-resolved-type'; +import { mapAttribute } from './map-attribute'; import { ResolvableType } from './resolvable-type'; import type { AbiConfigurableV1, @@ -38,7 +39,7 @@ export class AbiParserV1 { encodingVersion: abi.encodingVersion, programType: abi.programType, functions: abi.functions.map((fn: AbiFunctionV1) => ({ - attributes: fn.attributes ?? undefined, + attributes: fn.attributes?.map(mapAttribute) ?? undefined, name: fn.name, output: getType(fn.output), inputs: fn.inputs.map((input: AbiFunctionInputV1) => ({ diff --git a/packages/abi/src/parser/specifications/v1/specification.ts b/packages/abi/src/parser/specifications/v1/specification.ts index 5c718108005..50d3d8940a1 100644 --- a/packages/abi/src/parser/specifications/v1/specification.ts +++ b/packages/abi/src/parser/specifications/v1/specification.ts @@ -70,11 +70,11 @@ export type AbiFunctionAttributeV1 = | PayableAttrV1 | TestAttrV1 | InlineAttrV1 - | DocCommentAttrV1 - | DocAttrV1; + | DocCommentAttrV1; export interface PayableAttrV1 { readonly name: 'payable'; + readonly arguments?: readonly []; } export interface StorageAttrV1 { @@ -84,6 +84,7 @@ export interface StorageAttrV1 { export interface TestAttrV1 { readonly name: 'test'; + readonly arguments?: readonly []; } export interface InlineAttrV1 { @@ -95,7 +96,3 @@ export interface DocCommentAttrV1 { readonly name: 'doc-comment'; readonly arguments: string[]; } - -export interface DocAttrV1 { - readonly name: 'doc'; -} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6848fac5bc9..a270ad75d72 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -650,7 +650,11 @@ importers: specifier: workspace:* version: link:../tsup - packages/abi: {} + packages/abi: + dependencies: + '@fuel-ts/utils': + specifier: workspace:* + version: link:../utils packages/abi-coder: dependencies: From 8e5781e03e4c5816a2cf5a83c7178e9ffb8298f9 Mon Sep 17 00:00:00 2001 From: Peter Smith Date: Wed, 27 Nov 2024 17:19:27 +0000 Subject: [PATCH 006/126] chore: added `FuelError` --- packages/abi/package.json | 1 + packages/abi/src/matchers/sway-type-matchers.ts | 7 ++++++- packages/abi/src/parser/abi-parser.ts | 14 ++++++++++---- .../abi/src/parser/specifications/v1/parser.ts | 7 ++++++- packages/errors/src/error-codes.ts | 1 + pnpm-lock.yaml | 3 +++ 6 files changed, 27 insertions(+), 6 deletions(-) diff --git a/packages/abi/package.json b/packages/abi/package.json index b650ae9074f..0fd951ba435 100644 --- a/packages/abi/package.json +++ b/packages/abi/package.json @@ -26,6 +26,7 @@ "postbuild": "tsx ../../scripts/postbuild.ts" }, "dependencies": { + "@fuel-ts/errors": "workspace:*", "@fuel-ts/utils": "workspace:*" }, "devDependencies": {} diff --git a/packages/abi/src/matchers/sway-type-matchers.ts b/packages/abi/src/matchers/sway-type-matchers.ts index db3dddbda3a..944c2bb7f29 100644 --- a/packages/abi/src/matchers/sway-type-matchers.ts +++ b/packages/abi/src/matchers/sway-type-matchers.ts @@ -1,3 +1,5 @@ +import { FuelError } from '@fuel-ts/errors'; + export type SwayType = | 'void' | 'bool' @@ -117,6 +119,9 @@ export function createMatcher(mappings: Record) { } } - throw new Error(`Matcher not found for sway type ${swayType}.`); + throw new FuelError( + FuelError.CODES.NOT_IMPLEMENTED, + `Matcher not found for Sway type "${swayType}".` + ); }; } diff --git a/packages/abi/src/parser/abi-parser.ts b/packages/abi/src/parser/abi-parser.ts index 2e329b099a7..ab5d40eebb8 100644 --- a/packages/abi/src/parser/abi-parser.ts +++ b/packages/abi/src/parser/abi-parser.ts @@ -1,3 +1,5 @@ +import { FuelError } from '@fuel-ts/errors'; + import type { Abi } from './abi'; import type { AbiSpecificationV1 } from './specifications'; import { AbiParserV1 } from './specifications'; @@ -23,14 +25,18 @@ export class AbiParser { */ static parse(abi: AbiSpecification): Abi { if (typeof abi.specVersion !== 'string') { - // TODO: change to FuelError - throw new Error('Invalid ABI: specVersion is not a string'); + throw new FuelError( + FuelError.CODES.ABI_SPECIFICATION_INVALID, + 'Invalid ABI: "specVersion" is not a string' + ); } const parse = AbiParser.specifications[abi.specVersion]; if (!parse) { - // TODO: change to FuelError - throw new Error(`Unsupported ABI specVersion: ${abi.specVersion}`); + throw new FuelError( + FuelError.CODES.ABI_SPECIFICATION_INVALID, + `Invalid ABI: Unsupported ABI "specVersion": ${abi.specVersion}` + ); } return parse(abi); diff --git a/packages/abi/src/parser/specifications/v1/parser.ts b/packages/abi/src/parser/specifications/v1/parser.ts index 3c6d31d3eac..e94345a0ca3 100644 --- a/packages/abi/src/parser/specifications/v1/parser.ts +++ b/packages/abi/src/parser/specifications/v1/parser.ts @@ -1,3 +1,5 @@ +import { FuelError } from '@fuel-ts/errors'; + import type { Abi } from '../../abi'; import { makeResolvedType } from './make-resolved-type'; @@ -27,7 +29,10 @@ export class AbiParserV1 { const getType = (typeId: string | number) => { const type = types.find((t) => t.concreteTypeId === typeId); if (type === undefined) { - throw new Error(`Type with typeId ${typeId} not found`); + throw new FuelError( + FuelError.CODES.TYPE_ID_NOT_FOUND, + `Type with typeId ${typeId} not found` + ); } return type; }; diff --git a/packages/errors/src/error-codes.ts b/packages/errors/src/error-codes.ts index 2959d4e6212..e867a1ecfcb 100644 --- a/packages/errors/src/error-codes.ts +++ b/packages/errors/src/error-codes.ts @@ -13,6 +13,7 @@ export enum ErrorCode { TYPE_NOT_SUPPORTED = 'type-not-supported', INVALID_DECODE_VALUE = 'invalid-decode-value', JSON_ABI_ERROR = 'json-abi-error', + ABI_SPECIFICATION_INVALID = 'abi-specification-invalid', TYPE_ID_NOT_FOUND = 'type-id-not-found', BIN_FILE_NOT_FOUND = 'bin-file-not-found', CODER_NOT_FOUND = 'coder-not-found', diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a1727acd44c..527c4987936 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -643,6 +643,9 @@ importers: packages/abi: dependencies: + '@fuel-ts/errors': + specifier: workspace:* + version: link:../errors '@fuel-ts/utils': specifier: workspace:* version: link:../utils From f67b4a8eda58295cd3cb9a705b7ad1a837526843 Mon Sep 17 00:00:00 2001 From: Peter Smith Date: Wed, 27 Nov 2024 18:11:10 +0000 Subject: [PATCH 007/126] chore: fixed test for matchers --- apps/docs/src/guide/errors/index.md | 6 + .../src/matchers/sway-type-matchers.test.ts | 127 ++++++++++-------- .../abi/src/matchers/sway-type-matchers.ts | 2 +- packages/errors/src/error-codes.ts | 1 + 4 files changed, 78 insertions(+), 58 deletions(-) diff --git a/apps/docs/src/guide/errors/index.md b/apps/docs/src/guide/errors/index.md index 77772baa983..c20604f3217 100644 --- a/apps/docs/src/guide/errors/index.md +++ b/apps/docs/src/guide/errors/index.md @@ -318,6 +318,12 @@ In cases where the error hasn't been mapped yet, this code will be used. If you believe you found a bug, please report the [issue](https://github.com/FuelLabs/fuels-ts/issues/new/choose) to the team. +### `MATCHER_NOT_FOUND` + +When a matcher is not found for a given Sway type. + +Check that the Sway type is correct and exists in the ABI. + ### `MAX_INPUTS_EXCEEDED` When the number of transaction inputs exceeds the maximum limit allowed by the blockchain. diff --git a/packages/abi/src/matchers/sway-type-matchers.test.ts b/packages/abi/src/matchers/sway-type-matchers.test.ts index 03dc81f169c..46cc40cd475 100644 --- a/packages/abi/src/matchers/sway-type-matchers.test.ts +++ b/packages/abi/src/matchers/sway-type-matchers.test.ts @@ -1,3 +1,6 @@ +import { FuelError } from '@fuel-ts/errors'; +import { expectToThrowFuelError } from '@fuel-ts/errors/test-utils'; + import type { SwayType, swayTypeMatchers } from './sway-type-matchers'; import { createMatcher } from './sway-type-matchers'; @@ -31,14 +34,20 @@ const testMappings: Record = const matcher = createMatcher(testMappings); -function verifyOtherMatchersDontMatch(key: keyof typeof testMappings, swayType: string) { +async function verifyOtherMatchersDontMatch(key: keyof typeof testMappings, swayType: string) { const testMappingsWithoutKey = Object.fromEntries( Object.entries(testMappings).filter(([k]) => k !== key) ); const verifier = createMatcher(testMappingsWithoutKey as Record); - expect(() => verifier({ swayType })).toThrow(`Matcher not found for sway type ${swayType}.`); + await expectToThrowFuelError( + () => verifier({ swayType }), + new FuelError( + FuelError.CODES.MATCHER_NOT_FOUND, + `Matcher not found for Sway type "${swayType}".` + ) + ); } /** @@ -46,222 +55,226 @@ function verifyOtherMatchersDontMatch(key: keyof typeof testMappings, swayType: * @group browser */ describe('sway type matchers', () => { - test('void', () => { + test('void', async () => { const key = 'void'; const swayType = '()'; expect(matcher({ swayType })).toEqual(`${key}-matched`); - verifyOtherMatchersDontMatch(key, swayType); + await verifyOtherMatchersDontMatch(key, swayType); }); - test('bool', () => { + test('bool', async () => { const key = 'bool'; const swayType = 'bool'; expect(matcher({ swayType })).toEqual(`${key}-matched`); - verifyOtherMatchersDontMatch(key, swayType); + await verifyOtherMatchersDontMatch(key, swayType); }); - test('u8', () => { + test('u8', async () => { const key = 'u8'; const swayType = 'u8'; expect(matcher({ swayType })).toEqual(`${key}-matched`); - verifyOtherMatchersDontMatch(key, swayType); + await verifyOtherMatchersDontMatch(key, swayType); }); - test('u16', () => { + test('u16', async () => { const key = 'u16'; const swayType = 'u16'; expect(matcher({ swayType })).toEqual(`${key}-matched`); - verifyOtherMatchersDontMatch(key, swayType); + await verifyOtherMatchersDontMatch(key, swayType); }); - test('u32', () => { + test('u32', async () => { const key = 'u32'; const swayType = 'u32'; expect(matcher({ swayType })).toEqual(`${key}-matched`); - verifyOtherMatchersDontMatch(key, swayType); + await verifyOtherMatchersDontMatch(key, swayType); }); - test('u64', () => { + test('u64', async () => { const key = 'u64'; const swayType = 'u64'; expect(matcher({ swayType })).toEqual(`${key}-matched`); - verifyOtherMatchersDontMatch(key, swayType); + await verifyOtherMatchersDontMatch(key, swayType); }); - test('u256', () => { + test('u256', async () => { const key = 'u256'; const swayType = 'u256'; expect(matcher({ swayType })).toEqual(`${key}-matched`); - verifyOtherMatchersDontMatch(key, swayType); + await verifyOtherMatchersDontMatch(key, swayType); }); - test('b256', () => { + test('b256', async () => { const key = 'b256'; const swayType = 'b256'; expect(matcher({ swayType })).toEqual(`${key}-matched`); - verifyOtherMatchersDontMatch(key, swayType); + await verifyOtherMatchersDontMatch(key, swayType); }); - test('string', () => { + test('string', async () => { const key = 'string'; const swayType = 'str[5]'; expect(matcher({ swayType })).toEqual(`${key}-matched`); - verifyOtherMatchersDontMatch(key, swayType); + await verifyOtherMatchersDontMatch(key, swayType); }); - test('array', () => { + test('array', async () => { const key = 'array'; const swayType = '[_; 3]'; expect(matcher({ swayType })).toEqual(`${key}-matched`); - verifyOtherMatchersDontMatch(key, swayType); + await verifyOtherMatchersDontMatch(key, swayType); }); - test('tuple', () => { + test('tuple', async () => { const key = 'tuple'; const swayType = '(_, _, _)'; expect(matcher({ swayType })).toEqual(`${key}-matched`); - verifyOtherMatchersDontMatch(key, swayType); + await verifyOtherMatchersDontMatch(key, swayType); }); - test('struct', () => { + test('struct', async () => { const key = 'struct'; const swayType = 'struct MyStruct'; expect(matcher({ swayType })).toEqual(`${key}-matched`); - verifyOtherMatchersDontMatch(key, swayType); + await verifyOtherMatchersDontMatch(key, swayType); }); - test('assetId', () => { + test('assetId', async () => { const key = 'assetId'; const swayType = 'struct std::asset_id::AssetId'; expect(matcher({ swayType })).toEqual(`${key}-matched`); - verifyOtherMatchersDontMatch(key, swayType); + await verifyOtherMatchersDontMatch(key, swayType); }); - test('b512', () => { + test('b512', async () => { const key = 'b512'; const swayType = 'struct std::b512::B512'; expect(matcher({ swayType })).toEqual(`${key}-matched`); - verifyOtherMatchersDontMatch(key, swayType); + await verifyOtherMatchersDontMatch(key, swayType); }); - test('assetId', () => { + test('assetId', async () => { const key = 'assetId'; const swayType = 'struct std::asset_id::AssetId'; expect(matcher({ swayType })).toEqual(`${key}-matched`); - verifyOtherMatchersDontMatch(key, swayType); + await verifyOtherMatchersDontMatch(key, swayType); }); - test('bytes', () => { + test('bytes', async () => { const key = 'bytes'; const swayType = 'struct std::bytes::Bytes'; expect(matcher({ swayType })).toEqual(`${key}-matched`); - verifyOtherMatchersDontMatch(key, swayType); + await verifyOtherMatchersDontMatch(key, swayType); }); - test('stdString', () => { + test('stdString', async () => { const key = 'stdString'; const swayType = 'struct std::string::String'; expect(matcher({ swayType })).toEqual(`${key}-matched`); - verifyOtherMatchersDontMatch(key, swayType); + await verifyOtherMatchersDontMatch(key, swayType); }); - test('evmAddress', () => { + test('evmAddress', async () => { const key = 'evmAddress'; const swayType = 'struct std::vm::evm::evm_address::EvmAddress'; expect(matcher({ swayType })).toEqual(`${key}-matched`); - verifyOtherMatchersDontMatch(key, swayType); + await verifyOtherMatchersDontMatch(key, swayType); }); - test('vector', () => { + test('vector', async () => { const key = 'vector'; const swayType = 'struct std::vec::Vec'; expect(matcher({ swayType })).toEqual(`${key}-matched`); - verifyOtherMatchersDontMatch(key, swayType); + await verifyOtherMatchersDontMatch(key, swayType); }); - test('enum', () => { + test('enum', async () => { const key = 'enum'; const swayType = 'enum MyEnum'; expect(matcher({ swayType })).toEqual(`${key}-matched`); - verifyOtherMatchersDontMatch(key, swayType); + await verifyOtherMatchersDontMatch(key, swayType); }); - test('option', () => { + test('option', async () => { const key = 'option'; const swayType = 'enum std::option::Option'; expect(matcher({ swayType })).toEqual(`${key}-matched`); - verifyOtherMatchersDontMatch(key, swayType); + await verifyOtherMatchersDontMatch(key, swayType); }); - test('result', () => { + test('result', async () => { const key = 'result'; const swayType = 'enum std::result::Result'; expect(matcher({ swayType })).toEqual(`${key}-matched`); - verifyOtherMatchersDontMatch(key, swayType); + await verifyOtherMatchersDontMatch(key, swayType); }); - test('rawUntypedPtr', () => { + test('rawUntypedPtr', async () => { const key = 'rawUntypedPtr'; const swayType = 'raw untyped ptr'; expect(matcher({ swayType })).toEqual(`${key}-matched`); - verifyOtherMatchersDontMatch(key, swayType); + await verifyOtherMatchersDontMatch(key, swayType); }); - test('rawUntypedSlice', () => { + test('rawUntypedSlice', async () => { const key = 'rawUntypedSlice'; const swayType = 'raw untyped slice'; expect(matcher({ swayType })).toEqual(`${key}-matched`); - verifyOtherMatchersDontMatch(key, swayType); + await verifyOtherMatchersDontMatch(key, swayType); }); - test('generic', () => { + test('generic', async () => { const key = 'generic'; const swayType = 'generic T'; expect(matcher({ swayType })).toEqual(`${key}-matched`); - verifyOtherMatchersDontMatch(key, swayType); + await verifyOtherMatchersDontMatch(key, swayType); }); - test('str', () => { + test('str', async () => { const key = 'str'; const swayType = 'str'; expect(matcher({ swayType })).toEqual(`${key}-matched`); - verifyOtherMatchersDontMatch(key, swayType); + await verifyOtherMatchersDontMatch(key, swayType); }); - test('matcher without mapping for valid sway type throws', () => { + test('matcher without mapping for valid sway type throws', async () => { const swayType = 'str'; // @ts-expect-error intentionally missing key for valid swayType const matcherWithoutMappings = createMatcher({}); - expect(() => matcherWithoutMappings({ swayType })).toThrow( - `Matcher not found for sway type ${swayType}.` + await expectToThrowFuelError( + () => matcherWithoutMappings({ swayType }), + new FuelError( + FuelError.CODES.MATCHER_NOT_FOUND, + `Matcher not found for Sway type "${swayType}".` + ) ); }); }); diff --git a/packages/abi/src/matchers/sway-type-matchers.ts b/packages/abi/src/matchers/sway-type-matchers.ts index 944c2bb7f29..9337b4cfb7e 100644 --- a/packages/abi/src/matchers/sway-type-matchers.ts +++ b/packages/abi/src/matchers/sway-type-matchers.ts @@ -120,7 +120,7 @@ export function createMatcher(mappings: Record) { } throw new FuelError( - FuelError.CODES.NOT_IMPLEMENTED, + FuelError.CODES.MATCHER_NOT_FOUND, `Matcher not found for Sway type "${swayType}".` ); }; diff --git a/packages/errors/src/error-codes.ts b/packages/errors/src/error-codes.ts index e867a1ecfcb..18227351503 100644 --- a/packages/errors/src/error-codes.ts +++ b/packages/errors/src/error-codes.ts @@ -24,6 +24,7 @@ export enum ErrorCode { CONFIG_FILE_NOT_FOUND = 'config-file-not-found', CONFIG_FILE_ALREADY_EXISTS = 'config-file-already-exists', WORKSPACE_NOT_DETECTED = 'workspace-not-detected', + MATCHER_NOT_FOUND = 'matcher-not-found', // address /** From b0a4f023fca72f5b928f1bdbc27e5365fa7ef798 Mon Sep 17 00:00:00 2001 From: nedsalk Date: Wed, 27 Nov 2024 19:41:23 +0100 Subject: [PATCH 008/126] fix generic type resolution edge case --- .../parser/specifications/v1/resolvable-type.ts | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/packages/abi/src/parser/specifications/v1/resolvable-type.ts b/packages/abi/src/parser/specifications/v1/resolvable-type.ts index 37be5b1caa2..712ae9f06f8 100644 --- a/packages/abi/src/parser/specifications/v1/resolvable-type.ts +++ b/packages/abi/src/parser/specifications/v1/resolvable-type.ts @@ -223,17 +223,16 @@ export class ResolvableType { return this.typeParamsArgsMap === undefined ? typeParamsArgsMap : this.typeParamsArgsMap.map(([typeParameter, value]) => { - if (value instanceof ResolvedType) { - return [+typeParameter, value]; - } + if (value instanceof ResolvableType) { + const resolved = typeParamsArgsMap?.find(([tp]) => tp === value.metadataTypeId)?.[1]; - const resolved = typeParamsArgsMap?.find(([tp]) => tp === value.metadataTypeId)?.[1]; + if (resolved) { + return [+value.metadataTypeId, resolved]; + } - if (resolved) { - return [+typeParameter, resolved]; + return [+typeParameter, value.resolveInternal(value.metadataTypeId, typeParamsArgsMap)]; } - - return [+typeParameter, value.resolveInternal(value.metadataTypeId, typeParamsArgsMap)]; + return [+typeParameter, value]; }); } From d1d09294eea50c6eecc4cf2b53b03b612a62aec0 Mon Sep 17 00:00:00 2001 From: nedsalk Date: Thu, 28 Nov 2024 09:09:07 +0100 Subject: [PATCH 009/126] changeset --- .changeset/tender-tigers-fry.md | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .changeset/tender-tigers-fry.md diff --git a/.changeset/tender-tigers-fry.md b/.changeset/tender-tigers-fry.md new file mode 100644 index 00000000000..5cc8bec484e --- /dev/null +++ b/.changeset/tender-tigers-fry.md @@ -0,0 +1,4 @@ +--- +--- + +feat: ABI parser \ No newline at end of file From 65d4ed97e14a95d26ca7ccb0a2031a48e1d9c38c Mon Sep 17 00:00:00 2001 From: nedsalk Date: Thu, 28 Nov 2024 14:34:00 +0100 Subject: [PATCH 010/126] refactoring, commenting --- .../specifications/v1/make-resolved-type.ts | 27 ------ .../src/parser/specifications/v1/parser.ts | 14 +++- .../specifications/v1/resolvable-type.ts | 84 +++++++++++-------- .../parser/specifications/v1/resolved-type.ts | 26 ++++-- 4 files changed, 78 insertions(+), 73 deletions(-) delete mode 100644 packages/abi/src/parser/specifications/v1/make-resolved-type.ts diff --git a/packages/abi/src/parser/specifications/v1/make-resolved-type.ts b/packages/abi/src/parser/specifications/v1/make-resolved-type.ts deleted file mode 100644 index bee7f889eaf..00000000000 --- a/packages/abi/src/parser/specifications/v1/make-resolved-type.ts +++ /dev/null @@ -1,27 +0,0 @@ -import type { ResolvableType } from './resolvable-type'; -import { ResolvedType } from './resolved-type'; -import type { AbiConcreteTypeV1, AbiSpecificationV1 } from './specification'; - -export function makeResolvedType( - abi: AbiSpecificationV1, - resolvableTypes: ResolvableType[], - concreteTypeId: string -) { - const concreteType = abi.concreteTypes.find( - (ct) => ct.concreteTypeId === concreteTypeId - ) as AbiConcreteTypeV1; - - const resolvableType = resolvableTypes.find( - (rmt) => rmt.metadataTypeId === concreteType.metadataTypeId - ); - - return resolvableType - ? resolvableType.resolve(abi, concreteType) - : new ResolvedType( - concreteType.type, - concreteType.concreteTypeId, - undefined, - undefined, - undefined - ); -} diff --git a/packages/abi/src/parser/specifications/v1/parser.ts b/packages/abi/src/parser/specifications/v1/parser.ts index e94345a0ca3..f935de62a94 100644 --- a/packages/abi/src/parser/specifications/v1/parser.ts +++ b/packages/abi/src/parser/specifications/v1/parser.ts @@ -2,9 +2,9 @@ import { FuelError } from '@fuel-ts/errors'; import type { Abi } from '../../abi'; -import { makeResolvedType } from './make-resolved-type'; import { mapAttribute } from './map-attribute'; import { ResolvableType } from './resolvable-type'; +import { ResolvedType } from './resolved-type'; import type { AbiConfigurableV1, AbiFunctionInputV1, @@ -22,9 +22,15 @@ export class AbiParserV1 { (x) => x.type !== 'struct std::vec::RawVec' && x.type !== 'struct std::bytes::RawBytes' ); - const types = abi.concreteTypes.map((t) => - makeResolvedType(abi, resolvableTypes, t.concreteTypeId).toAbiType() - ); + const types = abi.concreteTypes.map((ct) => { + const resolvableType = resolvableTypes.find((rt) => rt.metadataTypeId === ct.metadataTypeId); + + const resolvedType = resolvableType + ? resolvableType.resolve(ct) + : new ResolvedType({ type: ct.type, typeId: ct.concreteTypeId }); + + return resolvedType.toAbiType(); + }); const getType = (typeId: string | number) => { const type = types.find((t) => t.concreteTypeId === typeId); diff --git a/packages/abi/src/parser/specifications/v1/resolvable-type.ts b/packages/abi/src/parser/specifications/v1/resolvable-type.ts index 712ae9f06f8..5b63fa80580 100644 --- a/packages/abi/src/parser/specifications/v1/resolvable-type.ts +++ b/packages/abi/src/parser/specifications/v1/resolvable-type.ts @@ -30,7 +30,7 @@ export class ResolvableType { } constructor( - abi: AbiSpecificationV1, + private abi: AbiSpecificationV1, public metadataTypeId: number, public typeParamsArgsMap: Array<[number, ResolvedType | ResolvableType]> | undefined ) { @@ -49,6 +49,14 @@ export class ResolvableType { let components = metadataType.components; + /** + * Vectors consist of multiple components, + * but we only care about the `buf`'s first type argument + * which defines the type of the vector data. + * Everything else is being ignored, + * as it's then easier to reason about the vector + * (you just treat is as a regular struct). + */ if (swayTypeMatchers.vector(metadataType.type)) { components = components?.map((c) => { if (c.name === 'buf') { @@ -101,46 +109,50 @@ export class ResolvableType { }; } + /** + * Concrete types are *resolved* because everything is known about them. + */ private static resolveConcreteType( abi: AbiSpecificationV1, type: AbiConcreteTypeV1 ): ResolvedType { - const concreteType = type; - if (concreteType.metadataTypeId === undefined) { - return new ResolvedType( - concreteType.type, - concreteType.concreteTypeId, - undefined, - undefined, - undefined - ); + if (type.metadataTypeId === undefined) { + return new ResolvedType({ + type: type.type, + typeId: type.concreteTypeId, + }); } - if (!concreteType.typeArguments) { - return new ResolvableType(abi, concreteType.metadataTypeId, undefined).resolveInternal( - concreteType.concreteTypeId, + if (!type.typeArguments) { + return new ResolvableType(abi, type.metadataTypeId, undefined).resolveInternal( + type.concreteTypeId, undefined ); } const metadataType = abi.metadataTypes.find( - (mt) => mt.metadataTypeId === concreteType.metadataTypeId + (mt) => mt.metadataTypeId === type.metadataTypeId ) as AbiMetadataTypeV1; - const concreteTypeArgs = concreteType.typeArguments.map((ta) => { + const concreteTypeArgs = type.typeArguments.map((ta) => { const concreteTypeArg = abi.concreteTypes.find( (ct) => ct.concreteTypeId === ta ) as AbiConcreteTypeV1; - return this.resolveConcreteType(abi, concreteTypeArg); + return ResolvableType.resolveConcreteType(abi, concreteTypeArg); }); return new ResolvableType( abi, - concreteType.metadataTypeId, + type.metadataTypeId, ResolvableType.mapTypeParametersAndArgs(abi, metadataType, concreteTypeArgs) - ).resolveInternal(concreteType.concreteTypeId, undefined); + ).resolveInternal(type.concreteTypeId, undefined); } + /** + * Metadata types are *handled* and not *resolved* because they might be generic, + * in which case they cannot be resolved. + * If they're not generic, they can be immediately resolved. + */ private static handleMetadataType( parent: ResolvableType, abi: AbiSpecificationV1, @@ -159,7 +171,7 @@ export class ResolvableType { /** * types like u8, u16 can make their way into metadata types * if they aren't used _directly_ in a function-input/function-output/log/configurable/messageType - * These types are characterized by not having components and we can resolve then as-is + * These types are characterized by not having components and we can resolve them as-is */ return new ResolvableType(abi, mt.metadataTypeId, undefined).resolveInternal( mt.metadataTypeId, @@ -208,13 +220,13 @@ export class ResolvableType { } return { name: c.name, type: c.type.resolveInternal(c.type.metadataTypeId, typeArgs) }; }); - return new ResolvedType( - this.metadataType.type, + return new ResolvedType({ + type: this.metadataType.type, typeId, components, - typeArgs, - this.metadataTypeId - ); + typeParamsArgsMap: typeArgs, + metadataTypeId: this.metadataTypeId, + }); } private resolveTypeArgs( @@ -224,28 +236,30 @@ export class ResolvableType { ? typeParamsArgsMap : this.typeParamsArgsMap.map(([typeParameter, value]) => { if (value instanceof ResolvableType) { - const resolved = typeParamsArgsMap?.find(([tp]) => tp === value.metadataTypeId)?.[1]; - - if (resolved) { - return [+value.metadataTypeId, resolved]; - } - - return [+typeParameter, value.resolveInternal(value.metadataTypeId, typeParamsArgsMap)]; + const resolved = typeParamsArgsMap?.find(([tp]) => tp === value.metadataTypeId); + + return ( + resolved ?? [ + +typeParameter, + value.resolveInternal(value.metadataTypeId, typeParamsArgsMap), + ] + ); } + return [+typeParameter, value]; }); } - public resolve(abi: AbiSpecificationV1, concreteType: AbiConcreteTypeV1) { + public resolve(concreteType: AbiConcreteTypeV1) { const concreteTypeArgs = concreteType.typeArguments?.map((ta) => { - const concreteTypeArg = abi.concreteTypes.find( + const concreteTypeArg = this.abi.concreteTypes.find( (ct) => ct.concreteTypeId === ta ) as AbiConcreteTypeV1; - return ResolvableType.resolveConcreteType(abi, concreteTypeArg); + return ResolvableType.resolveConcreteType(this.abi, concreteTypeArg); }); const typeParamsArgsMap = ResolvableType.mapTypeParametersAndArgs( - abi, + this.abi, this.metadataType, concreteTypeArgs ) as Array<[number, ResolvedType]>; diff --git a/packages/abi/src/parser/specifications/v1/resolved-type.ts b/packages/abi/src/parser/specifications/v1/resolved-type.ts index 124ce033e0c..cf0c1646499 100644 --- a/packages/abi/src/parser/specifications/v1/resolved-type.ts +++ b/packages/abi/src/parser/specifications/v1/resolved-type.ts @@ -6,13 +6,25 @@ export interface ResolvedComponent { } export class ResolvedType { - constructor( - public type: string, - public typeId: string | number, - public components: ResolvedComponent[] | undefined, - public typeParamsArgsMap: Array<[number, ResolvedType]> | undefined, - private metadataTypeId: number | undefined - ) {} + public type: string; + public typeId: string | number; + public components: ResolvedComponent[] | undefined; + public typeParamsArgsMap: Array<[number, ResolvedType]> | undefined; + private metadataTypeId: number | undefined; + + constructor(params: { + type: string; + typeId: string | number; + components?: ResolvedComponent[]; + typeParamsArgsMap?: Array<[number, ResolvedType]>; + metadataTypeId?: number; + }) { + this.type = params.type; + this.typeId = params.typeId; + this.components = params.components; + this.typeParamsArgsMap = params.typeParamsArgsMap; + this.metadataTypeId = params.metadataTypeId; + } public toAbiType(): AbiType { return { From be228d889be35fd4b9726efa46f6e5e03b62eef3 Mon Sep 17 00:00:00 2001 From: Peter Smith Date: Mon, 2 Dec 2024 08:28:19 +0000 Subject: [PATCH 011/126] chore: favour `concreteTypeId` --- packages/abi/src/parser/specifications/v1/parser.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/abi/src/parser/specifications/v1/parser.ts b/packages/abi/src/parser/specifications/v1/parser.ts index f935de62a94..dfcd4258bff 100644 --- a/packages/abi/src/parser/specifications/v1/parser.ts +++ b/packages/abi/src/parser/specifications/v1/parser.ts @@ -32,12 +32,12 @@ export class AbiParserV1 { return resolvedType.toAbiType(); }); - const getType = (typeId: string | number) => { - const type = types.find((t) => t.concreteTypeId === typeId); + const getType = (concreteTypeId: string) => { + const type = types.find((t) => t.concreteTypeId === concreteTypeId); if (type === undefined) { throw new FuelError( FuelError.CODES.TYPE_ID_NOT_FOUND, - `Type with typeId ${typeId} not found` + `A type with concrete type id of "${concreteTypeId}" was not found.` ); } return type; From ed43cd64312be99c1efa9c2260c27ff74b9955c6 Mon Sep 17 00:00:00 2001 From: Peter Smith Date: Mon, 2 Dec 2024 08:32:24 +0000 Subject: [PATCH 012/126] chore: fix up errors for the parser specification --- packages/abi/src/parser/abi-parser.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/abi/src/parser/abi-parser.ts b/packages/abi/src/parser/abi-parser.ts index ab5d40eebb8..31d230ce3cb 100644 --- a/packages/abi/src/parser/abi-parser.ts +++ b/packages/abi/src/parser/abi-parser.ts @@ -27,7 +27,7 @@ export class AbiParser { if (typeof abi.specVersion !== 'string') { throw new FuelError( FuelError.CODES.ABI_SPECIFICATION_INVALID, - 'Invalid ABI: "specVersion" is not a string' + 'Invalid ABI: the specification version is not a string.' ); } @@ -35,7 +35,7 @@ export class AbiParser { if (!parse) { throw new FuelError( FuelError.CODES.ABI_SPECIFICATION_INVALID, - `Invalid ABI: Unsupported ABI "specVersion": ${abi.specVersion}` + `Invalid ABI: Unsupported ABI specification version ("${abi.specVersion}").` ); } From 52e22b39c12a1f696aa3189cc4334dda816f4c64 Mon Sep 17 00:00:00 2001 From: Peter Smith Date: Mon, 2 Dec 2024 08:36:33 +0000 Subject: [PATCH 013/126] docs: added error code --- apps/docs/src/guide/errors/index.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/docs/src/guide/errors/index.md b/apps/docs/src/guide/errors/index.md index c20604f3217..a043c622ca4 100644 --- a/apps/docs/src/guide/errors/index.md +++ b/apps/docs/src/guide/errors/index.md @@ -18,6 +18,12 @@ When the arguments supplied to the function do not match the minimum required in Check that the arguments supplied to the function match the required type. +### `ABI_SPECIFICATION_INVALID` + +When the ABI specification provided is invalid. + +Check that the ABI specification is valid. + ### `ACCOUNT_REQUIRED` When an [`Account`](https://fuels-ts-docs-api.vercel.app/classes/_fuel_ts_account.Account.html) is required for an operation. This will usually be in the form of a [`Wallet`](../wallets/index.md). From ef1484ebbd6e199971cbea415ac6d47d9baffc79 Mon Sep 17 00:00:00 2001 From: Peter Smith Date: Mon, 2 Dec 2024 08:37:23 +0000 Subject: [PATCH 014/126] chore: nit --- packages/abi/src/parser/specifications/v1/specification.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/abi/src/parser/specifications/v1/specification.ts b/packages/abi/src/parser/specifications/v1/specification.ts index 50d3d8940a1..365ba5cb125 100644 --- a/packages/abi/src/parser/specifications/v1/specification.ts +++ b/packages/abi/src/parser/specifications/v1/specification.ts @@ -59,6 +59,7 @@ export interface AbiMessageTypeV1 { readonly messageId: string; readonly concreteTypeId: string; } + export interface AbiConfigurableV1 { readonly name: string; readonly concreteTypeId: string; From 9b38b48bc0d0bd01703a88e53e3c6f8a2afb8a58 Mon Sep 17 00:00:00 2001 From: Peter Smith Date: Mon, 2 Dec 2024 08:38:30 +0000 Subject: [PATCH 015/126] chore: attribute arguments always defined --- packages/abi/src/parser/specifications/v1/specification.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/abi/src/parser/specifications/v1/specification.ts b/packages/abi/src/parser/specifications/v1/specification.ts index 365ba5cb125..4a30fcbd7a3 100644 --- a/packages/abi/src/parser/specifications/v1/specification.ts +++ b/packages/abi/src/parser/specifications/v1/specification.ts @@ -75,7 +75,7 @@ export type AbiFunctionAttributeV1 = export interface PayableAttrV1 { readonly name: 'payable'; - readonly arguments?: readonly []; + readonly arguments: readonly []; } export interface StorageAttrV1 { @@ -85,7 +85,7 @@ export interface StorageAttrV1 { export interface TestAttrV1 { readonly name: 'test'; - readonly arguments?: readonly []; + readonly arguments: readonly []; } export interface InlineAttrV1 { From bee8f28ce4373ebf5e81fbb49eca365929877eca Mon Sep 17 00:00:00 2001 From: Peter Smith Date: Mon, 2 Dec 2024 08:39:08 +0000 Subject: [PATCH 016/126] chore: fix incorrect inline attribute arguments --- packages/abi/src/parser/specifications/v1/specification.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/abi/src/parser/specifications/v1/specification.ts b/packages/abi/src/parser/specifications/v1/specification.ts index 4a30fcbd7a3..1dfdff6e8b3 100644 --- a/packages/abi/src/parser/specifications/v1/specification.ts +++ b/packages/abi/src/parser/specifications/v1/specification.ts @@ -90,7 +90,7 @@ export interface TestAttrV1 { export interface InlineAttrV1 { readonly name: 'inline'; - readonly arguments: 'never' | 'always'; + readonly arguments: readonly ['never'] | readonly ['always']; } export interface DocCommentAttrV1 { From b2d6bdc7b2fcce0669bb22f7692ee8e989dc9266 Mon Sep 17 00:00:00 2001 From: Peter Smith Date: Tue, 3 Dec 2024 08:16:37 +0000 Subject: [PATCH 017/126] chore: re-adjusted `mapAttribute` --- .../parser/specifications/v1/map-attribute.ts | 25 ++++++------------- 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/packages/abi/src/parser/specifications/v1/map-attribute.ts b/packages/abi/src/parser/specifications/v1/map-attribute.ts index 59e5dfe4650..b14ea2e83c0 100644 --- a/packages/abi/src/parser/specifications/v1/map-attribute.ts +++ b/packages/abi/src/parser/specifications/v1/map-attribute.ts @@ -5,29 +5,18 @@ import type { AbiFunctionAttribute } from '../../abi'; import type { AbiFunctionAttributeV1 } from './specification'; export const mapAttribute = (attribute: AbiFunctionAttributeV1): AbiFunctionAttribute => { - switch (attribute.name) { - case 'inline': - return { - name: attribute.name, - arguments: attribute.arguments[0] === 'never' ? 'never' : 'always', - }; + const { name, arguments: args } = attribute; + switch (name) { + case 'inline': + return { name, arguments: args[0] }; case 'storage': - return { - name: attribute.name, - arguments: attribute.arguments, - }; - + return { name: 'storage', arguments: args }; case 'doc-comment': - return { - name: attribute.name, - arguments: attribute.arguments, - }; - + return { name, arguments: args }; case 'payable': case 'test': - return { name: attribute.name }; - + return { name }; default: return assertUnreachable(attribute); } From 2235308a7c210fdcc67c6852e59f0bfd2b905ca6 Mon Sep 17 00:00:00 2001 From: Peter Smith Date: Tue, 3 Dec 2024 08:32:45 +0000 Subject: [PATCH 018/126] chore: added helper functions for finding concreteTypes and metadataTypes --- .../specifications/v1/resolvable-type.ts | 62 +++++++++++++++---- 1 file changed, 49 insertions(+), 13 deletions(-) diff --git a/packages/abi/src/parser/specifications/v1/resolvable-type.ts b/packages/abi/src/parser/specifications/v1/resolvable-type.ts index 5b63fa80580..48108258550 100644 --- a/packages/abi/src/parser/specifications/v1/resolvable-type.ts +++ b/packages/abi/src/parser/specifications/v1/resolvable-type.ts @@ -1,3 +1,5 @@ +import { FuelError } from '@fuel-ts/errors'; + import { swayTypeMatchers } from '../../../matchers/sway-type-matchers'; import type { AbiTypeMetadata } from '../../abi'; @@ -34,20 +36,16 @@ export class ResolvableType { public metadataTypeId: number, public typeParamsArgsMap: Array<[number, ResolvedType | ResolvableType]> | undefined ) { - const metadataType = abi.metadataTypes.find( - (tm) => tm.metadataTypeId === metadataTypeId - ) as AbiMetadataTypeV1; - - this.metadataType = metadataType; - this.type = metadataType.type; + this.metadataType = this.findMetadataType(metadataTypeId); + this.type = this.metadataType.type; this.typeParamsArgsMap ??= ResolvableType.mapTypeParametersAndArgs( abi, - metadataType, + this.metadataType, undefined ); - let components = metadataType.components; + let components = this.metadataType.components; /** * Vectors consist of multiple components, @@ -57,7 +55,7 @@ export class ResolvableType { * as it's then easier to reason about the vector * (you just treat is as a regular struct). */ - if (swayTypeMatchers.vector(metadataType.type)) { + if (swayTypeMatchers.vector(this.metadataType.type)) { components = components?.map((c) => { if (c.name === 'buf') { return c.typeArguments?.[0]; @@ -69,6 +67,46 @@ export class ResolvableType { this.components = components?.map((c) => ResolvableType.handleComponent(this, abi, c)); } + /** + * Find a metadata type by its ID. + * @param metadataTypeId - The ID of the metadata type to find. + * @returns The metadata type. + * + * @throws If the metadata type can not be found in the ABI. + */ + private findMetadataType(metadataTypeId: number): AbiMetadataTypeV1 { + const metadataType = this.abi.metadataTypes.find( + (type) => type.metadataTypeId === metadataTypeId + ); + if (!metadataType) { + throw new FuelError( + FuelError.CODES.TYPE_NOT_FOUND, + `Metadata type with id ${metadataTypeId} not found` + ); + } + return metadataType; + } + + /** + * Find a concrete type by its ID. + * @param concreteTypeId - The ID of the concrete type to find. + * @returns The concrete type. + * + * @throws If the concrete type can not be found in the ABI. + */ + private findConcreteType(concreteTypeId: string): AbiConcreteTypeV1 { + const concreteType = this.abi.concreteTypes.find( + (type) => type.concreteTypeId === concreteTypeId + ); + if (!concreteType) { + throw new FuelError( + FuelError.CODES.TYPE_NOT_FOUND, + `Concrete type with id ${concreteTypeId} not found` + ); + } + return concreteType; + } + private static mapTypeParametersAndArgs( abi: AbiSpecificationV1, metadataType: AbiMetadataTypeV1, @@ -251,10 +289,8 @@ export class ResolvableType { } public resolve(concreteType: AbiConcreteTypeV1) { - const concreteTypeArgs = concreteType.typeArguments?.map((ta) => { - const concreteTypeArg = this.abi.concreteTypes.find( - (ct) => ct.concreteTypeId === ta - ) as AbiConcreteTypeV1; + const concreteTypeArgs = concreteType.typeArguments?.map((typeArgument) => { + const concreteTypeArg = this.findConcreteType(typeArgument); return ResolvableType.resolveConcreteType(this.abi, concreteTypeArg); }); From f25c90bcc0072a405285f12f0f8ba10ca7feeba9 Mon Sep 17 00:00:00 2001 From: Peter Smith Date: Tue, 3 Dec 2024 09:12:57 +0000 Subject: [PATCH 019/126] chore: removed static methods + further `findConcreteType` + `findMetadataType` simplifications --- .../specifications/v1/resolvable-type.ts | 68 +++++++------------ 1 file changed, 24 insertions(+), 44 deletions(-) diff --git a/packages/abi/src/parser/specifications/v1/resolvable-type.ts b/packages/abi/src/parser/specifications/v1/resolvable-type.ts index 48108258550..7f2db188a24 100644 --- a/packages/abi/src/parser/specifications/v1/resolvable-type.ts +++ b/packages/abi/src/parser/specifications/v1/resolvable-type.ts @@ -38,13 +38,7 @@ export class ResolvableType { ) { this.metadataType = this.findMetadataType(metadataTypeId); this.type = this.metadataType.type; - - this.typeParamsArgsMap ??= ResolvableType.mapTypeParametersAndArgs( - abi, - this.metadataType, - undefined - ); - + this.typeParamsArgsMap ??= this.mapTypeParametersAndArgs(this.metadataType, undefined); let components = this.metadataType.components; /** @@ -64,7 +58,7 @@ export class ResolvableType { }) as AbiComponentV1[]; } - this.components = components?.map((c) => ResolvableType.handleComponent(this, abi, c)); + this.components = components?.map((c) => this.handleComponent(this, c)); } /** @@ -107,53 +101,45 @@ export class ResolvableType { return concreteType; } - private static mapTypeParametersAndArgs( - abi: AbiSpecificationV1, + private mapTypeParametersAndArgs( metadataType: AbiMetadataTypeV1, args: (ResolvableType | ResolvedType)[] | undefined ): Array<[number, ResolvedType | ResolvableType]> | undefined { if (!args) { return metadataType.typeParameters?.map((typeParameter) => [ typeParameter, - new ResolvableType(abi, typeParameter, undefined), + new ResolvableType(this.abi, typeParameter, undefined), ]); } return metadataType.typeParameters?.map((typeParameter, idx) => [typeParameter, args[idx]]); } - private static handleComponent( + private handleComponent( parent: ResolvableType, - abi: AbiSpecificationV1, c: AbiComponentV1 | AbiTypeArgumentV1 ): ResolvableComponent { const name = (c as AbiComponentV1).name; if (typeof c.typeId === 'string') { - const concreteType = abi.concreteTypes.find( - (ct) => ct.concreteTypeId === c.typeId - ) as AbiConcreteTypeV1; + const concreteType = this.findConcreteType(c.typeId); return { name, - type: ResolvableType.resolveConcreteType(abi, concreteType), + type: this.resolveConcreteType(concreteType), }; } - const mt = abi.metadataTypes.find((tm) => tm.metadataTypeId === c.typeId) as AbiMetadataTypeV1; - + const metadataType = this.findMetadataType(c.typeId); return { name, - type: ResolvableType.handleMetadataType(parent, abi, mt, c.typeArguments), + type: this.handleMetadataType(parent, metadataType, c.typeArguments), }; } /** * Concrete types are *resolved* because everything is known about them. */ - private static resolveConcreteType( - abi: AbiSpecificationV1, - type: AbiConcreteTypeV1 - ): ResolvedType { + private resolveConcreteType(type: AbiConcreteTypeV1): ResolvedType { if (type.metadataTypeId === undefined) { return new ResolvedType({ type: type.type, @@ -162,27 +148,23 @@ export class ResolvableType { } if (!type.typeArguments) { - return new ResolvableType(abi, type.metadataTypeId, undefined).resolveInternal( + return new ResolvableType(this.abi, type.metadataTypeId, undefined).resolveInternal( type.concreteTypeId, undefined ); } - const metadataType = abi.metadataTypes.find( - (mt) => mt.metadataTypeId === type.metadataTypeId - ) as AbiMetadataTypeV1; + const metadataType = this.findMetadataType(type.metadataTypeId); const concreteTypeArgs = type.typeArguments.map((ta) => { - const concreteTypeArg = abi.concreteTypes.find( - (ct) => ct.concreteTypeId === ta - ) as AbiConcreteTypeV1; - return ResolvableType.resolveConcreteType(abi, concreteTypeArg); + const concreteTypeArg = this.findConcreteType(ta); + return this.resolveConcreteType(concreteTypeArg); }); return new ResolvableType( - abi, + this.abi, type.metadataTypeId, - ResolvableType.mapTypeParametersAndArgs(abi, metadataType, concreteTypeArgs) + this.mapTypeParametersAndArgs(metadataType, concreteTypeArgs) ).resolveInternal(type.concreteTypeId, undefined); } @@ -191,9 +173,8 @@ export class ResolvableType { * in which case they cannot be resolved. * If they're not generic, they can be immediately resolved. */ - private static handleMetadataType( + private handleMetadataType( parent: ResolvableType, - abi: AbiSpecificationV1, mt: AbiMetadataTypeV1, typeArguments: AbiComponentV1['typeArguments'] ): ResolvableType | ResolvedType { @@ -202,7 +183,7 @@ export class ResolvableType { ([tp]) => tp === mt.metadataTypeId )?.[1]; - return resolvedTypeParameter ?? new ResolvableType(abi, mt.metadataTypeId, undefined); + return resolvedTypeParameter ?? new ResolvableType(this.abi, mt.metadataTypeId, undefined); } if (!mt.components) { @@ -211,18 +192,18 @@ export class ResolvableType { * if they aren't used _directly_ in a function-input/function-output/log/configurable/messageType * These types are characterized by not having components and we can resolve them as-is */ - return new ResolvableType(abi, mt.metadataTypeId, undefined).resolveInternal( + return new ResolvableType(this.abi, mt.metadataTypeId, undefined).resolveInternal( mt.metadataTypeId, undefined ); } - const typeArgs = typeArguments?.map((ta) => this.handleComponent(parent, abi, ta).type); + const typeArgs = typeArguments?.map((ta) => this.handleComponent(parent, ta).type); const resolvable = new ResolvableType( - abi, + this.abi, mt.metadataTypeId, - this.mapTypeParametersAndArgs(abi, mt, typeArgs) + this.mapTypeParametersAndArgs(mt, typeArgs) ); if (typeArgs?.every((ta) => ta instanceof ResolvedType)) { @@ -291,11 +272,10 @@ export class ResolvableType { public resolve(concreteType: AbiConcreteTypeV1) { const concreteTypeArgs = concreteType.typeArguments?.map((typeArgument) => { const concreteTypeArg = this.findConcreteType(typeArgument); - return ResolvableType.resolveConcreteType(this.abi, concreteTypeArg); + return this.resolveConcreteType(concreteTypeArg); }); - const typeParamsArgsMap = ResolvableType.mapTypeParametersAndArgs( - this.abi, + const typeParamsArgsMap = this.mapTypeParametersAndArgs( this.metadataType, concreteTypeArgs ) as Array<[number, ResolvedType]>; From fe56f5326289f059b568791effba48f31a608bb0 Mon Sep 17 00:00:00 2001 From: Peter Smith Date: Tue, 3 Dec 2024 10:16:00 +0000 Subject: [PATCH 020/126] chore: more verbose variable names --- .../src/parser/specifications/v1/parser.ts | 16 ++-- .../specifications/v1/resolvable-type.ts | 85 +++++++++++-------- 2 files changed, 60 insertions(+), 41 deletions(-) diff --git a/packages/abi/src/parser/specifications/v1/parser.ts b/packages/abi/src/parser/specifications/v1/parser.ts index dfcd4258bff..638ad84b871 100644 --- a/packages/abi/src/parser/specifications/v1/parser.ts +++ b/packages/abi/src/parser/specifications/v1/parser.ts @@ -19,21 +19,25 @@ export class AbiParserV1 { const resolvableTypes = abi.metadataTypes .map((metadataType) => new ResolvableType(abi, metadataType.metadataTypeId, undefined)) .filter( - (x) => x.type !== 'struct std::vec::RawVec' && x.type !== 'struct std::bytes::RawBytes' + (resolveableType) => + resolveableType.type !== 'struct std::vec::RawVec' && + resolveableType.type !== 'struct std::bytes::RawBytes' ); - const types = abi.concreteTypes.map((ct) => { - const resolvableType = resolvableTypes.find((rt) => rt.metadataTypeId === ct.metadataTypeId); + const types = abi.concreteTypes.map((concreteType) => { + const resolvableType = resolvableTypes.find( + (resolvable) => resolvable.metadataTypeId === concreteType.metadataTypeId + ); const resolvedType = resolvableType - ? resolvableType.resolve(ct) - : new ResolvedType({ type: ct.type, typeId: ct.concreteTypeId }); + ? resolvableType.resolve(concreteType) + : new ResolvedType({ type: concreteType.type, typeId: concreteType.concreteTypeId }); return resolvedType.toAbiType(); }); const getType = (concreteTypeId: string) => { - const type = types.find((t) => t.concreteTypeId === concreteTypeId); + const type = types.find((abiType) => abiType.concreteTypeId === concreteTypeId); if (type === undefined) { throw new FuelError( FuelError.CODES.TYPE_ID_NOT_FOUND, diff --git a/packages/abi/src/parser/specifications/v1/resolvable-type.ts b/packages/abi/src/parser/specifications/v1/resolvable-type.ts index 7f2db188a24..dc8c68836e1 100644 --- a/packages/abi/src/parser/specifications/v1/resolvable-type.ts +++ b/packages/abi/src/parser/specifications/v1/resolvable-type.ts @@ -25,9 +25,14 @@ export class ResolvableType { toAbiType(): AbiTypeMetadata { return { metadataTypeId: this.metadataTypeId, - components: this.components?.map((c) => ({ name: c.name, type: c.type.toAbiType() })), + components: this.components?.map((component) => ({ + name: component.name, + type: component.type.toAbiType(), + })), swayType: this.type, - typeParameters: this.typeParamsArgsMap?.map(([, t]) => (t as ResolvableType).toAbiType()), + typeParameters: this.typeParamsArgsMap?.map(([, resolvableType]) => + (resolvableType as ResolvableType).toAbiType() + ), }; } @@ -50,11 +55,11 @@ export class ResolvableType { * (you just treat is as a regular struct). */ if (swayTypeMatchers.vector(this.metadataType.type)) { - components = components?.map((c) => { - if (c.name === 'buf') { - return c.typeArguments?.[0]; + components = components?.map((component) => { + if (component.name === 'buf') { + return component.typeArguments?.[0]; } - return c; + return component; }) as AbiComponentV1[]; } @@ -117,22 +122,22 @@ export class ResolvableType { private handleComponent( parent: ResolvableType, - c: AbiComponentV1 | AbiTypeArgumentV1 + component: AbiComponentV1 | AbiTypeArgumentV1 ): ResolvableComponent { - const name = (c as AbiComponentV1).name; + const name = (component as AbiComponentV1).name; - if (typeof c.typeId === 'string') { - const concreteType = this.findConcreteType(c.typeId); + if (typeof component.typeId === 'string') { + const concreteType = this.findConcreteType(component.typeId); return { name, type: this.resolveConcreteType(concreteType), }; } - const metadataType = this.findMetadataType(c.typeId); + const metadataType = this.findMetadataType(component.typeId); return { name, - type: this.handleMetadataType(parent, metadataType, c.typeArguments), + type: this.handleMetadataType(parent, metadataType, component.typeArguments), }; } @@ -156,8 +161,8 @@ export class ResolvableType { const metadataType = this.findMetadataType(type.metadataTypeId); - const concreteTypeArgs = type.typeArguments.map((ta) => { - const concreteTypeArg = this.findConcreteType(ta); + const concreteTypeArgs = type.typeArguments.map((typeArgument) => { + const concreteTypeArg = this.findConcreteType(typeArgument); return this.resolveConcreteType(concreteTypeArg); }); @@ -175,43 +180,48 @@ export class ResolvableType { */ private handleMetadataType( parent: ResolvableType, - mt: AbiMetadataTypeV1, + metadataType: AbiMetadataTypeV1, typeArguments: AbiComponentV1['typeArguments'] ): ResolvableType | ResolvedType { - if (swayTypeMatchers.generic(mt.type)) { + if (swayTypeMatchers.generic(metadataType.type)) { const resolvedTypeParameter = parent.typeParamsArgsMap?.find( - ([tp]) => tp === mt.metadataTypeId + ([typeParameterId]) => typeParameterId === metadataType.metadataTypeId )?.[1]; - return resolvedTypeParameter ?? new ResolvableType(this.abi, mt.metadataTypeId, undefined); + return ( + resolvedTypeParameter ?? + new ResolvableType(this.abi, metadataType.metadataTypeId, undefined) + ); } - if (!mt.components) { + if (!metadataType.components) { /** * types like u8, u16 can make their way into metadata types * if they aren't used _directly_ in a function-input/function-output/log/configurable/messageType * These types are characterized by not having components and we can resolve them as-is */ - return new ResolvableType(this.abi, mt.metadataTypeId, undefined).resolveInternal( - mt.metadataTypeId, + return new ResolvableType(this.abi, metadataType.metadataTypeId, undefined).resolveInternal( + metadataType.metadataTypeId, undefined ); } - const typeArgs = typeArguments?.map((ta) => this.handleComponent(parent, ta).type); + const typeArgs = typeArguments?.map( + (typeArgument) => this.handleComponent(parent, typeArgument).type + ); const resolvable = new ResolvableType( this.abi, - mt.metadataTypeId, - this.mapTypeParametersAndArgs(mt, typeArgs) + metadataType.metadataTypeId, + this.mapTypeParametersAndArgs(metadataType, typeArgs) ); - if (typeArgs?.every((ta) => ta instanceof ResolvedType)) { - return resolvable.resolveInternal(mt.metadataTypeId, undefined); + if (typeArgs?.every((typeArgument) => typeArgument instanceof ResolvedType)) { + return resolvable.resolveInternal(metadataType.metadataTypeId, undefined); } - if (resolvable.components?.every((comp) => comp.type instanceof ResolvedType)) { - return resolvable.resolveInternal(mt.metadataTypeId, undefined); + if (resolvable.components?.every((component) => component.type instanceof ResolvedType)) { + return resolvable.resolveInternal(metadataType.metadataTypeId, undefined); } return resolvable; @@ -223,21 +233,24 @@ export class ResolvableType { ): ResolvedType { const typeArgs = this.resolveTypeArgs(typeParamsArgsMap); - const components: ResolvedType['components'] = this.components?.map((c) => { - if (c.type instanceof ResolvedType) { - return c as { name: string; type: ResolvedType }; + const components: ResolvedType['components'] = this.components?.map((component) => { + if (component.type instanceof ResolvedType) { + return component as { name: string; type: ResolvedType }; } const resolvedGenericType = typeArgs?.find( - ([tp]) => (c.type as ResolvableType).metadataTypeId === tp + ([typeParameterId]) => (component.type as ResolvableType).metadataTypeId === typeParameterId )?.[1]; if (resolvedGenericType) { return { - name: c.name, + name: component.name, type: resolvedGenericType, }; } - return { name: c.name, type: c.type.resolveInternal(c.type.metadataTypeId, typeArgs) }; + return { + name: component.name, + type: component.type.resolveInternal(component.type.metadataTypeId, typeArgs), + }; }); return new ResolvedType({ type: this.metadataType.type, @@ -255,7 +268,9 @@ export class ResolvableType { ? typeParamsArgsMap : this.typeParamsArgsMap.map(([typeParameter, value]) => { if (value instanceof ResolvableType) { - const resolved = typeParamsArgsMap?.find(([tp]) => tp === value.metadataTypeId); + const resolved = typeParamsArgsMap?.find( + ([typeParameterId]) => typeParameterId === value.metadataTypeId + ); return ( resolved ?? [ From c3806b435219005b74943563b09bb53b7864dfd0 Mon Sep 17 00:00:00 2001 From: Peter Smith Date: Thu, 5 Dec 2024 06:34:33 +0000 Subject: [PATCH 021/126] chore: constructor as first public method --- .../specifications/v1/resolvable-type.ts | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/packages/abi/src/parser/specifications/v1/resolvable-type.ts b/packages/abi/src/parser/specifications/v1/resolvable-type.ts index dc8c68836e1..57ece46897e 100644 --- a/packages/abi/src/parser/specifications/v1/resolvable-type.ts +++ b/packages/abi/src/parser/specifications/v1/resolvable-type.ts @@ -22,20 +22,6 @@ export class ResolvableType { type: string; components: ResolvableComponent[] | undefined; - toAbiType(): AbiTypeMetadata { - return { - metadataTypeId: this.metadataTypeId, - components: this.components?.map((component) => ({ - name: component.name, - type: component.type.toAbiType(), - })), - swayType: this.type, - typeParameters: this.typeParamsArgsMap?.map(([, resolvableType]) => - (resolvableType as ResolvableType).toAbiType() - ), - }; - } - constructor( private abi: AbiSpecificationV1, public metadataTypeId: number, @@ -66,6 +52,20 @@ export class ResolvableType { this.components = components?.map((c) => this.handleComponent(this, c)); } + toAbiType(): AbiTypeMetadata { + return { + metadataTypeId: this.metadataTypeId, + components: this.components?.map((component) => ({ + name: component.name, + type: component.type.toAbiType(), + })), + swayType: this.type, + typeParameters: this.typeParamsArgsMap?.map(([, resolvableType]) => + (resolvableType as ResolvableType).toAbiType() + ), + }; + } + /** * Find a metadata type by its ID. * @param metadataTypeId - The ID of the metadata type to find. From 400a93a82156b7820fc86ee4e76fd910e3762de0 Mon Sep 17 00:00:00 2001 From: Peter Smith Date: Thu, 5 Dec 2024 15:19:44 +0000 Subject: [PATCH 022/126] chore: rename `type` for `swayType` --- packages/abi/src/parser/specifications/v1/parser.ts | 6 +++--- .../src/parser/specifications/v1/resolvable-type.ts | 10 +++++----- .../abi/src/parser/specifications/v1/resolved-type.ts | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/abi/src/parser/specifications/v1/parser.ts b/packages/abi/src/parser/specifications/v1/parser.ts index 638ad84b871..d52a349e931 100644 --- a/packages/abi/src/parser/specifications/v1/parser.ts +++ b/packages/abi/src/parser/specifications/v1/parser.ts @@ -20,8 +20,8 @@ export class AbiParserV1 { .map((metadataType) => new ResolvableType(abi, metadataType.metadataTypeId, undefined)) .filter( (resolveableType) => - resolveableType.type !== 'struct std::vec::RawVec' && - resolveableType.type !== 'struct std::bytes::RawBytes' + resolveableType.swayType !== 'struct std::vec::RawVec' && + resolveableType.swayType !== 'struct std::bytes::RawBytes' ); const types = abi.concreteTypes.map((concreteType) => { @@ -31,7 +31,7 @@ export class AbiParserV1 { const resolvedType = resolvableType ? resolvableType.resolve(concreteType) - : new ResolvedType({ type: concreteType.type, typeId: concreteType.concreteTypeId }); + : new ResolvedType({ swayType: concreteType.type, typeId: concreteType.concreteTypeId }); return resolvedType.toAbiType(); }); diff --git a/packages/abi/src/parser/specifications/v1/resolvable-type.ts b/packages/abi/src/parser/specifications/v1/resolvable-type.ts index 57ece46897e..378bb5bb69d 100644 --- a/packages/abi/src/parser/specifications/v1/resolvable-type.ts +++ b/packages/abi/src/parser/specifications/v1/resolvable-type.ts @@ -19,7 +19,7 @@ interface ResolvableComponent { export class ResolvableType { private metadataType: AbiMetadataTypeV1; - type: string; + swayType: string; components: ResolvableComponent[] | undefined; constructor( @@ -28,7 +28,7 @@ export class ResolvableType { public typeParamsArgsMap: Array<[number, ResolvedType | ResolvableType]> | undefined ) { this.metadataType = this.findMetadataType(metadataTypeId); - this.type = this.metadataType.type; + this.swayType = this.metadataType.type; this.typeParamsArgsMap ??= this.mapTypeParametersAndArgs(this.metadataType, undefined); let components = this.metadataType.components; @@ -59,7 +59,7 @@ export class ResolvableType { name: component.name, type: component.type.toAbiType(), })), - swayType: this.type, + swayType: this.swayType, typeParameters: this.typeParamsArgsMap?.map(([, resolvableType]) => (resolvableType as ResolvableType).toAbiType() ), @@ -147,7 +147,7 @@ export class ResolvableType { private resolveConcreteType(type: AbiConcreteTypeV1): ResolvedType { if (type.metadataTypeId === undefined) { return new ResolvedType({ - type: type.type, + swayType: type.type, typeId: type.concreteTypeId, }); } @@ -253,7 +253,7 @@ export class ResolvableType { }; }); return new ResolvedType({ - type: this.metadataType.type, + swayType: this.metadataType.type, typeId, components, typeParamsArgsMap: typeArgs, diff --git a/packages/abi/src/parser/specifications/v1/resolved-type.ts b/packages/abi/src/parser/specifications/v1/resolved-type.ts index cf0c1646499..848d03ac164 100644 --- a/packages/abi/src/parser/specifications/v1/resolved-type.ts +++ b/packages/abi/src/parser/specifications/v1/resolved-type.ts @@ -6,20 +6,20 @@ export interface ResolvedComponent { } export class ResolvedType { - public type: string; + public swayType: string; public typeId: string | number; public components: ResolvedComponent[] | undefined; public typeParamsArgsMap: Array<[number, ResolvedType]> | undefined; private metadataTypeId: number | undefined; constructor(params: { - type: string; + swayType: string; typeId: string | number; components?: ResolvedComponent[]; typeParamsArgsMap?: Array<[number, ResolvedType]>; metadataTypeId?: number; }) { - this.type = params.type; + this.swayType = params.swayType; this.typeId = params.typeId; this.components = params.components; this.typeParamsArgsMap = params.typeParamsArgsMap; @@ -28,7 +28,7 @@ export class ResolvedType { public toAbiType(): AbiType { return { - swayType: this.type, + swayType: this.swayType, concreteTypeId: this.typeId as string, components: this.components?.map((c) => ({ name: c.name, type: c.type.toAbiType() })), metadata: this.metadataTypeId From a07a3b5c26a2e5d7e10706c9158d0a1b23e5b3d2 Mon Sep 17 00:00:00 2001 From: Peter Smith Date: Thu, 5 Dec 2024 15:32:35 +0000 Subject: [PATCH 023/126] chore: removed `specVersion` --- packages/abi/src/parser/abi.ts | 1 - packages/abi/src/parser/specifications/v1/parser.ts | 1 - 2 files changed, 2 deletions(-) diff --git a/packages/abi/src/parser/abi.ts b/packages/abi/src/parser/abi.ts index 78dd97973af..aaf26e0345c 100644 --- a/packages/abi/src/parser/abi.ts +++ b/packages/abi/src/parser/abi.ts @@ -1,5 +1,4 @@ export interface Abi { - specVersion: string; encodingVersion: string; programType: string; metadataTypes: AbiTypeMetadata[]; diff --git a/packages/abi/src/parser/specifications/v1/parser.ts b/packages/abi/src/parser/specifications/v1/parser.ts index d52a349e931..3836d18df7f 100644 --- a/packages/abi/src/parser/specifications/v1/parser.ts +++ b/packages/abi/src/parser/specifications/v1/parser.ts @@ -50,7 +50,6 @@ export class AbiParserV1 { return { metadataTypes: resolvableTypes.map((rt) => rt.toAbiType()), types, - specVersion: abi.specVersion, encodingVersion: abi.encodingVersion, programType: abi.programType, functions: abi.functions.map((fn: AbiFunctionV1) => ({ From 583fcc384d0957cef5ae4ac1b227a961afaad87d Mon Sep 17 00:00:00 2001 From: nedsalk Date: Fri, 6 Dec 2024 11:11:29 +0100 Subject: [PATCH 024/126] add comments --- .../specifications/v1/resolvable-type.ts | 66 ++++++++++++++----- 1 file changed, 48 insertions(+), 18 deletions(-) diff --git a/packages/abi/src/parser/specifications/v1/resolvable-type.ts b/packages/abi/src/parser/specifications/v1/resolvable-type.ts index 378bb5bb69d..898b73ef2f9 100644 --- a/packages/abi/src/parser/specifications/v1/resolvable-type.ts +++ b/packages/abi/src/parser/specifications/v1/resolvable-type.ts @@ -29,7 +29,11 @@ export class ResolvableType { ) { this.metadataType = this.findMetadataType(metadataTypeId); this.swayType = this.metadataType.type; - this.typeParamsArgsMap ??= this.mapTypeParametersAndArgs(this.metadataType, undefined); + this.typeParamsArgsMap ??= this.metadataType.typeParameters?.map((typeParameter) => [ + typeParameter, + new ResolvableType(this.abi, typeParameter, undefined), + ]); + let components = this.metadataType.components; /** @@ -108,15 +112,8 @@ export class ResolvableType { private mapTypeParametersAndArgs( metadataType: AbiMetadataTypeV1, - args: (ResolvableType | ResolvedType)[] | undefined + args: (ResolvableType | ResolvedType)[] ): Array<[number, ResolvedType | ResolvableType]> | undefined { - if (!args) { - return metadataType.typeParameters?.map((typeParameter) => [ - typeParameter, - new ResolvableType(this.abi, typeParameter, undefined), - ]); - } - return metadataType.typeParameters?.map((typeParameter, idx) => [typeParameter, args[idx]]); } @@ -126,7 +123,8 @@ export class ResolvableType { ): ResolvableComponent { const name = (component as AbiComponentV1).name; - if (typeof component.typeId === 'string') { + const isConcreteType = typeof component.typeId === 'string'; + if (isConcreteType) { const concreteType = this.findConcreteType(component.typeId); return { name, @@ -145,6 +143,10 @@ export class ResolvableType { * Concrete types are *resolved* because everything is known about them. */ private resolveConcreteType(type: AbiConcreteTypeV1): ResolvedType { + /** + * If the type doesn't have a linked metadata type, we can resolve it immediately. + * This is the case for e.g. u8, u16, ... + */ if (type.metadataTypeId === undefined) { return new ResolvedType({ swayType: type.type, @@ -152,6 +154,12 @@ export class ResolvableType { }); } + /** + * If it has a metadata type associated to it, but it's not generic, + * we'll create a ResolvableType with that metadata type, + * and then resolve it immediately. + * This would be the case for e.g. non-generic structs and enums. + */ if (!type.typeArguments) { return new ResolvableType(this.abi, type.metadataTypeId, undefined).resolveInternal( type.concreteTypeId, @@ -159,6 +167,11 @@ export class ResolvableType { ); } + /** + * The type has a generic metadata type associated to it. + * We must resolve all the type arguments (which are always concrete), + * and then resolve the linked metadata type with these arguments. + */ const metadataType = this.findMetadataType(type.metadataTypeId); const concreteTypeArgs = type.typeArguments.map((typeArgument) => { @@ -210,20 +223,35 @@ export class ResolvableType { (typeArgument) => this.handleComponent(parent, typeArgument).type ); + /** + * If there are no type arguments because the metadata type isn't generic, + * we can resolve it immediately. + * This would be the case for e.g. non-generic structs and enums. + */ + if (!typeArgs?.length) { + return new ResolvableType(this.abi, metadataType.metadataTypeId, undefined).resolveInternal( + metadataType.metadataTypeId, + undefined + ); + } + const resolvable = new ResolvableType( this.abi, metadataType.metadataTypeId, this.mapTypeParametersAndArgs(metadataType, typeArgs) ); + /** + * If all type arguments are resolved, we can resolve the metadata type immediately. + * This would be the case for every concrete type as it has all the type arguments known. + * However, if the initial type being resolved is a generic metadata type, + * then this check will resolve to `false` because there are no concrete type arguments + * to resolve the generics with. + */ if (typeArgs?.every((typeArgument) => typeArgument instanceof ResolvedType)) { return resolvable.resolveInternal(metadataType.metadataTypeId, undefined); } - if (resolvable.components?.every((component) => component.type instanceof ResolvedType)) { - return resolvable.resolveInternal(metadataType.metadataTypeId, undefined); - } - return resolvable; } @@ -241,6 +269,7 @@ export class ResolvableType { const resolvedGenericType = typeArgs?.find( ([typeParameterId]) => (component.type as ResolvableType).metadataTypeId === typeParameterId )?.[1]; + if (resolvedGenericType) { return { name: component.name, @@ -290,10 +319,11 @@ export class ResolvableType { return this.resolveConcreteType(concreteTypeArg); }); - const typeParamsArgsMap = this.mapTypeParametersAndArgs( - this.metadataType, - concreteTypeArgs - ) as Array<[number, ResolvedType]>; + const typeParamsArgsMap = concreteTypeArgs?.length + ? (this.mapTypeParametersAndArgs(this.metadataType, concreteTypeArgs) as Array< + [number, ResolvedType] + >) + : undefined; return this.resolveInternal(concreteType.concreteTypeId, typeParamsArgsMap); } From da6384b287befde413891d0297eeeabb68e214a7 Mon Sep 17 00:00:00 2001 From: Peter Smith Date: Fri, 6 Dec 2024 11:15:45 +0000 Subject: [PATCH 025/126] chore: added name to typeArguments --- packages/abi/src/parser/specifications/v1/specification.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/abi/src/parser/specifications/v1/specification.ts b/packages/abi/src/parser/specifications/v1/specification.ts index 1dfdff6e8b3..f360fbba8bb 100644 --- a/packages/abi/src/parser/specifications/v1/specification.ts +++ b/packages/abi/src/parser/specifications/v1/specification.ts @@ -28,11 +28,10 @@ export interface AbiMetadataTypeV1 { readonly typeParameters?: readonly number[]; } -export interface AbiComponentV1 extends AbiTypeArgumentV1 { - readonly name: string; -} +export interface AbiComponentV1 extends AbiTypeArgumentV1 {} export interface AbiTypeArgumentV1 { + readonly name: string; readonly typeId: number | string; // the type metadata declaration ID or type concrete declaration hash based ID of the type of the component. readonly typeArguments?: readonly AbiTypeArgumentV1[]; } From 4c64f4952341a8d028436ae3308db99bd6c2b269 Mon Sep 17 00:00:00 2001 From: nedsalk Date: Fri, 6 Dec 2024 14:14:41 +0100 Subject: [PATCH 026/126] comments --- .../parser/specifications/v1/resolvable-type.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/abi/src/parser/specifications/v1/resolvable-type.ts b/packages/abi/src/parser/specifications/v1/resolvable-type.ts index 898b73ef2f9..c1cb061ed88 100644 --- a/packages/abi/src/parser/specifications/v1/resolvable-type.ts +++ b/packages/abi/src/parser/specifications/v1/resolvable-type.ts @@ -144,7 +144,7 @@ export class ResolvableType { */ private resolveConcreteType(type: AbiConcreteTypeV1): ResolvedType { /** - * If the type doesn't have a linked metadata type, we can resolve it immediately. + * If the concrete type doesn't have a linked metadata type, we can resolve it immediately. * This is the case for e.g. u8, u16, ... */ if (type.metadataTypeId === undefined) { @@ -155,9 +155,9 @@ export class ResolvableType { } /** - * If it has a metadata type associated to it, but it's not generic, - * we'll create a ResolvableType with that metadata type, - * and then resolve it immediately. + * The concrete type has an associated metadata type. + * If it's not generic (no type arguments), + * we'll create a ResolvableType with that metadata type, and then resolve it immediately. * This would be the case for e.g. non-generic structs and enums. */ if (!type.typeArguments) { @@ -168,17 +168,17 @@ export class ResolvableType { } /** - * The type has a generic metadata type associated to it. + * The concrete type's underlying metadata type is generic. * We must resolve all the type arguments (which are always concrete), - * and then resolve the linked metadata type with these arguments. + * and then resolve the underlying metadata type with these arguments. */ - const metadataType = this.findMetadataType(type.metadataTypeId); - const concreteTypeArgs = type.typeArguments.map((typeArgument) => { const concreteTypeArg = this.findConcreteType(typeArgument); return this.resolveConcreteType(concreteTypeArg); }); + const metadataType = this.findMetadataType(type.metadataTypeId); + return new ResolvableType( this.abi, type.metadataTypeId, From ca57c86da937f01545b027be069569356b3900e9 Mon Sep 17 00:00:00 2001 From: nedsalk Date: Fri, 6 Dec 2024 17:14:13 +0100 Subject: [PATCH 027/126] fix? --- .../src/parser/specifications/v1/resolvable-type.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/abi/src/parser/specifications/v1/resolvable-type.ts b/packages/abi/src/parser/specifications/v1/resolvable-type.ts index c1cb061ed88..f235746f630 100644 --- a/packages/abi/src/parser/specifications/v1/resolvable-type.ts +++ b/packages/abi/src/parser/specifications/v1/resolvable-type.ts @@ -234,13 +234,16 @@ export class ResolvableType { undefined ); } - const resolvable = new ResolvableType( this.abi, metadataType.metadataTypeId, this.mapTypeParametersAndArgs(metadataType, typeArgs) ); + const allTypeArgsResolved = resolvable.typeParamsArgsMap + ?.map(([, typeArg]) => typeArg) + .every((ta) => ta instanceof ResolvedType); + /** * If all type arguments are resolved, we can resolve the metadata type immediately. * This would be the case for every concrete type as it has all the type arguments known. @@ -248,7 +251,11 @@ export class ResolvableType { * then this check will resolve to `false` because there are no concrete type arguments * to resolve the generics with. */ - if (typeArgs?.every((typeArgument) => typeArgument instanceof ResolvedType)) { + if (allTypeArgsResolved) { + return resolvable.resolveInternal(metadataType.metadataTypeId, undefined); + } + + if (resolvable.components?.every((component) => component.type instanceof ResolvedType)) { return resolvable.resolveInternal(metadataType.metadataTypeId, undefined); } From a2118e281647d438f9eb4890074f02286925e51a Mon Sep 17 00:00:00 2001 From: nedsalk Date: Fri, 6 Dec 2024 17:35:12 +0100 Subject: [PATCH 028/126] fix? --- .../abi/src/parser/specifications/v1/resolvable-type.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/abi/src/parser/specifications/v1/resolvable-type.ts b/packages/abi/src/parser/specifications/v1/resolvable-type.ts index f235746f630..9a5c2739c40 100644 --- a/packages/abi/src/parser/specifications/v1/resolvable-type.ts +++ b/packages/abi/src/parser/specifications/v1/resolvable-type.ts @@ -240,10 +240,6 @@ export class ResolvableType { this.mapTypeParametersAndArgs(metadataType, typeArgs) ); - const allTypeArgsResolved = resolvable.typeParamsArgsMap - ?.map(([, typeArg]) => typeArg) - .every((ta) => ta instanceof ResolvedType); - /** * If all type arguments are resolved, we can resolve the metadata type immediately. * This would be the case for every concrete type as it has all the type arguments known. @@ -251,7 +247,7 @@ export class ResolvableType { * then this check will resolve to `false` because there are no concrete type arguments * to resolve the generics with. */ - if (allTypeArgsResolved) { + if (typeArgs.every((ta) => ta instanceof ResolvedType)) { return resolvable.resolveInternal(metadataType.metadataTypeId, undefined); } From 16c340e3539715e4407c2febcaf4095c63dcd3a9 Mon Sep 17 00:00:00 2001 From: Peter Smith Date: Wed, 11 Dec 2024 11:45:03 +0000 Subject: [PATCH 029/126] chore: rollback to working state --- packages/abi/src/parser/index.ts | 2 +- .../specifications/v1/resolvable-type.ts | 42 ++++++++----------- 2 files changed, 19 insertions(+), 25 deletions(-) diff --git a/packages/abi/src/parser/index.ts b/packages/abi/src/parser/index.ts index 1d0b7a7f86b..52984dcec05 100644 --- a/packages/abi/src/parser/index.ts +++ b/packages/abi/src/parser/index.ts @@ -1,3 +1,3 @@ -export { AbiParser } from './abi-parser'; +export { AbiParser, AbiSpecification } from './abi-parser'; export * from './abi'; export * from './specifications/v1/specification'; diff --git a/packages/abi/src/parser/specifications/v1/resolvable-type.ts b/packages/abi/src/parser/specifications/v1/resolvable-type.ts index 9a5c2739c40..dc6ee18ecba 100644 --- a/packages/abi/src/parser/specifications/v1/resolvable-type.ts +++ b/packages/abi/src/parser/specifications/v1/resolvable-type.ts @@ -29,11 +29,7 @@ export class ResolvableType { ) { this.metadataType = this.findMetadataType(metadataTypeId); this.swayType = this.metadataType.type; - this.typeParamsArgsMap ??= this.metadataType.typeParameters?.map((typeParameter) => [ - typeParameter, - new ResolvableType(this.abi, typeParameter, undefined), - ]); - + this.typeParamsArgsMap ??= this.mapTypeParametersAndArgs(this.metadataType, undefined); let components = this.metadataType.components; /** @@ -47,7 +43,10 @@ export class ResolvableType { if (swayTypeMatchers.vector(this.metadataType.type)) { components = components?.map((component) => { if (component.name === 'buf') { - return component.typeArguments?.[0]; + return { + ...component.typeArguments?.[0], + name: component.name, + }; } return component; }) as AbiComponentV1[]; @@ -112,8 +111,15 @@ export class ResolvableType { private mapTypeParametersAndArgs( metadataType: AbiMetadataTypeV1, - args: (ResolvableType | ResolvedType)[] + args: (ResolvableType | ResolvedType)[] | undefined ): Array<[number, ResolvedType | ResolvableType]> | undefined { + if (!args) { + return metadataType.typeParameters?.map((typeParameter) => [ + typeParameter, + new ResolvableType(this.abi, typeParameter, undefined), + ]); + } + return metadataType.typeParameters?.map((typeParameter, idx) => [typeParameter, args[idx]]); } @@ -223,17 +229,6 @@ export class ResolvableType { (typeArgument) => this.handleComponent(parent, typeArgument).type ); - /** - * If there are no type arguments because the metadata type isn't generic, - * we can resolve it immediately. - * This would be the case for e.g. non-generic structs and enums. - */ - if (!typeArgs?.length) { - return new ResolvableType(this.abi, metadataType.metadataTypeId, undefined).resolveInternal( - metadataType.metadataTypeId, - undefined - ); - } const resolvable = new ResolvableType( this.abi, metadataType.metadataTypeId, @@ -247,7 +242,7 @@ export class ResolvableType { * then this check will resolve to `false` because there are no concrete type arguments * to resolve the generics with. */ - if (typeArgs.every((ta) => ta instanceof ResolvedType)) { + if (typeArgs?.every((typeArgument) => typeArgument instanceof ResolvedType)) { return resolvable.resolveInternal(metadataType.metadataTypeId, undefined); } @@ -322,11 +317,10 @@ export class ResolvableType { return this.resolveConcreteType(concreteTypeArg); }); - const typeParamsArgsMap = concreteTypeArgs?.length - ? (this.mapTypeParametersAndArgs(this.metadataType, concreteTypeArgs) as Array< - [number, ResolvedType] - >) - : undefined; + const typeParamsArgsMap = this.mapTypeParametersAndArgs( + this.metadataType, + concreteTypeArgs + ) as Array<[number, ResolvedType]>; return this.resolveInternal(concreteType.concreteTypeId, typeParamsArgsMap); } From 2904381158772298aafa899d04ba7c071b21ad48 Mon Sep 17 00:00:00 2001 From: nedsalk Date: Thu, 12 Dec 2024 11:04:46 +0100 Subject: [PATCH 030/126] refactoring --- packages/abi/src/index.ts | 1 + packages/abi/src/parser/abi.ts | 29 +- packages/abi/src/parser/index.ts | 2 +- .../src/parser/specifications/v1/parser.ts | 6 +- .../specifications/v1/resolvable-type.ts | 161 ++-- .../parser/specifications/v1/resolved-type.ts | 75 +- packages/fuel-gauge/src/abi/abi-parser.json | 870 ++++++++++++++++++ .../fuel-gauge/src/abi/abi-parser.test.ts | 20 + .../test/fixtures/forc-projects/Forc.toml | 1 + .../fixtures/forc-projects/parser/Forc.toml | 4 + .../fixtures/forc-projects/parser/src/main.sw | 36 + pnpm-lock.yaml | 6 +- 12 files changed, 1119 insertions(+), 92 deletions(-) create mode 100644 packages/fuel-gauge/src/abi/abi-parser.json create mode 100644 packages/fuel-gauge/src/abi/abi-parser.test.ts create mode 100644 packages/fuel-gauge/test/fixtures/forc-projects/parser/Forc.toml create mode 100644 packages/fuel-gauge/test/fixtures/forc-projects/parser/src/main.sw diff --git a/packages/abi/src/index.ts b/packages/abi/src/index.ts index 22506bf91e0..463cc711a6c 100644 --- a/packages/abi/src/index.ts +++ b/packages/abi/src/index.ts @@ -1,2 +1,3 @@ export * from './coder'; export * from './gen'; +export * from './parser'; diff --git a/packages/abi/src/parser/abi.ts b/packages/abi/src/parser/abi.ts index aaf26e0345c..22bd3ed1fed 100644 --- a/packages/abi/src/parser/abi.ts +++ b/packages/abi/src/parser/abi.ts @@ -19,16 +19,39 @@ export interface AbiType { }; } +export interface AbiTypeC { + swayType: string; + components?: AbiTypeComponent[]; + metadata: { + metadataTypeId: number; + typeArguments?: AbiType[]; + }; +} + export interface AbiTypeMetadata { - metadataTypeId: number; swayType: string; - components?: { name: string; type: AbiType | AbiTypeMetadata }[]; + metadataTypeId: number; + components?: AbiTypeComponent[]; typeParameters?: AbiTypeMetadata[]; } export interface AbiTypeComponent { name: string; - type: AbiType; + type: AbiType | AbiTypeC; +} + +export interface Component { + name: string; + type: + | AbiType + | { + swayType: string; + components?: Component[]; + metadata: { + metadataTypeId: number; + typeArguments?: AbiType[]; + }; + }; } export interface AbiFunctionInput { diff --git a/packages/abi/src/parser/index.ts b/packages/abi/src/parser/index.ts index 52984dcec05..053e0c0a003 100644 --- a/packages/abi/src/parser/index.ts +++ b/packages/abi/src/parser/index.ts @@ -1,3 +1,3 @@ -export { AbiParser, AbiSpecification } from './abi-parser'; +export { AbiParser, type AbiSpecification } from './abi-parser'; export * from './abi'; export * from './specifications/v1/specification'; diff --git a/packages/abi/src/parser/specifications/v1/parser.ts b/packages/abi/src/parser/specifications/v1/parser.ts index 3836d18df7f..c14349fb758 100644 --- a/packages/abi/src/parser/specifications/v1/parser.ts +++ b/packages/abi/src/parser/specifications/v1/parser.ts @@ -1,6 +1,6 @@ import { FuelError } from '@fuel-ts/errors'; -import type { Abi } from '../../abi'; +import type { Abi, AbiType, AbiTypeMetadata } from '../../abi'; import { mapAttribute } from './map-attribute'; import { ResolvableType } from './resolvable-type'; @@ -33,7 +33,7 @@ export class AbiParserV1 { ? resolvableType.resolve(concreteType) : new ResolvedType({ swayType: concreteType.type, typeId: concreteType.concreteTypeId }); - return resolvedType.toAbiType(); + return resolvedType.toAbiType() as AbiType; }); const getType = (concreteTypeId: string) => { @@ -48,7 +48,7 @@ export class AbiParserV1 { }; return { - metadataTypes: resolvableTypes.map((rt) => rt.toAbiType()), + metadataTypes: resolvableTypes.map((rt) => rt.toAbiType() as AbiTypeMetadata), types, encodingVersion: abi.encodingVersion, programType: abi.programType, diff --git a/packages/abi/src/parser/specifications/v1/resolvable-type.ts b/packages/abi/src/parser/specifications/v1/resolvable-type.ts index dc6ee18ecba..d4628a9dfc9 100644 --- a/packages/abi/src/parser/specifications/v1/resolvable-type.ts +++ b/packages/abi/src/parser/specifications/v1/resolvable-type.ts @@ -1,8 +1,9 @@ import { FuelError } from '@fuel-ts/errors'; import { swayTypeMatchers } from '../../../matchers/sway-type-matchers'; -import type { AbiTypeMetadata } from '../../abi'; +import type { AbiType, AbiTypeComponent, AbiTypeMetadata } from '../../abi'; +import type { ResolvedComponent } from './resolved-type'; import { ResolvedType } from './resolved-type'; import type { AbiComponentV1, @@ -29,7 +30,11 @@ export class ResolvableType { ) { this.metadataType = this.findMetadataType(metadataTypeId); this.swayType = this.metadataType.type; - this.typeParamsArgsMap ??= this.mapTypeParametersAndArgs(this.metadataType, undefined); + this.typeParamsArgsMap ??= this.metadataType.typeParameters?.map((tp) => [ + tp, + new ResolvableType(this.abi, tp, undefined), + ]); + let components = this.metadataType.components; /** @@ -41,32 +46,57 @@ export class ResolvableType { * (you just treat is as a regular struct). */ if (swayTypeMatchers.vector(this.metadataType.type)) { - components = components?.map((component) => { - if (component.name === 'buf') { - return { - ...component.typeArguments?.[0], - name: component.name, - }; - } - return component; - }) as AbiComponentV1[]; + components = components + ?.map((component) => (component.name === 'buf' ? component.typeArguments?.[0] : undefined)) + .filter((x) => x !== undefined) as AbiComponentV1[]; } this.components = components?.map((c) => this.handleComponent(this, c)); } + toAbiTypeComponentType(): AbiTypeComponent['type'] { + const res: AbiTypeComponent['type'] = { + swayType: this.swayType, + metadata: { + metadataTypeId: this.metadataTypeId, + }, + }; + + if (this.components) { + res.components = this.components.map((component) => ({ + name: component.name, + type: component.type.toAbiTypeComponentType(), + })); + } + if (this.typeParamsArgsMap) { + res.metadata.typeArguments = this.typeParamsArgsMap.map( + ([, rt]) => rt.toAbiType() as AbiType + ); + } + + return res; + } + toAbiType(): AbiTypeMetadata { - return { + const res: AbiTypeMetadata = { metadataTypeId: this.metadataTypeId, - components: this.components?.map((component) => ({ - name: component.name, - type: component.type.toAbiType(), - })), swayType: this.swayType, - typeParameters: this.typeParamsArgsMap?.map(([, resolvableType]) => - (resolvableType as ResolvableType).toAbiType() - ), }; + + if (this.components) { + res.components = this.components?.map((component) => ({ + name: component.name, + type: component.type.toAbiTypeComponentType(), + })) as AbiTypeComponent[]; + } + + if (this.typeParamsArgsMap) { + res.typeParameters = this.typeParamsArgsMap.map( + ([, rt]) => rt.toAbiType() as AbiTypeMetadata + ); + } + + return res; } /** @@ -109,17 +139,10 @@ export class ResolvableType { return concreteType; } - private mapTypeParametersAndArgs( + private static mapTypeParametersAndArgs( metadataType: AbiMetadataTypeV1, - args: (ResolvableType | ResolvedType)[] | undefined + args: (ResolvableType | ResolvedType)[] ): Array<[number, ResolvedType | ResolvableType]> | undefined { - if (!args) { - return metadataType.typeParameters?.map((typeParameter) => [ - typeParameter, - new ResolvableType(this.abi, typeParameter, undefined), - ]); - } - return metadataType.typeParameters?.map((typeParameter, idx) => [typeParameter, args[idx]]); } @@ -130,6 +153,7 @@ export class ResolvableType { const name = (component as AbiComponentV1).name; const isConcreteType = typeof component.typeId === 'string'; + if (isConcreteType) { const concreteType = this.findConcreteType(component.typeId); return { @@ -159,7 +183,6 @@ export class ResolvableType { typeId: type.concreteTypeId, }); } - /** * The concrete type has an associated metadata type. * If it's not generic (no type arguments), @@ -175,20 +198,20 @@ export class ResolvableType { /** * The concrete type's underlying metadata type is generic. - * We must resolve all the type arguments (which are always concrete), - * and then resolve the underlying metadata type with these arguments. + * We must resolve all its type parameters with the provided type arguments + * of the concrete type, and then resolve the metadata type itself. */ + const metadataType = this.findMetadataType(type.metadataTypeId); + const concreteTypeArgs = type.typeArguments.map((typeArgument) => { const concreteTypeArg = this.findConcreteType(typeArgument); return this.resolveConcreteType(concreteTypeArg); }); - const metadataType = this.findMetadataType(type.metadataTypeId); - return new ResolvableType( this.abi, type.metadataTypeId, - this.mapTypeParametersAndArgs(metadataType, concreteTypeArgs) + ResolvableType.mapTypeParametersAndArgs(metadataType, concreteTypeArgs) ).resolveInternal(type.concreteTypeId, undefined); } @@ -232,25 +255,23 @@ export class ResolvableType { const resolvable = new ResolvableType( this.abi, metadataType.metadataTypeId, - this.mapTypeParametersAndArgs(metadataType, typeArgs) + !typeArgs?.length + ? undefined + : ResolvableType.mapTypeParametersAndArgs(metadataType, typeArgs) + ); + + const isGeneric = resolvable.components?.some( + (component) => component.type instanceof ResolvableType ); /** - * If all type arguments are resolved, we can resolve the metadata type immediately. - * This would be the case for every concrete type as it has all the type arguments known. - * However, if the initial type being resolved is a generic metadata type, - * then this check will resolve to `false` because there are no concrete type arguments - * to resolve the generics with. + * If any component is unresolved, this means that the metadata type is generic. + * We can't resolve it yet, so we return the resolvable type. + * If all components are resolved, we can resolve the metadata type immediately. */ - if (typeArgs?.every((typeArgument) => typeArgument instanceof ResolvedType)) { - return resolvable.resolveInternal(metadataType.metadataTypeId, undefined); - } - - if (resolvable.components?.every((component) => component.type instanceof ResolvedType)) { - return resolvable.resolveInternal(metadataType.metadataTypeId, undefined); - } - - return resolvable; + return isGeneric + ? resolvable + : resolvable.resolveInternal(metadataType.metadataTypeId, undefined); } private resolveInternal( @@ -260,23 +281,24 @@ export class ResolvableType { const typeArgs = this.resolveTypeArgs(typeParamsArgsMap); const components: ResolvedType['components'] = this.components?.map((component) => { - if (component.type instanceof ResolvedType) { - return component as { name: string; type: ResolvedType }; + const { name, type } = component; + + if (type instanceof ResolvedType) { + return component as ResolvedComponent; } const resolvedGenericType = typeArgs?.find( - ([typeParameterId]) => (component.type as ResolvableType).metadataTypeId === typeParameterId + ([typeParameterId]) => type.metadataTypeId === typeParameterId )?.[1]; - if (resolvedGenericType) { return { - name: component.name, + name, type: resolvedGenericType, }; } return { - name: component.name, - type: component.type.resolveInternal(component.type.metadataTypeId, typeArgs), + name, + type: type.resolveInternal(type.metadataTypeId, typeParamsArgsMap), }; }); return new ResolvedType({ @@ -284,7 +306,7 @@ export class ResolvableType { typeId, components, typeParamsArgsMap: typeArgs, - metadataTypeId: this.metadataTypeId, + metadataType: this.metadataType, }); } @@ -293,21 +315,21 @@ export class ResolvableType { ): [number, ResolvedType][] | undefined { return this.typeParamsArgsMap === undefined ? typeParamsArgsMap - : this.typeParamsArgsMap.map(([typeParameter, value]) => { + : this.typeParamsArgsMap.map(([tp, value]) => { if (value instanceof ResolvableType) { const resolved = typeParamsArgsMap?.find( ([typeParameterId]) => typeParameterId === value.metadataTypeId ); - return ( - resolved ?? [ - +typeParameter, - value.resolveInternal(value.metadataTypeId, typeParamsArgsMap), - ] - ); + if (!resolved) { + const val = value.resolveInternal(value.metadataTypeId, typeParamsArgsMap); + return [tp, val]; + } + + return resolved; } - return [+typeParameter, value]; + return [tp, value]; }); } @@ -317,10 +339,11 @@ export class ResolvableType { return this.resolveConcreteType(concreteTypeArg); }); - const typeParamsArgsMap = this.mapTypeParametersAndArgs( - this.metadataType, - concreteTypeArgs - ) as Array<[number, ResolvedType]>; + const typeParamsArgsMap = concreteTypeArgs + ? (ResolvableType.mapTypeParametersAndArgs(this.metadataType, concreteTypeArgs) as Array< + [number, ResolvedType] + >) + : undefined; return this.resolveInternal(concreteType.concreteTypeId, typeParamsArgsMap); } diff --git a/packages/abi/src/parser/specifications/v1/resolved-type.ts b/packages/abi/src/parser/specifications/v1/resolved-type.ts index 848d03ac164..e1c9963b65d 100644 --- a/packages/abi/src/parser/specifications/v1/resolved-type.ts +++ b/packages/abi/src/parser/specifications/v1/resolved-type.ts @@ -1,4 +1,6 @@ -import type { AbiType } from '../../abi'; +import type { AbiType, AbiTypeComponent } from '../../abi'; + +import type { AbiMetadataTypeV1 } from './specification'; export interface ResolvedComponent { name: string; @@ -10,33 +12,80 @@ export class ResolvedType { public typeId: string | number; public components: ResolvedComponent[] | undefined; public typeParamsArgsMap: Array<[number, ResolvedType]> | undefined; - private metadataTypeId: number | undefined; + private metadataType: AbiMetadataTypeV1 | undefined; constructor(params: { swayType: string; typeId: string | number; components?: ResolvedComponent[]; typeParamsArgsMap?: Array<[number, ResolvedType]>; - metadataTypeId?: number; + metadataType?: AbiMetadataTypeV1; }) { this.swayType = params.swayType; this.typeId = params.typeId; this.components = params.components; this.typeParamsArgsMap = params.typeParamsArgsMap; - this.metadataTypeId = params.metadataTypeId; + this.metadataType = params.metadataType; + } + + public toAbiTypeComponentType(): AbiTypeComponent['type'] { + let res: AbiTypeComponent['type']; + + if (typeof this.typeId === 'string') { + res = { + swayType: this.swayType, + concreteTypeId: this.typeId, + }; + } else { + res = { + swayType: this.swayType, + metadata: { + metadataTypeId: this.typeId, + }, + }; + } + + if (this.metadataType) { + res.metadata = { + metadataTypeId: this.metadataType.metadataTypeId, + }; + if (this.typeParamsArgsMap && this.metadataType?.typeParameters?.length) { + res.metadata.typeArguments = this.typeParamsArgsMap.map((t) => t[1].toAbiType() as AbiType); + } + } + + if (this.components) { + res.components = this.components.map((c) => ({ + name: c.name, + type: c.type.toAbiTypeComponentType(), + })); + } + + return res; } public toAbiType(): AbiType { - return { - swayType: this.swayType, + const res: AbiType = { concreteTypeId: this.typeId as string, - components: this.components?.map((c) => ({ name: c.name, type: c.type.toAbiType() })), - metadata: this.metadataTypeId - ? { - metadataTypeId: this.metadataTypeId, - typeArguments: this.typeParamsArgsMap?.map((tpa) => tpa[1].toAbiType()), - } - : undefined, + swayType: this.swayType, }; + + if (this.metadataType) { + res.metadata = { + metadataTypeId: this.metadataType.metadataTypeId, + }; + if (this.typeParamsArgsMap) { + res.metadata.typeArguments = this.typeParamsArgsMap.map((t) => t[1].toAbiType() as AbiType); + } + } + + if (this.components) { + res.components = this.components.map((c) => ({ + name: c.name, + type: c.type.toAbiTypeComponentType(), + })); + } + + return res; } } diff --git a/packages/fuel-gauge/src/abi/abi-parser.json b/packages/fuel-gauge/src/abi/abi-parser.json new file mode 100644 index 00000000000..6145777d83c --- /dev/null +++ b/packages/fuel-gauge/src/abi/abi-parser.json @@ -0,0 +1,870 @@ +{ + "metadataTypes": [ + { + "metadataTypeId": 0, + "swayType": "(_, _)", + "components": [ + { + "name": "__tuple_element", + "type": { + "swayType": "generic E", + "metadata": { + "metadataTypeId": 2 + } + } + }, + { + "name": "__tuple_element", + "type": { + "swayType": "generic F", + "metadata": { + "metadataTypeId": 3 + } + } + } + ] + }, + { + "metadataTypeId": 1, + "swayType": "[_; 3]", + "components": [ + { + "name": "__array_element", + "type": { + "swayType": "generic E", + "metadata": { + "metadataTypeId": 2 + } + } + } + ] + }, + { + "metadataTypeId": 2, + "swayType": "generic E" + }, + { + "metadataTypeId": 3, + "swayType": "generic F" + }, + { + "metadataTypeId": 4, + "swayType": "generic T" + }, + { + "metadataTypeId": 5, + "swayType": "raw untyped ptr" + }, + { + "metadataTypeId": 6, + "swayType": "struct NonGenericStruct", + "components": [ + { + "name": "a", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + } + ] + }, + { + "metadataTypeId": 7, + "swayType": "struct SampleGenericStruct", + "components": [ + { + "name": "a", + "type": { + "swayType": "struct std::vec::Vec", + "metadata": { + "metadataTypeId": 11, + "typeArguments": [ + { + "metadataTypeId": 8, + "swayType": "struct SampleStruct", + "components": [ + { + "name": "a", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + }, + { + "name": "b", + "type": { + "swayType": "u32", + "metadata": { + "metadataTypeId": 12 + } + } + }, + { + "name": "c", + "type": { + "swayType": "generic E", + "metadata": { + "metadataTypeId": 2 + } + } + } + ], + "typeParameters": [ + { + "metadataTypeId": 2, + "swayType": "generic E" + } + ] + } + ] + }, + "components": [ + { + "name": "", + "type": { + "swayType": "struct SampleStruct", + "metadata": { + "metadataTypeId": 8, + "typeArguments": [ + { + "metadataTypeId": 2, + "swayType": "generic E" + } + ] + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + }, + { + "name": "b", + "type": { + "swayType": "u32", + "metadata": { + "metadataTypeId": 12 + } + } + }, + { + "name": "c", + "type": { + "swayType": "generic E", + "metadata": { + "metadataTypeId": 2 + } + } + } + ] + } + } + ] + } + }, + { + "name": "b", + "type": { + "swayType": "struct std::vec::Vec", + "metadata": { + "metadataTypeId": 11, + "typeArguments": [ + { + "concreteTypeId": 8, + "swayType": "struct SampleStruct", + "metadata": { + "metadataTypeId": 8, + "typeArguments": [ + { + "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef", + "swayType": "u16" + } + ] + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + }, + { + "name": "b", + "type": { + "swayType": "u32", + "metadata": { + "metadataTypeId": 12 + } + } + }, + { + "name": "c", + "type": { + "swayType": "u16", + "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef" + } + } + ] + } + ] + }, + "components": [ + { + "name": "", + "type": { + "swayType": "struct SampleStruct", + "metadata": { + "metadataTypeId": 8, + "typeArguments": [ + { + "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef", + "swayType": "u16" + } + ] + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + }, + { + "name": "b", + "type": { + "swayType": "u32", + "metadata": { + "metadataTypeId": 12 + } + } + }, + { + "name": "c", + "type": { + "swayType": "u16", + "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef" + } + } + ] + } + } + ] + } + } + ], + "typeParameters": [ + { + "metadataTypeId": 2, + "swayType": "generic E" + } + ] + }, + { + "metadataTypeId": 8, + "swayType": "struct SampleStruct", + "components": [ + { + "name": "a", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + }, + { + "name": "b", + "type": { + "swayType": "u32", + "metadata": { + "metadataTypeId": 12 + } + } + }, + { + "name": "c", + "type": { + "swayType": "generic T", + "metadata": { + "metadataTypeId": 4 + } + } + } + ], + "typeParameters": [ + { + "metadataTypeId": 4, + "swayType": "generic T" + } + ] + }, + { + "metadataTypeId": 9, + "swayType": "struct StructWithImplicitGenerics", + "components": [ + { + "name": "a", + "type": { + "swayType": "[_; 3]", + "metadata": { + "metadataTypeId": 1 + }, + "components": [ + { + "name": "__array_element", + "type": { + "swayType": "generic E", + "metadata": { + "metadataTypeId": 2 + } + } + } + ] + } + }, + { + "name": "b", + "type": { + "swayType": "(_, _)", + "metadata": { + "metadataTypeId": 0 + }, + "components": [ + { + "name": "__tuple_element", + "type": { + "swayType": "generic E", + "metadata": { + "metadataTypeId": 2 + } + } + }, + { + "name": "__tuple_element", + "type": { + "swayType": "generic F", + "metadata": { + "metadataTypeId": 3 + } + } + } + ] + } + } + ], + "typeParameters": [ + { + "metadataTypeId": 2, + "swayType": "generic E" + }, + { + "metadataTypeId": 3, + "swayType": "generic F" + } + ] + }, + { + "metadataTypeId": 11, + "swayType": "struct std::vec::Vec", + "components": [ + { + "name": "", + "type": { + "swayType": "generic T", + "metadata": { + "metadataTypeId": 4 + } + } + } + ], + "typeParameters": [ + { + "metadataTypeId": 4, + "swayType": "generic T" + } + ] + }, + { + "metadataTypeId": 12, + "swayType": "u32" + }, + { + "metadataTypeId": 13, + "swayType": "u64" + } + ], + "types": [ + { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + }, + { + "swayType": "struct NonGenericStruct", + "concreteTypeId": "bd75e47abe514c2818021f4d6e2db12367f68c77f29bf8352713dfa5b70a4767", + "metadata": { + "metadataTypeId": 6 + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + } + ] + }, + { + "concreteTypeId": "60352018729e65e22b2767c13173fc55659dfa7908cd39a682c21c71d18885df", + "swayType": "struct SampleGenericStruct", + "metadata": { + "metadataTypeId": 7, + "typeArguments": [ + { + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b", + "swayType": "u8" + } + ] + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "struct std::vec::Vec", + "metadata": { + "metadataTypeId": 11, + "typeArguments": [ + { + "concreteTypeId": 8, + "swayType": "struct SampleStruct", + "metadata": { + "metadataTypeId": 8, + "typeArguments": [ + { + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b", + "swayType": "u8" + } + ] + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + }, + { + "name": "b", + "type": { + "swayType": "u32", + "metadata": { + "metadataTypeId": 12 + } + } + }, + { + "name": "c", + "type": { + "swayType": "u8", + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + } + } + ] + } + ] + }, + "components": [ + { + "name": "", + "type": { + "swayType": "struct SampleStruct", + "metadata": { + "metadataTypeId": 8, + "typeArguments": [ + { + "swayType": "u8", + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + } + ] + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + }, + { + "name": "b", + "type": { + "swayType": "u32", + "metadata": { + "metadataTypeId": 12 + } + } + }, + { + "name": "c", + "type": { + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b", + "swayType": "u8" + } + } + ] + } + } + ] + } + }, + { + "name": "b", + "type": { + "swayType": "struct std::vec::Vec", + "metadata": { + "metadataTypeId": 11, + "typeArguments": [ + { + "concreteTypeId": 8, + "swayType": "struct SampleStruct", + "metadata": { + "metadataTypeId": 8, + "typeArguments": [ + { + "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef", + "swayType": "u16" + } + ] + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + }, + { + "name": "b", + "type": { + "swayType": "u32", + "metadata": { + "metadataTypeId": 12 + } + } + }, + { + "name": "c", + "type": { + "swayType": "u16", + "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef" + } + } + ] + } + ] + }, + "components": [ + { + "name": "", + "type": { + "swayType": "struct SampleStruct", + "metadata": { + "metadataTypeId": 8, + "typeArguments": [ + { + "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef", + "swayType": "u16" + } + ] + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + }, + { + "name": "b", + "type": { + "swayType": "u32", + "metadata": { + "metadataTypeId": 12 + } + } + }, + { + "name": "c", + "type": { + "swayType": "u16", + "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef" + } + } + ] + } + } + ] + } + } + ] + }, + { + "swayType": "struct SampleStruct", + "concreteTypeId": "1e660e9b9c8c191cd7cbfd1c9595c7367763d6ed3bcd1a7b4824d5db4af46700", + "metadata": { + "metadataTypeId": 8, + "typeArguments": [ + { + "swayType": "struct std::vec::Vec", + "concreteTypeId": "10161b42df4a9c43ea4f52fb80e3a16978828049e0daa278e6e85823a3613928", + "metadata": { + "metadataTypeId": 11, + "typeArguments": [ + { + "swayType": "struct NonGenericStruct", + "concreteTypeId": "bd75e47abe514c2818021f4d6e2db12367f68c77f29bf8352713dfa5b70a4767", + "metadata": { + "metadataTypeId": 6 + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + } + ] + } + ] + }, + "components": [ + { + "name": "", + "type": { + "swayType": "struct NonGenericStruct", + "concreteTypeId": "bd75e47abe514c2818021f4d6e2db12367f68c77f29bf8352713dfa5b70a4767", + "metadata": { + "metadataTypeId": 6 + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + } + ] + } + } + ] + } + ] + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + }, + { + "name": "b", + "type": { + "swayType": "u32", + "metadata": { + "metadataTypeId": 12 + } + } + }, + { + "name": "c", + "type": { + "swayType": "struct std::vec::Vec", + "concreteTypeId": "10161b42df4a9c43ea4f52fb80e3a16978828049e0daa278e6e85823a3613928", + "metadata": { + "metadataTypeId": 11, + "typeArguments": [ + { + "swayType": "struct NonGenericStruct", + "concreteTypeId": "bd75e47abe514c2818021f4d6e2db12367f68c77f29bf8352713dfa5b70a4767", + "metadata": { + "metadataTypeId": 6 + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + } + ] + } + ] + }, + "components": [ + { + "name": "", + "type": { + "swayType": "struct NonGenericStruct", + "concreteTypeId": "bd75e47abe514c2818021f4d6e2db12367f68c77f29bf8352713dfa5b70a4767", + "metadata": { + "metadataTypeId": 6 + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + } + ] + } + } + ] + } + } + ] + }, + { + "swayType": "struct StructWithImplicitGenerics", + "concreteTypeId": "426345c4ea93db9f08eeb9fe6047ef0273294bfb1140600a0660be9f2a08d750", + "metadata": { + "metadataTypeId": 9, + "typeArguments": [ + { + "swayType": "u8", + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + }, + { + "swayType": "u16", + "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef" + } + ] + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "[_; 3]", + "metadata": { + "metadataTypeId": 1 + }, + "components": [ + { + "name": "__array_element", + "type": { + "swayType": "u8", + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + } + } + ] + } + }, + { + "name": "b", + "type": { + "swayType": "(_, _)", + "metadata": { + "metadataTypeId": 0 + }, + "components": [ + { + "name": "__tuple_element", + "type": { + "swayType": "u8", + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + } + }, + { + "name": "__tuple_element", + "type": { + "swayType": "u16", + "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef" + } + } + ] + } + } + ] + }, + { + "swayType": "struct std::vec::Vec", + "concreteTypeId": "10161b42df4a9c43ea4f52fb80e3a16978828049e0daa278e6e85823a3613928", + "metadata": { + "metadataTypeId": 11, + "typeArguments": [ + { + "swayType": "struct NonGenericStruct", + "concreteTypeId": "bd75e47abe514c2818021f4d6e2db12367f68c77f29bf8352713dfa5b70a4767", + "metadata": { + "metadataTypeId": 6 + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + } + ] + } + ] + }, + "components": [ + { + "name": "", + "type": { + "swayType": "struct NonGenericStruct", + "concreteTypeId": "bd75e47abe514c2818021f4d6e2db12367f68c77f29bf8352713dfa5b70a4767", + "metadata": { + "metadataTypeId": 6 + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + } + ] + } + } + ] + }, + { + "swayType": "u16", + "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef" + }, + { + "swayType": "u8", + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + } + ], + "encodingVersion": "1", + "programType": "contract", + "functions": [ + { + "name": "test", + "output": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + }, + "inputs": [] + } + ], + "loggedTypes": [], + "messageTypes": [], + "configurables": [] +} diff --git a/packages/fuel-gauge/src/abi/abi-parser.test.ts b/packages/fuel-gauge/src/abi/abi-parser.test.ts new file mode 100644 index 00000000000..5908512a5c7 --- /dev/null +++ b/packages/fuel-gauge/src/abi/abi-parser.test.ts @@ -0,0 +1,20 @@ +import { AbiParser, type AbiSpecification } from '@fuel-ts/abi'; +import { writeFileSync } from 'fs'; + +import { Parser } from '../../test/typegen'; + +import expected from './abi-parser.json'; + +describe('AbiParser', () => { + test('runs just fine', () => { + const parsed = AbiParser.parse(Parser.abi as AbiSpecification); + + writeFileSync('asdf.json', JSON.stringify(parsed, null, 2)); + + expect({ metadataTypes: parsed.metadataTypes }).toEqual({ + metadataTypes: expected.metadataTypes, + }); + expect({ concreteTypes: parsed.types }).toEqual({ concreteTypes: expected.types }); + }); +}); +``; diff --git a/packages/fuel-gauge/test/fixtures/forc-projects/Forc.toml b/packages/fuel-gauge/test/fixtures/forc-projects/Forc.toml index f4f48fc715c..d59ecd6d9c0 100644 --- a/packages/fuel-gauge/test/fixtures/forc-projects/Forc.toml +++ b/packages/fuel-gauge/test/fixtures/forc-projects/Forc.toml @@ -3,6 +3,7 @@ members = [ "abi-contract", "abi-script", "abi-predicate", + "parser", "advanced-logging", "advanced-logging-abi", "advanced-logging-other-contract", diff --git a/packages/fuel-gauge/test/fixtures/forc-projects/parser/Forc.toml b/packages/fuel-gauge/test/fixtures/forc-projects/parser/Forc.toml new file mode 100644 index 00000000000..591f549398f --- /dev/null +++ b/packages/fuel-gauge/test/fixtures/forc-projects/parser/Forc.toml @@ -0,0 +1,4 @@ +[project] +authors = ["Fuel Labs "] +license = "Apache-2.0" +name = "parser" diff --git a/packages/fuel-gauge/test/fixtures/forc-projects/parser/src/main.sw b/packages/fuel-gauge/test/fixtures/forc-projects/parser/src/main.sw new file mode 100644 index 00000000000..9b030705e85 --- /dev/null +++ b/packages/fuel-gauge/test/fixtures/forc-projects/parser/src/main.sw @@ -0,0 +1,36 @@ +contract; + +struct SampleStruct { + a: bool, + b: u32, + c: T, +} + +struct SampleGenericStruct { + a: Vec>, + b: Vec> + +} + +struct NonGenericStruct { + a: bool, +} + +pub struct StructWithImplicitGenerics { + pub a: [E; 3], + pub b: (E, F), +} + +abi VoidContract { + fn sample_struct(arg1: SampleStruct>, arg2: SampleGenericStruct) -> bool; + fn implicit_generics(arg1: StructWithImplicitGenerics) -> bool; +} + +impl VoidContract for Contract { + fn sample_struct(arg1: SampleStruct>, arg2: SampleGenericStruct) -> bool { + true + } + fn implicit_generics(arg1: StructWithImplicitGenerics) -> bool { + true + } +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 39ec7cd529b..343ae81066e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -27252,7 +27252,7 @@ snapshots: eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.3))(eslint@8.57.0))(eslint@8.57.0) - eslint-plugin-import: 2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.3))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) + eslint-plugin-import: 2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.3))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.3))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) eslint-plugin-jsx-a11y: 6.9.0(eslint@8.57.0) eslint-plugin-react: 7.35.0(eslint@8.57.0) eslint-plugin-react-hooks: 4.6.2(eslint@8.57.0) @@ -27307,7 +27307,7 @@ snapshots: enhanced-resolve: 5.17.1 eslint: 8.57.0 eslint-module-utils: 2.11.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.3))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) - eslint-plugin-import: 2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.3))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) + eslint-plugin-import: 2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.3))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.3))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) fast-glob: 3.3.2 get-tsconfig: 4.7.6 is-core-module: 2.15.1 @@ -27417,7 +27417,7 @@ snapshots: - eslint-import-resolver-webpack - supports-color - eslint-plugin-import@2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.3))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0): + eslint-plugin-import@2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.3))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.3))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0): dependencies: '@rtsao/scc': 1.1.0 array-includes: 3.1.8 From c6a4a384530adfb6a5e1c386f53c9f7cc1fa340f Mon Sep 17 00:00:00 2001 From: nedsalk Date: Thu, 12 Dec 2024 11:33:46 +0100 Subject: [PATCH 031/126] add test group --- packages/fuel-gauge/src/abi/abi-parser.test.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/fuel-gauge/src/abi/abi-parser.test.ts b/packages/fuel-gauge/src/abi/abi-parser.test.ts index 5908512a5c7..93a1b8c85e9 100644 --- a/packages/fuel-gauge/src/abi/abi-parser.test.ts +++ b/packages/fuel-gauge/src/abi/abi-parser.test.ts @@ -5,6 +5,10 @@ import { Parser } from '../../test/typegen'; import expected from './abi-parser.json'; +/** + * @group node + * @group browser + */ describe('AbiParser', () => { test('runs just fine', () => { const parsed = AbiParser.parse(Parser.abi as AbiSpecification); From cacbacf5d00ad7208ec16b38b7da508bf9e549c0 Mon Sep 17 00:00:00 2001 From: nedsalk Date: Thu, 12 Dec 2024 11:53:25 +0100 Subject: [PATCH 032/126] revert changes --- packages/abi/src/coder/abi-coder.ts | 12 ++---------- packages/abi/src/gen/abi-gen.ts | 11 +---------- 2 files changed, 3 insertions(+), 20 deletions(-) diff --git a/packages/abi/src/coder/abi-coder.ts b/packages/abi/src/coder/abi-coder.ts index 562990d4048..38325e4eff3 100644 --- a/packages/abi/src/coder/abi-coder.ts +++ b/packages/abi/src/coder/abi-coder.ts @@ -1,10 +1,2 @@ -import type { Abi } from '../parser'; -import type { AbiSpecification } from '../parser/abi-parser'; -import { AbiParser } from '../parser/abi-parser'; - -export class AbiCoder { - private abi: Abi; - constructor(parsableAbi: AbiSpecification) { - this.abi = AbiParser.parse(parsableAbi); - } -} +// Placeholder +export class AbiCoder {} diff --git a/packages/abi/src/gen/abi-gen.ts b/packages/abi/src/gen/abi-gen.ts index ee377b9747b..e0ad4905d2f 100644 --- a/packages/abi/src/gen/abi-gen.ts +++ b/packages/abi/src/gen/abi-gen.ts @@ -1,10 +1 @@ -import type { Abi } from '../parser'; -import type { AbiSpecification } from '../parser/abi-parser'; -import { AbiParser } from '../parser/abi-parser'; - -export class AbiGen { - private abi: Abi; - constructor(parsableAbi: AbiSpecification) { - this.abi = AbiParser.parse(parsableAbi); - } -} +export class AbiGen {} From 799dce87a084083d42790a1b8120c4b3623e4e09 Mon Sep 17 00:00:00 2001 From: nedsalk Date: Thu, 12 Dec 2024 12:18:35 +0100 Subject: [PATCH 033/126] format projects --- .../test/fixtures/forc-projects/parser/src/main.sw | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/packages/fuel-gauge/test/fixtures/forc-projects/parser/src/main.sw b/packages/fuel-gauge/test/fixtures/forc-projects/parser/src/main.sw index 9b030705e85..6f94b41d56b 100644 --- a/packages/fuel-gauge/test/fixtures/forc-projects/parser/src/main.sw +++ b/packages/fuel-gauge/test/fixtures/forc-projects/parser/src/main.sw @@ -8,8 +8,7 @@ struct SampleStruct { struct SampleGenericStruct { a: Vec>, - b: Vec> - + b: Vec>, } struct NonGenericStruct { @@ -22,12 +21,18 @@ pub struct StructWithImplicitGenerics { } abi VoidContract { - fn sample_struct(arg1: SampleStruct>, arg2: SampleGenericStruct) -> bool; + fn sample_struct( + arg1: SampleStruct>, + arg2: SampleGenericStruct, + ) -> bool; fn implicit_generics(arg1: StructWithImplicitGenerics) -> bool; } impl VoidContract for Contract { - fn sample_struct(arg1: SampleStruct>, arg2: SampleGenericStruct) -> bool { + fn sample_struct( + arg1: SampleStruct>, + arg2: SampleGenericStruct, + ) -> bool { true } fn implicit_generics(arg1: StructWithImplicitGenerics) -> bool { From d1ec9602a3b0ee1be079601af0b0a7e79b37c6e4 Mon Sep 17 00:00:00 2001 From: nedsalk Date: Thu, 12 Dec 2024 12:19:50 +0100 Subject: [PATCH 034/126] export parser from fuels --- packages/fuel-gauge/package.json | 3 +-- packages/fuel-gauge/src/abi/abi-parser.test.ts | 2 +- packages/fuels/package.json | 1 + packages/fuels/src/index.ts | 1 + pnpm-lock.yaml | 3 +++ 5 files changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/fuel-gauge/package.json b/packages/fuel-gauge/package.json index 68460c1b76a..740c95be9a7 100644 --- a/packages/fuel-gauge/package.json +++ b/packages/fuel-gauge/package.json @@ -12,8 +12,7 @@ }, "license": "Apache-2.0", "dependencies": { - "fuels": "workspace:*", - "@fuel-ts/abi": "workspace:*" + "fuels": "workspace:*" }, "devDependencies": { "@fuel-ts/account": "workspace:*", diff --git a/packages/fuel-gauge/src/abi/abi-parser.test.ts b/packages/fuel-gauge/src/abi/abi-parser.test.ts index 93a1b8c85e9..0467fb8b57b 100644 --- a/packages/fuel-gauge/src/abi/abi-parser.test.ts +++ b/packages/fuel-gauge/src/abi/abi-parser.test.ts @@ -1,5 +1,5 @@ -import { AbiParser, type AbiSpecification } from '@fuel-ts/abi'; import { writeFileSync } from 'fs'; +import { AbiParser, type AbiSpecification } from 'fuels'; import { Parser } from '../../test/typegen'; diff --git a/packages/fuels/package.json b/packages/fuels/package.json index f45ef4266b3..df1935c81c4 100644 --- a/packages/fuels/package.json +++ b/packages/fuels/package.json @@ -62,6 +62,7 @@ }, "license": "Apache-2.0", "dependencies": { + "@fuel-ts/abi": "workspace:*", "@fuel-ts/abi-coder": "workspace:*", "@fuel-ts/abi-typegen": "workspace:*", "@fuel-ts/account": "workspace:*", diff --git a/packages/fuels/src/index.ts b/packages/fuels/src/index.ts index e13cabc50c4..02a546b367f 100644 --- a/packages/fuels/src/index.ts +++ b/packages/fuels/src/index.ts @@ -17,3 +17,4 @@ export * from '@fuel-ts/account'; export * from '@fuel-ts/transactions/configs'; export * from '@fuel-ts/account/configs'; export * from '@fuel-ts/recipes'; +export * from '@fuel-ts/abi'; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 343ae81066e..81c5b949100 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -951,6 +951,9 @@ importers: packages/fuels: dependencies: + '@fuel-ts/abi': + specifier: workspace:* + version: link:../abi '@fuel-ts/abi-coder': specifier: workspace:* version: link:../abi-coder From 43ca2d020abade6f3570835133146a351cee5afb Mon Sep 17 00:00:00 2001 From: nedsalk Date: Thu, 12 Dec 2024 12:35:28 +0100 Subject: [PATCH 035/126] cleanup --- packages/fuel-gauge/src/abi/abi-parser.test.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/fuel-gauge/src/abi/abi-parser.test.ts b/packages/fuel-gauge/src/abi/abi-parser.test.ts index 0467fb8b57b..f787755a31f 100644 --- a/packages/fuel-gauge/src/abi/abi-parser.test.ts +++ b/packages/fuel-gauge/src/abi/abi-parser.test.ts @@ -21,4 +21,3 @@ describe('AbiParser', () => { expect({ concreteTypes: parsed.types }).toEqual({ concreteTypes: expected.types }); }); }); -``; From 55a88c741587a783655e659e37a558f0d9212d94 Mon Sep 17 00:00:00 2001 From: nedsalk Date: Thu, 12 Dec 2024 13:22:28 +0100 Subject: [PATCH 036/126] renamings --- packages/abi/src/parser/abi.ts | 57 ++++++++----------- .../src/parser/specifications/v1/parser.ts | 12 ++-- .../specifications/v1/resolvable-type.ts | 18 +++--- .../parser/specifications/v1/resolved-type.ts | 20 ++++--- packages/fuel-gauge/src/abi/abi-parser.json | 2 +- .../fuel-gauge/src/abi/abi-parser.test.ts | 4 +- 6 files changed, 56 insertions(+), 57 deletions(-) diff --git a/packages/abi/src/parser/abi.ts b/packages/abi/src/parser/abi.ts index 22bd3ed1fed..b4c885a7910 100644 --- a/packages/abi/src/parser/abi.ts +++ b/packages/abi/src/parser/abi.ts @@ -1,85 +1,76 @@ +/** + * This interface serves as a representation of the ABI file format + * which won't be changing with the introduction of new abi specifications. + * + */ export interface Abi { encodingVersion: string; programType: string; - metadataTypes: AbiTypeMetadata[]; - types: AbiType[]; + metadataTypes: AbiMetadataType[]; + concreteTypes: AbiConcreteType[]; functions: AbiFunction[]; loggedTypes: AbiLoggedType[]; messageTypes: AbiMessageType[]; configurables: AbiConfigurable[]; } -export interface AbiType { +export interface AbiConcreteType { swayType: string; concreteTypeId: string; components?: AbiTypeComponent[]; metadata?: { metadataTypeId: number; - typeArguments?: AbiType[]; + typeArguments?: AbiConcreteType[]; }; } -export interface AbiTypeC { - swayType: string; - components?: AbiTypeComponent[]; - metadata: { - metadataTypeId: number; - typeArguments?: AbiType[]; - }; -} - -export interface AbiTypeMetadata { +export interface AbiMetadataType { swayType: string; metadataTypeId: number; components?: AbiTypeComponent[]; - typeParameters?: AbiTypeMetadata[]; + typeParameters?: AbiMetadataType[]; } export interface AbiTypeComponent { name: string; - type: AbiType | AbiTypeC; + type: AbiConcreteType | AbiMetadataComponent; } -export interface Component { - name: string; - type: - | AbiType - | { - swayType: string; - components?: Component[]; - metadata: { - metadataTypeId: number; - typeArguments?: AbiType[]; - }; - }; +export interface AbiMetadataComponent { + swayType: string; + components?: AbiTypeComponent[]; + metadata: { + metadataTypeId: number; + typeArguments?: AbiConcreteType[]; + }; } export interface AbiFunctionInput { name: string; - type: AbiType; + type: AbiConcreteType; } export interface AbiFunction { name: string; inputs: AbiFunctionInput[]; - output: AbiType; + output: AbiConcreteType; attributes?: readonly AbiFunctionAttribute[]; } export interface AbiLoggedType { logId: string; - type: AbiType; + type: AbiConcreteType; } export interface AbiMessageType { messageId: string; - type: AbiType; + type: AbiConcreteType; } export interface AbiConfigurable { name: string; offset: number; - type: AbiType; + type: AbiConcreteType; } export type AbiFunctionAttribute = diff --git a/packages/abi/src/parser/specifications/v1/parser.ts b/packages/abi/src/parser/specifications/v1/parser.ts index c14349fb758..240b53ac654 100644 --- a/packages/abi/src/parser/specifications/v1/parser.ts +++ b/packages/abi/src/parser/specifications/v1/parser.ts @@ -1,6 +1,6 @@ import { FuelError } from '@fuel-ts/errors'; -import type { Abi, AbiType, AbiTypeMetadata } from '../../abi'; +import type { Abi, AbiConcreteType, AbiMetadataType } from '../../abi'; import { mapAttribute } from './map-attribute'; import { ResolvableType } from './resolvable-type'; @@ -24,7 +24,7 @@ export class AbiParserV1 { resolveableType.swayType !== 'struct std::bytes::RawBytes' ); - const types = abi.concreteTypes.map((concreteType) => { + const concreteTypes = abi.concreteTypes.map((concreteType) => { const resolvableType = resolvableTypes.find( (resolvable) => resolvable.metadataTypeId === concreteType.metadataTypeId ); @@ -33,11 +33,11 @@ export class AbiParserV1 { ? resolvableType.resolve(concreteType) : new ResolvedType({ swayType: concreteType.type, typeId: concreteType.concreteTypeId }); - return resolvedType.toAbiType() as AbiType; + return resolvedType.toAbiType() as AbiConcreteType; }); const getType = (concreteTypeId: string) => { - const type = types.find((abiType) => abiType.concreteTypeId === concreteTypeId); + const type = concreteTypes.find((abiType) => abiType.concreteTypeId === concreteTypeId); if (type === undefined) { throw new FuelError( FuelError.CODES.TYPE_ID_NOT_FOUND, @@ -48,8 +48,8 @@ export class AbiParserV1 { }; return { - metadataTypes: resolvableTypes.map((rt) => rt.toAbiType() as AbiTypeMetadata), - types, + metadataTypes: resolvableTypes.map((rt) => rt.toAbiType() as AbiMetadataType), + concreteTypes, encodingVersion: abi.encodingVersion, programType: abi.programType, functions: abi.functions.map((fn: AbiFunctionV1) => ({ diff --git a/packages/abi/src/parser/specifications/v1/resolvable-type.ts b/packages/abi/src/parser/specifications/v1/resolvable-type.ts index d4628a9dfc9..a336711651d 100644 --- a/packages/abi/src/parser/specifications/v1/resolvable-type.ts +++ b/packages/abi/src/parser/specifications/v1/resolvable-type.ts @@ -1,7 +1,7 @@ import { FuelError } from '@fuel-ts/errors'; import { swayTypeMatchers } from '../../../matchers/sway-type-matchers'; -import type { AbiType, AbiTypeComponent, AbiTypeMetadata } from '../../abi'; +import type { AbiConcreteType, AbiTypeComponent, AbiMetadataType } from '../../abi'; import type { ResolvedComponent } from './resolved-type'; import { ResolvedType } from './resolved-type'; @@ -54,7 +54,7 @@ export class ResolvableType { this.components = components?.map((c) => this.handleComponent(this, c)); } - toAbiTypeComponentType(): AbiTypeComponent['type'] { + toComponentType(): AbiTypeComponent['type'] { const res: AbiTypeComponent['type'] = { swayType: this.swayType, metadata: { @@ -65,20 +65,20 @@ export class ResolvableType { if (this.components) { res.components = this.components.map((component) => ({ name: component.name, - type: component.type.toAbiTypeComponentType(), + type: component.type.toComponentType(), })); } if (this.typeParamsArgsMap) { res.metadata.typeArguments = this.typeParamsArgsMap.map( - ([, rt]) => rt.toAbiType() as AbiType + ([, rt]) => rt.toAbiType() as AbiConcreteType ); } return res; } - toAbiType(): AbiTypeMetadata { - const res: AbiTypeMetadata = { + toAbiType(): AbiMetadataType { + const res: AbiMetadataType = { metadataTypeId: this.metadataTypeId, swayType: this.swayType, }; @@ -86,13 +86,13 @@ export class ResolvableType { if (this.components) { res.components = this.components?.map((component) => ({ name: component.name, - type: component.type.toAbiTypeComponentType(), + type: component.type.toComponentType(), })) as AbiTypeComponent[]; } if (this.typeParamsArgsMap) { res.typeParameters = this.typeParamsArgsMap.map( - ([, rt]) => rt.toAbiType() as AbiTypeMetadata + ([, rt]) => rt.toAbiType() as AbiMetadataType ); } @@ -290,12 +290,14 @@ export class ResolvableType { const resolvedGenericType = typeArgs?.find( ([typeParameterId]) => type.metadataTypeId === typeParameterId )?.[1]; + if (resolvedGenericType) { return { name, type: resolvedGenericType, }; } + return { name, type: type.resolveInternal(type.metadataTypeId, typeParamsArgsMap), diff --git a/packages/abi/src/parser/specifications/v1/resolved-type.ts b/packages/abi/src/parser/specifications/v1/resolved-type.ts index e1c9963b65d..ad41b584571 100644 --- a/packages/abi/src/parser/specifications/v1/resolved-type.ts +++ b/packages/abi/src/parser/specifications/v1/resolved-type.ts @@ -1,4 +1,4 @@ -import type { AbiType, AbiTypeComponent } from '../../abi'; +import type { AbiConcreteType, AbiTypeComponent } from '../../abi'; import type { AbiMetadataTypeV1 } from './specification'; @@ -28,7 +28,7 @@ export class ResolvedType { this.metadataType = params.metadataType; } - public toAbiTypeComponentType(): AbiTypeComponent['type'] { + public toComponentType(): AbiTypeComponent['type'] { let res: AbiTypeComponent['type']; if (typeof this.typeId === 'string') { @@ -50,22 +50,24 @@ export class ResolvedType { metadataTypeId: this.metadataType.metadataTypeId, }; if (this.typeParamsArgsMap && this.metadataType?.typeParameters?.length) { - res.metadata.typeArguments = this.typeParamsArgsMap.map((t) => t[1].toAbiType() as AbiType); + res.metadata.typeArguments = this.typeParamsArgsMap.map( + (t) => t[1].toAbiType() as AbiConcreteType + ); } } if (this.components) { res.components = this.components.map((c) => ({ name: c.name, - type: c.type.toAbiTypeComponentType(), + type: c.type.toComponentType(), })); } return res; } - public toAbiType(): AbiType { - const res: AbiType = { + public toAbiType(): AbiConcreteType { + const res: AbiConcreteType = { concreteTypeId: this.typeId as string, swayType: this.swayType, }; @@ -75,14 +77,16 @@ export class ResolvedType { metadataTypeId: this.metadataType.metadataTypeId, }; if (this.typeParamsArgsMap) { - res.metadata.typeArguments = this.typeParamsArgsMap.map((t) => t[1].toAbiType() as AbiType); + res.metadata.typeArguments = this.typeParamsArgsMap.map( + (t) => t[1].toAbiType() as AbiConcreteType + ); } } if (this.components) { res.components = this.components.map((c) => ({ name: c.name, - type: c.type.toAbiTypeComponentType(), + type: c.type.toComponentType(), })); } diff --git a/packages/fuel-gauge/src/abi/abi-parser.json b/packages/fuel-gauge/src/abi/abi-parser.json index 6145777d83c..e8cd205dbe3 100644 --- a/packages/fuel-gauge/src/abi/abi-parser.json +++ b/packages/fuel-gauge/src/abi/abi-parser.json @@ -395,7 +395,7 @@ "swayType": "u64" } ], - "types": [ + "concreteTypes": [ { "swayType": "bool", "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" diff --git a/packages/fuel-gauge/src/abi/abi-parser.test.ts b/packages/fuel-gauge/src/abi/abi-parser.test.ts index f787755a31f..97dc5a119ca 100644 --- a/packages/fuel-gauge/src/abi/abi-parser.test.ts +++ b/packages/fuel-gauge/src/abi/abi-parser.test.ts @@ -18,6 +18,8 @@ describe('AbiParser', () => { expect({ metadataTypes: parsed.metadataTypes }).toEqual({ metadataTypes: expected.metadataTypes, }); - expect({ concreteTypes: parsed.types }).toEqual({ concreteTypes: expected.types }); + expect({ concreteTypes: parsed.concreteTypes }).toEqual({ + concreteTypes: expected.concreteTypes, + }); }); }); From e4dfa53a0fb7d51477c3bcdc2def98b8e0363d42 Mon Sep 17 00:00:00 2001 From: nedsalk Date: Thu, 12 Dec 2024 13:41:32 +0100 Subject: [PATCH 037/126] renamings --- packages/fuel-gauge/src/abi/abi-parser.json | 810 ++++++++++++++---- .../fuel-gauge/src/abi/abi-parser.test.ts | 10 +- .../fixtures/forc-projects/parser/src/main.sw | 37 +- pnpm-lock.yaml | 3 - 4 files changed, 646 insertions(+), 214 deletions(-) diff --git a/packages/fuel-gauge/src/abi/abi-parser.json b/packages/fuel-gauge/src/abi/abi-parser.json index e8cd205dbe3..6afb6e0302e 100644 --- a/packages/fuel-gauge/src/abi/abi-parser.json +++ b/packages/fuel-gauge/src/abi/abi-parser.json @@ -57,7 +57,7 @@ }, { "metadataTypeId": 6, - "swayType": "struct NonGenericStruct", + "swayType": "struct GenericStruct", "components": [ { "name": "a", @@ -65,12 +65,36 @@ "swayType": "bool", "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" } + }, + { + "name": "b", + "type": { + "swayType": "u32", + "metadata": { + "metadataTypeId": 12 + } + } + }, + { + "name": "c", + "type": { + "swayType": "generic T", + "metadata": { + "metadataTypeId": 4 + } + } + } + ], + "typeParameters": [ + { + "metadataTypeId": 4, + "swayType": "generic T" } ] }, { "metadataTypeId": 7, - "swayType": "struct SampleGenericStruct", + "swayType": "struct NestedGenericStruct", "components": [ { "name": "a", @@ -80,8 +104,8 @@ "metadataTypeId": 11, "typeArguments": [ { - "metadataTypeId": 8, - "swayType": "struct SampleStruct", + "metadataTypeId": 6, + "swayType": "struct GenericStruct", "components": [ { "name": "a", @@ -122,9 +146,9 @@ { "name": "", "type": { - "swayType": "struct SampleStruct", + "swayType": "struct GenericStruct", "metadata": { - "metadataTypeId": 8, + "metadataTypeId": 6, "typeArguments": [ { "metadataTypeId": 2, @@ -172,10 +196,10 @@ "metadataTypeId": 11, "typeArguments": [ { - "concreteTypeId": 8, - "swayType": "struct SampleStruct", + "concreteTypeId": 6, + "swayType": "struct GenericStruct", "metadata": { - "metadataTypeId": 8, + "metadataTypeId": 6, "typeArguments": [ { "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef", @@ -215,9 +239,9 @@ { "name": "", "type": { - "swayType": "struct SampleStruct", + "swayType": "struct GenericStruct", "metadata": { - "metadataTypeId": 8, + "metadataTypeId": 6, "typeArguments": [ { "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef", @@ -265,7 +289,7 @@ }, { "metadataTypeId": 8, - "swayType": "struct SampleStruct", + "swayType": "struct SimpleStruct", "components": [ { "name": "a", @@ -273,30 +297,6 @@ "swayType": "bool", "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" } - }, - { - "name": "b", - "type": { - "swayType": "u32", - "metadata": { - "metadataTypeId": 12 - } - } - }, - { - "name": "c", - "type": { - "swayType": "generic T", - "metadata": { - "metadataTypeId": 4 - } - } - } - ], - "typeParameters": [ - { - "metadataTypeId": 4, - "swayType": "generic T" } ] }, @@ -397,14 +397,62 @@ ], "concreteTypes": [ { - "swayType": "bool", - "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903", + "swayType": "bool" }, { - "swayType": "struct NonGenericStruct", - "concreteTypeId": "bd75e47abe514c2818021f4d6e2db12367f68c77f29bf8352713dfa5b70a4767", + "concreteTypeId": "8fa64aacdb756049c3c90d3a5fa8d1a7ebedefc8dc2f347e67bb26ef4c7140a7", + "swayType": "struct GenericStruct", "metadata": { - "metadataTypeId": 6 + "metadataTypeId": 6, + "typeArguments": [ + { + "concreteTypeId": "688b6ed7fc2c45e135ea9a2ce11e3f5313a4c057ba5d616e3381937605ea81e4", + "swayType": "struct std::vec::Vec", + "metadata": { + "metadataTypeId": 11, + "typeArguments": [ + { + "concreteTypeId": "75f7f7a06026cab5d7a70984d1fde56001e83505e3a091ff9722b92d7f56d8be", + "swayType": "struct SimpleStruct", + "metadata": { + "metadataTypeId": 8 + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + } + ] + } + ] + }, + "components": [ + { + "name": "", + "type": { + "swayType": "struct SimpleStruct", + "concreteTypeId": "75f7f7a06026cab5d7a70984d1fde56001e83505e3a091ff9722b92d7f56d8be", + "metadata": { + "metadataTypeId": 8 + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + } + ] + } + } + ] + } + ] }, "components": [ { @@ -413,12 +461,70 @@ "swayType": "bool", "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" } + }, + { + "name": "b", + "type": { + "swayType": "u32", + "metadata": { + "metadataTypeId": 12 + } + } + }, + { + "name": "c", + "type": { + "swayType": "struct std::vec::Vec", + "concreteTypeId": "688b6ed7fc2c45e135ea9a2ce11e3f5313a4c057ba5d616e3381937605ea81e4", + "metadata": { + "metadataTypeId": 11, + "typeArguments": [ + { + "concreteTypeId": "75f7f7a06026cab5d7a70984d1fde56001e83505e3a091ff9722b92d7f56d8be", + "swayType": "struct SimpleStruct", + "metadata": { + "metadataTypeId": 8 + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + } + ] + } + ] + }, + "components": [ + { + "name": "", + "type": { + "swayType": "struct SimpleStruct", + "concreteTypeId": "75f7f7a06026cab5d7a70984d1fde56001e83505e3a091ff9722b92d7f56d8be", + "metadata": { + "metadataTypeId": 8 + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + } + ] + } + } + ] + } } ] }, { - "concreteTypeId": "60352018729e65e22b2767c13173fc55659dfa7908cd39a682c21c71d18885df", - "swayType": "struct SampleGenericStruct", + "concreteTypeId": "cc3087210794115a9b7e470ad5b5d554808a3a88aa003ae80bae7b0dc4505f50", + "swayType": "struct NestedGenericStruct", "metadata": { "metadataTypeId": 7, "typeArguments": [ @@ -437,10 +543,10 @@ "metadataTypeId": 11, "typeArguments": [ { - "concreteTypeId": 8, - "swayType": "struct SampleStruct", + "concreteTypeId": 6, + "swayType": "struct GenericStruct", "metadata": { - "metadataTypeId": 8, + "metadataTypeId": 6, "typeArguments": [ { "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b", @@ -480,13 +586,13 @@ { "name": "", "type": { - "swayType": "struct SampleStruct", + "swayType": "struct GenericStruct", "metadata": { - "metadataTypeId": 8, + "metadataTypeId": 6, "typeArguments": [ { - "swayType": "u8", - "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b", + "swayType": "u8" } ] }, @@ -510,8 +616,8 @@ { "name": "c", "type": { - "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b", - "swayType": "u8" + "swayType": "u8", + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" } } ] @@ -528,10 +634,10 @@ "metadataTypeId": 11, "typeArguments": [ { - "concreteTypeId": 8, - "swayType": "struct SampleStruct", + "concreteTypeId": 6, + "swayType": "struct GenericStruct", "metadata": { - "metadataTypeId": 8, + "metadataTypeId": 6, "typeArguments": [ { "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef", @@ -571,9 +677,9 @@ { "name": "", "type": { - "swayType": "struct SampleStruct", + "swayType": "struct GenericStruct", "metadata": { - "metadataTypeId": 8, + "metadataTypeId": 6, "typeArguments": [ { "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef", @@ -614,58 +720,10 @@ ] }, { - "swayType": "struct SampleStruct", - "concreteTypeId": "1e660e9b9c8c191cd7cbfd1c9595c7367763d6ed3bcd1a7b4824d5db4af46700", + "concreteTypeId": "75f7f7a06026cab5d7a70984d1fde56001e83505e3a091ff9722b92d7f56d8be", + "swayType": "struct SimpleStruct", "metadata": { - "metadataTypeId": 8, - "typeArguments": [ - { - "swayType": "struct std::vec::Vec", - "concreteTypeId": "10161b42df4a9c43ea4f52fb80e3a16978828049e0daa278e6e85823a3613928", - "metadata": { - "metadataTypeId": 11, - "typeArguments": [ - { - "swayType": "struct NonGenericStruct", - "concreteTypeId": "bd75e47abe514c2818021f4d6e2db12367f68c77f29bf8352713dfa5b70a4767", - "metadata": { - "metadataTypeId": 6 - }, - "components": [ - { - "name": "a", - "type": { - "swayType": "bool", - "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" - } - } - ] - } - ] - }, - "components": [ - { - "name": "", - "type": { - "swayType": "struct NonGenericStruct", - "concreteTypeId": "bd75e47abe514c2818021f4d6e2db12367f68c77f29bf8352713dfa5b70a4767", - "metadata": { - "metadataTypeId": 6 - }, - "components": [ - { - "name": "a", - "type": { - "swayType": "bool", - "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" - } - } - ] - } - } - ] - } - ] + "metadataTypeId": 8 }, "components": [ { @@ -674,80 +732,22 @@ "swayType": "bool", "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" } - }, - { - "name": "b", - "type": { - "swayType": "u32", - "metadata": { - "metadataTypeId": 12 - } - } - }, - { - "name": "c", - "type": { - "swayType": "struct std::vec::Vec", - "concreteTypeId": "10161b42df4a9c43ea4f52fb80e3a16978828049e0daa278e6e85823a3613928", - "metadata": { - "metadataTypeId": 11, - "typeArguments": [ - { - "swayType": "struct NonGenericStruct", - "concreteTypeId": "bd75e47abe514c2818021f4d6e2db12367f68c77f29bf8352713dfa5b70a4767", - "metadata": { - "metadataTypeId": 6 - }, - "components": [ - { - "name": "a", - "type": { - "swayType": "bool", - "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" - } - } - ] - } - ] - }, - "components": [ - { - "name": "", - "type": { - "swayType": "struct NonGenericStruct", - "concreteTypeId": "bd75e47abe514c2818021f4d6e2db12367f68c77f29bf8352713dfa5b70a4767", - "metadata": { - "metadataTypeId": 6 - }, - "components": [ - { - "name": "a", - "type": { - "swayType": "bool", - "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" - } - } - ] - } - } - ] - } } ] }, { - "swayType": "struct StructWithImplicitGenerics", "concreteTypeId": "426345c4ea93db9f08eeb9fe6047ef0273294bfb1140600a0660be9f2a08d750", + "swayType": "struct StructWithImplicitGenerics", "metadata": { "metadataTypeId": 9, "typeArguments": [ { - "swayType": "u8", - "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b", + "swayType": "u8" }, { - "swayType": "u16", - "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef" + "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef", + "swayType": "u16" } ] }, @@ -798,16 +798,16 @@ ] }, { + "concreteTypeId": "688b6ed7fc2c45e135ea9a2ce11e3f5313a4c057ba5d616e3381937605ea81e4", "swayType": "struct std::vec::Vec", - "concreteTypeId": "10161b42df4a9c43ea4f52fb80e3a16978828049e0daa278e6e85823a3613928", "metadata": { "metadataTypeId": 11, "typeArguments": [ { - "swayType": "struct NonGenericStruct", - "concreteTypeId": "bd75e47abe514c2818021f4d6e2db12367f68c77f29bf8352713dfa5b70a4767", + "concreteTypeId": "75f7f7a06026cab5d7a70984d1fde56001e83505e3a091ff9722b92d7f56d8be", + "swayType": "struct SimpleStruct", "metadata": { - "metadataTypeId": 6 + "metadataTypeId": 8 }, "components": [ { @@ -825,10 +825,10 @@ { "name": "", "type": { - "swayType": "struct NonGenericStruct", - "concreteTypeId": "bd75e47abe514c2818021f4d6e2db12367f68c77f29bf8352713dfa5b70a4767", + "swayType": "struct SimpleStruct", + "concreteTypeId": "75f7f7a06026cab5d7a70984d1fde56001e83505e3a091ff9722b92d7f56d8be", "metadata": { - "metadataTypeId": 6 + "metadataTypeId": 8 }, "components": [ { @@ -844,27 +844,459 @@ ] }, { - "swayType": "u16", - "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef" + "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef", + "swayType": "u16" }, { - "swayType": "u8", - "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b", + "swayType": "u8" } ], "encodingVersion": "1", "programType": "contract", "functions": [ { - "name": "test", + "name": "generic_structs", "output": { - "swayType": "bool", - "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903", + "swayType": "bool" }, - "inputs": [] + "inputs": [ + { + "name": "arg1", + "type": { + "concreteTypeId": "8fa64aacdb756049c3c90d3a5fa8d1a7ebedefc8dc2f347e67bb26ef4c7140a7", + "swayType": "struct GenericStruct", + "metadata": { + "metadataTypeId": 6, + "typeArguments": [ + { + "concreteTypeId": "688b6ed7fc2c45e135ea9a2ce11e3f5313a4c057ba5d616e3381937605ea81e4", + "swayType": "struct std::vec::Vec", + "metadata": { + "metadataTypeId": 11, + "typeArguments": [ + { + "concreteTypeId": "75f7f7a06026cab5d7a70984d1fde56001e83505e3a091ff9722b92d7f56d8be", + "swayType": "struct SimpleStruct", + "metadata": { + "metadataTypeId": 8 + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + } + ] + } + ] + }, + "components": [ + { + "name": "", + "type": { + "swayType": "struct SimpleStruct", + "concreteTypeId": "75f7f7a06026cab5d7a70984d1fde56001e83505e3a091ff9722b92d7f56d8be", + "metadata": { + "metadataTypeId": 8 + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + } + ] + } + } + ] + } + ] + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + }, + { + "name": "b", + "type": { + "swayType": "u32", + "metadata": { + "metadataTypeId": 12 + } + } + }, + { + "name": "c", + "type": { + "swayType": "struct std::vec::Vec", + "concreteTypeId": "688b6ed7fc2c45e135ea9a2ce11e3f5313a4c057ba5d616e3381937605ea81e4", + "metadata": { + "metadataTypeId": 11, + "typeArguments": [ + { + "concreteTypeId": "75f7f7a06026cab5d7a70984d1fde56001e83505e3a091ff9722b92d7f56d8be", + "swayType": "struct SimpleStruct", + "metadata": { + "metadataTypeId": 8 + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + } + ] + } + ] + }, + "components": [ + { + "name": "", + "type": { + "swayType": "struct SimpleStruct", + "concreteTypeId": "75f7f7a06026cab5d7a70984d1fde56001e83505e3a091ff9722b92d7f56d8be", + "metadata": { + "metadataTypeId": 8 + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + } + ] + } + } + ] + } + } + ] + } + }, + { + "name": "arg2", + "type": { + "concreteTypeId": "cc3087210794115a9b7e470ad5b5d554808a3a88aa003ae80bae7b0dc4505f50", + "swayType": "struct NestedGenericStruct", + "metadata": { + "metadataTypeId": 7, + "typeArguments": [ + { + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b", + "swayType": "u8" + } + ] + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "struct std::vec::Vec", + "metadata": { + "metadataTypeId": 11, + "typeArguments": [ + { + "concreteTypeId": 6, + "swayType": "struct GenericStruct", + "metadata": { + "metadataTypeId": 6, + "typeArguments": [ + { + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b", + "swayType": "u8" + } + ] + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + }, + { + "name": "b", + "type": { + "swayType": "u32", + "metadata": { + "metadataTypeId": 12 + } + } + }, + { + "name": "c", + "type": { + "swayType": "u8", + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + } + } + ] + } + ] + }, + "components": [ + { + "name": "", + "type": { + "swayType": "struct GenericStruct", + "metadata": { + "metadataTypeId": 6, + "typeArguments": [ + { + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b", + "swayType": "u8" + } + ] + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + }, + { + "name": "b", + "type": { + "swayType": "u32", + "metadata": { + "metadataTypeId": 12 + } + } + }, + { + "name": "c", + "type": { + "swayType": "u8", + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + } + } + ] + } + } + ] + } + }, + { + "name": "b", + "type": { + "swayType": "struct std::vec::Vec", + "metadata": { + "metadataTypeId": 11, + "typeArguments": [ + { + "concreteTypeId": 6, + "swayType": "struct GenericStruct", + "metadata": { + "metadataTypeId": 6, + "typeArguments": [ + { + "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef", + "swayType": "u16" + } + ] + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + }, + { + "name": "b", + "type": { + "swayType": "u32", + "metadata": { + "metadataTypeId": 12 + } + } + }, + { + "name": "c", + "type": { + "swayType": "u16", + "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef" + } + } + ] + } + ] + }, + "components": [ + { + "name": "", + "type": { + "swayType": "struct GenericStruct", + "metadata": { + "metadataTypeId": 6, + "typeArguments": [ + { + "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef", + "swayType": "u16" + } + ] + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + }, + { + "name": "b", + "type": { + "swayType": "u32", + "metadata": { + "metadataTypeId": 12 + } + } + }, + { + "name": "c", + "type": { + "swayType": "u16", + "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef" + } + } + ] + } + } + ] + } + } + ] + } + } + ] + }, + { + "name": "implicit_generic_struct", + "output": { + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903", + "swayType": "bool" + }, + "inputs": [ + { + "name": "arg1", + "type": { + "concreteTypeId": "426345c4ea93db9f08eeb9fe6047ef0273294bfb1140600a0660be9f2a08d750", + "swayType": "struct StructWithImplicitGenerics", + "metadata": { + "metadataTypeId": 9, + "typeArguments": [ + { + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b", + "swayType": "u8" + }, + { + "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef", + "swayType": "u16" + } + ] + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "[_; 3]", + "metadata": { + "metadataTypeId": 1 + }, + "components": [ + { + "name": "__array_element", + "type": { + "swayType": "u8", + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + } + } + ] + } + }, + { + "name": "b", + "type": { + "swayType": "(_, _)", + "metadata": { + "metadataTypeId": 0 + }, + "components": [ + { + "name": "__tuple_element", + "type": { + "swayType": "u8", + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + } + }, + { + "name": "__tuple_element", + "type": { + "swayType": "u16", + "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef" + } + } + ] + } + } + ] + } + } + ] + } + ], + "loggedTypes": [ + { + "logId": "13213829929622723620", + "type": { + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903", + "swayType": "bool" + } + } + ], + "messageTypes": [ + { + "messageId": "0", + "type": { + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903", + "swayType": "bool" + } + }, + { + "messageId": "1", + "type": { + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903", + "swayType": "bool" + } } ], - "loggedTypes": [], - "messageTypes": [], - "configurables": [] + "configurables": [ + { + "name": "U8_VALUE", + "offset": 3904, + "type": { + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b", + "swayType": "u8" + } + } + ] } diff --git a/packages/fuel-gauge/src/abi/abi-parser.test.ts b/packages/fuel-gauge/src/abi/abi-parser.test.ts index 97dc5a119ca..676f1d3356e 100644 --- a/packages/fuel-gauge/src/abi/abi-parser.test.ts +++ b/packages/fuel-gauge/src/abi/abi-parser.test.ts @@ -1,4 +1,3 @@ -import { writeFileSync } from 'fs'; import { AbiParser, type AbiSpecification } from 'fuels'; import { Parser } from '../../test/typegen'; @@ -13,13 +12,6 @@ describe('AbiParser', () => { test('runs just fine', () => { const parsed = AbiParser.parse(Parser.abi as AbiSpecification); - writeFileSync('asdf.json', JSON.stringify(parsed, null, 2)); - - expect({ metadataTypes: parsed.metadataTypes }).toEqual({ - metadataTypes: expected.metadataTypes, - }); - expect({ concreteTypes: parsed.concreteTypes }).toEqual({ - concreteTypes: expected.concreteTypes, - }); + expect(parsed).toEqual(expected); }); }); diff --git a/packages/fuel-gauge/test/fixtures/forc-projects/parser/src/main.sw b/packages/fuel-gauge/test/fixtures/forc-projects/parser/src/main.sw index 6f94b41d56b..9d8c376ec10 100644 --- a/packages/fuel-gauge/test/fixtures/forc-projects/parser/src/main.sw +++ b/packages/fuel-gauge/test/fixtures/forc-projects/parser/src/main.sw @@ -1,17 +1,18 @@ contract; +use std::message::send_typed_message; -struct SampleStruct { +struct GenericStruct { a: bool, b: u32, c: T, } -struct SampleGenericStruct { - a: Vec>, - b: Vec>, +struct NestedGenericStruct { + a: Vec>, + b: Vec>, } -struct NonGenericStruct { +struct SimpleStruct { a: bool, } @@ -20,22 +21,32 @@ pub struct StructWithImplicitGenerics { pub b: (E, F), } +configurable { + U8_VALUE: u8 = 10, +} + abi VoidContract { - fn sample_struct( - arg1: SampleStruct>, - arg2: SampleGenericStruct, + fn generic_structs( + arg1: GenericStruct>, + arg2: NestedGenericStruct, ) -> bool; - fn implicit_generics(arg1: StructWithImplicitGenerics) -> bool; + fn implicit_generic_struct(arg1: StructWithImplicitGenerics) -> bool; } impl VoidContract for Contract { - fn sample_struct( - arg1: SampleStruct>, - arg2: SampleGenericStruct, + fn generic_structs( + arg1: GenericStruct>, + arg2: NestedGenericStruct, ) -> bool { + log(arg1.a); + send_typed_message( + 0x0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20, + arg1.a, + 123, + ); true } - fn implicit_generics(arg1: StructWithImplicitGenerics) -> bool { + fn implicit_generic_struct(arg1: StructWithImplicitGenerics) -> bool { true } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 81c5b949100..4f702e3112e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -923,9 +923,6 @@ importers: packages/fuel-gauge: dependencies: - '@fuel-ts/abi': - specifier: workspace:* - version: link:../abi fuels: specifier: workspace:* version: link:../fuels From 167e43d8c9b233dfa17df2a01d3ed32fb5c4bb90 Mon Sep 17 00:00:00 2001 From: nedsalk Date: Thu, 12 Dec 2024 13:44:56 +0100 Subject: [PATCH 038/126] add comments to `Abi` --- packages/abi/src/parser/abi.ts | 9 +++++---- packages/abi/src/parser/specifications/v1/parser.ts | 2 +- packages/recipes/src/types/Src14OwnedProxy.ts | 2 +- packages/recipes/src/types/Src14OwnedProxyFactory.ts | 2 +- packages/recipes/src/types/common.d.ts | 2 +- packages/recipes/src/types/index.ts | 2 +- 6 files changed, 10 insertions(+), 9 deletions(-) diff --git a/packages/abi/src/parser/abi.ts b/packages/abi/src/parser/abi.ts index b4c885a7910..711f4b4faa9 100644 --- a/packages/abi/src/parser/abi.ts +++ b/packages/abi/src/parser/abi.ts @@ -1,11 +1,12 @@ /** - * This interface serves as a representation of the ABI file format - * which won't be changing with the introduction of new abi specifications. - * + * This interface serves as a representation of the ABI format outputted by `forc build` + * that won't be changing with the introduction of new abi specifications in Sway. + * Its purpose is to provide a stable interface for users to work with, + * which won't be affected by changes to the ABI specification. */ export interface Abi { encodingVersion: string; - programType: string; + programType: 'contract' | 'predicate' | 'script' | 'library'; metadataTypes: AbiMetadataType[]; concreteTypes: AbiConcreteType[]; functions: AbiFunction[]; diff --git a/packages/abi/src/parser/specifications/v1/parser.ts b/packages/abi/src/parser/specifications/v1/parser.ts index 240b53ac654..49453b210bd 100644 --- a/packages/abi/src/parser/specifications/v1/parser.ts +++ b/packages/abi/src/parser/specifications/v1/parser.ts @@ -51,7 +51,7 @@ export class AbiParserV1 { metadataTypes: resolvableTypes.map((rt) => rt.toAbiType() as AbiMetadataType), concreteTypes, encodingVersion: abi.encodingVersion, - programType: abi.programType, + programType: abi.programType as Abi['programType'], functions: abi.functions.map((fn: AbiFunctionV1) => ({ attributes: fn.attributes?.map(mapAttribute) ?? undefined, name: fn.name, diff --git a/packages/recipes/src/types/Src14OwnedProxy.ts b/packages/recipes/src/types/Src14OwnedProxy.ts index dcfab7009a8..703f12093cd 100644 --- a/packages/recipes/src/types/Src14OwnedProxy.ts +++ b/packages/recipes/src/types/Src14OwnedProxy.ts @@ -5,7 +5,7 @@ /* eslint-disable @typescript-eslint/consistent-type-imports */ /* - Fuels version: 0.97.0 + Fuels version: 0.97.1 */ import { Contract, type InvokeFunction } from '@fuel-ts/program'; diff --git a/packages/recipes/src/types/Src14OwnedProxyFactory.ts b/packages/recipes/src/types/Src14OwnedProxyFactory.ts index b0789cb3f5a..3190be101f0 100644 --- a/packages/recipes/src/types/Src14OwnedProxyFactory.ts +++ b/packages/recipes/src/types/Src14OwnedProxyFactory.ts @@ -5,7 +5,7 @@ /* eslint-disable @typescript-eslint/consistent-type-imports */ /* - Fuels version: 0.97.0 + Fuels version: 0.97.1 */ import { ContractFactory, type DeployContractOptions } from '@fuel-ts/contract'; diff --git a/packages/recipes/src/types/common.d.ts b/packages/recipes/src/types/common.d.ts index d7ca20eaa69..390dbf32c42 100644 --- a/packages/recipes/src/types/common.d.ts +++ b/packages/recipes/src/types/common.d.ts @@ -5,7 +5,7 @@ /* eslint-disable @typescript-eslint/consistent-type-imports */ /* - Fuels version: 0.97.0 + Fuels version: 0.97.1 */ /** diff --git a/packages/recipes/src/types/index.ts b/packages/recipes/src/types/index.ts index 22dd3591167..24988615795 100644 --- a/packages/recipes/src/types/index.ts +++ b/packages/recipes/src/types/index.ts @@ -5,7 +5,7 @@ /* eslint-disable @typescript-eslint/consistent-type-imports */ /* - Fuels version: 0.97.0 + Fuels version: 0.97.1 */ export { Src14OwnedProxy } from './Src14OwnedProxy'; From 3a2cc1ccb446ab16e19c34d32f7fd2235aeb6eb5 Mon Sep 17 00:00:00 2001 From: nedsalk Date: Thu, 12 Dec 2024 14:43:41 +0100 Subject: [PATCH 039/126] add docs --- apps/docs-api/index.md | 1 + apps/docs-api/typedoc.json | 1 + apps/docs/.vitepress/config.ts | 4 ++++ apps/docs/src/guide/cookbook/snippets/abi-parser.ts | 9 +++++++++ apps/docs/src/guide/cookbook/working-with-the-abi.md | 7 +++++++ packages/abi/typedoc.json | 6 ++++++ 6 files changed, 28 insertions(+) create mode 100644 apps/docs/src/guide/cookbook/snippets/abi-parser.ts create mode 100644 apps/docs/src/guide/cookbook/working-with-the-abi.md create mode 100644 packages/abi/typedoc.json diff --git a/apps/docs-api/index.md b/apps/docs-api/index.md index 6c796e4769d..e3cc77b32e8 100644 --- a/apps/docs-api/index.md +++ b/apps/docs-api/index.md @@ -12,6 +12,7 @@ # Modules +- [abi](https://fuels-ts-docs-api.vercel.app/modules/_fuel_ts_abi.html) - [abi-coder](https://fuels-ts-docs-api.vercel.app/modules/_fuel_ts_abi_coder.html) - [abi-typegen](https://fuels-ts-docs-api.vercel.app/modules/_fuel_ts_abi_typegen.html) - [account](https://fuels-ts-docs-api.vercel.app/modules/_fuel_ts_account.html) diff --git a/apps/docs-api/typedoc.json b/apps/docs-api/typedoc.json index 80cfb47a49a..f04aba511f4 100644 --- a/apps/docs-api/typedoc.json +++ b/apps/docs-api/typedoc.json @@ -2,6 +2,7 @@ "$schema": "https://typedoc.org/schema.json", "entryPointStrategy": "packages", "entryPoints": [ + "../../packages/abi", "../../packages/abi-coder", "../../packages/abi-typegen", "../../packages/address", diff --git a/apps/docs/.vitepress/config.ts b/apps/docs/.vitepress/config.ts index f1a007accd1..65599e54783 100644 --- a/apps/docs/.vitepress/config.ts +++ b/apps/docs/.vitepress/config.ts @@ -429,6 +429,10 @@ export default defineConfig({ text: 'Splitting UTXOs', link: '/guide/cookbook/splitting-utxos', }, + { + text: 'Working with the ABI', + link: '/guide/cookbook/working-with-the-abi', + }, ], }, { diff --git a/apps/docs/src/guide/cookbook/snippets/abi-parser.ts b/apps/docs/src/guide/cookbook/snippets/abi-parser.ts new file mode 100644 index 00000000000..6b22d76b9bb --- /dev/null +++ b/apps/docs/src/guide/cookbook/snippets/abi-parser.ts @@ -0,0 +1,9 @@ +// #region full +import { AbiParser } from 'fuels'; +import type { Abi, AbiSpecificationV1 } from 'fuels'; + +import someAbi from '../../../typegend/contracts/Counter-abi.json'; + +const parsedAbi: Abi = AbiParser.parse(someAbi as AbiSpecificationV1); +// #endregion full +console.log('Parsed ABI:', parsedAbi); diff --git a/apps/docs/src/guide/cookbook/working-with-the-abi.md b/apps/docs/src/guide/cookbook/working-with-the-abi.md new file mode 100644 index 00000000000..269f65456f1 --- /dev/null +++ b/apps/docs/src/guide/cookbook/working-with-the-abi.md @@ -0,0 +1,7 @@ +# Working with the ABI + +Building a Sway program with `forc build` outputs multiple files, one of which is a JSON representation of the program's ABI. Because ABI specifications can change from one `forc` version to another, working directly with the ABI is cumbersome due to having to manage all ABI specification versions in order to ensure proper functionality. + +To mitigate this, The SDK provides [`AbiParser`](https://fuels-ts-docs-api.vercel.app/classes/_fuel_ts_abi.AbiParser.html) which can parse all ABI specification versions and output an object that conforms to the [`Abi`](https://fuels-ts-docs-api.vercel.app/interfaces/_fuel_ts_abi.Abi.html) interface. The SDK also internally uses this `Abi` interface for implementing its encoding/decoding and TS type generation. + +<<< @./snippets/abi-parser.ts#full{ts:line-numbers} diff --git a/packages/abi/typedoc.json b/packages/abi/typedoc.json new file mode 100644 index 00000000000..a8ec6b825f0 --- /dev/null +++ b/packages/abi/typedoc.json @@ -0,0 +1,6 @@ +{ + "$schema": "https://typedoc.org/schema.json", + "extends": ["../../typedoc.base.json"], + "entryPoints": ["src/index.ts"], + "readme": "none" +} From c2bb0c6cc2bed0955674e4005d2372fc8a18b800 Mon Sep 17 00:00:00 2001 From: nedsalk Date: Thu, 12 Dec 2024 14:45:19 +0100 Subject: [PATCH 040/126] update docs --- packages/abi/src/parser/abi.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/abi/src/parser/abi.ts b/packages/abi/src/parser/abi.ts index 711f4b4faa9..a90de020558 100644 --- a/packages/abi/src/parser/abi.ts +++ b/packages/abi/src/parser/abi.ts @@ -2,7 +2,7 @@ * This interface serves as a representation of the ABI format outputted by `forc build` * that won't be changing with the introduction of new abi specifications in Sway. * Its purpose is to provide a stable interface for users to work with, - * which won't be affected by changes to the ABI specification. + * which won't be affected by changing ABI specification versions. */ export interface Abi { encodingVersion: string; From 88b222433d443c25b8fdbbd11965c3b5c63cff93 Mon Sep 17 00:00:00 2001 From: nedsalk Date: Thu, 12 Dec 2024 14:51:03 +0100 Subject: [PATCH 041/126] rename test --- packages/fuel-gauge/src/abi/abi-parser.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/fuel-gauge/src/abi/abi-parser.test.ts b/packages/fuel-gauge/src/abi/abi-parser.test.ts index 676f1d3356e..975d7d6e739 100644 --- a/packages/fuel-gauge/src/abi/abi-parser.test.ts +++ b/packages/fuel-gauge/src/abi/abi-parser.test.ts @@ -9,7 +9,7 @@ import expected from './abi-parser.json'; * @group browser */ describe('AbiParser', () => { - test('runs just fine', () => { + test('parses as expected', () => { const parsed = AbiParser.parse(Parser.abi as AbiSpecification); expect(parsed).toEqual(expected); From 0dc80e4a667bb1fd4ae18a4fbbe89164af50f4f4 Mon Sep 17 00:00:00 2001 From: nedsalk Date: Thu, 12 Dec 2024 14:55:31 +0100 Subject: [PATCH 042/126] rename to --- apps/docs/fuels.config.bundled_6czoeakdtqu.mjs | 13 +++++++++++++ .../parser/specifications/v1/resolvable-type.ts | 16 ++++++++-------- .../parser/specifications/v1/resolved-type.ts | 14 +++++++------- 3 files changed, 28 insertions(+), 15 deletions(-) create mode 100644 apps/docs/fuels.config.bundled_6czoeakdtqu.mjs diff --git a/apps/docs/fuels.config.bundled_6czoeakdtqu.mjs b/apps/docs/fuels.config.bundled_6czoeakdtqu.mjs new file mode 100644 index 00000000000..6dd9e7fc2ac --- /dev/null +++ b/apps/docs/fuels.config.bundled_6czoeakdtqu.mjs @@ -0,0 +1,13 @@ +// fuels.config.ts +import { createConfig } from "fuels"; +var fuels_config_default = createConfig({ + workspace: "./sway", + output: "./src/typegend", + forcBuildFlags: ["--release"], + forcPath: "fuels-forc", + fuelCorePath: "fuels-core" +}); +export { + fuels_config_default as default +}; +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiZnVlbHMuY29uZmlnLnRzIl0sCiAgInNvdXJjZXNDb250ZW50IjogWyJjb25zdCBfX2luamVjdGVkX2ZpbGVuYW1lX18gPSBcIi9ob21lL25lZGlta28vZnVlbC90cy9hcHBzL2RvY3MvZnVlbHMuY29uZmlnLnRzXCI7Y29uc3QgX19pbmplY3RlZF9kaXJuYW1lX18gPSBcIi9ob21lL25lZGlta28vZnVlbC90cy9hcHBzL2RvY3NcIjtjb25zdCBfX2luamVjdGVkX2ltcG9ydF9tZXRhX3VybF9fID0gXCJmaWxlOi8vL2hvbWUvbmVkaW1rby9mdWVsL3RzL2FwcHMvZG9jcy9mdWVscy5jb25maWcudHNcIjtpbXBvcnQgeyBjcmVhdGVDb25maWcgfSBmcm9tICdmdWVscyc7XG5cbmV4cG9ydCBkZWZhdWx0IGNyZWF0ZUNvbmZpZyh7XG4gIHdvcmtzcGFjZTogJy4vc3dheScsXG4gIG91dHB1dDogJy4vc3JjL3R5cGVnZW5kJyxcbiAgZm9yY0J1aWxkRmxhZ3M6IFsnLS1yZWxlYXNlJ10sXG4gIGZvcmNQYXRoOiAnZnVlbHMtZm9yYycsXG4gIGZ1ZWxDb3JlUGF0aDogJ2Z1ZWxzLWNvcmUnLFxufSk7XG4iXSwKICAibWFwcGluZ3MiOiAiO0FBQTZPLFNBQVMsb0JBQW9CO0FBRTFRLElBQU8sdUJBQVEsYUFBYTtBQUFBLEVBQzFCLFdBQVc7QUFBQSxFQUNYLFFBQVE7QUFBQSxFQUNSLGdCQUFnQixDQUFDLFdBQVc7QUFBQSxFQUM1QixVQUFVO0FBQUEsRUFDVixjQUFjO0FBQ2hCLENBQUM7IiwKICAibmFtZXMiOiBbXQp9Cg== diff --git a/packages/abi/src/parser/specifications/v1/resolvable-type.ts b/packages/abi/src/parser/specifications/v1/resolvable-type.ts index a336711651d..25b6cd3ee17 100644 --- a/packages/abi/src/parser/specifications/v1/resolvable-type.ts +++ b/packages/abi/src/parser/specifications/v1/resolvable-type.ts @@ -55,7 +55,7 @@ export class ResolvableType { } toComponentType(): AbiTypeComponent['type'] { - const res: AbiTypeComponent['type'] = { + const result: AbiTypeComponent['type'] = { swayType: this.swayType, metadata: { metadataTypeId: this.metadataTypeId, @@ -63,40 +63,40 @@ export class ResolvableType { }; if (this.components) { - res.components = this.components.map((component) => ({ + result.components = this.components.map((component) => ({ name: component.name, type: component.type.toComponentType(), })); } if (this.typeParamsArgsMap) { - res.metadata.typeArguments = this.typeParamsArgsMap.map( + result.metadata.typeArguments = this.typeParamsArgsMap.map( ([, rt]) => rt.toAbiType() as AbiConcreteType ); } - return res; + return result; } toAbiType(): AbiMetadataType { - const res: AbiMetadataType = { + const result: AbiMetadataType = { metadataTypeId: this.metadataTypeId, swayType: this.swayType, }; if (this.components) { - res.components = this.components?.map((component) => ({ + result.components = this.components?.map((component) => ({ name: component.name, type: component.type.toComponentType(), })) as AbiTypeComponent[]; } if (this.typeParamsArgsMap) { - res.typeParameters = this.typeParamsArgsMap.map( + result.typeParameters = this.typeParamsArgsMap.map( ([, rt]) => rt.toAbiType() as AbiMetadataType ); } - return res; + return result; } /** diff --git a/packages/abi/src/parser/specifications/v1/resolved-type.ts b/packages/abi/src/parser/specifications/v1/resolved-type.ts index ad41b584571..8fe7cf7ac1a 100644 --- a/packages/abi/src/parser/specifications/v1/resolved-type.ts +++ b/packages/abi/src/parser/specifications/v1/resolved-type.ts @@ -29,15 +29,15 @@ export class ResolvedType { } public toComponentType(): AbiTypeComponent['type'] { - let res: AbiTypeComponent['type']; + let result: AbiTypeComponent['type']; if (typeof this.typeId === 'string') { - res = { + result = { swayType: this.swayType, concreteTypeId: this.typeId, }; } else { - res = { + result = { swayType: this.swayType, metadata: { metadataTypeId: this.typeId, @@ -46,24 +46,24 @@ export class ResolvedType { } if (this.metadataType) { - res.metadata = { + result.metadata = { metadataTypeId: this.metadataType.metadataTypeId, }; if (this.typeParamsArgsMap && this.metadataType?.typeParameters?.length) { - res.metadata.typeArguments = this.typeParamsArgsMap.map( + result.metadata.typeArguments = this.typeParamsArgsMap.map( (t) => t[1].toAbiType() as AbiConcreteType ); } } if (this.components) { - res.components = this.components.map((c) => ({ + result.components = this.components.map((c) => ({ name: c.name, type: c.type.toComponentType(), })); } - return res; + return result; } public toAbiType(): AbiConcreteType { From d658f80266427c6b649cc4499ba13dd2d16edbfc Mon Sep 17 00:00:00 2001 From: nedsalk Date: Thu, 12 Dec 2024 14:56:48 +0100 Subject: [PATCH 043/126] formatting --- packages/abi/src/parser/specifications/v1/resolvable-type.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/abi/src/parser/specifications/v1/resolvable-type.ts b/packages/abi/src/parser/specifications/v1/resolvable-type.ts index 25b6cd3ee17..4bbfd544518 100644 --- a/packages/abi/src/parser/specifications/v1/resolvable-type.ts +++ b/packages/abi/src/parser/specifications/v1/resolvable-type.ts @@ -198,8 +198,8 @@ export class ResolvableType { /** * The concrete type's underlying metadata type is generic. - * We must resolve all its type parameters with the provided type arguments - * of the concrete type, and then resolve the metadata type itself. + * We must resolve all its type parameters with the provided type arguments of the concrete type, + * and then resolve the metadata type itself. */ const metadataType = this.findMetadataType(type.metadataTypeId); From a8886b9d9316fdf4eaf47d3eb185a8ca25bd4ac6 Mon Sep 17 00:00:00 2001 From: nedsalk Date: Thu, 12 Dec 2024 15:44:54 +0100 Subject: [PATCH 044/126] more explanations --- .../specifications/v1/resolvable-type.ts | 116 +++++++++++++----- .../fuel-gauge/src/abi/abi-parser.test.ts | 22 +++- 2 files changed, 109 insertions(+), 29 deletions(-) diff --git a/packages/abi/src/parser/specifications/v1/resolvable-type.ts b/packages/abi/src/parser/specifications/v1/resolvable-type.ts index 4bbfd544518..1a9e90ccb83 100644 --- a/packages/abi/src/parser/specifications/v1/resolvable-type.ts +++ b/packages/abi/src/parser/specifications/v1/resolvable-type.ts @@ -225,13 +225,25 @@ export class ResolvableType { metadataType: AbiMetadataTypeV1, typeArguments: AbiComponentV1['typeArguments'] ): ResolvableType | ResolvedType { + /** + * If the type is generic, we can't resolve it and thus we create a `ResolvableType` from it. + * This propagates to the parent type, forcing it to be a `ResolvableType` as well, + * as it can't be resolved until this generic type is substituted with a type argument. + */ if (swayTypeMatchers.generic(metadataType.type)) { - const resolvedTypeParameter = parent.typeParamsArgsMap?.find( + /** + * This search solves the case where an e.g. `generic T` is being substituted by `generic E`. + * This can happen when a generic type is nested in another generic type and they have differently-named type parameters. + * e.g. `GenericStruct` is nested in `Vec`: `struct MyStruct { a: Vec }` + * We check in the parent's typeParamsArgsMap if the metadata type we're solving for + * has been substituted with a different generic type, and then we use that generic type. + */ + const resolvableTypeParameter = parent.typeParamsArgsMap?.find( ([typeParameterId]) => typeParameterId === metadataType.metadataTypeId )?.[1]; return ( - resolvedTypeParameter ?? + resolvableTypeParameter ?? new ResolvableType(this.abi, metadataType.metadataTypeId, undefined) ); } @@ -260,15 +272,15 @@ export class ResolvableType { : ResolvableType.mapTypeParametersAndArgs(metadataType, typeArgs) ); - const isGeneric = resolvable.components?.some( - (component) => component.type instanceof ResolvableType - ); - /** * If any component is unresolved, this means that the metadata type is generic. * We can't resolve it yet, so we return the resolvable type. * If all components are resolved, we can resolve the metadata type immediately. */ + const isGeneric = resolvable.components?.some( + (component) => component.type instanceof ResolvableType + ); + return isGeneric ? resolvable : resolvable.resolveInternal(metadataType.metadataTypeId, undefined); @@ -278,15 +290,53 @@ export class ResolvableType { typeId: string | number, typeParamsArgsMap: Array<[number, ResolvedType]> | undefined ): ResolvedType { + /** + * A type without components can be immediately resolved. + */ + if (!this.components) { + return new ResolvedType({ + swayType: this.swayType, + typeId, + metadataType: this.metadataType, + typeParamsArgsMap, + }); + } + + /** + * If typeParamsArgsMap is undefined, + * this means that the underlying metadata type's components are already fully resolved, + * as it doesn't need any external typeArgs to substitute those components with. + */ + if (typeParamsArgsMap === undefined) { + return new ResolvedType({ + swayType: this.swayType, + typeId, + components: this.components as ResolvedComponent[], + metadataType: this.metadataType, + typeParamsArgsMap: this.typeParamsArgsMap as [number, ResolvedType][], + }); + } + + /** + * Before resolving the components, + * we need to substitute the type parameters of the underlying metadata type + * with the type arguments of the concrete type, + * so that we can substitute the generic components with them later. + */ const typeArgs = this.resolveTypeArgs(typeParamsArgsMap); - const components: ResolvedType['components'] = this.components?.map((component) => { + const components: ResolvedComponent[] = this.components.map((component) => { const { name, type } = component; if (type instanceof ResolvedType) { return component as ResolvedComponent; } + /** + * Here the component's type is a `ResolvableType`. + * If the component is a generic type parameter itself, its corresponding type argument will be found in the typeArgs, + * which will be used to substitute the component with. + */ const resolvedGenericType = typeArgs?.find( ([typeParameterId]) => type.metadataTypeId === typeParameterId )?.[1]; @@ -300,11 +350,20 @@ export class ResolvableType { return { name, + /** + * The component is a `ResolvableType`, but it's not a generic type parameter itself. + * This means that one of its components (or component's components ad infinitum) is a generic type. + * We need to resolve that first before resolving the component. + * + * Note that we are passing in the original `typeParamsArgsMap`, + * which will be used to substitute the component's generic type parameters with their type arguments. + */ type: type.resolveInternal(type.metadataTypeId, typeParamsArgsMap), }; }); + return new ResolvedType({ - swayType: this.metadataType.type, + swayType: this.swayType, typeId, components, typeParamsArgsMap: typeArgs, @@ -313,26 +372,27 @@ export class ResolvableType { } private resolveTypeArgs( - typeParamsArgsMap: Array<[number, ResolvedType]> | undefined - ): [number, ResolvedType][] | undefined { - return this.typeParamsArgsMap === undefined - ? typeParamsArgsMap - : this.typeParamsArgsMap.map(([tp, value]) => { - if (value instanceof ResolvableType) { - const resolved = typeParamsArgsMap?.find( - ([typeParameterId]) => typeParameterId === value.metadataTypeId - ); - - if (!resolved) { - const val = value.resolveInternal(value.metadataTypeId, typeParamsArgsMap); - return [tp, val]; - } - - return resolved; - } - - return [tp, value]; - }); + typeParamsArgsMap: Array<[number, ResolvedType]> + ): [number, ResolvedType][] { + if (this.typeParamsArgsMap === undefined) { + return typeParamsArgsMap; + } + + return this.typeParamsArgsMap.map(([tp, value]) => { + if (value instanceof ResolvedType) { + return [tp, value]; + } + const resolved = typeParamsArgsMap?.find( + ([typeParameterId]) => typeParameterId === value.metadataTypeId + ); + + if (!resolved) { + const val = value.resolveInternal(value.metadataTypeId, typeParamsArgsMap); + return [tp, val]; + } + + return resolved; + }); } public resolve(concreteType: AbiConcreteTypeV1) { diff --git a/packages/fuel-gauge/src/abi/abi-parser.test.ts b/packages/fuel-gauge/src/abi/abi-parser.test.ts index 975d7d6e739..d9677c096a1 100644 --- a/packages/fuel-gauge/src/abi/abi-parser.test.ts +++ b/packages/fuel-gauge/src/abi/abi-parser.test.ts @@ -12,6 +12,26 @@ describe('AbiParser', () => { test('parses as expected', () => { const parsed = AbiParser.parse(Parser.abi as AbiSpecification); - expect(parsed).toEqual(expected); + /** + * This is split up instead of comparing the whole object + * so that we can see the specific differences + * because the JSON is huge and the diff gets cut off in the terminal + */ + expect({ encodingVersion: parsed.encodingVersion }).toEqual({ + encodingVersion: expected.encodingVersion, + }); + expect({ programType: parsed.programType }).toEqual({ programType: expected.programType }); + expect({ metadataTypes: parsed.metadataTypes }).toEqual({ + metadataTypes: expected.metadataTypes, + }); + expect({ concreteTypes: parsed.concreteTypes }).toEqual({ + concreteTypes: expected.concreteTypes, + }); + expect({ functions: parsed.functions }).toEqual({ functions: expected.functions }); + expect({ loggedTypes: parsed.loggedTypes }).toEqual({ loggedTypes: expected.loggedTypes }); + expect({ messageTypes: parsed.messageTypes }).toEqual({ messageTypes: expected.messageTypes }); + expect({ configurables: parsed.configurables }).toEqual({ + configurables: expected.configurables, + }); }); }); From 244f02c29bcfd91a7e6fd98caa6df829662257b8 Mon Sep 17 00:00:00 2001 From: nedsalk Date: Thu, 12 Dec 2024 16:01:15 +0100 Subject: [PATCH 045/126] cleaner --- packages/abi/src/parser/specifications/v1/resolvable-type.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/abi/src/parser/specifications/v1/resolvable-type.ts b/packages/abi/src/parser/specifications/v1/resolvable-type.ts index 1a9e90ccb83..be21da956da 100644 --- a/packages/abi/src/parser/specifications/v1/resolvable-type.ts +++ b/packages/abi/src/parser/specifications/v1/resolvable-type.ts @@ -298,7 +298,6 @@ export class ResolvableType { swayType: this.swayType, typeId, metadataType: this.metadataType, - typeParamsArgsMap, }); } From 238b4adbb87de3c2b8476c3e13be72c7af7ff511 Mon Sep 17 00:00:00 2001 From: nedsalk Date: Thu, 12 Dec 2024 16:03:04 +0100 Subject: [PATCH 046/126] formatting --- .../specifications/v1/resolvable-type.ts | 33 ++++++++----------- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/packages/abi/src/parser/specifications/v1/resolvable-type.ts b/packages/abi/src/parser/specifications/v1/resolvable-type.ts index be21da956da..ae8682fa895 100644 --- a/packages/abi/src/parser/specifications/v1/resolvable-type.ts +++ b/packages/abi/src/parser/specifications/v1/resolvable-type.ts @@ -290,15 +290,17 @@ export class ResolvableType { typeId: string | number, typeParamsArgsMap: Array<[number, ResolvedType]> | undefined ): ResolvedType { + const resolvedType = new ResolvedType({ + swayType: this.swayType, + typeId, + metadataType: this.metadataType, + }); + /** * A type without components can be immediately resolved. */ if (!this.components) { - return new ResolvedType({ - swayType: this.swayType, - typeId, - metadataType: this.metadataType, - }); + return resolvedType; } /** @@ -307,13 +309,9 @@ export class ResolvableType { * as it doesn't need any external typeArgs to substitute those components with. */ if (typeParamsArgsMap === undefined) { - return new ResolvedType({ - swayType: this.swayType, - typeId, - components: this.components as ResolvedComponent[], - metadataType: this.metadataType, - typeParamsArgsMap: this.typeParamsArgsMap as [number, ResolvedType][], - }); + resolvedType.components = this.components as ResolvedComponent[]; + resolvedType.typeParamsArgsMap = this.typeParamsArgsMap as [number, ResolvedType][]; + return resolvedType; } /** @@ -361,13 +359,10 @@ export class ResolvableType { }; }); - return new ResolvedType({ - swayType: this.swayType, - typeId, - components, - typeParamsArgsMap: typeArgs, - metadataType: this.metadataType, - }); + resolvedType.components = components; + resolvedType.typeParamsArgsMap = typeArgs; + + return resolvedType; } private resolveTypeArgs( From 64ccd8dac748d00b38092a7a4ce13987e294c3cb Mon Sep 17 00:00:00 2001 From: nedsalk Date: Thu, 12 Dec 2024 16:35:18 +0100 Subject: [PATCH 047/126] comments --- .../src/parser/specifications/v1/resolvable-type.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/packages/abi/src/parser/specifications/v1/resolvable-type.ts b/packages/abi/src/parser/specifications/v1/resolvable-type.ts index ae8682fa895..fcc836b67cd 100644 --- a/packages/abi/src/parser/specifications/v1/resolvable-type.ts +++ b/packages/abi/src/parser/specifications/v1/resolvable-type.ts @@ -368,10 +368,21 @@ export class ResolvableType { private resolveTypeArgs( typeParamsArgsMap: Array<[number, ResolvedType]> ): [number, ResolvedType][] { + /** + * This case only happens when the metadata type is *implicitly* generic. + * The type itself doesn't have any type parameters that should be resolved, + * but its components are still generic types. + * This happens in the following type: + * `struct StructWithImplicitGenerics { a: [E; 3], b: (E, F)}`. + */ if (this.typeParamsArgsMap === undefined) { return typeParamsArgsMap; } + /** + * We resolve the type parameters of the underlying metadata type + * with the type arguments of the concrete type. + */ return this.typeParamsArgsMap.map(([tp, value]) => { if (value instanceof ResolvedType) { return [tp, value]; From 9e33353a8993e9f077f8a90b2109d30abf4679d4 Mon Sep 17 00:00:00 2001 From: nedsalk Date: Thu, 12 Dec 2024 17:16:36 +0100 Subject: [PATCH 048/126] add double generic case --- .../specifications/v1/resolvable-type.ts | 18 +- packages/fuel-gauge/src/abi/abi-parser.json | 275 +++++++++++++----- .../fixtures/forc-projects/parser/src/main.sw | 6 + 3 files changed, 226 insertions(+), 73 deletions(-) diff --git a/packages/abi/src/parser/specifications/v1/resolvable-type.ts b/packages/abi/src/parser/specifications/v1/resolvable-type.ts index fcc836b67cd..a4b54db6b93 100644 --- a/packages/abi/src/parser/specifications/v1/resolvable-type.ts +++ b/packages/abi/src/parser/specifications/v1/resolvable-type.ts @@ -384,19 +384,25 @@ export class ResolvableType { * with the type arguments of the concrete type. */ return this.typeParamsArgsMap.map(([tp, value]) => { + /** + * Some type parameters can already be resolved + * e.g. `struct MyStruct { a: DoubleGeneric }` + * where the second type parameter of DoubleGeneric is already known. + */ if (value instanceof ResolvedType) { return [tp, value]; } + const resolved = typeParamsArgsMap?.find( ([typeParameterId]) => typeParameterId === value.metadataTypeId ); - if (!resolved) { - const val = value.resolveInternal(value.metadataTypeId, typeParamsArgsMap); - return [tp, val]; - } - - return resolved; + /** + * The type parameter is either directly substituted with a type argument, + * or it's metadata type which accepts the type argument, + * so that metadata type needs to be resolved first. + */ + return resolved ?? [tp, value.resolveInternal(value.metadataTypeId, typeParamsArgsMap)]; }); } diff --git a/packages/fuel-gauge/src/abi/abi-parser.json b/packages/fuel-gauge/src/abi/abi-parser.json index 6afb6e0302e..2691f668e05 100644 --- a/packages/fuel-gauge/src/abi/abi-parser.json +++ b/packages/fuel-gauge/src/abi/abi-parser.json @@ -57,6 +57,40 @@ }, { "metadataTypeId": 6, + "swayType": "struct DoubleGeneric", + "components": [ + { + "name": "a", + "type": { + "swayType": "generic T", + "metadata": { + "metadataTypeId": 4 + } + } + }, + { + "name": "b", + "type": { + "swayType": "generic F", + "metadata": { + "metadataTypeId": 3 + } + } + } + ], + "typeParameters": [ + { + "metadataTypeId": 4, + "swayType": "generic T" + }, + { + "metadataTypeId": 3, + "swayType": "generic F" + } + ] + }, + { + "metadataTypeId": 7, "swayType": "struct GenericStruct", "components": [ { @@ -71,7 +105,7 @@ "type": { "swayType": "u32", "metadata": { - "metadataTypeId": 12 + "metadataTypeId": 13 } } }, @@ -93,7 +127,7 @@ ] }, { - "metadataTypeId": 7, + "metadataTypeId": 8, "swayType": "struct NestedGenericStruct", "components": [ { @@ -101,10 +135,10 @@ "type": { "swayType": "struct std::vec::Vec", "metadata": { - "metadataTypeId": 11, + "metadataTypeId": 12, "typeArguments": [ { - "metadataTypeId": 6, + "metadataTypeId": 7, "swayType": "struct GenericStruct", "components": [ { @@ -119,7 +153,7 @@ "type": { "swayType": "u32", "metadata": { - "metadataTypeId": 12 + "metadataTypeId": 13 } } }, @@ -148,7 +182,7 @@ "type": { "swayType": "struct GenericStruct", "metadata": { - "metadataTypeId": 6, + "metadataTypeId": 7, "typeArguments": [ { "metadataTypeId": 2, @@ -169,7 +203,7 @@ "type": { "swayType": "u32", "metadata": { - "metadataTypeId": 12 + "metadataTypeId": 13 } } }, @@ -193,13 +227,13 @@ "type": { "swayType": "struct std::vec::Vec", "metadata": { - "metadataTypeId": 11, + "metadataTypeId": 12, "typeArguments": [ { - "concreteTypeId": 6, + "concreteTypeId": 7, "swayType": "struct GenericStruct", "metadata": { - "metadataTypeId": 6, + "metadataTypeId": 7, "typeArguments": [ { "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef", @@ -220,7 +254,7 @@ "type": { "swayType": "u32", "metadata": { - "metadataTypeId": 12 + "metadataTypeId": 13 } } }, @@ -241,7 +275,7 @@ "type": { "swayType": "struct GenericStruct", "metadata": { - "metadataTypeId": 6, + "metadataTypeId": 7, "typeArguments": [ { "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef", @@ -262,7 +296,7 @@ "type": { "swayType": "u32", "metadata": { - "metadataTypeId": 12 + "metadataTypeId": 13 } } }, @@ -278,6 +312,43 @@ } ] } + }, + { + "name": "c", + "type": { + "swayType": "struct DoubleGeneric", + "metadata": { + "metadataTypeId": 6, + "typeArguments": [ + { + "metadataTypeId": 2, + "swayType": "generic E" + }, + { + "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef", + "swayType": "u16" + } + ] + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "generic E", + "metadata": { + "metadataTypeId": 2 + } + } + }, + { + "name": "b", + "type": { + "swayType": "u16", + "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef" + } + } + ] + } } ], "typeParameters": [ @@ -288,7 +359,7 @@ ] }, { - "metadataTypeId": 8, + "metadataTypeId": 9, "swayType": "struct SimpleStruct", "components": [ { @@ -301,7 +372,7 @@ ] }, { - "metadataTypeId": 9, + "metadataTypeId": 10, "swayType": "struct StructWithImplicitGenerics", "components": [ { @@ -366,7 +437,7 @@ ] }, { - "metadataTypeId": 11, + "metadataTypeId": 12, "swayType": "struct std::vec::Vec", "components": [ { @@ -387,11 +458,11 @@ ] }, { - "metadataTypeId": 12, + "metadataTypeId": 13, "swayType": "u32" }, { - "metadataTypeId": 13, + "metadataTypeId": 14, "swayType": "u64" } ], @@ -404,19 +475,19 @@ "concreteTypeId": "8fa64aacdb756049c3c90d3a5fa8d1a7ebedefc8dc2f347e67bb26ef4c7140a7", "swayType": "struct GenericStruct", "metadata": { - "metadataTypeId": 6, + "metadataTypeId": 7, "typeArguments": [ { "concreteTypeId": "688b6ed7fc2c45e135ea9a2ce11e3f5313a4c057ba5d616e3381937605ea81e4", "swayType": "struct std::vec::Vec", "metadata": { - "metadataTypeId": 11, + "metadataTypeId": 12, "typeArguments": [ { "concreteTypeId": "75f7f7a06026cab5d7a70984d1fde56001e83505e3a091ff9722b92d7f56d8be", "swayType": "struct SimpleStruct", "metadata": { - "metadataTypeId": 8 + "metadataTypeId": 9 }, "components": [ { @@ -437,7 +508,7 @@ "swayType": "struct SimpleStruct", "concreteTypeId": "75f7f7a06026cab5d7a70984d1fde56001e83505e3a091ff9722b92d7f56d8be", "metadata": { - "metadataTypeId": 8 + "metadataTypeId": 9 }, "components": [ { @@ -467,7 +538,7 @@ "type": { "swayType": "u32", "metadata": { - "metadataTypeId": 12 + "metadataTypeId": 13 } } }, @@ -477,13 +548,13 @@ "swayType": "struct std::vec::Vec", "concreteTypeId": "688b6ed7fc2c45e135ea9a2ce11e3f5313a4c057ba5d616e3381937605ea81e4", "metadata": { - "metadataTypeId": 11, + "metadataTypeId": 12, "typeArguments": [ { "concreteTypeId": "75f7f7a06026cab5d7a70984d1fde56001e83505e3a091ff9722b92d7f56d8be", "swayType": "struct SimpleStruct", "metadata": { - "metadataTypeId": 8 + "metadataTypeId": 9 }, "components": [ { @@ -504,7 +575,7 @@ "swayType": "struct SimpleStruct", "concreteTypeId": "75f7f7a06026cab5d7a70984d1fde56001e83505e3a091ff9722b92d7f56d8be", "metadata": { - "metadataTypeId": 8 + "metadataTypeId": 9 }, "components": [ { @@ -526,7 +597,7 @@ "concreteTypeId": "cc3087210794115a9b7e470ad5b5d554808a3a88aa003ae80bae7b0dc4505f50", "swayType": "struct NestedGenericStruct", "metadata": { - "metadataTypeId": 7, + "metadataTypeId": 8, "typeArguments": [ { "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b", @@ -540,13 +611,13 @@ "type": { "swayType": "struct std::vec::Vec", "metadata": { - "metadataTypeId": 11, + "metadataTypeId": 12, "typeArguments": [ { - "concreteTypeId": 6, + "concreteTypeId": 7, "swayType": "struct GenericStruct", "metadata": { - "metadataTypeId": 6, + "metadataTypeId": 7, "typeArguments": [ { "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b", @@ -567,7 +638,7 @@ "type": { "swayType": "u32", "metadata": { - "metadataTypeId": 12 + "metadataTypeId": 13 } } }, @@ -588,7 +659,7 @@ "type": { "swayType": "struct GenericStruct", "metadata": { - "metadataTypeId": 6, + "metadataTypeId": 7, "typeArguments": [ { "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b", @@ -609,7 +680,7 @@ "type": { "swayType": "u32", "metadata": { - "metadataTypeId": 12 + "metadataTypeId": 13 } } }, @@ -631,13 +702,13 @@ "type": { "swayType": "struct std::vec::Vec", "metadata": { - "metadataTypeId": 11, + "metadataTypeId": 12, "typeArguments": [ { - "concreteTypeId": 6, + "concreteTypeId": 7, "swayType": "struct GenericStruct", "metadata": { - "metadataTypeId": 6, + "metadataTypeId": 7, "typeArguments": [ { "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef", @@ -658,7 +729,7 @@ "type": { "swayType": "u32", "metadata": { - "metadataTypeId": 12 + "metadataTypeId": 13 } } }, @@ -679,7 +750,7 @@ "type": { "swayType": "struct GenericStruct", "metadata": { - "metadataTypeId": 6, + "metadataTypeId": 7, "typeArguments": [ { "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef", @@ -700,7 +771,7 @@ "type": { "swayType": "u32", "metadata": { - "metadataTypeId": 12 + "metadataTypeId": 13 } } }, @@ -716,6 +787,41 @@ } ] } + }, + { + "name": "c", + "type": { + "swayType": "struct DoubleGeneric", + "metadata": { + "metadataTypeId": 6, + "typeArguments": [ + { + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b", + "swayType": "u8" + }, + { + "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef", + "swayType": "u16" + } + ] + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "u8", + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + } + }, + { + "name": "b", + "type": { + "swayType": "u16", + "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef" + } + } + ] + } } ] }, @@ -723,7 +829,7 @@ "concreteTypeId": "75f7f7a06026cab5d7a70984d1fde56001e83505e3a091ff9722b92d7f56d8be", "swayType": "struct SimpleStruct", "metadata": { - "metadataTypeId": 8 + "metadataTypeId": 9 }, "components": [ { @@ -739,7 +845,7 @@ "concreteTypeId": "426345c4ea93db9f08eeb9fe6047ef0273294bfb1140600a0660be9f2a08d750", "swayType": "struct StructWithImplicitGenerics", "metadata": { - "metadataTypeId": 9, + "metadataTypeId": 10, "typeArguments": [ { "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b", @@ -801,13 +907,13 @@ "concreteTypeId": "688b6ed7fc2c45e135ea9a2ce11e3f5313a4c057ba5d616e3381937605ea81e4", "swayType": "struct std::vec::Vec", "metadata": { - "metadataTypeId": 11, + "metadataTypeId": 12, "typeArguments": [ { "concreteTypeId": "75f7f7a06026cab5d7a70984d1fde56001e83505e3a091ff9722b92d7f56d8be", "swayType": "struct SimpleStruct", "metadata": { - "metadataTypeId": 8 + "metadataTypeId": 9 }, "components": [ { @@ -828,7 +934,7 @@ "swayType": "struct SimpleStruct", "concreteTypeId": "75f7f7a06026cab5d7a70984d1fde56001e83505e3a091ff9722b92d7f56d8be", "metadata": { - "metadataTypeId": 8 + "metadataTypeId": 9 }, "components": [ { @@ -868,19 +974,19 @@ "concreteTypeId": "8fa64aacdb756049c3c90d3a5fa8d1a7ebedefc8dc2f347e67bb26ef4c7140a7", "swayType": "struct GenericStruct", "metadata": { - "metadataTypeId": 6, + "metadataTypeId": 7, "typeArguments": [ { "concreteTypeId": "688b6ed7fc2c45e135ea9a2ce11e3f5313a4c057ba5d616e3381937605ea81e4", "swayType": "struct std::vec::Vec", "metadata": { - "metadataTypeId": 11, + "metadataTypeId": 12, "typeArguments": [ { "concreteTypeId": "75f7f7a06026cab5d7a70984d1fde56001e83505e3a091ff9722b92d7f56d8be", "swayType": "struct SimpleStruct", "metadata": { - "metadataTypeId": 8 + "metadataTypeId": 9 }, "components": [ { @@ -901,7 +1007,7 @@ "swayType": "struct SimpleStruct", "concreteTypeId": "75f7f7a06026cab5d7a70984d1fde56001e83505e3a091ff9722b92d7f56d8be", "metadata": { - "metadataTypeId": 8 + "metadataTypeId": 9 }, "components": [ { @@ -931,7 +1037,7 @@ "type": { "swayType": "u32", "metadata": { - "metadataTypeId": 12 + "metadataTypeId": 13 } } }, @@ -941,13 +1047,13 @@ "swayType": "struct std::vec::Vec", "concreteTypeId": "688b6ed7fc2c45e135ea9a2ce11e3f5313a4c057ba5d616e3381937605ea81e4", "metadata": { - "metadataTypeId": 11, + "metadataTypeId": 12, "typeArguments": [ { "concreteTypeId": "75f7f7a06026cab5d7a70984d1fde56001e83505e3a091ff9722b92d7f56d8be", "swayType": "struct SimpleStruct", "metadata": { - "metadataTypeId": 8 + "metadataTypeId": 9 }, "components": [ { @@ -968,7 +1074,7 @@ "swayType": "struct SimpleStruct", "concreteTypeId": "75f7f7a06026cab5d7a70984d1fde56001e83505e3a091ff9722b92d7f56d8be", "metadata": { - "metadataTypeId": 8 + "metadataTypeId": 9 }, "components": [ { @@ -993,7 +1099,7 @@ "concreteTypeId": "cc3087210794115a9b7e470ad5b5d554808a3a88aa003ae80bae7b0dc4505f50", "swayType": "struct NestedGenericStruct", "metadata": { - "metadataTypeId": 7, + "metadataTypeId": 8, "typeArguments": [ { "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b", @@ -1007,13 +1113,13 @@ "type": { "swayType": "struct std::vec::Vec", "metadata": { - "metadataTypeId": 11, + "metadataTypeId": 12, "typeArguments": [ { - "concreteTypeId": 6, + "concreteTypeId": 7, "swayType": "struct GenericStruct", "metadata": { - "metadataTypeId": 6, + "metadataTypeId": 7, "typeArguments": [ { "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b", @@ -1034,7 +1140,7 @@ "type": { "swayType": "u32", "metadata": { - "metadataTypeId": 12 + "metadataTypeId": 13 } } }, @@ -1055,7 +1161,7 @@ "type": { "swayType": "struct GenericStruct", "metadata": { - "metadataTypeId": 6, + "metadataTypeId": 7, "typeArguments": [ { "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b", @@ -1076,7 +1182,7 @@ "type": { "swayType": "u32", "metadata": { - "metadataTypeId": 12 + "metadataTypeId": 13 } } }, @@ -1098,13 +1204,13 @@ "type": { "swayType": "struct std::vec::Vec", "metadata": { - "metadataTypeId": 11, + "metadataTypeId": 12, "typeArguments": [ { - "concreteTypeId": 6, + "concreteTypeId": 7, "swayType": "struct GenericStruct", "metadata": { - "metadataTypeId": 6, + "metadataTypeId": 7, "typeArguments": [ { "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef", @@ -1125,7 +1231,7 @@ "type": { "swayType": "u32", "metadata": { - "metadataTypeId": 12 + "metadataTypeId": 13 } } }, @@ -1146,7 +1252,7 @@ "type": { "swayType": "struct GenericStruct", "metadata": { - "metadataTypeId": 6, + "metadataTypeId": 7, "typeArguments": [ { "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef", @@ -1167,7 +1273,7 @@ "type": { "swayType": "u32", "metadata": { - "metadataTypeId": 12 + "metadataTypeId": 13 } } }, @@ -1183,6 +1289,41 @@ } ] } + }, + { + "name": "c", + "type": { + "swayType": "struct DoubleGeneric", + "metadata": { + "metadataTypeId": 6, + "typeArguments": [ + { + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b", + "swayType": "u8" + }, + { + "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef", + "swayType": "u16" + } + ] + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "u8", + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + } + }, + { + "name": "b", + "type": { + "swayType": "u16", + "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef" + } + } + ] + } } ] } @@ -1202,7 +1343,7 @@ "concreteTypeId": "426345c4ea93db9f08eeb9fe6047ef0273294bfb1140600a0660be9f2a08d750", "swayType": "struct StructWithImplicitGenerics", "metadata": { - "metadataTypeId": 9, + "metadataTypeId": 10, "typeArguments": [ { "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b", @@ -1292,7 +1433,7 @@ "configurables": [ { "name": "U8_VALUE", - "offset": 3904, + "offset": 4240, "type": { "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b", "swayType": "u8" diff --git a/packages/fuel-gauge/test/fixtures/forc-projects/parser/src/main.sw b/packages/fuel-gauge/test/fixtures/forc-projects/parser/src/main.sw index 9d8c376ec10..1098335e5e7 100644 --- a/packages/fuel-gauge/test/fixtures/forc-projects/parser/src/main.sw +++ b/packages/fuel-gauge/test/fixtures/forc-projects/parser/src/main.sw @@ -7,9 +7,15 @@ struct GenericStruct { c: T, } +pub struct DoubleGeneric { + pub a: T, + pub b: F, +} + struct NestedGenericStruct { a: Vec>, b: Vec>, + c: DoubleGeneric, } struct SimpleStruct { From 4fddeca6c054e418a913280222c7dd2cfb800852 Mon Sep 17 00:00:00 2001 From: nedsalk Date: Thu, 12 Dec 2024 18:08:04 +0100 Subject: [PATCH 049/126] fix test --- .../cookbook/snippets/{abi-parser.ts => parsing-the-abi.ts} | 4 ++-- apps/docs/src/guide/cookbook/working-with-the-abi.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) rename apps/docs/src/guide/cookbook/snippets/{abi-parser.ts => parsing-the-abi.ts} (54%) diff --git a/apps/docs/src/guide/cookbook/snippets/abi-parser.ts b/apps/docs/src/guide/cookbook/snippets/parsing-the-abi.ts similarity index 54% rename from apps/docs/src/guide/cookbook/snippets/abi-parser.ts rename to apps/docs/src/guide/cookbook/snippets/parsing-the-abi.ts index 6b22d76b9bb..8b54490de56 100644 --- a/apps/docs/src/guide/cookbook/snippets/abi-parser.ts +++ b/apps/docs/src/guide/cookbook/snippets/parsing-the-abi.ts @@ -2,8 +2,8 @@ import { AbiParser } from 'fuels'; import type { Abi, AbiSpecificationV1 } from 'fuels'; -import someAbi from '../../../typegend/contracts/Counter-abi.json'; +import { Counter } from '../../../typegend'; -const parsedAbi: Abi = AbiParser.parse(someAbi as AbiSpecificationV1); +const parsedAbi: Abi = AbiParser.parse(Counter.abi as AbiSpecificationV1); // #endregion full console.log('Parsed ABI:', parsedAbi); diff --git a/apps/docs/src/guide/cookbook/working-with-the-abi.md b/apps/docs/src/guide/cookbook/working-with-the-abi.md index 269f65456f1..35fab464def 100644 --- a/apps/docs/src/guide/cookbook/working-with-the-abi.md +++ b/apps/docs/src/guide/cookbook/working-with-the-abi.md @@ -4,4 +4,4 @@ Building a Sway program with `forc build` outputs multiple files, one of which i To mitigate this, The SDK provides [`AbiParser`](https://fuels-ts-docs-api.vercel.app/classes/_fuel_ts_abi.AbiParser.html) which can parse all ABI specification versions and output an object that conforms to the [`Abi`](https://fuels-ts-docs-api.vercel.app/interfaces/_fuel_ts_abi.Abi.html) interface. The SDK also internally uses this `Abi` interface for implementing its encoding/decoding and TS type generation. -<<< @./snippets/abi-parser.ts#full{ts:line-numbers} +<<< @./snippets/parsing-the-abi.ts#full{ts:line-numbers} From 0434ecd7496e01ba9ce1c2353344c60eeb74f7bb Mon Sep 17 00:00:00 2001 From: nedsalk Date: Thu, 12 Dec 2024 18:20:08 +0100 Subject: [PATCH 050/126] update changeset --- .changeset/config.json | 1 - .changeset/tender-tigers-fry.md | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.changeset/config.json b/.changeset/config.json index a9ca6cac83c..ea7d2ddbcae 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -7,7 +7,6 @@ "baseBranch": "master", "updateInternalDependencies": "patch", "ignore": [ - "@fuel-ts/abi", "fuel-gauge", "docs", "demo-fuels", diff --git a/.changeset/tender-tigers-fry.md b/.changeset/tender-tigers-fry.md index 5cc8bec484e..f1894f81ac6 100644 --- a/.changeset/tender-tigers-fry.md +++ b/.changeset/tender-tigers-fry.md @@ -1,4 +1,6 @@ --- +"@fuel-ts/abi": minor +"fuels": minor --- -feat: ABI parser \ No newline at end of file +feat: ABI parser From 18e659f885299ed9cad4cea9b9d79f8eb4e4d49b Mon Sep 17 00:00:00 2001 From: nedsalk Date: Thu, 12 Dec 2024 18:24:34 +0100 Subject: [PATCH 051/126] revert --- apps/docs/fuels.config.bundled_6czoeakdtqu.mjs | 13 ------------- packages/recipes/src/types/Src14OwnedProxy.ts | 2 +- .../recipes/src/types/Src14OwnedProxyFactory.ts | 2 +- packages/recipes/src/types/common.d.ts | 2 +- packages/recipes/src/types/index.ts | 2 +- 5 files changed, 4 insertions(+), 17 deletions(-) delete mode 100644 apps/docs/fuels.config.bundled_6czoeakdtqu.mjs diff --git a/apps/docs/fuels.config.bundled_6czoeakdtqu.mjs b/apps/docs/fuels.config.bundled_6czoeakdtqu.mjs deleted file mode 100644 index 6dd9e7fc2ac..00000000000 --- a/apps/docs/fuels.config.bundled_6czoeakdtqu.mjs +++ /dev/null @@ -1,13 +0,0 @@ -// fuels.config.ts -import { createConfig } from "fuels"; -var fuels_config_default = createConfig({ - workspace: "./sway", - output: "./src/typegend", - forcBuildFlags: ["--release"], - forcPath: "fuels-forc", - fuelCorePath: "fuels-core" -}); -export { - fuels_config_default as default -}; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiZnVlbHMuY29uZmlnLnRzIl0sCiAgInNvdXJjZXNDb250ZW50IjogWyJjb25zdCBfX2luamVjdGVkX2ZpbGVuYW1lX18gPSBcIi9ob21lL25lZGlta28vZnVlbC90cy9hcHBzL2RvY3MvZnVlbHMuY29uZmlnLnRzXCI7Y29uc3QgX19pbmplY3RlZF9kaXJuYW1lX18gPSBcIi9ob21lL25lZGlta28vZnVlbC90cy9hcHBzL2RvY3NcIjtjb25zdCBfX2luamVjdGVkX2ltcG9ydF9tZXRhX3VybF9fID0gXCJmaWxlOi8vL2hvbWUvbmVkaW1rby9mdWVsL3RzL2FwcHMvZG9jcy9mdWVscy5jb25maWcudHNcIjtpbXBvcnQgeyBjcmVhdGVDb25maWcgfSBmcm9tICdmdWVscyc7XG5cbmV4cG9ydCBkZWZhdWx0IGNyZWF0ZUNvbmZpZyh7XG4gIHdvcmtzcGFjZTogJy4vc3dheScsXG4gIG91dHB1dDogJy4vc3JjL3R5cGVnZW5kJyxcbiAgZm9yY0J1aWxkRmxhZ3M6IFsnLS1yZWxlYXNlJ10sXG4gIGZvcmNQYXRoOiAnZnVlbHMtZm9yYycsXG4gIGZ1ZWxDb3JlUGF0aDogJ2Z1ZWxzLWNvcmUnLFxufSk7XG4iXSwKICAibWFwcGluZ3MiOiAiO0FBQTZPLFNBQVMsb0JBQW9CO0FBRTFRLElBQU8sdUJBQVEsYUFBYTtBQUFBLEVBQzFCLFdBQVc7QUFBQSxFQUNYLFFBQVE7QUFBQSxFQUNSLGdCQUFnQixDQUFDLFdBQVc7QUFBQSxFQUM1QixVQUFVO0FBQUEsRUFDVixjQUFjO0FBQ2hCLENBQUM7IiwKICAibmFtZXMiOiBbXQp9Cg== diff --git a/packages/recipes/src/types/Src14OwnedProxy.ts b/packages/recipes/src/types/Src14OwnedProxy.ts index 703f12093cd..dcfab7009a8 100644 --- a/packages/recipes/src/types/Src14OwnedProxy.ts +++ b/packages/recipes/src/types/Src14OwnedProxy.ts @@ -5,7 +5,7 @@ /* eslint-disable @typescript-eslint/consistent-type-imports */ /* - Fuels version: 0.97.1 + Fuels version: 0.97.0 */ import { Contract, type InvokeFunction } from '@fuel-ts/program'; diff --git a/packages/recipes/src/types/Src14OwnedProxyFactory.ts b/packages/recipes/src/types/Src14OwnedProxyFactory.ts index 3190be101f0..b0789cb3f5a 100644 --- a/packages/recipes/src/types/Src14OwnedProxyFactory.ts +++ b/packages/recipes/src/types/Src14OwnedProxyFactory.ts @@ -5,7 +5,7 @@ /* eslint-disable @typescript-eslint/consistent-type-imports */ /* - Fuels version: 0.97.1 + Fuels version: 0.97.0 */ import { ContractFactory, type DeployContractOptions } from '@fuel-ts/contract'; diff --git a/packages/recipes/src/types/common.d.ts b/packages/recipes/src/types/common.d.ts index 390dbf32c42..d7ca20eaa69 100644 --- a/packages/recipes/src/types/common.d.ts +++ b/packages/recipes/src/types/common.d.ts @@ -5,7 +5,7 @@ /* eslint-disable @typescript-eslint/consistent-type-imports */ /* - Fuels version: 0.97.1 + Fuels version: 0.97.0 */ /** diff --git a/packages/recipes/src/types/index.ts b/packages/recipes/src/types/index.ts index 24988615795..22dd3591167 100644 --- a/packages/recipes/src/types/index.ts +++ b/packages/recipes/src/types/index.ts @@ -5,7 +5,7 @@ /* eslint-disable @typescript-eslint/consistent-type-imports */ /* - Fuels version: 0.97.1 + Fuels version: 0.97.0 */ export { Src14OwnedProxy } from './Src14OwnedProxy'; From dbf83c6f80f0024552a3b04eb35446bfa5089756 Mon Sep 17 00:00:00 2001 From: nedsalk Date: Thu, 12 Dec 2024 18:25:07 +0100 Subject: [PATCH 052/126] fix changeset --- .changeset/tender-tigers-fry.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/tender-tigers-fry.md b/.changeset/tender-tigers-fry.md index f1894f81ac6..1f3fce0aedd 100644 --- a/.changeset/tender-tigers-fry.md +++ b/.changeset/tender-tigers-fry.md @@ -3,4 +3,4 @@ "fuels": minor --- -feat: ABI parser +feat!: ABI parser From eff1232b60b1b9277d0e12f28893280b77bac61d Mon Sep 17 00:00:00 2001 From: nedsalk Date: Thu, 12 Dec 2024 18:34:21 +0100 Subject: [PATCH 053/126] not breaking --- .changeset/tender-tigers-fry.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.changeset/tender-tigers-fry.md b/.changeset/tender-tigers-fry.md index 1f3fce0aedd..972bc2da5e6 100644 --- a/.changeset/tender-tigers-fry.md +++ b/.changeset/tender-tigers-fry.md @@ -1,6 +1,6 @@ --- -"@fuel-ts/abi": minor -"fuels": minor +"@fuel-ts/abi": patch +"fuels": patch --- -feat!: ABI parser +feat: ABI parser From 7b6da13bec7fb14489b466bf12b460eb2180fd31 Mon Sep 17 00:00:00 2001 From: nedsalk Date: Thu, 12 Dec 2024 18:46:35 +0100 Subject: [PATCH 054/126] fix test --- packages/fuel-gauge/src/abi/abi-parser.json | 2 +- packages/fuel-gauge/src/abi/abi-parser.test.ts | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/fuel-gauge/src/abi/abi-parser.json b/packages/fuel-gauge/src/abi/abi-parser.json index 2691f668e05..22d76f765d8 100644 --- a/packages/fuel-gauge/src/abi/abi-parser.json +++ b/packages/fuel-gauge/src/abi/abi-parser.json @@ -1433,7 +1433,7 @@ "configurables": [ { "name": "U8_VALUE", - "offset": 4240, + "offset": 4368, "type": { "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b", "swayType": "u8" diff --git a/packages/fuel-gauge/src/abi/abi-parser.test.ts b/packages/fuel-gauge/src/abi/abi-parser.test.ts index d9677c096a1..7c2c5fbc576 100644 --- a/packages/fuel-gauge/src/abi/abi-parser.test.ts +++ b/packages/fuel-gauge/src/abi/abi-parser.test.ts @@ -15,7 +15,10 @@ describe('AbiParser', () => { /** * This is split up instead of comparing the whole object * so that we can see the specific differences - * because the JSON is huge and the diff gets cut off in the terminal + * because the JSON is huge and the diff gets cut off in the terminal. + * + * I have also assigned the values to an object with a properly named property + * so that it's easier to understand where it's failing when a diff is shown. */ expect({ encodingVersion: parsed.encodingVersion }).toEqual({ encodingVersion: expected.encodingVersion, From 5ad1fdbda0add1eb96ade56d61772083c0127769 Mon Sep 17 00:00:00 2001 From: nedsalk Date: Thu, 12 Dec 2024 18:55:38 +0100 Subject: [PATCH 055/126] add import check --- internal/check-imports/src/references.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/check-imports/src/references.ts b/internal/check-imports/src/references.ts index aa4fbbe098a..b1a1479a66c 100644 --- a/internal/check-imports/src/references.ts +++ b/internal/check-imports/src/references.ts @@ -37,10 +37,16 @@ import { arrayify, hexlify, createConfig, + AbiParser, } from 'fuels'; const { log } = console; +/** + * abi + */ +log(AbiParser); + /** * abi-coder */ From 733b5598f1b79b8141cb8ff54ce2eb5c07a6b8c8 Mon Sep 17 00:00:00 2001 From: nedsalk Date: Thu, 12 Dec 2024 18:57:03 +0100 Subject: [PATCH 056/126] fix linting --- apps/docs/src/guide/cookbook/working-with-the-abi.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/docs/src/guide/cookbook/working-with-the-abi.md b/apps/docs/src/guide/cookbook/working-with-the-abi.md index 35fab464def..3824f20c576 100644 --- a/apps/docs/src/guide/cookbook/working-with-the-abi.md +++ b/apps/docs/src/guide/cookbook/working-with-the-abi.md @@ -2,6 +2,10 @@ Building a Sway program with `forc build` outputs multiple files, one of which is a JSON representation of the program's ABI. Because ABI specifications can change from one `forc` version to another, working directly with the ABI is cumbersome due to having to manage all ABI specification versions in order to ensure proper functionality. -To mitigate this, The SDK provides [`AbiParser`](https://fuels-ts-docs-api.vercel.app/classes/_fuel_ts_abi.AbiParser.html) which can parse all ABI specification versions and output an object that conforms to the [`Abi`](https://fuels-ts-docs-api.vercel.app/interfaces/_fuel_ts_abi.Abi.html) interface. The SDK also internally uses this `Abi` interface for implementing its encoding/decoding and TS type generation. + + + + +To mitigate this, The SDK provides [`AbiParser`](#working-with-the-abi) which can parse all ABI specification versions and output an object that conforms to the [`Abi`](#working-with-the-abi) interface. The SDK also internally uses this `Abi` interface for implementing its encoding/decoding and TS type generation. <<< @./snippets/parsing-the-abi.ts#full{ts:line-numbers} From 7756375ed1d109e210463be6bb3d9e239cba0be3 Mon Sep 17 00:00:00 2001 From: nedsalk Date: Thu, 12 Dec 2024 19:11:42 +0100 Subject: [PATCH 057/126] fix lint --- apps/docs-api/index.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/docs-api/index.md b/apps/docs-api/index.md index e3cc77b32e8..d30de618cac 100644 --- a/apps/docs-api/index.md +++ b/apps/docs-api/index.md @@ -12,7 +12,9 @@ # Modules -- [abi](https://fuels-ts-docs-api.vercel.app/modules/_fuel_ts_abi.html) + + + - [abi-coder](https://fuels-ts-docs-api.vercel.app/modules/_fuel_ts_abi_coder.html) - [abi-typegen](https://fuels-ts-docs-api.vercel.app/modules/_fuel_ts_abi_typegen.html) - [account](https://fuels-ts-docs-api.vercel.app/modules/_fuel_ts_account.html) From 2390ccad324545ca74aa1bff98984968c6c01c68 Mon Sep 17 00:00:00 2001 From: nedsalk Date: Thu, 12 Dec 2024 19:13:12 +0100 Subject: [PATCH 058/126] add comments to abi interface --- packages/abi/src/parser/abi.ts | 36 ++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/packages/abi/src/parser/abi.ts b/packages/abi/src/parser/abi.ts index a90de020558..db339ea8585 100644 --- a/packages/abi/src/parser/abi.ts +++ b/packages/abi/src/parser/abi.ts @@ -7,7 +7,17 @@ export interface Abi { encodingVersion: string; programType: 'contract' | 'predicate' | 'script' | 'library'; + /** + * Metadata types describe the structure of the types used in the `concreteTypes` field. + * One metadata type can be referenced multiple times if it is used in multiple concrete types. + */ metadataTypes: AbiMetadataType[]; + /** + * Concrete types are types that are used in: + * function inputs/outputs, configurables, logged types, or message types. + * + * Their structure is fully known and they do not contain any unresolved generic parameters. + */ concreteTypes: AbiConcreteType[]; functions: AbiFunction[]; loggedTypes: AbiLoggedType[]; @@ -18,9 +28,23 @@ export interface Abi { export interface AbiConcreteType { swayType: string; concreteTypeId: string; + /** + * The components field is populated when the type is any non-primitive type. + * That includes structs, enums, arrays, and tuples. + */ components?: AbiTypeComponent[]; + /** + * A concrete type can be an implementation of a metadata type, + * in which case the `metadata` field is populated. + * If the underlying metadata type has type parameters (is generic), + * the `typeArguments` field corresponds to those type parameters. + */ metadata?: { metadataTypeId: number; + /** + * Type arguments used to resolve the type parameters in the metadata type. + * They are ordered in the same way as the type parameters in the metadata type. + */ typeArguments?: AbiConcreteType[]; }; } @@ -28,7 +52,14 @@ export interface AbiConcreteType { export interface AbiMetadataType { swayType: string; metadataTypeId: number; + /** + * The components field is populated when the type is any non-primitive type. + * That includes structs, enums, arrays, and tuples. + */ components?: AbiTypeComponent[]; + /** + * The existence of type parameters indicates that the metadata type is generic. + */ typeParameters?: AbiMetadataType[]; } @@ -37,6 +68,11 @@ export interface AbiTypeComponent { type: AbiConcreteType | AbiMetadataComponent; } +/** + * AbiMetadataComponents point to a metadata type but aren't the same, + * as the metadata type describes the structure of the type, + * whereas the component is an actual implementation of that type. + */ export interface AbiMetadataComponent { swayType: string; components?: AbiTypeComponent[]; From 6287f8725682c45c9c68fe06fb8d114d53cdd256 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nedim=20Salki=C4=87?= Date: Thu, 12 Dec 2024 19:33:12 +0100 Subject: [PATCH 059/126] Update .changeset/tender-tigers-fry.md Co-authored-by: Chad Nehemiah --- .changeset/tender-tigers-fry.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.changeset/tender-tigers-fry.md b/.changeset/tender-tigers-fry.md index 972bc2da5e6..58e44650070 100644 --- a/.changeset/tender-tigers-fry.md +++ b/.changeset/tender-tigers-fry.md @@ -1,6 +1,8 @@ --- "@fuel-ts/abi": patch "fuels": patch +"@fuel-ts/errors" : patch +"fuels": patch --- feat: ABI parser From dcd468a24e7b3cd8b25b00af5adf933c0bb530ba Mon Sep 17 00:00:00 2001 From: nedsalk Date: Thu, 12 Dec 2024 19:37:03 +0100 Subject: [PATCH 060/126] fix changeset --- .changeset/tender-tigers-fry.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.changeset/tender-tigers-fry.md b/.changeset/tender-tigers-fry.md index 58e44650070..2e270bb05e9 100644 --- a/.changeset/tender-tigers-fry.md +++ b/.changeset/tender-tigers-fry.md @@ -1,8 +1,7 @@ --- "@fuel-ts/abi": patch "fuels": patch -"@fuel-ts/errors" : patch -"fuels": patch +"@fuel-ts/errors": patch --- feat: ABI parser From c9ffae1f59db438f696c1b2ad35a186fa68ccf7e Mon Sep 17 00:00:00 2001 From: nedsalk Date: Thu, 12 Dec 2024 22:25:57 +0100 Subject: [PATCH 061/126] add implicit generic edge case --- .../specifications/v1/resolvable-type.ts | 32 +- packages/fuel-gauge/src/abi/abi-parser.json | 467 ++++++++++++++---- .../fixtures/forc-projects/parser/src/main.sw | 10 +- 3 files changed, 387 insertions(+), 122 deletions(-) diff --git a/packages/abi/src/parser/specifications/v1/resolvable-type.ts b/packages/abi/src/parser/specifications/v1/resolvable-type.ts index a4b54db6b93..d48381363f9 100644 --- a/packages/abi/src/parser/specifications/v1/resolvable-type.ts +++ b/packages/abi/src/parser/specifications/v1/resolvable-type.ts @@ -303,17 +303,6 @@ export class ResolvableType { return resolvedType; } - /** - * If typeParamsArgsMap is undefined, - * this means that the underlying metadata type's components are already fully resolved, - * as it doesn't need any external typeArgs to substitute those components with. - */ - if (typeParamsArgsMap === undefined) { - resolvedType.components = this.components as ResolvedComponent[]; - resolvedType.typeParamsArgsMap = this.typeParamsArgsMap as [number, ResolvedType][]; - return resolvedType; - } - /** * Before resolving the components, * we need to substitute the type parameters of the underlying metadata type @@ -331,7 +320,8 @@ export class ResolvableType { /** * Here the component's type is a `ResolvableType`. - * If the component is a generic type parameter itself, its corresponding type argument will be found in the typeArgs, + * If the component is a generic type parameter itself, + * its corresponding type argument will be found in the typeArgs, * which will be used to substitute the component with. */ const resolvedGenericType = typeArgs?.find( @@ -349,13 +339,19 @@ export class ResolvableType { name, /** * The component is a `ResolvableType`, but it's not a generic type parameter itself. - * This means that one of its components (or component's components ad infinitum) is a generic type. + * This means that one of its components (or component's components) + * is a generic type. * We need to resolve that first before resolving the component. * - * Note that we are passing in the original `typeParamsArgsMap`, - * which will be used to substitute the component's generic type parameters with their type arguments. + * Note that we are passing in the original `typeParamsArgsMap` by default, + * which will be used to substitute the component's generic type parameters + * with the appropriate type arguments. + * + * The non-default case of passing `typeArgs` happens only for tuples/arrays + * which contain structs with implicit generics, + * e.g. `(bool, StructWithImplicitGenerics)` */ - type: type.resolveInternal(type.metadataTypeId, typeParamsArgsMap), + type: type.resolveInternal(type.metadataTypeId, typeParamsArgsMap ?? typeArgs), }; }); @@ -366,8 +362,8 @@ export class ResolvableType { } private resolveTypeArgs( - typeParamsArgsMap: Array<[number, ResolvedType]> - ): [number, ResolvedType][] { + typeParamsArgsMap: Array<[number, ResolvedType]> | undefined + ): [number, ResolvedType][] | undefined { /** * This case only happens when the metadata type is *implicitly* generic. * The type itself doesn't have any type parameters that should be resolved, diff --git a/packages/fuel-gauge/src/abi/abi-parser.json b/packages/fuel-gauge/src/abi/abi-parser.json index 22d76f765d8..adaea93393b 100644 --- a/packages/fuel-gauge/src/abi/abi-parser.json +++ b/packages/fuel-gauge/src/abi/abi-parser.json @@ -9,7 +9,7 @@ "type": { "swayType": "generic E", "metadata": { - "metadataTypeId": 2 + "metadataTypeId": 4 } } }, @@ -18,7 +18,7 @@ "type": { "swayType": "generic F", "metadata": { - "metadataTypeId": 3 + "metadataTypeId": 5 } } } @@ -26,6 +26,92 @@ }, { "metadataTypeId": 1, + "swayType": "(_, _)", + "components": [ + { + "name": "__tuple_element", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + }, + { + "name": "__tuple_element", + "type": { + "swayType": "struct StructWithImplicitGenerics", + "metadata": { + "metadataTypeId": 12, + "typeArguments": [ + { + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903", + "swayType": "bool" + }, + { + "concreteTypeId": 3, + "swayType": "b256", + "metadata": { + "metadataTypeId": 3 + } + } + ] + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "[_; 3]", + "metadata": { + "metadataTypeId": 2 + }, + "components": [ + { + "name": "__array_element", + "type": { + "swayType": "generic E", + "metadata": { + "metadataTypeId": 4 + } + } + } + ] + } + }, + { + "name": "b", + "type": { + "swayType": "(_, _)", + "metadata": { + "metadataTypeId": 0 + }, + "components": [ + { + "name": "__tuple_element", + "type": { + "swayType": "generic E", + "metadata": { + "metadataTypeId": 4 + } + } + }, + { + "name": "__tuple_element", + "type": { + "swayType": "generic F", + "metadata": { + "metadataTypeId": 5 + } + } + } + ] + } + } + ] + } + } + ] + }, + { + "metadataTypeId": 2, "swayType": "[_; 3]", "components": [ { @@ -33,30 +119,34 @@ "type": { "swayType": "generic E", "metadata": { - "metadataTypeId": 2 + "metadataTypeId": 4 } } } ] }, { - "metadataTypeId": 2, + "metadataTypeId": 3, + "swayType": "b256" + }, + { + "metadataTypeId": 4, "swayType": "generic E" }, { - "metadataTypeId": 3, + "metadataTypeId": 5, "swayType": "generic F" }, { - "metadataTypeId": 4, + "metadataTypeId": 6, "swayType": "generic T" }, { - "metadataTypeId": 5, + "metadataTypeId": 7, "swayType": "raw untyped ptr" }, { - "metadataTypeId": 6, + "metadataTypeId": 8, "swayType": "struct DoubleGeneric", "components": [ { @@ -64,7 +154,7 @@ "type": { "swayType": "generic T", "metadata": { - "metadataTypeId": 4 + "metadataTypeId": 6 } } }, @@ -73,24 +163,24 @@ "type": { "swayType": "generic F", "metadata": { - "metadataTypeId": 3 + "metadataTypeId": 5 } } } ], "typeParameters": [ { - "metadataTypeId": 4, + "metadataTypeId": 6, "swayType": "generic T" }, { - "metadataTypeId": 3, + "metadataTypeId": 5, "swayType": "generic F" } ] }, { - "metadataTypeId": 7, + "metadataTypeId": 9, "swayType": "struct GenericStruct", "components": [ { @@ -105,7 +195,7 @@ "type": { "swayType": "u32", "metadata": { - "metadataTypeId": 13 + "metadataTypeId": 15 } } }, @@ -114,20 +204,20 @@ "type": { "swayType": "generic T", "metadata": { - "metadataTypeId": 4 + "metadataTypeId": 6 } } } ], "typeParameters": [ { - "metadataTypeId": 4, + "metadataTypeId": 6, "swayType": "generic T" } ] }, { - "metadataTypeId": 8, + "metadataTypeId": 10, "swayType": "struct NestedGenericStruct", "components": [ { @@ -135,10 +225,10 @@ "type": { "swayType": "struct std::vec::Vec", "metadata": { - "metadataTypeId": 12, + "metadataTypeId": 14, "typeArguments": [ { - "metadataTypeId": 7, + "metadataTypeId": 9, "swayType": "struct GenericStruct", "components": [ { @@ -153,7 +243,7 @@ "type": { "swayType": "u32", "metadata": { - "metadataTypeId": 13 + "metadataTypeId": 15 } } }, @@ -162,14 +252,14 @@ "type": { "swayType": "generic E", "metadata": { - "metadataTypeId": 2 + "metadataTypeId": 4 } } } ], "typeParameters": [ { - "metadataTypeId": 2, + "metadataTypeId": 4, "swayType": "generic E" } ] @@ -182,10 +272,10 @@ "type": { "swayType": "struct GenericStruct", "metadata": { - "metadataTypeId": 7, + "metadataTypeId": 9, "typeArguments": [ { - "metadataTypeId": 2, + "metadataTypeId": 4, "swayType": "generic E" } ] @@ -203,7 +293,7 @@ "type": { "swayType": "u32", "metadata": { - "metadataTypeId": 13 + "metadataTypeId": 15 } } }, @@ -212,7 +302,7 @@ "type": { "swayType": "generic E", "metadata": { - "metadataTypeId": 2 + "metadataTypeId": 4 } } } @@ -227,13 +317,13 @@ "type": { "swayType": "struct std::vec::Vec", "metadata": { - "metadataTypeId": 12, + "metadataTypeId": 14, "typeArguments": [ { - "concreteTypeId": 7, + "concreteTypeId": 9, "swayType": "struct GenericStruct", "metadata": { - "metadataTypeId": 7, + "metadataTypeId": 9, "typeArguments": [ { "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef", @@ -254,7 +344,7 @@ "type": { "swayType": "u32", "metadata": { - "metadataTypeId": 13 + "metadataTypeId": 15 } } }, @@ -275,7 +365,7 @@ "type": { "swayType": "struct GenericStruct", "metadata": { - "metadataTypeId": 7, + "metadataTypeId": 9, "typeArguments": [ { "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef", @@ -296,7 +386,7 @@ "type": { "swayType": "u32", "metadata": { - "metadataTypeId": 13 + "metadataTypeId": 15 } } }, @@ -318,10 +408,10 @@ "type": { "swayType": "struct DoubleGeneric", "metadata": { - "metadataTypeId": 6, + "metadataTypeId": 8, "typeArguments": [ { - "metadataTypeId": 2, + "metadataTypeId": 4, "swayType": "generic E" }, { @@ -336,7 +426,7 @@ "type": { "swayType": "generic E", "metadata": { - "metadataTypeId": 2 + "metadataTypeId": 4 } } }, @@ -353,13 +443,13 @@ ], "typeParameters": [ { - "metadataTypeId": 2, + "metadataTypeId": 4, "swayType": "generic E" } ] }, { - "metadataTypeId": 9, + "metadataTypeId": 11, "swayType": "struct SimpleStruct", "components": [ { @@ -372,7 +462,7 @@ ] }, { - "metadataTypeId": 10, + "metadataTypeId": 12, "swayType": "struct StructWithImplicitGenerics", "components": [ { @@ -380,7 +470,7 @@ "type": { "swayType": "[_; 3]", "metadata": { - "metadataTypeId": 1 + "metadataTypeId": 2 }, "components": [ { @@ -388,7 +478,7 @@ "type": { "swayType": "generic E", "metadata": { - "metadataTypeId": 2 + "metadataTypeId": 4 } } } @@ -408,7 +498,7 @@ "type": { "swayType": "generic E", "metadata": { - "metadataTypeId": 2 + "metadataTypeId": 4 } } }, @@ -417,7 +507,7 @@ "type": { "swayType": "generic F", "metadata": { - "metadataTypeId": 3 + "metadataTypeId": 5 } } } @@ -427,17 +517,17 @@ ], "typeParameters": [ { - "metadataTypeId": 2, + "metadataTypeId": 4, "swayType": "generic E" }, { - "metadataTypeId": 3, + "metadataTypeId": 5, "swayType": "generic F" } ] }, { - "metadataTypeId": 12, + "metadataTypeId": 14, "swayType": "struct std::vec::Vec", "components": [ { @@ -445,28 +535,113 @@ "type": { "swayType": "generic T", "metadata": { - "metadataTypeId": 4 + "metadataTypeId": 6 } } } ], "typeParameters": [ { - "metadataTypeId": 4, + "metadataTypeId": 6, "swayType": "generic T" } ] }, { - "metadataTypeId": 13, + "metadataTypeId": 15, "swayType": "u32" }, { - "metadataTypeId": 14, + "metadataTypeId": 16, "swayType": "u64" } ], "concreteTypes": [ + { + "concreteTypeId": "9dc54ad1b685b6abf04fbcc93696e440452944466e2dfd64b5df956a13ad2027", + "swayType": "(_, _)", + "metadata": { + "metadataTypeId": 1 + }, + "components": [ + { + "name": "__tuple_element", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + }, + { + "name": "__tuple_element", + "type": { + "swayType": "struct StructWithImplicitGenerics", + "metadata": { + "metadataTypeId": 12, + "typeArguments": [ + { + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903", + "swayType": "bool" + }, + { + "concreteTypeId": 3, + "swayType": "b256", + "metadata": { + "metadataTypeId": 3 + } + } + ] + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "[_; 3]", + "metadata": { + "metadataTypeId": 2 + }, + "components": [ + { + "name": "__array_element", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + } + ] + } + }, + { + "name": "b", + "type": { + "swayType": "(_, _)", + "metadata": { + "metadataTypeId": 0 + }, + "components": [ + { + "name": "__tuple_element", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + }, + { + "name": "__tuple_element", + "type": { + "swayType": "b256", + "metadata": { + "metadataTypeId": 3 + } + } + } + ] + } + } + ] + } + } + ] + }, { "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903", "swayType": "bool" @@ -475,19 +650,19 @@ "concreteTypeId": "8fa64aacdb756049c3c90d3a5fa8d1a7ebedefc8dc2f347e67bb26ef4c7140a7", "swayType": "struct GenericStruct", "metadata": { - "metadataTypeId": 7, + "metadataTypeId": 9, "typeArguments": [ { "concreteTypeId": "688b6ed7fc2c45e135ea9a2ce11e3f5313a4c057ba5d616e3381937605ea81e4", "swayType": "struct std::vec::Vec", "metadata": { - "metadataTypeId": 12, + "metadataTypeId": 14, "typeArguments": [ { "concreteTypeId": "75f7f7a06026cab5d7a70984d1fde56001e83505e3a091ff9722b92d7f56d8be", "swayType": "struct SimpleStruct", "metadata": { - "metadataTypeId": 9 + "metadataTypeId": 11 }, "components": [ { @@ -508,7 +683,7 @@ "swayType": "struct SimpleStruct", "concreteTypeId": "75f7f7a06026cab5d7a70984d1fde56001e83505e3a091ff9722b92d7f56d8be", "metadata": { - "metadataTypeId": 9 + "metadataTypeId": 11 }, "components": [ { @@ -538,7 +713,7 @@ "type": { "swayType": "u32", "metadata": { - "metadataTypeId": 13 + "metadataTypeId": 15 } } }, @@ -548,13 +723,13 @@ "swayType": "struct std::vec::Vec", "concreteTypeId": "688b6ed7fc2c45e135ea9a2ce11e3f5313a4c057ba5d616e3381937605ea81e4", "metadata": { - "metadataTypeId": 12, + "metadataTypeId": 14, "typeArguments": [ { "concreteTypeId": "75f7f7a06026cab5d7a70984d1fde56001e83505e3a091ff9722b92d7f56d8be", "swayType": "struct SimpleStruct", "metadata": { - "metadataTypeId": 9 + "metadataTypeId": 11 }, "components": [ { @@ -575,7 +750,7 @@ "swayType": "struct SimpleStruct", "concreteTypeId": "75f7f7a06026cab5d7a70984d1fde56001e83505e3a091ff9722b92d7f56d8be", "metadata": { - "metadataTypeId": 9 + "metadataTypeId": 11 }, "components": [ { @@ -597,7 +772,7 @@ "concreteTypeId": "cc3087210794115a9b7e470ad5b5d554808a3a88aa003ae80bae7b0dc4505f50", "swayType": "struct NestedGenericStruct", "metadata": { - "metadataTypeId": 8, + "metadataTypeId": 10, "typeArguments": [ { "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b", @@ -611,13 +786,13 @@ "type": { "swayType": "struct std::vec::Vec", "metadata": { - "metadataTypeId": 12, + "metadataTypeId": 14, "typeArguments": [ { - "concreteTypeId": 7, + "concreteTypeId": 9, "swayType": "struct GenericStruct", "metadata": { - "metadataTypeId": 7, + "metadataTypeId": 9, "typeArguments": [ { "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b", @@ -638,7 +813,7 @@ "type": { "swayType": "u32", "metadata": { - "metadataTypeId": 13 + "metadataTypeId": 15 } } }, @@ -659,7 +834,7 @@ "type": { "swayType": "struct GenericStruct", "metadata": { - "metadataTypeId": 7, + "metadataTypeId": 9, "typeArguments": [ { "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b", @@ -680,7 +855,7 @@ "type": { "swayType": "u32", "metadata": { - "metadataTypeId": 13 + "metadataTypeId": 15 } } }, @@ -702,13 +877,13 @@ "type": { "swayType": "struct std::vec::Vec", "metadata": { - "metadataTypeId": 12, + "metadataTypeId": 14, "typeArguments": [ { - "concreteTypeId": 7, + "concreteTypeId": 9, "swayType": "struct GenericStruct", "metadata": { - "metadataTypeId": 7, + "metadataTypeId": 9, "typeArguments": [ { "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef", @@ -729,7 +904,7 @@ "type": { "swayType": "u32", "metadata": { - "metadataTypeId": 13 + "metadataTypeId": 15 } } }, @@ -750,7 +925,7 @@ "type": { "swayType": "struct GenericStruct", "metadata": { - "metadataTypeId": 7, + "metadataTypeId": 9, "typeArguments": [ { "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef", @@ -771,7 +946,7 @@ "type": { "swayType": "u32", "metadata": { - "metadataTypeId": 13 + "metadataTypeId": 15 } } }, @@ -793,7 +968,7 @@ "type": { "swayType": "struct DoubleGeneric", "metadata": { - "metadataTypeId": 6, + "metadataTypeId": 8, "typeArguments": [ { "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b", @@ -829,7 +1004,7 @@ "concreteTypeId": "75f7f7a06026cab5d7a70984d1fde56001e83505e3a091ff9722b92d7f56d8be", "swayType": "struct SimpleStruct", "metadata": { - "metadataTypeId": 9 + "metadataTypeId": 11 }, "components": [ { @@ -845,7 +1020,7 @@ "concreteTypeId": "426345c4ea93db9f08eeb9fe6047ef0273294bfb1140600a0660be9f2a08d750", "swayType": "struct StructWithImplicitGenerics", "metadata": { - "metadataTypeId": 10, + "metadataTypeId": 12, "typeArguments": [ { "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b", @@ -863,7 +1038,7 @@ "type": { "swayType": "[_; 3]", "metadata": { - "metadataTypeId": 1 + "metadataTypeId": 2 }, "components": [ { @@ -907,13 +1082,13 @@ "concreteTypeId": "688b6ed7fc2c45e135ea9a2ce11e3f5313a4c057ba5d616e3381937605ea81e4", "swayType": "struct std::vec::Vec", "metadata": { - "metadataTypeId": 12, + "metadataTypeId": 14, "typeArguments": [ { "concreteTypeId": "75f7f7a06026cab5d7a70984d1fde56001e83505e3a091ff9722b92d7f56d8be", "swayType": "struct SimpleStruct", "metadata": { - "metadataTypeId": 9 + "metadataTypeId": 11 }, "components": [ { @@ -934,7 +1109,7 @@ "swayType": "struct SimpleStruct", "concreteTypeId": "75f7f7a06026cab5d7a70984d1fde56001e83505e3a091ff9722b92d7f56d8be", "metadata": { - "metadataTypeId": 9 + "metadataTypeId": 11 }, "components": [ { @@ -974,19 +1149,19 @@ "concreteTypeId": "8fa64aacdb756049c3c90d3a5fa8d1a7ebedefc8dc2f347e67bb26ef4c7140a7", "swayType": "struct GenericStruct", "metadata": { - "metadataTypeId": 7, + "metadataTypeId": 9, "typeArguments": [ { "concreteTypeId": "688b6ed7fc2c45e135ea9a2ce11e3f5313a4c057ba5d616e3381937605ea81e4", "swayType": "struct std::vec::Vec", "metadata": { - "metadataTypeId": 12, + "metadataTypeId": 14, "typeArguments": [ { "concreteTypeId": "75f7f7a06026cab5d7a70984d1fde56001e83505e3a091ff9722b92d7f56d8be", "swayType": "struct SimpleStruct", "metadata": { - "metadataTypeId": 9 + "metadataTypeId": 11 }, "components": [ { @@ -1007,7 +1182,7 @@ "swayType": "struct SimpleStruct", "concreteTypeId": "75f7f7a06026cab5d7a70984d1fde56001e83505e3a091ff9722b92d7f56d8be", "metadata": { - "metadataTypeId": 9 + "metadataTypeId": 11 }, "components": [ { @@ -1037,7 +1212,7 @@ "type": { "swayType": "u32", "metadata": { - "metadataTypeId": 13 + "metadataTypeId": 15 } } }, @@ -1047,13 +1222,13 @@ "swayType": "struct std::vec::Vec", "concreteTypeId": "688b6ed7fc2c45e135ea9a2ce11e3f5313a4c057ba5d616e3381937605ea81e4", "metadata": { - "metadataTypeId": 12, + "metadataTypeId": 14, "typeArguments": [ { "concreteTypeId": "75f7f7a06026cab5d7a70984d1fde56001e83505e3a091ff9722b92d7f56d8be", "swayType": "struct SimpleStruct", "metadata": { - "metadataTypeId": 9 + "metadataTypeId": 11 }, "components": [ { @@ -1074,7 +1249,7 @@ "swayType": "struct SimpleStruct", "concreteTypeId": "75f7f7a06026cab5d7a70984d1fde56001e83505e3a091ff9722b92d7f56d8be", "metadata": { - "metadataTypeId": 9 + "metadataTypeId": 11 }, "components": [ { @@ -1099,7 +1274,7 @@ "concreteTypeId": "cc3087210794115a9b7e470ad5b5d554808a3a88aa003ae80bae7b0dc4505f50", "swayType": "struct NestedGenericStruct", "metadata": { - "metadataTypeId": 8, + "metadataTypeId": 10, "typeArguments": [ { "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b", @@ -1113,13 +1288,13 @@ "type": { "swayType": "struct std::vec::Vec", "metadata": { - "metadataTypeId": 12, + "metadataTypeId": 14, "typeArguments": [ { - "concreteTypeId": 7, + "concreteTypeId": 9, "swayType": "struct GenericStruct", "metadata": { - "metadataTypeId": 7, + "metadataTypeId": 9, "typeArguments": [ { "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b", @@ -1140,7 +1315,7 @@ "type": { "swayType": "u32", "metadata": { - "metadataTypeId": 13 + "metadataTypeId": 15 } } }, @@ -1161,7 +1336,7 @@ "type": { "swayType": "struct GenericStruct", "metadata": { - "metadataTypeId": 7, + "metadataTypeId": 9, "typeArguments": [ { "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b", @@ -1182,7 +1357,7 @@ "type": { "swayType": "u32", "metadata": { - "metadataTypeId": 13 + "metadataTypeId": 15 } } }, @@ -1204,13 +1379,13 @@ "type": { "swayType": "struct std::vec::Vec", "metadata": { - "metadataTypeId": 12, + "metadataTypeId": 14, "typeArguments": [ { - "concreteTypeId": 7, + "concreteTypeId": 9, "swayType": "struct GenericStruct", "metadata": { - "metadataTypeId": 7, + "metadataTypeId": 9, "typeArguments": [ { "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef", @@ -1231,7 +1406,7 @@ "type": { "swayType": "u32", "metadata": { - "metadataTypeId": 13 + "metadataTypeId": 15 } } }, @@ -1252,7 +1427,7 @@ "type": { "swayType": "struct GenericStruct", "metadata": { - "metadataTypeId": 7, + "metadataTypeId": 9, "typeArguments": [ { "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef", @@ -1273,7 +1448,7 @@ "type": { "swayType": "u32", "metadata": { - "metadataTypeId": 13 + "metadataTypeId": 15 } } }, @@ -1295,7 +1470,7 @@ "type": { "swayType": "struct DoubleGeneric", "metadata": { - "metadataTypeId": 6, + "metadataTypeId": 8, "typeArguments": [ { "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b", @@ -1343,7 +1518,7 @@ "concreteTypeId": "426345c4ea93db9f08eeb9fe6047ef0273294bfb1140600a0660be9f2a08d750", "swayType": "struct StructWithImplicitGenerics", "metadata": { - "metadataTypeId": 10, + "metadataTypeId": 12, "typeArguments": [ { "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b", @@ -1361,7 +1536,7 @@ "type": { "swayType": "[_; 3]", "metadata": { - "metadataTypeId": 1 + "metadataTypeId": 2 }, "components": [ { @@ -1401,6 +1576,94 @@ } ] } + }, + { + "name": "arg2", + "type": { + "concreteTypeId": "9dc54ad1b685b6abf04fbcc93696e440452944466e2dfd64b5df956a13ad2027", + "swayType": "(_, _)", + "metadata": { + "metadataTypeId": 1 + }, + "components": [ + { + "name": "__tuple_element", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + }, + { + "name": "__tuple_element", + "type": { + "swayType": "struct StructWithImplicitGenerics", + "metadata": { + "metadataTypeId": 12, + "typeArguments": [ + { + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903", + "swayType": "bool" + }, + { + "concreteTypeId": 3, + "swayType": "b256", + "metadata": { + "metadataTypeId": 3 + } + } + ] + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "[_; 3]", + "metadata": { + "metadataTypeId": 2 + }, + "components": [ + { + "name": "__array_element", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + } + ] + } + }, + { + "name": "b", + "type": { + "swayType": "(_, _)", + "metadata": { + "metadataTypeId": 0 + }, + "components": [ + { + "name": "__tuple_element", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + }, + { + "name": "__tuple_element", + "type": { + "swayType": "b256", + "metadata": { + "metadataTypeId": 3 + } + } + } + ] + } + } + ] + } + } + ] + } } ] } @@ -1433,7 +1696,7 @@ "configurables": [ { "name": "U8_VALUE", - "offset": 4368, + "offset": 4768, "type": { "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b", "swayType": "u8" diff --git a/packages/fuel-gauge/test/fixtures/forc-projects/parser/src/main.sw b/packages/fuel-gauge/test/fixtures/forc-projects/parser/src/main.sw index 1098335e5e7..7c178f20bd9 100644 --- a/packages/fuel-gauge/test/fixtures/forc-projects/parser/src/main.sw +++ b/packages/fuel-gauge/test/fixtures/forc-projects/parser/src/main.sw @@ -36,7 +36,10 @@ abi VoidContract { arg1: GenericStruct>, arg2: NestedGenericStruct, ) -> bool; - fn implicit_generic_struct(arg1: StructWithImplicitGenerics) -> bool; + fn implicit_generic_struct( + arg1: StructWithImplicitGenerics, + arg2: (bool, StructWithImplicitGenerics), + ) -> bool; } impl VoidContract for Contract { @@ -52,7 +55,10 @@ impl VoidContract for Contract { ); true } - fn implicit_generic_struct(arg1: StructWithImplicitGenerics) -> bool { + fn implicit_generic_struct( + arg1: StructWithImplicitGenerics, + arg2: (bool, StructWithImplicitGenerics), + ) -> bool { true } } From 1d84672c5b7850f56a42b3259b9b18bc9dd3cd6d Mon Sep 17 00:00:00 2001 From: nedsalk Date: Thu, 12 Dec 2024 23:20:08 +0100 Subject: [PATCH 062/126] feat: ABI Gen --- .changeset/poor-years-hang.md | 4 + packages/abi/package.json | 4 +- packages/abi/src/gen/abi-gen.ts | 32 +- packages/abi/src/gen/hbs.d.ts | 5 + packages/abi/src/gen/index.ts | 1 + packages/abi/src/gen/renderers/getRenderer.ts | 16 + packages/abi/src/gen/renderers/ts/README.md | 1 + .../abi/src/gen/renderers/ts/render-ts.ts | 17 + .../ts/renderers/get-parent-dir-wrapper.ts | 32 + .../ts/renderers/render-index-files.ts | 49 + .../renderers/ts/renderers/render-program.ts | 90 + .../renderers/ts/renderers/render-programs.ts | 35 + .../renderers/ts/renderers/render-types.ts | 136 + .../ts/renderers/template-renderer.ts | 29 + .../gen/renderers/ts/templates/bytecode.hbs | 5 + .../src/gen/renderers/ts/templates/common.hbs | 44 + .../ts/templates/contract-factory.hbs | 35 + .../gen/renderers/ts/templates/contract.hbs | 29 + .../src/gen/renderers/ts/templates/header.hbs | 9 + .../src/gen/renderers/ts/templates/index.hbs | 5 + .../gen/renderers/ts/templates/predicate.hbs | 27 + .../src/gen/renderers/ts/templates/script.hbs | 19 + .../src/gen/renderers/ts/templates/types.hbs | 29 + .../abi/src/gen/renderers/ts/typers/enums.ts | 68 + .../renderers/ts/typers/generate-ts-type.ts | 6 + .../src/gen/renderers/ts/typers/helpers.ts | 10 + .../src/gen/renderers/ts/typers/iterators.ts | 38 + .../abi/src/gen/renderers/ts/typers/simple.ts | 81 + .../abi/src/gen/renderers/ts/typers/struct.ts | 158 + .../gen/renderers/ts/typers/typer-matcher.ts | 54 + .../abi/src/gen/renderers/ts/typers/types.ts | 21 + packages/abi/src/gen/renderers/types.ts | 9 + packages/abi/tsup.config.ts | 10 +- packages/fuel-gauge/src/abi/abi-coder.test.ts | 26 +- packages/fuel-gauge/src/abi/abi-gen.test.ts | 61 +- .../fuel-gauge/src/abi/fixtures/common.txt | 53 + .../src/abi/fixtures/contract-abi.txt | 2797 +++++++++++ .../src/abi/fixtures/contract-bytecode.txt | 14 + .../src/abi/fixtures/contract-factory.txt | 44 + .../src/abi/fixtures/contract-index.txt | 13 + .../abi/fixtures/contract-storage-slots.txt | 1 + .../src/abi/fixtures/contract-types.txt | 373 ++ .../fuel-gauge/src/abi/fixtures/contract.txt | 38 + .../fuel-gauge/src/abi/fixtures/index.txt | 14 + .../src/abi/fixtures/predicate-abi.txt | 272 + .../src/abi/fixtures/predicate-index.txt | 12 + .../src/abi/fixtures/predicate-types.txt | 36 + .../fuel-gauge/src/abi/fixtures/predicate.txt | 36 + .../src/abi/fixtures/script-abi.txt | 272 + .../src/abi/fixtures/script-index.txt | 12 + .../src/abi/fixtures/script-types.txt | 36 + .../fuel-gauge/src/abi/fixtures/script.txt | 28 + .../fuel-gauge/src/contract-factory.test.ts | 6 +- .../fuel-gauge/src/coverage-contract.test.ts | 54 +- .../src/dry-run-multiple-txs.test.ts | 2 +- packages/fuel-gauge/src/min-gas.test.ts | 2 +- packages/fuel-gauge/src/options.test.ts | 4 +- .../src/reentrant-contract-calls.test.ts | 2 +- .../src/script-with-configurable.test.ts | 14 +- .../src/script-with-options.test.ts | 2 +- .../src/script-with-vectors.test.ts | 20 +- .../src/storage-test-contract.test.ts | 4 +- packages/fuel-gauge/src/str-slice.test.ts | 8 +- .../src/token-test-contract.test.ts | 2 +- .../src/transaction-summary.test.ts | 5 +- packages/fuel-gauge/src/vectors.test.ts | 29 +- packages/fuel-gauge/src/void.test.ts | 10 +- packages/fuels/package.json | 4 +- packages/fuels/src/cli-utils.ts | 1 + packages/fuels/src/cli.ts | 27 +- .../src/cli/commands/build/generateTypes.ts | 70 - .../src/cli/commands/build/index.test.ts | 2 +- .../fuels/src/cli/commands/build/index.ts | 4 +- .../fuels/src/cli/commands/deploy/index.ts | 6 +- .../fuels/src/cli/commands/typegen/index.ts | 66 + .../src/cli/commands/typegen/utils.test.ts | 14 + .../fuels/src/cli/commands/typegen/utils.ts | 63 + packages/fuels/src/cli/templates/index.hbs | 2 +- packages/fuels/src/cli/types.ts | 5 + packages/fuels/src/index.ts | 1 + pnpm-lock.yaml | 4406 ++++++----------- templates/nextjs/src/sway-api/common.ts | 53 + templates/vite/src/sway-api/common.ts | 53 + .../vite/test/integration/predicate.test.ts | 7 +- 84 files changed, 6982 insertions(+), 3212 deletions(-) create mode 100644 .changeset/poor-years-hang.md create mode 100644 packages/abi/src/gen/hbs.d.ts create mode 100644 packages/abi/src/gen/renderers/getRenderer.ts create mode 100644 packages/abi/src/gen/renderers/ts/README.md create mode 100644 packages/abi/src/gen/renderers/ts/render-ts.ts create mode 100644 packages/abi/src/gen/renderers/ts/renderers/get-parent-dir-wrapper.ts create mode 100644 packages/abi/src/gen/renderers/ts/renderers/render-index-files.ts create mode 100644 packages/abi/src/gen/renderers/ts/renderers/render-program.ts create mode 100644 packages/abi/src/gen/renderers/ts/renderers/render-programs.ts create mode 100644 packages/abi/src/gen/renderers/ts/renderers/render-types.ts create mode 100644 packages/abi/src/gen/renderers/ts/renderers/template-renderer.ts create mode 100644 packages/abi/src/gen/renderers/ts/templates/bytecode.hbs create mode 100644 packages/abi/src/gen/renderers/ts/templates/common.hbs create mode 100644 packages/abi/src/gen/renderers/ts/templates/contract-factory.hbs create mode 100644 packages/abi/src/gen/renderers/ts/templates/contract.hbs create mode 100644 packages/abi/src/gen/renderers/ts/templates/header.hbs create mode 100644 packages/abi/src/gen/renderers/ts/templates/index.hbs create mode 100644 packages/abi/src/gen/renderers/ts/templates/predicate.hbs create mode 100644 packages/abi/src/gen/renderers/ts/templates/script.hbs create mode 100644 packages/abi/src/gen/renderers/ts/templates/types.hbs create mode 100644 packages/abi/src/gen/renderers/ts/typers/enums.ts create mode 100644 packages/abi/src/gen/renderers/ts/typers/generate-ts-type.ts create mode 100644 packages/abi/src/gen/renderers/ts/typers/helpers.ts create mode 100644 packages/abi/src/gen/renderers/ts/typers/iterators.ts create mode 100644 packages/abi/src/gen/renderers/ts/typers/simple.ts create mode 100644 packages/abi/src/gen/renderers/ts/typers/struct.ts create mode 100644 packages/abi/src/gen/renderers/ts/typers/typer-matcher.ts create mode 100644 packages/abi/src/gen/renderers/ts/typers/types.ts create mode 100644 packages/abi/src/gen/renderers/types.ts create mode 100644 packages/fuel-gauge/src/abi/fixtures/common.txt create mode 100644 packages/fuel-gauge/src/abi/fixtures/contract-abi.txt create mode 100644 packages/fuel-gauge/src/abi/fixtures/contract-bytecode.txt create mode 100644 packages/fuel-gauge/src/abi/fixtures/contract-factory.txt create mode 100644 packages/fuel-gauge/src/abi/fixtures/contract-index.txt create mode 100644 packages/fuel-gauge/src/abi/fixtures/contract-storage-slots.txt create mode 100644 packages/fuel-gauge/src/abi/fixtures/contract-types.txt create mode 100644 packages/fuel-gauge/src/abi/fixtures/contract.txt create mode 100644 packages/fuel-gauge/src/abi/fixtures/index.txt create mode 100644 packages/fuel-gauge/src/abi/fixtures/predicate-abi.txt create mode 100644 packages/fuel-gauge/src/abi/fixtures/predicate-index.txt create mode 100644 packages/fuel-gauge/src/abi/fixtures/predicate-types.txt create mode 100644 packages/fuel-gauge/src/abi/fixtures/predicate.txt create mode 100644 packages/fuel-gauge/src/abi/fixtures/script-abi.txt create mode 100644 packages/fuel-gauge/src/abi/fixtures/script-index.txt create mode 100644 packages/fuel-gauge/src/abi/fixtures/script-types.txt create mode 100644 packages/fuel-gauge/src/abi/fixtures/script.txt delete mode 100644 packages/fuels/src/cli/commands/build/generateTypes.ts create mode 100644 packages/fuels/src/cli/commands/typegen/index.ts create mode 100644 packages/fuels/src/cli/commands/typegen/utils.test.ts create mode 100644 packages/fuels/src/cli/commands/typegen/utils.ts create mode 100644 templates/nextjs/src/sway-api/common.ts create mode 100644 templates/vite/src/sway-api/common.ts diff --git a/.changeset/poor-years-hang.md b/.changeset/poor-years-hang.md new file mode 100644 index 00000000000..8eca3b2a1a9 --- /dev/null +++ b/.changeset/poor-years-hang.md @@ -0,0 +1,4 @@ +--- +--- + +docs: migrate `guide/types` snippets diff --git a/packages/abi/package.json b/packages/abi/package.json index 0fd951ba435..409885f8c2b 100644 --- a/packages/abi/package.json +++ b/packages/abi/package.json @@ -26,8 +26,10 @@ "postbuild": "tsx ../../scripts/postbuild.ts" }, "dependencies": { + "@fuel-ts/utils": "workspace:*", "@fuel-ts/errors": "workspace:*", - "@fuel-ts/utils": "workspace:*" + "@fuel-ts/versions": "workspace:*", + "handlebars": "^4.7.8" }, "devDependencies": {} } diff --git a/packages/abi/src/gen/abi-gen.ts b/packages/abi/src/gen/abi-gen.ts index e0ad4905d2f..cce88032829 100644 --- a/packages/abi/src/gen/abi-gen.ts +++ b/packages/abi/src/gen/abi-gen.ts @@ -1 +1,31 @@ -export class AbiGen {} +import type { BinaryVersions } from '@fuel-ts/versions'; + +import type { Abi } from '../parser'; + +import { getRenderer } from './renderers/getRenderer'; + +export interface AbiGenInput { + programDetails: ProgramDetails[]; + versions: BinaryVersions; + mode?: 'ts'; +} + +export interface AbiGenResult { + filename: string; + content: string; +} + +export interface ProgramDetails { + name: string; + binCompressed: string; + abi: Abi; + abiContents: string; + storageSlots?: string; +} + +export class AbiGen { + public static generate({ programDetails, mode, versions }: AbiGenInput): AbiGenResult[] { + const render = getRenderer(mode); + return render(programDetails, versions); + } +} diff --git a/packages/abi/src/gen/hbs.d.ts b/packages/abi/src/gen/hbs.d.ts new file mode 100644 index 00000000000..cefe640967a --- /dev/null +++ b/packages/abi/src/gen/hbs.d.ts @@ -0,0 +1,5 @@ +// informs TS about Handlebar `.hbs` templates extension +declare module '*.hbs' { + const value: string; + export default value; +} diff --git a/packages/abi/src/gen/index.ts b/packages/abi/src/gen/index.ts index 11641ac45c6..68cc18ab955 100644 --- a/packages/abi/src/gen/index.ts +++ b/packages/abi/src/gen/index.ts @@ -1 +1,2 @@ export { AbiGen } from './abi-gen'; +export type { ProgramDetails } from './abi-gen'; diff --git a/packages/abi/src/gen/renderers/getRenderer.ts b/packages/abi/src/gen/renderers/getRenderer.ts new file mode 100644 index 00000000000..91a008ce0d4 --- /dev/null +++ b/packages/abi/src/gen/renderers/getRenderer.ts @@ -0,0 +1,16 @@ +import { assertUnreachable } from '@fuel-ts/utils'; + +import type { AbiGenInput } from '../abi-gen'; + +import { renderTs } from './ts/render-ts'; +import type { Renderer } from './types'; + +export function getRenderer(mode: AbiGenInput['mode']): Renderer { + switch (mode) { + case 'ts': + case undefined: + return renderTs; + default: + return assertUnreachable(mode); + } +} diff --git a/packages/abi/src/gen/renderers/ts/README.md b/packages/abi/src/gen/renderers/ts/README.md new file mode 100644 index 00000000000..b224b495b0f --- /dev/null +++ b/packages/abi/src/gen/renderers/ts/README.md @@ -0,0 +1 @@ +describe core concepts, find out where to put them diff --git a/packages/abi/src/gen/renderers/ts/render-ts.ts b/packages/abi/src/gen/renderers/ts/render-ts.ts new file mode 100644 index 00000000000..f959f45f30b --- /dev/null +++ b/packages/abi/src/gen/renderers/ts/render-ts.ts @@ -0,0 +1,17 @@ +import type { AbiGenResult, ProgramDetails } from '../../abi-gen'; +import type { Renderer } from '../types'; + +import { renderPrograms } from './renderers/render-programs'; +import { templateRenderer } from './renderers/template-renderer'; +import commonTemplate from './templates/common.hbs'; + +export const renderTs: Renderer = (details: ProgramDetails[], versions): AbiGenResult[] => { + const results = renderPrograms(details, versions); + + results.push({ + filename: 'common.ts', + content: templateRenderer({ template: commonTemplate, versions }), + }); + + return results; +}; diff --git a/packages/abi/src/gen/renderers/ts/renderers/get-parent-dir-wrapper.ts b/packages/abi/src/gen/renderers/ts/renderers/get-parent-dir-wrapper.ts new file mode 100644 index 00000000000..a8239ef814e --- /dev/null +++ b/packages/abi/src/gen/renderers/ts/renderers/get-parent-dir-wrapper.ts @@ -0,0 +1,32 @@ +import { assertUnreachable } from '@fuel-ts/utils'; + +import type { Abi } from '../../../../parser'; + +export function getParentDirWrapper(programType: Abi['programType']): { + parentDir: string; + withParentDir: (file: string) => string; + removeParentDir: (file: string) => string; +} { + let parentDir: string = ''; + switch (programType) { + case 'contract': + parentDir = 'contracts'; + break; + case 'predicate': + parentDir = 'predicates'; + break; + case 'script': + parentDir = 'scripts'; + break; + case 'library': + break; + default: + assertUnreachable(programType); + } + + return { + parentDir, + withParentDir: (file) => `${parentDir}/${file}`, + removeParentDir: (file) => file.split(`${parentDir}/`)[1], + }; +} diff --git a/packages/abi/src/gen/renderers/ts/renderers/render-index-files.ts b/packages/abi/src/gen/renderers/ts/renderers/render-index-files.ts new file mode 100644 index 00000000000..969acb63861 --- /dev/null +++ b/packages/abi/src/gen/renderers/ts/renderers/render-index-files.ts @@ -0,0 +1,49 @@ +import type { BinaryVersions } from '@fuel-ts/versions'; + +import type { Abi } from '../../../../parser'; +import type { AbiGenResult } from '../../../abi-gen'; +import indexTemplate from '../templates/index.hbs'; + +import { getParentDirWrapper } from './get-parent-dir-wrapper'; +import { templateRenderer } from './template-renderer'; + +export function renderIndexFiles( + indexContents: Map, + versions: BinaryVersions +): AbiGenResult[] { + const results: AbiGenResult[] = []; + + indexContents.forEach((files, programType) => { + const { withParentDir, removeParentDir } = getParentDirWrapper(programType); + + results.push({ + filename: withParentDir('index.ts'), + content: templateRenderer({ + versions, + template: indexTemplate, + data: { + paths: files.map( + (filename) => + // remove .ts extension + removeParentDir(filename).split('.')[0] + ), + }, + }), + }); + }); + + results.push({ + filename: 'index.ts', + content: templateRenderer({ + versions, + template: indexTemplate, + data: { + paths: [...indexContents.keys()] + .sort() + .map((programType) => getParentDirWrapper(programType).parentDir), + }, + }), + }); + + return results; +} diff --git a/packages/abi/src/gen/renderers/ts/renderers/render-program.ts b/packages/abi/src/gen/renderers/ts/renderers/render-program.ts new file mode 100644 index 00000000000..7a9ff163135 --- /dev/null +++ b/packages/abi/src/gen/renderers/ts/renderers/render-program.ts @@ -0,0 +1,90 @@ +import { assertUnreachable } from '@fuel-ts/utils'; +import type { BinaryVersions } from '@fuel-ts/versions'; + +import type { ProgramDetails } from '../../../abi-gen'; +import type { TsAbiGenResult } from '../../types'; +import bytecodeTemplate from '../templates/bytecode.hbs'; +import contractFactoryTemplate from '../templates/contract-factory.hbs'; +import contractTemplate from '../templates/contract.hbs'; +import predicateTemplate from '../templates/predicate.hbs'; +import scriptTemplate from '../templates/script.hbs'; + +import { getParentDirWrapper } from './get-parent-dir-wrapper'; +import { templateRenderer } from './template-renderer'; + +export function renderProgram( + { abi, binCompressed, name, abiContents, storageSlots }: ProgramDetails, + versions: BinaryVersions +): TsAbiGenResult[] { + const results: TsAbiGenResult[] = [ + { + filename: `${name}-abi.json`, + content: abiContents, + }, + { + filename: `${name}-bytecode.ts`, + content: templateRenderer({ template: bytecodeTemplate, versions, data: { binCompressed } }), + }, + ]; + + switch (abi.programType) { + case 'contract': + results.push( + { + filename: `${name}.ts`, + content: templateRenderer({ + template: contractTemplate, + versions, + data: { name }, + }), + exportInIndexFile: true, + }, + { + filename: `${name}Factory.ts`, + content: templateRenderer({ + template: contractFactoryTemplate, + versions, + data: { name }, + }), + exportInIndexFile: true, + }, + { + filename: `${name}-storage-slots.json`, + content: storageSlots as string, + } + ); + break; + case 'predicate': + results.push({ + filename: `${name}.ts`, + content: templateRenderer({ + template: predicateTemplate, + versions, + data: { name }, + }), + exportInIndexFile: true, + }); + break; + case 'script': + results.push({ + filename: `${name}.ts`, + content: templateRenderer({ + template: scriptTemplate, + versions, + data: { name }, + }), + exportInIndexFile: true, + }); + break; + case 'library': + // we do nothing for library + break; + default: + assertUnreachable(abi.programType); + break; + } + + const { withParentDir } = getParentDirWrapper(abi.programType); + + return results.map((r) => ({ ...r, filename: withParentDir(r.filename) })); +} diff --git a/packages/abi/src/gen/renderers/ts/renderers/render-programs.ts b/packages/abi/src/gen/renderers/ts/renderers/render-programs.ts new file mode 100644 index 00000000000..1f29d8b75e8 --- /dev/null +++ b/packages/abi/src/gen/renderers/ts/renderers/render-programs.ts @@ -0,0 +1,35 @@ +import type { BinaryVersions } from '@fuel-ts/versions'; + +import type { Abi } from '../../../..'; +import type { AbiGenResult, ProgramDetails } from '../../../abi-gen'; + +import { renderIndexFiles } from './render-index-files'; +import { renderProgram } from './render-program'; +import { renderTypes } from './render-types'; + +export function renderPrograms(details: ProgramDetails[], versions: BinaryVersions) { + const results: AbiGenResult[] = []; + const indexContents = new Map(); + + for (const d of details) { + const program = renderProgram(d, versions); + const types = renderTypes(d, versions); + const renderResults = [program, types].flat(); + + results.push(...renderResults); + + renderResults.forEach((r) => { + if (!r.exportInIndexFile) { + return; + } + + const contents = indexContents.get(d.abi.programType) ?? []; + contents.push(r.filename); + indexContents.set(d.abi.programType, contents); + }); + } + + results.push(...renderIndexFiles(indexContents, versions)); + + return results; +} diff --git a/packages/abi/src/gen/renderers/ts/renderers/render-types.ts b/packages/abi/src/gen/renderers/ts/renderers/render-types.ts new file mode 100644 index 00000000000..8578e97401a --- /dev/null +++ b/packages/abi/src/gen/renderers/ts/renderers/render-types.ts @@ -0,0 +1,136 @@ +import type { BinaryVersions } from '@fuel-ts/versions'; + +import { createMatcher, swayTypeMatchers } from '../../../../matchers/sway-type-matchers'; +import type { Abi, AbiFunctionInput } from '../../../../parser'; +import type { ProgramDetails } from '../../../abi-gen'; +import type { TsAbiGenResult } from '../../types'; +import typesTemplate from '../templates/types.hbs'; +import { generateTsType } from '../typers/generate-ts-type'; +import { flattenImports } from '../typers/helpers'; +import type { TyperReturn } from '../typers/types'; + +import { getParentDirWrapper } from './get-parent-dir-wrapper'; +import { templateRenderer } from './template-renderer'; + +const metadataTypeFilter = createMatcher({ + enum: true, + struct: true, + assetId: true, + string: false, + void: false, + bool: false, + u8: false, + u16: false, + u32: false, + u64: false, + u256: false, + b256: false, + generic: false, + stdString: false, + option: false, + result: false, + str: false, + b512: false, + bytes: false, + vector: false, + tuple: false, + array: false, + evmAddress: false, + rawUntypedPtr: false, + rawUntypedSlice: false, +}); + +function sortAlphabetically(a: TyperReturn, b: TyperReturn) { + if (a.input < b.input) { + return -1; + } + if (a.input > b.input) { + return 1; + } + return 0; +} + +function mergeTypeImports(mTypes: TyperReturn[], cTypesMap: Record) { + const cTypes = Object.values(cTypesMap); + + const imports = flattenImports(mTypes.concat(cTypes)); + + const fuelsTypeImports = [...new Set(imports.fuelsTypeImports)].sort().join(', '); + + const commonTypeImports = [...new Set(imports.commonTypeImports)].sort().join(', '); + + return { fuelsTypeImports, commonTypeImports }; +} + +function mapFunctions(abi: Abi, cTypes: Record) { + return abi.functions.map((fn) => { + let isMandatory = false; + const inputs = fn.inputs.reduceRight<(AbiFunctionInput & { isOptional: boolean })[]>( + (result, input) => { + const isTypeMandatory = + !swayTypeMatchers.void(input.type.swayType) && + !swayTypeMatchers.option(input.type.swayType); + + isMandatory = isMandatory || isTypeMandatory; + return [{ ...input, isOptional: !isMandatory }, ...result]; + }, + [] + ); + + return { + name: fn.name, + inputs: `[${inputs.map((i) => `${i.name}${i.isOptional ? '?' : ''}: ${cTypes[i.type.concreteTypeId].input}`).join(', ')}]`, + output: cTypes[fn.output.concreteTypeId].output, + }; + }); +} + +export function renderTypes( + { name, abi }: ProgramDetails, + versions: BinaryVersions +): TsAbiGenResult { + const mTypes = abi.metadataTypes + .filter(metadataTypeFilter) + .map((t) => generateTsType({ abiType: t })); + + const cTypes = abi.concreteTypes.reduce>((res, abiType) => { + res[abiType.concreteTypeId] = generateTsType({ abiType, asReference: true }); + return res; + }, {}); + + const functions = mapFunctions(abi, cTypes); + + const configurables = + abi.configurables.length > 0 + ? abi.configurables.map((c) => ({ + name: c.name, + input: cTypes[c.type.concreteTypeId].input, + })) + : undefined; + + const { fuelsTypeImports, commonTypeImports } = mergeTypeImports(mTypes, cTypes); + + const enums = mTypes.filter((t) => t.tsType === 'enum').sort(sortAlphabetically); + const types = mTypes.filter((t) => t.tsType === 'type').sort(sortAlphabetically); + + const content = templateRenderer({ + template: typesTemplate, + versions, + data: { + name, + fuelsTypeImports, + commonTypeImports, + enums, + types, + functions, + configurables, + }, + }); + + const { withParentDir } = getParentDirWrapper(abi.programType); + + return { + filename: withParentDir(`${name}Types.ts`), + content, + }; +} diff --git a/packages/abi/src/gen/renderers/ts/renderers/template-renderer.ts b/packages/abi/src/gen/renderers/ts/renderers/template-renderer.ts new file mode 100644 index 00000000000..f1a4ceaf7ea --- /dev/null +++ b/packages/abi/src/gen/renderers/ts/renderers/template-renderer.ts @@ -0,0 +1,29 @@ +import type { BinaryVersions } from '@fuel-ts/versions'; +import Handlebars from 'handlebars'; + +import headerTemplate from '../templates/header.hbs'; + +/* + Renders the given template w/ the given data, while injecting common + header for disabling lint rules and annotating Fuel component's versions. +*/ +export function templateRenderer(params: { + template: string; + data?: Record; + versions: BinaryVersions; +}) { + const { data, template, versions } = params; + + const options = { + strict: true, + noEscape: true, + }; + + const renderHeaderTemplate = Handlebars.compile(headerTemplate, options); + const renderTemplate = Handlebars.compile(template, options); + + return renderTemplate({ + header: renderHeaderTemplate(versions), + ...(data ?? {}), + }); +} diff --git a/packages/abi/src/gen/renderers/ts/templates/bytecode.hbs b/packages/abi/src/gen/renderers/ts/templates/bytecode.hbs new file mode 100644 index 00000000000..5d859be0dd2 --- /dev/null +++ b/packages/abi/src/gen/renderers/ts/templates/bytecode.hbs @@ -0,0 +1,5 @@ +{{header}} + +import { decompressBytecode } from "fuels"; + +export const bytecode = decompressBytecode("{{binCompressed}}"); \ No newline at end of file diff --git a/packages/abi/src/gen/renderers/ts/templates/common.hbs b/packages/abi/src/gen/renderers/ts/templates/common.hbs new file mode 100644 index 00000000000..c6bb8343a05 --- /dev/null +++ b/packages/abi/src/gen/renderers/ts/templates/common.hbs @@ -0,0 +1,44 @@ +{{header}} + +import type { FunctionFragment, InvokeFunction } from 'fuels'; + +/** + * Mimics Sway Enum. + * Requires one and only one Key-Value pair and raises error if more are provided. + */ +export type Enum = { + [K in keyof T]: Pick & { [P in Exclude]?: never }; +}[keyof T]; + +/** + * Mimics Sway Option type. + */ +export type Option = T | undefined; + +/** + * Mimics Sway Result enum type. + * Ok represents the success case, while Err represents the error case. + */ +export type Result = Enum<{ Ok: T; Err: E }>; + +/** + * Mimics Sway array type. For example, [u64; 10] is converted to ArrayOfLength. + */ +export type ArrayOfLength< + T, + Length extends number, + Arr extends unknown[] = [], +> = Arr['length'] extends Length ? Arr : ArrayOfLength; + +interface Types { + functions: Record; + configurables: Partial>; +} + +export type ProgramFunctionMapper = { + [K in keyof T]: InvokeFunction; +}; + +export type InterfaceFunctionMapper = { + [K in keyof T]: FunctionFragment; +}; \ No newline at end of file diff --git a/packages/abi/src/gen/renderers/ts/templates/contract-factory.hbs b/packages/abi/src/gen/renderers/ts/templates/contract-factory.hbs new file mode 100644 index 00000000000..607b594d671 --- /dev/null +++ b/packages/abi/src/gen/renderers/ts/templates/contract-factory.hbs @@ -0,0 +1,35 @@ +{{header}} + +import { Contract, ContractFactory } from 'fuels'; +import type { Account, Provider, DeployContractOptions, DeployContractResult, StorageSlot } from 'fuels'; +import { {{name}} } from './{{name}}'; +import { bytecode } from './{{name}}-bytecode'; +import abi from './{{name}}-abi.json'; +import storageSlots from './{{name}}-storage-slots.json'; + +export class {{name}}Factory extends ContractFactory { + + static readonly bytecode = bytecode; + static readonly storageSlots: StorageSlot[] = storageSlots; + + constructor(accountOrProvider: Account | Provider) { + super(bytecode, abi, accountOrProvider); + } + + override deploy( + deployOptions?: DeployContractOptions + ): Promise> { + return super.deploy({ + storageSlots: {{name}}Factory.storageSlots, + ...deployOptions, + }); + } + + static async deploy ( + wallet: Account, + options: DeployContractOptions = {} + ): Promise> { + const factory = new {{name}}Factory(wallet); + return factory.deploy(options); + } +} diff --git a/packages/abi/src/gen/renderers/ts/templates/contract.hbs b/packages/abi/src/gen/renderers/ts/templates/contract.hbs new file mode 100644 index 00000000000..6907ada417b --- /dev/null +++ b/packages/abi/src/gen/renderers/ts/templates/contract.hbs @@ -0,0 +1,29 @@ +{{header}} + +import { Contract, Interface } from "fuels"; +import type { AbstractAddress, Account, Provider } from 'fuels'; +import type { {{name}}Types } from './{{name}}Types'; +import type { InterfaceFunctionMapper, ProgramFunctionMapper } from '../common'; +import abi from './{{name}}-abi.json'; + +export class {{name}}Interface extends Interface { + declare functions: InterfaceFunctionMapper<{{name}}Types['functions']>; + + constructor() { + super(abi); + } +} + +export class {{name}} extends Contract { + declare interface: {{name}}Interface; + declare functions: ProgramFunctionMapper<{{name}}Types['functions']>; + + public static readonly abi = abi; + + constructor( + id: string | AbstractAddress, + accountOrProvider: Account | Provider, + ) { + super(id, abi, accountOrProvider); + } +} \ No newline at end of file diff --git a/packages/abi/src/gen/renderers/ts/templates/header.hbs b/packages/abi/src/gen/renderers/ts/templates/header.hbs new file mode 100644 index 00000000000..a8ec5578f8b --- /dev/null +++ b/packages/abi/src/gen/renderers/ts/templates/header.hbs @@ -0,0 +1,9 @@ +/* Autogenerated file. Do not edit manually. */ + +/* eslint-disable eslint-comments/no-unlimited-disable */ +/* eslint-disable */ + +/* + Fuels version: {{FUELS}} + Forc version: {{FORC}} +*/ diff --git a/packages/abi/src/gen/renderers/ts/templates/index.hbs b/packages/abi/src/gen/renderers/ts/templates/index.hbs new file mode 100644 index 00000000000..39825a6ebac --- /dev/null +++ b/packages/abi/src/gen/renderers/ts/templates/index.hbs @@ -0,0 +1,5 @@ +{{header}} + +{{#each paths}} +export * from './{{this}}'; +{{/each}} \ No newline at end of file diff --git a/packages/abi/src/gen/renderers/ts/templates/predicate.hbs b/packages/abi/src/gen/renderers/ts/templates/predicate.hbs new file mode 100644 index 00000000000..6ec23299af7 --- /dev/null +++ b/packages/abi/src/gen/renderers/ts/templates/predicate.hbs @@ -0,0 +1,27 @@ +{{header}} + +import { Predicate } from 'fuels'; +import type { PredicateParams } from 'fuels'; +import abi from './{{name}}-abi.json'; +import { bytecode } from './{{name}}-bytecode'; +import type { {{name}}Types } from './{{name}}Types'; + +export type {{name}}Parameters = Omit< + PredicateParams< + {{name}}Types['functions']['main']['inputs'], + {{name}}Types['configurables'] + >, + 'abi' | 'bytecode' +>; + +export class {{name}} extends Predicate< + {{name}}Types['functions']['main']['inputs'], + {{name}}Types['configurables'] +> { + public static readonly abi = abi; + public static readonly bytecode = bytecode; + + constructor(params: {{name}}Parameters) { + super({ abi, bytecode, ...params }); + } +} \ No newline at end of file diff --git a/packages/abi/src/gen/renderers/ts/templates/script.hbs b/packages/abi/src/gen/renderers/ts/templates/script.hbs new file mode 100644 index 00000000000..1a0aae30279 --- /dev/null +++ b/packages/abi/src/gen/renderers/ts/templates/script.hbs @@ -0,0 +1,19 @@ +{{header}} + +import { Script } from 'fuels'; +import type { Account } from 'fuels'; +import abi from './{{name}}-abi.json'; +import { bytecode } from './{{name}}-bytecode'; +import type { {{name}}Types } from './{{name}}Types'; + +export class {{name}} extends Script< + {{name}}Types['functions']['main']['inputs'], + {{name}}Types['functions']['main']['output'] +> { + public static readonly abi = abi; + public static readonly bytecode = bytecode; + + constructor(wallet: Account) { + super(bytecode, abi, wallet); + } +} \ No newline at end of file diff --git a/packages/abi/src/gen/renderers/ts/templates/types.hbs b/packages/abi/src/gen/renderers/ts/templates/types.hbs new file mode 100644 index 00000000000..134b9296b51 --- /dev/null +++ b/packages/abi/src/gen/renderers/ts/templates/types.hbs @@ -0,0 +1,29 @@ +{{header}} + +import type { {{fuelsTypeImports}} } from 'fuels'; +import type { {{commonTypeImports}} } from '../common'; + +{{#each enums}} +export enum {{input}}; +{{/each}} + +{{#each types}} +export type {{input}}; +export type {{output}}; +{{/each}} + +export interface {{name}}Types { + functions: { + {{#each functions}} + {{name}}: { + inputs: {{inputs}}; + output: {{output}}; + }; + {{/each}} + }; + configurables: {{#if configurables}}Partial<{ + {{#each configurables}} + {{name}}: {{input}}; + {{/each}} + }>{{else}}undefined{{/if}}; +} \ No newline at end of file diff --git a/packages/abi/src/gen/renderers/ts/typers/enums.ts b/packages/abi/src/gen/renderers/ts/typers/enums.ts new file mode 100644 index 00000000000..31e81835330 --- /dev/null +++ b/packages/abi/src/gen/renderers/ts/typers/enums.ts @@ -0,0 +1,68 @@ +import { swayTypeMatchers, ENUM_REGEX } from '../../../../matchers/sway-type-matchers'; + +import { structTyper } from './struct'; +import type { Typer, TyperAbiType } from './types'; + +function isNativeEnum(abiType: TyperAbiType) { + return abiType.components?.every((t) => swayTypeMatchers.void(t.type.swayType)) === true; +} + +export const enumTyper: Typer = (params, typer) => { + const { abiType } = params; + if (isNativeEnum(abiType)) { + const typeName = ENUM_REGEX.exec(abiType.swayType)?.[2] as string; + + if (params.asReference) { + return { input: typeName, output: typeName }; + } + + const enumFields = abiType.components?.map((c) => `${c.name} = '${c.name}'`).join(', '); + const input = `${typeName} { ${enumFields} }`; + return { + input, + output: input, + tsType: 'enum', + }; + } + + return structTyper(params, typer); +}; + +export const optionTyper: Typer = ({ abiType }, typer) => { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + const { type } = abiType.components![1]!; + const some = typer({ abiType: type, asReference: true }); + const input = `Option<${some.input}>`; + const output = `Option<${some.output}>`; + return { + input, + output, + commonTypeImports: ['Option'], + }; +}; + +export const resultTyper: Typer = ({ abiType }, typer) => { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + const [{ type: ok }, { type: err }] = abiType.components!; + const mappedOk = typer({ abiType: ok, asReference: true }); + const mappedErr = typer({ abiType: err, asReference: true }); + + const input = `Result<${mappedOk.input}, ${mappedErr.input}>`; + const output = `Result<${mappedOk.output}, ${mappedErr.output}>`; + + const fuelsTypeImports = [ + mappedOk.fuelsTypeImports ?? [], + mappedErr.fuelsTypeImports ?? [], + ].flat(); + const commonTypeImports = [ + mappedOk.commonTypeImports ?? [], + mappedErr.commonTypeImports ?? [], + ['Result'], + ].flat(); + return { + input, + output, + fuelsTypeImports, + commonTypeImports, + }; +}; diff --git a/packages/abi/src/gen/renderers/ts/typers/generate-ts-type.ts b/packages/abi/src/gen/renderers/ts/typers/generate-ts-type.ts new file mode 100644 index 00000000000..09ce1a1aa55 --- /dev/null +++ b/packages/abi/src/gen/renderers/ts/typers/generate-ts-type.ts @@ -0,0 +1,6 @@ +import { typerMatcher } from './typer-matcher'; +import type { TyperParams, TyperReturn } from './types'; + +export function generateTsType(params: TyperParams): TyperReturn { + return typerMatcher(params.abiType)(params, generateTsType); +} diff --git a/packages/abi/src/gen/renderers/ts/typers/helpers.ts b/packages/abi/src/gen/renderers/ts/typers/helpers.ts new file mode 100644 index 00000000000..892c6e1b62f --- /dev/null +++ b/packages/abi/src/gen/renderers/ts/typers/helpers.ts @@ -0,0 +1,10 @@ +import type { TyperReturn } from './types'; + +export function flattenImports(mapped: TyperReturn[]) { + const fuelsTypeImports = mapped.flatMap((m) => m.fuelsTypeImports).filter((x) => x !== undefined); + const commonTypeImports = mapped + .flatMap((m) => m.commonTypeImports) + .filter((x) => x !== undefined); + + return { fuelsTypeImports, commonTypeImports }; +} diff --git a/packages/abi/src/gen/renderers/ts/typers/iterators.ts b/packages/abi/src/gen/renderers/ts/typers/iterators.ts new file mode 100644 index 00000000000..2d906ab4da6 --- /dev/null +++ b/packages/abi/src/gen/renderers/ts/typers/iterators.ts @@ -0,0 +1,38 @@ +import { ARRAY_REGEX } from '../../../../matchers/sway-type-matchers'; + +import { mapComponents } from './struct'; +import type { Typer } from './types'; + +export const tupleTyper: Typer = ({ abiType }, typer) => + mapComponents({ parent: abiType, includeComponentNames: false, typer }); + +export const arrayTyper: Typer = ({ abiType }, typer) => { + const length = ARRAY_REGEX.exec(abiType.swayType)?.[2]; + + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + const { type } = abiType.components![0]!; + const mapped = typer({ abiType: type, asReference: true }); + + const input = `ArrayOfLength<${mapped.input}, ${length}>`; + const output = `ArrayOfLength<${mapped.output}, ${length}>`; + + return { + input, + output, + fuelsTypeImports: mapped.fuelsTypeImports, + commonTypeImports: ['ArrayOfLength', ...(mapped.commonTypeImports ?? [])], + }; +}; + +export const vectorTyper: Typer = ({ abiType }, typer) => { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + const { type } = abiType.components![0]!; + const mapped = typer({ abiType: type, asReference: true }); + const input = `${mapped.input}[]`; + const output = `${mapped.output}[]`; + return { + ...mapped, + input, + output, + }; +}; diff --git a/packages/abi/src/gen/renderers/ts/typers/simple.ts b/packages/abi/src/gen/renderers/ts/typers/simple.ts new file mode 100644 index 00000000000..8616d7a067c --- /dev/null +++ b/packages/abi/src/gen/renderers/ts/typers/simple.ts @@ -0,0 +1,81 @@ +import { GENERIC_REGEX } from '../../../../matchers/sway-type-matchers'; + +import type { TyperReturn, Typer } from './types'; + +const numberTyperReturn: TyperReturn = { + input: 'BigNumberish', + output: 'number', + fuelsTypeImports: ['BigNumberish'], +}; + +export const u8Typer: Typer = () => numberTyperReturn; +export const u16Typer = u8Typer; +export const u32Typer = u8Typer; + +const u64TyperReturn: TyperReturn = { + input: 'BigNumberish', + output: 'BN', + fuelsTypeImports: ['BigNumberish', 'BN'], +}; +export const u64Typer: Typer = () => u64TyperReturn; +export const u256Typer: Typer = u64Typer; + +const boolTyperReturn = { + input: 'boolean', + output: 'boolean', +}; +export const boolTyper: Typer = () => boolTyperReturn; + +const stringTyperReturn: TyperReturn = { + input: 'string', + output: 'string', +}; +export const stringTyper: Typer = () => stringTyperReturn; +export const b256Typer: Typer = stringTyper; +export const b512Typer: Typer = stringTyper; + +const evmAddressTyperReturn: TyperReturn = { + input: 'EvmAddress', + output: 'EvmAddress', + fuelsTypeImports: ['EvmAddress'], +}; +export const evmAddressTyper: Typer = () => evmAddressTyperReturn; + +const bytesTyperReturn: TyperReturn = { + input: 'Bytes', + output: 'Bytes', + fuelsTypeImports: ['Bytes'], +}; +export const bytesTyper: Typer = () => bytesTyperReturn; + +const strTyperReturn: TyperReturn = { + input: 'StrSlice', + output: 'StrSlice', + fuelsTypeImports: ['StrSlice'], +}; +export const strTyper: Typer = () => strTyperReturn; + +const rawSliceTyperReturn: TyperReturn = { + input: 'RawSlice', + output: 'RawSlice', + fuelsTypeImports: ['RawSlice'], +}; +export const rawSliceTyper = () => rawSliceTyperReturn; + +const stdStringTyperReturn: TyperReturn = { + input: 'StdString', + output: 'StdString', + fuelsTypeImports: ['StdString'], +}; +export const stdStringTyper: Typer = () => stdStringTyperReturn; + +const voidTyperReturn: TyperReturn = { input: 'undefined', output: 'void' }; +export const voidTyper: Typer = () => voidTyperReturn; + +export const genericTyper: Typer = ({ abiType }) => { + const typeName = GENERIC_REGEX.exec(abiType.swayType)?.[1] as string; + return { + input: typeName, + output: typeName, + }; +}; diff --git a/packages/abi/src/gen/renderers/ts/typers/struct.ts b/packages/abi/src/gen/renderers/ts/typers/struct.ts new file mode 100644 index 00000000000..c77659030c4 --- /dev/null +++ b/packages/abi/src/gen/renderers/ts/typers/struct.ts @@ -0,0 +1,158 @@ +import { assertUnreachable } from '@fuel-ts/utils'; + +import { ENUM_REGEX, STRUCT_REGEX, TUPLE_REGEX } from '../../../../matchers/sway-type-matchers'; +import type { AbiConcreteType, AbiTypeComponent, AbiMetadataType } from '../../../../parser'; + +import { flattenImports } from './helpers'; +import type { TyperReturn, Typer, GlobalTyper, TyperAbiType } from './types'; + +function wrapStructContent(text: string, wrap: '{}' | '[]' | 'Enum'): string { + switch (wrap) { + case '{}': + return `{ ${text} }`; + case '[]': + return `[${text}]`; + case 'Enum': { + const wrappedAsObj = wrapStructContent(text, '{}'); + return `Enum<${wrappedAsObj}>`; + } + default: + return assertUnreachable(wrap); + } +} + +function componentMapper( + c: AbiTypeComponent | { name: string; type: AbiConcreteType | AbiMetadataType }, + includeName: boolean, + generateTsType: GlobalTyper +): TyperReturn { + const mapped = generateTsType({ abiType: c.type, asReference: true }); + + if (!includeName) { + return mapped; + } + + return { + ...mapped, + input: `${c.name}: ${mapped.input}`, + output: `${c.name}: ${mapped.output}`, + }; +} + +export function mapComponents(params: { + parent: TyperAbiType; + includeComponentNames: boolean; + typer: GlobalTyper; +}) { + const { parent, includeComponentNames, typer } = params; + const components = parent.components; + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + const mapped = components!.map((c) => componentMapper(c, includeComponentNames, typer)); + + // eslint-disable-next-line no-nested-ternary + const wrap = ENUM_REGEX.test(parent.swayType) + ? 'Enum' + : TUPLE_REGEX.test(parent.swayType) + ? '[]' + : '{}'; + + const input = wrapStructContent(mapped.map((m) => m.input).join(', '), wrap); + const output = wrapStructContent(mapped.map((m) => m.output).join(', '), wrap); + + const { fuelsTypeImports, commonTypeImports } = flattenImports(mapped); + + if (wrap === 'Enum') { + commonTypeImports.push('Enum'); + } + + return { + input, + output, + fuelsTypeImports, + commonTypeImports, + }; +} + +function mapGenericTypeParameters( + typeArgs: + | AbiMetadataType['typeParameters'] + | NonNullable['typeArguments'], + typer: GlobalTyper +): TyperReturn { + if (!typeArgs) { + return { + input: '', + output: '', + }; + } + const mapped = typeArgs.map((ta) => typer({ abiType: ta, asReference: true })); + const { fuelsTypeImports, commonTypeImports } = flattenImports(mapped); + + const input = mapped.map((r) => r.input).join(', '); + const output = mapped.map((r) => r.output).join(', '); + return { + fuelsTypeImports, + commonTypeImports, + input: `<${input}>`, + output: `<${output}>`, + }; +} + +function getTypeNames(abiType: TyperAbiType) { + const typeName = + STRUCT_REGEX.exec(abiType.swayType)?.[2] ?? ENUM_REGEX.exec(abiType.swayType)?.[2]; + return { + inputName: `${typeName}Input`, + outputName: `${typeName}Output`, + }; +} + +function mapStructAsReference(abiType: TyperAbiType, typer: GlobalTyper): TyperReturn { + const { inputName, outputName } = getTypeNames(abiType); + + const typeArgs = mapGenericTypeParameters( + 'metadata' in abiType + ? abiType.metadata?.typeArguments + : (abiType as AbiMetadataType).typeParameters, + typer + ); + + return { + ...typeArgs, + input: `${inputName}${typeArgs.input}`, + output: `${outputName}${typeArgs.output}`, + }; +} + +export const structTyper: Typer = ({ abiType, asReference }, typer) => { + if ('metadata' in abiType || asReference) { + return mapStructAsReference(abiType, typer); + } + + const { inputName, outputName } = getTypeNames(abiType); + + const typeParameters = mapGenericTypeParameters( + (abiType as AbiMetadataType).typeParameters, + typer + ); + const content = mapComponents({ parent: abiType, includeComponentNames: true, typer }); + + const inputType = `${inputName}${typeParameters.input}`; + const outputType = `${outputName}${typeParameters.output}`; + + const input = `${inputType} = ${content.input}`; + let output = ''; + if (content.input === content.output) { + output = `${outputType} = ${inputType}`; + } else { + output = `${outputType} = ${content.output}`; + } + + return { + input, + output, + commonTypeImports: content.commonTypeImports, + fuelsTypeImports: content.fuelsTypeImports, + tsType: 'type', + }; +}; diff --git a/packages/abi/src/gen/renderers/ts/typers/typer-matcher.ts b/packages/abi/src/gen/renderers/ts/typers/typer-matcher.ts new file mode 100644 index 00000000000..e762062da9a --- /dev/null +++ b/packages/abi/src/gen/renderers/ts/typers/typer-matcher.ts @@ -0,0 +1,54 @@ +import { createMatcher } from '../../../../matchers/sway-type-matchers'; + +import { optionTyper, enumTyper, resultTyper } from './enums'; +import { tupleTyper, arrayTyper, vectorTyper } from './iterators'; +import { + boolTyper, + u8Typer, + u16Typer, + u32Typer, + u64Typer, + u256Typer, + b256Typer, + stringTyper, + evmAddressTyper, + genericTyper, + b512Typer, + bytesTyper, + rawSliceTyper, + stdStringTyper, + strTyper, + voidTyper, +} from './simple'; +import { structTyper } from './struct'; +import type { Typer } from './types'; + +export const typerMatcher = createMatcher({ + bool: boolTyper, + u8: u8Typer, + u16: u16Typer, + u32: u32Typer, + u64: u64Typer, + u256: u256Typer, + b256: b256Typer, + b512: b512Typer, + tuple: tupleTyper, + array: arrayTyper, + struct: structTyper, + generic: genericTyper, + string: stringTyper, + vector: vectorTyper, + option: optionTyper, + bytes: bytesTyper, + str: strTyper, + rawUntypedSlice: rawSliceTyper, + stdString: stdStringTyper, + enum: enumTyper, + result: resultTyper, + void: voidTyper, + assetId: structTyper, + evmAddress: evmAddressTyper, + rawUntypedPtr: () => { + throw new Error('not implemented'); + }, +}); diff --git a/packages/abi/src/gen/renderers/ts/typers/types.ts b/packages/abi/src/gen/renderers/ts/typers/types.ts new file mode 100644 index 00000000000..ccfd9fadc79 --- /dev/null +++ b/packages/abi/src/gen/renderers/ts/typers/types.ts @@ -0,0 +1,21 @@ +import type { AbiConcreteType, AbiTypeComponent, AbiMetadataType } from '../../../../parser'; + +export interface TyperReturn { + input: string; + output: string; + fuelsTypeImports?: string[]; + commonTypeImports?: string[]; + tsType?: 'enum' | 'type'; +} + +export type TyperAbiType = AbiConcreteType | AbiMetadataType | AbiTypeComponent['type']; + +export type TyperParams = { + abiType: TyperAbiType; + asReference?: boolean; +}; + +// TODO: Better naming? +export type GlobalTyper = (p: TyperParams) => TyperReturn; + +export type Typer = (params: TyperParams, typer: GlobalTyper) => TyperReturn; diff --git a/packages/abi/src/gen/renderers/types.ts b/packages/abi/src/gen/renderers/types.ts new file mode 100644 index 00000000000..ef53e98ecc6 --- /dev/null +++ b/packages/abi/src/gen/renderers/types.ts @@ -0,0 +1,9 @@ +import type { BinaryVersions } from '@fuel-ts/versions'; + +import type { AbiGenResult, ProgramDetails } from '../abi-gen'; + +export type Renderer = (details: ProgramDetails[], versions: BinaryVersions) => AbiGenResult[]; + +export type TsAbiGenResult = AbiGenResult & { + exportInIndexFile?: boolean; +}; diff --git a/packages/abi/tsup.config.ts b/packages/abi/tsup.config.ts index 4c7f2f0354f..8ff482a0339 100644 --- a/packages/abi/tsup.config.ts +++ b/packages/abi/tsup.config.ts @@ -1,3 +1,11 @@ import { index } from '@internal/tsup'; +import type { Options } from 'tsup'; -export default index; +const configs: Options = { + ...index, + loader: { + '.hbs': 'text', + }, +}; + +export default configs; diff --git a/packages/fuel-gauge/src/abi/abi-coder.test.ts b/packages/fuel-gauge/src/abi/abi-coder.test.ts index 5f7fe677b1a..08362679878 100644 --- a/packages/fuel-gauge/src/abi/abi-coder.test.ts +++ b/packages/fuel-gauge/src/abi/abi-coder.test.ts @@ -4,11 +4,7 @@ import { expectToThrowFuelError, launchTestNode } from 'fuels/test-utils'; import { AbiContractFactory } from '../../test/typegen'; import type { AbiContract } from '../../test/typegen'; -import { - EnumWithNativeInput, - EnumWithNativeOutput, - ExternalEnumInput, -} from '../../test/typegen/contracts/AbiContract'; +import { EnumWithNative, ExternalEnum } from '../../test/typegen/contracts/AbiContractTypes'; import type { EnumWithBuiltinTypeInput, EnumWithBuiltinTypeOutput, @@ -32,7 +28,7 @@ import type { StructWithEnumArrayOutput, StructWithSingleOptionOutput, StructWithSingleOptionInput, -} from '../../test/typegen/contracts/AbiContract'; +} from '../../test/typegen/contracts/AbiContractTypes'; import type { Option, Result, Vec } from '../../test/typegen/contracts/common'; import { @@ -1091,14 +1087,10 @@ describe('AbiCoder', () => { describe('types_struct_with_array_of_enums', () => { it.todo('should encode/decode just fine', async () => { const input: StructWithEnumArrayInput = { - a: [EnumWithNativeInput.Checked, EnumWithNativeInput.Checked, EnumWithNativeInput.Checked], + a: [EnumWithNative.Checked, EnumWithNative.Checked, EnumWithNative.Checked], }; const expected: StructWithEnumArrayOutput = { - a: [ - EnumWithNativeOutput.Pending, - EnumWithNativeOutput.Pending, - EnumWithNativeOutput.Pending, - ], + a: [EnumWithNative.Pending, EnumWithNative.Pending, EnumWithNative.Pending], }; const { waitForResult } = await contract.functions @@ -1470,8 +1462,8 @@ describe('AbiCoder', () => { */ describe('types_enum', () => { it('should encode/decode just fine', async () => { - const input = EnumWithNativeInput.Checked; - const expected = EnumWithNativeInput.Pending; + const input = EnumWithNative.Checked; + const expected = EnumWithNative.Pending; const { waitForResult } = await contract.functions.types_enum(input).call(); @@ -1579,8 +1571,8 @@ describe('AbiCoder', () => { describe('types_enum_external', () => { it('should encode/decode just fine', async () => { - const input = ExternalEnumInput.A; - const expected = ExternalEnumInput.B; + const input = ExternalEnum.A; + const expected = ExternalEnum.B; const { waitForResult } = await contract.functions.types_enum_external(input).call(); @@ -1607,7 +1599,7 @@ describe('AbiCoder', () => { describe('types_enum_with_structs', () => { it('should encode/decode just fine', async () => { - const input = { a: EnumWithNativeInput.Checked }; + const input = { a: EnumWithNative.Checked }; const expected = { b: { a: true, b: 10 } }; const { waitForResult } = await contract.functions.types_enum_with_structs(input).call(); diff --git a/packages/fuel-gauge/src/abi/abi-gen.test.ts b/packages/fuel-gauge/src/abi/abi-gen.test.ts index e3a2b44922a..48b7776f132 100644 --- a/packages/fuel-gauge/src/abi/abi-gen.test.ts +++ b/packages/fuel-gauge/src/abi/abi-gen.test.ts @@ -1,4 +1,7 @@ -import { log } from 'console'; +import { readFileSync } from 'fs'; +import { AbiGen } from 'fuels'; +import { getProgramDetails } from 'fuels/cli-utils'; +import { join } from 'path'; import { AbiProjectsEnum, getAbiForcProject } from './utils'; @@ -6,18 +9,52 @@ import { AbiProjectsEnum, getAbiForcProject } from './utils'; * @group node */ describe('AbiGen', () => { - test('contract', () => { - const { abiContents } = getAbiForcProject(AbiProjectsEnum.ABI_CONTRACT); - log(abiContents); - }); + test('AbiGen generates all files correctly', () => { + const fixtureResultMap = new Map([ + ['index', 'index.ts'], + ['common', 'common.ts'], - test('script', () => { - const { abiContents } = getAbiForcProject(AbiProjectsEnum.ABI_SCRIPT); - log(abiContents); - }); + ['contract-index', 'contracts/index.ts'], + ['contract', 'contracts/AbiContract.ts'], + ['contract-types', 'contracts/AbiContractTypes.ts'], + ['contract-factory', 'contracts/AbiContractFactory.ts'], + ['contract-bytecode', 'contracts/AbiContract-bytecode.ts'], + ['contract-abi', 'contracts/AbiContract-abi.json'], + ['contract-storage-slots', 'contracts/AbiContract-storage-slots.json'], + + ['predicate-index', 'predicates/index.ts'], + ['predicate', 'predicates/AbiPredicate.ts'], + ['predicate-types', 'predicates/AbiPredicateTypes.ts'], + ['predicate-abi', 'predicates/AbiPredicate-abi.json'], + + ['script-index', 'scripts/index.ts'], + ['script', 'scripts/AbiScript.ts'], + ['script-types', 'scripts/AbiScriptTypes.ts'], + ['script-abi', 'scripts/AbiScript-abi.json'], + ]); + + const { buildDir: contractDir } = getAbiForcProject(AbiProjectsEnum.ABI_CONTRACT); + const { buildDir: predicateDir } = getAbiForcProject(AbiProjectsEnum.ABI_PREDICATE); + const { buildDir: scriptDir } = getAbiForcProject(AbiProjectsEnum.ABI_SCRIPT); + + const programDetails = getProgramDetails([contractDir, predicateDir, scriptDir]); + const results = AbiGen.generate({ + programDetails, + versions: { FUELS: '0.94.8', FORC: '0.64.0' }, + }); + + fixtureResultMap.forEach((filename, fixture) => { + const fixtureFile = join( + process.cwd(), + `packages/fuel-gauge/src/abi/fixtures/${fixture}.txt` + ); + const fixtureContent = readFileSync(fixtureFile).toString(); + + const result = results.find((r) => r.filename === filename); + expect(result?.content).toEqual(fixtureContent); - test('predicate', () => { - const { abiContents } = getAbiForcProject(AbiProjectsEnum.ABI_PREDICATE); - log(abiContents); + // verify only one file generated + expect(results.filter((r) => r.filename === filename)).toHaveLength(1); + }); }); }); diff --git a/packages/fuel-gauge/src/abi/fixtures/common.txt b/packages/fuel-gauge/src/abi/fixtures/common.txt new file mode 100644 index 00000000000..d381d056e30 --- /dev/null +++ b/packages/fuel-gauge/src/abi/fixtures/common.txt @@ -0,0 +1,53 @@ +/* Autogenerated file. Do not edit manually. */ + +/* eslint-disable eslint-comments/no-unlimited-disable */ +/* eslint-disable */ + +/* + Fuels version: 0.94.8 + Forc version: 0.64.0 +*/ + + +import type { FunctionFragment, InvokeFunction } from 'fuels'; + +/** + * Mimics Sway Enum. + * Requires one and only one Key-Value pair and raises error if more are provided. + */ +export type Enum = { + [K in keyof T]: Pick & { [P in Exclude]?: never }; +}[keyof T]; + +/** + * Mimics Sway Option type. + */ +export type Option = T | undefined; + +/** + * Mimics Sway Result enum type. + * Ok represents the success case, while Err represents the error case. + */ +export type Result = Enum<{ Ok: T; Err: E }>; + +/** + * Mimics Sway array type. For example, [u64; 10] is converted to ArrayOfLength. + */ +export type ArrayOfLength< + T, + Length extends number, + Arr extends unknown[] = [], +> = Arr['length'] extends Length ? Arr : ArrayOfLength; + +interface Types { + functions: Record; + configurables: Partial>; +} + +export type ProgramFunctionMapper = { + [K in keyof T]: InvokeFunction; +}; + +export type InterfaceFunctionMapper = { + [K in keyof T]: FunctionFragment; +}; \ No newline at end of file diff --git a/packages/fuel-gauge/src/abi/fixtures/contract-abi.txt b/packages/fuel-gauge/src/abi/fixtures/contract-abi.txt new file mode 100644 index 00000000000..18067c5ae43 --- /dev/null +++ b/packages/fuel-gauge/src/abi/fixtures/contract-abi.txt @@ -0,0 +1,2797 @@ +{ + "programType": "contract", + "specVersion": "1", + "encodingVersion": "1", + "concreteTypes": [ + { + "type": "()", + "concreteTypeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d" + }, + { + "type": "(b256, bool)", + "concreteTypeId": "d5f6ab61fc224aae1bf15a89ab88840ed54e312a76a9735d1f60d4d0d1fae640", + "metadataTypeId": 0 + }, + { + "type": "(bool, u64)", + "concreteTypeId": "c998ca9a5f221fe7b5c66ae70c8a9562b86d964408b00d17f883c906bc1fe4be", + "metadataTypeId": 8 + }, + { + "type": "(str[5], bool)", + "concreteTypeId": "a1e229302ed2f092752a6bc4fbe66bb9305e0802b1b01ecc5e1d59356702e956", + "metadataTypeId": 1 + }, + { + "type": "(str[5], str[5])", + "concreteTypeId": "30022fd7ad3fda4035d30e4d86b705d4870924d4b4fe054624d2561fa12bb33e", + "metadataTypeId": 2 + }, + { + "type": "(struct data_structures::StructDoubleGeneric<[b256; 3],u8>, [struct data_structures::StructDoubleGeneric; 4], (str[5], bool), struct data_structures::StructSimple)", + "concreteTypeId": "343f07ddcd75b9385bc193e0419f2e89c75fad67cbf4ad1b36a01a136620817e", + "metadataTypeId": 13 + }, + { + "type": "(struct data_structures::StructSimple, struct std::vec::Vec)", + "concreteTypeId": "5ebb7c8cdd38d1f676f9c7089a2da12b27114ee3771c2047f3295d4d30f8fd2c", + "metadataTypeId": 3 + }, + { + "type": "(struct std::asset_id::AssetId, struct std::asset_id::AssetId, bool)", + "concreteTypeId": "a95e1fcceb1451b8a76471f593f66c4a52ca04bde3c227c746ad7aaf988de5c6", + "metadataTypeId": 10 + }, + { + "type": "(struct std::vec::Vec, b256)", + "concreteTypeId": "52e2726988c7da304606fbe4ed696efac04beb29e9a22e15778f8a0539c9cb94", + "metadataTypeId": 5 + }, + { + "type": "(struct std::vec::Vec, struct std::vec::Vec)", + "concreteTypeId": "87a4626758542d7b6a03099839e440a052a4d5a00e3abfdf22bcc564ca19a4fd", + "metadataTypeId": 6 + }, + { + "type": "(u32, struct std::vec::Vec, struct std::vec::Vec)", + "concreteTypeId": "18034e13b18b71de3c7e12f8f10a7bd48a23870e0dbb46eaf10faeb26d70f000", + "metadataTypeId": 9 + }, + { + "type": "(u64, struct data_structures::StructSimple)", + "concreteTypeId": "0088c28967dbcdaa34626c7e915e44b2afe72f12415f0e31edc0b5ce70e7c6dc", + "metadataTypeId": 4 + }, + { + "type": "(u8, struct data_structures::StructSingleGeneric>, str[3])", + "concreteTypeId": "6f875be99a39d9920569678a34ffce676a6c3e14b958910db250b9cb4957157f", + "metadataTypeId": 11 + }, + { + "type": "(u8, u8, u8)", + "concreteTypeId": "79239b6d6f2383e2cfbaf4da7fdf7ee7fb59b7bf517acfff2d9433e9e76e8fc4", + "metadataTypeId": 12 + }, + { + "type": "[b256; 3]", + "concreteTypeId": "81342782c917fcfd178741cb2b3a12ea1ebeaa57253fc4ee6700b4d7d6ab32d3", + "metadataTypeId": 17 + }, + { + "type": "[struct data_structures::StructDoubleGeneric,str[1]>; 2]", + "concreteTypeId": "b8164e36cce9d14142824b5cc55aebc1272036775b966af82c49c78aff114006", + "metadataTypeId": 15 + }, + { + "type": "[struct data_structures::StructDoubleGeneric; 4]", + "concreteTypeId": "b22807669faa58263e636f6e2d194df8ddbc6686bb4ea14ee28005fa30adbe85", + "metadataTypeId": 22 + }, + { + "type": "[struct data_structures::StructSimple; 3]", + "concreteTypeId": "38f2594527b516dab2c81b31356901226242d7c32554877e36797c6b23969237", + "metadataTypeId": 18 + }, + { + "type": "[struct std::vec::Vec; 1]", + "concreteTypeId": "593b39347cc381516d8ed1f8e5e628a8d455bd3f833bd9dfdd5165ba16f9f980", + "metadataTypeId": 14 + }, + { + "type": "[u8; 4]", + "concreteTypeId": "f28afa065fc5de602456160c4155d4de7d9a61e85a995d209a14eab0b34bd6b4", + "metadataTypeId": 23 + }, + { + "type": "b256", + "concreteTypeId": "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b" + }, + { + "type": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + }, + { + "type": "enum abi-library::ExternalEnum", + "concreteTypeId": "9a24373d8ce7688609717fd5a9b75360cd8a6bdb224ae095f0c05cc891cadd42", + "metadataTypeId": 25 + }, + { + "type": "enum data_structures::EnumDoubleGeneric", + "concreteTypeId": "d0ed93cd57cc3dfb1c119b22bf63f5d215122402536127bf17087ca6d8186307", + "metadataTypeId": 26, + "typeArguments": [ + "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b", + "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef" + ] + }, + { + "type": "enum data_structures::EnumWithBuiltinType", + "concreteTypeId": "2136f16aedeec1ab7f1d912c57cc0566e86c36f20a2cb313e3d679cead6a0e61", + "metadataTypeId": 27 + }, + { + "type": "enum data_structures::EnumWithNative", + "concreteTypeId": "58ae0e9c51da476db1149dd48b1cda83a12187df4c049f8df5021f0b1696fb93", + "metadataTypeId": 28 + }, + { + "type": "enum data_structures::EnumWithStructs", + "concreteTypeId": "9ed6dede3ae1e66e0f951e860e863f77fb9b9499f4666a1123bf244c4a201669", + "metadataTypeId": 29 + }, + { + "type": "enum data_structures::EnumWithVector", + "concreteTypeId": "0272d5aecccd33822994b7be1494b72ec9ad860e4cb51f043deda7ac1e2cae26", + "metadataTypeId": 30 + }, + { + "type": "enum std::identity::Identity", + "concreteTypeId": "ab7cd04e05be58e3fc15d424c2c4a57f824a2a2d97d67252440a3925ebdc1335", + "metadataTypeId": 31 + }, + { + "type": "enum std::option::Option", + "concreteTypeId": "25616ce23be3ca41fd26f8c546c053ec256f8fb5593036f60c9c417e86dcc92e", + "metadataTypeId": 32, + "typeArguments": [ + "ef937135956e37401e0bc90406ca8becda92d1b4e387fe938ddef8d27ee192a1" + ] + }, + { + "type": "enum std::option::Option", + "concreteTypeId": "2da102c46c7263beeed95818cd7bee801716ba8303dddafdcd0f6c9efda4a0f1", + "metadataTypeId": 32, + "typeArguments": [ + "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + ] + }, + { + "type": "enum std::result::Result", + "concreteTypeId": "9891b1ee451eed790368ea3969e3c8f550efa87de489b5d7b933e2290800791b", + "metadataTypeId": 33, + "typeArguments": [ + "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0", + "338a25cb65b9251663dcce6362b744fe10aa849758299590f4efed5dd299bf50" + ] + }, + { + "type": "enum std::result::Result", + "concreteTypeId": "b3131b4c08c16cfa55b3150d587c3afa3e4cdebe0399f3f599fa160baaa64e0c", + "metadataTypeId": 33, + "typeArguments": [ + "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0", + "d7649d428b9ff33d188ecbf38a7e4d8fd167fa01b2e10fe9a8f9308e52f1d7cc" + ] + }, + { + "type": "raw untyped slice", + "concreteTypeId": "1e1c7c52c1c7a9901681337f8669555f62aac58911332c9ff6b4ea8e73786570" + }, + { + "type": "str", + "concreteTypeId": "8c25cb3686462e9a86d2883c5688a22fe738b0bbc85f458d2d2b5f3f667c6d5a" + }, + { + "type": "str[10]", + "concreteTypeId": "338a25cb65b9251663dcce6362b744fe10aa849758299590f4efed5dd299bf50" + }, + { + "type": "str[5]", + "concreteTypeId": "84877f6e98274b9e4721db68b4c0bdb9e52b8e9572c5bd7811c07a41ced882c7" + }, + { + "type": "struct abi-library::ExternalStruct", + "concreteTypeId": "c3a770db33c4e755ad3ba4586b9c10520511fb80b767feb57dd41da1a88f6978", + "metadataTypeId": 45 + }, + { + "type": "struct data_structures::Configurables", + "concreteTypeId": "69d4f1cc5ce793681d98a55ab013f42ab56260131d39af6c1e71a5f3531557bc", + "metadataTypeId": 46 + }, + { + "type": "struct data_structures::StructA", + "concreteTypeId": "db8b04f624965fbfd7eb7dc3fc3c6a54a71d0019b37d4011a9350d1870136c9d", + "metadataTypeId": 47 + }, + { + "type": "struct data_structures::StructB", + "concreteTypeId": "9f074fde9cb9194b90bd208c8c95e709bfb1a5c736b063302e5639ce4daad5aa", + "metadataTypeId": 48 + }, + { + "type": "struct data_structures::StructC", + "concreteTypeId": "f219acbc9e3b812457419966b5454d10d51594afecacb87fb7745c9311b90012", + "metadataTypeId": 49 + }, + { + "type": "struct data_structures::StructD>>", + "concreteTypeId": "d0494e36b8daeafdf02dfbd1f65f82c66df872fb235c7fd2707fcd4147c6c292", + "metadataTypeId": 50, + "typeArguments": [ + "d7649d428b9ff33d188ecbf38a7e4d8fd167fa01b2e10fe9a8f9308e52f1d7cc", + "d7649d428b9ff33d188ecbf38a7e4d8fd167fa01b2e10fe9a8f9308e52f1d7cc", + "722eb56989dc44c372c470eb3a6ddb2f91e3924c1c4a0806d21e414046599d35" + ] + }, + { + "type": "struct data_structures::StructDoubleGeneric<[b256; 3],u8>", + "concreteTypeId": "7bdc2c1e9c4b8576fdf5be24c5c6569cba3a8feaba3755ed2b95d646a33c73e2", + "metadataTypeId": 51, + "typeArguments": [ + "81342782c917fcfd178741cb2b3a12ea1ebeaa57253fc4ee6700b4d7d6ab32d3", + "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + ] + }, + { + "type": "struct data_structures::StructDoubleGeneric,u32>", + "concreteTypeId": "08dbec793087c5686c1a493513b158a999bb653126ee51151dfa85fa683edce5", + "metadataTypeId": 51, + "typeArguments": [ + "4946973fc1adce1f6b23e80f9fad29b44e6a4ab25f2b45f3fab95114cfcd33a0", + "d7649d428b9ff33d188ecbf38a7e4d8fd167fa01b2e10fe9a8f9308e52f1d7cc" + ] + }, + { + "type": "struct data_structures::StructDoubleGeneric", + "concreteTypeId": "4946973fc1adce1f6b23e80f9fad29b44e6a4ab25f2b45f3fab95114cfcd33a0", + "metadataTypeId": 51, + "typeArguments": [ + "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b", + "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef" + ] + }, + { + "type": "struct data_structures::StructF>", + "concreteTypeId": "722eb56989dc44c372c470eb3a6ddb2f91e3924c1c4a0806d21e414046599d35", + "metadataTypeId": 53, + "typeArguments": [ + "49f761c61dce644e212b8182e30557d35b6b4ad46693140be677eee0d6ef2733" + ] + }, + { + "type": "struct data_structures::StructG", + "concreteTypeId": "dfd8875bb49716b14dd336285ba667f953ed9aec4e918c0d7a2eb19ff644d60e", + "metadataTypeId": 54 + }, + { + "type": "struct data_structures::StructGenericWithEnum", + "concreteTypeId": "8986b78b19c146ced98454ffbe32d17f1e9e468128ba8dcb2a32f16aaf208db2", + "metadataTypeId": 55, + "typeArguments": [ + "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b", + "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef" + ] + }, + { + "type": "struct data_structures::StructSimple", + "concreteTypeId": "ef937135956e37401e0bc90406ca8becda92d1b4e387fe938ddef8d27ee192a1", + "metadataTypeId": 56 + }, + { + "type": "struct data_structures::StructSingleGeneric<(bool, u64)>", + "concreteTypeId": "fc0793960700fbabd2722134cff2a546743fc832b98d89aac1ec30fc669fd698", + "metadataTypeId": 57, + "typeArguments": [ + "c998ca9a5f221fe7b5c66ae70c8a9562b86d964408b00d17f883c906bc1fe4be" + ] + }, + { + "type": "struct data_structures::StructSingleGeneric", + "concreteTypeId": "7cbc352969caf2e9caa716d89c3be65e707447e2a197c779cc4ef382d0602de6", + "metadataTypeId": 57, + "typeArguments": [ + "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + ] + }, + { + "type": "struct data_structures::StructWithEnumArray", + "concreteTypeId": "d5266ee32061dbfec8c96f2ba8a054243875e4e6a586104d6366b11e3bc86f2e", + "metadataTypeId": 58 + }, + { + "type": "struct data_structures::StructWithGenericArray", + "concreteTypeId": "29843de0bbb48b2d3c601b61823f2e106cfa5833e18b482571f1fa58b507a7ad", + "metadataTypeId": 59, + "typeArguments": [ + "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b" + ] + }, + { + "type": "struct data_structures::StructWithImplicitGenerics", + "concreteTypeId": "549c0f0c43c9e33f7e958e0473d84e78eca4737f9f159c64614ca5dff2d91b60", + "metadataTypeId": 60, + "typeArguments": [ + "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b", + "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + ] + }, + { + "type": "struct data_structures::StructWithMultiOption", + "concreteTypeId": "aa87500bb34c8bb09ffd60ab55cb1725898c366c58d3ff3aaaf8c9b532934fd1", + "metadataTypeId": 61 + }, + { + "type": "struct data_structures::StructWithNestedArray", + "concreteTypeId": "e7807205e98b513a8beeb5bcf446f0b2d684d0dce6bfeff0f324fa31df1b8948", + "metadataTypeId": 62 + }, + { + "type": "struct data_structures::StructWithNestedStruct", + "concreteTypeId": "8651356d9584265a78cb58de01c22d405dfc7006ea2f5f74fddcbe3f047f109a", + "metadataTypeId": 63 + }, + { + "type": "struct data_structures::StructWithNestedTuple", + "concreteTypeId": "d042dca573565aa653542415397934b3e95452917664e04d27c32a22091aa9a5", + "metadataTypeId": 64 + }, + { + "type": "struct data_structures::StructWithSingleOption", + "concreteTypeId": "089f2c4466ef415255917812d05776ebcb386be53e5f94bdad1ca8095f02845c", + "metadataTypeId": 65 + }, + { + "type": "struct data_structures::StructWithVector", + "concreteTypeId": "eac45984af86a06e11e1c5ff744bc1242e004db8404308cb7e574b4c2afaf621", + "metadataTypeId": 66 + }, + { + "type": "struct std::address::Address", + "concreteTypeId": "f597b637c3b0f588fb8d7086c6f4735caa3122b85f0423b82e489f9bb58e2308", + "metadataTypeId": 67 + }, + { + "type": "struct std::asset_id::AssetId", + "concreteTypeId": "c0710b6731b1dd59799cf6bef33eee3b3b04a2e40e80a0724090215bbf2ca974", + "metadataTypeId": 68 + }, + { + "type": "struct std::b512::B512", + "concreteTypeId": "745e252e80bec590efc3999ae943f07ccea4d5b45b00bb6575499b64abdd3322", + "metadataTypeId": 69 + }, + { + "type": "struct std::bytes::Bytes", + "concreteTypeId": "cdd87b7d12fe505416570c294c884bca819364863efe3bf539245fa18515fbbb", + "metadataTypeId": 70 + }, + { + "type": "struct std::contract_id::ContractId", + "concreteTypeId": "29c10735d33b5159f0c71ee1dbd17b36a3e69e41f00fab0d42e1bd9f428d8a54", + "metadataTypeId": 72 + }, + { + "type": "struct std::string::String", + "concreteTypeId": "9a7f1d3e963c10e0a4ea70a8e20a4813d1dc5682e28f74cb102ae50d32f7f98c", + "metadataTypeId": 73 + }, + { + "type": "struct std::vec::Vec", + "concreteTypeId": "6b97d5d738359413c9fac402aced252c23902c28382469ffe27f07381e9f6f31", + "metadataTypeId": 75, + "typeArguments": [ + "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + ] + }, + { + "type": "struct std::vec::Vec", + "concreteTypeId": "49f761c61dce644e212b8182e30557d35b6b4ad46693140be677eee0d6ef2733", + "metadataTypeId": 75, + "typeArguments": [ + "dfd8875bb49716b14dd336285ba667f953ed9aec4e918c0d7a2eb19ff644d60e" + ] + }, + { + "type": "struct std::vec::Vec", + "concreteTypeId": "9168b00268bbefd158090041178f058b032504f76c4b9644157d5d6b5b183468", + "metadataTypeId": 75, + "typeArguments": [ + "ef937135956e37401e0bc90406ca8becda92d1b4e387fe938ddef8d27ee192a1" + ] + }, + { + "type": "struct std::vec::Vec", + "concreteTypeId": "c0de252b9f65a31c6d03071b4b18a935c88c5bb0b2401a447fd30d342fd5a04d", + "metadataTypeId": 75, + "typeArguments": [ + "aa87500bb34c8bb09ffd60ab55cb1725898c366c58d3ff3aaaf8c9b532934fd1" + ] + }, + { + "type": "struct std::vec::Vec>", + "concreteTypeId": "e06c82714c52b8afd2293d5d37d05783d09d71c956311c6050ac012cab06364e", + "metadataTypeId": 75, + "typeArguments": [ + "13c38f4111bad6468fad4f8ea82fd744546b63be49db9439fb3d94e14ae2bb3a" + ] + }, + { + "type": "struct std::vec::Vec", + "concreteTypeId": "13c38f4111bad6468fad4f8ea82fd744546b63be49db9439fb3d94e14ae2bb3a", + "metadataTypeId": 75, + "typeArguments": [ + "d7649d428b9ff33d188ecbf38a7e4d8fd167fa01b2e10fe9a8f9308e52f1d7cc" + ] + }, + { + "type": "struct std::vec::Vec", + "concreteTypeId": "d5bfe1d4e1ace20166c9b50cadd47e862020561bde24f5189cfc2723f5ed76f4", + "metadataTypeId": 75, + "typeArguments": [ + "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + ] + }, + { + "type": "struct std::vec::Vec", + "concreteTypeId": "27a0fb3d3a821e04e7a3f17ab6a617f0eb10f11e6eeb0f2c0ff9e6237207319e", + "metadataTypeId": 75, + "typeArguments": [ + "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + ] + }, + { + "type": "struct std::vm::evm::evm_address::EvmAddress", + "concreteTypeId": "05a44d8c3e00faf7ed545823b7a2b32723545d8715d87a0ab3cf65904948e8d2", + "metadataTypeId": 76 + }, + { + "type": "u16", + "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef" + }, + { + "type": "u256", + "concreteTypeId": "1b5759d94094368cfd443019e7ca5ec4074300e544e5ea993a979f5da627261e" + }, + { + "type": "u32", + "concreteTypeId": "d7649d428b9ff33d188ecbf38a7e4d8fd167fa01b2e10fe9a8f9308e52f1d7cc" + }, + { + "type": "u64", + "concreteTypeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + }, + { + "type": "u8", + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + } + ], + "metadataTypes": [ + { + "type": "(_, _)", + "metadataTypeId": 0, + "components": [ + { + "name": "__tuple_element", + "typeId": "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b" + }, + { + "name": "__tuple_element", + "typeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + ] + }, + { + "type": "(_, _)", + "metadataTypeId": 1, + "components": [ + { + "name": "__tuple_element", + "typeId": "84877f6e98274b9e4721db68b4c0bdb9e52b8e9572c5bd7811c07a41ced882c7" + }, + { + "name": "__tuple_element", + "typeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + ] + }, + { + "type": "(_, _)", + "metadataTypeId": 2, + "components": [ + { + "name": "__tuple_element", + "typeId": "84877f6e98274b9e4721db68b4c0bdb9e52b8e9572c5bd7811c07a41ced882c7" + }, + { + "name": "__tuple_element", + "typeId": "84877f6e98274b9e4721db68b4c0bdb9e52b8e9572c5bd7811c07a41ced882c7" + } + ] + }, + { + "type": "(_, _)", + "metadataTypeId": 3, + "components": [ + { + "name": "__tuple_element", + "typeId": 56 + }, + { + "name": "__tuple_element", + "typeId": 75, + "typeArguments": [ + { + "name": "", + "typeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + } + ] + } + ] + }, + { + "type": "(_, _)", + "metadataTypeId": 4, + "components": [ + { + "name": "__tuple_element", + "typeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + }, + { + "name": "__tuple_element", + "typeId": 56 + } + ] + }, + { + "type": "(_, _)", + "metadataTypeId": 5, + "components": [ + { + "name": "__tuple_element", + "typeId": 75, + "typeArguments": [ + { + "name": "", + "typeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + } + ] + }, + { + "name": "__tuple_element", + "typeId": "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b" + } + ] + }, + { + "type": "(_, _)", + "metadataTypeId": 6, + "components": [ + { + "name": "__tuple_element", + "typeId": 75, + "typeArguments": [ + { + "name": "", + "typeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + } + ] + }, + { + "name": "__tuple_element", + "typeId": 75, + "typeArguments": [ + { + "name": "", + "typeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + } + ] + } + ] + }, + { + "type": "(_, _)", + "metadataTypeId": 7, + "components": [ + { + "name": "__tuple_element", + "typeId": 34 + }, + { + "name": "__tuple_element", + "typeId": 35 + } + ] + }, + { + "type": "(_, _)", + "metadataTypeId": 8, + "components": [ + { + "name": "__tuple_element", + "typeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + }, + { + "name": "__tuple_element", + "typeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + } + ] + }, + { + "type": "(_, _, _)", + "metadataTypeId": 9, + "components": [ + { + "name": "__tuple_element", + "typeId": "d7649d428b9ff33d188ecbf38a7e4d8fd167fa01b2e10fe9a8f9308e52f1d7cc" + }, + { + "name": "__tuple_element", + "typeId": 75, + "typeArguments": [ + { + "name": "", + "typeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + } + ] + }, + { + "name": "__tuple_element", + "typeId": 75, + "typeArguments": [ + { + "name": "", + "typeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + } + ] + } + ] + }, + { + "type": "(_, _, _)", + "metadataTypeId": 10, + "components": [ + { + "name": "__tuple_element", + "typeId": 68 + }, + { + "name": "__tuple_element", + "typeId": 68 + }, + { + "name": "__tuple_element", + "typeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + ] + }, + { + "type": "(_, _, _)", + "metadataTypeId": 11, + "components": [ + { + "name": "__tuple_element", + "typeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + }, + { + "name": "__tuple_element", + "typeId": 57, + "typeArguments": [ + { + "name": "", + "typeId": 57, + "typeArguments": [ + { + "name": "", + "typeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + } + ] + } + ] + }, + { + "name": "__tuple_element", + "typeId": 44 + } + ] + }, + { + "type": "(_, _, _)", + "metadataTypeId": 12, + "components": [ + { + "name": "__tuple_element", + "typeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + }, + { + "name": "__tuple_element", + "typeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + }, + { + "name": "__tuple_element", + "typeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + } + ] + }, + { + "type": "(_, _, _, _)", + "metadataTypeId": 13, + "components": [ + { + "name": "__tuple_element", + "typeId": 51, + "typeArguments": [ + { + "name": "", + "typeId": 17 + }, + { + "name": "", + "typeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + } + ] + }, + { + "name": "__tuple_element", + "typeId": 22 + }, + { + "name": "__tuple_element", + "typeId": 1 + }, + { + "name": "__tuple_element", + "typeId": 56 + } + ] + }, + { + "type": "[_; 1]", + "metadataTypeId": 14, + "components": [ + { + "name": "__array_element", + "typeId": 75, + "typeArguments": [ + { + "name": "", + "typeId": "d7649d428b9ff33d188ecbf38a7e4d8fd167fa01b2e10fe9a8f9308e52f1d7cc" + } + ] + } + ] + }, + { + "type": "[_; 2]", + "metadataTypeId": 15, + "components": [ + { + "name": "__array_element", + "typeId": 51, + "typeArguments": [ + { + "name": "", + "typeId": 57, + "typeArguments": [ + { + "name": "", + "typeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + } + ] + }, + { + "name": "", + "typeId": 43 + } + ] + } + ] + }, + { + "type": "[_; 2]", + "metadataTypeId": 16, + "components": [ + { + "name": "__array_element", + "typeId": "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b" + } + ] + }, + { + "type": "[_; 3]", + "metadataTypeId": 17, + "components": [ + { + "name": "__array_element", + "typeId": "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b" + } + ] + }, + { + "type": "[_; 3]", + "metadataTypeId": 18, + "components": [ + { + "name": "__array_element", + "typeId": 56 + } + ] + }, + { + "type": "[_; 3]", + "metadataTypeId": 19, + "components": [ + { + "name": "__array_element", + "typeId": 51, + "typeArguments": [ + { + "name": "", + "typeId": 36 + }, + { + "name": "", + "typeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + } + ] + } + ] + }, + { + "type": "[_; 3]", + "metadataTypeId": 20, + "components": [ + { + "name": "__array_element", + "typeId": 28 + } + ] + }, + { + "type": "[_; 3]", + "metadataTypeId": 21, + "components": [ + { + "name": "__array_element", + "typeId": 34 + } + ] + }, + { + "type": "[_; 4]", + "metadataTypeId": 22, + "components": [ + { + "name": "__array_element", + "typeId": 51, + "typeArguments": [ + { + "name": "", + "typeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + }, + { + "name": "", + "typeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + ] + } + ] + }, + { + "type": "[_; 4]", + "metadataTypeId": 23, + "components": [ + { + "name": "__array_element", + "typeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + } + ] + }, + { + "type": "[_; 5]", + "metadataTypeId": 24, + "components": [ + { + "name": "__array_element", + "typeId": 32, + "typeArguments": [ + { + "name": "", + "typeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + } + ] + } + ] + }, + { + "type": "enum abi-library::ExternalEnum", + "metadataTypeId": 25, + "components": [ + { + "name": "A", + "typeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d" + }, + { + "name": "B", + "typeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d" + } + ] + }, + { + "type": "enum data_structures::EnumDoubleGeneric", + "metadataTypeId": 26, + "components": [ + { + "name": "a", + "typeId": 38 + }, + { + "name": "b", + "typeId": 39 + } + ], + "typeParameters": [ + 38, + 39 + ] + }, + { + "type": "enum data_structures::EnumWithBuiltinType", + "metadataTypeId": 27, + "components": [ + { + "name": "a", + "typeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + }, + { + "name": "b", + "typeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + } + ] + }, + { + "type": "enum data_structures::EnumWithNative", + "metadataTypeId": 28, + "components": [ + { + "name": "Checked", + "typeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d" + }, + { + "name": "Pending", + "typeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d" + } + ] + }, + { + "type": "enum data_structures::EnumWithStructs", + "metadataTypeId": 29, + "components": [ + { + "name": "a", + "typeId": 28 + }, + { + "name": "b", + "typeId": 56 + }, + { + "name": "c", + "typeId": 51, + "typeArguments": [ + { + "name": "", + "typeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + }, + { + "name": "", + "typeId": 56 + } + ] + } + ] + }, + { + "type": "enum data_structures::EnumWithVector", + "metadataTypeId": 30, + "components": [ + { + "name": "a", + "typeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + }, + { + "name": "b", + "typeId": 75, + "typeArguments": [ + { + "name": "", + "typeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + } + ] + } + ] + }, + { + "type": "enum std::identity::Identity", + "metadataTypeId": 31, + "components": [ + { + "name": "Address", + "typeId": 67 + }, + { + "name": "ContractId", + "typeId": 72 + } + ] + }, + { + "type": "enum std::option::Option", + "metadataTypeId": 32, + "components": [ + { + "name": "None", + "typeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d" + }, + { + "name": "Some", + "typeId": 37 + } + ], + "typeParameters": [ + 37 + ] + }, + { + "type": "enum std::result::Result", + "metadataTypeId": 33, + "components": [ + { + "name": "Ok", + "typeId": 37 + }, + { + "name": "Err", + "typeId": 34 + } + ], + "typeParameters": [ + 37, + 34 + ] + }, + { + "type": "generic E", + "metadataTypeId": 34 + }, + { + "type": "generic F", + "metadataTypeId": 35 + }, + { + "type": "generic K", + "metadataTypeId": 36 + }, + { + "type": "generic T", + "metadataTypeId": 37 + }, + { + "type": "generic T1", + "metadataTypeId": 38 + }, + { + "type": "generic T2", + "metadataTypeId": 39 + }, + { + "type": "generic U", + "metadataTypeId": 40 + }, + { + "type": "generic V", + "metadataTypeId": 41 + }, + { + "type": "raw untyped ptr", + "metadataTypeId": 42 + }, + { + "type": "str[1]", + "metadataTypeId": 43 + }, + { + "type": "str[3]", + "metadataTypeId": 44 + }, + { + "type": "struct abi-library::ExternalStruct", + "metadataTypeId": 45, + "components": [ + { + "name": "value", + "typeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + } + ] + }, + { + "type": "struct data_structures::Configurables", + "metadataTypeId": 46, + "components": [ + { + "name": "U8_VALUE", + "typeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + }, + { + "name": "BOOL_VALUE", + "typeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + }, + { + "name": "B256_VALUE", + "typeId": "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b" + }, + { + "name": "OPTION_U8_VALUE", + "typeId": 32, + "typeArguments": [ + { + "name": "", + "typeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + } + ] + }, + { + "name": "GENERIC_STRUCT_VALUE", + "typeId": 51, + "typeArguments": [ + { + "name": "", + "typeId": 51, + "typeArguments": [ + { + "name": "", + "typeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + }, + { + "name": "", + "typeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef" + } + ] + }, + { + "name": "", + "typeId": "d7649d428b9ff33d188ecbf38a7e4d8fd167fa01b2e10fe9a8f9308e52f1d7cc" + } + ] + } + ] + }, + { + "type": "struct data_structures::StructA", + "metadataTypeId": 47, + "components": [ + { + "name": "propA1", + "typeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + } + ] + }, + { + "type": "struct data_structures::StructB", + "metadataTypeId": 48, + "components": [ + { + "name": "propB1", + "typeId": 47 + }, + { + "name": "propB2", + "typeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef" + } + ] + }, + { + "type": "struct data_structures::StructC", + "metadataTypeId": 49, + "components": [ + { + "name": "propC1", + "typeId": 47 + }, + { + "name": "propC2", + "typeId": 75, + "typeArguments": [ + { + "name": "", + "typeId": 48 + } + ] + }, + { + "name": "propC3", + "typeId": 50, + "typeArguments": [ + { + "name": "", + "typeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + }, + { + "name": "", + "typeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + }, + { + "name": "", + "typeId": 53, + "typeArguments": [ + { + "name": "", + "typeId": 43 + } + ] + } + ] + } + ] + }, + { + "type": "struct data_structures::StructD", + "metadataTypeId": 50, + "components": [ + { + "name": "propD1", + "typeId": 75, + "typeArguments": [ + { + "name": "", + "typeId": 52, + "typeArguments": [ + { + "name": "", + "typeId": 37 + } + ] + } + ] + }, + { + "name": "propD2", + "typeId": 40 + }, + { + "name": "propD3", + "typeId": 41 + } + ], + "typeParameters": [ + 37, + 40, + 41 + ] + }, + { + "type": "struct data_structures::StructDoubleGeneric", + "metadataTypeId": 51, + "components": [ + { + "name": "a", + "typeId": 38 + }, + { + "name": "b", + "typeId": 39 + } + ], + "typeParameters": [ + 38, + 39 + ] + }, + { + "type": "struct data_structures::StructE", + "metadataTypeId": 52, + "components": [ + { + "name": "propE1", + "typeId": 47 + }, + { + "name": "propE2", + "typeId": 48 + }, + { + "name": "propE3", + "typeId": 37 + } + ], + "typeParameters": [ + 37 + ] + }, + { + "type": "struct data_structures::StructF", + "metadataTypeId": 53, + "components": [ + { + "name": "propF1", + "typeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + }, + { + "name": "propF2", + "typeId": 37 + } + ], + "typeParameters": [ + 37 + ] + }, + { + "type": "struct data_structures::StructG", + "metadataTypeId": 54, + "components": [ + { + "name": "propG1", + "typeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + } + ] + }, + { + "type": "struct data_structures::StructGenericWithEnum", + "metadataTypeId": 55, + "components": [ + { + "name": "a", + "typeId": 38 + }, + { + "name": "b", + "typeId": 26, + "typeArguments": [ + { + "name": "", + "typeId": 38 + }, + { + "name": "", + "typeId": 39 + } + ] + } + ], + "typeParameters": [ + 38, + 39 + ] + }, + { + "type": "struct data_structures::StructSimple", + "metadataTypeId": 56, + "components": [ + { + "name": "a", + "typeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + }, + { + "name": "b", + "typeId": "d7649d428b9ff33d188ecbf38a7e4d8fd167fa01b2e10fe9a8f9308e52f1d7cc" + } + ] + }, + { + "type": "struct data_structures::StructSingleGeneric", + "metadataTypeId": 57, + "components": [ + { + "name": "a", + "typeId": 37 + } + ], + "typeParameters": [ + 37 + ] + }, + { + "type": "struct data_structures::StructWithEnumArray", + "metadataTypeId": 58, + "components": [ + { + "name": "a", + "typeId": 20 + } + ] + }, + { + "type": "struct data_structures::StructWithGenericArray", + "metadataTypeId": 59, + "components": [ + { + "name": "a", + "typeId": 19 + } + ], + "typeParameters": [ + 36 + ] + }, + { + "type": "struct data_structures::StructWithImplicitGenerics", + "metadataTypeId": 60, + "components": [ + { + "name": "a", + "typeId": 21 + }, + { + "name": "b", + "typeId": 7 + } + ], + "typeParameters": [ + 34, + 35 + ] + }, + { + "type": "struct data_structures::StructWithMultiOption", + "metadataTypeId": 61, + "components": [ + { + "name": "a", + "typeId": 24 + } + ] + }, + { + "type": "struct data_structures::StructWithNestedArray", + "metadataTypeId": 62, + "components": [ + { + "name": "a", + "typeId": 15 + } + ] + }, + { + "type": "struct data_structures::StructWithNestedStruct", + "metadataTypeId": 63, + "components": [ + { + "name": "a", + "typeId": 51, + "typeArguments": [ + { + "name": "", + "typeId": 57, + "typeArguments": [ + { + "name": "", + "typeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + } + ] + }, + { + "name": "", + "typeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef" + } + ] + } + ] + }, + { + "type": "struct data_structures::StructWithNestedTuple", + "metadataTypeId": 64, + "components": [ + { + "name": "a", + "typeId": 11 + } + ] + }, + { + "type": "struct data_structures::StructWithSingleOption", + "metadataTypeId": 65, + "components": [ + { + "name": "a", + "typeId": 32, + "typeArguments": [ + { + "name": "", + "typeId": 61 + } + ] + } + ] + }, + { + "type": "struct data_structures::StructWithVector", + "metadataTypeId": 66, + "components": [ + { + "name": "a", + "typeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + }, + { + "name": "b", + "typeId": 75, + "typeArguments": [ + { + "name": "", + "typeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + } + ] + } + ] + }, + { + "type": "struct std::address::Address", + "metadataTypeId": 67, + "components": [ + { + "name": "bits", + "typeId": "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b" + } + ] + }, + { + "type": "struct std::asset_id::AssetId", + "metadataTypeId": 68, + "components": [ + { + "name": "bits", + "typeId": "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b" + } + ] + }, + { + "type": "struct std::b512::B512", + "metadataTypeId": 69, + "components": [ + { + "name": "bits", + "typeId": 16 + } + ] + }, + { + "type": "struct std::bytes::Bytes", + "metadataTypeId": 70, + "components": [ + { + "name": "buf", + "typeId": 71 + }, + { + "name": "len", + "typeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + } + ] + }, + { + "type": "struct std::bytes::RawBytes", + "metadataTypeId": 71, + "components": [ + { + "name": "ptr", + "typeId": 42 + }, + { + "name": "cap", + "typeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + } + ] + }, + { + "type": "struct std::contract_id::ContractId", + "metadataTypeId": 72, + "components": [ + { + "name": "bits", + "typeId": "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b" + } + ] + }, + { + "type": "struct std::string::String", + "metadataTypeId": 73, + "components": [ + { + "name": "bytes", + "typeId": 70 + } + ] + }, + { + "type": "struct std::vec::RawVec", + "metadataTypeId": 74, + "components": [ + { + "name": "ptr", + "typeId": 42 + }, + { + "name": "cap", + "typeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + } + ], + "typeParameters": [ + 37 + ] + }, + { + "type": "struct std::vec::Vec", + "metadataTypeId": 75, + "components": [ + { + "name": "buf", + "typeId": 74, + "typeArguments": [ + { + "name": "", + "typeId": 37 + } + ] + }, + { + "name": "len", + "typeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + } + ], + "typeParameters": [ + 37 + ] + }, + { + "type": "struct std::vm::evm::evm_address::EvmAddress", + "metadataTypeId": 76, + "components": [ + { + "name": "bits", + "typeId": "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b" + } + ] + } + ], + "functions": [ + { + "inputs": [], + "name": "configurables", + "output": "69d4f1cc5ce793681d98a55ab013f42ab56260131d39af6c1e71a5f3531557bc", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b" + }, + { + "name": "y", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + ], + "name": "multi_arg_b256_bool", + "output": "d5f6ab61fc224aae1bf15a89ab88840ed54e312a76a9735d1f60d4d0d1fae640", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "7bdc2c1e9c4b8576fdf5be24c5c6569cba3a8feaba3755ed2b95d646a33c73e2" + }, + { + "name": "y", + "concreteTypeId": "b22807669faa58263e636f6e2d194df8ddbc6686bb4ea14ee28005fa30adbe85" + }, + { + "name": "z", + "concreteTypeId": "a1e229302ed2f092752a6bc4fbe66bb9305e0802b1b01ecc5e1d59356702e956" + }, + { + "name": "a", + "concreteTypeId": "ef937135956e37401e0bc90406ca8becda92d1b4e387fe938ddef8d27ee192a1" + } + ], + "name": "multi_arg_complex", + "output": "343f07ddcd75b9385bc193e0419f2e89c75fad67cbf4ad1b36a01a136620817e", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "84877f6e98274b9e4721db68b4c0bdb9e52b8e9572c5bd7811c07a41ced882c7" + }, + { + "name": "y", + "concreteTypeId": "84877f6e98274b9e4721db68b4c0bdb9e52b8e9572c5bd7811c07a41ced882c7" + } + ], + "name": "multi_arg_str_str", + "output": "30022fd7ad3fda4035d30e4d86b705d4870924d4b4fe054624d2561fa12bb33e", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "ef937135956e37401e0bc90406ca8becda92d1b4e387fe938ddef8d27ee192a1" + }, + { + "name": "y", + "concreteTypeId": "27a0fb3d3a821e04e7a3f17ab6a617f0eb10f11e6eeb0f2c0ff9e6237207319e" + } + ], + "name": "multi_arg_struct_vector", + "output": "5ebb7c8cdd38d1f676f9c7089a2da12b27114ee3771c2047f3295d4d30f8fd2c", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "d7649d428b9ff33d188ecbf38a7e4d8fd167fa01b2e10fe9a8f9308e52f1d7cc" + }, + { + "name": "y", + "concreteTypeId": "d5bfe1d4e1ace20166c9b50cadd47e862020561bde24f5189cfc2723f5ed76f4" + }, + { + "name": "z", + "concreteTypeId": "d5bfe1d4e1ace20166c9b50cadd47e862020561bde24f5189cfc2723f5ed76f4" + } + ], + "name": "multi_arg_u32_vector_vector", + "output": "18034e13b18b71de3c7e12f8f10a7bd48a23870e0dbb46eaf10faeb26d70f000", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + }, + { + "name": "y", + "concreteTypeId": "ef937135956e37401e0bc90406ca8becda92d1b4e387fe938ddef8d27ee192a1" + } + ], + "name": "multi_arg_u64_struct", + "output": "0088c28967dbcdaa34626c7e915e44b2afe72f12415f0e31edc0b5ce70e7c6dc", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + }, + { + "name": "y", + "concreteTypeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + } + ], + "name": "multi_arg_u64_u64", + "output": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "27a0fb3d3a821e04e7a3f17ab6a617f0eb10f11e6eeb0f2c0ff9e6237207319e" + }, + { + "name": "y", + "concreteTypeId": "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b" + } + ], + "name": "multi_arg_vector_b256", + "output": "52e2726988c7da304606fbe4ed696efac04beb29e9a22e15778f8a0539c9cb94", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "27a0fb3d3a821e04e7a3f17ab6a617f0eb10f11e6eeb0f2c0ff9e6237207319e" + }, + { + "name": "y", + "concreteTypeId": "27a0fb3d3a821e04e7a3f17ab6a617f0eb10f11e6eeb0f2c0ff9e6237207319e" + } + ], + "name": "multi_arg_vector_vector", + "output": "87a4626758542d7b6a03099839e440a052a4d5a00e3abfdf22bcc564ca19a4fd", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "f597b637c3b0f588fb8d7086c6f4735caa3122b85f0423b82e489f9bb58e2308" + } + ], + "name": "types_address", + "output": "f597b637c3b0f588fb8d7086c6f4735caa3122b85f0423b82e489f9bb58e2308", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "a95e1fcceb1451b8a76471f593f66c4a52ca04bde3c227c746ad7aaf988de5c6" + } + ], + "name": "types_alias_tuple_with_native_types", + "output": "a95e1fcceb1451b8a76471f593f66c4a52ca04bde3c227c746ad7aaf988de5c6", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "f28afa065fc5de602456160c4155d4de7d9a61e85a995d209a14eab0b34bd6b4" + } + ], + "name": "types_array", + "output": "f28afa065fc5de602456160c4155d4de7d9a61e85a995d209a14eab0b34bd6b4", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "38f2594527b516dab2c81b31356901226242d7c32554877e36797c6b23969237" + } + ], + "name": "types_array_struct", + "output": "38f2594527b516dab2c81b31356901226242d7c32554877e36797c6b23969237", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "b8164e36cce9d14142824b5cc55aebc1272036775b966af82c49c78aff114006" + } + ], + "name": "types_array_with_generic_struct", + "output": "b8164e36cce9d14142824b5cc55aebc1272036775b966af82c49c78aff114006", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "593b39347cc381516d8ed1f8e5e628a8d455bd3f833bd9dfdd5165ba16f9f980" + } + ], + "name": "types_array_with_vector", + "output": "593b39347cc381516d8ed1f8e5e628a8d455bd3f833bd9dfdd5165ba16f9f980", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "c0710b6731b1dd59799cf6bef33eee3b3b04a2e40e80a0724090215bbf2ca974" + } + ], + "name": "types_asset_id", + "output": "c0710b6731b1dd59799cf6bef33eee3b3b04a2e40e80a0724090215bbf2ca974", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b" + } + ], + "name": "types_b256", + "output": "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "745e252e80bec590efc3999ae943f07ccea4d5b45b00bb6575499b64abdd3322" + } + ], + "name": "types_b512", + "output": "745e252e80bec590efc3999ae943f07ccea4d5b45b00bb6575499b64abdd3322", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + ], + "name": "types_bool", + "output": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "cdd87b7d12fe505416570c294c884bca819364863efe3bf539245fa18515fbbb" + } + ], + "name": "types_bytes", + "output": "cdd87b7d12fe505416570c294c884bca819364863efe3bf539245fa18515fbbb", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "29c10735d33b5159f0c71ee1dbd17b36a3e69e41f00fab0d42e1bd9f428d8a54" + } + ], + "name": "types_contract_id", + "output": "29c10735d33b5159f0c71ee1dbd17b36a3e69e41f00fab0d42e1bd9f428d8a54", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "58ae0e9c51da476db1149dd48b1cda83a12187df4c049f8df5021f0b1696fb93" + } + ], + "name": "types_enum", + "output": "58ae0e9c51da476db1149dd48b1cda83a12187df4c049f8df5021f0b1696fb93", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "9a24373d8ce7688609717fd5a9b75360cd8a6bdb224ae095f0c05cc891cadd42" + } + ], + "name": "types_enum_external", + "output": "9a24373d8ce7688609717fd5a9b75360cd8a6bdb224ae095f0c05cc891cadd42", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "2136f16aedeec1ab7f1d912c57cc0566e86c36f20a2cb313e3d679cead6a0e61" + } + ], + "name": "types_enum_with_builtin_type", + "output": "2136f16aedeec1ab7f1d912c57cc0566e86c36f20a2cb313e3d679cead6a0e61", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "9ed6dede3ae1e66e0f951e860e863f77fb9b9499f4666a1123bf244c4a201669" + } + ], + "name": "types_enum_with_structs", + "output": "9ed6dede3ae1e66e0f951e860e863f77fb9b9499f4666a1123bf244c4a201669", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "0272d5aecccd33822994b7be1494b72ec9ad860e4cb51f043deda7ac1e2cae26" + } + ], + "name": "types_enum_with_vector", + "output": "0272d5aecccd33822994b7be1494b72ec9ad860e4cb51f043deda7ac1e2cae26", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "05a44d8c3e00faf7ed545823b7a2b32723545d8715d87a0ab3cf65904948e8d2" + } + ], + "name": "types_evm_address", + "output": "05a44d8c3e00faf7ed545823b7a2b32723545d8715d87a0ab3cf65904948e8d2", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "d0ed93cd57cc3dfb1c119b22bf63f5d215122402536127bf17087ca6d8186307" + } + ], + "name": "types_generic_enum", + "output": "d0ed93cd57cc3dfb1c119b22bf63f5d215122402536127bf17087ca6d8186307", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "ab7cd04e05be58e3fc15d424c2c4a57f824a2a2d97d67252440a3925ebdc1335" + } + ], + "name": "types_identity_address", + "output": "ab7cd04e05be58e3fc15d424c2c4a57f824a2a2d97d67252440a3925ebdc1335", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "ab7cd04e05be58e3fc15d424c2c4a57f824a2a2d97d67252440a3925ebdc1335" + } + ], + "name": "types_identity_contract_id", + "output": "ab7cd04e05be58e3fc15d424c2c4a57f824a2a2d97d67252440a3925ebdc1335", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "2da102c46c7263beeed95818cd7bee801716ba8303dddafdcd0f6c9efda4a0f1" + } + ], + "name": "types_option", + "output": "2da102c46c7263beeed95818cd7bee801716ba8303dddafdcd0f6c9efda4a0f1", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "25616ce23be3ca41fd26f8c546c053ec256f8fb5593036f60c9c417e86dcc92e" + } + ], + "name": "types_option_struct", + "output": "25616ce23be3ca41fd26f8c546c053ec256f8fb5593036f60c9c417e86dcc92e", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "1e1c7c52c1c7a9901681337f8669555f62aac58911332c9ff6b4ea8e73786570" + } + ], + "name": "types_raw_slice", + "output": "1e1c7c52c1c7a9901681337f8669555f62aac58911332c9ff6b4ea8e73786570", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "b3131b4c08c16cfa55b3150d587c3afa3e4cdebe0399f3f599fa160baaa64e0c" + } + ], + "name": "types_result", + "output": "9891b1ee451eed790368ea3969e3c8f550efa87de489b5d7b933e2290800791b", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "9a7f1d3e963c10e0a4ea70a8e20a4813d1dc5682e28f74cb102ae50d32f7f98c" + } + ], + "name": "types_std_string", + "output": "9a7f1d3e963c10e0a4ea70a8e20a4813d1dc5682e28f74cb102ae50d32f7f98c", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "84877f6e98274b9e4721db68b4c0bdb9e52b8e9572c5bd7811c07a41ced882c7" + } + ], + "name": "types_str", + "output": "84877f6e98274b9e4721db68b4c0bdb9e52b8e9572c5bd7811c07a41ced882c7", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "8c25cb3686462e9a86d2883c5688a22fe738b0bbc85f458d2d2b5f3f667c6d5a" + } + ], + "name": "types_str_slice", + "output": "8c25cb3686462e9a86d2883c5688a22fe738b0bbc85f458d2d2b5f3f667c6d5a", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "8986b78b19c146ced98454ffbe32d17f1e9e468128ba8dcb2a32f16aaf208db2" + } + ], + "name": "types_struct_double_generic", + "output": "8986b78b19c146ced98454ffbe32d17f1e9e468128ba8dcb2a32f16aaf208db2", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "c3a770db33c4e755ad3ba4586b9c10520511fb80b767feb57dd41da1a88f6978" + } + ], + "name": "types_struct_external", + "output": "c3a770db33c4e755ad3ba4586b9c10520511fb80b767feb57dd41da1a88f6978", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "7cbc352969caf2e9caa716d89c3be65e707447e2a197c779cc4ef382d0602de6" + } + ], + "name": "types_struct_generic", + "output": "7cbc352969caf2e9caa716d89c3be65e707447e2a197c779cc4ef382d0602de6", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "ef937135956e37401e0bc90406ca8becda92d1b4e387fe938ddef8d27ee192a1" + } + ], + "name": "types_struct_simple", + "output": "ef937135956e37401e0bc90406ca8becda92d1b4e387fe938ddef8d27ee192a1", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "29843de0bbb48b2d3c601b61823f2e106cfa5833e18b482571f1fa58b507a7ad" + } + ], + "name": "types_struct_with_array", + "output": "29843de0bbb48b2d3c601b61823f2e106cfa5833e18b482571f1fa58b507a7ad", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "d5266ee32061dbfec8c96f2ba8a054243875e4e6a586104d6366b11e3bc86f2e" + } + ], + "name": "types_struct_with_array_of_enums", + "output": "d5266ee32061dbfec8c96f2ba8a054243875e4e6a586104d6366b11e3bc86f2e", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "d0494e36b8daeafdf02dfbd1f65f82c66df872fb235c7fd2707fcd4147c6c292" + } + ], + "name": "types_struct_with_complex_nested_struct", + "output": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "549c0f0c43c9e33f7e958e0473d84e78eca4737f9f159c64614ca5dff2d91b60" + } + ], + "name": "types_struct_with_implicit_generics", + "output": "549c0f0c43c9e33f7e958e0473d84e78eca4737f9f159c64614ca5dff2d91b60", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "db8b04f624965fbfd7eb7dc3fc3c6a54a71d0019b37d4011a9350d1870136c9d" + }, + { + "name": "y", + "concreteTypeId": "9f074fde9cb9194b90bd208c8c95e709bfb1a5c736b063302e5639ce4daad5aa" + }, + { + "name": "z", + "concreteTypeId": "f219acbc9e3b812457419966b5454d10d51594afecacb87fb7745c9311b90012" + } + ], + "name": "types_struct_with_multiple_struct_params", + "output": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "e7807205e98b513a8beeb5bcf446f0b2d684d0dce6bfeff0f324fa31df1b8948" + } + ], + "name": "types_struct_with_nested_array", + "output": "e7807205e98b513a8beeb5bcf446f0b2d684d0dce6bfeff0f324fa31df1b8948", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "8651356d9584265a78cb58de01c22d405dfc7006ea2f5f74fddcbe3f047f109a" + } + ], + "name": "types_struct_with_nested_struct", + "output": "8651356d9584265a78cb58de01c22d405dfc7006ea2f5f74fddcbe3f047f109a", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "d042dca573565aa653542415397934b3e95452917664e04d27c32a22091aa9a5" + } + ], + "name": "types_struct_with_nested_tuple", + "output": "d042dca573565aa653542415397934b3e95452917664e04d27c32a22091aa9a5", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "089f2c4466ef415255917812d05776ebcb386be53e5f94bdad1ca8095f02845c" + } + ], + "name": "types_struct_with_single_option", + "output": "089f2c4466ef415255917812d05776ebcb386be53e5f94bdad1ca8095f02845c", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "fc0793960700fbabd2722134cff2a546743fc832b98d89aac1ec30fc669fd698" + } + ], + "name": "types_struct_with_tuple", + "output": "fc0793960700fbabd2722134cff2a546743fc832b98d89aac1ec30fc669fd698", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "eac45984af86a06e11e1c5ff744bc1242e004db8404308cb7e574b4c2afaf621" + } + ], + "name": "types_struct_with_vector", + "output": "eac45984af86a06e11e1c5ff744bc1242e004db8404308cb7e574b4c2afaf621", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "79239b6d6f2383e2cfbaf4da7fdf7ee7fb59b7bf517acfff2d9433e9e76e8fc4" + } + ], + "name": "types_tuple", + "output": "79239b6d6f2383e2cfbaf4da7fdf7ee7fb59b7bf517acfff2d9433e9e76e8fc4", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "6f875be99a39d9920569678a34ffce676a6c3e14b958910db250b9cb4957157f" + } + ], + "name": "types_tuple_complex", + "output": "6f875be99a39d9920569678a34ffce676a6c3e14b958910db250b9cb4957157f", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "a95e1fcceb1451b8a76471f593f66c4a52ca04bde3c227c746ad7aaf988de5c6" + } + ], + "name": "types_tuple_with_native_types", + "output": "a95e1fcceb1451b8a76471f593f66c4a52ca04bde3c227c746ad7aaf988de5c6", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef" + } + ], + "name": "types_u16", + "output": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "1b5759d94094368cfd443019e7ca5ec4074300e544e5ea993a979f5da627261e" + } + ], + "name": "types_u256", + "output": "1b5759d94094368cfd443019e7ca5ec4074300e544e5ea993a979f5da627261e", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "d7649d428b9ff33d188ecbf38a7e4d8fd167fa01b2e10fe9a8f9308e52f1d7cc" + } + ], + "name": "types_u32", + "output": "d7649d428b9ff33d188ecbf38a7e4d8fd167fa01b2e10fe9a8f9308e52f1d7cc", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + } + ], + "name": "types_u64", + "output": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + } + ], + "name": "types_u8", + "output": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + }, + { + "name": "y", + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + }, + { + "name": "z", + "concreteTypeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d" + }, + { + "name": "a", + "concreteTypeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d" + } + ], + "name": "types_value_then_value_then_void_then_void", + "output": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + }, + { + "name": "y", + "concreteTypeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d" + } + ], + "name": "types_value_then_void", + "output": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + }, + { + "name": "y", + "concreteTypeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d" + }, + { + "name": "z", + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + } + ], + "name": "types_value_then_void_then_value", + "output": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "6b97d5d738359413c9fac402aced252c23902c28382469ffe27f07381e9f6f31" + } + ], + "name": "types_vector_boolean", + "output": "6b97d5d738359413c9fac402aced252c23902c28382469ffe27f07381e9f6f31", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "e06c82714c52b8afd2293d5d37d05783d09d71c956311c6050ac012cab06364e" + } + ], + "name": "types_vector_inside_vector", + "output": "e06c82714c52b8afd2293d5d37d05783d09d71c956311c6050ac012cab06364e", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "c0de252b9f65a31c6d03071b4b18a935c88c5bb0b2401a447fd30d342fd5a04d" + } + ], + "name": "types_vector_option", + "output": "c0de252b9f65a31c6d03071b4b18a935c88c5bb0b2401a447fd30d342fd5a04d", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "27a0fb3d3a821e04e7a3f17ab6a617f0eb10f11e6eeb0f2c0ff9e6237207319e" + } + ], + "name": "types_vector_u8", + "output": "27a0fb3d3a821e04e7a3f17ab6a617f0eb10f11e6eeb0f2c0ff9e6237207319e", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "9168b00268bbefd158090041178f058b032504f76c4b9644157d5d6b5b183468" + } + ], + "name": "types_vector_with_struct", + "output": "9168b00268bbefd158090041178f058b032504f76c4b9644157d5d6b5b183468", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d" + } + ], + "name": "types_void", + "output": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d" + }, + { + "name": "y", + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + } + ], + "name": "types_void_then_value", + "output": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d", + "attributes": null + } + ], + "loggedTypes": [ + { + "logId": "8961848586872524460", + "concreteTypeId": "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b" + }, + { + "logId": "13213829929622723620", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + }, + { + "logId": "15417698811679754926", + "concreteTypeId": "d5f6ab61fc224aae1bf15a89ab88840ed54e312a76a9735d1f60d4d0d1fae640" + }, + { + "logId": "3764736462721235256", + "concreteTypeId": "343f07ddcd75b9385bc193e0419f2e89c75fad67cbf4ad1b36a01a136620817e" + }, + { + "logId": "10098701174489624218", + "concreteTypeId": "8c25cb3686462e9a86d2883c5688a22fe738b0bbc85f458d2d2b5f3f667c6d5a" + }, + { + "logId": "3459380067145079360", + "concreteTypeId": "30022fd7ad3fda4035d30e4d86b705d4870924d4b4fe054624d2561fa12bb33e" + }, + { + "logId": "6826186604658872822", + "concreteTypeId": "5ebb7c8cdd38d1f676f9c7089a2da12b27114ee3771c2047f3295d4d30f8fd2c" + }, + { + "logId": "1730312528330453470", + "concreteTypeId": "18034e13b18b71de3c7e12f8f10a7bd48a23870e0dbb46eaf10faeb26d70f000" + }, + { + "logId": "38494492241415594", + "concreteTypeId": "0088c28967dbcdaa34626c7e915e44b2afe72f12415f0e31edc0b5ce70e7c6dc" + }, + { + "logId": "1515152261580153489", + "concreteTypeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + }, + { + "logId": "5972461853438630448", + "concreteTypeId": "52e2726988c7da304606fbe4ed696efac04beb29e9a22e15778f8a0539c9cb94" + }, + { + "logId": "9774045287303884155", + "concreteTypeId": "87a4626758542d7b6a03099839e440a052a4d5a00e3abfdf22bcc564ca19a4fd" + }, + { + "logId": "17696813611398264200", + "concreteTypeId": "f597b637c3b0f588fb8d7086c6f4735caa3122b85f0423b82e489f9bb58e2308" + }, + { + "logId": "12204227005198389688", + "concreteTypeId": "a95e1fcceb1451b8a76471f593f66c4a52ca04bde3c227c746ad7aaf988de5c6" + }, + { + "logId": "17477056209248181856", + "concreteTypeId": "f28afa065fc5de602456160c4155d4de7d9a61e85a995d209a14eab0b34bd6b4" + }, + { + "logId": "4103440364041737946", + "concreteTypeId": "38f2594527b516dab2c81b31356901226242d7c32554877e36797c6b23969237" + }, + { + "logId": "13264875749739450689", + "concreteTypeId": "b8164e36cce9d14142824b5cc55aebc1272036775b966af82c49c78aff114006" + }, + { + "logId": "6429795790595785041", + "concreteTypeId": "593b39347cc381516d8ed1f8e5e628a8d455bd3f833bd9dfdd5165ba16f9f980" + }, + { + "logId": "13866877265493744985", + "concreteTypeId": "c0710b6731b1dd59799cf6bef33eee3b3b04a2e40e80a0724090215bbf2ca974" + }, + { + "logId": "8385180437869151632", + "concreteTypeId": "745e252e80bec590efc3999ae943f07ccea4d5b45b00bb6575499b64abdd3322" + }, + { + "logId": "14832741149864513620", + "concreteTypeId": "cdd87b7d12fe505416570c294c884bca819364863efe3bf539245fa18515fbbb" + }, + { + "logId": "3008693953818743129", + "concreteTypeId": "29c10735d33b5159f0c71ee1dbd17b36a3e69e41f00fab0d42e1bd9f428d8a54" + }, + { + "logId": "6390060985836259181", + "concreteTypeId": "58ae0e9c51da476db1149dd48b1cda83a12187df4c049f8df5021f0b1696fb93" + }, + { + "logId": "11107063318498994310", + "concreteTypeId": "9a24373d8ce7688609717fd5a9b75360cd8a6bdb224ae095f0c05cc891cadd42" + }, + { + "logId": "2393365693554672043", + "concreteTypeId": "2136f16aedeec1ab7f1d912c57cc0566e86c36f20a2cb313e3d679cead6a0e61" + }, + { + "logId": "11445580549060683374", + "concreteTypeId": "9ed6dede3ae1e66e0f951e860e863f77fb9b9499f4666a1123bf244c4a201669" + }, + { + "logId": "176438282157896578", + "concreteTypeId": "0272d5aecccd33822994b7be1494b72ec9ad860e4cb51f043deda7ac1e2cae26" + }, + { + "logId": "406535131101199095", + "concreteTypeId": "05a44d8c3e00faf7ed545823b7a2b32723545d8715d87a0ab3cf65904948e8d2" + }, + { + "logId": "15054851639520017915", + "concreteTypeId": "d0ed93cd57cc3dfb1c119b22bf63f5d215122402536127bf17087ca6d8186307" + }, + { + "logId": "12356980511120185571", + "concreteTypeId": "ab7cd04e05be58e3fc15d424c2c4a57f824a2a2d97d67252440a3925ebdc1335" + }, + { + "logId": "3287912245613454270", + "concreteTypeId": "2da102c46c7263beeed95818cd7bee801716ba8303dddafdcd0f6c9efda4a0f1" + }, + { + "logId": "2693553771067460161", + "concreteTypeId": "25616ce23be3ca41fd26f8c546c053ec256f8fb5593036f60c9c417e86dcc92e" + }, + { + "logId": "2169745815365986704", + "concreteTypeId": "1e1c7c52c1c7a9901681337f8669555f62aac58911332c9ff6b4ea8e73786570" + }, + { + "logId": "11132648958528852192", + "concreteTypeId": "9a7f1d3e963c10e0a4ea70a8e20a4813d1dc5682e28f74cb102ae50d32f7f98c" + }, + { + "logId": "9549741647838268318", + "concreteTypeId": "84877f6e98274b9e4721db68b4c0bdb9e52b8e9572c5bd7811c07a41ced882c7" + }, + { + "logId": "9909809838135789262", + "concreteTypeId": "8986b78b19c146ced98454ffbe32d17f1e9e468128ba8dcb2a32f16aaf208db2" + }, + { + "logId": "14098361245275318101", + "concreteTypeId": "c3a770db33c4e755ad3ba4586b9c10520511fb80b767feb57dd41da1a88f6978" + }, + { + "logId": "8988117408309506793", + "concreteTypeId": "7cbc352969caf2e9caa716d89c3be65e707447e2a197c779cc4ef382d0602de6" + }, + { + "logId": "17263266271595476800", + "concreteTypeId": "ef937135956e37401e0bc90406ca8becda92d1b4e387fe938ddef8d27ee192a1" + }, + { + "logId": "2991584087911992109", + "concreteTypeId": "29843de0bbb48b2d3c601b61823f2e106cfa5833e18b482571f1fa58b507a7ad" + }, + { + "logId": "15359085500973571070", + "concreteTypeId": "d5266ee32061dbfec8c96f2ba8a054243875e4e6a586104d6366b11e3bc86f2e" + }, + { + "logId": "6096764540904137535", + "concreteTypeId": "549c0f0c43c9e33f7e958e0473d84e78eca4737f9f159c64614ca5dff2d91b60" + }, + { + "logId": "16681458389498941754", + "concreteTypeId": "e7807205e98b513a8beeb5bcf446f0b2d684d0dce6bfeff0f324fa31df1b8948" + }, + { + "logId": "9678575818972079706", + "concreteTypeId": "8651356d9584265a78cb58de01c22d405dfc7006ea2f5f74fddcbe3f047f109a" + }, + { + "logId": "15006799511514667686", + "concreteTypeId": "d042dca573565aa653542415397934b3e95452917664e04d27c32a22091aa9a5" + }, + { + "logId": "621263945896771922", + "concreteTypeId": "089f2c4466ef415255917812d05776ebcb386be53e5f94bdad1ca8095f02845c" + }, + { + "logId": "18160646294966696875", + "concreteTypeId": "fc0793960700fbabd2722134cff2a546743fc832b98d89aac1ec30fc669fd698" + }, + { + "logId": "16916744526725816430", + "concreteTypeId": "eac45984af86a06e11e1c5ff744bc1242e004db8404308cb7e574b4c2afaf621" + }, + { + "logId": "8728991397092492258", + "concreteTypeId": "79239b6d6f2383e2cfbaf4da7fdf7ee7fb59b7bf517acfff2d9433e9e76e8fc4" + }, + { + "logId": "8036493118938929554", + "concreteTypeId": "6f875be99a39d9920569678a34ffce676a6c3e14b958910db250b9cb4957157f" + }, + { + "logId": "2992671284987479467", + "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef" + }, + { + "logId": "1970142151624111756", + "concreteTypeId": "1b5759d94094368cfd443019e7ca5ec4074300e544e5ea993a979f5da627261e" + }, + { + "logId": "15520703124961489725", + "concreteTypeId": "d7649d428b9ff33d188ecbf38a7e4d8fd167fa01b2e10fe9a8f9308e52f1d7cc" + }, + { + "logId": "14454674236531057292", + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + }, + { + "logId": "7752900403879318547", + "concreteTypeId": "6b97d5d738359413c9fac402aced252c23902c28382469ffe27f07381e9f6f31" + }, + { + "logId": "16171443785104013487", + "concreteTypeId": "e06c82714c52b8afd2293d5d37d05783d09d71c956311c6050ac012cab06364e" + }, + { + "logId": "13897586369399989020", + "concreteTypeId": "c0de252b9f65a31c6d03071b4b18a935c88c5bb0b2401a447fd30d342fd5a04d" + }, + { + "logId": "2855558404146077188", + "concreteTypeId": "27a0fb3d3a821e04e7a3f17ab6a617f0eb10f11e6eeb0f2c0ff9e6237207319e" + }, + { + "logId": "10477818057471029201", + "concreteTypeId": "9168b00268bbefd158090041178f058b032504f76c4b9644157d5d6b5b183468" + }, + { + "logId": "3330666440490685604", + "concreteTypeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d" + } + ], + "messagesTypes": [], + "configurables": [ + { + "name": "U8_VALUE", + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b", + "offset": 119320 + }, + { + "name": "BOOL_VALUE", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903", + "offset": 119288 + }, + { + "name": "B256_VALUE", + "concreteTypeId": "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b", + "offset": 119256 + }, + { + "name": "OPTION_U8_VALUE", + "concreteTypeId": "2da102c46c7263beeed95818cd7bee801716ba8303dddafdcd0f6c9efda4a0f1", + "offset": 119304 + }, + { + "name": "GENERIC_STRUCT_VALUE", + "concreteTypeId": "08dbec793087c5686c1a493513b158a999bb653126ee51151dfa85fa683edce5", + "offset": 119296 + } + ] +} \ No newline at end of file diff --git a/packages/fuel-gauge/src/abi/fixtures/contract-bytecode.txt b/packages/fuel-gauge/src/abi/fixtures/contract-bytecode.txt new file mode 100644 index 00000000000..c62f31cde79 --- /dev/null +++ b/packages/fuel-gauge/src/abi/fixtures/contract-bytecode.txt @@ -0,0 +1,14 @@ +/* Autogenerated file. Do not edit manually. */ + +/* eslint-disable eslint-comments/no-unlimited-disable */ +/* eslint-disable */ + +/* + Fuels version: 0.94.8 + Forc version: 0.64.0 +*/ + + +import { decompressBytecode } from "fuels"; + +export const bytecode = decompressBytecode("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"); \ No newline at end of file diff --git a/packages/fuel-gauge/src/abi/fixtures/contract-factory.txt b/packages/fuel-gauge/src/abi/fixtures/contract-factory.txt new file mode 100644 index 00000000000..102c0cd954f --- /dev/null +++ b/packages/fuel-gauge/src/abi/fixtures/contract-factory.txt @@ -0,0 +1,44 @@ +/* Autogenerated file. Do not edit manually. */ + +/* eslint-disable eslint-comments/no-unlimited-disable */ +/* eslint-disable */ + +/* + Fuels version: 0.94.8 + Forc version: 0.64.0 +*/ + + +import { Contract, ContractFactory } from 'fuels'; +import type { Account, Provider, DeployContractOptions, DeployContractResult, StorageSlot } from 'fuels'; +import { AbiContract } from './AbiContract'; +import { bytecode } from './AbiContract-bytecode'; +import abi from './AbiContract-abi.json'; +import storageSlots from './AbiContract-storage-slots.json'; + +export class AbiContractFactory extends ContractFactory { + + static readonly bytecode = bytecode; + static readonly storageSlots: StorageSlot[] = storageSlots; + + constructor(accountOrProvider: Account | Provider) { + super(bytecode, abi, accountOrProvider); + } + + override deploy( + deployOptions?: DeployContractOptions + ): Promise> { + return super.deploy({ + storageSlots: AbiContractFactory.storageSlots, + ...deployOptions, + }); + } + + static async deploy ( + wallet: Account, + options: DeployContractOptions = {} + ): Promise> { + const factory = new AbiContractFactory(wallet); + return factory.deploy(options); + } +} diff --git a/packages/fuel-gauge/src/abi/fixtures/contract-index.txt b/packages/fuel-gauge/src/abi/fixtures/contract-index.txt new file mode 100644 index 00000000000..e245c6ade81 --- /dev/null +++ b/packages/fuel-gauge/src/abi/fixtures/contract-index.txt @@ -0,0 +1,13 @@ +/* Autogenerated file. Do not edit manually. */ + +/* eslint-disable eslint-comments/no-unlimited-disable */ +/* eslint-disable */ + +/* + Fuels version: 0.94.8 + Forc version: 0.64.0 +*/ + + +export * from './AbiContract'; +export * from './AbiContractFactory'; diff --git a/packages/fuel-gauge/src/abi/fixtures/contract-storage-slots.txt b/packages/fuel-gauge/src/abi/fixtures/contract-storage-slots.txt new file mode 100644 index 00000000000..0637a088a01 --- /dev/null +++ b/packages/fuel-gauge/src/abi/fixtures/contract-storage-slots.txt @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/packages/fuel-gauge/src/abi/fixtures/contract-types.txt b/packages/fuel-gauge/src/abi/fixtures/contract-types.txt new file mode 100644 index 00000000000..0f8baa53276 --- /dev/null +++ b/packages/fuel-gauge/src/abi/fixtures/contract-types.txt @@ -0,0 +1,373 @@ +/* Autogenerated file. Do not edit manually. */ + +/* eslint-disable eslint-comments/no-unlimited-disable */ +/* eslint-disable */ + +/* + Fuels version: 0.94.8 + Forc version: 0.64.0 +*/ + + +import type { BN, BigNumberish, Bytes, EvmAddress, RawSlice, StdString, StrSlice } from 'fuels'; +import type { ArrayOfLength, Enum, Option, Result } from '../common'; + +export enum EnumWithNative { Checked = 'Checked', Pending = 'Pending' }; +export enum ExternalEnum { A = 'A', B = 'B' }; + +export type AddressInput = { bits: string }; +export type AddressOutput = AddressInput; +export type AssetIdInput = { bits: string }; +export type AssetIdOutput = AssetIdInput; +export type ConfigurablesInput = { U8_VALUE: BigNumberish, BOOL_VALUE: boolean, B256_VALUE: string, OPTION_U8_VALUE: Option, GENERIC_STRUCT_VALUE: StructDoubleGenericInput, BigNumberish> }; +export type ConfigurablesOutput = { U8_VALUE: number, BOOL_VALUE: boolean, B256_VALUE: string, OPTION_U8_VALUE: Option, GENERIC_STRUCT_VALUE: StructDoubleGenericOutput, number> }; +export type ContractIdInput = { bits: string }; +export type ContractIdOutput = ContractIdInput; +export type EnumDoubleGenericInput = Enum<{ a: T1, b: T2 }>; +export type EnumDoubleGenericOutput = EnumDoubleGenericInput; +export type EnumWithBuiltinTypeInput = Enum<{ a: boolean, b: BigNumberish }>; +export type EnumWithBuiltinTypeOutput = Enum<{ a: boolean, b: BN }>; +export type EnumWithStructsInput = Enum<{ a: EnumWithNative, b: StructSimpleInput, c: StructDoubleGenericInput }>; +export type EnumWithStructsOutput = Enum<{ a: EnumWithNative, b: StructSimpleOutput, c: StructDoubleGenericOutput }>; +export type EnumWithVectorInput = Enum<{ a: BigNumberish, b: BigNumberish[] }>; +export type EnumWithVectorOutput = Enum<{ a: number, b: number[] }>; +export type ExternalStructInput = { value: BigNumberish }; +export type ExternalStructOutput = { value: BN }; +export type IdentityInput = Enum<{ Address: AddressInput, ContractId: ContractIdInput }>; +export type IdentityOutput = Enum<{ Address: AddressOutput, ContractId: ContractIdOutput }>; +export type StructAInput = { propA1: BigNumberish }; +export type StructAOutput = { propA1: number }; +export type StructBInput = { propB1: StructAInput, propB2: BigNumberish }; +export type StructBOutput = { propB1: StructAOutput, propB2: number }; +export type StructCInput = { propC1: StructAInput, propC2: StructBInput[], propC3: StructDInput> }; +export type StructCOutput = { propC1: StructAOutput, propC2: StructBOutput[], propC3: StructDOutput> }; +export type StructDInput = { propD1: StructEInput[], propD2: U, propD3: V }; +export type StructDOutput = { propD1: StructEOutput[], propD2: U, propD3: V }; +export type StructDoubleGenericInput = { a: T1, b: T2 }; +export type StructDoubleGenericOutput = StructDoubleGenericInput; +export type StructEInput = { propE1: StructAInput, propE2: StructBInput, propE3: T }; +export type StructEOutput = { propE1: StructAOutput, propE2: StructBOutput, propE3: T }; +export type StructFInput = { propF1: BigNumberish, propF2: T }; +export type StructFOutput = { propF1: BN, propF2: T }; +export type StructGInput = { propG1: BigNumberish }; +export type StructGOutput = { propG1: number }; +export type StructGenericWithEnumInput = { a: T1, b: EnumDoubleGenericInput }; +export type StructGenericWithEnumOutput = { a: T1, b: EnumDoubleGenericOutput }; +export type StructSimpleInput = { a: boolean, b: BigNumberish }; +export type StructSimpleOutput = { a: boolean, b: number }; +export type StructSingleGenericInput = { a: T }; +export type StructSingleGenericOutput = StructSingleGenericInput; +export type StructWithEnumArrayInput = { a: ArrayOfLength }; +export type StructWithEnumArrayOutput = StructWithEnumArrayInput; +export type StructWithGenericArrayInput = { a: ArrayOfLength, 3> }; +export type StructWithGenericArrayOutput = { a: ArrayOfLength, 3> }; +export type StructWithImplicitGenericsInput = { a: ArrayOfLength, b: [E, F] }; +export type StructWithImplicitGenericsOutput = StructWithImplicitGenericsInput; +export type StructWithMultiOptionInput = { a: ArrayOfLength, 5> }; +export type StructWithMultiOptionOutput = { a: ArrayOfLength, 5> }; +export type StructWithNestedArrayInput = { a: ArrayOfLength, string>, 2> }; +export type StructWithNestedArrayOutput = { a: ArrayOfLength, string>, 2> }; +export type StructWithNestedStructInput = { a: StructDoubleGenericInput, BigNumberish> }; +export type StructWithNestedStructOutput = { a: StructDoubleGenericOutput, number> }; +export type StructWithNestedTupleInput = { a: [BigNumberish, StructSingleGenericInput>, string] }; +export type StructWithNestedTupleOutput = { a: [number, StructSingleGenericOutput>, string] }; +export type StructWithSingleOptionInput = { a: Option }; +export type StructWithSingleOptionOutput = { a: Option }; +export type StructWithVectorInput = { a: BigNumberish, b: BigNumberish[] }; +export type StructWithVectorOutput = { a: number, b: number[] }; + +export interface AbiContractTypes { + functions: { + configurables: { + inputs: []; + output: ConfigurablesOutput; + }; + multi_arg_b256_bool: { + inputs: [x: string, y: boolean]; + output: [string, boolean]; + }; + multi_arg_complex: { + inputs: [x: StructDoubleGenericInput, BigNumberish>, y: ArrayOfLength, 4>, z: [string, boolean], a: StructSimpleInput]; + output: [StructDoubleGenericOutput, number>, ArrayOfLength, 4>, [string, boolean], StructSimpleOutput]; + }; + multi_arg_str_str: { + inputs: [x: string, y: string]; + output: [string, string]; + }; + multi_arg_struct_vector: { + inputs: [x: StructSimpleInput, y: BigNumberish[]]; + output: [StructSimpleOutput, number[]]; + }; + multi_arg_u32_vector_vector: { + inputs: [x: BigNumberish, y: BigNumberish[], z: BigNumberish[]]; + output: [number, BN[], BN[]]; + }; + multi_arg_u64_struct: { + inputs: [x: BigNumberish, y: StructSimpleInput]; + output: [BN, StructSimpleOutput]; + }; + multi_arg_u64_u64: { + inputs: [x: BigNumberish, y: BigNumberish]; + output: BN; + }; + multi_arg_vector_b256: { + inputs: [x: BigNumberish[], y: string]; + output: [number[], string]; + }; + multi_arg_vector_vector: { + inputs: [x: BigNumberish[], y: BigNumberish[]]; + output: [number[], number[]]; + }; + types_address: { + inputs: [x: AddressInput]; + output: AddressOutput; + }; + types_alias_tuple_with_native_types: { + inputs: [x: [AssetIdInput, AssetIdInput, boolean]]; + output: [AssetIdOutput, AssetIdOutput, boolean]; + }; + types_array: { + inputs: [x: ArrayOfLength]; + output: ArrayOfLength; + }; + types_array_struct: { + inputs: [x: ArrayOfLength]; + output: ArrayOfLength; + }; + types_array_with_generic_struct: { + inputs: [x: ArrayOfLength, string>, 2>]; + output: ArrayOfLength, string>, 2>; + }; + types_array_with_vector: { + inputs: [x: ArrayOfLength]; + output: ArrayOfLength; + }; + types_asset_id: { + inputs: [x: AssetIdInput]; + output: AssetIdOutput; + }; + types_b256: { + inputs: [x: string]; + output: string; + }; + types_b512: { + inputs: [x: string]; + output: string; + }; + types_bool: { + inputs: [x: boolean]; + output: boolean; + }; + types_bytes: { + inputs: [x: Bytes]; + output: Bytes; + }; + types_contract_id: { + inputs: [x: ContractIdInput]; + output: ContractIdOutput; + }; + types_enum: { + inputs: [x: EnumWithNative]; + output: EnumWithNative; + }; + types_enum_external: { + inputs: [x: ExternalEnum]; + output: ExternalEnum; + }; + types_enum_with_builtin_type: { + inputs: [x: EnumWithBuiltinTypeInput]; + output: EnumWithBuiltinTypeOutput; + }; + types_enum_with_structs: { + inputs: [x: EnumWithStructsInput]; + output: EnumWithStructsOutput; + }; + types_enum_with_vector: { + inputs: [x: EnumWithVectorInput]; + output: EnumWithVectorOutput; + }; + types_evm_address: { + inputs: [x: EvmAddress]; + output: EvmAddress; + }; + types_generic_enum: { + inputs: [x: EnumDoubleGenericInput]; + output: EnumDoubleGenericOutput; + }; + types_identity_address: { + inputs: [x: IdentityInput]; + output: IdentityOutput; + }; + types_identity_contract_id: { + inputs: [x: IdentityInput]; + output: IdentityOutput; + }; + types_option: { + inputs: [x?: Option]; + output: Option; + }; + types_option_struct: { + inputs: [x?: Option]; + output: Option; + }; + types_raw_slice: { + inputs: [x: RawSlice]; + output: RawSlice; + }; + types_result: { + inputs: [x: Result]; + output: Result; + }; + types_std_string: { + inputs: [x: StdString]; + output: StdString; + }; + types_str: { + inputs: [x: string]; + output: string; + }; + types_str_slice: { + inputs: [x: StrSlice]; + output: StrSlice; + }; + types_struct_double_generic: { + inputs: [x: StructGenericWithEnumInput]; + output: StructGenericWithEnumOutput; + }; + types_struct_external: { + inputs: [x: ExternalStructInput]; + output: ExternalStructOutput; + }; + types_struct_generic: { + inputs: [x: StructSingleGenericInput]; + output: StructSingleGenericOutput; + }; + types_struct_simple: { + inputs: [x: StructSimpleInput]; + output: StructSimpleOutput; + }; + types_struct_with_array: { + inputs: [x: StructWithGenericArrayInput]; + output: StructWithGenericArrayOutput; + }; + types_struct_with_array_of_enums: { + inputs: [x: StructWithEnumArrayInput]; + output: StructWithEnumArrayOutput; + }; + types_struct_with_complex_nested_struct: { + inputs: [x: StructDInput>]; + output: boolean; + }; + types_struct_with_implicit_generics: { + inputs: [x: StructWithImplicitGenericsInput]; + output: StructWithImplicitGenericsOutput; + }; + types_struct_with_multiple_struct_params: { + inputs: [x: StructAInput, y: StructBInput, z: StructCInput]; + output: boolean; + }; + types_struct_with_nested_array: { + inputs: [x: StructWithNestedArrayInput]; + output: StructWithNestedArrayOutput; + }; + types_struct_with_nested_struct: { + inputs: [x: StructWithNestedStructInput]; + output: StructWithNestedStructOutput; + }; + types_struct_with_nested_tuple: { + inputs: [x: StructWithNestedTupleInput]; + output: StructWithNestedTupleOutput; + }; + types_struct_with_single_option: { + inputs: [x: StructWithSingleOptionInput]; + output: StructWithSingleOptionOutput; + }; + types_struct_with_tuple: { + inputs: [x: StructSingleGenericInput<[boolean, BigNumberish]>]; + output: StructSingleGenericOutput<[boolean, BN]>; + }; + types_struct_with_vector: { + inputs: [x: StructWithVectorInput]; + output: StructWithVectorOutput; + }; + types_tuple: { + inputs: [x: [BigNumberish, BigNumberish, BigNumberish]]; + output: [number, number, number]; + }; + types_tuple_complex: { + inputs: [x: [BigNumberish, StructSingleGenericInput>, string]]; + output: [number, StructSingleGenericOutput>, string]; + }; + types_tuple_with_native_types: { + inputs: [x: [AssetIdInput, AssetIdInput, boolean]]; + output: [AssetIdOutput, AssetIdOutput, boolean]; + }; + types_u16: { + inputs: [x: BigNumberish]; + output: number; + }; + types_u256: { + inputs: [x: BigNumberish]; + output: BN; + }; + types_u32: { + inputs: [x: BigNumberish]; + output: number; + }; + types_u64: { + inputs: [x: BigNumberish]; + output: BN; + }; + types_u8: { + inputs: [x: BigNumberish]; + output: number; + }; + types_value_then_value_then_void_then_void: { + inputs: [x: BigNumberish, y: BigNumberish, z?: undefined, a?: undefined]; + output: void; + }; + types_value_then_void: { + inputs: [x: BigNumberish, y?: undefined]; + output: void; + }; + types_value_then_void_then_value: { + inputs: [x: BigNumberish, y: undefined, z: BigNumberish]; + output: void; + }; + types_vector_boolean: { + inputs: [x: boolean[]]; + output: boolean[]; + }; + types_vector_inside_vector: { + inputs: [x: BigNumberish[][]]; + output: number[][]; + }; + types_vector_option: { + inputs: [x: StructWithMultiOptionInput[]]; + output: StructWithMultiOptionOutput[]; + }; + types_vector_u8: { + inputs: [x: BigNumberish[]]; + output: number[]; + }; + types_vector_with_struct: { + inputs: [x: StructSimpleInput[]]; + output: StructSimpleOutput[]; + }; + types_void: { + inputs: [x?: undefined]; + output: void; + }; + types_void_then_value: { + inputs: [x: undefined, y: BigNumberish]; + output: void; + }; + }; + configurables: Partial<{ + U8_VALUE: BigNumberish; + BOOL_VALUE: boolean; + B256_VALUE: string; + OPTION_U8_VALUE: Option; + GENERIC_STRUCT_VALUE: StructDoubleGenericInput, BigNumberish>; + }>; +} \ No newline at end of file diff --git a/packages/fuel-gauge/src/abi/fixtures/contract.txt b/packages/fuel-gauge/src/abi/fixtures/contract.txt new file mode 100644 index 00000000000..1ebfb7e0b9d --- /dev/null +++ b/packages/fuel-gauge/src/abi/fixtures/contract.txt @@ -0,0 +1,38 @@ +/* Autogenerated file. Do not edit manually. */ + +/* eslint-disable eslint-comments/no-unlimited-disable */ +/* eslint-disable */ + +/* + Fuels version: 0.94.8 + Forc version: 0.64.0 +*/ + + +import { Contract, Interface } from "fuels"; +import type { AbstractAddress, Account, Provider } from 'fuels'; +import type { AbiContractTypes } from './AbiContractTypes'; +import type { InterfaceFunctionMapper, ProgramFunctionMapper } from '../common'; +import abi from './AbiContract-abi.json'; + +export class AbiContractInterface extends Interface { + declare functions: InterfaceFunctionMapper; + + constructor() { + super(abi); + } +} + +export class AbiContract extends Contract { + declare interface: AbiContractInterface; + declare functions: ProgramFunctionMapper; + + public static readonly abi = abi; + + constructor( + id: string | AbstractAddress, + accountOrProvider: Account | Provider, + ) { + super(id, abi, accountOrProvider); + } +} \ No newline at end of file diff --git a/packages/fuel-gauge/src/abi/fixtures/index.txt b/packages/fuel-gauge/src/abi/fixtures/index.txt new file mode 100644 index 00000000000..e1de8a583ec --- /dev/null +++ b/packages/fuel-gauge/src/abi/fixtures/index.txt @@ -0,0 +1,14 @@ +/* Autogenerated file. Do not edit manually. */ + +/* eslint-disable eslint-comments/no-unlimited-disable */ +/* eslint-disable */ + +/* + Fuels version: 0.94.8 + Forc version: 0.64.0 +*/ + + +export * from './contracts'; +export * from './predicates'; +export * from './scripts'; diff --git a/packages/fuel-gauge/src/abi/fixtures/predicate-abi.txt b/packages/fuel-gauge/src/abi/fixtures/predicate-abi.txt new file mode 100644 index 00000000000..81c9c403b53 --- /dev/null +++ b/packages/fuel-gauge/src/abi/fixtures/predicate-abi.txt @@ -0,0 +1,272 @@ +{ + "programType": "predicate", + "specVersion": "1", + "encodingVersion": "1", + "concreteTypes": [ + { + "type": "b256", + "concreteTypeId": "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b" + }, + { + "type": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + }, + { + "type": "enum MyGenericEnum", + "concreteTypeId": "9d8b215a39e5f5f10fc294290b6ea401edbd53056cfe6e0c9331157abdbc87d0", + "metadataTypeId": 1, + "typeArguments": [ + "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef" + ] + }, + { + "type": "enum std::option::Option", + "concreteTypeId": "2da102c46c7263beeed95818cd7bee801716ba8303dddafdcd0f6c9efda4a0f1", + "metadataTypeId": 2, + "typeArguments": [ + "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + ] + }, + { + "type": "enum std::result::Result,u64>", + "concreteTypeId": "85dace7aaa469c8bb476be79ddec34883ef101b3cde470636f47e299bfcdc3da", + "metadataTypeId": 3, + "typeArguments": [ + "c397d34a45fb343f8315bb5af5eed88da9f13347c765e2d86089d99dbf952ef2", + "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + ] + }, + { + "type": "str[4]", + "concreteTypeId": "94f0fa95c830be5e4f711963e83259fe7e8bc723278ab6ec34449e791a99b53a" + }, + { + "type": "struct Configurables", + "concreteTypeId": "2770b4001b55ea9452a58b5063175844ad76bfd1bc30288792fe8962ef9d4169", + "metadataTypeId": 7 + }, + { + "type": "struct MyGenericStruct", + "concreteTypeId": "c397d34a45fb343f8315bb5af5eed88da9f13347c765e2d86089d99dbf952ef2", + "metadataTypeId": 8, + "typeArguments": [ + "94f0fa95c830be5e4f711963e83259fe7e8bc723278ab6ec34449e791a99b53a" + ] + }, + { + "type": "struct Validation", + "concreteTypeId": "c7cf8c2be429c961ccb5c32a2951a58f1bb2a4f748ffac2206d4d1761082beaa", + "metadataTypeId": 9 + }, + { + "type": "struct std::vec::Vec", + "concreteTypeId": "9b3ded85b5c6e502acc8b7834d5d6df0460764a7a47837eb2b32d4566c4d477b", + "metadataTypeId": 11, + "typeArguments": [ + "c7cf8c2be429c961ccb5c32a2951a58f1bb2a4f748ffac2206d4d1761082beaa" + ] + }, + { + "type": "u16", + "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef" + }, + { + "type": "u64", + "concreteTypeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + }, + { + "type": "u8", + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + } + ], + "metadataTypes": [ + { + "type": "()", + "metadataTypeId": 0 + }, + { + "type": "enum MyGenericEnum", + "metadataTypeId": 1, + "components": [ + { + "name": "a", + "typeId": 5 + } + ], + "typeParameters": [ + 5 + ] + }, + { + "type": "enum std::option::Option", + "metadataTypeId": 2, + "components": [ + { + "name": "None", + "typeId": 0 + }, + { + "name": "Some", + "typeId": 5 + } + ], + "typeParameters": [ + 5 + ] + }, + { + "type": "enum std::result::Result", + "metadataTypeId": 3, + "components": [ + { + "name": "Ok", + "typeId": 5 + }, + { + "name": "Err", + "typeId": 4 + } + ], + "typeParameters": [ + 5, + 4 + ] + }, + { + "type": "generic E", + "metadataTypeId": 4 + }, + { + "type": "generic T", + "metadataTypeId": 5 + }, + { + "type": "raw untyped ptr", + "metadataTypeId": 6 + }, + { + "type": "struct Configurables", + "metadataTypeId": 7, + "components": [ + { + "name": "U8_VALUE", + "typeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + }, + { + "name": "B256_VALUE", + "typeId": "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b" + } + ] + }, + { + "type": "struct MyGenericStruct", + "metadataTypeId": 8, + "components": [ + { + "name": "a", + "typeId": 5 + } + ], + "typeParameters": [ + 5 + ] + }, + { + "type": "struct Validation", + "metadataTypeId": 9, + "components": [ + { + "name": "has_account", + "typeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + }, + { + "name": "total_complete", + "typeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + } + ] + }, + { + "type": "struct std::vec::RawVec", + "metadataTypeId": 10, + "components": [ + { + "name": "ptr", + "typeId": 6 + }, + { + "name": "cap", + "typeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + } + ], + "typeParameters": [ + 5 + ] + }, + { + "type": "struct std::vec::Vec", + "metadataTypeId": 11, + "components": [ + { + "name": "buf", + "typeId": 10, + "typeArguments": [ + { + "name": "", + "typeId": 5 + } + ] + }, + { + "name": "len", + "typeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + } + ], + "typeParameters": [ + 5 + ] + } + ], + "functions": [ + { + "inputs": [ + { + "name": "configurables", + "concreteTypeId": "2770b4001b55ea9452a58b5063175844ad76bfd1bc30288792fe8962ef9d4169" + }, + { + "name": "vec", + "concreteTypeId": "9b3ded85b5c6e502acc8b7834d5d6df0460764a7a47837eb2b32d4566c4d477b" + }, + { + "name": "enm", + "concreteTypeId": "9d8b215a39e5f5f10fc294290b6ea401edbd53056cfe6e0c9331157abdbc87d0" + }, + { + "name": "opt", + "concreteTypeId": "2da102c46c7263beeed95818cd7bee801716ba8303dddafdcd0f6c9efda4a0f1" + }, + { + "name": "res", + "concreteTypeId": "85dace7aaa469c8bb476be79ddec34883ef101b3cde470636f47e299bfcdc3da" + } + ], + "name": "main", + "output": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903", + "attributes": null + } + ], + "loggedTypes": [], + "messagesTypes": [], + "configurables": [ + { + "name": "U8_VALUE", + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b", + "offset": 1936 + }, + { + "name": "B256_VALUE", + "concreteTypeId": "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b", + "offset": 1904 + } + ] +} \ No newline at end of file diff --git a/packages/fuel-gauge/src/abi/fixtures/predicate-index.txt b/packages/fuel-gauge/src/abi/fixtures/predicate-index.txt new file mode 100644 index 00000000000..68281d5ac1d --- /dev/null +++ b/packages/fuel-gauge/src/abi/fixtures/predicate-index.txt @@ -0,0 +1,12 @@ +/* Autogenerated file. Do not edit manually. */ + +/* eslint-disable eslint-comments/no-unlimited-disable */ +/* eslint-disable */ + +/* + Fuels version: 0.94.8 + Forc version: 0.64.0 +*/ + + +export * from './AbiPredicate'; diff --git a/packages/fuel-gauge/src/abi/fixtures/predicate-types.txt b/packages/fuel-gauge/src/abi/fixtures/predicate-types.txt new file mode 100644 index 00000000000..89561596428 --- /dev/null +++ b/packages/fuel-gauge/src/abi/fixtures/predicate-types.txt @@ -0,0 +1,36 @@ +/* Autogenerated file. Do not edit manually. */ + +/* eslint-disable eslint-comments/no-unlimited-disable */ +/* eslint-disable */ + +/* + Fuels version: 0.94.8 + Forc version: 0.64.0 +*/ + + +import type { BN, BigNumberish } from 'fuels'; +import type { Enum, Option, Result } from '../common'; + + +export type ConfigurablesInput = { U8_VALUE: BigNumberish, B256_VALUE: string }; +export type ConfigurablesOutput = { U8_VALUE: number, B256_VALUE: string }; +export type MyGenericEnumInput = Enum<{ a: T }>; +export type MyGenericEnumOutput = MyGenericEnumInput; +export type MyGenericStructInput = { a: T }; +export type MyGenericStructOutput = MyGenericStructInput; +export type ValidationInput = { has_account: boolean, total_complete: BigNumberish }; +export type ValidationOutput = { has_account: boolean, total_complete: BN }; + +export interface AbiPredicateTypes { + functions: { + main: { + inputs: [configurables: ConfigurablesInput, vec: ValidationInput[], enm: MyGenericEnumInput, opt: Option, res: Result, BigNumberish>]; + output: boolean; + }; + }; + configurables: Partial<{ + U8_VALUE: BigNumberish; + B256_VALUE: string; + }>; +} \ No newline at end of file diff --git a/packages/fuel-gauge/src/abi/fixtures/predicate.txt b/packages/fuel-gauge/src/abi/fixtures/predicate.txt new file mode 100644 index 00000000000..4af2eee2d5d --- /dev/null +++ b/packages/fuel-gauge/src/abi/fixtures/predicate.txt @@ -0,0 +1,36 @@ +/* Autogenerated file. Do not edit manually. */ + +/* eslint-disable eslint-comments/no-unlimited-disable */ +/* eslint-disable */ + +/* + Fuels version: 0.94.8 + Forc version: 0.64.0 +*/ + + +import { Predicate } from 'fuels'; +import type { PredicateParams } from 'fuels'; +import abi from './AbiPredicate-abi.json'; +import { bytecode } from './AbiPredicate-bytecode'; +import type { AbiPredicateTypes } from './AbiPredicateTypes'; + +export type AbiPredicateParameters = Omit< + PredicateParams< + AbiPredicateTypes['functions']['main']['inputs'], + AbiPredicateTypes['configurables'] + >, + 'abi' | 'bytecode' +>; + +export class AbiPredicate extends Predicate< + AbiPredicateTypes['functions']['main']['inputs'], + AbiPredicateTypes['configurables'] +> { + public static readonly abi = abi; + public static readonly bytecode = bytecode; + + constructor(params: AbiPredicateParameters) { + super({ abi, bytecode, ...params }); + } +} \ No newline at end of file diff --git a/packages/fuel-gauge/src/abi/fixtures/script-abi.txt b/packages/fuel-gauge/src/abi/fixtures/script-abi.txt new file mode 100644 index 00000000000..93d5c24a82c --- /dev/null +++ b/packages/fuel-gauge/src/abi/fixtures/script-abi.txt @@ -0,0 +1,272 @@ +{ + "programType": "script", + "specVersion": "1", + "encodingVersion": "1", + "concreteTypes": [ + { + "type": "b256", + "concreteTypeId": "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b" + }, + { + "type": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + }, + { + "type": "enum MyGenericEnum", + "concreteTypeId": "9d8b215a39e5f5f10fc294290b6ea401edbd53056cfe6e0c9331157abdbc87d0", + "metadataTypeId": 1, + "typeArguments": [ + "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef" + ] + }, + { + "type": "enum std::option::Option", + "concreteTypeId": "2da102c46c7263beeed95818cd7bee801716ba8303dddafdcd0f6c9efda4a0f1", + "metadataTypeId": 2, + "typeArguments": [ + "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + ] + }, + { + "type": "enum std::result::Result,u64>", + "concreteTypeId": "85dace7aaa469c8bb476be79ddec34883ef101b3cde470636f47e299bfcdc3da", + "metadataTypeId": 3, + "typeArguments": [ + "c397d34a45fb343f8315bb5af5eed88da9f13347c765e2d86089d99dbf952ef2", + "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + ] + }, + { + "type": "str[4]", + "concreteTypeId": "94f0fa95c830be5e4f711963e83259fe7e8bc723278ab6ec34449e791a99b53a" + }, + { + "type": "struct Configurables", + "concreteTypeId": "2770b4001b55ea9452a58b5063175844ad76bfd1bc30288792fe8962ef9d4169", + "metadataTypeId": 7 + }, + { + "type": "struct MyGenericStruct", + "concreteTypeId": "c397d34a45fb343f8315bb5af5eed88da9f13347c765e2d86089d99dbf952ef2", + "metadataTypeId": 8, + "typeArguments": [ + "94f0fa95c830be5e4f711963e83259fe7e8bc723278ab6ec34449e791a99b53a" + ] + }, + { + "type": "struct Validation", + "concreteTypeId": "c7cf8c2be429c961ccb5c32a2951a58f1bb2a4f748ffac2206d4d1761082beaa", + "metadataTypeId": 9 + }, + { + "type": "struct std::vec::Vec", + "concreteTypeId": "9b3ded85b5c6e502acc8b7834d5d6df0460764a7a47837eb2b32d4566c4d477b", + "metadataTypeId": 11, + "typeArguments": [ + "c7cf8c2be429c961ccb5c32a2951a58f1bb2a4f748ffac2206d4d1761082beaa" + ] + }, + { + "type": "u16", + "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef" + }, + { + "type": "u64", + "concreteTypeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + }, + { + "type": "u8", + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + } + ], + "metadataTypes": [ + { + "type": "()", + "metadataTypeId": 0 + }, + { + "type": "enum MyGenericEnum", + "metadataTypeId": 1, + "components": [ + { + "name": "a", + "typeId": 5 + } + ], + "typeParameters": [ + 5 + ] + }, + { + "type": "enum std::option::Option", + "metadataTypeId": 2, + "components": [ + { + "name": "None", + "typeId": 0 + }, + { + "name": "Some", + "typeId": 5 + } + ], + "typeParameters": [ + 5 + ] + }, + { + "type": "enum std::result::Result", + "metadataTypeId": 3, + "components": [ + { + "name": "Ok", + "typeId": 5 + }, + { + "name": "Err", + "typeId": 4 + } + ], + "typeParameters": [ + 5, + 4 + ] + }, + { + "type": "generic E", + "metadataTypeId": 4 + }, + { + "type": "generic T", + "metadataTypeId": 5 + }, + { + "type": "raw untyped ptr", + "metadataTypeId": 6 + }, + { + "type": "struct Configurables", + "metadataTypeId": 7, + "components": [ + { + "name": "U8_VALUE", + "typeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + }, + { + "name": "B256_VALUE", + "typeId": "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b" + } + ] + }, + { + "type": "struct MyGenericStruct", + "metadataTypeId": 8, + "components": [ + { + "name": "a", + "typeId": 5 + } + ], + "typeParameters": [ + 5 + ] + }, + { + "type": "struct Validation", + "metadataTypeId": 9, + "components": [ + { + "name": "has_account", + "typeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + }, + { + "name": "total_complete", + "typeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + } + ] + }, + { + "type": "struct std::vec::RawVec", + "metadataTypeId": 10, + "components": [ + { + "name": "ptr", + "typeId": 6 + }, + { + "name": "cap", + "typeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + } + ], + "typeParameters": [ + 5 + ] + }, + { + "type": "struct std::vec::Vec", + "metadataTypeId": 11, + "components": [ + { + "name": "buf", + "typeId": 10, + "typeArguments": [ + { + "name": "", + "typeId": 5 + } + ] + }, + { + "name": "len", + "typeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + } + ], + "typeParameters": [ + 5 + ] + } + ], + "functions": [ + { + "inputs": [ + { + "name": "configurables", + "concreteTypeId": "2770b4001b55ea9452a58b5063175844ad76bfd1bc30288792fe8962ef9d4169" + }, + { + "name": "vec", + "concreteTypeId": "9b3ded85b5c6e502acc8b7834d5d6df0460764a7a47837eb2b32d4566c4d477b" + }, + { + "name": "enm", + "concreteTypeId": "9d8b215a39e5f5f10fc294290b6ea401edbd53056cfe6e0c9331157abdbc87d0" + }, + { + "name": "opt", + "concreteTypeId": "2da102c46c7263beeed95818cd7bee801716ba8303dddafdcd0f6c9efda4a0f1" + }, + { + "name": "res", + "concreteTypeId": "85dace7aaa469c8bb476be79ddec34883ef101b3cde470636f47e299bfcdc3da" + } + ], + "name": "main", + "output": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903", + "attributes": null + } + ], + "loggedTypes": [], + "messagesTypes": [], + "configurables": [ + { + "name": "U8_VALUE", + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b", + "offset": 2360 + }, + { + "name": "B256_VALUE", + "concreteTypeId": "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b", + "offset": 2328 + } + ] +} \ No newline at end of file diff --git a/packages/fuel-gauge/src/abi/fixtures/script-index.txt b/packages/fuel-gauge/src/abi/fixtures/script-index.txt new file mode 100644 index 00000000000..4ff9d0d2d23 --- /dev/null +++ b/packages/fuel-gauge/src/abi/fixtures/script-index.txt @@ -0,0 +1,12 @@ +/* Autogenerated file. Do not edit manually. */ + +/* eslint-disable eslint-comments/no-unlimited-disable */ +/* eslint-disable */ + +/* + Fuels version: 0.94.8 + Forc version: 0.64.0 +*/ + + +export * from './AbiScript'; diff --git a/packages/fuel-gauge/src/abi/fixtures/script-types.txt b/packages/fuel-gauge/src/abi/fixtures/script-types.txt new file mode 100644 index 00000000000..9df6b880c23 --- /dev/null +++ b/packages/fuel-gauge/src/abi/fixtures/script-types.txt @@ -0,0 +1,36 @@ +/* Autogenerated file. Do not edit manually. */ + +/* eslint-disable eslint-comments/no-unlimited-disable */ +/* eslint-disable */ + +/* + Fuels version: 0.94.8 + Forc version: 0.64.0 +*/ + + +import type { BN, BigNumberish } from 'fuels'; +import type { Enum, Option, Result } from '../common'; + + +export type ConfigurablesInput = { U8_VALUE: BigNumberish, B256_VALUE: string }; +export type ConfigurablesOutput = { U8_VALUE: number, B256_VALUE: string }; +export type MyGenericEnumInput = Enum<{ a: T }>; +export type MyGenericEnumOutput = MyGenericEnumInput; +export type MyGenericStructInput = { a: T }; +export type MyGenericStructOutput = MyGenericStructInput; +export type ValidationInput = { has_account: boolean, total_complete: BigNumberish }; +export type ValidationOutput = { has_account: boolean, total_complete: BN }; + +export interface AbiScriptTypes { + functions: { + main: { + inputs: [configurables: ConfigurablesInput, vec: ValidationInput[], enm: MyGenericEnumInput, opt: Option, res: Result, BigNumberish>]; + output: boolean; + }; + }; + configurables: Partial<{ + U8_VALUE: BigNumberish; + B256_VALUE: string; + }>; +} \ No newline at end of file diff --git a/packages/fuel-gauge/src/abi/fixtures/script.txt b/packages/fuel-gauge/src/abi/fixtures/script.txt new file mode 100644 index 00000000000..d9338dd6836 --- /dev/null +++ b/packages/fuel-gauge/src/abi/fixtures/script.txt @@ -0,0 +1,28 @@ +/* Autogenerated file. Do not edit manually. */ + +/* eslint-disable eslint-comments/no-unlimited-disable */ +/* eslint-disable */ + +/* + Fuels version: 0.94.8 + Forc version: 0.64.0 +*/ + + +import { Script } from 'fuels'; +import type { Account } from 'fuels'; +import abi from './AbiScript-abi.json'; +import { bytecode } from './AbiScript-bytecode'; +import type { AbiScriptTypes } from './AbiScriptTypes'; + +export class AbiScript extends Script< + AbiScriptTypes['functions']['main']['inputs'], + AbiScriptTypes['functions']['main']['output'] +> { + public static readonly abi = abi; + public static readonly bytecode = bytecode; + + constructor(wallet: Account) { + super(bytecode, abi, wallet); + } +} \ No newline at end of file diff --git a/packages/fuel-gauge/src/contract-factory.test.ts b/packages/fuel-gauge/src/contract-factory.test.ts index 8cb8300385c..0280e0e37a9 100644 --- a/packages/fuel-gauge/src/contract-factory.test.ts +++ b/packages/fuel-gauge/src/contract-factory.test.ts @@ -135,7 +135,7 @@ describe('Contract Factory', () => { using contract = await launchTestContract({ factory: StorageTestContractFactory, - storageSlots: StorageTestContract.storageSlots, + storageSlots: StorageTestContractFactory.storageSlots, }); const call1 = await contract.functions.return_var1().call(); @@ -203,7 +203,7 @@ describe('Contract Factory', () => { const { waitForResult } = await factory.deploy({ storageSlots: [ - ...StorageTestContract.storageSlots, // initializing from storage_slots.json + ...StorageTestContractFactory.storageSlots, // initializing from storage_slots.json { key: '0000000000000000000000000000000000000000000000000000000000000001', value: b256 }, // Initializing manual value ], }); @@ -510,7 +510,7 @@ describe('Contract Factory', () => { ); const deploy = await factory.deployAsBlobTx({ - storageSlots: StorageTestContract.storageSlots, + storageSlots: StorageTestContractFactory.storageSlots, }); const { contract } = await deploy.waitForResult(); diff --git a/packages/fuel-gauge/src/coverage-contract.test.ts b/packages/fuel-gauge/src/coverage-contract.test.ts index 0e8646708da..dee3d32e0e6 100644 --- a/packages/fuel-gauge/src/coverage-contract.test.ts +++ b/packages/fuel-gauge/src/coverage-contract.test.ts @@ -12,9 +12,11 @@ import { import { TestMessage, type LaunchTestNodeOptions } from 'fuels/test-utils'; import { CoverageContractFactory } from '../test/typegen/contracts'; -import type { MixedNativeEnumInput } from '../test/typegen/contracts/CoverageContract'; -import { SmallEnumInput } from '../test/typegen/contracts/Vectors'; -import type { Vec } from '../test/typegen/contracts/common'; +import { + ColorEnum, + type MixedNativeEnumInput, +} from '../test/typegen/contracts/CoverageContractTypes'; +import { SmallEnum } from '../test/typegen/contracts/VectorsTypes'; import { launchTestContract } from './utils'; @@ -26,18 +28,6 @@ const B256 = '0x000000000000000000000000000000000000000000000000000000000000002a const B512 = '0x059bc9c43ea1112f3eb2bd30415de72ed24c1c4416a1316f0f48cc6f958073f42a6d8c12e4829826316d8dcf444498717b5a2fbf27defac367271065f6a1d4a5'; -enum ColorEnumInput { - Red = 'Red', - Green = 'Green', - Blue = 'Blue', -} - -enum ColorEnumOutput { - Red = 'Red', - Green = 'Green', - Blue = 'Blue', -} - enum MixedNativeEnum { Native = 'Native', NotNative = 12, @@ -100,7 +90,7 @@ describe('Coverage Contract', { timeout: 15_000 }, () => { expect(result.value).toStrictEqual(expectedValue); - expectedValue = SmallEnumInput.Empty; + expectedValue = SmallEnum.Empty; call = await contractInstance.functions.get_empty_enum().call(); result = await call.waitForResult(); @@ -321,7 +311,7 @@ describe('Coverage Contract', { timeout: 15_000 }, () => { it('should test enum < 8 byte variable type', async () => { using contractInstance = await setupContract(); - const INPUT = SmallEnumInput.Empty; + const INPUT = SmallEnum.Empty; const { waitForResult } = await contractInstance.functions.echo_enum_small(INPUT).call(); const { value } = await waitForResult(); expect(value).toStrictEqual(INPUT); @@ -718,34 +708,26 @@ describe('Coverage Contract', { timeout: 15_000 }, () => { it('should test native enum [Red->Green]', async () => { using contractInstance = await setupContract(); - const INPUT: ColorEnumInput = ColorEnumInput.Red; - const OUTPUT: ColorEnumOutput = ColorEnumOutput.Green; - const { waitForResult } = await contractInstance.functions.color_enum(INPUT).call(); + const { waitForResult } = await contractInstance.functions.color_enum(ColorEnum.Red).call(); const { value } = await waitForResult(); - expect(value).toStrictEqual(OUTPUT); + expect(value).toStrictEqual(ColorEnum.Green); }); it('should test native enum [Green->Blue]', async () => { using contractInstance = await setupContract(); - const INPUT: ColorEnumInput = ColorEnumInput.Green; - const OUTPUT: ColorEnumOutput = ColorEnumOutput.Blue; - - const { waitForResult } = await contractInstance.functions.color_enum(INPUT).call(); + const { waitForResult } = await contractInstance.functions.color_enum(ColorEnum.Green).call(); const { value } = await waitForResult(); - expect(value).toStrictEqual(OUTPUT); + expect(value).toStrictEqual(ColorEnum.Blue); }); it('should test native enum [Blue->Red]', async () => { using contractInstance = await setupContract(); - const INPUT: ColorEnumInput = ColorEnumInput.Blue; - const OUTPUT: ColorEnumOutput = ColorEnumOutput.Red; - - const { waitForResult } = await contractInstance.functions.color_enum(INPUT).call(); + const { waitForResult } = await contractInstance.functions.color_enum(ColorEnum.Blue).call(); const { value } = await waitForResult(); - expect(value).toStrictEqual(OUTPUT); + expect(value).toStrictEqual(ColorEnum.Red); }); it('should test mixed native enum [Native->NotNative]', async () => { @@ -825,7 +807,7 @@ describe('Coverage Contract', { timeout: 15_000 }, () => { it('should support array in vec', async () => { using contractInstance = await setupContract(); - const INPUT: [Vec, Vec] = [ + const INPUT: [Array, Array] = [ [0, 1, 2], [0, 1, 2], ]; @@ -869,14 +851,14 @@ describe('Coverage Contract', { timeout: 15_000 }, () => { contractInstance.functions.echo_b256_middle(INPUT_A, INPUT_B, INPUT_C, INPUT_D), contractInstance.functions.echo_u8(13), contractInstance.functions.echo_u8(23), - contractInstance.functions.echo_enum_small(SmallEnumInput.Empty), + contractInstance.functions.echo_enum_small(SmallEnum.Empty), contractInstance.functions.echo_b256_middle(INPUT_B, INPUT_A, INPUT_C, INPUT_D), ]) .call(); const { value: results } = await waitForResult(); - expect(results).toStrictEqual([INPUT_B, 13, 23, SmallEnumInput.Empty, INPUT_A]); + expect(results).toStrictEqual([INPUT_B, 13, 23, SmallEnum.Empty, INPUT_A]); }); it('should handle multiple calls [with vectors + stack data first]', async () => { @@ -891,7 +873,7 @@ describe('Coverage Contract', { timeout: 15_000 }, () => { .multiCall([ contractInstance.functions.echo_u8(1), contractInstance.functions.echo_u8(2), - contractInstance.functions.echo_enum_small(SmallEnumInput.Empty), + contractInstance.functions.echo_enum_small(SmallEnum.Empty), contractInstance.functions.echo_b256_middle(INPUT_A, INPUT_B, INPUT_C, INPUT_D), contractInstance.functions.echo_b256_middle(INPUT_B, INPUT_A, INPUT_C, INPUT_D), ]) @@ -899,7 +881,7 @@ describe('Coverage Contract', { timeout: 15_000 }, () => { const { value: results } = await waitForResult(); - expect(results).toStrictEqual([1, 2, SmallEnumInput.Empty, INPUT_B, INPUT_A]); + expect(results).toStrictEqual([1, 2, SmallEnum.Empty, INPUT_B, INPUT_A]); }); it('should handle an enum from a library', async () => { diff --git a/packages/fuel-gauge/src/dry-run-multiple-txs.test.ts b/packages/fuel-gauge/src/dry-run-multiple-txs.test.ts index 729f6dbd1a1..5f5346d976f 100644 --- a/packages/fuel-gauge/src/dry-run-multiple-txs.test.ts +++ b/packages/fuel-gauge/src/dry-run-multiple-txs.test.ts @@ -14,7 +14,7 @@ import { MultiTokenContractFactory, RevertErrorFactory, } from '../test/typegen/contracts'; -import type { AddressInput } from '../test/typegen/contracts/MultiTokenContract'; +import type { AddressInput } from '../test/typegen/contracts/MultiTokenContractTypes'; /** * @group node diff --git a/packages/fuel-gauge/src/min-gas.test.ts b/packages/fuel-gauge/src/min-gas.test.ts index 7eb0cfa99a7..b28f31fb825 100644 --- a/packages/fuel-gauge/src/min-gas.test.ts +++ b/packages/fuel-gauge/src/min-gas.test.ts @@ -42,7 +42,7 @@ describe('Minimum gas tests', () => { ); const { transactionRequest: request } = contractFactory.createTransactionRequest({ - storageSlots: CoverageContract.storageSlots, + storageSlots: CoverageContractFactory.storageSlots, }); const resources = await provider.getResourcesToSpend(wallet.address, [ diff --git a/packages/fuel-gauge/src/options.test.ts b/packages/fuel-gauge/src/options.test.ts index 15b1c3be5db..373635aea79 100644 --- a/packages/fuel-gauge/src/options.test.ts +++ b/packages/fuel-gauge/src/options.test.ts @@ -1,9 +1,9 @@ import type { BigNumberish } from 'fuels'; import { launchTestNode } from 'fuels/test-utils'; -import type { DeepStructInput } from '../test/typegen/contracts/Options'; +import type { Option } from '../test/typegen/common'; import { OptionsFactory } from '../test/typegen/contracts/OptionsFactory'; -import type { Option } from '../test/typegen/contracts/common'; +import type { DeepStructInput } from '../test/typegen/contracts/OptionsTypes'; import { launchTestContract } from './utils'; diff --git a/packages/fuel-gauge/src/reentrant-contract-calls.test.ts b/packages/fuel-gauge/src/reentrant-contract-calls.test.ts index d7d56989587..914ab20888d 100644 --- a/packages/fuel-gauge/src/reentrant-contract-calls.test.ts +++ b/packages/fuel-gauge/src/reentrant-contract-calls.test.ts @@ -71,7 +71,7 @@ describe('Reentrant Contract Calls', () => { StorageTestContractFactory.bytecode, StorageTestContract.abi, wallet - ).deploy({ storageSlots: StorageTestContract.storageSlots }); + ).deploy({ storageSlots: StorageTestContractFactory.storageSlots }); const { contract: storageContract } = await deploy.waitForResult(); diff --git a/packages/fuel-gauge/src/script-with-configurable.test.ts b/packages/fuel-gauge/src/script-with-configurable.test.ts index 3fdb883659c..cd93ebce39a 100644 --- a/packages/fuel-gauge/src/script-with-configurable.test.ts +++ b/packages/fuel-gauge/src/script-with-configurable.test.ts @@ -1,9 +1,9 @@ import { launchTestNode } from 'fuels/test-utils'; import { ScriptWithConfigurable } from '../test/typegen'; -import type { ScriptWithConfigurableConfigurables } from '../test/typegen/scripts/ScriptWithConfigurable'; +import type { ScriptWithConfigurableTypes } from '../test/typegen/scripts/ScriptWithConfigurableTypes'; -const defaultValues: Required = { +const defaultValues: Required = { FEE: 5, }; @@ -36,7 +36,9 @@ describe('Script With Configurable', () => { wallets: [wallet], } = launched; - const configurableConstants: Required = { FEE: 71 }; + const configurableConstants: Required = { + FEE: 71, + }; expect(configurableConstants.FEE).not.toEqual(defaultValues.FEE); @@ -57,7 +59,9 @@ describe('Script With Configurable', () => { wallets: [wallet], } = launched; - const configurableConstants: Required = { FEE: 35 }; + const configurableConstants: Required = { + FEE: 35, + }; const script = new ScriptWithConfigurable(wallet); @@ -76,7 +80,7 @@ describe('Script With Configurable', () => { wallets: [wallet], } = launched; - const configurableConstants: ScriptWithConfigurableConfigurables = { FEE: 10 }; + const configurableConstants: ScriptWithConfigurableTypes['configurables'] = { FEE: 10 }; const input = { FEE: 15 }; diff --git a/packages/fuel-gauge/src/script-with-options.test.ts b/packages/fuel-gauge/src/script-with-options.test.ts index e47cd37c08f..ac0143e6734 100644 --- a/packages/fuel-gauge/src/script-with-options.test.ts +++ b/packages/fuel-gauge/src/script-with-options.test.ts @@ -3,7 +3,7 @@ import { bn } from 'fuels'; import { launchTestNode } from 'fuels/test-utils'; import { ScriptWithOptions } from '../test/typegen'; -import type { Option } from '../test/typegen/contracts/common'; +import type { Option } from '../test/typegen/common'; /** * @group node diff --git a/packages/fuel-gauge/src/script-with-vectors.test.ts b/packages/fuel-gauge/src/script-with-vectors.test.ts index 77c4daa804c..e8c4ace2c7f 100644 --- a/packages/fuel-gauge/src/script-with-vectors.test.ts +++ b/packages/fuel-gauge/src/script-with-vectors.test.ts @@ -7,7 +7,7 @@ import { ScriptWithVectorAdvanced, ScriptWithVectorMixed, } from '../test/typegen'; -import { StateErrorInput, UserErrorInput } from '../test/typegen/scripts/ScriptWithVectorAdvanced'; +import { StateError, UserError } from '../test/typegen/scripts/ScriptWithVectorAdvancedTypes'; /** * @group node @@ -144,15 +144,15 @@ describe('Script With Vectors', () => { ]; const errors = [ - { StateError: StateErrorInput.Void }, - { StateError: StateErrorInput.Pending }, - { StateError: StateErrorInput.Completed }, - { UserError: UserErrorInput.InsufficientPermissions }, - { UserError: UserErrorInput.Unauthorized }, - { UserError: UserErrorInput.Unauthorized }, - { UserError: UserErrorInput.Unauthorized }, - { UserError: UserErrorInput.Unauthorized }, - { UserError: UserErrorInput.Unauthorized }, + { StateError: StateError.Void }, + { StateError: StateError.Pending }, + { StateError: StateError.Completed }, + { UserError: UserError.InsufficientPermissions }, + { UserError: UserError.Unauthorized }, + { UserError: UserError.Unauthorized }, + { UserError: UserError.Unauthorized }, + { UserError: UserError.Unauthorized }, + { UserError: UserError.Unauthorized }, ]; const vectorOfStructs = [ diff --git a/packages/fuel-gauge/src/storage-test-contract.test.ts b/packages/fuel-gauge/src/storage-test-contract.test.ts index 64d59f4cafc..c47bddbedfe 100644 --- a/packages/fuel-gauge/src/storage-test-contract.test.ts +++ b/packages/fuel-gauge/src/storage-test-contract.test.ts @@ -15,7 +15,7 @@ describe('StorageTestContract', () => { wallets: [wallet], } = launched; - const { storageSlots } = StorageTestContract; + const { storageSlots } = StorageTestContractFactory; const factory = new ContractFactory( StorageTestContractFactory.bytecode, @@ -96,7 +96,7 @@ describe('StorageTestContract', () => { }); it('should automatically load storage slots', async () => { - const { storageSlots } = StorageTestContract; + const { storageSlots } = StorageTestContractFactory; const expectedStorageSlots = storageSlots.map(({ key, value }) => ({ key: `0x${key}`, value: `0x${value}`, diff --git a/packages/fuel-gauge/src/str-slice.test.ts b/packages/fuel-gauge/src/str-slice.test.ts index 4803da4b2cd..571ded7e7c9 100644 --- a/packages/fuel-gauge/src/str-slice.test.ts +++ b/packages/fuel-gauge/src/str-slice.test.ts @@ -2,10 +2,7 @@ import { bn } from 'fuels'; import { launchTestNode } from 'fuels/test-utils'; import { StrSliceContractFactory, ScriptStrSlice } from '../test/typegen'; -import { - PredicateStrSlice, - type PredicateStrSliceInputs, -} from '../test/typegen/predicates/PredicateStrSlice'; +import { PredicateStrSlice } from '../test/typegen/predicates/PredicateStrSlice'; /** * @group node @@ -37,10 +34,9 @@ describe('str slice', () => { provider, } = launched; - const predicateData: PredicateStrSliceInputs = ['predicate-input']; const predicate = new PredicateStrSlice({ provider, - data: predicateData, + data: ['predicate-input'], }); const baseAssetId = provider.getBaseAssetId(); diff --git a/packages/fuel-gauge/src/token-test-contract.test.ts b/packages/fuel-gauge/src/token-test-contract.test.ts index 5a930e59060..e4730bcb434 100644 --- a/packages/fuel-gauge/src/token-test-contract.test.ts +++ b/packages/fuel-gauge/src/token-test-contract.test.ts @@ -4,7 +4,7 @@ import { toHex, Wallet, bn } from 'fuels'; import { expectToThrowFuelError, launchTestNode } from 'fuels/test-utils'; import { TokenContractFactory } from '../test/typegen'; -import type { AddressInput } from '../test/typegen/contracts/TokenContract'; +import type { AddressInput } from '../test/typegen/contracts/TokenContractTypes'; /** * @group node diff --git a/packages/fuel-gauge/src/transaction-summary.test.ts b/packages/fuel-gauge/src/transaction-summary.test.ts index ca8d53e9acd..d8f66c8d95d 100644 --- a/packages/fuel-gauge/src/transaction-summary.test.ts +++ b/packages/fuel-gauge/src/transaction-summary.test.ts @@ -33,7 +33,10 @@ import { } from 'fuels/test-utils'; import { MultiTokenContractFactory, TokenContractFactory } from '../test/typegen'; -import type { ContractIdInput, TransferParamsInput } from '../test/typegen/contracts/TokenContract'; +import type { + ContractIdInput, + TransferParamsInput, +} from '../test/typegen/contracts/TokenContractTypes'; function convertBnsToHex(value: unknown): unknown { if (value instanceof BN) { diff --git a/packages/fuel-gauge/src/vectors.test.ts b/packages/fuel-gauge/src/vectors.test.ts index 9c94d76f40d..53ae7941d15 100644 --- a/packages/fuel-gauge/src/vectors.test.ts +++ b/packages/fuel-gauge/src/vectors.test.ts @@ -2,8 +2,7 @@ import { bn, randomBytes, hexlify } from 'fuels'; import type { BigNumberish, BN } from 'fuels'; import { VectorsFactory } from '../test/typegen/contracts'; -import { SmallEnumInput } from '../test/typegen/contracts/CoverageContract'; -import type { Vec } from '../test/typegen/contracts/common'; +import { SmallEnum } from '../test/typegen/contracts/CoverageContractTypes'; import { launchTestContract } from './utils'; @@ -120,7 +119,7 @@ describe('Vector Tests', () => { it('should test (u8, u8) vector input/output', async () => { using contractInstance = await setupContract(); - const INPUT: Vec<[BigNumberish, BigNumberish]> = [ + const INPUT: Array<[BigNumberish, BigNumberish]> = [ [1, 2], [3, 4], [5, 6], @@ -137,7 +136,7 @@ describe('Vector Tests', () => { it('should test (u64, u64) vector input/output', async () => { using contractInstance = await setupContract(); - const INPUT: Vec<[BigNumberish, BigNumberish]> = [ + const INPUT: Array<[BigNumberish, BigNumberish]> = [ [111, 2222], [333, 4445], [5555, 6], @@ -168,7 +167,7 @@ describe('Vector Tests', () => { it('should test [u64; 5] vector input/output', async () => { using contractInstance = await setupContract(); - const INPUT: Vec<[BigNumberish, BigNumberish, BigNumberish, BigNumberish, BigNumberish]> = [ + const INPUT: Array<[BigNumberish, BigNumberish, BigNumberish, BigNumberish, BigNumberish]> = [ [1, 2, 3, 4, 5], [500, 600, 700, 9000, 9999], [11500, 22600, 33700, 55000, 669999], @@ -183,7 +182,7 @@ describe('Vector Tests', () => { it('should test [bool; 2] vector input/output', async () => { using contractInstance = await setupContract(); - const INPUT: Vec<[boolean, boolean]> = [ + const INPUT: Array<[boolean, boolean]> = [ [true, true], [true, false], [false, true], @@ -283,12 +282,12 @@ describe('Vector Tests', () => { it('should test SmallEnum vector input/output', async () => { using contractInstance = await setupContract(); - const INPUT: Vec = [ - SmallEnumInput.Empty, - SmallEnumInput.Empty, - SmallEnumInput.Empty, - SmallEnumInput.Empty, - SmallEnumInput.Empty, + const INPUT: Array = [ + SmallEnum.Empty, + SmallEnum.Empty, + SmallEnum.Empty, + SmallEnum.Empty, + SmallEnum.Empty, ]; const { waitForResult } = await contractInstance.functions @@ -404,7 +403,7 @@ describe('Vector Tests', () => { it('should test Vec and b256 tuple input/output', async () => { using contractInstance = await setupContract(); - const INPUT: [Vec, string] = [[1, 8, 3, 2, 55, 215], hexlify(randomBytes(32))]; + const INPUT: [Array, string] = [[1, 8, 3, 2, 55, 215], hexlify(randomBytes(32))]; const { waitForResult } = await contractInstance.functions .echo_vector_and_b256_tuple(...INPUT) @@ -417,7 +416,7 @@ describe('Vector Tests', () => { it('should test two vectors tuple input/output', async () => { using contractInstance = await setupContract(); - const INPUT: [Vec, Vec] = [ + const INPUT: [Array, Array] = [ [219, 229], [1, 254, 55], ]; @@ -433,7 +432,7 @@ describe('Vector Tests', () => { it('should test u32 and three different vectors tuple input/output', async () => { using contractInstance = await setupContract(); - const INPUT: [BigNumberish, Vec, Vec, Vec] = [ + const INPUT: [BigNumberish, Array, Array, Array] = [ 91000, [true, true, false], [95000, 153333], diff --git a/packages/fuel-gauge/src/void.test.ts b/packages/fuel-gauge/src/void.test.ts index bdd24c8003a..a46105e67ce 100644 --- a/packages/fuel-gauge/src/void.test.ts +++ b/packages/fuel-gauge/src/void.test.ts @@ -1,8 +1,8 @@ import { launchTestNode } from 'fuels/test-utils'; import { VoidFactory } from '../test/typegen'; -import type { NativeEnumInput } from '../test/typegen/contracts/Void'; -import type { Option } from '../test/typegen/contracts/common'; +import type { Option } from '../test/typegen/common'; +import { NativeEnum } from '../test/typegen/contracts/VoidTypes'; /** * @group node @@ -35,12 +35,10 @@ describe('Void Tests', () => { contracts: [voidContract], } = launched; - const enumValue: NativeEnumInput = 'C' as NativeEnumInput; - - const { waitForResult } = await voidContract.functions.echo_native_enum(enumValue).call(); + const { waitForResult } = await voidContract.functions.echo_native_enum(NativeEnum.C).call(); const { value } = await waitForResult(); - expect(value).toEqual(enumValue); + expect(value).toEqual(NativeEnum.C); }); it('should handle input arguments of type [42, void]', async () => { diff --git a/packages/fuels/package.json b/packages/fuels/package.json index df1935c81c4..b6594df4d60 100644 --- a/packages/fuels/package.json +++ b/packages/fuels/package.json @@ -42,8 +42,8 @@ "test-utils": [ "./dist/test-utils.d.ts" ], - "./cli-utils": [ - "/dist/cli-utils.d.ts" + "cli-utils": [ + "./dist/cli-utils.d.ts" ] } }, diff --git a/packages/fuels/src/cli-utils.ts b/packages/fuels/src/cli-utils.ts index c34747c1079..29bcaba4559 100644 --- a/packages/fuels/src/cli-utils.ts +++ b/packages/fuels/src/cli-utils.ts @@ -1 +1,2 @@ export * from '@fuel-ts/utils/cli-utils'; +export { getProgramDetails } from './cli/commands/typegen/utils'; diff --git a/packages/fuels/src/cli.ts b/packages/fuels/src/cli.ts index 522665cd7f8..3e839f54022 100644 --- a/packages/fuels/src/cli.ts +++ b/packages/fuels/src/cli.ts @@ -1,4 +1,3 @@ -import { configureCliOptions as configureTypegenCliOptions } from '@fuel-ts/abi-typegen/cli'; import { versions } from '@fuel-ts/versions'; import { runVersions } from '@fuel-ts/versions/cli'; import { Command, Option } from 'commander'; @@ -8,6 +7,7 @@ import { deploy } from './cli/commands/deploy'; import { dev } from './cli/commands/dev'; import { init } from './cli/commands/init'; import { node } from './cli/commands/node'; +import { typegen } from './cli/commands/typegen'; import { withBinaryPaths } from './cli/commands/withBinaryPaths'; import { withConfig } from './cli/commands/withConfig'; import { withProgram } from './cli/commands/withProgram'; @@ -90,10 +90,27 @@ export const configureCli = () => { * Routing external commands from sub-packages' CLIs */ - // Typegen - configureTypegenCliOptions( - program.command('typegen').description(`Generate Typescript from Sway ABI JSON files`) - ); + (command = program.command(Commands.typegen)) + .description(`Generate Typescript from Sway ABI JSON files`) + .requiredOption('-i, --inputs ', 'Input paths/globals to your ABI JSON files') + .requiredOption('-o, --output ', 'Directory path for generated files') + .addOption( + new Option('-c, --contract', 'Generate types for Contracts [default]') + .conflicts(['script', 'predicate']) + .implies({ script: undefined, predicate: undefined }) + ) + .addOption( + new Option('-s, --script', 'Generate types for Scripts') + .conflicts(['contract', 'predicate']) + .implies({ contract: undefined, predicate: undefined }) + ) + .addOption( + new Option('-p, --predicate', 'Generate types for Predicates') + .conflicts(['contract', 'script']) + .implies({ contract: undefined, script: undefined }) + ) + .option('-S, --silent', 'Omit output messages') + .action(withProgram(command, Commands.typegen, typegen)); // Versions (command = program.command('versions')) diff --git a/packages/fuels/src/cli/commands/build/generateTypes.ts b/packages/fuels/src/cli/commands/build/generateTypes.ts deleted file mode 100644 index dbcb17fe4bf..00000000000 --- a/packages/fuels/src/cli/commands/build/generateTypes.ts +++ /dev/null @@ -1,70 +0,0 @@ -import { ProgramTypeEnum } from '@fuel-ts/abi-typegen'; -import { runTypegen } from '@fuel-ts/abi-typegen/runTypegen'; -import { getBinaryVersions } from '@fuel-ts/versions/cli'; -import { writeFileSync, mkdirSync } from 'fs'; -import { globSync } from 'glob'; -import { join } from 'path'; - -import { getABIPaths } from '../../config/forcUtils'; -import { renderIndexTemplate } from '../../templates'; -import type { FuelsConfig } from '../../types'; -import { debug, log, loggingConfig } from '../../utils/logger'; - -async function generateTypesForProgramType( - config: FuelsConfig, - paths: string[], - programType: ProgramTypeEnum -) { - debug('Generating types..'); - - let filepaths = await getABIPaths(paths, config); - const pluralizedDirName = `${String(programType).toLocaleLowerCase()}s`; - const versions = getBinaryVersions(config); - - const isScript = programType === ProgramTypeEnum.SCRIPT; - const isPredicate = programType === ProgramTypeEnum.PREDICATE; - - if (isScript || isPredicate) { - const loaderFiles = paths.flatMap((dirpath) => { - const glob = `*-abi.json`; - const cwd = `${dirpath}/out`; - return globSync(glob, { cwd }).map((filename) => `${dirpath}/out/${filename}`); - }); - filepaths = filepaths.concat(loaderFiles); - } - - runTypegen({ - programType, - cwd: config.basePath, - filepaths, - output: join(config.output, pluralizedDirName), - silent: !loggingConfig.isDebugEnabled, - versions, - }); - - return pluralizedDirName; -} - -export async function generateTypes(config: FuelsConfig) { - log('Generating types..'); - - const { contracts, scripts, predicates, output } = config; - - mkdirSync(output, { recursive: true }); - - const members = [ - { type: ProgramTypeEnum.CONTRACT, programs: contracts }, - { type: ProgramTypeEnum.SCRIPT, programs: scripts }, - { type: ProgramTypeEnum.PREDICATE, programs: predicates }, - ]; - - const pluralizedDirNames = await Promise.all( - members - .filter(({ programs }) => !!programs.length) - .map(({ programs, type }) => generateTypesForProgramType(config, programs, type)) - ); - - const indexFile = await renderIndexTemplate(pluralizedDirNames); - - writeFileSync(join(config.output, 'index.ts'), indexFile); -} diff --git a/packages/fuels/src/cli/commands/build/index.test.ts b/packages/fuels/src/cli/commands/build/index.test.ts index 2983713940f..39e89a63559 100644 --- a/packages/fuels/src/cli/commands/build/index.test.ts +++ b/packages/fuels/src/cli/commands/build/index.test.ts @@ -1,9 +1,9 @@ import { fuelsConfig } from '../../../../test/fixtures/fuels.config'; import { mockLogger } from '../../../../test/utils/mockLogger'; +import * as generateTypesMod from '../typegen/index'; import { build } from '.'; import * as buildSwayProgramsMod from './buildSwayPrograms'; -import * as generateTypesMod from './generateTypes'; /** * @group node diff --git a/packages/fuels/src/cli/commands/build/index.ts b/packages/fuels/src/cli/commands/build/index.ts index 65cf4799c6d..2d1f8dd9d38 100644 --- a/packages/fuels/src/cli/commands/build/index.ts +++ b/packages/fuels/src/cli/commands/build/index.ts @@ -4,15 +4,15 @@ import type { FuelsConfig } from '../../types'; import { log } from '../../utils/logger'; import { deploy } from '../deploy'; import { autoStartFuelCore } from '../dev/autoStartFuelCore'; +import { generateTypes } from '../typegen'; import { buildSwayPrograms } from './buildSwayPrograms'; -import { generateTypes } from './generateTypes'; export async function build(config: FuelsConfig, program?: Command) { log('Building..'); await buildSwayPrograms(config); - await generateTypes(config); + generateTypes(config); config.onBuild?.(config); const options = program?.opts(); diff --git a/packages/fuels/src/cli/commands/deploy/index.ts b/packages/fuels/src/cli/commands/deploy/index.ts index 28b14181d41..79a91270c44 100644 --- a/packages/fuels/src/cli/commands/deploy/index.ts +++ b/packages/fuels/src/cli/commands/deploy/index.ts @@ -1,5 +1,5 @@ import type { FuelsConfig } from '../../types'; -import { generateTypes } from '../build/generateTypes'; +import { generateTypes } from '../typegen'; import { deployContracts } from './deployContracts'; import { deployPredicates } from './deployPredicates'; @@ -35,9 +35,9 @@ export async function deploy(config: FuelsConfig) { /** * After deploying scripts/predicates, we need to - * re-generate factory classe with the loader coee + * re-generate factory classes with the loader code */ - await generateTypes(config); + generateTypes(config); return { contracts, diff --git a/packages/fuels/src/cli/commands/typegen/index.ts b/packages/fuels/src/cli/commands/typegen/index.ts new file mode 100644 index 00000000000..17683c5f256 --- /dev/null +++ b/packages/fuels/src/cli/commands/typegen/index.ts @@ -0,0 +1,66 @@ +import { AbiGen } from '@fuel-ts/abi'; +import { getBinaryVersions } from '@fuel-ts/versions/cli'; +import type { Command } from 'commander'; +import { mkdirSync, writeFileSync } from 'fs'; +import { join } from 'path'; + +import type { FuelsConfig } from '../../types'; +import { debug } from '../../utils/logger'; + +import { getProgramDetails } from './utils'; + +interface RunTypegen { + inputs: string[]; + output: string; + silent: boolean; +} + +function runFuelsTypegen(options: RunTypegen) { + const { inputs, output, silent } = options; + + const programDetails = getProgramDetails(inputs); + + const results = AbiGen.generate({ programDetails, versions: getBinaryVersions() }); + + mkdirSync(output, { recursive: true }); + + const subDirectories = new Set(); + + results.forEach((r) => { + const dir = r.filename.split('/').slice(0, -1).join('/'); + if (dir !== '') { + subDirectories.add(dir); + } + }); + + subDirectories.forEach((dir) => { + mkdirSync(join(output, dir), { recursive: true }); + }); + + results.forEach((r) => { + const outputPath = join(output, r.filename); + writeFileSync(outputPath, r.content); + }); +} + +export function typegen(program: Command) { + const options = program.opts(); + const { inputs, output, silent } = options; + + runFuelsTypegen({ inputs, output, silent }); +} + +export function generateTypes(config: FuelsConfig) { + debug('Generating types...'); + + const { contracts, scripts, predicates, output } = config; + + const loaderPaths = scripts.concat(predicates).map((path) => `${path}/out`); + + const paths = contracts + .concat(scripts, predicates) + .map((path) => `${path}/out/${config.buildMode}`) + .concat(loaderPaths); + + runFuelsTypegen({ inputs: paths, output, silent: false }); +} diff --git a/packages/fuels/src/cli/commands/typegen/utils.test.ts b/packages/fuels/src/cli/commands/typegen/utils.test.ts new file mode 100644 index 00000000000..9deb720ff00 --- /dev/null +++ b/packages/fuels/src/cli/commands/typegen/utils.test.ts @@ -0,0 +1,14 @@ +import { getProgramDetails } from './utils'; + +/** + * @group node + */ +describe('utils', () => { + test('getProgramDetails skips invalid folder and logs it', () => { + const spy = vi.spyOn(console, 'log'); + const buildDirs = ['invalid-folder']; + const result = getProgramDetails(buildDirs); + expect(result).toEqual([]); + expect(spy).toHaveBeenCalledWith('No build outputs found in invalid-folder, skipping...'); + }); +}); diff --git a/packages/fuels/src/cli/commands/typegen/utils.ts b/packages/fuels/src/cli/commands/typegen/utils.ts new file mode 100644 index 00000000000..7036ea39dde --- /dev/null +++ b/packages/fuels/src/cli/commands/typegen/utils.ts @@ -0,0 +1,63 @@ +import { type ProgramDetails, type AbiSpecification, AbiParser } from '@fuel-ts/abi'; +import { compressBytecode, hexlify } from '@fuel-ts/utils'; +import { readFileSync } from 'fs'; +import { globSync } from 'glob'; + +import { log } from '../../utils/logger'; +/** + * Converts `some.string-value` into `SomeStringValue`. + * + * Examples: + * my-simple.test —— MySimpleTest + * myFile.ts —— MyFileTs + * my-abi.json —— MyAbiJson + */ +function normalizeProjectName(str: string): string { + const transformations: ((s: string) => string)[] = [ + (s) => s.replace(/\s+/g, '-'), // spaces to - + (s) => s.replace(/\./g, '-'), // dots to - + (s) => s.replace(/_/g, '-'), // underscore to - + (s) => s.replace(/-[a-z]/g, (match) => match.slice(-1).toUpperCase()), // delete '-' and capitalize the letter after them + (s) => s.replace(/-/g, ''), // delete any '-' left + (s) => s.replace(/^\d+/, ''), // removes leading digits + (s) => s[0].toUpperCase() + s.slice(1), // capitalize first letter + ]; + + const output = transformations.reduce((s, t) => t(s), str); + + if (output === '') { + const errMsg = `The provided string '${str}' results in an empty output after`.concat( + ` normalization, therefore, it can't normalize string.` + ); + // throw new FuelError(ErrorCode.PARSE_FAILED, errMsg); + throw new Error(errMsg); + } + + return output; +} + +export function getProgramDetails(buildDirs: string[]) { + const details: ProgramDetails[] = []; + buildDirs.forEach((dir) => { + const [binPath] = globSync(`${dir}/*.bin`); + if (binPath === undefined) { + log(`No build outputs found in ${dir}, skipping...`); + return; + } + const [storageSlotsPath] = globSync(`${dir}/*-storage_slots.json`); + const projectName = binPath.match(/([^/])+(?=\.bin)/)?.[0] as string; + const abiContents = readFileSync(`${dir}/${projectName}-abi.json`).toString(); + const storageSlots = storageSlotsPath ? readFileSync(storageSlotsPath).toString() : undefined; + const binCompressed = compressBytecode(hexlify(readFileSync(binPath))); + + details.push({ + name: normalizeProjectName(projectName), + abi: AbiParser.parse(JSON.parse(abiContents) as AbiSpecification), + binCompressed, + abiContents, + storageSlots, + }); + }); + + return details; +} diff --git a/packages/fuels/src/cli/templates/index.hbs b/packages/fuels/src/cli/templates/index.hbs index 569e0ad5e15..81a242dac7b 100644 --- a/packages/fuels/src/cli/templates/index.hbs +++ b/packages/fuels/src/cli/templates/index.hbs @@ -1,3 +1,3 @@ {{#each paths}} export * from './{{this}}'; -{{/each}} +{{/each}} \ No newline at end of file diff --git a/packages/fuels/src/cli/types.ts b/packages/fuels/src/cli/types.ts index f44c32cd93e..e9d641ba83e 100644 --- a/packages/fuels/src/cli/types.ts +++ b/packages/fuels/src/cli/types.ts @@ -8,6 +8,7 @@ export enum Commands { init = 'init', versions = 'versions', node = 'node', + typegen = 'typegen', } export type CommandEvent = @@ -34,6 +35,10 @@ export type CommandEvent = | { type: Commands.node; data: void; + } + | { + type: Commands.typegen; + data: void; }; export type DeployedContract = { diff --git a/packages/fuels/src/index.ts b/packages/fuels/src/index.ts index 02a546b367f..df6e13d38d5 100644 --- a/packages/fuels/src/index.ts +++ b/packages/fuels/src/index.ts @@ -16,5 +16,6 @@ export * from '@fuel-ts/utils'; export * from '@fuel-ts/account'; export * from '@fuel-ts/transactions/configs'; export * from '@fuel-ts/account/configs'; +export * from '@fuel-ts/abi'; export * from '@fuel-ts/recipes'; export * from '@fuel-ts/abi'; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4f702e3112e..2a444aa70b7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -31,7 +31,7 @@ importers: version: 6.0.0 '@codspeed/vitest-plugin': specifier: ^3.1.1 - version: 3.1.1(vite@5.4.9(@types/node@22.5.5)(terser@5.36.0))(vitest@2.0.5(@types/node@22.5.5)(@vitest/browser@2.0.5)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@6.0.4))(terser@5.36.0)) + version: 3.1.1(vite@5.4.10(@types/node@22.5.5)(terser@5.34.1))(vitest@2.0.5(@types/node@22.5.5)(@vitest/browser@2.0.5)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@6.0.4))(terser@5.34.1)) '@fuel-ts/utils': specifier: workspace:* version: link:packages/utils @@ -70,7 +70,7 @@ importers: version: 2.0.5(bufferutil@4.0.8)(playwright@1.47.2)(typescript@5.6.3)(utf-8-validate@6.0.4)(vitest@2.0.5)(webdriverio@9.0.9(bufferutil@4.0.8)(utf-8-validate@6.0.4)) '@vitest/coverage-istanbul': specifier: ~2.0.5 - version: 2.0.5(vitest@2.0.5(@types/node@22.5.5)(@vitest/browser@2.0.5)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@6.0.4))(terser@5.36.0)) + version: 2.0.5(vitest@2.0.5(@types/node@22.5.5)(@vitest/browser@2.0.5)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@6.0.4))(terser@5.34.1)) autocannon: specifier: ^7.15.0 version: 7.15.0 @@ -112,7 +112,7 @@ importers: version: 5.2.1(@types/eslint@8.40.2)(eslint-config-prettier@9.1.0(eslint@8.57.0))(eslint@8.57.0)(prettier@3.3.3) eslint-plugin-react: specifier: ^7.37.1 - version: 7.37.1(eslint@8.57.0) + version: 7.37.2(eslint@8.57.0) eslint-plugin-react-hooks: specifier: ^4.6.2 version: 4.6.2(eslint@8.57.0) @@ -157,7 +157,7 @@ importers: version: 0.1.1 tsup: specifier: ^6.7.0 - version: 6.7.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(postcss@8.4.49)(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.5.5)(typescript@5.6.3))(typescript@5.6.3) + version: 6.7.0(@swc/core@1.7.14)(postcss@8.4.49)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.3))(typescript@5.6.3) tsx: specifier: ^4.19.1 version: 4.19.1 @@ -169,19 +169,19 @@ importers: version: 5.6.3 vite: specifier: ^5.4.9 - version: 5.4.9(@types/node@22.5.5)(terser@5.36.0) + version: 5.4.10(@types/node@22.5.5)(terser@5.34.1) vite-plugin-json5: specifier: ^1.1.2 - version: 1.1.2(@rollup/pluginutils@5.1.0(rollup@4.24.0))(vite@5.4.9(@types/node@22.5.5)(terser@5.36.0)) + version: 1.1.2(@rollup/pluginutils@5.1.0(rollup@4.22.5))(vite@5.4.10(@types/node@22.5.5)(terser@5.34.1)) vite-plugin-node-polyfills: specifier: ^0.22.0 - version: 0.22.0(rollup@4.24.0)(vite@5.4.9(@types/node@22.5.5)(terser@5.36.0)) + version: 0.22.0(rollup@4.22.5)(vite@5.4.10(@types/node@22.5.5)(terser@5.34.1)) vite-plugin-plain-text: specifier: ^1.4.2 version: 1.4.2 vitest: specifier: ~2.0.5 - version: 2.0.5(@types/node@22.5.5)(@vitest/browser@2.0.5)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@6.0.4))(terser@5.36.0) + version: 2.0.5(@types/node@22.5.5)(@vitest/browser@2.0.5)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@6.0.4))(terser@5.34.1) webdriverio: specifier: ^9.0.9 version: 9.0.9(bufferutil@4.0.8)(utf-8-validate@6.0.4) @@ -190,7 +190,7 @@ importers: dependencies: '@fuels/connectors': specifier: ^0.27.1 - version: 0.27.1(@tanstack/query-core@5.56.2)(@types/react@18.3.11)(@wagmi/connectors@5.1.14(@types/react@18.3.11)(@wagmi/core@2.13.9(@tanstack/query-core@5.56.2)(@types/react@18.3.11)(immer@9.0.21)(react@18.3.1)(typescript@5.6.3)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8)))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.8)(@babel/preset-env@7.22.5(@babel/core@7.25.8))(@types/react@18.3.11)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.24.0)(typescript@5.6.3)(utf-8-validate@5.0.10)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8))(bufferutil@4.0.8)(fuels@packages+fuels)(immer@9.0.21)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(utf-8-validate@5.0.10)(vue@3.5.12(typescript@5.6.3))(zod@3.23.8) + version: 0.27.1(@tanstack/query-core@5.56.2)(@types/react@18.3.12)(@wagmi/connectors@5.1.14(@types/react@18.3.12)(@wagmi/core@2.14.1(@tanstack/query-core@5.56.2)(@types/react@18.3.12)(immer@9.0.21)(react@18.3.1)(typescript@5.6.3)(use-sync-external-store@1.2.0(react@18.3.1))(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8)))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.12)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.22.5)(typescript@5.6.3)(utf-8-validate@5.0.10)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8))(bufferutil@4.0.8)(fuels@packages+fuels)(immer@9.0.21)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(utf-8-validate@5.0.10)(vue@3.5.12(typescript@5.6.3))(zod@3.23.8) '@fuels/react': specifier: ^0.27.1 version: 0.27.1(@tanstack/react-query@5.56.2(react@18.3.1))(@types/react-dom@18.3.0)(fuels@packages+fuels)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -199,10 +199,10 @@ importers: version: 5.56.2(react@18.3.1) '@wagmi/connectors': specifier: ^5.1.14 - version: 5.1.14(@types/react@18.3.11)(@wagmi/core@2.13.9(@tanstack/query-core@5.56.2)(@types/react@18.3.11)(immer@9.0.21)(react@18.3.1)(typescript@5.6.3)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8)))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.8)(@babel/preset-env@7.22.5(@babel/core@7.25.8))(@types/react@18.3.11)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.24.0)(typescript@5.6.3)(utf-8-validate@5.0.10)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8) + version: 5.1.14(@types/react@18.3.12)(@wagmi/core@2.14.1(@tanstack/query-core@5.56.2)(@types/react@18.3.12)(immer@9.0.21)(react@18.3.1)(typescript@5.6.3)(use-sync-external-store@1.2.0(react@18.3.1))(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8)))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.12)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.22.5)(typescript@5.6.3)(utf-8-validate@5.0.10)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8) '@wagmi/core': specifier: ^2.13.9 - version: 2.13.9(@tanstack/query-core@5.56.2)(@types/react@18.3.11)(immer@9.0.21)(react@18.3.1)(typescript@5.6.3)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8)) + version: 2.14.1(@tanstack/query-core@5.56.2)(@types/react@18.3.12)(immer@9.0.21)(react@18.3.1)(typescript@5.6.3)(use-sync-external-store@1.2.0(react@18.3.1))(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8)) clsx: specifier: 2.1.1 version: 2.1.1 @@ -233,13 +233,13 @@ importers: version: 22.5.5 '@types/react': specifier: ^18.3.11 - version: 18.3.11 + version: 18.3.12 '@types/react-dom': specifier: ^18.3 version: 18.3.0 '@vitejs/plugin-react': specifier: ^4.3.3 - version: 4.3.3(vite@5.4.9(@types/node@22.5.5)(terser@5.36.0)) + version: 4.3.3(vite@5.4.10(@types/node@22.5.5)(terser@5.34.1)) autoprefixer: specifier: ^10.4.20 version: 10.4.20(postcss@8.4.49) @@ -260,19 +260,19 @@ importers: version: 8.4.49 tailwindcss: specifier: ^3.4.14 - version: 3.4.14(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.5.5)(typescript@5.6.3)) + version: 3.4.14(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.3)) typescript: specifier: ~5.6.3 version: 5.6.3 typescript-eslint: specifier: ^8.8.0 - version: 8.8.0(eslint@8.57.0)(typescript@5.6.3) + version: 8.11.0(eslint@8.57.0)(typescript@5.6.3) vite: specifier: ^5.4.9 - version: 5.4.9(@types/node@22.5.5)(terser@5.36.0) + version: 5.4.10(@types/node@22.5.5)(terser@5.34.1) vitest: specifier: ~2.0.5 - version: 2.0.5(@types/node@22.5.5)(@vitest/browser@2.0.5)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.36.0) + version: 2.0.5(@types/node@22.5.5)(@vitest/browser@2.0.5)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.34.1) apps/demo-bun-fuels: dependencies: @@ -288,7 +288,7 @@ importers: devDependencies: bun: specifier: ^1.1.31 - version: 1.1.31 + version: 1.1.32 apps/demo-fuels: dependencies: @@ -312,7 +312,7 @@ importers: version: 22.5.5 '@types/react': specifier: ^18.3.11 - version: 18.3.11 + version: 18.3.12 '@types/react-dom': specifier: ^18.3 version: 18.3.0 @@ -321,7 +321,7 @@ importers: version: link:../../packages/fuels next: specifier: 14.2.15 - version: 14.2.15(@babel/core@7.25.8)(@playwright/test@1.47.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 14.2.15(@babel/core@7.25.2)(@playwright/test@1.47.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: specifier: ^18.3.1 version: 18.3.1 @@ -345,19 +345,19 @@ importers: version: 0.58.2 '@testing-library/react': specifier: ^16.0.1 - version: 16.0.1(@testing-library/dom@10.4.0)(@types/react-dom@18.3.0)(@types/react@18.3.11)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 16.0.1(@testing-library/dom@10.4.0)(@types/react-dom@18.3.0)(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@types/node': specifier: ^22.5.5 version: 22.5.5 '@types/react': specifier: ^18.3.11 - version: 18.3.11 + version: 18.3.12 '@types/react-dom': specifier: ^18.3 version: 18.3.0 eslint-config-react-app: specifier: ^7.0.1 - version: 7.0.1(@babel/plugin-syntax-flow@7.25.7(@babel/core@7.22.5))(@babel/plugin-transform-react-jsx@7.25.7(@babel/core@7.22.5))(eslint@9.9.1(jiti@2.3.3))(jest@27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.5.5)(typescript@5.6.3))(utf-8-validate@5.0.10))(typescript@5.6.3) + version: 7.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.22.5))(@babel/plugin-transform-react-jsx@7.25.2(@babel/core@7.22.5))(eslint@9.9.1(jiti@2.3.3))(jest@27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.3))(utf-8-validate@5.0.10))(typescript@5.6.3) fuels: specifier: workspace:* version: link:../../packages/fuels @@ -369,7 +369,7 @@ importers: version: 18.3.1(react@18.3.1) react-scripts: specifier: 5.0.1 - version: 5.0.1(@babel/plugin-syntax-flow@7.25.7(@babel/core@7.22.5))(@babel/plugin-transform-react-jsx@7.25.7(@babel/core@7.22.5))(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/babel__core@7.20.5)(bufferutil@4.0.8)(esbuild@0.17.19)(eslint@9.9.1(jiti@2.3.3))(react@18.3.1)(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.5.5)(typescript@5.6.3))(type-fest@3.1.0)(typescript@5.6.3)(utf-8-validate@5.0.10) + version: 5.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.22.5))(@babel/plugin-transform-react-jsx@7.25.2(@babel/core@7.22.5))(@swc/core@1.7.14)(@types/babel__core@7.20.5)(bufferutil@4.0.8)(esbuild@0.17.19)(eslint@9.9.1(jiti@2.3.3))(react@18.3.1)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.3))(type-fest@3.1.0)(typescript@5.6.3)(utf-8-validate@5.0.10) typescript: specifier: ~5.6.3 version: 5.6.3 @@ -398,7 +398,7 @@ importers: devDependencies: '@types/react': specifier: ^18.3.11 - version: 18.3.11 + version: 18.3.12 '@types/react-dom': specifier: ^18.3 version: 18.3.0 @@ -410,7 +410,7 @@ importers: version: 6.21.0(eslint@8.57.0)(typescript@5.6.3) '@vitejs/plugin-react': specifier: ^4.3.3 - version: 4.3.3(vite@5.4.9(@types/node@22.7.7)(terser@5.36.0)) + version: 4.3.3(vite@5.4.10(@types/node@22.7.5)(terser@5.34.1)) eslint: specifier: ^8.57.0 version: 8.57.0 @@ -425,7 +425,7 @@ importers: version: 5.6.3 vite: specifier: ^5.4.9 - version: 5.4.9(@types/node@22.7.7)(terser@5.36.0) + version: 5.4.10(@types/node@22.7.5)(terser@5.34.1) apps/demo-typegen: dependencies: @@ -447,7 +447,7 @@ importers: dependencies: '@fuels/connectors': specifier: ^0.27.1 - version: 0.27.1(@tanstack/query-core@5.56.2)(@types/react@18.3.11)(@wagmi/connectors@5.1.14(@types/react@18.3.11)(@wagmi/core@2.13.9(@tanstack/query-core@5.56.2)(@types/react@18.3.11)(immer@9.0.21)(react@18.3.1)(typescript@5.6.3)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8)))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.8)(@babel/preset-env@7.22.5(@babel/core@7.25.8))(@types/react@18.3.11)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.24.0)(typescript@5.6.3)(utf-8-validate@5.0.10)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8))(bufferutil@4.0.8)(fuels@packages+fuels)(immer@9.0.21)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(utf-8-validate@5.0.10)(vue@3.5.12(typescript@5.6.3))(zod@3.23.8) + version: 0.27.1(@tanstack/query-core@5.56.2)(@types/react@18.3.12)(@wagmi/connectors@5.1.14(@types/react@18.3.12)(@wagmi/core@2.14.1(@tanstack/query-core@5.56.2)(@types/react@18.3.12)(immer@9.0.21)(react@18.3.1)(typescript@5.6.3)(use-sync-external-store@1.2.0(react@18.3.1))(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8)))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.12)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.22.5)(typescript@5.6.3)(utf-8-validate@5.0.10)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8))(bufferutil@4.0.8)(fuels@packages+fuels)(immer@9.0.21)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(utf-8-validate@5.0.10)(vue@3.5.12(typescript@5.6.3))(zod@3.23.8) '@fuels/react': specifier: ^0.27.1 version: 0.27.1(@tanstack/react-query@5.56.2(react@18.3.1))(@types/react-dom@18.3.0)(fuels@packages+fuels)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -459,7 +459,7 @@ importers: version: link:../../packages/fuels next: specifier: 14.2.15 - version: 14.2.15(@babel/core@7.25.8)(@playwright/test@1.47.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 14.2.15(@babel/core@7.25.2)(@playwright/test@1.47.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: specifier: ^18.3.1 version: 18.3.1 @@ -472,7 +472,7 @@ importers: version: 22.5.5 '@types/react': specifier: ^18.3.11 - version: 18.3.11 + version: 18.3.12 '@types/react-dom': specifier: ^18.3 version: 18.3.0 @@ -490,7 +490,7 @@ importers: version: 6.0.1(jiti@2.3.3)(postcss@8.4.49)(tsx@4.19.1)(yaml@2.6.0) tailwindcss: specifier: ^3.4.14 - version: 3.4.14(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.5.5)(typescript@5.6.3)) + version: 3.4.14(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.3)) typescript: specifier: ~5.6.3 version: 5.6.3 @@ -533,10 +533,10 @@ importers: version: 1.2.2 vitepress: specifier: 1.3.4 - version: 1.3.4(@algolia/client-search@4.22.1)(@types/node@22.7.7)(@types/react@18.3.11)(axios@1.7.7)(idb-keyval@6.2.1)(postcss@8.4.49)(qrcode@1.5.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(search-insights@2.11.0)(terser@5.36.0)(typescript@5.6.3) + version: 1.3.4(@algolia/client-search@4.22.1)(@types/node@22.7.5)(@types/react@18.3.12)(axios@1.7.7)(idb-keyval@6.2.1)(postcss@8.4.49)(qrcode@1.5.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(search-insights@2.11.0)(terser@5.34.1)(typescript@5.6.3) vitepress-plugin-search: specifier: 1.0.4-alpha.22 - version: 1.0.4-alpha.22(flexsearch@0.7.43)(vitepress@1.3.4(@algolia/client-search@4.22.1)(@types/node@22.7.7)(@types/react@18.3.11)(axios@1.7.7)(idb-keyval@6.2.1)(postcss@8.4.49)(qrcode@1.5.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(search-insights@2.11.0)(terser@5.36.0)(typescript@5.6.3))(vue@3.5.12(typescript@5.6.3)) + version: 1.0.4-alpha.22(flexsearch@0.7.43)(vitepress@1.3.4(@algolia/client-search@4.22.1)(@types/node@22.7.5)(@types/react@18.3.12)(axios@1.7.7)(idb-keyval@6.2.1)(postcss@8.4.49)(qrcode@1.5.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(search-insights@2.11.0)(terser@5.34.1)(typescript@5.6.3))(vue@3.5.12(typescript@5.6.3)) vue: specifier: ^3.5.12 version: 3.5.12(typescript@5.6.3) @@ -643,6 +643,12 @@ importers: '@fuel-ts/utils': specifier: workspace:* version: link:../utils + '@fuel-ts/versions': + specifier: workspace:* + version: link:../versions + handlebars: + specifier: ^4.7.8 + version: 4.7.8 packages/abi-coder: dependencies: @@ -770,7 +776,7 @@ importers: devDependencies: '@graphql-codegen/cli': specifier: ^5.0.3 - version: 5.0.3(@parcel/watcher@2.4.1)(@types/node@22.7.7)(bufferutil@4.0.8)(cosmiconfig-toml-loader@1.0.0)(enquirer@2.4.1)(graphql@16.9.0)(typescript@5.6.3)(utf-8-validate@6.0.4) + version: 5.0.3(@parcel/watcher@2.4.1)(@types/node@22.7.5)(bufferutil@4.0.8)(cosmiconfig-toml-loader@1.0.0)(enquirer@2.4.1)(graphql@16.9.0)(typescript@5.6.3)(utf-8-validate@6.0.4) '@graphql-codegen/typescript': specifier: ^4.0.9 version: 4.0.9(graphql@16.9.0) @@ -1050,7 +1056,7 @@ importers: version: 3.0.2 vite: specifier: ^5.4.9 - version: 5.4.9(@types/node@22.7.7)(terser@5.36.0) + version: 5.4.10(@types/node@22.7.5)(terser@5.34.1) packages/hasher: dependencies: @@ -1266,7 +1272,7 @@ importers: dependencies: '@fuels/connectors': specifier: ^0.27.1 - version: 0.27.1(@tanstack/query-core@5.56.2)(@types/react@18.3.11)(@wagmi/connectors@5.1.14(@types/react@18.3.11)(@wagmi/core@2.13.9(@tanstack/query-core@5.56.2)(@types/react@18.3.11)(immer@9.0.21)(react@18.3.1)(typescript@5.6.3)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8)))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.8)(@babel/preset-env@7.22.5(@babel/core@7.25.8))(@types/react@18.3.11)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.24.0)(typescript@5.6.3)(utf-8-validate@5.0.10)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8))(bufferutil@4.0.8)(fuels@packages+fuels)(immer@9.0.21)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(utf-8-validate@5.0.10)(vue@3.5.12(typescript@5.6.3))(zod@3.23.8) + version: 0.27.1(@tanstack/query-core@5.56.2)(@types/react@18.3.12)(@wagmi/connectors@5.1.14(@types/react@18.3.12)(@wagmi/core@2.14.1(@tanstack/query-core@5.56.2)(@types/react@18.3.12)(immer@9.0.21)(react@18.3.1)(typescript@5.6.3)(use-sync-external-store@1.2.0(react@18.3.1))(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8)))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.12)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.22.5)(typescript@5.6.3)(utf-8-validate@5.0.10)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8))(bufferutil@4.0.8)(fuels@packages+fuels)(immer@9.0.21)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(utf-8-validate@5.0.10)(vue@3.5.12(typescript@5.6.3))(zod@3.23.8) '@fuels/react': specifier: ^0.27.1 version: 0.27.1(@tanstack/react-query@5.56.2(react@18.3.1))(@types/react-dom@18.3.0)(fuels@packages+fuels)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -1275,10 +1281,10 @@ importers: version: 5.56.2(react@18.3.1) '@wagmi/connectors': specifier: ^5.1.14 - version: 5.1.14(@types/react@18.3.11)(@wagmi/core@2.13.9(@tanstack/query-core@5.56.2)(@types/react@18.3.11)(immer@9.0.21)(react@18.3.1)(typescript@5.6.3)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8)))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.8)(@babel/preset-env@7.22.5(@babel/core@7.25.8))(@types/react@18.3.11)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.24.0)(typescript@5.6.3)(utf-8-validate@5.0.10)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8) + version: 5.1.14(@types/react@18.3.12)(@wagmi/core@2.14.1(@tanstack/query-core@5.56.2)(@types/react@18.3.12)(immer@9.0.21)(react@18.3.1)(typescript@5.6.3)(use-sync-external-store@1.2.0(react@18.3.1))(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8)))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.12)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.22.5)(typescript@5.6.3)(utf-8-validate@5.0.10)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8) '@wagmi/core': specifier: ^2.13.9 - version: 2.13.9(@tanstack/query-core@5.56.2)(@types/react@18.3.11)(immer@9.0.21)(react@18.3.1)(typescript@5.6.3)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8)) + version: 2.14.1(@tanstack/query-core@5.56.2)(@types/react@18.3.12)(immer@9.0.21)(react@18.3.1)(typescript@5.6.3)(use-sync-external-store@1.2.0(react@18.3.1))(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8)) clsx: specifier: 2.1.1 version: 2.1.1 @@ -1290,7 +1296,7 @@ importers: version: link:../../packages/fuels next: specifier: 14.2.15 - version: 14.2.15(@babel/core@7.25.8)(@playwright/test@1.47.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 14.2.15(@babel/core@7.25.2)(@playwright/test@1.47.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: specifier: ^18.3.1 version: 18.3.1 @@ -1312,7 +1318,7 @@ importers: version: 22.5.5 '@types/react': specifier: ^18.3.11 - version: 18.3.11 + version: 18.3.12 '@types/react-dom': specifier: ^18.3 version: 18.3.0 @@ -1330,19 +1336,19 @@ importers: version: 8.4.49 tailwindcss: specifier: ^3.4.14 - version: 3.4.14(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.5.5)(typescript@5.6.3)) + version: 3.4.14(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.3)) typescript: specifier: ~5.6.3 version: 5.6.3 vitest: specifier: ~2.0.5 - version: 2.0.5(@types/node@22.5.5)(@vitest/browser@2.0.5)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.36.0) + version: 2.0.5(@types/node@22.5.5)(@vitest/browser@2.0.5)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.34.1) templates/vite: dependencies: '@fuels/connectors': specifier: ^0.27.1 - version: 0.27.1(@tanstack/query-core@5.56.2)(@types/react@18.3.11)(@wagmi/connectors@5.1.14(@types/react@18.3.11)(@wagmi/core@2.13.9(@tanstack/query-core@5.56.2)(@types/react@18.3.11)(immer@9.0.21)(react@18.3.1)(typescript@5.6.3)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8)))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.11)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.24.0)(typescript@5.6.3)(utf-8-validate@5.0.10)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8))(bufferutil@4.0.8)(fuels@packages+fuels)(immer@9.0.21)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(utf-8-validate@5.0.10)(vue@3.5.12(typescript@5.6.3))(zod@3.23.8) + version: 0.27.1(@tanstack/query-core@5.56.2)(@types/react@18.3.12)(@wagmi/connectors@5.1.14(@types/react@18.3.12)(@wagmi/core@2.14.1(@tanstack/query-core@5.56.2)(@types/react@18.3.12)(immer@9.0.21)(react@18.3.1)(typescript@5.6.3)(use-sync-external-store@1.2.0(react@18.3.1))(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8)))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.12)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.22.5)(typescript@5.6.3)(utf-8-validate@5.0.10)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8))(bufferutil@4.0.8)(fuels@packages+fuels)(immer@9.0.21)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(utf-8-validate@5.0.10)(vue@3.5.12(typescript@5.6.3))(zod@3.23.8) '@fuels/react': specifier: ^0.27.1 version: 0.27.1(@tanstack/react-query@5.56.2(react@18.3.1))(@types/react-dom@18.3.0)(fuels@packages+fuels)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -1351,10 +1357,10 @@ importers: version: 5.56.2(react@18.3.1) '@wagmi/connectors': specifier: ^5.1.14 - version: 5.1.14(@types/react@18.3.11)(@wagmi/core@2.13.9(@tanstack/query-core@5.56.2)(@types/react@18.3.11)(immer@9.0.21)(react@18.3.1)(typescript@5.6.3)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8)))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.11)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.24.0)(typescript@5.6.3)(utf-8-validate@5.0.10)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8) + version: 5.1.14(@types/react@18.3.12)(@wagmi/core@2.14.1(@tanstack/query-core@5.56.2)(@types/react@18.3.12)(immer@9.0.21)(react@18.3.1)(typescript@5.6.3)(use-sync-external-store@1.2.0(react@18.3.1))(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8)))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.12)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.22.5)(typescript@5.6.3)(utf-8-validate@5.0.10)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8) '@wagmi/core': specifier: ^2.13.9 - version: 2.13.9(@tanstack/query-core@5.56.2)(@types/react@18.3.11)(immer@9.0.21)(react@18.3.1)(typescript@5.6.3)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8)) + version: 2.14.1(@tanstack/query-core@5.56.2)(@types/react@18.3.12)(immer@9.0.21)(react@18.3.1)(typescript@5.6.3)(use-sync-external-store@1.2.0(react@18.3.1))(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8)) clsx: specifier: 2.1.1 version: 2.1.1 @@ -1382,16 +1388,16 @@ importers: version: 1.47.2 '@tanstack/router-plugin': specifier: ^1.58.12 - version: 1.58.12(vite@5.4.9(@types/node@22.7.7)(terser@5.36.0))(webpack-sources@3.2.3) + version: 1.58.12(vite@5.4.10(@types/node@22.7.5)(terser@5.34.1))(webpack-sources@3.2.3) '@types/react': specifier: ^18.3.11 - version: 18.3.11 + version: 18.3.12 '@types/react-dom': specifier: ^18.3 version: 18.3.0 '@vitejs/plugin-react': specifier: ^4.3.3 - version: 4.3.3(vite@5.4.9(@types/node@22.7.7)(terser@5.36.0)) + version: 4.3.3(vite@5.4.10(@types/node@22.7.5)(terser@5.34.1)) autoprefixer: specifier: ^10.4.20 version: 10.4.20(postcss@8.4.49) @@ -1412,19 +1418,19 @@ importers: version: 8.4.49 tailwindcss: specifier: ^3.4.14 - version: 3.4.14(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.7.7)(typescript@5.6.3)) + version: 3.4.14(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.7.5)(typescript@5.6.3)) typescript: specifier: ~5.6.3 version: 5.6.3 typescript-eslint: specifier: ^8.8.0 - version: 8.8.0(eslint@8.57.0)(typescript@5.6.3) + version: 8.11.0(eslint@8.57.0)(typescript@5.6.3) vite: specifier: ^5.4.9 - version: 5.4.9(@types/node@22.7.7)(terser@5.36.0) + version: 5.4.10(@types/node@22.7.5)(terser@5.34.1) vitest: specifier: ~2.0.5 - version: 2.0.5(@types/node@22.7.7)(@vitest/browser@2.0.5)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.36.0) + version: 2.0.5(@types/node@22.7.5)(@vitest/browser@2.0.5)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.34.1) packages: @@ -1553,10 +1559,6 @@ packages: resolution: {integrity: sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==} engines: {node: '>=6.9.0'} - '@babel/code-frame@7.25.7': - resolution: {integrity: sha512-0xZJFNE5XMpENsgfHYTw8FbX4kv53mFLn2i3XPoq69LyhYSCBJtitaHx9QnsVTrsogI4Z3+HtEfZ2/GFPOtf5g==} - engines: {node: '>=6.9.0'} - '@babel/compat-data@7.22.5': resolution: {integrity: sha512-4Jc/YuIaYqKnDDz892kPIledykKg12Aw1PYX5i/TY28anJtacvM1Rrr8wbieB9GfEJwlzqT0hUEao0CxEebiDA==} engines: {node: '>=6.9.0'} @@ -1565,10 +1567,6 @@ packages: resolution: {integrity: sha512-+LGRog6RAsCJrrrg/IO6LGmpphNe5DiK30dGjCoxxeGv49B10/3XYGxPsAwrDlMFcFEvdAUavDT8r9k/hSyQqQ==} engines: {node: '>=6.9.0'} - '@babel/compat-data@7.25.8': - resolution: {integrity: sha512-ZsysZyXY4Tlx+Q53XdnOFmqwfB9QDTHYxaZYajWRoBLuLEAwI2UIbtxOjWh/cFaa9IKUlcB+DDuoskLuKu56JA==} - engines: {node: '>=6.9.0'} - '@babel/core@7.22.5': resolution: {integrity: sha512-SBuTAjg91A3eKOvD+bPEz3LlhHZRNu1nFOVts9lzDJTXshHTjII0BAtDS3Y2DAkdZdDKWVZGVwkDfc4Clxn1dg==} engines: {node: '>=6.9.0'} @@ -1577,10 +1575,6 @@ packages: resolution: {integrity: sha512-BBt3opiCOxUr9euZ5/ro/Xv8/V7yJ5bjYMqG/C1YAo8MIKAnumZalCN+msbci3Pigy4lIQfPUpfMM27HMGaYEA==} engines: {node: '>=6.9.0'} - '@babel/core@7.25.8': - resolution: {integrity: sha512-Oixnb+DzmRT30qu9d3tJSQkxuygWm32DFykT4bRoORPa9hZ/L4KhVB/XiRm6KG+roIEM7DBQlmg27kw2HZkdZg==} - engines: {node: '>=6.9.0'} - '@babel/eslint-parser@7.22.5': resolution: {integrity: sha512-C69RWYNYtrgIRE5CmTd77ZiLDXqgBipahJc/jHP3sLcAGj6AJzxNIuKNpVnICqbyK7X3pFUfEvL++rvtbQpZkQ==} engines: {node: ^10.13.0 || ^12.13.0 || >=14.0.0} @@ -1592,10 +1586,6 @@ packages: resolution: {integrity: sha512-VPC82gr1seXOpkjAAKoLhP50vx4vGNlF4msF64dSFq1P8RfB+QAuJWGHPXXPc8QyfVWwwB/TNNU4+ayZmHNbZw==} engines: {node: '>=6.9.0'} - '@babel/generator@7.25.7': - resolution: {integrity: sha512-5Dqpl5fyV9pIAD62yK9P7fcA768uVPUyrQmqpqstHWgMma4feF1x/oFysBCVZLY5wJ2GkMUCdsNDnGZrPoR6rA==} - engines: {node: '>=6.9.0'} - '@babel/helper-annotate-as-pure@7.22.5': resolution: {integrity: sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg==} engines: {node: '>=6.9.0'} @@ -1604,8 +1594,8 @@ packages: resolution: {integrity: sha512-DitEzDfOMnd13kZnDqns1ccmftwJTS9DMkyn9pYTxulS7bZxUxpMly3Nf23QQ6NwA4UB8lAqjbqWtyvElEMAkg==} engines: {node: '>=6.9.0'} - '@babel/helper-annotate-as-pure@7.25.7': - resolution: {integrity: sha512-4xwU8StnqnlIhhioZf1tqnVWeQ9pvH/ujS8hRfw/WOza+/a+1qv69BWNy+oY231maTCWgKWhfBU7kDpsds6zAA==} + '@babel/helper-annotate-as-pure@7.24.7': + resolution: {integrity: sha512-BaDeOonYvhdKw+JoMVkAixAAJzG2jVPIwWoKBPdYuY9b452e2rPuI9QPYh3KpofZ3pW2akOmwZLOiOsHMiqRAg==} engines: {node: '>=6.9.0'} '@babel/helper-builder-binary-assignment-operator-visitor@7.22.5': @@ -1622,18 +1612,14 @@ packages: resolution: {integrity: sha512-U2U5LsSaZ7TAt3cfaymQ8WHh0pxvdHoEk6HVpaexxixjyEquMh0L0YNJNM6CTGKMXV1iksi0iZkGw4AcFkPaaw==} engines: {node: '>=6.9.0'} - '@babel/helper-compilation-targets@7.25.7': - resolution: {integrity: sha512-DniTEax0sv6isaw6qSQSfV4gVRNtw2rte8HHM45t9ZR0xILaufBRNkpMifCRiAPyvL4ACD6v0gfCwCmtOQaV4A==} - engines: {node: '>=6.9.0'} - '@babel/helper-create-class-features-plugin@7.22.5': resolution: {integrity: sha512-xkb58MyOYIslxu3gKmVXmjTtUPvBU4odYzbiIQbWwLKIHCsx6UGZGX6F1IznMFVnDdirseUZopzN+ZRt8Xb33Q==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 - '@babel/helper-create-class-features-plugin@7.25.7': - resolution: {integrity: sha512-bD4WQhbkx80mAyj/WCm4ZHcF4rDxkoLFO6ph8/5/mQ3z4vAzltQXAmbc7GvVJx5H+lk5Mi5EmbTeox5nMGCsbw==} + '@babel/helper-create-class-features-plugin@7.25.4': + resolution: {integrity: sha512-ro/bFs3/84MDgDmMwbcHgDa8/E6J3QKNTk4xJJnVeFtGE+tL0K26E3pNxhYz2b67fJpt7Aphw5XcploKXuCvCQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 @@ -1644,8 +1630,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0 - '@babel/helper-create-regexp-features-plugin@7.25.7': - resolution: {integrity: sha512-byHhumTj/X47wJ6C6eLpK7wW/WBEcnUeb7D0FNc/jFQnQVw7DOso3Zz5u9x/zLrFVkHa89ZGDbkAa1D54NdrCQ==} + '@babel/helper-create-regexp-features-plugin@7.25.2': + resolution: {integrity: sha512-+wqVGP+DFmqwFD3EH6TMTfUNeqDehV3E/dl+Sd54eaXqm17tEUNbEIn4sVivVowbvUpOtIGxdo3GoXyDH9N/9g==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 @@ -1688,8 +1674,8 @@ packages: resolution: {integrity: sha512-aBiH1NKMG0H2cGZqspNvsaBe6wNGjbJjuLy29aU+eDZjSbbN53BaxlpB02xm9v34pLTZ1nIQPFYn2qMZoa5BQQ==} engines: {node: '>=6.9.0'} - '@babel/helper-member-expression-to-functions@7.25.7': - resolution: {integrity: sha512-O31Ssjd5K6lPbTX9AAYpSKrZmLeagt9uwschJd+Ixo6QiRyfpvgtVQp8qrDR9UNFjZ8+DO34ZkdrN+BnPXemeA==} + '@babel/helper-member-expression-to-functions@7.24.8': + resolution: {integrity: sha512-LABppdt+Lp/RlBxqrh4qgf1oEH/WxdzQNDJIu5gC/W1GyvPVrOBiItmmM8wan2fm4oYqFuFfkXmlGpLQhPY8CA==} engines: {node: '>=6.9.0'} '@babel/helper-module-imports@7.22.5': @@ -1700,10 +1686,6 @@ packages: resolution: {integrity: sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA==} engines: {node: '>=6.9.0'} - '@babel/helper-module-imports@7.25.7': - resolution: {integrity: sha512-o0xCgpNmRohmnoWKQ0Ij8IdddjyBFE4T2kagL/x6M3+4zUgc+4qTOUBoNe4XxDskt1HPKO007ZPiMgLDq2s7Kw==} - engines: {node: '>=6.9.0'} - '@babel/helper-module-transforms@7.22.5': resolution: {integrity: sha512-+hGKDt/Ze8GFExiVHno/2dvG5IdstpzCq0y4Qc9OJ25D4q3pKfiIP/4Vp3/JvhDkLKsDK2api3q3fpIgiIF5bw==} engines: {node: '>=6.9.0'} @@ -1714,36 +1696,26 @@ packages: peerDependencies: '@babel/core': ^7.0.0 - '@babel/helper-module-transforms@7.25.7': - resolution: {integrity: sha512-k/6f8dKG3yDz/qCwSM+RKovjMix563SLxQFo0UhRNo239SP6n9u5/eLtKD6EAjwta2JHJ49CsD8pms2HdNiMMQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 - '@babel/helper-optimise-call-expression@7.22.5': resolution: {integrity: sha512-HBwaojN0xFRx4yIvpwGqxiV2tUfl7401jlok564NgB9EHS1y6QT17FmKWm4ztqjeVdXLuC4fSvHc5ePpQjoTbw==} engines: {node: '>=6.9.0'} - '@babel/helper-optimise-call-expression@7.25.7': - resolution: {integrity: sha512-VAwcwuYhv/AT+Vfr28c9y6SHzTan1ryqrydSTFGjU0uDJHw3uZ+PduI8plCLkRsDnqK2DMEDmwrOQRsK/Ykjng==} + '@babel/helper-optimise-call-expression@7.24.7': + resolution: {integrity: sha512-jKiTsW2xmWwxT1ixIdfXUZp+P5yURx2suzLZr5Hi64rURpDYdMW0pv+Uf17EYk2Rd428Lx4tLsnjGJzYKDM/6A==} engines: {node: '>=6.9.0'} '@babel/helper-plugin-utils@7.24.8': resolution: {integrity: sha512-FFWx5142D8h2Mgr/iPVGH5G7w6jDn4jUSpZTyDnQO0Yn7Ks2Kuz6Pci8H6MPCoUJegd/UZQ3tAvfLCxQSnWWwg==} engines: {node: '>=6.9.0'} - '@babel/helper-plugin-utils@7.25.7': - resolution: {integrity: sha512-eaPZai0PiqCi09pPs3pAFfl/zYgGaE6IdXtYvmf0qlcDTd3WCtO7JWCcRd64e0EQrcYgiHibEZnOGsSY4QSgaw==} - engines: {node: '>=6.9.0'} - '@babel/helper-remap-async-to-generator@7.22.5': resolution: {integrity: sha512-cU0Sq1Rf4Z55fgz7haOakIyM7+x/uCFwXpLPaeRzfoUtAEAuUZjZvFPjL/rk5rW693dIgn2hng1W7xbT7lWT4g==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 - '@babel/helper-remap-async-to-generator@7.25.7': - resolution: {integrity: sha512-kRGE89hLnPfcz6fTrlNU+uhgcwv0mBE4Gv3P9Ke9kLVJYpi4AMVVEElXvB5CabrPZW4nCM8P8UyyjrzCM0O2sw==} + '@babel/helper-remap-async-to-generator@7.25.0': + resolution: {integrity: sha512-NhavI2eWEIz/H9dbrG0TuOicDhNexze43i5z7lEqwYm0WEZVTwnPpA0EafUTP7+6/W79HWIP2cTe3Z5NiSTVpw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 @@ -1752,8 +1724,8 @@ packages: resolution: {integrity: sha512-aLdNM5I3kdI/V9xGNyKSF3X/gTyMUBohTZ+/3QdQKAA9vxIiy12E+8E2HoOP1/DjeqU+g6as35QHJNMDDYpuCg==} engines: {node: '>=6.9.0'} - '@babel/helper-replace-supers@7.25.7': - resolution: {integrity: sha512-iy8JhqlUW9PtZkd4pHM96v6BdJ66Ba9yWSE4z0W4TvSZwLBPkyDsiIU3ENe4SmrzRBs76F7rQXTy1lYC49n6Lw==} + '@babel/helper-replace-supers@7.25.0': + resolution: {integrity: sha512-q688zIvQVYtZu+i2PsdIu/uWGRpfxzr5WESsfpShfZECkO+d2o+WROWezCi/Q6kJ0tfPa5+pUGUlfx2HhrA3Bg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 @@ -1766,16 +1738,12 @@ packages: resolution: {integrity: sha512-zBAIvbCMh5Ts+b86r/CjU+4XGYIs+R1j951gxI3KmmxBMhCg4oQMsv6ZXQ64XOm/cvzfU1FmoCyt6+owc5QMYg==} engines: {node: '>=6.9.0'} - '@babel/helper-simple-access@7.25.7': - resolution: {integrity: sha512-FPGAkJmyoChQeM+ruBGIDyrT2tKfZJO8NcxdC+CWNJi7N8/rZpSxK7yvBJ5O/nF1gfu5KzN7VKG3YVSLFfRSxQ==} - engines: {node: '>=6.9.0'} - '@babel/helper-skip-transparent-expression-wrappers@7.22.5': resolution: {integrity: sha512-tK14r66JZKiC43p8Ki33yLBVJKlQDFoA8GYN67lWCDCqoL6EMMSuM9b+Iff2jHaM/RRFYl7K+iiru7hbRqNx8Q==} engines: {node: '>=6.9.0'} - '@babel/helper-skip-transparent-expression-wrappers@7.25.7': - resolution: {integrity: sha512-pPbNbchZBkPMD50K0p3JGcFMNLVUCuU/ABybm/PGNj4JiHrpmNyqqCphBk4i19xXtNV0JhldQJJtbSW5aUvbyA==} + '@babel/helper-skip-transparent-expression-wrappers@7.24.7': + resolution: {integrity: sha512-IO+DLT3LQUElMbpzlatRASEyQtfhSE0+m465v++3jyyXeBTBUjtVZg28/gHeV5mrTJqvEKhKroBGAvhW+qPHiQ==} engines: {node: '>=6.9.0'} '@babel/helper-split-export-declaration@7.22.5': @@ -1786,18 +1754,10 @@ packages: resolution: {integrity: sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ==} engines: {node: '>=6.9.0'} - '@babel/helper-string-parser@7.25.7': - resolution: {integrity: sha512-CbkjYdsJNHFk8uqpEkpCvRs3YRp9tY6FmFY7wLMSYuGYkrdUi7r2lc4/wqsvlHoMznX3WJ9IP8giGPq68T/Y6g==} - engines: {node: '>=6.9.0'} - '@babel/helper-validator-identifier@7.24.7': resolution: {integrity: sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==} engines: {node: '>=6.9.0'} - '@babel/helper-validator-identifier@7.25.7': - resolution: {integrity: sha512-AM6TzwYqGChO45oiuPqwL2t20/HdMC1rTPAesnBCgPCSF1x3oN9MVUwQV2iyz4xqWrctwK5RNC8LV22kaQCNYg==} - engines: {node: '>=6.9.0'} - '@babel/helper-validator-option@7.22.5': resolution: {integrity: sha512-R3oB6xlIVKUnxNUxbmgq7pKjxpru24zlimpE8WK47fACIlM0II/Hm1RS8IaOI7NgCr6LNS+jl5l75m20npAziw==} engines: {node: '>=6.9.0'} @@ -1806,16 +1766,12 @@ packages: resolution: {integrity: sha512-xb8t9tD1MHLungh/AIoWYN+gVHaB9kwlu8gffXGSt3FFEIT7RjS+xWbc2vUD1UTZdIpKj/ab3rdqJ7ufngyi2Q==} engines: {node: '>=6.9.0'} - '@babel/helper-validator-option@7.25.7': - resolution: {integrity: sha512-ytbPLsm+GjArDYXJ8Ydr1c/KJuutjF2besPNbIZnZ6MKUxi/uTA22t2ymmA4WFjZFpjiAMO0xuuJPqK2nvDVfQ==} - engines: {node: '>=6.9.0'} - '@babel/helper-wrap-function@7.22.5': resolution: {integrity: sha512-bYqLIBSEshYcYQyfks8ewYA8S30yaGSeRslcvKMvoUk6HHPySbxHq9YRi6ghhzEU+yhQv9bP/jXnygkStOcqZw==} engines: {node: '>=6.9.0'} - '@babel/helper-wrap-function@7.25.7': - resolution: {integrity: sha512-MA0roW3JF2bD1ptAaJnvcabsVlNQShUaThyJbCDD4bCp8NEgiFvpoqRI2YS22hHlc2thjO/fTg2ShLMC3jygAg==} + '@babel/helper-wrap-function@7.25.0': + resolution: {integrity: sha512-s6Q1ebqutSiZnEjaofc/UKDyC4SbzV5n5SrA2Gq8UawLycr3i04f1dX4OzoQVnexm6aOCh37SQNYlJ/8Ku+PMQ==} engines: {node: '>=6.9.0'} '@babel/helpers@7.22.5': @@ -1826,10 +1782,6 @@ packages: resolution: {integrity: sha512-MjgLZ42aCm0oGjJj8CtSM3DB8NOOf8h2l7DCTePJs29u+v7yO/RBX9nShlKMgFnRks/Q4tBAe7Hxnov9VkGwLw==} engines: {node: '>=6.9.0'} - '@babel/helpers@7.25.7': - resolution: {integrity: sha512-Sv6pASx7Esm38KQpF/U/OXLwPPrdGHNKoeblRxgZRLXnAtnkEe4ptJPDtAZM7fBLadbc1Q07kQpSiGQ0Jg6tRA==} - engines: {node: '>=6.9.0'} - '@babel/highlight@7.22.5': resolution: {integrity: sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw==} engines: {node: '>=6.9.0'} @@ -1838,20 +1790,11 @@ packages: resolution: {integrity: sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==} engines: {node: '>=6.9.0'} - '@babel/highlight@7.25.7': - resolution: {integrity: sha512-iYyACpW3iW8Fw+ZybQK+drQre+ns/tKpXbNESfrhNnPLIklLbXr7MYJ6gPEd0iETGLOK+SxMjVvKb/ffmk+FEw==} - engines: {node: '>=6.9.0'} - '@babel/parser@7.25.6': resolution: {integrity: sha512-trGdfBdbD0l1ZPmcJ83eNxB9rbEax4ALFTF7fN386TMYbeCQbyme5cOEXQhbGXKebwGaB/J52w1mrklMcbgy6Q==} engines: {node: '>=6.0.0'} hasBin: true - '@babel/parser@7.25.8': - resolution: {integrity: sha512-HcttkxzdPucv3nNFmfOOMfFf64KgdJVqm1KaCm25dPGMLElo9nsLvXeJECQg8UzPuBGLyTSA0ZzqCtDSzKTEoQ==} - engines: {node: '>=6.0.0'} - hasBin: true - '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.22.5': resolution: {integrity: sha512-NP1M5Rf+u2Gw9qfSO4ihjcTGW5zXTi36ITLd4/EoAcEhIZ0yjMqmftDNl3QC19CX7olhrjpyU454g/2W7X0jvQ==} engines: {node: '>=6.9.0'} @@ -1884,8 +1827,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-proposal-export-default-from@7.25.8': - resolution: {integrity: sha512-5SLPHA/Gk7lNdaymtSVS9jH77Cs7yuHTR3dYj+9q+M7R7tNLXhNuvnmOfafRIzpWL+dtMibuu1I4ofrc768Gkw==} + '@babel/plugin-proposal-export-default-from@7.24.7': + resolution: {integrity: sha512-CcmFwUJ3tKhLjPdt4NP+SHMshebytF8ZTYOv5ZDpkzq2sin80Wb5vJrGt8fhPrORQCfoSa0LAxC/DW+GAC5+Hw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -1991,8 +1934,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-syntax-export-default-from@7.25.7': - resolution: {integrity: sha512-LRUCsC0YucSjabsmxx6yly8+Q/5mxKdp9gemlpR9ro3bfpcOQOXx/CHivs7QCbjgygd6uQ2GcRfHu1FVax/hgg==} + '@babel/plugin-syntax-export-default-from@7.24.7': + resolution: {integrity: sha512-bTPz4/635WQ9WhwsyPdxUJDVpsi/X9BMmy/8Rf/UAlOO4jSql4CxUCjWI5PiM+jG+c4LVPTScoTw80geFj9+Bw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -2014,8 +1957,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-syntax-flow@7.25.7': - resolution: {integrity: sha512-fyoj6/YdVtlv2ROig/J0fP7hh/wNO1MJGm1NR70Pg7jbkF+jOUL9joorqaCOQh06Y+LfgTagHzC8KqZ3MF782w==} + '@babel/plugin-syntax-flow@7.24.7': + resolution: {integrity: sha512-9G8GYT/dxn/D1IIKOUBmGX0mnmj46mGH9NnZyJLwtCpgh5f7D2VbuKodb+2s9m1Yavh1s7ASQN8lf0eqrb1LTw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -2048,12 +1991,6 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-syntax-jsx@7.25.7': - resolution: {integrity: sha512-ruZOnKO+ajVL/MVx+PwNBPOkrnXTXoWMtte1MBpegfCArhqOe3Bj52avVj1huLLxNKYKXYaSxZ2F+woK1ekXfw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - '@babel/plugin-syntax-logical-assignment-operators@7.10.4': resolution: {integrity: sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==} peerDependencies: @@ -2102,12 +2039,6 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-syntax-typescript@7.25.7': - resolution: {integrity: sha512-rR+5FDjpCHqqZN2bzZm18bVYGaejGq5ZkpVCJLXor/+zlSrSoc4KWcHI0URVWjl/68Dyr1uwZUz/1njycEAv9g==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - '@babel/plugin-syntax-unicode-sets-regex@7.18.6': resolution: {integrity: sha512-727YkEAPwSIQTv5im8QHz3upqp92JTWhidIC81Tdx4VJYIte/VndKf1qKrfnnhPLiPghStWfvC/iFaMCQu7Nqg==} engines: {node: '>=6.9.0'} @@ -2120,8 +2051,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-arrow-functions@7.25.7': - resolution: {integrity: sha512-EJN2mKxDwfOUCPxMO6MUI58RN3ganiRAG/MS/S3HfB6QFNjroAMelQo/gybyYq97WerCBAZoyrAoW8Tzdq2jWg==} + '@babel/plugin-transform-arrow-functions@7.24.7': + resolution: {integrity: sha512-Dt9LQs6iEY++gXUwY03DNFat5C2NbO48jj+j/bSAz6b3HgPs39qcPiYt77fDObIcFwj3/C2ICX9YMwGflUoSHQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -2138,8 +2069,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-async-to-generator@7.25.7': - resolution: {integrity: sha512-ZUCjAavsh5CESCmi/xCpX1qcCaAglzs/7tmuvoFnJgA1dM7gQplsguljoTg+Ru8WENpX89cQyAtWoaE0I3X3Pg==} + '@babel/plugin-transform-async-to-generator@7.24.7': + resolution: {integrity: sha512-SQY01PcJfmQ+4Ash7NE+rpbLFbmqA2GPIgqzxfFTL4t1FKRq4zTms/7htKpoCUI9OcFYgzqfmCdH53s6/jn5fA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -2156,8 +2087,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-block-scoping@7.25.7': - resolution: {integrity: sha512-ZEPJSkVZaeTFG/m2PARwLZQ+OG0vFIhPlKHK/JdIMy8DbRJ/htz6LRrTFtdzxi9EHmcwbNPAKDnadpNSIW+Aow==} + '@babel/plugin-transform-block-scoping@7.25.0': + resolution: {integrity: sha512-yBQjYoOjXlFv9nlXb3f1casSHOZkWr29NX+zChVanLg5Nc157CrbEX9D7hxxtTpuFy7Q0YzmmWfJxzvps4kXrQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -2180,8 +2111,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-classes@7.25.7': - resolution: {integrity: sha512-9j9rnl+YCQY0IGoeipXvnk3niWicIB6kCsWRGLwX241qSXpbA4MKxtp/EdvFxsc4zI5vqfLxzOd0twIJ7I99zg==} + '@babel/plugin-transform-classes@7.25.4': + resolution: {integrity: sha512-oexUfaQle2pF/b6E0dwsxQtAol9TLSO88kQvym6HHBWFliV2lGdrPieX+WgMRLSJDVzdYywk7jXbLPuO2KLTLg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -2192,8 +2123,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-computed-properties@7.25.7': - resolution: {integrity: sha512-QIv+imtM+EtNxg/XBKL3hiWjgdLjMOmZ+XzQwSgmBfKbfxUjBzGgVPklUuE55eq5/uVoh8gg3dqlrwR/jw3ZeA==} + '@babel/plugin-transform-computed-properties@7.24.7': + resolution: {integrity: sha512-25cS7v+707Gu6Ds2oY6tCkUwsJ9YIDbggd9+cu9jzzDgiNq7hR/8dkzxWfKWnTic26vsI3EsCXNd4iEB6e8esQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -2204,8 +2135,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-destructuring@7.25.7': - resolution: {integrity: sha512-xKcfLTlJYUczdaM1+epcdh1UGewJqr9zATgrNHcLBcV2QmfvPPEixo/sK/syql9cEmbr7ulu5HMFG5vbbt/sEA==} + '@babel/plugin-transform-destructuring@7.24.8': + resolution: {integrity: sha512-36e87mfY8TnRxc7yc6M9g9gOB7rKgSahqkIKwLpz4Ppk2+zC2Cy1is0uwtuSG6AE4zlTOUa+7JGz9jCJGLqQFQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -2252,8 +2183,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-flow-strip-types@7.25.7': - resolution: {integrity: sha512-q8Td2PPc6/6I73g96SreSUCKEcwMXCwcXSIAVTyTTN6CpJe0dMj8coxu1fg1T9vfBLi6Rsi6a4ECcFBbKabS5w==} + '@babel/plugin-transform-flow-strip-types@7.25.2': + resolution: {integrity: sha512-InBZ0O8tew5V0K6cHcQ+wgxlrjOw1W4wDXLkOTjLRD8GYhTSkxTVBtdy3MMtvYBrbAWa1Qm3hNoTc1620Yj+Mg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -2270,8 +2201,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-function-name@7.25.7': - resolution: {integrity: sha512-5MCTNcjCMxQ63Tdu9rxyN6cAWurqfrDZ76qvVPrGYdBxIj+EawuuxTu/+dgJlhK5eRz3v1gLwp6XwS8XaX2NiQ==} + '@babel/plugin-transform-function-name@7.25.1': + resolution: {integrity: sha512-TVVJVdW9RKMNgJJlLtHsKDTydjZAbwIsn6ySBPQaEAUU5+gVvlJt/9nRmqVbsV/IBanRjzWoaAQKLoamWVOUuA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -2288,8 +2219,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-literals@7.25.7': - resolution: {integrity: sha512-fwzkLrSu2fESR/cm4t6vqd7ebNIopz2QHGtjoU+dswQo/P6lwAG04Q98lliE3jkz/XqnbGFLnUcE0q0CVUf92w==} + '@babel/plugin-transform-literals@7.25.2': + resolution: {integrity: sha512-HQI+HcTbm9ur3Z2DkO+jgESMAMcYLuN/A7NRw9juzxAezN9AvqvUTnpKP/9kkYANz6u7dFlAyOu44ejuGySlfw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -2318,8 +2249,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-modules-commonjs@7.25.7': - resolution: {integrity: sha512-L9Gcahi0kKFYXvweO6n0wc3ZG1ChpSFdgG+eV1WYZ3/dGbJK7vvk91FgGgak8YwRgrCuihF8tE/Xg07EkL5COg==} + '@babel/plugin-transform-modules-commonjs@7.24.8': + resolution: {integrity: sha512-WHsk9H8XxRs3JXKWFiqtQebdh9b/pTk4EgueygFzYlTKAg0Ud985mSevdNjdXdFBATSKVJGQXP1tv6aGbssLKA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -2342,8 +2273,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0 - '@babel/plugin-transform-named-capturing-groups-regex@7.25.7': - resolution: {integrity: sha512-BtAT9LzCISKG3Dsdw5uso4oV1+v2NlVXIIomKJgQybotJY3OwCwJmkongjHgwGKoZXd0qG5UZ12JUlDQ07W6Ow==} + '@babel/plugin-transform-named-capturing-groups-regex@7.24.7': + resolution: {integrity: sha512-/jr7h/EWeJtk1U/uz2jlsCioHkZk1JJZVcc8oQsJ1dUlaJD83f4/6Zeh2aHt9BIFokHIsSeDfhUmju0+1GPd6g==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 @@ -2396,8 +2327,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-parameters@7.25.7': - resolution: {integrity: sha512-FYiTvku63me9+1Nz7TOx4YMtW3tWXzfANZtrzHhUZrz4d47EEtMQhzFoZWESfXuAMMT5mwzD4+y1N8ONAX6lMQ==} + '@babel/plugin-transform-parameters@7.24.7': + resolution: {integrity: sha512-yGWW5Rr+sQOhK0Ot8hjDJuxU3XLRQGflvT4lhlSY0DFvdb3TwKaY26CJzHtYllU0vT9j58hc37ndFPsqT1SrzA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -2408,8 +2339,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-private-methods@7.25.7': - resolution: {integrity: sha512-KY0hh2FluNxMLwOCHbxVOKfdB5sjWG4M183885FmaqWWiGMhRZq4DQRKH6mHdEucbJnyDyYiZNwNG424RymJjA==} + '@babel/plugin-transform-private-methods@7.25.4': + resolution: {integrity: sha512-ao8BG7E2b/URaUQGqN3Tlsg+M3KlHY6rJ1O1gXAEUnZoyNQnvKyH87Kfg+FoxSeyWUB8ISZZsC91C44ZuBFytw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -2420,8 +2351,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-private-property-in-object@7.25.8': - resolution: {integrity: sha512-8Uh966svuB4V8RHHg0QJOB32QK287NBksJOByoKmHMp1TAobNniNalIkI2i5IPj5+S9NYCG4VIjbEuiSN8r+ow==} + '@babel/plugin-transform-private-property-in-object@7.24.7': + resolution: {integrity: sha512-9z76mxwnwFxMyxZWEgdgECQglF2Q7cFLm0kMf8pGwt+GSJsY0cONKj/UuO4bOH0w/uAel3ekS4ra5CEAyJRmDA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -2444,8 +2375,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-react-display-name@7.25.7': - resolution: {integrity: sha512-r0QY7NVU8OnrwE+w2IWiRom0wwsTbjx4+xH2RTd7AVdof3uurXOF+/mXHQDRk+2jIvWgSaCHKMgggfvM4dyUGA==} + '@babel/plugin-transform-react-display-name@7.24.7': + resolution: {integrity: sha512-H/Snz9PFxKsS1JLI4dJLtnJgCJRoo0AUm3chP6NYr+9En1JMKloheEiLIhlp5MDVznWo+H3AAC1Mc8lmUEpsgg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -2456,14 +2387,14 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-react-jsx-self@7.25.7': - resolution: {integrity: sha512-JD9MUnLbPL0WdVK8AWC7F7tTG2OS6u/AKKnsK+NdRhUiVdnzyR1S3kKQCaRLOiaULvUiqK6Z4JQE635VgtCFeg==} + '@babel/plugin-transform-react-jsx-self@7.24.7': + resolution: {integrity: sha512-fOPQYbGSgH0HUp4UJO4sMBFjY6DuWq+2i8rixyUMb3CdGixs/gccURvYOAhajBdKDoGajFr3mUq5rH3phtkGzw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-react-jsx-source@7.25.7': - resolution: {integrity: sha512-S/JXG/KrbIY06iyJPKfxr0qRxnhNOdkNXYBl/rmwgDd72cQLH9tEGkDm/yJPGvcSIUoikzfjMios9i+xT/uv9w==} + '@babel/plugin-transform-react-jsx-source@7.24.7': + resolution: {integrity: sha512-J2z+MWzZHVOemyLweMqngXrgGC42jQ//R0KdxqkIz/OrbVIIlhFI3WigZ5fO+nwFvBlncr4MGapd8vTyc7RPNQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -2480,8 +2411,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-react-jsx@7.25.7': - resolution: {integrity: sha512-vILAg5nwGlR9EXE8JIOX4NHXd49lrYbN8hnjffDtoULwpL9hUx/N55nqh2qd0q6FyNDfjl9V79ecKGvFbcSA0Q==} + '@babel/plugin-transform-react-jsx@7.25.2': + resolution: {integrity: sha512-KQsqEAVBpU82NM/B/N9j9WOdphom1SZH3R+2V7INrQUH+V9EBFwZsEJl8eBIVeQE62FxJCc70jzEZwqU7RcVqA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -2510,8 +2441,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-runtime@7.25.7': - resolution: {integrity: sha512-Y9p487tyTzB0yDYQOtWnC+9HGOuogtP3/wNpun1xJXEEvI6vip59BSBTsHnekZLqxmPcgsrAKt46HAAb//xGhg==} + '@babel/plugin-transform-runtime@7.25.4': + resolution: {integrity: sha512-8hsyG+KUYGY0coX6KUCDancA0Vw225KJ2HJO0yCNr1vq5r+lJTleDaJf0K7iOhjw4SWhu03TMBzYTJ9krmzULQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -2522,8 +2453,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-shorthand-properties@7.25.7': - resolution: {integrity: sha512-uBbxNwimHi5Bv3hUccmOFlUy3ATO6WagTApenHz9KzoIdn0XeACdB12ZJ4cjhuB2WSi80Ez2FWzJnarccriJeA==} + '@babel/plugin-transform-shorthand-properties@7.24.7': + resolution: {integrity: sha512-KsDsevZMDsigzbA09+vacnLpmPH4aWjcZjXdyFKGzpplxhbeB4wYtury3vglQkg6KM/xEPKt73eCjPPf1PgXBA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -2534,8 +2465,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-spread@7.25.7': - resolution: {integrity: sha512-Mm6aeymI0PBh44xNIv/qvo8nmbkpZze1KvR8MkEqbIREDxoiWTi18Zr2jryfRMwDfVZF9foKh060fWgni44luw==} + '@babel/plugin-transform-spread@7.24.7': + resolution: {integrity: sha512-x96oO0I09dgMDxJaANcRyD4ellXFLLiWhuwDxKZX5g2rWP1bTPkBSwCYv96VDXVT1bD9aPj8tppr5ITIh8hBng==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -2546,8 +2477,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-sticky-regex@7.25.7': - resolution: {integrity: sha512-ZFAeNkpGuLnAQ/NCsXJ6xik7Id+tHuS+NT+ue/2+rn/31zcdnupCdmunOizEaP0JsUmTFSTOPoQY7PkK2pttXw==} + '@babel/plugin-transform-sticky-regex@7.24.7': + resolution: {integrity: sha512-kHPSIJc9v24zEml5geKg9Mjx5ULpfncj0wRpYtxbvKyTtHCYDkVE3aHQ03FrpEo4gEe2vrJJS1Y9CJTaThA52g==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -2570,8 +2501,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-typescript@7.25.7': - resolution: {integrity: sha512-VKlgy2vBzj8AmEzunocMun2fF06bsSWV+FvVXohtL6FGve/+L217qhHxRTVGHEDO/YR8IANcjzgJsd04J8ge5Q==} + '@babel/plugin-transform-typescript@7.25.2': + resolution: {integrity: sha512-lBwRvjSmqiMYe/pS0+1gggjJleUJi7NzjvQ1Fkqtt69hBa/0t1YuW/MLQMAPixfwaQOHUXsd6jeU3Z+vdGv3+A==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -2594,8 +2525,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-unicode-regex@7.25.7': - resolution: {integrity: sha512-8JKfg/hiuA3qXnlLx8qtv5HWRbgyFx2hMMtpDDuU2rTckpKkGu4ycK5yYHwuEa16/quXfoxHBIApEsNyMWnt0g==} + '@babel/plugin-transform-unicode-regex@7.24.7': + resolution: {integrity: sha512-hlQ96MBZSAXUq7ltkjtu3FJCCSMx/j629ns3hA3pXnBXjanNP0LHi+JpPeA81zaWgVK1VGH95Xuy7u0RyQ8kMg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -2612,8 +2543,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/preset-flow@7.25.7': - resolution: {integrity: sha512-q2x3g0YHzo/Ohsr51KOYS/BtZMsvkzVd8qEyhZAyTatYdobfgXCuyppTqTuIhdq5kR/P3nyyVvZ6H5dMc4PnCQ==} + '@babel/preset-flow@7.24.7': + resolution: {integrity: sha512-NL3Lo0NorCU607zU3NwRyJbpaB6E3t0xtd3LfAQKDfkeX4/ggcDXvkmkW42QWT5owUeW/jAe4hn+2qvkV1IbfQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -2635,14 +2566,14 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/preset-typescript@7.25.7': - resolution: {integrity: sha512-rkkpaXJZOFN45Fb+Gki0c+KMIglk4+zZXOoMJuyEK8y8Kkc8Jd3BDmP7qPsz0zQMJj+UD7EprF+AqAXcILnexw==} + '@babel/preset-typescript@7.24.7': + resolution: {integrity: sha512-SyXRe3OdWwIwalxDg5UtJnJQO+YPcTfwiIY2B0Xlddh9o7jpWLvv8X1RthIeDOxQ+O1ML5BLPCONToObyVQVuQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/register@7.25.7': - resolution: {integrity: sha512-qHTd2Rhn/rKhSUwdY6+n98FmwXN+N+zxSVx3zWqRe9INyvTpv+aQ5gDV2+43ACd3VtMBzPPljbb0gZb8u5ma6Q==} + '@babel/register@7.24.6': + resolution: {integrity: sha512-WSuFCc2wCqMeXkz/i3yfAAsxwWflEgbVkZzivgAmXl/MxrXeoYFZOOPllbC8R8WTF7u61wSRQtDVZ1879cdu6w==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -2654,34 +2585,22 @@ packages: resolution: {integrity: sha512-DSgLeL/FNcpXuzav5wfYvHCGvynXkJbn3Zvc3823AEe9nPwW9IK4UoCSS5yGymmQzN0pCPvivtgS6/8U2kkm1w==} engines: {node: '>=6.9.0'} - '@babel/runtime@7.25.7': - resolution: {integrity: sha512-FjoyLe754PMiYsFaN5C94ttGiOmBNYTf6pLr4xXHAT5uctHb092PBszndLDR5XA/jghQvn4n7JMHl7dmTgbm9w==} + '@babel/runtime@7.25.6': + resolution: {integrity: sha512-VBj9MYyDb9tuLq7yzqjgzt6Q+IBQLrGZfdjOekyEirZPHxXWoTSGUTMrpsfi58Up73d13NfYLv8HT9vmznjzhQ==} engines: {node: '>=6.9.0'} '@babel/template@7.25.0': resolution: {integrity: sha512-aOOgh1/5XzKvg1jvVz7AVrx2piJ2XBi227DHmbY6y+bM9H2FlN+IfecYu4Xl0cNiiVejlsCri89LUsbj8vJD9Q==} engines: {node: '>=6.9.0'} - '@babel/template@7.25.7': - resolution: {integrity: sha512-wRwtAgI3bAS+JGU2upWNL9lSlDcRCqD05BZ1n3X2ONLH1WilFP6O1otQjeMK/1g0pvYcXC7b/qVUB1keofjtZA==} - engines: {node: '>=6.9.0'} - '@babel/traverse@7.25.6': resolution: {integrity: sha512-9Vrcx5ZW6UwK5tvqsj0nGpp/XzqthkT0dqIc9g1AdtygFToNtTF67XzYS//dm+SAK9cp3B9R4ZO/46p63SCjlQ==} engines: {node: '>=6.9.0'} - '@babel/traverse@7.25.7': - resolution: {integrity: sha512-jatJPT1Zjqvh/1FyJs6qAHL+Dzb7sTb+xr7Q+gM1b+1oBsMsQQ4FkVKb6dFlJvLlVssqkRzV05Jzervt9yhnzg==} - engines: {node: '>=6.9.0'} - '@babel/types@7.25.6': resolution: {integrity: sha512-/l42B1qxpG6RdfYf343Uw1vmDjeNhneUXtzhojE7pDgfpEypmRhI6j1kr17XCVv4Cgl9HdAiQY2x0GwKm7rWCw==} engines: {node: '>=6.9.0'} - '@babel/types@7.25.8': - resolution: {integrity: sha512-JWtuCu8VQsMladxVz/P4HzHUGCAwpuqacmowgXFs5XjxIgKuNjnLokQzuVjlTvIzODaDmpjT3oxcC48vyk9EWg==} - engines: {node: '>=6.9.0'} - '@bcoe/v8-coverage@0.2.3': resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} @@ -3873,8 +3792,8 @@ packages: resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} deprecated: Use @eslint/object-schema instead - '@humanwhocodes/retry@0.3.1': - resolution: {integrity: sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==} + '@humanwhocodes/retry@0.3.0': + resolution: {integrity: sha512-d2CGZR2o7fS6sWB7DG/3a95bGKQyHMACZ5aW8qGkkqQpUoZV6C0X7Pc7l4ZNMZkfNBf4VWNe9E1jRsf0G146Ew==} engines: {node: '>=18.18'} '@iarna/toml@2.2.5': @@ -4122,8 +4041,8 @@ packages: '@metamask/safe-event-emitter@2.0.0': resolution: {integrity: sha512-/kSXhY692qiV1MXu6EeOZvg5nECLclxNXcKCxJ3cXQgYuRymRHpdx/t7JXfsK+JLjwA1e1c1/SBrlQYpusC29Q==} - '@metamask/safe-event-emitter@3.1.2': - resolution: {integrity: sha512-5yb2gMI1BDm0JybZezeoX/3XhPDOtTbcFvpTXM9kxsoZjPZFh4XciqRbpD6N86HYZqWDhEaKUDuOyR0sQHEjMA==} + '@metamask/safe-event-emitter@3.1.1': + resolution: {integrity: sha512-ihb3B0T/wJm1eUuArYP4lCTSEoZsClHhuWyfo/kMX3m/odpqNcPfsz5O2A3NT7dXCAgWPGDQGPqygCpgeniKMw==} engines: {node: '>=12.0.0'} '@metamask/sdk-communication-layer@0.28.2': @@ -4173,8 +4092,8 @@ packages: resolution: {integrity: sha512-I6bkduevXb72TIM9q2LRO63JSsF9EXduh3sBr9oybNX2hNNpr/j1tEjXrsG0Uabm4MJ1xkGAQEMwifvKZIkyxQ==} engines: {node: '>=16.0.0'} - '@metamask/utils@9.3.0': - resolution: {integrity: sha512-w8CVbdkDrVXFJbfBSlDfafDR6BAkpDmv1bC1UJVCoVny5tW2RKAdn9i68Xf7asYT4TnUhl/hN4zfUiKQq9II4g==} + '@metamask/utils@9.2.1': + resolution: {integrity: sha512-/u663aUaB6+Xe75i3Mt/1cCljm41HDYIsna5oBrwGvgkY2zH7/9k9Zjd706cxoAbxN7QgLSVAReUiGnuxCuXrQ==} engines: {node: '>=16.0.0'} '@microsoft/tsdoc-config@0.17.0': @@ -4449,43 +4368,43 @@ packages: '@open-draft/until@2.1.0': resolution: {integrity: sha512-U69T3ItWHvLwGg5eJ0n3I62nWuE6ilHlmz7zM0npLBRvPRd7e6NYmg54vvRtP5mZG7kZqZCFVdsTWo7BPtBujg==} - '@oven/bun-darwin-aarch64@1.1.31': - resolution: {integrity: sha512-9qwhVRMYJsczZOqR/m5Miu7AVQ+kNV3xeNK/L+j0m7vIr2fyqBhlRieShwyzQ5GOl95QfEJ4B30OnUqqwF7Uqg==} + '@oven/bun-darwin-aarch64@1.1.32': + resolution: {integrity: sha512-/5lu8RJB/iEoC9pzFOCZLCEmNsEI3DEEyxfItZpih/piNOFhCYmoMvm7mM0YXqSc7pfxYaKukEZEHGeIOiu/3Q==} cpu: [arm64] os: [darwin] - '@oven/bun-darwin-x64-baseline@1.1.31': - resolution: {integrity: sha512-Ub3sR5JkPS+Jc2IoIQ8E+qMyRDdrPVFSCIITCuULP4f7CL9GL8Dh9yLZZjO/evCy1vZlIo9w7V+S0puKWv2FFg==} + '@oven/bun-darwin-x64-baseline@1.1.32': + resolution: {integrity: sha512-XRP+APoLxrXznL7BEHipAdDu0Mn1RwD9PsaqFu1Be5Dbyi+2bYICuTiN1W9vfZNN3kK8eTyniT7kjwLSTcHbEg==} cpu: [x64] os: [darwin] - '@oven/bun-darwin-x64@1.1.31': - resolution: {integrity: sha512-HAlTzVuD+JFg5Vw6EGNxTgMNTXtipuGZsiGdk7TMRNdkabecwHs4LoM9FwXVXCrksWp6IZ8hIsSgwLfoby/8cg==} + '@oven/bun-darwin-x64@1.1.32': + resolution: {integrity: sha512-Slk4QFHcqZ94mnNlzsCG/9m+gET0mpi13bfizRGv8QNRku8mQTs9brN5XvovYrP5t0rfaZDFMOoaOs6wk6rcDg==} cpu: [x64] os: [darwin] - '@oven/bun-linux-aarch64@1.1.31': - resolution: {integrity: sha512-zovsX7G8D3G73Py6oVxJHjVzjob8W5vZc+0I6D5bX6Y9B5rOAGR2O2DrmFE1wRMK/XVnsaZaxNPdzsrFslKCJg==} + '@oven/bun-linux-aarch64@1.1.32': + resolution: {integrity: sha512-7QdyRCiLHb1MuwDH7iir5xD6gTKWlvMGxvcQhbY/U1djqG/gft4+PaJrSJQcVhqRb143mrMNXIhTgc84O6htMw==} cpu: [arm64] os: [linux] - '@oven/bun-linux-x64-baseline@1.1.31': - resolution: {integrity: sha512-EFdgHhxC0yiDl4ndwyZ3o41YvPCC4pLA6i2It1Se1irzuIhf6CopQ5UmlvwIDWMuGmnxjyhnzzKmJg8LUcFHow==} + '@oven/bun-linux-x64-baseline@1.1.32': + resolution: {integrity: sha512-zvXOAUTc6cOlUR26NEwh3isV+z2EW4QxFiWoxgvM7eIuZMnZjV22+H+dEzVKJzV58XgfPX//fEPi3Xjg4xXdMA==} cpu: [x64] os: [linux] - '@oven/bun-linux-x64@1.1.31': - resolution: {integrity: sha512-XsJpDE/j5mJraI04G5b/cOOOTk/q9OJpFchZa2YHYMHcuEoFHkvPYc2M4+XMd5eKxRo1sXXerf6ManEkjOJYNA==} + '@oven/bun-linux-x64@1.1.32': + resolution: {integrity: sha512-JgsQ1ZXKmovQNzf4YdA3WDZVrtEbMlbL43Yjcczovy6lDrhSZkTu1GjzMm5JQnuqNwBC4/eSIgVL27J1Pj6nlA==} cpu: [x64] os: [linux] - '@oven/bun-windows-x64-baseline@1.1.31': - resolution: {integrity: sha512-k2syX3WnEEbpzFzwBiy4HGyU6SL0toepRvqyelKEOgtu5Y0E7ELeqWS+dUb75HBh8cS/SV/Ge8C177XMGzuY1g==} + '@oven/bun-windows-x64-baseline@1.1.32': + resolution: {integrity: sha512-0DgP99AcBfKz3OCS5qO2/8e5TgNhBq8ZiNbPJzQaF4QOpS/Rt+mvFcQUa8x5gTOUPHH9ciaMz0IEs2Qv42eoAw==} cpu: [x64] os: [win32] - '@oven/bun-windows-x64@1.1.31': - resolution: {integrity: sha512-2l2MQ7npabIbLz428DtECHzKCEgzd7M1ABpf9zS3F+mt3gllYj0A0oxBDND9oXNpLxb7ZQVtheBalQ5CW194cw==} + '@oven/bun-windows-x64@1.1.32': + resolution: {integrity: sha512-grzRSH/9YIKWUHumygtG9Aen04wJv+v6lbmTvqsfcc/1/BJJFCLf+69EN3PINAIisih1hycxGa9eleVxjL0fqg==} cpu: [x64] os: [win32] @@ -4934,83 +4853,83 @@ packages: rollup: optional: true - '@rollup/rollup-android-arm-eabi@4.24.0': - resolution: {integrity: sha512-Q6HJd7Y6xdB48x8ZNVDOqsbh2uByBhgK8PiQgPhwkIw/HC/YX5Ghq2mQY5sRMZWHb3VsFkWooUVOZHKr7DmDIA==} + '@rollup/rollup-android-arm-eabi@4.22.5': + resolution: {integrity: sha512-SU5cvamg0Eyu/F+kLeMXS7GoahL+OoizlclVFX3l5Ql6yNlywJJ0OuqTzUx0v+aHhPHEB/56CT06GQrRrGNYww==} cpu: [arm] os: [android] - '@rollup/rollup-android-arm64@4.24.0': - resolution: {integrity: sha512-ijLnS1qFId8xhKjT81uBHuuJp2lU4x2yxa4ctFPtG+MqEE6+C5f/+X/bStmxapgmwLwiL3ih122xv8kVARNAZA==} + '@rollup/rollup-android-arm64@4.22.5': + resolution: {integrity: sha512-S4pit5BP6E5R5C8S6tgU/drvgjtYW76FBuG6+ibG3tMvlD1h9LHVF9KmlmaUBQ8Obou7hEyS+0w+IR/VtxwNMQ==} cpu: [arm64] os: [android] - '@rollup/rollup-darwin-arm64@4.24.0': - resolution: {integrity: sha512-bIv+X9xeSs1XCk6DVvkO+S/z8/2AMt/2lMqdQbMrmVpgFvXlmde9mLcbQpztXm1tajC3raFDqegsH18HQPMYtA==} + '@rollup/rollup-darwin-arm64@4.22.5': + resolution: {integrity: sha512-250ZGg4ipTL0TGvLlfACkIxS9+KLtIbn7BCZjsZj88zSg2Lvu3Xdw6dhAhfe/FjjXPVNCtcSp+WZjVsD3a/Zlw==} cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-x64@4.24.0': - resolution: {integrity: sha512-X6/nOwoFN7RT2svEQWUsW/5C/fYMBe4fnLK9DQk4SX4mgVBiTA9h64kjUYPvGQ0F/9xwJ5U5UfTbl6BEjaQdBQ==} + '@rollup/rollup-darwin-x64@4.22.5': + resolution: {integrity: sha512-D8brJEFg5D+QxFcW6jYANu+Rr9SlKtTenmsX5hOSzNYVrK5oLAEMTUgKWYJP+wdKyCdeSwnapLsn+OVRFycuQg==} cpu: [x64] os: [darwin] - '@rollup/rollup-linux-arm-gnueabihf@4.24.0': - resolution: {integrity: sha512-0KXvIJQMOImLCVCz9uvvdPgfyWo93aHHp8ui3FrtOP57svqrF/roSSR5pjqL2hcMp0ljeGlU4q9o/rQaAQ3AYA==} + '@rollup/rollup-linux-arm-gnueabihf@4.22.5': + resolution: {integrity: sha512-PNqXYmdNFyWNg0ma5LdY8wP+eQfdvyaBAojAXgO7/gs0Q/6TQJVXAXe8gwW9URjbS0YAammur0fynYGiWsKlXw==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm-musleabihf@4.24.0': - resolution: {integrity: sha512-it2BW6kKFVh8xk/BnHfakEeoLPv8STIISekpoF+nBgWM4d55CZKc7T4Dx1pEbTnYm/xEKMgy1MNtYuoA8RFIWw==} + '@rollup/rollup-linux-arm-musleabihf@4.22.5': + resolution: {integrity: sha512-kSSCZOKz3HqlrEuwKd9TYv7vxPYD77vHSUvM2y0YaTGnFc8AdI5TTQRrM1yIp3tXCKrSL9A7JLoILjtad5t8pQ==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm64-gnu@4.24.0': - resolution: {integrity: sha512-i0xTLXjqap2eRfulFVlSnM5dEbTVque/3Pi4g2y7cxrs7+a9De42z4XxKLYJ7+OhE3IgxvfQM7vQc43bwTgPwA==} + '@rollup/rollup-linux-arm64-gnu@4.22.5': + resolution: {integrity: sha512-oTXQeJHRbOnwRnRffb6bmqmUugz0glXaPyspp4gbQOPVApdpRrY/j7KP3lr7M8kTfQTyrBUzFjj5EuHAhqH4/w==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-arm64-musl@4.24.0': - resolution: {integrity: sha512-9E6MKUJhDuDh604Qco5yP/3qn3y7SLXYuiC0Rpr89aMScS2UAmK1wHP2b7KAa1nSjWJc/f/Lc0Wl1L47qjiyQw==} + '@rollup/rollup-linux-arm64-musl@4.22.5': + resolution: {integrity: sha512-qnOTIIs6tIGFKCHdhYitgC2XQ2X25InIbZFor5wh+mALH84qnFHvc+vmWUpyX97B0hNvwNUL4B+MB8vJvH65Fw==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-powerpc64le-gnu@4.24.0': - resolution: {integrity: sha512-2XFFPJ2XMEiF5Zi2EBf4h73oR1V/lycirxZxHZNc93SqDN/IWhYYSYj8I9381ikUFXZrz2v7r2tOVk2NBwxrWw==} + '@rollup/rollup-linux-powerpc64le-gnu@4.22.5': + resolution: {integrity: sha512-TMYu+DUdNlgBXING13rHSfUc3Ky5nLPbWs4bFnT+R6Vu3OvXkTkixvvBKk8uO4MT5Ab6lC3U7x8S8El2q5o56w==} cpu: [ppc64] os: [linux] - '@rollup/rollup-linux-riscv64-gnu@4.24.0': - resolution: {integrity: sha512-M3Dg4hlwuntUCdzU7KjYqbbd+BLq3JMAOhCKdBE3TcMGMZbKkDdJ5ivNdehOssMCIokNHFOsv7DO4rlEOfyKpg==} + '@rollup/rollup-linux-riscv64-gnu@4.22.5': + resolution: {integrity: sha512-PTQq1Kz22ZRvuhr3uURH+U/Q/a0pbxJoICGSprNLAoBEkyD3Sh9qP5I0Asn0y0wejXQBbsVMRZRxlbGFD9OK4A==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-s390x-gnu@4.24.0': - resolution: {integrity: sha512-mjBaoo4ocxJppTorZVKWFpy1bfFj9FeCMJqzlMQGjpNPY9JwQi7OuS1axzNIk0nMX6jSgy6ZURDZ2w0QW6D56g==} + '@rollup/rollup-linux-s390x-gnu@4.22.5': + resolution: {integrity: sha512-bR5nCojtpuMss6TDEmf/jnBnzlo+6n1UhgwqUvRoe4VIotC7FG1IKkyJbwsT7JDsF2jxR+NTnuOwiGv0hLyDoQ==} cpu: [s390x] os: [linux] - '@rollup/rollup-linux-x64-gnu@4.24.0': - resolution: {integrity: sha512-ZXFk7M72R0YYFN5q13niV0B7G8/5dcQ9JDp8keJSfr3GoZeXEoMHP/HlvqROA3OMbMdfr19IjCeNAnPUG93b6A==} + '@rollup/rollup-linux-x64-gnu@4.22.5': + resolution: {integrity: sha512-N0jPPhHjGShcB9/XXZQWuWBKZQnC1F36Ce3sDqWpujsGjDz/CQtOL9LgTrJ+rJC8MJeesMWrMWVLKKNR/tMOCA==} cpu: [x64] os: [linux] - '@rollup/rollup-linux-x64-musl@4.24.0': - resolution: {integrity: sha512-w1i+L7kAXZNdYl+vFvzSZy8Y1arS7vMgIy8wusXJzRrPyof5LAb02KGr1PD2EkRcl73kHulIID0M501lN+vobQ==} + '@rollup/rollup-linux-x64-musl@4.22.5': + resolution: {integrity: sha512-uBa2e28ohzNNwjr6Uxm4XyaA1M/8aTgfF2T7UIlElLaeXkgpmIJ2EitVNQxjO9xLLLy60YqAgKn/AqSpCUkE9g==} cpu: [x64] os: [linux] - '@rollup/rollup-win32-arm64-msvc@4.24.0': - resolution: {integrity: sha512-VXBrnPWgBpVDCVY6XF3LEW0pOU51KbaHhccHw6AS6vBWIC60eqsH19DAeeObl+g8nKAz04QFdl/Cefta0xQtUQ==} + '@rollup/rollup-win32-arm64-msvc@4.22.5': + resolution: {integrity: sha512-RXT8S1HP8AFN/Kr3tg4fuYrNxZ/pZf1HemC5Tsddc6HzgGnJm0+Lh5rAHJkDuW3StI0ynNXukidROMXYl6ew8w==} cpu: [arm64] os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.24.0': - resolution: {integrity: sha512-xrNcGDU0OxVcPTH/8n/ShH4UevZxKIO6HJFK0e15XItZP2UcaiLFd5kiX7hJnqCbSztUF8Qot+JWBC/QXRPYWQ==} + '@rollup/rollup-win32-ia32-msvc@4.22.5': + resolution: {integrity: sha512-ElTYOh50InL8kzyUD6XsnPit7jYCKrphmddKAe1/Ytt74apOxDq5YEcbsiKs0fR3vff3jEneMM+3I7jbqaMyBg==} cpu: [ia32] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.24.0': - resolution: {integrity: sha512-fbMkAF7fufku0N2dE5TBXcNlg0pt0cJue4xBRE2Qc5Vqikxr4VCgKj/ht6SMdFcOacVA9rqF70APJ8RN/4vMJw==} + '@rollup/rollup-win32-x64-msvc@4.22.5': + resolution: {integrity: sha512-+lvL/4mQxSV8MukpkKyyvfwhH266COcWlXE/1qxwN08ajovta3459zrjLghYMgDerlzNwLAcFpvU+WWE5y6nAQ==} cpu: [x64] os: [win32] @@ -5611,8 +5530,8 @@ packages: '@types/node@12.20.55': resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} - '@types/node@18.19.57': - resolution: {integrity: sha512-I2ioBd/IPrYDMv9UNR5NlPElOZ68QB7yY5V2EsLtSrTO0LM0PnCEFF9biLWHf5k+sIy4ohueCV9t4gk1AEdlVA==} + '@types/node@18.19.54': + resolution: {integrity: sha512-+BRgt0G5gYjTvdLac9sIeE0iZcJxi4Jc4PV5EUzqi+88jmQLr+fRZdv2tCTV7IHKSGxM6SaLoOXQWWUiLUItMw==} '@types/node@20.14.15': resolution: {integrity: sha512-Fz1xDMCF/B00/tYSVMlmK7hVeLh7jE5f3B7X1/hmV0MJBwE27KlS7EvD/Yp+z1lm8mVhwV5w+n8jOZG8AfTlKw==} @@ -5620,12 +5539,12 @@ packages: '@types/node@22.5.5': resolution: {integrity: sha512-Xjs4y5UPO/CLdzpgR6GirZJx36yScjh73+2NlLlkFRSoQN8B0DpfXPdZGnvVmLRLOsqDpOfTNv7D9trgGhmOIA==} + '@types/node@22.7.4': + resolution: {integrity: sha512-y+NPi1rFzDs1NdQHHToqeiX2TIS79SWEAw9GYhkkx8bD0ChpfqC+n2j5OXOCpzfojBEBt6DnEnnG9MY0zk1XLg==} + '@types/node@22.7.5': resolution: {integrity: sha512-jML7s2NAzMWc//QSJ1a3prpk78cOPchGvXJsC3C6R6PSMoooztvRVQEz89gmBTBY1SPMaqo5teB4uNHPdetShQ==} - '@types/node@22.7.7': - resolution: {integrity: sha512-SRxCrrg9CL/y54aiMCG3edPKdprgMVGDXjA3gB8UmmBW5TcXzRUYAh8EWzTnSJFAd1rgImPELza+A3bJ+qxz8Q==} - '@types/offscreencanvas@2019.3.0': resolution: {integrity: sha512-esIJx9bQg+QYF0ra8GnvfianIY8qWB0GBx54PK5Eps6m+xTj86KLavHv6qDhzKcu5UUOgNfJ2pWaIIV7TRUd9Q==} @@ -5659,8 +5578,8 @@ packages: '@types/react@18.3.1': resolution: {integrity: sha512-V0kuGBX3+prX+DQ/7r2qsv1NsdfnCLnTgnRJ1pYnxykBhGMz+qj+box5lq7XsO5mtZsBqpjwwTu/7wszPfMBcw==} - '@types/react@18.3.11': - resolution: {integrity: sha512-r6QZ069rFTjrEYgFdOck1gK7FLVsgJE7tTz0pQBczlBNUhBNk0MQH4UbnFSwjpQLMkLzgqvBBa+qGpLje16eTQ==} + '@types/react@18.3.12': + resolution: {integrity: sha512-D2wOSq/d6Agt28q7rSI3jhU7G6aiuzljDGZ2hTZHIkrTLUI+AF3WMeKkEZ9nN2fkBAlcktT6vcZjDFiIhMYEQw==} '@types/resolve@0.0.8': resolution: {integrity: sha512-auApPaJf3NPfe18hSoJkp8EbZzer2ISk7o8mCC3M9he/a04+gbMF97NkpD2S8riMGvm4BMRI59/SZQSaLTKpsQ==} @@ -5761,9 +5680,6 @@ packages: '@types/yargs@16.0.5': resolution: {integrity: sha512-AxO/ADJOBFJScHbWhq2xAhlWP24rY4aCEG/NFaMvbT3X2MgRsLjhjQwsn0Zi5zn0LG9jUhCCZMeX9Dkuw6k+vQ==} - '@types/yargs@17.0.24': - resolution: {integrity: sha512-6i0aC7jV6QzQB8ne1joVZ0eSFIstHsCrobmOtghM11yGlH0j43FKL2UhWdELkyps0zuf7qVTUVCCR+tgSlyLLw==} - '@types/yargs@17.0.33': resolution: {integrity: sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==} @@ -5792,8 +5708,8 @@ packages: typescript: optional: true - '@typescript-eslint/eslint-plugin@8.8.0': - resolution: {integrity: sha512-wORFWjU30B2WJ/aXBfOm1LX9v9nyt9D3jsSOxC3cCaTQGCW5k4jNpmjFv3U7p/7s4yvdjHzwtv2Sd2dOyhjS0A==} + '@typescript-eslint/eslint-plugin@8.11.0': + resolution: {integrity: sha512-KhGn2LjW1PJT2A/GfDpiyOfS4a8xHQv2myUagTM5+zsormOmBlYsnQ6pobJ8XxJmh6hnHwa2Mbe3fPrDJoDhbA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 @@ -5829,8 +5745,8 @@ packages: typescript: optional: true - '@typescript-eslint/parser@8.8.0': - resolution: {integrity: sha512-uEFUsgR+tl8GmzmLjRqz+VrDv4eoaMqMXW7ruXfgThaAShO9JTciKpEsB+TvnfFfbg5IpujgMXVV36gOJRLtZg==} + '@typescript-eslint/parser@8.11.0': + resolution: {integrity: sha512-lmt73NeHdy1Q/2ul295Qy3uninSqi6wQI18XwSpm8w0ZbQXUpjCAWP1Vlv/obudoBiIjJVjlztjQ+d/Md98Yxg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -5855,8 +5771,8 @@ packages: resolution: {integrity: sha512-38IxvKB6NAne3g/+MyXMs2Cda/Sz+CEpmm+KLGEM8hx/CvnSRuw51i8ukfwB/B/sESdeTGet1NH1Wj7I0YXswg==} engines: {node: ^16.0.0 || >=18.0.0} - '@typescript-eslint/scope-manager@8.8.0': - resolution: {integrity: sha512-EL8eaGC6gx3jDd8GwEFEV091210U97J0jeEHrAYvIYosmEGet4wJ+g0SYmLu+oRiAwbSA5AVrt6DxLHfdd+bUg==} + '@typescript-eslint/scope-manager@8.11.0': + resolution: {integrity: sha512-Uholz7tWhXmA4r6epo+vaeV7yjdKy5QFCERMjs1kMVsLRKIrSdM6o21W2He9ftp5PP6aWOVpD5zvrvuHZC0bMQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@typescript-eslint/type-utils@5.59.0': @@ -5879,8 +5795,8 @@ packages: typescript: optional: true - '@typescript-eslint/type-utils@8.8.0': - resolution: {integrity: sha512-IKwJSS7bCqyCeG4NVGxnOP6lLT9Okc3Zj8hLO96bpMkJab+10HIfJbMouLrlpyOr3yrQ1cA413YPFiGd1mW9/Q==} + '@typescript-eslint/type-utils@8.11.0': + resolution: {integrity: sha512-ItiMfJS6pQU0NIKAaybBKkuVzo6IdnAhPFZA/2Mba/uBjuPQPet/8+zh5GtLHwmuFRShZx+8lhIs7/QeDHflOg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '*' @@ -5904,8 +5820,8 @@ packages: resolution: {integrity: sha512-BUGslGOb14zUHOUmDB2FfT6SI1CcZEJYfF3qFwBeUrU6srJfzANonwRYHDpLBuzbq3HaoF2XL2hcr01c8f8OaQ==} engines: {node: ^16.0.0 || >=18.0.0} - '@typescript-eslint/types@8.8.0': - resolution: {integrity: sha512-QJwc50hRCgBd/k12sTykOJbESe1RrzmX6COk8Y525C9l7oweZ+1lw9JiU56im7Amm8swlz00DRIlxMYLizr2Vw==} + '@typescript-eslint/types@8.11.0': + resolution: {integrity: sha512-tn6sNMHf6EBAYMvmPUaKaVeYvhUsrE6x+bXQTxjQRp360h1giATU0WvgeEys1spbvb5R+VpNOZ+XJmjD8wOUHw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@typescript-eslint/typescript-estree@5.59.0': @@ -5944,8 +5860,8 @@ packages: typescript: optional: true - '@typescript-eslint/typescript-estree@8.8.0': - resolution: {integrity: sha512-ZaMJwc/0ckLz5DaAZ+pNLmHv8AMVGtfWxZe/x2JVEkD5LnmhWiQMMcYT7IY7gkdJuzJ9P14fRy28lUrlDSWYdw==} + '@typescript-eslint/typescript-estree@8.11.0': + resolution: {integrity: sha512-yHC3s1z1RCHoCz5t06gf7jH24rr3vns08XXhfEqzYpd6Hll3z/3g23JRi0jM8A47UFKNc3u/y5KIMx8Ynbjohg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '*' @@ -5971,8 +5887,8 @@ packages: peerDependencies: eslint: ^7.0.0 || ^8.0.0 - '@typescript-eslint/utils@8.8.0': - resolution: {integrity: sha512-QE2MgfOTem00qrlPgyByaCHay9yb1+9BjnMFnSFkUKQfu7adBXDTnCAivURnuPPAG/qiB+kzKkZKmKfaMT0zVg==} + '@typescript-eslint/utils@8.11.0': + resolution: {integrity: sha512-CYiX6WZcbXNJV7UNB4PLDIBtSdRmRI/nb0FMyqHPTQD1rMjA0foPLaPUV39C/MxkTd/QKSeX+Gb34PPsDVC35g==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -5993,8 +5909,8 @@ packages: resolution: {integrity: sha512-MUaPUe/QRLEffARsmNfmpghuQkW436DvESW+h+M52w0coICHRfD6Np9/K6PdACwnrq1HmuLl+cSPZaJmeVPkSw==} engines: {node: ^16.0.0 || >=18.0.0} - '@typescript-eslint/visitor-keys@8.8.0': - resolution: {integrity: sha512-8mq51Lx6Hpmd7HnA2fcHQo3YgfX1qbccxQOgZcb4tvasu//zXRaA1j5ZRFeCw/VRAdFi4mRM9DnZw0Nu0Q2d1g==} + '@typescript-eslint/visitor-keys@8.11.0': + resolution: {integrity: sha512-EaewX6lxSjRJnc+99+dqzTeoDZUfyrA52d2/HRrkI830kgovWsmIiTfmr0NZorzqic7ga+1bS60lRBUgR3n/Bw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@ungap/structured-clone@1.2.0': @@ -6170,8 +6086,8 @@ packages: typescript: optional: true - '@wagmi/core@2.13.9': - resolution: {integrity: sha512-l5pGU97ANyCj48D/pffNkw5AB1R7K2X0vEgCGyHMo21u/Pj/SHvoA35VPta/kqOSZzELXpLxBbOZD4yw7FyCxQ==} + '@wagmi/core@2.14.1': + resolution: {integrity: sha512-Vl7VK5XdKxPfnYlp3E7U7AJSweBdfh+cd953hgAU2H+uNrekS9Nmt89l1b6WkwkYyqvccRDjsCtlcKRwvPtNAQ==} peerDependencies: '@tanstack/query-core': '>=5.0.0' typescript: '>=5.0.4' @@ -6433,7 +6349,6 @@ packages: '@web3modal/wagmi@5.0.0': resolution: {integrity: sha512-AegPzmmArOpELk9N44/BzNHKE50Fp19nfDJ/eVq8fM/yqDSlq7Gj2D1sEeZuEeXQGxgoAKNOWOlKP6IoQ/+s6g==} - deprecated: Web3Modal is now Reown AppKit. Please follow the upgrade guide at https://docs.reown.com/appkit/upgrade/from-w3m-to-reown peerDependencies: '@wagmi/connectors': '>=4' '@wagmi/core': '>=2.0.0' @@ -6500,12 +6415,12 @@ packages: '@webgpu/types@0.1.16': resolution: {integrity: sha512-9E61voMP4+Rze02jlTXud++Htpjyyk8vw5Hyw9FGRrmhHQg2GqbuOfwf5Klrb8vTxc2XWI3EfO7RUHMpxTj26A==} - '@whatwg-node/fetch@0.9.21': - resolution: {integrity: sha512-Wt0jPb+04JjobK0pAAN7mEHxVHcGA9HoP3OyCsZtyAecNQeADXCZ1MihFwVwjsgaRYuGVmNlsCmLxlG6mor8Gw==} + '@whatwg-node/fetch@0.9.22': + resolution: {integrity: sha512-+RIBffgoaRlWV9cKV6wAX71sbeoU2APOI3G13ZRMkabYHwkvDMeZDTyxJcsMXA5CpieJ7NFXF9Xyu72jwvdzqA==} engines: {node: '>=18.0.0'} - '@whatwg-node/node-fetch@0.5.26': - resolution: {integrity: sha512-4jXDeZ4IH4bylZ6wu14VEx0aDXXhrN4TC279v9rPmn08g4EYekcYf8wdcOOnS9STjDkb6x77/6xBUTqxGgjr8g==} + '@whatwg-node/node-fetch@0.5.27': + resolution: {integrity: sha512-0OaMj5W4fzWimRSFq07qFiWfquaUMNB+695GwE76LYKVuah+jwCdzSgsIOtwPkiyJ35w0XGhXmJPiIJCdLwopg==} engines: {node: '>=18.0.0'} '@xobotyi/scrollbar-width@1.9.5': @@ -6586,11 +6501,6 @@ packages: engines: {node: '>=0.4.0'} hasBin: true - acorn@8.13.0: - resolution: {integrity: sha512-8zSiw54Oxrdym50NlZ9sUusyO1Z1ZchgRLWRaK6c86XJFClyCgFKetdowBg5bKxyp/u+CDBJG4Mpp0m3HLZl9w==} - engines: {node: '>=0.4.0'} - hasBin: true - address@1.2.2: resolution: {integrity: sha512-4B/qKCfeE/ODUaAUpSwfzazo5x29WD4r3vXiWsB7I2mSDAihwEqKO+g8GELZUQSSAo5e1XTYh3ZVfLyxBc12nA==} engines: {node: '>= 10.0.0'} @@ -7254,8 +7164,8 @@ packages: builtin-status-codes@3.0.0: resolution: {integrity: sha512-HpGFw18DgFWlncDfjTa2rcQ4W88O1mC8e8yZ2AvQY5KDaktSTwo+KRf6nHK6FRI5FyRyb/5T6+TSxfP7QyGsmQ==} - bun@1.1.31: - resolution: {integrity: sha512-fUUKI4qergVXDn7Ng/porWyu3SDi/iovtX0NtGIhb3MHDtN9yy6PDZfylPGlYgRn0pVHW293GJm+a0sWvJy9FA==} + bun@1.1.32: + resolution: {integrity: sha512-W+UO0ihRmDHscmTfQAoPPaFLqLaloyBdAIr2iX70v3Vgo+7ZiKeyj7Aa4YDWStxQQmlzD5JP3NG/5TSWAK+1WQ==} os: [darwin, linux, win32] hasBin: true @@ -8494,7 +8404,6 @@ packages: eciesjs@0.3.20: resolution: {integrity: sha512-Rz5AB8v9+xmMdS/R7RzWPe/R8DP5QfyrkA6ce4umJopoB5su2H2aDy/GcgIfwhmCwxnBkqGf/PbGzmKcGtIgGA==} - deprecated: Please upgrade to v0.4+ edge-paths@3.0.5: resolution: {integrity: sha512-sB7vSrDnFa4ezWQk9nZ/n0FdpdUuC6R1EOrlU3DL+bovcNFK28rqu2emmAUjujYEJTWIgQGqgVVWUZXMnc8iWg==} @@ -8645,6 +8554,10 @@ packages: resolution: {integrity: sha512-zoMwbCcH5hwUkKJkT8kDIBZSz9I6mVG//+lDCinLCGov4+r7NIy0ld8o03M0cJxl2spVf6ESYVS6/gpIfq1FFw==} engines: {node: '>= 0.4'} + es-iterator-helpers@1.1.0: + resolution: {integrity: sha512-/SurEfycdyssORP/E+bj4sEu1CWw4EmLDsHynHwSXQ7utgbrMRWW195pTrCjFgFCddf/UkYm3oqKPRq5i8bJbw==} + engines: {node: '>= 0.4'} + es-module-lexer@1.3.0: resolution: {integrity: sha512-vZK7T0N2CBmBOixhmjdqx2gWVbFZ4DXZ/NyRMZVlJXPa7CyFS+/a4QQsDGDQy9ZfEzxFuNEsMLeQJnKP2p5/JA==} @@ -8710,6 +8623,14 @@ packages: engines: {node: '>=18'} hasBin: true + escalade@3.1.1: + resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} + engines: {node: '>=6'} + + escalade@3.1.2: + resolution: {integrity: sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==} + engines: {node: '>=6'} + escalade@3.2.0: resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} engines: {node: '>=6'} @@ -8925,8 +8846,8 @@ packages: peerDependencies: eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7 - eslint-plugin-react@7.37.1: - resolution: {integrity: sha512-xwTnwDqzbDRA8uJ7BMxPs/EXRB3i8ZfnOIp8BsxEQkT0nHPp+WWceqGgo6rKb9ctNi8GJLDT4Go5HAWELa/WMg==} + eslint-plugin-react@7.37.2: + resolution: {integrity: sha512-EsTAnj9fLVr/GZleBLFbj/sSuXeWmp1eXIN60ceYnZveqEaUCyW4X+Vh4WTdUhCkW4xutXYqTXCUSyqD4rB75w==} engines: {node: '>=4'} peerDependencies: eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7 @@ -8974,7 +8895,6 @@ packages: eslint@8.57.0: resolution: {integrity: sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options. hasBin: true eslint@9.9.1: @@ -9340,8 +9260,8 @@ packages: flow-enums-runtime@0.0.6: resolution: {integrity: sha512-3PYnM29RFXwvAN6Pc/scUfkI7RwhQ/xqyLUyPNlXUp9S40zI8nup9tUSrTLSVnWGBN38FNiGWbwZOB6uR4OGdw==} - flow-parser@0.250.0: - resolution: {integrity: sha512-8mkLh/CotlvqA9vCyQMbhJoPx2upEg9oKxARAayz8zQ58wCdABnTZy6U4xhMHvHvbTUFgZQk4uH2cglOCOel5A==} + flow-parser@0.247.1: + resolution: {integrity: sha512-DHwcm06fWbn2Z6uFD3NaBZ5lMOoABIQ4asrVA80IWvYjjT5WdbghkUOL1wIcbLcagnFTdCZYOlSNnKNp/xnRZQ==} engines: {node: '>=0.4.0'} focus-trap@7.5.4: @@ -9350,7 +9270,6 @@ packages: follow-redirects@1.15.8: resolution: {integrity: sha512-xgrmBhBToVKay1q2Tao5LI26B83UhrB/vM1avwVSDzt8rx3rO6AizBAaF46EgksTVr+rFTQaqZZ9MVBfUe4nig==} engines: {node: '>=4.0'} - deprecated: Browser detection issues fixed in v1.15.9 peerDependencies: debug: '*' peerDependenciesMeta: @@ -10535,6 +10454,10 @@ packages: iterator.prototype@1.1.2: resolution: {integrity: sha512-DR33HMMr8EzwuRL8Y9D3u2BMj8+RqSE850jfGu59kS7tbmPLzGkZmVSfyCFSDxuZiEY6Rzt3T2NA/qU+NwVj1w==} + iterator.prototype@1.1.3: + resolution: {integrity: sha512-FW5iMbeQ6rBGm/oKgzq2aW4KvAGpxPzYES8N4g4xNXUKpL1mclMvOe+76AcLDTvD+Ze+sOpVhgdAQEKF4L9iGQ==} + engines: {node: '>= 0.4'} + jackspeak@2.3.6: resolution: {integrity: sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==} engines: {node: '>=14'} @@ -10831,11 +10754,6 @@ packages: engines: {node: '>=4'} hasBin: true - jsesc@3.0.2: - resolution: {integrity: sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==} - engines: {node: '>=6'} - hasBin: true - json-buffer@3.0.0: resolution: {integrity: sha512-CuUqjv0FUZIdXkHPI8MezCnFCdaTAacej1TZYulLoAg1h/PhwkdXFN4V/gzY4g+fMBCOV2xF+rp7t2XD2ns/NQ==} @@ -12122,8 +12040,8 @@ packages: resolution: {integrity: sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ==} engines: {node: '>=8'} - package-manager-detector@0.2.2: - resolution: {integrity: sha512-VgXbyrSNsml4eHWIvxxG/nTL4wgybMTXCV2Un/+yEc3aDKKU6nQBZjbeP3Pl3qm9Qg92X/1ng4ffvCeD/zwHgg==} + package-manager-detector@0.2.0: + resolution: {integrity: sha512-E385OSk9qDcXhcM9LNSe4sdhx8a9mAPrZ4sMLW+tmxl5ZuGtPUcdFu+MPP2jbgiWAZ6Pfe5soGFMd+0Db5Vrog==} pako@1.0.11: resolution: {integrity: sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==} @@ -12840,9 +12758,6 @@ packages: preact@10.24.1: resolution: {integrity: sha512-PnBAwFI3Yjxxcxw75n6VId/5TFxNW/81zexzWD9jn1+eSrOP84NdsS38H5IkF/UH3frqRPT+MvuCoVHjTDTnDw==} - preact@10.24.3: - resolution: {integrity: sha512-Z2dPnBnMUfyQfSQ+GBdsGa16hz35YmLmtTLhM169uW944hYL6xzTYkJjC07j+Wosz733pMWx0fgON3JNw1jJQA==} - preact@10.4.1: resolution: {integrity: sha512-WKrRpCSwL2t3tpOOGhf2WfTpcmbpxaWtDbdJdKdjd0aEiTkvOmS4NBkG6kzlaAHI9AkQ3iVqbFWM3Ei7mZ4o1Q==} @@ -13006,7 +12921,6 @@ packages: engines: {node: '>=0.6.0', teleport: '>=0.2.0'} deprecated: |- You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other. - (For a CapTP with native promises, see @endo/eventual-send and @endo/captp) qr-code-styling@1.6.0-rc.1: @@ -13117,8 +13031,8 @@ packages: typescript: optional: true - react-devtools-core@5.3.2: - resolution: {integrity: sha512-crr9HkVrDiJ0A4zot89oS0Cgv0Oa4OG1Em4jit3P3ZxZSKPMYyMjfwMqgcJna9o625g8oN87rBm8SWWrSTBZxg==} + react-devtools-core@5.3.1: + resolution: {integrity: sha512-7FSb9meX0btdBQLwdFOwt6bGqvRPabmVMMslv8fgoSPqXyuGpgQe36kx8gR86XPw7aV1yVouTp6fyZ0EH+NfUw==} react-dom@18.3.1: resolution: {integrity: sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==} @@ -13291,10 +13205,6 @@ packages: resolution: {integrity: sha512-d1VudCLoIGitcU/hEg2QqvyGZQmdC0Lf8BqdOMXGFSvJP4bNV1+XqbPQeHHLD51Jh4QJJ225dlIFvY4Ly6MXmQ==} engines: {node: '>=4'} - regenerate-unicode-properties@10.2.0: - resolution: {integrity: sha512-DqHn3DwbmmPVzeKj9woBadqmXxLvQoQIwu7nopMc72ztvxVmVk2SBhSnx67zuye5TP+lJsb/TBQsjLKhnDf3MA==} - engines: {node: '>=4'} - regenerate@1.4.2: resolution: {integrity: sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==} @@ -13318,10 +13228,6 @@ packages: resolution: {integrity: sha512-RAM5FlZz+Lhmo7db9L298p2vHP5ZywrVXmVXpmAD9GuL5MPH6t9ROw1iA/wfHkQ76Qe7AaPF0nGuim96/IrQMQ==} engines: {node: '>=4'} - regexpu-core@6.1.1: - resolution: {integrity: sha512-k67Nb9jvwJcJmVpw0jPttR1/zVfnKf8Km0IPatrU/zJ5XeG3+Slx0xLXs9HByJSzXzrlz5EDvN6yLNMDc2qdnw==} - engines: {node: '>=4'} - registry-auth-token@4.2.2: resolution: {integrity: sha512-PC5ZysNb42zpFME6D/XlIgtNGdTl8bBOCw90xQLVMpzuuubJKYDWFAEuUNc+Cn8Z8724tg2SDhDRrkVEsqfDMg==} engines: {node: '>=6.0.0'} @@ -13330,13 +13236,6 @@ packages: resolution: {integrity: sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw==} engines: {node: '>=8'} - regjsgen@0.8.0: - resolution: {integrity: sha512-RvwtGe3d7LvWiDQXeQw8p5asZUmfU1G/l6WbUXeHta7Y2PEIvBTwH6E2EfmYUK8pxcxEdEmaomqyp0vZZ7C+3Q==} - - regjsparser@0.11.1: - resolution: {integrity: sha512-1DHODs4B8p/mQHU9kr+jv8+wIC9mtG4eBHxWxIq5mhjE3D5oORhCc6deRKzTjs9DcfRFmj9BHSDguZklqCGFWQ==} - hasBin: true - regjsparser@0.9.1: resolution: {integrity: sha512-dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ==} hasBin: true @@ -13523,8 +13422,8 @@ packages: engines: {node: '>=14.18.0', npm: '>=8.0.0'} hasBin: true - rollup@4.24.0: - resolution: {integrity: sha512-DOmrlGSXNk1DM0ljiQA+i+o0rSLhtii1je5wgk60j49d1jHT5YYttBv1iWOnYSTG+fZZESUOSNiAl89SIet+Cg==} + rollup@4.22.5: + resolution: {integrity: sha512-WoinX7GeQOFMGznEcWA1WrTQCd/tpEbMkc3nuMs9BT0CPjMdSjPMTVClwWd4pgSQwJdP65SK9mTCNvItlr5o7w==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true @@ -13964,9 +13863,6 @@ packages: spdx-license-ids@3.0.13: resolution: {integrity: sha512-XkD+zwiqXHikFZm4AX/7JSCXA98U5Db4AFd5XUg/+9UNtnH75+Z9KxtpYiJZx36mUDVOwH83pl7yvCer6ewM3w==} - spdx-license-ids@3.0.20: - resolution: {integrity: sha512-jg25NiDV/1fLtSgEgyvVyDunvaNHbuwF9lfNV17gSmPFAlYzdfNBlLtLzXTevwkPj7DhGbmN9VnmJIgLnhvaBw==} - spdy-transport@3.0.0: resolution: {integrity: sha512-hsLVFE5SjA6TCisWeJXFKniGGOpBgMLmerfO2aCyCU5s7nJ/rpAepqmFifv/GCbSbueEeAJJnmSQ2rKC/g8Fcw==} @@ -14418,11 +14314,6 @@ packages: engines: {node: '>=10'} hasBin: true - terser@5.36.0: - resolution: {integrity: sha512-IYV9eNMuFAV4THUspIRXkLakHnV6XO7FEdtKjf/mDyrnqUg9LnlOn6/RwRvM9SZjR4GUq8Nk8zj67FzVARr74w==} - engines: {node: '>=10'} - hasBin: true - test-exclude@6.0.0: resolution: {integrity: sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==} engines: {node: '>=8'} @@ -14832,8 +14723,8 @@ packages: types-ramda@0.30.1: resolution: {integrity: sha512-1HTsf5/QVRmLzcGfldPFvkVsAdi1db1BBKzi7iW3KBUlOICg/nKnFS+jGqDJS3YD8VsWbAh7JiHeBvbsw8RPxA==} - typescript-eslint@8.8.0: - resolution: {integrity: sha512-BjIT/VwJ8+0rVO01ZQ2ZVnjE1svFBiRczcpr1t1Yxt7sT25VSbPfrJtDsQ8uQTy2pilX5nI9gwxhUyLULNentw==} + typescript-eslint@8.11.0: + resolution: {integrity: sha512-cBRGnW3FSlxaYwU8KfAewxFK5uzeOAp0l2KebIlPDOT5olVi65KDG/yjBooPBG0kGW/HLkoz1c/iuBFehcS3IA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '*' @@ -14927,10 +14818,6 @@ packages: resolution: {integrity: sha512-qxkjQt6qjg/mYscYMC0XKRn3Rh0wFPlfxB0xkt9CfyTvpX1Ra0+rAmdX2QyAobptSEvuy4RtpPRui6XkV+8wjA==} engines: {node: '>=4'} - unicode-match-property-value-ecmascript@2.2.0: - resolution: {integrity: sha512-4IehN3V/+kkr5YeSSDDQG8QLqO26XpL2XP3GQtqwlT/QYSECAwFztxVHjlbh0+gjJ3XmNLS0zDsbgs9jWKExLg==} - engines: {node: '>=4'} - unicode-property-aliases-ecmascript@2.1.0: resolution: {integrity: sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w==} engines: {node: '>=4'} @@ -15237,8 +15124,8 @@ packages: vite-plugin-plain-text@1.4.2: resolution: {integrity: sha512-nkCWW16lkTidaGZ9kItwMZ5OEkUeXMrY4Okc9IQXrN/p6SAuDYmEiGqMRKl1rnhm6CR1h98uJtn+ODkv0cL7DA==} - vite@5.4.9: - resolution: {integrity: sha512-20OVpJHh0PAM0oSOELa5GaZNWeDjcAvQjGXy2Uyr+Tp+/D2/Hdz6NLgpJLsarPTA2QJ6v8mX2P1ZfbsSKvdMkg==} + vite@5.4.10: + resolution: {integrity: sha512-1hvaPshuPUtxeQ0hsVH3Mud0ZanOLwVTneA1EgbAM5LhaZEqyPWGRQ7BtaMvUrTDeEaC8pxtj6a6jku3x4z6SQ==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: @@ -15810,6 +15697,24 @@ packages: react: optional: true + zustand@5.0.0: + resolution: {integrity: sha512-LE+VcmbartOPM+auOjCCLQOsQ05zUTp8RkgwRzefUk+2jISdMMFnxvyTjA4YNWr5ZGXYbVsEMZosttuxUBkojQ==} + engines: {node: '>=12.20.0'} + peerDependencies: + '@types/react': '>=18.0.0' + immer: '>=9.0.6' + react: '>=18.0.0' + use-sync-external-store: '>=1.2.0' + peerDependenciesMeta: + '@types/react': + optional: true + immer: + optional: true + react: + optional: true + use-sync-external-store: + optional: true + snapshots: 0x@5.7.0: @@ -15979,13 +15884,13 @@ snapshots: '@ardatan/relay-compiler@12.0.0(graphql@16.9.0)': dependencies: - '@babel/core': 7.25.8 - '@babel/generator': 7.25.7 - '@babel/parser': 7.25.8 - '@babel/runtime': 7.25.7 - '@babel/traverse': 7.25.7 - '@babel/types': 7.25.8 - babel-preset-fbjs: 3.4.0(@babel/core@7.25.8) + '@babel/core': 7.25.2 + '@babel/generator': 7.25.6 + '@babel/parser': 7.25.6 + '@babel/runtime': 7.25.6 + '@babel/traverse': 7.25.6 + '@babel/types': 7.25.6 + babel-preset-fbjs: 3.4.0(@babel/core@7.25.2) chalk: 4.1.2 fb-watchman: 2.0.2 fbjs: 3.0.5 @@ -16016,31 +15921,24 @@ snapshots: '@babel/code-frame@7.24.7': dependencies: '@babel/highlight': 7.24.7 - picocolors: 1.1.1 - - '@babel/code-frame@7.25.7': - dependencies: - '@babel/highlight': 7.25.7 - picocolors: 1.1.1 + picocolors: 1.1.0 '@babel/compat-data@7.22.5': {} '@babel/compat-data@7.25.4': {} - '@babel/compat-data@7.25.8': {} - '@babel/core@7.22.5': dependencies: '@ampproject/remapping': 2.2.1 '@babel/code-frame': 7.22.5 - '@babel/generator': 7.25.7 + '@babel/generator': 7.25.6 '@babel/helper-compilation-targets': 7.22.5(@babel/core@7.22.5) '@babel/helper-module-transforms': 7.22.5 '@babel/helpers': 7.22.5 '@babel/parser': 7.25.6 - '@babel/template': 7.25.7 + '@babel/template': 7.25.0 '@babel/traverse': 7.25.6 - '@babel/types': 7.25.8 + '@babel/types': 7.25.6 convert-source-map: 1.9.0 debug: 4.3.7(supports-color@5.5.0) gensync: 1.0.0-beta.2 @@ -16053,34 +15951,14 @@ snapshots: dependencies: '@ampproject/remapping': 2.3.0 '@babel/code-frame': 7.24.7 - '@babel/generator': 7.25.7 + '@babel/generator': 7.25.6 '@babel/helper-compilation-targets': 7.25.2 '@babel/helper-module-transforms': 7.25.2(@babel/core@7.25.2) '@babel/helpers': 7.25.0 '@babel/parser': 7.25.6 - '@babel/template': 7.25.7 + '@babel/template': 7.25.0 '@babel/traverse': 7.25.6 - '@babel/types': 7.25.8 - convert-source-map: 2.0.0 - debug: 4.3.7(supports-color@5.5.0) - gensync: 1.0.0-beta.2 - json5: 2.2.3 - semver: 6.3.1 - transitivePeerDependencies: - - supports-color - - '@babel/core@7.25.8': - dependencies: - '@ampproject/remapping': 2.3.0 - '@babel/code-frame': 7.25.7 - '@babel/generator': 7.25.7 - '@babel/helper-compilation-targets': 7.25.7 - '@babel/helper-module-transforms': 7.25.7(@babel/core@7.25.8) - '@babel/helpers': 7.25.7 - '@babel/parser': 7.25.8 - '@babel/template': 7.25.7 - '@babel/traverse': 7.25.7 - '@babel/types': 7.25.8 + '@babel/types': 7.25.6 convert-source-map: 2.0.0 debug: 4.3.7(supports-color@5.5.0) gensync: 1.0.0-beta.2 @@ -16099,33 +15977,26 @@ snapshots: '@babel/generator@7.25.6': dependencies: - '@babel/types': 7.25.8 + '@babel/types': 7.25.6 '@jridgewell/gen-mapping': 0.3.5 '@jridgewell/trace-mapping': 0.3.25 jsesc: 2.5.2 - '@babel/generator@7.25.7': - dependencies: - '@babel/types': 7.25.8 - '@jridgewell/gen-mapping': 0.3.5 - '@jridgewell/trace-mapping': 0.3.25 - jsesc: 3.0.2 - '@babel/helper-annotate-as-pure@7.22.5': dependencies: - '@babel/types': 7.25.8 + '@babel/types': 7.25.6 '@babel/helper-annotate-as-pure@7.24.6': dependencies: - '@babel/types': 7.25.8 + '@babel/types': 7.25.6 - '@babel/helper-annotate-as-pure@7.25.7': + '@babel/helper-annotate-as-pure@7.24.7': dependencies: - '@babel/types': 7.25.8 + '@babel/types': 7.25.6 '@babel/helper-builder-binary-assignment-operator-visitor@7.22.5': dependencies: - '@babel/types': 7.25.8 + '@babel/types': 7.25.6 '@babel/helper-compilation-targets@7.22.5(@babel/core@7.22.5)': dependencies: @@ -16144,14 +16015,6 @@ snapshots: lru-cache: 5.1.1 semver: 6.3.1 - '@babel/helper-compilation-targets@7.25.7': - dependencies: - '@babel/compat-data': 7.25.8 - '@babel/helper-validator-option': 7.25.7 - browserslist: 4.24.0 - lru-cache: 5.1.1 - semver: 6.3.1 - '@babel/helper-create-class-features-plugin@7.22.5(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 @@ -16167,43 +16030,15 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/helper-create-class-features-plugin@7.22.5(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-annotate-as-pure': 7.22.5 - '@babel/helper-environment-visitor': 7.22.5 - '@babel/helper-function-name': 7.22.5 - '@babel/helper-member-expression-to-functions': 7.22.5 - '@babel/helper-optimise-call-expression': 7.22.5 - '@babel/helper-replace-supers': 7.22.5 - '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 - '@babel/helper-split-export-declaration': 7.22.5 - semver: 6.3.1 - transitivePeerDependencies: - - supports-color - - '@babel/helper-create-class-features-plugin@7.25.7(@babel/core@7.25.2)': + '@babel/helper-create-class-features-plugin@7.25.4(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-annotate-as-pure': 7.25.7 - '@babel/helper-member-expression-to-functions': 7.25.7 - '@babel/helper-optimise-call-expression': 7.25.7 - '@babel/helper-replace-supers': 7.25.7(@babel/core@7.25.2) - '@babel/helper-skip-transparent-expression-wrappers': 7.25.7 - '@babel/traverse': 7.25.7 - semver: 6.3.1 - transitivePeerDependencies: - - supports-color - - '@babel/helper-create-class-features-plugin@7.25.7(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-annotate-as-pure': 7.25.7 - '@babel/helper-member-expression-to-functions': 7.25.7 - '@babel/helper-optimise-call-expression': 7.25.7 - '@babel/helper-replace-supers': 7.25.7(@babel/core@7.25.8) - '@babel/helper-skip-transparent-expression-wrappers': 7.25.7 - '@babel/traverse': 7.25.7 + '@babel/helper-annotate-as-pure': 7.24.7 + '@babel/helper-member-expression-to-functions': 7.24.8 + '@babel/helper-optimise-call-expression': 7.24.7 + '@babel/helper-replace-supers': 7.25.0(@babel/core@7.25.2) + '@babel/helper-skip-transparent-expression-wrappers': 7.24.7 + '@babel/traverse': 7.25.6 semver: 6.3.1 transitivePeerDependencies: - supports-color @@ -16215,44 +16050,18 @@ snapshots: regexpu-core: 5.3.2 semver: 6.3.1 - '@babel/helper-create-regexp-features-plugin@7.22.5(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-annotate-as-pure': 7.22.5 - regexpu-core: 5.3.2 - semver: 6.3.1 - - '@babel/helper-create-regexp-features-plugin@7.25.7(@babel/core@7.25.2)': + '@babel/helper-create-regexp-features-plugin@7.25.2(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-annotate-as-pure': 7.25.7 - regexpu-core: 6.1.1 - semver: 6.3.1 - - '@babel/helper-create-regexp-features-plugin@7.25.7(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-annotate-as-pure': 7.25.7 - regexpu-core: 6.1.1 + '@babel/helper-annotate-as-pure': 7.24.7 + regexpu-core: 5.3.2 semver: 6.3.1 '@babel/helper-define-polyfill-provider@0.4.0(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-compilation-targets': 7.25.7 - '@babel/helper-plugin-utils': 7.25.7 - debug: 4.3.7(supports-color@5.5.0) - lodash.debounce: 4.0.8 - resolve: 1.22.8 - semver: 6.3.1 - transitivePeerDependencies: - - supports-color - - '@babel/helper-define-polyfill-provider@0.4.0(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-compilation-targets': 7.25.7 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-compilation-targets': 7.25.2 + '@babel/helper-plugin-utils': 7.24.8 debug: 4.3.7(supports-color@5.5.0) lodash.debounce: 4.0.8 resolve: 1.22.8 @@ -16263,19 +16072,8 @@ snapshots: '@babel/helper-define-polyfill-provider@0.6.2(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-compilation-targets': 7.25.7 - '@babel/helper-plugin-utils': 7.25.7 - debug: 4.3.7(supports-color@5.5.0) - lodash.debounce: 4.0.8 - resolve: 1.22.8 - transitivePeerDependencies: - - supports-color - - '@babel/helper-define-polyfill-provider@0.6.2(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-compilation-targets': 7.25.7 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-compilation-targets': 7.25.2 + '@babel/helper-plugin-utils': 7.24.8 debug: 4.3.7(supports-color@5.5.0) lodash.debounce: 4.0.8 resolve: 1.22.8 @@ -16288,48 +16086,41 @@ snapshots: '@babel/helper-environment-visitor@7.24.7': dependencies: - '@babel/types': 7.25.8 + '@babel/types': 7.25.6 '@babel/helper-function-name@7.22.5': dependencies: - '@babel/template': 7.25.7 - '@babel/types': 7.25.8 + '@babel/template': 7.25.0 + '@babel/types': 7.25.6 '@babel/helper-function-name@7.24.6': dependencies: - '@babel/template': 7.25.7 - '@babel/types': 7.25.8 + '@babel/template': 7.25.0 + '@babel/types': 7.25.6 '@babel/helper-hoist-variables@7.22.5': dependencies: - '@babel/types': 7.25.8 + '@babel/types': 7.25.6 '@babel/helper-member-expression-to-functions@7.22.5': dependencies: - '@babel/types': 7.25.8 + '@babel/types': 7.25.6 - '@babel/helper-member-expression-to-functions@7.25.7': + '@babel/helper-member-expression-to-functions@7.24.8': dependencies: - '@babel/traverse': 7.25.7 - '@babel/types': 7.25.8 + '@babel/traverse': 7.25.6 + '@babel/types': 7.25.6 transitivePeerDependencies: - supports-color '@babel/helper-module-imports@7.22.5': dependencies: - '@babel/types': 7.25.8 + '@babel/types': 7.25.6 '@babel/helper-module-imports@7.24.7': dependencies: - '@babel/traverse': 7.25.7 - '@babel/types': 7.25.8 - transitivePeerDependencies: - - supports-color - - '@babel/helper-module-imports@7.25.7': - dependencies: - '@babel/traverse': 7.25.7 - '@babel/types': 7.25.8 + '@babel/traverse': 7.25.6 + '@babel/types': 7.25.6 transitivePeerDependencies: - supports-color @@ -16339,10 +16130,10 @@ snapshots: '@babel/helper-module-imports': 7.22.5 '@babel/helper-simple-access': 7.22.5 '@babel/helper-split-export-declaration': 7.22.5 - '@babel/helper-validator-identifier': 7.25.7 - '@babel/template': 7.25.7 - '@babel/traverse': 7.25.7 - '@babel/types': 7.25.8 + '@babel/helper-validator-identifier': 7.24.7 + '@babel/template': 7.25.0 + '@babel/traverse': 7.25.6 + '@babel/types': 7.25.6 transitivePeerDependencies: - supports-color @@ -16351,78 +16142,37 @@ snapshots: '@babel/core': 7.25.2 '@babel/helper-module-imports': 7.24.7 '@babel/helper-simple-access': 7.24.7 - '@babel/helper-validator-identifier': 7.25.7 - '@babel/traverse': 7.25.7 - transitivePeerDependencies: - - supports-color - - '@babel/helper-module-transforms@7.25.7(@babel/core@7.25.2)': - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-module-imports': 7.25.7 - '@babel/helper-simple-access': 7.25.7 - '@babel/helper-validator-identifier': 7.25.7 - '@babel/traverse': 7.25.7 - transitivePeerDependencies: - - supports-color - - '@babel/helper-module-transforms@7.25.7(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-module-imports': 7.25.7 - '@babel/helper-simple-access': 7.25.7 - '@babel/helper-validator-identifier': 7.25.7 - '@babel/traverse': 7.25.7 + '@babel/helper-validator-identifier': 7.24.7 + '@babel/traverse': 7.25.6 transitivePeerDependencies: - supports-color '@babel/helper-optimise-call-expression@7.22.5': dependencies: - '@babel/types': 7.25.8 + '@babel/types': 7.25.6 - '@babel/helper-optimise-call-expression@7.25.7': + '@babel/helper-optimise-call-expression@7.24.7': dependencies: - '@babel/types': 7.25.8 + '@babel/types': 7.25.6 '@babel/helper-plugin-utils@7.24.8': {} - '@babel/helper-plugin-utils@7.25.7': {} - '@babel/helper-remap-async-to-generator@7.22.5(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 '@babel/helper-annotate-as-pure': 7.22.5 '@babel/helper-environment-visitor': 7.24.6 '@babel/helper-wrap-function': 7.22.5 - '@babel/types': 7.25.8 - transitivePeerDependencies: - - supports-color - - '@babel/helper-remap-async-to-generator@7.22.5(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-annotate-as-pure': 7.22.5 - '@babel/helper-environment-visitor': 7.24.6 - '@babel/helper-wrap-function': 7.22.5 - '@babel/types': 7.25.8 + '@babel/types': 7.25.6 transitivePeerDependencies: - supports-color - '@babel/helper-remap-async-to-generator@7.25.7(@babel/core@7.25.2)': + '@babel/helper-remap-async-to-generator@7.25.0(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-annotate-as-pure': 7.25.7 - '@babel/helper-wrap-function': 7.25.7 - '@babel/traverse': 7.25.7 - transitivePeerDependencies: - - supports-color - - '@babel/helper-remap-async-to-generator@7.25.7(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-annotate-as-pure': 7.25.7 - '@babel/helper-wrap-function': 7.25.7 - '@babel/traverse': 7.25.7 + '@babel/helper-annotate-as-pure': 7.24.7 + '@babel/helper-wrap-function': 7.25.0 + '@babel/traverse': 7.25.6 transitivePeerDependencies: - supports-color @@ -16431,306 +16181,194 @@ snapshots: '@babel/helper-environment-visitor': 7.22.5 '@babel/helper-member-expression-to-functions': 7.22.5 '@babel/helper-optimise-call-expression': 7.22.5 - '@babel/template': 7.25.7 - '@babel/traverse': 7.25.7 - '@babel/types': 7.25.8 + '@babel/template': 7.25.0 + '@babel/traverse': 7.25.6 + '@babel/types': 7.25.6 transitivePeerDependencies: - supports-color - '@babel/helper-replace-supers@7.25.7(@babel/core@7.25.2)': + '@babel/helper-replace-supers@7.25.0(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-member-expression-to-functions': 7.25.7 - '@babel/helper-optimise-call-expression': 7.25.7 - '@babel/traverse': 7.25.7 - transitivePeerDependencies: - - supports-color - - '@babel/helper-replace-supers@7.25.7(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-member-expression-to-functions': 7.25.7 - '@babel/helper-optimise-call-expression': 7.25.7 - '@babel/traverse': 7.25.7 + '@babel/helper-member-expression-to-functions': 7.24.8 + '@babel/helper-optimise-call-expression': 7.24.7 + '@babel/traverse': 7.25.6 transitivePeerDependencies: - supports-color '@babel/helper-simple-access@7.22.5': dependencies: - '@babel/types': 7.25.8 + '@babel/types': 7.25.6 '@babel/helper-simple-access@7.24.7': dependencies: - '@babel/traverse': 7.25.7 - '@babel/types': 7.25.8 - transitivePeerDependencies: - - supports-color - - '@babel/helper-simple-access@7.25.7': - dependencies: - '@babel/traverse': 7.25.7 - '@babel/types': 7.25.8 + '@babel/traverse': 7.25.6 + '@babel/types': 7.25.6 transitivePeerDependencies: - supports-color '@babel/helper-skip-transparent-expression-wrappers@7.22.5': dependencies: - '@babel/types': 7.25.8 + '@babel/types': 7.25.6 - '@babel/helper-skip-transparent-expression-wrappers@7.25.7': + '@babel/helper-skip-transparent-expression-wrappers@7.24.7': dependencies: - '@babel/traverse': 7.25.7 - '@babel/types': 7.25.8 + '@babel/traverse': 7.25.6 + '@babel/types': 7.25.6 transitivePeerDependencies: - supports-color '@babel/helper-split-export-declaration@7.22.5': dependencies: - '@babel/types': 7.25.8 + '@babel/types': 7.25.6 '@babel/helper-string-parser@7.24.8': {} - '@babel/helper-string-parser@7.25.7': {} - '@babel/helper-validator-identifier@7.24.7': {} - '@babel/helper-validator-identifier@7.25.7': {} - '@babel/helper-validator-option@7.22.5': {} '@babel/helper-validator-option@7.24.8': {} - '@babel/helper-validator-option@7.25.7': {} - '@babel/helper-wrap-function@7.22.5': dependencies: '@babel/helper-function-name': 7.24.6 - '@babel/template': 7.25.7 - '@babel/traverse': 7.25.7 - '@babel/types': 7.25.8 + '@babel/template': 7.25.0 + '@babel/traverse': 7.25.6 + '@babel/types': 7.25.6 transitivePeerDependencies: - supports-color - '@babel/helper-wrap-function@7.25.7': + '@babel/helper-wrap-function@7.25.0': dependencies: - '@babel/template': 7.25.7 - '@babel/traverse': 7.25.7 - '@babel/types': 7.25.8 + '@babel/template': 7.25.0 + '@babel/traverse': 7.25.6 + '@babel/types': 7.25.6 transitivePeerDependencies: - supports-color '@babel/helpers@7.22.5': dependencies: - '@babel/template': 7.25.7 - '@babel/traverse': 7.25.7 - '@babel/types': 7.25.8 + '@babel/template': 7.25.0 + '@babel/traverse': 7.25.6 + '@babel/types': 7.25.6 transitivePeerDependencies: - supports-color '@babel/helpers@7.25.0': dependencies: - '@babel/template': 7.25.7 - '@babel/types': 7.25.8 - - '@babel/helpers@7.25.7': - dependencies: - '@babel/template': 7.25.7 - '@babel/types': 7.25.8 + '@babel/template': 7.25.0 + '@babel/types': 7.25.6 '@babel/highlight@7.22.5': dependencies: - '@babel/helper-validator-identifier': 7.25.7 + '@babel/helper-validator-identifier': 7.24.7 chalk: 2.4.2 js-tokens: 4.0.0 '@babel/highlight@7.24.7': dependencies: - '@babel/helper-validator-identifier': 7.25.7 - chalk: 2.4.2 - js-tokens: 4.0.0 - picocolors: 1.1.1 - - '@babel/highlight@7.25.7': - dependencies: - '@babel/helper-validator-identifier': 7.25.7 + '@babel/helper-validator-identifier': 7.24.7 chalk: 2.4.2 js-tokens: 4.0.0 - picocolors: 1.1.1 + picocolors: 1.1.0 '@babel/parser@7.25.6': dependencies: - '@babel/types': 7.25.8 - - '@babel/parser@7.25.8': - dependencies: - '@babel/types': 7.25.8 + '@babel/types': 7.25.6 '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.22.5(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.22.5(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.22.5(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 '@babel/plugin-transform-optional-chaining': 7.22.5(@babel/core@7.25.2) - '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.22.5(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 - '@babel/plugin-transform-optional-chaining': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-proposal-async-generator-functions@7.20.7(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 '@babel/helper-environment-visitor': 7.24.7 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/helper-remap-async-to-generator': 7.25.7(@babel/core@7.25.2) + '@babel/helper-plugin-utils': 7.24.8 + '@babel/helper-remap-async-to-generator': 7.25.0(@babel/core@7.25.2) '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.25.2) transitivePeerDependencies: - supports-color - '@babel/plugin-proposal-async-generator-functions@7.20.7(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-environment-visitor': 7.24.7 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/helper-remap-async-to-generator': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.25.8) - transitivePeerDependencies: - - supports-color - '@babel/plugin-proposal-class-properties@7.18.6(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 '@babel/helper-create-class-features-plugin': 7.22.5(@babel/core@7.25.2) - '@babel/helper-plugin-utils': 7.25.7 - transitivePeerDependencies: - - supports-color - - '@babel/plugin-proposal-class-properties@7.18.6(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-create-class-features-plugin': 7.22.5(@babel/core@7.25.8) - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 transitivePeerDependencies: - supports-color - '@babel/plugin-proposal-decorators@7.22.5(@babel/core@7.25.8)': + '@babel/plugin-proposal-decorators@7.22.5(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-create-class-features-plugin': 7.22.5(@babel/core@7.25.8) - '@babel/helper-plugin-utils': 7.25.7 + '@babel/core': 7.25.2 + '@babel/helper-create-class-features-plugin': 7.22.5(@babel/core@7.25.2) + '@babel/helper-plugin-utils': 7.24.8 '@babel/helper-replace-supers': 7.22.5 '@babel/helper-split-export-declaration': 7.22.5 - '@babel/plugin-syntax-decorators': 7.22.5(@babel/core@7.25.8) + '@babel/plugin-syntax-decorators': 7.22.5(@babel/core@7.25.2) transitivePeerDependencies: - supports-color - '@babel/plugin-proposal-export-default-from@7.25.8(@babel/core@7.25.2)': + '@babel/plugin-proposal-export-default-from@7.24.7(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-proposal-export-default-from@7.25.8(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 + '@babel/plugin-syntax-export-default-from': 7.24.7(@babel/core@7.25.2) '@babel/plugin-proposal-logical-assignment-operators@7.20.7(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.25.2) - '@babel/plugin-proposal-logical-assignment-operators@7.20.7(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.25.8) - '@babel/plugin-proposal-nullish-coalescing-operator@7.18.6(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.25.2) - '@babel/plugin-proposal-nullish-coalescing-operator@7.18.6(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.25.8) - '@babel/plugin-proposal-numeric-separator@7.18.6(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.25.2) - '@babel/plugin-proposal-numeric-separator@7.18.6(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.25.8) - '@babel/plugin-proposal-object-rest-spread@7.20.7(@babel/core@7.25.2)': dependencies: - '@babel/compat-data': 7.25.8 + '@babel/compat-data': 7.25.4 '@babel/core': 7.25.2 - '@babel/helper-compilation-targets': 7.25.7 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-compilation-targets': 7.25.2 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.25.2) '@babel/plugin-transform-parameters': 7.22.5(@babel/core@7.25.2) - '@babel/plugin-proposal-object-rest-spread@7.20.7(@babel/core@7.25.8)': - dependencies: - '@babel/compat-data': 7.25.8 - '@babel/core': 7.25.8 - '@babel/helper-compilation-targets': 7.25.7 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.25.8) - '@babel/plugin-transform-parameters': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-proposal-optional-catch-binding@7.18.6(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.25.2) - '@babel/plugin-proposal-optional-catch-binding@7.18.6(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.25.8) - '@babel/plugin-proposal-optional-chaining@7.21.0(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.25.2) - '@babel/plugin-proposal-optional-chaining@7.21.0(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 - '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.25.8) - - '@babel/plugin-proposal-private-methods@7.18.6(@babel/core@7.25.8)': + '@babel/plugin-proposal-private-methods@7.18.6(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-create-class-features-plugin': 7.22.5(@babel/core@7.25.8) - '@babel/helper-plugin-utils': 7.25.7 + '@babel/core': 7.25.2 + '@babel/helper-create-class-features-plugin': 7.22.5(@babel/core@7.25.2) + '@babel/helper-plugin-utils': 7.24.8 transitivePeerDependencies: - supports-color @@ -16738,17 +16376,13 @@ snapshots: dependencies: '@babel/core': 7.25.2 - '@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2(@babel/core@7.25.8)': + '@babel/plugin-proposal-private-property-in-object@7.21.11(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.25.8 - - '@babel/plugin-proposal-private-property-in-object@7.21.11(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 + '@babel/core': 7.25.2 '@babel/helper-annotate-as-pure': 7.22.5 - '@babel/helper-create-class-features-plugin': 7.22.5(@babel/core@7.25.8) - '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.25.8) + '@babel/helper-create-class-features-plugin': 7.22.5(@babel/core@7.25.2) + '@babel/helper-plugin-utils': 7.24.8 + '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.25.2) transitivePeerDependencies: - supports-color @@ -16756,465 +16390,267 @@ snapshots: dependencies: '@babel/core': 7.25.2 '@babel/helper-create-regexp-features-plugin': 7.22.5(@babel/core@7.25.2) - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-proposal-unicode-property-regex@7.18.6(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-create-regexp-features-plugin': 7.22.5(@babel/core@7.25.8) - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.22.5)': dependencies: '@babel/core': 7.22.5 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-bigint@7.8.3(@babel/core@7.22.5)': dependencies: '@babel/core': 7.22.5 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-bigint@7.8.3(@babel/core@7.25.8)': + '@babel/plugin-syntax-bigint@7.8.3(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/core': 7.25.2 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.22.5)': dependencies: '@babel/core': 7.22.5 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-class-static-block@7.14.5(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-syntax-class-static-block@7.14.5(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-decorators@7.22.5(@babel/core@7.25.8)': + '@babel/plugin-syntax-decorators@7.22.5(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/core': 7.25.2 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-dynamic-import@7.8.3(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-syntax-dynamic-import@7.8.3(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-export-default-from@7.25.7(@babel/core@7.25.2)': + '@babel/plugin-syntax-export-default-from@7.24.7(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-syntax-export-default-from@7.25.7(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-export-namespace-from@7.8.3(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-syntax-export-namespace-from@7.8.3(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-flow@7.22.5(@babel/core@7.25.8)': + '@babel/plugin-syntax-flow@7.22.5(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/core': 7.25.2 + '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-flow@7.24.6(@babel/core@7.25.8)': + '@babel/plugin-syntax-flow@7.24.6(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/core': 7.25.2 + '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-flow@7.25.7(@babel/core@7.22.5)': + '@babel/plugin-syntax-flow@7.24.7(@babel/core@7.22.5)': dependencies: '@babel/core': 7.22.5 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-flow@7.25.7(@babel/core@7.25.2)': + '@babel/plugin-syntax-flow@7.24.7(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-syntax-flow@7.25.7(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-import-assertions@7.22.5(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-syntax-import-assertions@7.22.5(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-import-attributes@7.22.5(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-syntax-import-attributes@7.22.5(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.22.5)': dependencies: '@babel/core': 7.22.5 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-json-strings@7.8.3(@babel/core@7.22.5)': dependencies: '@babel/core': 7.22.5 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-json-strings@7.8.3(@babel/core@7.25.2)': - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-syntax-json-strings@7.8.3(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-syntax-jsx@7.24.7(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-jsx@7.24.7(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.24.8 - - '@babel/plugin-syntax-jsx@7.25.7(@babel/core@7.22.5)': + '@babel/plugin-syntax-jsx@7.24.7(@babel/core@7.22.5)': dependencies: '@babel/core': 7.22.5 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-jsx@7.25.7(@babel/core@7.25.2)': + '@babel/plugin-syntax-jsx@7.24.7(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-syntax-jsx@7.25.7(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.22.5)': dependencies: '@babel/core': 7.22.5 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(@babel/core@7.22.5)': dependencies: '@babel/core': 7.22.5 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@7.22.5)': dependencies: '@babel/core': 7.22.5 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.22.5)': dependencies: '@babel/core': 7.22.5 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@7.22.5)': dependencies: '@babel/core': 7.22.5 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-optional-chaining@7.8.3(@babel/core@7.22.5)': dependencies: '@babel/core': 7.22.5 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-optional-chaining@7.8.3(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-syntax-optional-chaining@7.8.3(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-private-property-in-object@7.14.5(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-syntax-private-property-in-object@7.14.5(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-top-level-await@7.14.5(@babel/core@7.22.5)': dependencies: '@babel/core': 7.22.5 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-top-level-await@7.14.5(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-syntax-top-level-await@7.14.5(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-typescript@7.25.4(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-typescript@7.25.4(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.24.8 - - '@babel/plugin-syntax-typescript@7.25.7(@babel/core@7.25.2)': - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-syntax-typescript@7.25.7(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-syntax-unicode-sets-regex@7.18.6(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 '@babel/helper-create-regexp-features-plugin': 7.22.5(@babel/core@7.25.2) - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-syntax-unicode-sets-regex@7.18.6(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-create-regexp-features-plugin': 7.22.5(@babel/core@7.25.8) - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-transform-arrow-functions@7.22.5(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-transform-arrow-functions@7.22.5(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-transform-arrow-functions@7.25.7(@babel/core@7.25.2)': + '@babel/plugin-transform-arrow-functions@7.24.7(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-transform-arrow-functions@7.25.7(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-transform-async-generator-functions@7.22.5(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 '@babel/helper-environment-visitor': 7.22.5 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/helper-remap-async-to-generator': 7.22.5(@babel/core@7.25.2) '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.25.2) transitivePeerDependencies: - supports-color - '@babel/plugin-transform-async-generator-functions@7.22.5(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-environment-visitor': 7.22.5 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/helper-remap-async-to-generator': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.25.8) - transitivePeerDependencies: - - supports-color - '@babel/plugin-transform-async-to-generator@7.22.5(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-module-imports': 7.25.7 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-module-imports': 7.24.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/helper-remap-async-to-generator': 7.22.5(@babel/core@7.25.2) transitivePeerDependencies: - supports-color - '@babel/plugin-transform-async-to-generator@7.22.5(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-module-imports': 7.25.7 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/helper-remap-async-to-generator': 7.22.5(@babel/core@7.25.8) - transitivePeerDependencies: - - supports-color - - '@babel/plugin-transform-async-to-generator@7.25.7(@babel/core@7.25.2)': + '@babel/plugin-transform-async-to-generator@7.24.7(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-module-imports': 7.25.7 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/helper-remap-async-to-generator': 7.25.7(@babel/core@7.25.2) - transitivePeerDependencies: - - supports-color - - '@babel/plugin-transform-async-to-generator@7.25.7(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-module-imports': 7.25.7 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/helper-remap-async-to-generator': 7.25.7(@babel/core@7.25.8) + '@babel/helper-module-imports': 7.24.7 + '@babel/helper-plugin-utils': 7.24.8 + '@babel/helper-remap-async-to-generator': 7.25.0(@babel/core@7.25.2) transitivePeerDependencies: - supports-color '@babel/plugin-transform-block-scoped-functions@7.22.5(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-transform-block-scoped-functions@7.22.5(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-transform-block-scoping@7.22.5(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-transform-block-scoping@7.22.5(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-transform-block-scoping@7.25.7(@babel/core@7.25.2)': + '@babel/plugin-transform-block-scoping@7.25.0(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-transform-block-scoping@7.25.7(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-transform-class-properties@7.22.5(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 '@babel/helper-create-class-features-plugin': 7.22.5(@babel/core@7.25.2) - '@babel/helper-plugin-utils': 7.25.7 - transitivePeerDependencies: - - supports-color - - '@babel/plugin-transform-class-properties@7.22.5(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-create-class-features-plugin': 7.22.5(@babel/core@7.25.8) - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 transitivePeerDependencies: - supports-color @@ -17222,70 +16658,34 @@ snapshots: dependencies: '@babel/core': 7.25.2 '@babel/helper-create-class-features-plugin': 7.22.5(@babel/core@7.25.2) - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.25.2) transitivePeerDependencies: - supports-color - '@babel/plugin-transform-class-static-block@7.22.5(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-create-class-features-plugin': 7.22.5(@babel/core@7.25.8) - '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.25.8) - transitivePeerDependencies: - - supports-color - '@babel/plugin-transform-classes@7.22.5(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 '@babel/helper-annotate-as-pure': 7.22.5 - '@babel/helper-compilation-targets': 7.25.7 - '@babel/helper-environment-visitor': 7.22.5 - '@babel/helper-function-name': 7.22.5 - '@babel/helper-optimise-call-expression': 7.22.5 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/helper-replace-supers': 7.22.5 - '@babel/helper-split-export-declaration': 7.22.5 - globals: 11.12.0 - transitivePeerDependencies: - - supports-color - - '@babel/plugin-transform-classes@7.22.5(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-annotate-as-pure': 7.22.5 - '@babel/helper-compilation-targets': 7.25.7 + '@babel/helper-compilation-targets': 7.25.2 '@babel/helper-environment-visitor': 7.22.5 '@babel/helper-function-name': 7.22.5 '@babel/helper-optimise-call-expression': 7.22.5 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/helper-replace-supers': 7.22.5 '@babel/helper-split-export-declaration': 7.22.5 globals: 11.12.0 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-classes@7.25.7(@babel/core@7.25.2)': + '@babel/plugin-transform-classes@7.25.4(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-annotate-as-pure': 7.25.7 - '@babel/helper-compilation-targets': 7.25.7 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/helper-replace-supers': 7.25.7(@babel/core@7.25.2) - '@babel/traverse': 7.25.7 - globals: 11.12.0 - transitivePeerDependencies: - - supports-color - - '@babel/plugin-transform-classes@7.25.7(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-annotate-as-pure': 7.25.7 - '@babel/helper-compilation-targets': 7.25.7 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/helper-replace-supers': 7.25.7(@babel/core@7.25.8) - '@babel/traverse': 7.25.7 + '@babel/helper-annotate-as-pure': 7.24.7 + '@babel/helper-compilation-targets': 7.25.2 + '@babel/helper-plugin-utils': 7.24.8 + '@babel/helper-replace-supers': 7.25.0(@babel/core@7.25.2) + '@babel/traverse': 7.25.6 globals: 11.12.0 transitivePeerDependencies: - supports-color @@ -17293,274 +16693,143 @@ snapshots: '@babel/plugin-transform-computed-properties@7.22.5(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/template': 7.25.7 - - '@babel/plugin-transform-computed-properties@7.22.5(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/template': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 + '@babel/template': 7.25.0 - '@babel/plugin-transform-computed-properties@7.25.7(@babel/core@7.25.2)': + '@babel/plugin-transform-computed-properties@7.24.7(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/template': 7.25.7 - - '@babel/plugin-transform-computed-properties@7.25.7(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/template': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 + '@babel/template': 7.25.0 '@babel/plugin-transform-destructuring@7.22.5(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-transform-destructuring@7.22.5(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-transform-destructuring@7.25.7(@babel/core@7.25.2)': + '@babel/plugin-transform-destructuring@7.24.8(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-transform-destructuring@7.25.7(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-transform-dotall-regex@7.22.5(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 '@babel/helper-create-regexp-features-plugin': 7.22.5(@babel/core@7.25.2) - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-transform-dotall-regex@7.22.5(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-create-regexp-features-plugin': 7.22.5(@babel/core@7.25.8) - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-transform-duplicate-keys@7.22.5(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-transform-duplicate-keys@7.22.5(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-transform-dynamic-import@7.22.5(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.25.2) - '@babel/plugin-transform-dynamic-import@7.22.5(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.25.8) - '@babel/plugin-transform-exponentiation-operator@7.22.5(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 '@babel/helper-builder-binary-assignment-operator-visitor': 7.22.5 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-transform-exponentiation-operator@7.22.5(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-builder-binary-assignment-operator-visitor': 7.22.5 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-transform-export-namespace-from@7.22.5(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-export-namespace-from': 7.8.3(@babel/core@7.25.2) - '@babel/plugin-transform-export-namespace-from@7.22.5(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-syntax-export-namespace-from': 7.8.3(@babel/core@7.25.8) - - '@babel/plugin-transform-flow-strip-types@7.22.5(@babel/core@7.25.8)': + '@babel/plugin-transform-flow-strip-types@7.22.5(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-syntax-flow': 7.22.5(@babel/core@7.25.8) - - '@babel/plugin-transform-flow-strip-types@7.24.6(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-syntax-flow': 7.24.6(@babel/core@7.25.8) + '@babel/core': 7.25.2 + '@babel/helper-plugin-utils': 7.24.8 + '@babel/plugin-syntax-flow': 7.22.5(@babel/core@7.25.2) - '@babel/plugin-transform-flow-strip-types@7.25.7(@babel/core@7.25.2)': + '@babel/plugin-transform-flow-strip-types@7.24.6(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-syntax-flow': 7.25.7(@babel/core@7.25.2) + '@babel/helper-plugin-utils': 7.24.8 + '@babel/plugin-syntax-flow': 7.24.6(@babel/core@7.25.2) - '@babel/plugin-transform-flow-strip-types@7.25.7(@babel/core@7.25.8)': + '@babel/plugin-transform-flow-strip-types@7.25.2(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-syntax-flow': 7.25.7(@babel/core@7.25.8) + '@babel/core': 7.25.2 + '@babel/helper-plugin-utils': 7.24.8 + '@babel/plugin-syntax-flow': 7.24.7(@babel/core@7.25.2) '@babel/plugin-transform-for-of@7.22.5(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-transform-for-of@7.22.5(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-transform-function-name@7.22.5(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-compilation-targets': 7.25.7 - '@babel/helper-function-name': 7.22.5 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-transform-function-name@7.22.5(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-compilation-targets': 7.25.7 + '@babel/helper-compilation-targets': 7.25.2 '@babel/helper-function-name': 7.22.5 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-transform-function-name@7.25.7(@babel/core@7.25.2)': + '@babel/plugin-transform-function-name@7.25.1(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-compilation-targets': 7.25.7 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/traverse': 7.25.7 - transitivePeerDependencies: - - supports-color - - '@babel/plugin-transform-function-name@7.25.7(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-compilation-targets': 7.25.7 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/traverse': 7.25.7 + '@babel/helper-compilation-targets': 7.25.2 + '@babel/helper-plugin-utils': 7.24.8 + '@babel/traverse': 7.25.6 transitivePeerDependencies: - supports-color '@babel/plugin-transform-json-strings@7.22.5(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.25.2) - '@babel/plugin-transform-json-strings@7.22.5(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.25.8) - '@babel/plugin-transform-literals@7.22.5(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-transform-literals@7.22.5(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-transform-literals@7.25.7(@babel/core@7.25.2)': + '@babel/plugin-transform-literals@7.25.2(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-transform-literals@7.25.7(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-transform-logical-assignment-operators@7.22.5(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.25.2) - '@babel/plugin-transform-logical-assignment-operators@7.22.5(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.25.8) - '@babel/plugin-transform-member-expression-literals@7.22.5(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-transform-member-expression-literals@7.22.5(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-transform-modules-amd@7.22.5(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-module-transforms': 7.25.7(@babel/core@7.25.2) - '@babel/helper-plugin-utils': 7.25.7 - transitivePeerDependencies: - - supports-color - - '@babel/plugin-transform-modules-amd@7.22.5(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-module-transforms': 7.25.7(@babel/core@7.25.8) - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-module-transforms': 7.25.2(@babel/core@7.25.2) + '@babel/helper-plugin-utils': 7.24.8 transitivePeerDependencies: - supports-color '@babel/plugin-transform-modules-commonjs@7.22.5(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-module-transforms': 7.25.7(@babel/core@7.25.2) - '@babel/helper-plugin-utils': 7.25.7 - '@babel/helper-simple-access': 7.25.7 - transitivePeerDependencies: - - supports-color - - '@babel/plugin-transform-modules-commonjs@7.22.5(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-module-transforms': 7.25.7(@babel/core@7.25.8) - '@babel/helper-plugin-utils': 7.25.7 - '@babel/helper-simple-access': 7.25.7 + '@babel/helper-module-transforms': 7.25.2(@babel/core@7.25.2) + '@babel/helper-plugin-utils': 7.24.8 + '@babel/helper-simple-access': 7.24.7 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-modules-commonjs@7.25.7(@babel/core@7.25.2)': + '@babel/plugin-transform-modules-commonjs@7.24.8(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-module-transforms': 7.25.7(@babel/core@7.25.2) - '@babel/helper-plugin-utils': 7.25.7 - '@babel/helper-simple-access': 7.25.7 - transitivePeerDependencies: - - supports-color - - '@babel/plugin-transform-modules-commonjs@7.25.7(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-module-transforms': 7.25.7(@babel/core@7.25.8) - '@babel/helper-plugin-utils': 7.25.7 - '@babel/helper-simple-access': 7.25.7 + '@babel/helper-module-transforms': 7.25.2(@babel/core@7.25.2) + '@babel/helper-plugin-utils': 7.24.8 + '@babel/helper-simple-access': 7.24.7 transitivePeerDependencies: - supports-color @@ -17568,35 +16837,17 @@ snapshots: dependencies: '@babel/core': 7.25.2 '@babel/helper-hoist-variables': 7.22.5 - '@babel/helper-module-transforms': 7.25.7(@babel/core@7.25.2) - '@babel/helper-plugin-utils': 7.25.7 - '@babel/helper-validator-identifier': 7.25.7 - transitivePeerDependencies: - - supports-color - - '@babel/plugin-transform-modules-systemjs@7.22.5(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-hoist-variables': 7.22.5 - '@babel/helper-module-transforms': 7.25.7(@babel/core@7.25.8) - '@babel/helper-plugin-utils': 7.25.7 - '@babel/helper-validator-identifier': 7.25.7 + '@babel/helper-module-transforms': 7.25.2(@babel/core@7.25.2) + '@babel/helper-plugin-utils': 7.24.8 + '@babel/helper-validator-identifier': 7.24.7 transitivePeerDependencies: - supports-color '@babel/plugin-transform-modules-umd@7.22.5(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-module-transforms': 7.25.7(@babel/core@7.25.2) - '@babel/helper-plugin-utils': 7.25.7 - transitivePeerDependencies: - - supports-color - - '@babel/plugin-transform-modules-umd@7.22.5(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-module-transforms': 7.25.7(@babel/core@7.25.8) - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-module-transforms': 7.25.2(@babel/core@7.25.2) + '@babel/helper-plugin-utils': 7.24.8 transitivePeerDependencies: - supports-color @@ -17604,90 +16855,44 @@ snapshots: dependencies: '@babel/core': 7.25.2 '@babel/helper-create-regexp-features-plugin': 7.22.5(@babel/core@7.25.2) - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-transform-named-capturing-groups-regex@7.22.5(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-create-regexp-features-plugin': 7.22.5(@babel/core@7.25.8) - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-transform-named-capturing-groups-regex@7.25.7(@babel/core@7.25.2)': + '@babel/plugin-transform-named-capturing-groups-regex@7.24.7(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-create-regexp-features-plugin': 7.25.7(@babel/core@7.25.2) - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-transform-named-capturing-groups-regex@7.25.7(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-create-regexp-features-plugin': 7.25.7(@babel/core@7.25.8) - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-create-regexp-features-plugin': 7.25.2(@babel/core@7.25.2) + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-transform-new-target@7.22.5(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-transform-new-target@7.22.5(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-transform-nullish-coalescing-operator@7.22.5(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.25.2) - '@babel/plugin-transform-nullish-coalescing-operator@7.22.5(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.25.8) - '@babel/plugin-transform-numeric-separator@7.22.5(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.25.2) - '@babel/plugin-transform-numeric-separator@7.22.5(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.25.8) - '@babel/plugin-transform-object-rest-spread@7.22.5(@babel/core@7.25.2)': dependencies: - '@babel/compat-data': 7.25.8 + '@babel/compat-data': 7.25.4 '@babel/core': 7.25.2 - '@babel/helper-compilation-targets': 7.25.7 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-compilation-targets': 7.25.2 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.25.2) '@babel/plugin-transform-parameters': 7.22.5(@babel/core@7.25.2) - '@babel/plugin-transform-object-rest-spread@7.22.5(@babel/core@7.25.8)': - dependencies: - '@babel/compat-data': 7.25.8 - '@babel/core': 7.25.8 - '@babel/helper-compilation-targets': 7.25.7 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.25.8) - '@babel/plugin-transform-parameters': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-object-super@7.22.5(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/helper-replace-supers': 7.22.5 - transitivePeerDependencies: - - supports-color - - '@babel/plugin-transform-object-super@7.22.5(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/helper-replace-supers': 7.22.5 transitivePeerDependencies: - supports-color @@ -17695,78 +16900,39 @@ snapshots: '@babel/plugin-transform-optional-catch-binding@7.22.5(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.25.2) - '@babel/plugin-transform-optional-catch-binding@7.22.5(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.25.8) - '@babel/plugin-transform-optional-chaining@7.22.5(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.25.2) - '@babel/plugin-transform-optional-chaining@7.22.5(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 - '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.25.8) - '@babel/plugin-transform-parameters@7.22.5(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-transform-parameters@7.22.5(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-transform-parameters@7.25.7(@babel/core@7.25.2)': + '@babel/plugin-transform-parameters@7.24.7(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-transform-parameters@7.25.7(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-transform-private-methods@7.22.5(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 '@babel/helper-create-class-features-plugin': 7.22.5(@babel/core@7.25.2) - '@babel/helper-plugin-utils': 7.25.7 - transitivePeerDependencies: - - supports-color - - '@babel/plugin-transform-private-methods@7.22.5(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-create-class-features-plugin': 7.22.5(@babel/core@7.25.8) - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-private-methods@7.25.7(@babel/core@7.25.2)': + '@babel/plugin-transform-private-methods@7.25.4(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-create-class-features-plugin': 7.25.7(@babel/core@7.25.2) - '@babel/helper-plugin-utils': 7.25.7 - transitivePeerDependencies: - - supports-color - - '@babel/plugin-transform-private-methods@7.25.7(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-create-class-features-plugin': 7.25.7(@babel/core@7.25.8) - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-create-class-features-plugin': 7.25.4(@babel/core@7.25.2) + '@babel/helper-plugin-utils': 7.24.8 transitivePeerDependencies: - supports-color @@ -17775,196 +16941,136 @@ snapshots: '@babel/core': 7.25.2 '@babel/helper-annotate-as-pure': 7.22.5 '@babel/helper-create-class-features-plugin': 7.22.5(@babel/core@7.25.2) - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.25.2) transitivePeerDependencies: - supports-color - '@babel/plugin-transform-private-property-in-object@7.22.5(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-annotate-as-pure': 7.22.5 - '@babel/helper-create-class-features-plugin': 7.22.5(@babel/core@7.25.8) - '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.25.8) - transitivePeerDependencies: - - supports-color - - '@babel/plugin-transform-private-property-in-object@7.25.8(@babel/core@7.25.2)': + '@babel/plugin-transform-private-property-in-object@7.24.7(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-annotate-as-pure': 7.25.7 - '@babel/helper-create-class-features-plugin': 7.25.7(@babel/core@7.25.2) - '@babel/helper-plugin-utils': 7.25.7 - transitivePeerDependencies: - - supports-color - - '@babel/plugin-transform-private-property-in-object@7.25.8(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-annotate-as-pure': 7.25.7 - '@babel/helper-create-class-features-plugin': 7.25.7(@babel/core@7.25.8) - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-annotate-as-pure': 7.24.7 + '@babel/helper-create-class-features-plugin': 7.25.4(@babel/core@7.25.2) + '@babel/helper-plugin-utils': 7.24.8 + '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.25.2) transitivePeerDependencies: - supports-color '@babel/plugin-transform-property-literals@7.22.5(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-transform-property-literals@7.22.5(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-transform-react-constant-elements@7.22.5(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-transform-react-display-name@7.22.5(@babel/core@7.25.8)': + '@babel/plugin-transform-react-constant-elements@7.22.5(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/core': 7.25.2 + '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-transform-react-display-name@7.25.7(@babel/core@7.25.2)': + '@babel/plugin-transform-react-display-name@7.22.5(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-transform-react-display-name@7.25.7(@babel/core@7.25.8)': + '@babel/plugin-transform-react-display-name@7.24.7(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/core': 7.25.2 + '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-transform-react-jsx-development@7.22.5(@babel/core@7.25.8)': + '@babel/plugin-transform-react-jsx-development@7.22.5(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.25.8 - '@babel/plugin-transform-react-jsx': 7.22.5(@babel/core@7.25.8) + '@babel/core': 7.25.2 + '@babel/plugin-transform-react-jsx': 7.22.5(@babel/core@7.25.2) transitivePeerDependencies: - supports-color - '@babel/plugin-transform-react-jsx-self@7.25.7(@babel/core@7.25.2)': + '@babel/plugin-transform-react-jsx-self@7.24.7(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-transform-react-jsx-self@7.25.7(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-transform-react-jsx-source@7.25.7(@babel/core@7.25.2)': + '@babel/plugin-transform-react-jsx-source@7.24.7(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-transform-react-jsx-source@7.25.7(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-transform-react-jsx@7.22.5(@babel/core@7.25.8)': + '@babel/plugin-transform-react-jsx@7.22.5(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.25.8 + '@babel/core': 7.25.2 '@babel/helper-annotate-as-pure': 7.22.5 - '@babel/helper-module-imports': 7.25.7 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-syntax-jsx': 7.24.7(@babel/core@7.25.8) - '@babel/types': 7.25.8 + '@babel/helper-module-imports': 7.24.7 + '@babel/helper-plugin-utils': 7.24.8 + '@babel/plugin-syntax-jsx': 7.24.7(@babel/core@7.25.2) + '@babel/types': 7.25.6 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-react-jsx@7.23.4(@babel/core@7.25.8)': + '@babel/plugin-transform-react-jsx@7.23.4(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.25.8 + '@babel/core': 7.25.2 '@babel/helper-annotate-as-pure': 7.24.6 - '@babel/helper-module-imports': 7.25.7 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-syntax-jsx': 7.24.7(@babel/core@7.25.8) - '@babel/types': 7.25.8 + '@babel/helper-module-imports': 7.24.7 + '@babel/helper-plugin-utils': 7.24.8 + '@babel/plugin-syntax-jsx': 7.24.7(@babel/core@7.25.2) + '@babel/types': 7.25.6 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-react-jsx@7.25.7(@babel/core@7.22.5)': + '@babel/plugin-transform-react-jsx@7.25.2(@babel/core@7.22.5)': dependencies: '@babel/core': 7.22.5 - '@babel/helper-annotate-as-pure': 7.25.7 - '@babel/helper-module-imports': 7.25.7 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-syntax-jsx': 7.25.7(@babel/core@7.22.5) - '@babel/types': 7.25.8 + '@babel/helper-annotate-as-pure': 7.24.7 + '@babel/helper-module-imports': 7.24.7 + '@babel/helper-plugin-utils': 7.24.8 + '@babel/plugin-syntax-jsx': 7.24.7(@babel/core@7.22.5) + '@babel/types': 7.25.6 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-react-jsx@7.25.7(@babel/core@7.25.2)': + '@babel/plugin-transform-react-jsx@7.25.2(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-annotate-as-pure': 7.25.7 - '@babel/helper-module-imports': 7.25.7 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-syntax-jsx': 7.25.7(@babel/core@7.25.2) - '@babel/types': 7.25.8 - transitivePeerDependencies: - - supports-color - - '@babel/plugin-transform-react-jsx@7.25.7(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-annotate-as-pure': 7.25.7 - '@babel/helper-module-imports': 7.25.7 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-syntax-jsx': 7.25.7(@babel/core@7.25.8) - '@babel/types': 7.25.8 + '@babel/helper-annotate-as-pure': 7.24.7 + '@babel/helper-module-imports': 7.24.7 + '@babel/helper-plugin-utils': 7.24.8 + '@babel/plugin-syntax-jsx': 7.24.7(@babel/core@7.25.2) + '@babel/types': 7.25.6 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-react-pure-annotations@7.22.5(@babel/core@7.25.8)': + '@babel/plugin-transform-react-pure-annotations@7.22.5(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.25.8 + '@babel/core': 7.25.2 '@babel/helper-annotate-as-pure': 7.22.5 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-transform-regenerator@7.22.5(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 - regenerator-transform: 0.15.1 - - '@babel/plugin-transform-regenerator@7.22.5(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 regenerator-transform: 0.15.1 '@babel/plugin-transform-reserved-words@7.22.5(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-transform-reserved-words@7.22.5(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-transform-runtime@7.22.5(@babel/core@7.25.8)': + '@babel/plugin-transform-runtime@7.22.5(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.25.8 + '@babel/core': 7.25.2 '@babel/helper-module-imports': 7.22.5 - '@babel/helper-plugin-utils': 7.25.7 - babel-plugin-polyfill-corejs2: 0.4.3(@babel/core@7.25.8) - babel-plugin-polyfill-corejs3: 0.8.1(@babel/core@7.25.8) - babel-plugin-polyfill-regenerator: 0.5.0(@babel/core@7.25.8) + '@babel/helper-plugin-utils': 7.24.8 + babel-plugin-polyfill-corejs2: 0.4.3(@babel/core@7.25.2) + babel-plugin-polyfill-corejs3: 0.8.1(@babel/core@7.25.2) + babel-plugin-polyfill-regenerator: 0.5.0(@babel/core@7.25.2) semver: 6.3.1 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-runtime@7.25.7(@babel/core@7.25.2)': + '@babel/plugin-transform-runtime@7.25.4(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-module-imports': 7.25.7 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-module-imports': 7.24.7 + '@babel/helper-plugin-utils': 7.24.8 babel-plugin-polyfill-corejs2: 0.4.11(@babel/core@7.25.2) babel-plugin-polyfill-corejs3: 0.10.6(@babel/core@7.25.2) babel-plugin-polyfill-regenerator: 0.6.2(@babel/core@7.25.2) @@ -17972,202 +17078,106 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/plugin-transform-runtime@7.25.7(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-module-imports': 7.25.7 - '@babel/helper-plugin-utils': 7.25.7 - babel-plugin-polyfill-corejs2: 0.4.11(@babel/core@7.25.8) - babel-plugin-polyfill-corejs3: 0.10.6(@babel/core@7.25.8) - babel-plugin-polyfill-regenerator: 0.6.2(@babel/core@7.25.8) - semver: 6.3.1 - transitivePeerDependencies: - - supports-color - '@babel/plugin-transform-shorthand-properties@7.22.5(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-transform-shorthand-properties@7.22.5(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-transform-shorthand-properties@7.25.7(@babel/core@7.25.2)': + '@babel/plugin-transform-shorthand-properties@7.24.7(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-transform-shorthand-properties@7.25.7(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-transform-spread@7.22.5(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 - - '@babel/plugin-transform-spread@7.22.5(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 - '@babel/plugin-transform-spread@7.25.7(@babel/core@7.25.2)': + '@babel/plugin-transform-spread@7.24.7(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/helper-skip-transparent-expression-wrappers': 7.25.7 - transitivePeerDependencies: - - supports-color - - '@babel/plugin-transform-spread@7.25.7(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/helper-skip-transparent-expression-wrappers': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 + '@babel/helper-skip-transparent-expression-wrappers': 7.24.7 transitivePeerDependencies: - supports-color '@babel/plugin-transform-sticky-regex@7.22.5(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-transform-sticky-regex@7.22.5(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-transform-sticky-regex@7.25.7(@babel/core@7.25.2)': + '@babel/plugin-transform-sticky-regex@7.24.7(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-transform-sticky-regex@7.25.7(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-transform-template-literals@7.22.5(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-transform-template-literals@7.22.5(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-transform-typeof-symbol@7.22.5(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-transform-typeof-symbol@7.22.5(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-transform-typescript@7.22.5(@babel/core@7.25.8)': + '@babel/plugin-transform-typescript@7.22.5(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.25.8 + '@babel/core': 7.25.2 '@babel/helper-annotate-as-pure': 7.22.5 - '@babel/helper-create-class-features-plugin': 7.22.5(@babel/core@7.25.8) - '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-syntax-typescript': 7.25.4(@babel/core@7.25.8) + '@babel/helper-create-class-features-plugin': 7.22.5(@babel/core@7.25.2) + '@babel/helper-plugin-utils': 7.24.8 + '@babel/plugin-syntax-typescript': 7.25.4(@babel/core@7.25.2) transitivePeerDependencies: - supports-color - '@babel/plugin-transform-typescript@7.25.7(@babel/core@7.25.2)': + '@babel/plugin-transform-typescript@7.25.2(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-annotate-as-pure': 7.25.7 - '@babel/helper-create-class-features-plugin': 7.25.7(@babel/core@7.25.2) - '@babel/helper-plugin-utils': 7.25.7 - '@babel/helper-skip-transparent-expression-wrappers': 7.25.7 - '@babel/plugin-syntax-typescript': 7.25.7(@babel/core@7.25.2) - transitivePeerDependencies: - - supports-color - - '@babel/plugin-transform-typescript@7.25.7(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-annotate-as-pure': 7.25.7 - '@babel/helper-create-class-features-plugin': 7.25.7(@babel/core@7.25.8) - '@babel/helper-plugin-utils': 7.25.7 - '@babel/helper-skip-transparent-expression-wrappers': 7.25.7 - '@babel/plugin-syntax-typescript': 7.25.7(@babel/core@7.25.8) + '@babel/helper-annotate-as-pure': 7.24.7 + '@babel/helper-create-class-features-plugin': 7.25.4(@babel/core@7.25.2) + '@babel/helper-plugin-utils': 7.24.8 + '@babel/helper-skip-transparent-expression-wrappers': 7.24.7 + '@babel/plugin-syntax-typescript': 7.25.4(@babel/core@7.25.2) transitivePeerDependencies: - supports-color '@babel/plugin-transform-unicode-escapes@7.22.5(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-transform-unicode-escapes@7.22.5(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-transform-unicode-property-regex@7.22.5(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 '@babel/helper-create-regexp-features-plugin': 7.22.5(@babel/core@7.25.2) - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-transform-unicode-property-regex@7.22.5(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-create-regexp-features-plugin': 7.22.5(@babel/core@7.25.8) - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-transform-unicode-regex@7.22.5(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 '@babel/helper-create-regexp-features-plugin': 7.22.5(@babel/core@7.25.2) - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-transform-unicode-regex@7.22.5(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-create-regexp-features-plugin': 7.22.5(@babel/core@7.25.8) - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-transform-unicode-regex@7.25.7(@babel/core@7.25.2)': + '@babel/plugin-transform-unicode-regex@7.24.7(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-create-regexp-features-plugin': 7.25.7(@babel/core@7.25.2) - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-transform-unicode-regex@7.25.7(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-create-regexp-features-plugin': 7.25.7(@babel/core@7.25.8) - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-create-regexp-features-plugin': 7.25.2(@babel/core@7.25.2) + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-transform-unicode-sets-regex@7.22.5(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 '@babel/helper-create-regexp-features-plugin': 7.22.5(@babel/core@7.25.2) - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-transform-unicode-sets-regex@7.22.5(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-create-regexp-features-plugin': 7.22.5(@babel/core@7.25.8) - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/preset-env@7.22.5(@babel/core@7.25.2)': dependencies: '@babel/compat-data': 7.22.5 '@babel/core': 7.25.2 - '@babel/helper-compilation-targets': 7.25.7 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-compilation-targets': 7.25.2 + '@babel/helper-plugin-utils': 7.24.8 '@babel/helper-validator-option': 7.22.5 '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression': 7.22.5(@babel/core@7.25.2) '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining': 7.22.5(@babel/core@7.25.2) @@ -18239,7 +17249,7 @@ snapshots: '@babel/plugin-transform-unicode-regex': 7.22.5(@babel/core@7.25.2) '@babel/plugin-transform-unicode-sets-regex': 7.22.5(@babel/core@7.25.2) '@babel/preset-modules': 0.1.5(@babel/core@7.25.2) - '@babel/types': 7.25.8 + '@babel/types': 7.25.6 babel-plugin-polyfill-corejs2: 0.4.3(@babel/core@7.25.2) babel-plugin-polyfill-corejs3: 0.8.1(@babel/core@7.25.2) babel-plugin-polyfill-regenerator: 0.5.0(@babel/core@7.25.2) @@ -18248,154 +17258,59 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/preset-env@7.22.5(@babel/core@7.25.8)': - dependencies: - '@babel/compat-data': 7.22.5 - '@babel/core': 7.25.8 - '@babel/helper-compilation-targets': 7.25.7 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/helper-validator-option': 7.22.5 - '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-proposal-private-property-in-object': 7.21.0-placeholder-for-preset-env.2(@babel/core@7.25.8) - '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.25.8) - '@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@7.25.8) - '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.25.8) - '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.25.8) - '@babel/plugin-syntax-export-namespace-from': 7.8.3(@babel/core@7.25.8) - '@babel/plugin-syntax-import-assertions': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-syntax-import-attributes': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.25.8) - '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.25.8) - '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.25.8) - '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.25.8) - '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.25.8) - '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.25.8) - '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.25.8) - '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.25.8) - '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.25.8) - '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.25.8) - '@babel/plugin-syntax-unicode-sets-regex': 7.18.6(@babel/core@7.25.8) - '@babel/plugin-transform-arrow-functions': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-async-generator-functions': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-async-to-generator': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-block-scoped-functions': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-block-scoping': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-class-properties': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-class-static-block': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-classes': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-computed-properties': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-destructuring': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-dotall-regex': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-duplicate-keys': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-dynamic-import': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-exponentiation-operator': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-export-namespace-from': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-for-of': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-function-name': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-json-strings': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-literals': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-logical-assignment-operators': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-member-expression-literals': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-modules-amd': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-modules-commonjs': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-modules-systemjs': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-modules-umd': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-named-capturing-groups-regex': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-new-target': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-nullish-coalescing-operator': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-numeric-separator': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-object-rest-spread': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-object-super': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-optional-catch-binding': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-optional-chaining': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-parameters': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-private-methods': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-private-property-in-object': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-property-literals': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-regenerator': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-reserved-words': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-shorthand-properties': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-spread': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-sticky-regex': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-template-literals': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-typeof-symbol': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-unicode-escapes': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-unicode-property-regex': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-unicode-regex': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-unicode-sets-regex': 7.22.5(@babel/core@7.25.8) - '@babel/preset-modules': 0.1.5(@babel/core@7.25.8) - '@babel/types': 7.25.8 - babel-plugin-polyfill-corejs2: 0.4.3(@babel/core@7.25.8) - babel-plugin-polyfill-corejs3: 0.8.1(@babel/core@7.25.8) - babel-plugin-polyfill-regenerator: 0.5.0(@babel/core@7.25.8) - core-js-compat: 3.31.0 - semver: 6.3.1 - transitivePeerDependencies: - - supports-color - - '@babel/preset-flow@7.25.7(@babel/core@7.25.8)': + '@babel/preset-flow@7.24.7(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/helper-validator-option': 7.25.7 - '@babel/plugin-transform-flow-strip-types': 7.25.7(@babel/core@7.25.8) + '@babel/core': 7.25.2 + '@babel/helper-plugin-utils': 7.24.8 + '@babel/helper-validator-option': 7.24.8 + '@babel/plugin-transform-flow-strip-types': 7.25.2(@babel/core@7.25.2) '@babel/preset-modules@0.1.5(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-proposal-unicode-property-regex': 7.18.6(@babel/core@7.25.2) '@babel/plugin-transform-dotall-regex': 7.22.5(@babel/core@7.25.2) - '@babel/types': 7.25.8 - esutils: 2.0.3 - - '@babel/preset-modules@0.1.5(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-proposal-unicode-property-regex': 7.18.6(@babel/core@7.25.8) - '@babel/plugin-transform-dotall-regex': 7.22.5(@babel/core@7.25.8) - '@babel/types': 7.25.8 + '@babel/types': 7.25.6 esutils: 2.0.3 - '@babel/preset-react@7.22.5(@babel/core@7.25.8)': + '@babel/preset-react@7.22.5(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/core': 7.25.2 + '@babel/helper-plugin-utils': 7.24.8 '@babel/helper-validator-option': 7.22.5 - '@babel/plugin-transform-react-display-name': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-react-jsx': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-react-jsx-development': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-react-pure-annotations': 7.22.5(@babel/core@7.25.8) + '@babel/plugin-transform-react-display-name': 7.22.5(@babel/core@7.25.2) + '@babel/plugin-transform-react-jsx': 7.22.5(@babel/core@7.25.2) + '@babel/plugin-transform-react-jsx-development': 7.22.5(@babel/core@7.25.2) + '@babel/plugin-transform-react-pure-annotations': 7.22.5(@babel/core@7.25.2) transitivePeerDependencies: - supports-color - '@babel/preset-typescript@7.22.5(@babel/core@7.25.8)': + '@babel/preset-typescript@7.22.5(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/core': 7.25.2 + '@babel/helper-plugin-utils': 7.24.8 '@babel/helper-validator-option': 7.22.5 - '@babel/plugin-syntax-jsx': 7.24.7(@babel/core@7.25.8) - '@babel/plugin-transform-modules-commonjs': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-typescript': 7.22.5(@babel/core@7.25.8) + '@babel/plugin-syntax-jsx': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-transform-modules-commonjs': 7.22.5(@babel/core@7.25.2) + '@babel/plugin-transform-typescript': 7.22.5(@babel/core@7.25.2) transitivePeerDependencies: - supports-color - '@babel/preset-typescript@7.25.7(@babel/core@7.25.8)': + '@babel/preset-typescript@7.24.7(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/helper-validator-option': 7.25.7 - '@babel/plugin-syntax-jsx': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-modules-commonjs': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-typescript': 7.25.7(@babel/core@7.25.8) + '@babel/core': 7.25.2 + '@babel/helper-plugin-utils': 7.24.8 + '@babel/helper-validator-option': 7.24.8 + '@babel/plugin-syntax-jsx': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-transform-modules-commonjs': 7.24.8(@babel/core@7.25.2) + '@babel/plugin-transform-typescript': 7.25.2(@babel/core@7.25.2) transitivePeerDependencies: - supports-color - '@babel/register@7.25.7(@babel/core@7.25.8)': + '@babel/register@7.24.6(@babel/core@7.25.2)': dependencies: - '@babel/core': 7.25.8 + '@babel/core': 7.25.2 clone-deep: 4.0.1 find-cache-dir: 2.1.0 make-dir: 2.1.0 @@ -18408,7 +17323,7 @@ snapshots: dependencies: regenerator-runtime: 0.14.1 - '@babel/runtime@7.25.7': + '@babel/runtime@7.25.6': dependencies: regenerator-runtime: 0.14.1 @@ -18416,33 +17331,15 @@ snapshots: dependencies: '@babel/code-frame': 7.24.7 '@babel/parser': 7.25.6 - '@babel/types': 7.25.8 - - '@babel/template@7.25.7': - dependencies: - '@babel/code-frame': 7.25.7 - '@babel/parser': 7.25.8 - '@babel/types': 7.25.8 + '@babel/types': 7.25.6 '@babel/traverse@7.25.6': dependencies: '@babel/code-frame': 7.24.7 - '@babel/generator': 7.25.7 + '@babel/generator': 7.25.6 '@babel/parser': 7.25.6 - '@babel/template': 7.25.7 - '@babel/types': 7.25.8 - debug: 4.3.7(supports-color@5.5.0) - globals: 11.12.0 - transitivePeerDependencies: - - supports-color - - '@babel/traverse@7.25.7': - dependencies: - '@babel/code-frame': 7.25.7 - '@babel/generator': 7.25.7 - '@babel/parser': 7.25.8 - '@babel/template': 7.25.7 - '@babel/types': 7.25.8 + '@babel/template': 7.25.0 + '@babel/types': 7.25.6 debug: 4.3.7(supports-color@5.5.0) globals: 11.12.0 transitivePeerDependencies: @@ -18454,12 +17351,6 @@ snapshots: '@babel/helper-validator-identifier': 7.24.7 to-fast-properties: 2.0.0 - '@babel/types@7.25.8': - dependencies: - '@babel/helper-string-parser': 7.25.7 - '@babel/helper-validator-identifier': 7.25.7 - to-fast-properties: 2.0.0 - '@bcoe/v8-coverage@0.2.3': {} '@bundled-es-modules/cookie@2.0.0': @@ -18528,8 +17419,8 @@ snapshots: fs-extra: 7.0.1 mri: 1.2.0 p-limit: 2.3.0 - package-manager-detector: 0.2.2 - picocolors: 1.1.1 + package-manager-detector: 0.2.0 + picocolors: 1.1.0 resolve-from: 5.0.0 semver: 7.6.3 spawndamnit: 2.0.0 @@ -18553,7 +17444,7 @@ snapshots: dependencies: '@changesets/types': 6.0.0 '@manypkg/get-packages': 1.1.3 - picocolors: 1.1.1 + picocolors: 1.1.0 semver: 7.6.3 '@changesets/get-github-info@0.6.0': @@ -18584,7 +17475,7 @@ snapshots: '@changesets/logger@0.1.1': dependencies: - picocolors: 1.1.1 + picocolors: 1.1.0 '@changesets/parse@0.4.0': dependencies: @@ -18750,11 +17641,11 @@ snapshots: transitivePeerDependencies: - debug - '@codspeed/vitest-plugin@3.1.1(vite@5.4.9(@types/node@22.5.5)(terser@5.36.0))(vitest@2.0.5(@types/node@22.5.5)(@vitest/browser@2.0.5)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@6.0.4))(terser@5.36.0))': + '@codspeed/vitest-plugin@3.1.1(vite@5.4.10(@types/node@22.5.5)(terser@5.34.1))(vitest@2.0.5(@types/node@22.5.5)(@vitest/browser@2.0.5)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@6.0.4))(terser@5.34.1))': dependencies: '@codspeed/core': 3.1.1 - vite: 5.4.9(@types/node@22.5.5)(terser@5.36.0) - vitest: 2.0.5(@types/node@22.5.5)(@vitest/browser@2.0.5)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@6.0.4))(terser@5.36.0) + vite: 5.4.10(@types/node@22.5.5)(terser@5.34.1) + vitest: 2.0.5(@types/node@22.5.5)(@vitest/browser@2.0.5)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@6.0.4))(terser@5.34.1) transitivePeerDependencies: - debug @@ -18767,7 +17658,7 @@ snapshots: eth-json-rpc-filters: 6.0.1 eventemitter3: 5.0.1 keccak: 3.0.4 - preact: 10.24.3 + preact: 10.24.1 sha.js: 2.4.11 transitivePeerDependencies: - supports-color @@ -18871,10 +17762,10 @@ snapshots: '@docsearch/css@3.6.1': {} - '@docsearch/js@3.6.1(@algolia/client-search@4.22.1)(@types/react@18.3.11)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(search-insights@2.11.0)': + '@docsearch/js@3.6.1(@algolia/client-search@4.22.1)(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(search-insights@2.11.0)': dependencies: - '@docsearch/react': 3.6.1(@algolia/client-search@4.22.1)(@types/react@18.3.11)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(search-insights@2.11.0) - preact: 10.24.3 + '@docsearch/react': 3.6.1(@algolia/client-search@4.22.1)(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(search-insights@2.11.0) + preact: 10.24.1 transitivePeerDependencies: - '@algolia/client-search' - '@types/react' @@ -18882,14 +17773,14 @@ snapshots: - react-dom - search-insights - '@docsearch/react@3.6.1(@algolia/client-search@4.22.1)(@types/react@18.3.11)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(search-insights@2.11.0)': + '@docsearch/react@3.6.1(@algolia/client-search@4.22.1)(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(search-insights@2.11.0)': dependencies: '@algolia/autocomplete-core': 1.9.3(@algolia/client-search@4.22.1)(algoliasearch@4.22.1)(search-insights@2.11.0) '@algolia/autocomplete-preset-algolia': 1.9.3(@algolia/client-search@4.22.1)(algoliasearch@4.22.1) '@docsearch/css': 3.6.1 algoliasearch: 4.22.1 optionalDependencies: - '@types/react': 18.3.11 + '@types/react': 18.3.12 react: 18.3.1 react-dom: 18.3.1(react@18.3.1) search-insights: 2.11.0 @@ -19213,7 +18104,7 @@ snapshots: '@eslint/eslintrc@2.1.4': dependencies: ajv: 6.12.6 - debug: 4.3.6 + debug: 4.3.7(supports-color@5.5.0) espree: 9.6.1 globals: 13.23.0 ignore: 5.3.2 @@ -19287,59 +18178,16 @@ snapshots: '@fastify/busboy@2.1.1': {} - '@fuels/connectors@0.27.1(@tanstack/query-core@5.56.2)(@types/react@18.3.11)(@wagmi/connectors@5.1.14(@types/react@18.3.11)(@wagmi/core@2.13.9(@tanstack/query-core@5.56.2)(@types/react@18.3.11)(immer@9.0.21)(react@18.3.1)(typescript@5.6.3)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8)))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.11)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.24.0)(typescript@5.6.3)(utf-8-validate@5.0.10)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8))(bufferutil@4.0.8)(fuels@packages+fuels)(immer@9.0.21)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(utf-8-validate@5.0.10)(vue@3.5.12(typescript@5.6.3))(zod@3.23.8)': + '@fuels/connectors@0.27.1(@tanstack/query-core@5.56.2)(@types/react@18.3.12)(@wagmi/connectors@5.1.14(@types/react@18.3.12)(@wagmi/core@2.14.1(@tanstack/query-core@5.56.2)(@types/react@18.3.12)(immer@9.0.21)(react@18.3.1)(typescript@5.6.3)(use-sync-external-store@1.2.0(react@18.3.1))(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8)))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.12)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.22.5)(typescript@5.6.3)(utf-8-validate@5.0.10)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8))(bufferutil@4.0.8)(fuels@packages+fuels)(immer@9.0.21)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(utf-8-validate@5.0.10)(vue@3.5.12(typescript@5.6.3))(zod@3.23.8)': dependencies: '@ethereumjs/util': 9.0.3 '@ethersproject/bytes': 5.7.0 '@solana/web3.js': 1.93.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) - '@wagmi/core': 2.13.4(@tanstack/query-core@5.56.2)(@types/react@18.3.11)(immer@9.0.21)(react@18.3.1)(typescript@5.6.3)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8)) - '@web3modal/core': 5.0.0(@types/react@18.3.11)(react@18.3.1) - '@web3modal/scaffold': 5.0.0(@types/react@18.3.11)(react@18.3.1) - '@web3modal/solana': 5.0.0(@types/react@18.3.11)(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(utf-8-validate@5.0.10)(vue@3.5.12(typescript@5.6.3)) - '@web3modal/wagmi': 5.0.0(sspqhkod4bnfuztkcao3fpdx6m) - fuels: link:packages/fuels - rpc-websockets: 7.11.0 - socket.io-client: 4.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) - viem: 2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8) - transitivePeerDependencies: - - '@azure/app-configuration' - - '@azure/cosmos' - - '@azure/data-tables' - - '@azure/identity' - - '@azure/keyvault-secrets' - - '@azure/storage-blob' - - '@capacitor/preferences' - - '@netlify/blobs' - - '@planetscale/database' - - '@react-native-async-storage/async-storage' - - '@tanstack/query-core' - - '@types/react' - - '@upstash/redis' - - '@vercel/kv' - - '@wagmi/connectors' - - bufferutil - - encoding - - immer - - ioredis - - react - - react-dom - - supports-color - - typescript - - uWebSockets.js - - utf-8-validate - - vue - - zod - - '@fuels/connectors@0.27.1(@tanstack/query-core@5.56.2)(@types/react@18.3.11)(@wagmi/connectors@5.1.14(@types/react@18.3.11)(@wagmi/core@2.13.9(@tanstack/query-core@5.56.2)(@types/react@18.3.11)(immer@9.0.21)(react@18.3.1)(typescript@5.6.3)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8)))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.8)(@babel/preset-env@7.22.5(@babel/core@7.25.8))(@types/react@18.3.11)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.24.0)(typescript@5.6.3)(utf-8-validate@5.0.10)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8))(bufferutil@4.0.8)(fuels@packages+fuels)(immer@9.0.21)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(utf-8-validate@5.0.10)(vue@3.5.12(typescript@5.6.3))(zod@3.23.8)': - dependencies: - '@ethereumjs/util': 9.0.3 - '@ethersproject/bytes': 5.7.0 - '@solana/web3.js': 1.93.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) - '@wagmi/core': 2.13.4(@tanstack/query-core@5.56.2)(@types/react@18.3.11)(immer@9.0.21)(react@18.3.1)(typescript@5.6.3)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8)) - '@web3modal/core': 5.0.0(@types/react@18.3.11)(react@18.3.1) - '@web3modal/scaffold': 5.0.0(@types/react@18.3.11)(react@18.3.1) - '@web3modal/solana': 5.0.0(@types/react@18.3.11)(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(utf-8-validate@5.0.10)(vue@3.5.12(typescript@5.6.3)) - '@web3modal/wagmi': 5.0.0(s4njjfnugwcf5wzrzy5iqctzlu) + '@wagmi/core': 2.13.4(@tanstack/query-core@5.56.2)(@types/react@18.3.12)(immer@9.0.21)(react@18.3.1)(typescript@5.6.3)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8)) + '@web3modal/core': 5.0.0(@types/react@18.3.12)(react@18.3.1) + '@web3modal/scaffold': 5.0.0(@types/react@18.3.12)(react@18.3.1) + '@web3modal/solana': 5.0.0(@types/react@18.3.12)(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(utf-8-validate@5.0.10)(vue@3.5.12(typescript@5.6.3)) + '@web3modal/wagmi': 5.0.0(lv2wncl7f35mm3jrrc7bwhlvna) fuels: link:packages/fuels rpc-websockets: 7.11.0 socket.io-client: 4.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) @@ -19393,31 +18241,31 @@ snapshots: graphql: 16.9.0 tslib: 2.6.3 - '@graphql-codegen/cli@5.0.3(@parcel/watcher@2.4.1)(@types/node@22.7.7)(bufferutil@4.0.8)(cosmiconfig-toml-loader@1.0.0)(enquirer@2.4.1)(graphql@16.9.0)(typescript@5.6.3)(utf-8-validate@6.0.4)': + '@graphql-codegen/cli@5.0.3(@parcel/watcher@2.4.1)(@types/node@22.7.5)(bufferutil@4.0.8)(cosmiconfig-toml-loader@1.0.0)(enquirer@2.4.1)(graphql@16.9.0)(typescript@5.6.3)(utf-8-validate@6.0.4)': dependencies: - '@babel/generator': 7.25.7 - '@babel/template': 7.25.7 - '@babel/types': 7.25.8 + '@babel/generator': 7.25.6 + '@babel/template': 7.25.0 + '@babel/types': 7.25.6 '@graphql-codegen/client-preset': 4.4.0(graphql@16.9.0) '@graphql-codegen/core': 4.0.2(graphql@16.9.0) '@graphql-codegen/plugin-helpers': 5.0.4(graphql@16.9.0) '@graphql-tools/apollo-engine-loader': 8.0.1(graphql@16.9.0) '@graphql-tools/code-file-loader': 8.1.2(graphql@16.9.0) '@graphql-tools/git-loader': 8.0.6(graphql@16.9.0) - '@graphql-tools/github-loader': 8.0.1(@types/node@22.7.7)(graphql@16.9.0) + '@graphql-tools/github-loader': 8.0.1(@types/node@22.7.5)(graphql@16.9.0) '@graphql-tools/graphql-file-loader': 8.0.1(graphql@16.9.0) '@graphql-tools/json-file-loader': 8.0.1(graphql@16.9.0) '@graphql-tools/load': 8.0.2(graphql@16.9.0) - '@graphql-tools/prisma-loader': 8.0.4(@types/node@22.7.7)(bufferutil@4.0.8)(graphql@16.9.0)(utf-8-validate@6.0.4) - '@graphql-tools/url-loader': 8.0.2(@types/node@22.7.7)(bufferutil@4.0.8)(graphql@16.9.0)(utf-8-validate@6.0.4) + '@graphql-tools/prisma-loader': 8.0.4(@types/node@22.7.5)(bufferutil@4.0.8)(graphql@16.9.0)(utf-8-validate@6.0.4) + '@graphql-tools/url-loader': 8.0.2(@types/node@22.7.5)(bufferutil@4.0.8)(graphql@16.9.0)(utf-8-validate@6.0.4) '@graphql-tools/utils': 10.2.2(graphql@16.9.0) - '@whatwg-node/fetch': 0.9.21 + '@whatwg-node/fetch': 0.9.22 chalk: 4.1.2 cosmiconfig: 8.3.6(typescript@5.6.3) debounce: 1.2.1 detect-indent: 6.1.0 graphql: 16.9.0 - graphql-config: 5.1.3(@types/node@22.7.7)(bufferutil@4.0.8)(cosmiconfig-toml-loader@1.0.0)(graphql@16.9.0)(typescript@5.6.3)(utf-8-validate@6.0.4) + graphql-config: 5.1.3(@types/node@22.7.5)(bufferutil@4.0.8)(cosmiconfig-toml-loader@1.0.0)(graphql@16.9.0)(typescript@5.6.3)(utf-8-validate@6.0.4) inquirer: 8.2.5 is-glob: 4.0.3 jiti: 1.21.6 @@ -19428,7 +18276,7 @@ snapshots: shell-quote: 1.8.1 string-env-interpolation: 1.0.1 ts-log: 2.2.5 - tslib: 2.8.0 + tslib: 2.7.0 yaml: 2.6.0 yargs: 17.7.2 optionalDependencies: @@ -19445,8 +18293,8 @@ snapshots: '@graphql-codegen/client-preset@4.4.0(graphql@16.9.0)': dependencies: - '@babel/helper-plugin-utils': 7.25.7 - '@babel/template': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 + '@babel/template': 7.25.0 '@graphql-codegen/add': 5.0.3(graphql@16.9.0) '@graphql-codegen/gql-tag-operations': 4.0.10(graphql@16.9.0) '@graphql-codegen/plugin-helpers': 5.0.4(graphql@16.9.0) @@ -19647,9 +18495,9 @@ snapshots: dependencies: '@ardatan/sync-fetch': 0.0.1 '@graphql-tools/utils': 10.2.2(graphql@16.9.0) - '@whatwg-node/fetch': 0.9.21 + '@whatwg-node/fetch': 0.9.22 graphql: 16.9.0 - tslib: 2.8.0 + tslib: 2.7.0 transitivePeerDependencies: - encoding @@ -19667,7 +18515,7 @@ snapshots: '@graphql-tools/utils': 10.2.2(graphql@16.9.0) globby: 11.1.0 graphql: 16.9.0 - tslib: 2.8.0 + tslib: 2.7.0 unixify: 1.0.0 transitivePeerDependencies: - supports-color @@ -19701,14 +18549,14 @@ snapshots: - bufferutil - utf-8-validate - '@graphql-tools/executor-http@1.0.9(@types/node@22.7.7)(graphql@16.9.0)': + '@graphql-tools/executor-http@1.0.9(@types/node@22.7.5)(graphql@16.9.0)': dependencies: '@graphql-tools/utils': 10.2.2(graphql@16.9.0) '@repeaterjs/repeater': 3.0.4 - '@whatwg-node/fetch': 0.9.21 + '@whatwg-node/fetch': 0.9.22 extract-files: 11.0.0 graphql: 16.9.0 - meros: 1.3.0(@types/node@22.7.7) + meros: 1.3.0(@types/node@22.7.5) tslib: 2.8.0 value-or-promise: 1.0.12 transitivePeerDependencies: @@ -19742,20 +18590,20 @@ snapshots: graphql: 16.9.0 is-glob: 4.0.3 micromatch: 4.0.8 - tslib: 2.8.0 + tslib: 2.7.0 unixify: 1.0.0 transitivePeerDependencies: - supports-color - '@graphql-tools/github-loader@8.0.1(@types/node@22.7.7)(graphql@16.9.0)': + '@graphql-tools/github-loader@8.0.1(@types/node@22.7.5)(graphql@16.9.0)': dependencies: '@ardatan/sync-fetch': 0.0.1 - '@graphql-tools/executor-http': 1.0.9(@types/node@22.7.7)(graphql@16.9.0) + '@graphql-tools/executor-http': 1.0.9(@types/node@22.7.5)(graphql@16.9.0) '@graphql-tools/graphql-tag-pluck': 8.3.1(graphql@16.9.0) '@graphql-tools/utils': 10.2.2(graphql@16.9.0) - '@whatwg-node/fetch': 0.9.21 + '@whatwg-node/fetch': 0.9.22 graphql: 16.9.0 - tslib: 2.8.0 + tslib: 2.7.0 value-or-promise: 1.0.12 transitivePeerDependencies: - '@types/node' @@ -19768,16 +18616,16 @@ snapshots: '@graphql-tools/utils': 10.2.2(graphql@16.9.0) globby: 11.1.0 graphql: 16.9.0 - tslib: 2.8.0 + tslib: 2.7.0 unixify: 1.0.0 '@graphql-tools/graphql-tag-pluck@8.3.1(graphql@16.9.0)': dependencies: - '@babel/core': 7.25.8 - '@babel/parser': 7.25.8 - '@babel/plugin-syntax-import-assertions': 7.22.5(@babel/core@7.25.8) - '@babel/traverse': 7.25.7 - '@babel/types': 7.25.8 + '@babel/core': 7.25.2 + '@babel/parser': 7.25.6 + '@babel/plugin-syntax-import-assertions': 7.22.5(@babel/core@7.25.2) + '@babel/traverse': 7.25.6 + '@babel/types': 7.25.6 '@graphql-tools/utils': 10.2.2(graphql@16.9.0) graphql: 16.9.0 tslib: 2.8.0 @@ -19796,7 +18644,7 @@ snapshots: '@graphql-tools/utils': 10.2.2(graphql@16.9.0) globby: 11.1.0 graphql: 16.9.0 - tslib: 2.8.0 + tslib: 2.7.0 unixify: 1.0.0 '@graphql-tools/load@8.0.2(graphql@16.9.0)': @@ -19805,7 +18653,7 @@ snapshots: '@graphql-tools/utils': 10.2.2(graphql@16.9.0) graphql: 16.9.0 p-limit: 3.1.0 - tslib: 2.8.0 + tslib: 2.7.0 '@graphql-tools/merge@9.0.4(graphql@16.9.0)': dependencies: @@ -19823,12 +18671,12 @@ snapshots: graphql: 16.9.0 tslib: 2.8.0 - '@graphql-tools/prisma-loader@8.0.4(@types/node@22.7.7)(bufferutil@4.0.8)(graphql@16.9.0)(utf-8-validate@6.0.4)': + '@graphql-tools/prisma-loader@8.0.4(@types/node@22.7.5)(bufferutil@4.0.8)(graphql@16.9.0)(utf-8-validate@6.0.4)': dependencies: - '@graphql-tools/url-loader': 8.0.2(@types/node@22.7.7)(bufferutil@4.0.8)(graphql@16.9.0)(utf-8-validate@6.0.4) + '@graphql-tools/url-loader': 8.0.2(@types/node@22.7.5)(bufferutil@4.0.8)(graphql@16.9.0)(utf-8-validate@6.0.4) '@graphql-tools/utils': 10.2.2(graphql@16.9.0) '@types/js-yaml': 4.0.5 - '@whatwg-node/fetch': 0.9.21 + '@whatwg-node/fetch': 0.9.22 chalk: 4.1.2 debug: 4.3.7(supports-color@5.5.0) dotenv: 16.4.5 @@ -19840,7 +18688,7 @@ snapshots: js-yaml: 4.1.0 lodash: 4.17.21 scuid: 1.1.0 - tslib: 2.8.0 + tslib: 2.7.0 yaml-ast-parser: 0.0.43 transitivePeerDependencies: - '@types/node' @@ -19877,20 +18725,20 @@ snapshots: tslib: 2.8.0 value-or-promise: 1.0.12 - '@graphql-tools/url-loader@8.0.2(@types/node@22.7.7)(bufferutil@4.0.8)(graphql@16.9.0)(utf-8-validate@6.0.4)': + '@graphql-tools/url-loader@8.0.2(@types/node@22.7.5)(bufferutil@4.0.8)(graphql@16.9.0)(utf-8-validate@6.0.4)': dependencies: '@ardatan/sync-fetch': 0.0.1 '@graphql-tools/delegate': 10.0.11(graphql@16.9.0) '@graphql-tools/executor-graphql-ws': 1.1.2(bufferutil@4.0.8)(graphql@16.9.0)(utf-8-validate@6.0.4) - '@graphql-tools/executor-http': 1.0.9(@types/node@22.7.7)(graphql@16.9.0) + '@graphql-tools/executor-http': 1.0.9(@types/node@22.7.5)(graphql@16.9.0) '@graphql-tools/executor-legacy-ws': 1.0.6(bufferutil@4.0.8)(graphql@16.9.0)(utf-8-validate@6.0.4) '@graphql-tools/utils': 10.2.2(graphql@16.9.0) '@graphql-tools/wrap': 10.0.5(graphql@16.9.0) '@types/ws': 8.5.12 - '@whatwg-node/fetch': 0.9.21 + '@whatwg-node/fetch': 0.9.22 graphql: 16.9.0 isomorphic-ws: 5.0.0(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.4)) - tslib: 2.8.0 + tslib: 2.7.0 value-or-promise: 1.0.12 ws: 8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.4) transitivePeerDependencies: @@ -19905,7 +18753,7 @@ snapshots: cross-inspect: 1.0.0 dset: 3.1.2 graphql: 16.9.0 - tslib: 2.8.0 + tslib: 2.7.0 '@graphql-tools/utils@8.13.1(graphql@16.9.0)': dependencies: @@ -19940,7 +18788,7 @@ snapshots: '@humanwhocodes/config-array@0.11.14': dependencies: '@humanwhocodes/object-schema': 2.0.3 - debug: 4.3.6 + debug: 4.3.7(supports-color@5.5.0) minimatch: 3.1.2 transitivePeerDependencies: - supports-color @@ -19949,7 +18797,7 @@ snapshots: '@humanwhocodes/object-schema@2.0.3': {} - '@humanwhocodes/retry@0.3.1': {} + '@humanwhocodes/retry@0.3.0': {} '@iarna/toml@2.2.5': {} @@ -19963,7 +18811,7 @@ snapshots: '@inquirer/figures': 1.0.6 '@inquirer/type': 2.0.0 '@types/mute-stream': 0.0.4 - '@types/node': 22.7.7 + '@types/node': 22.5.5 '@types/wrap-ansi': 3.0.0 ansi-escapes: 4.3.2 cli-width: 4.1.0 @@ -20012,7 +18860,7 @@ snapshots: '@jest/console@27.5.1': dependencies: '@jest/types': 27.5.1 - '@types/node': 22.7.7 + '@types/node': 22.7.4 chalk: 4.1.2 jest-message-util: 27.5.1 jest-util: 27.5.1 @@ -20021,27 +18869,27 @@ snapshots: '@jest/console@28.1.3': dependencies: '@jest/types': 28.1.3 - '@types/node': 22.7.7 + '@types/node': 22.7.5 chalk: 4.1.2 jest-message-util: 28.1.3 jest-util: 28.1.3 slash: 3.0.0 - '@jest/core@27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.5.5)(typescript@5.6.3))(utf-8-validate@5.0.10)': + '@jest/core@27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.3))(utf-8-validate@5.0.10)': dependencies: '@jest/console': 27.5.1 '@jest/reporters': 27.5.1 '@jest/test-result': 27.5.1 '@jest/transform': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 22.7.7 + '@types/node': 22.5.5 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.8.1 exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 27.5.1 - jest-config: 27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.5.5)(typescript@5.6.3))(utf-8-validate@5.0.10) + jest-config: 27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.3))(utf-8-validate@5.0.10) jest-haste-map: 27.5.1 jest-message-util: 27.5.1 jest-regex-util: 27.5.1 @@ -20072,14 +18920,14 @@ snapshots: dependencies: '@jest/fake-timers': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 22.7.7 + '@types/node': 22.7.4 jest-mock: 27.5.1 '@jest/environment@29.7.0': dependencies: '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.7.7 + '@types/node': 22.7.5 jest-mock: 29.7.0 '@jest/expect-utils@29.5.0': @@ -20090,7 +18938,7 @@ snapshots: dependencies: '@jest/types': 27.5.1 '@sinonjs/fake-timers': 8.1.0 - '@types/node': 22.7.7 + '@types/node': 22.7.4 jest-message-util: 27.5.1 jest-mock: 27.5.1 jest-util: 27.5.1 @@ -20099,7 +18947,7 @@ snapshots: dependencies: '@jest/types': 29.6.3 '@sinonjs/fake-timers': 10.3.0 - '@types/node': 22.7.7 + '@types/node': 22.7.5 jest-message-util: 29.7.0 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -20117,7 +18965,7 @@ snapshots: '@jest/test-result': 27.5.1 '@jest/transform': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 22.7.7 + '@types/node': 22.7.4 chalk: 4.1.2 collect-v8-coverage: 1.0.1 exit: 0.1.2 @@ -20165,7 +19013,7 @@ snapshots: dependencies: '@jest/console': 28.1.3 '@jest/types': 28.1.3 - '@types/istanbul-lib-coverage': 2.0.4 + '@types/istanbul-lib-coverage': 2.0.6 collect-v8-coverage: 1.0.1 '@jest/test-sequencer@27.5.1': @@ -20179,7 +19027,7 @@ snapshots: '@jest/transform@27.5.1': dependencies: - '@babel/core': 7.25.8 + '@babel/core': 7.25.2 '@jest/types': 27.5.1 babel-plugin-istanbul: 6.1.1 chalk: 4.1.2 @@ -20201,7 +19049,7 @@ snapshots: dependencies: '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 22.7.7 + '@types/node': 22.7.5 '@types/yargs': 15.0.19 chalk: 4.1.2 @@ -20209,17 +19057,17 @@ snapshots: dependencies: '@types/istanbul-lib-coverage': 2.0.4 '@types/istanbul-reports': 3.0.1 - '@types/node': 22.7.7 + '@types/node': 22.5.5 '@types/yargs': 16.0.5 chalk: 4.1.2 '@jest/types@28.1.3': dependencies: '@jest/schemas': 28.1.3 - '@types/istanbul-lib-coverage': 2.0.4 - '@types/istanbul-reports': 3.0.1 - '@types/node': 22.7.7 - '@types/yargs': 17.0.24 + '@types/istanbul-lib-coverage': 2.0.6 + '@types/istanbul-reports': 3.0.4 + '@types/node': 22.7.5 + '@types/yargs': 17.0.33 chalk: 4.1.2 '@jest/types@29.6.3': @@ -20227,7 +19075,7 @@ snapshots: '@jest/schemas': 29.6.3 '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 22.7.7 + '@types/node': 22.5.5 '@types/yargs': 17.0.33 chalk: 4.1.2 @@ -20316,14 +19164,14 @@ snapshots: '@manypkg/find-root@1.1.0': dependencies: - '@babel/runtime': 7.25.7 + '@babel/runtime': 7.25.4 '@types/node': 12.20.55 find-up: 4.1.0 fs-extra: 8.1.0 '@manypkg/get-packages@1.1.3': dependencies: - '@babel/runtime': 7.25.7 + '@babel/runtime': 7.25.4 '@changesets/types': 4.1.0 '@manypkg/find-root': 1.1.0 fs-extra: 8.1.0 @@ -20333,7 +19181,7 @@ snapshots: '@metamask/eth-json-rpc-provider@1.0.1': dependencies: '@metamask/json-rpc-engine': 7.3.3 - '@metamask/safe-event-emitter': 3.1.2 + '@metamask/safe-event-emitter': 3.1.1 '@metamask/utils': 5.0.2 transitivePeerDependencies: - supports-color @@ -20341,7 +19189,7 @@ snapshots: '@metamask/json-rpc-engine@7.3.3': dependencies: '@metamask/rpc-errors': 6.4.0 - '@metamask/safe-event-emitter': 3.1.2 + '@metamask/safe-event-emitter': 3.1.1 '@metamask/utils': 8.5.0 transitivePeerDependencies: - supports-color @@ -20349,7 +19197,7 @@ snapshots: '@metamask/json-rpc-engine@8.0.2': dependencies: '@metamask/rpc-errors': 6.4.0 - '@metamask/safe-event-emitter': 3.1.2 + '@metamask/safe-event-emitter': 3.1.1 '@metamask/utils': 8.5.0 transitivePeerDependencies: - supports-color @@ -20357,7 +19205,7 @@ snapshots: '@metamask/json-rpc-middleware-stream@7.0.2': dependencies: '@metamask/json-rpc-engine': 8.0.2 - '@metamask/safe-event-emitter': 3.1.2 + '@metamask/safe-event-emitter': 3.1.1 '@metamask/utils': 8.5.0 readable-stream: 3.6.2 transitivePeerDependencies: @@ -20378,7 +19226,7 @@ snapshots: '@metamask/json-rpc-middleware-stream': 7.0.2 '@metamask/object-multiplex': 2.0.0 '@metamask/rpc-errors': 6.4.0 - '@metamask/safe-event-emitter': 3.1.2 + '@metamask/safe-event-emitter': 3.1.1 '@metamask/utils': 8.5.0 detect-browser: 5.3.0 extension-port-stream: 3.0.0 @@ -20391,14 +19239,14 @@ snapshots: '@metamask/rpc-errors@6.4.0': dependencies: - '@metamask/utils': 9.3.0 + '@metamask/utils': 9.2.1 fast-safe-stringify: 2.1.1 transitivePeerDependencies: - supports-color '@metamask/safe-event-emitter@2.0.0': {} - '@metamask/safe-event-emitter@3.1.2': {} + '@metamask/safe-event-emitter@3.1.1': {} '@metamask/sdk-communication-layer@0.28.2(cross-fetch@4.0.0)(eciesjs@0.3.20)(eventemitter2@6.4.9)(readable-stream@3.6.2)(socket.io-client@4.7.5(bufferutil@4.0.8)(utf-8-validate@5.0.10))': dependencies: @@ -20415,30 +19263,21 @@ snapshots: transitivePeerDependencies: - supports-color - '@metamask/sdk-install-modal-web@0.28.1(i18next@23.11.5)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.11)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)': + '@metamask/sdk-install-modal-web@0.28.1(i18next@23.11.5)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.12)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)': dependencies: i18next: 23.11.5 qr-code-styling: 1.6.0-rc.1 optionalDependencies: react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - react-native: 0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.11)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10) + react-native: 0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.12)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10) - '@metamask/sdk-install-modal-web@0.28.1(i18next@23.11.5)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.8)(@babel/preset-env@7.22.5(@babel/core@7.25.8))(@types/react@18.3.11)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)': - dependencies: - i18next: 23.11.5 - qr-code-styling: 1.6.0-rc.1 - optionalDependencies: - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) - react-native: 0.74.1(@babel/core@7.25.8)(@babel/preset-env@7.22.5(@babel/core@7.25.8))(@types/react@18.3.11)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10) - - '@metamask/sdk@0.28.4(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.11)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.24.0)(utf-8-validate@5.0.10)': + '@metamask/sdk@0.28.4(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.12)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.22.5)(utf-8-validate@5.0.10)': dependencies: '@metamask/onboarding': 1.0.1 '@metamask/providers': 16.1.0 '@metamask/sdk-communication-layer': 0.28.2(cross-fetch@4.0.0)(eciesjs@0.3.20)(eventemitter2@6.4.9)(readable-stream@3.6.2)(socket.io-client@4.7.5(bufferutil@4.0.8)(utf-8-validate@5.0.10)) - '@metamask/sdk-install-modal-web': 0.28.1(i18next@23.11.5)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.11)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1) + '@metamask/sdk-install-modal-web': 0.28.1(i18next@23.11.5)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.12)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1) '@types/dom-screen-wake-lock': 1.0.3 '@types/uuid': 10.0.0 bowser: 2.11.0 @@ -20452,45 +19291,9 @@ snapshots: obj-multiplex: 1.0.0 pump: 3.0.0 qrcode-terminal-nooctal: 0.12.1 - react-native-webview: 11.26.1(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.11)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1) + react-native-webview: 11.26.1(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.12)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1) readable-stream: 3.6.2 - rollup-plugin-visualizer: 5.12.0(rollup@4.24.0) - socket.io-client: 4.7.5(bufferutil@4.0.8)(utf-8-validate@5.0.10) - util: 0.12.5 - uuid: 8.3.2 - optionalDependencies: - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) - transitivePeerDependencies: - - bufferutil - - encoding - - react-native - - rollup - - supports-color - - utf-8-validate - - '@metamask/sdk@0.28.4(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.8)(@babel/preset-env@7.22.5(@babel/core@7.25.8))(@types/react@18.3.11)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.24.0)(utf-8-validate@5.0.10)': - dependencies: - '@metamask/onboarding': 1.0.1 - '@metamask/providers': 16.1.0 - '@metamask/sdk-communication-layer': 0.28.2(cross-fetch@4.0.0)(eciesjs@0.3.20)(eventemitter2@6.4.9)(readable-stream@3.6.2)(socket.io-client@4.7.5(bufferutil@4.0.8)(utf-8-validate@5.0.10)) - '@metamask/sdk-install-modal-web': 0.28.1(i18next@23.11.5)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.8)(@babel/preset-env@7.22.5(@babel/core@7.25.8))(@types/react@18.3.11)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1) - '@types/dom-screen-wake-lock': 1.0.3 - '@types/uuid': 10.0.0 - bowser: 2.11.0 - cross-fetch: 4.0.0 - debug: 4.3.7(supports-color@5.5.0) - eciesjs: 0.3.20 - eth-rpc-errors: 4.0.3 - eventemitter2: 6.4.9 - i18next: 23.11.5 - i18next-browser-languagedetector: 7.1.0 - obj-multiplex: 1.0.0 - pump: 3.0.0 - qrcode-terminal-nooctal: 0.12.1 - react-native-webview: 11.26.1(react-native@0.74.1(@babel/core@7.25.8)(@babel/preset-env@7.22.5(@babel/core@7.25.8))(@types/react@18.3.11)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1) - readable-stream: 3.6.2 - rollup-plugin-visualizer: 5.12.0(rollup@4.24.0) + rollup-plugin-visualizer: 5.12.0(rollup@4.22.5) socket.io-client: 4.7.5(bufferutil@4.0.8)(utf-8-validate@5.0.10) util: 0.12.5 uuid: 8.3.2 @@ -20531,7 +19334,7 @@ snapshots: transitivePeerDependencies: - supports-color - '@metamask/utils@9.3.0': + '@metamask/utils@9.2.1': dependencies: '@ethereumjs/tx': 4.2.0 '@metamask/superstruct': 3.1.0 @@ -20800,28 +19603,28 @@ snapshots: '@open-draft/until@2.1.0': {} - '@oven/bun-darwin-aarch64@1.1.31': + '@oven/bun-darwin-aarch64@1.1.32': optional: true - '@oven/bun-darwin-x64-baseline@1.1.31': + '@oven/bun-darwin-x64-baseline@1.1.32': optional: true - '@oven/bun-darwin-x64@1.1.31': + '@oven/bun-darwin-x64@1.1.32': optional: true - '@oven/bun-linux-aarch64@1.1.31': + '@oven/bun-linux-aarch64@1.1.32': optional: true - '@oven/bun-linux-x64-baseline@1.1.31': + '@oven/bun-linux-x64-baseline@1.1.32': optional: true - '@oven/bun-linux-x64@1.1.31': + '@oven/bun-linux-x64@1.1.32': optional: true - '@oven/bun-windows-x64-baseline@1.1.31': + '@oven/bun-windows-x64-baseline@1.1.32': optional: true - '@oven/bun-windows-x64@1.1.31': + '@oven/bun-windows-x64@1.1.32': optional: true '@parcel/watcher-android-arm64@2.4.1': @@ -20894,7 +19697,7 @@ snapshots: dependencies: playwright: 1.47.2 - '@pmmmwh/react-refresh-webpack-plugin@0.5.10(react-refresh@0.11.0)(type-fest@3.1.0)(webpack-dev-server@4.15.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)))(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19))': + '@pmmmwh/react-refresh-webpack-plugin@0.5.10(react-refresh@0.11.0)(type-fest@3.1.0)(webpack-dev-server@4.15.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)))(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19))': dependencies: ansi-html-community: 0.0.8 common-path-prefix: 3.0.0 @@ -20906,10 +19709,10 @@ snapshots: react-refresh: 0.11.0 schema-utils: 3.3.0 source-map: 0.7.4 - webpack: 5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19) + webpack: 5.88.0(@swc/core@1.7.14)(esbuild@0.17.19) optionalDependencies: type-fest: 3.1.0 - webpack-dev-server: 4.15.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)) + webpack-dev-server: 4.15.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)) '@polka/url@1.0.0-next.24': {} @@ -21053,7 +19856,7 @@ snapshots: '@radix-ui/react-use-callback-ref@1.0.1(@types/react@18.3.1)(react@18.3.1)': dependencies: - '@babel/runtime': 7.25.4 + '@babel/runtime': 7.25.6 react: 18.3.1 optionalDependencies: '@types/react': 18.3.1 @@ -21068,7 +19871,7 @@ snapshots: '@radix-ui/react-use-escape-keydown@1.0.3(@types/react@18.3.1)(react@18.3.1)': dependencies: - '@babel/runtime': 7.25.4 + '@babel/runtime': 7.25.6 '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@18.3.1)(react@18.3.1) react: 18.3.1 optionalDependencies: @@ -21076,7 +19879,7 @@ snapshots: '@radix-ui/react-use-layout-effect@1.0.1(@types/react@18.3.1)(react@18.3.1)': dependencies: - '@babel/runtime': 7.25.4 + '@babel/runtime': 7.25.6 react: 18.3.1 optionalDependencies: '@types/react': 18.3.1 @@ -21237,19 +20040,12 @@ snapshots: - '@babel/preset-env' - supports-color - '@react-native/babel-plugin-codegen@0.74.83(@babel/preset-env@7.22.5(@babel/core@7.25.8))': - dependencies: - '@react-native/codegen': 0.74.83(@babel/preset-env@7.22.5(@babel/core@7.25.8)) - transitivePeerDependencies: - - '@babel/preset-env' - - supports-color - '@react-native/babel-preset@0.74.83(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))': dependencies: '@babel/core': 7.25.2 '@babel/plugin-proposal-async-generator-functions': 7.20.7(@babel/core@7.25.2) '@babel/plugin-proposal-class-properties': 7.18.6(@babel/core@7.25.2) - '@babel/plugin-proposal-export-default-from': 7.25.8(@babel/core@7.25.2) + '@babel/plugin-proposal-export-default-from': 7.24.7(@babel/core@7.25.2) '@babel/plugin-proposal-logical-assignment-operators': 7.20.7(@babel/core@7.25.2) '@babel/plugin-proposal-nullish-coalescing-operator': 7.18.6(@babel/core@7.25.2) '@babel/plugin-proposal-numeric-separator': 7.18.6(@babel/core@7.25.2) @@ -21257,35 +20053,35 @@ snapshots: '@babel/plugin-proposal-optional-catch-binding': 7.18.6(@babel/core@7.25.2) '@babel/plugin-proposal-optional-chaining': 7.21.0(@babel/core@7.25.2) '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.25.2) - '@babel/plugin-syntax-export-default-from': 7.25.7(@babel/core@7.25.2) - '@babel/plugin-syntax-flow': 7.25.7(@babel/core@7.25.2) + '@babel/plugin-syntax-export-default-from': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-syntax-flow': 7.24.7(@babel/core@7.25.2) '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.25.2) '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.25.2) - '@babel/plugin-transform-arrow-functions': 7.25.7(@babel/core@7.25.2) - '@babel/plugin-transform-async-to-generator': 7.25.7(@babel/core@7.25.2) - '@babel/plugin-transform-block-scoping': 7.25.7(@babel/core@7.25.2) - '@babel/plugin-transform-classes': 7.25.7(@babel/core@7.25.2) - '@babel/plugin-transform-computed-properties': 7.25.7(@babel/core@7.25.2) - '@babel/plugin-transform-destructuring': 7.25.7(@babel/core@7.25.2) - '@babel/plugin-transform-flow-strip-types': 7.25.7(@babel/core@7.25.2) - '@babel/plugin-transform-function-name': 7.25.7(@babel/core@7.25.2) - '@babel/plugin-transform-literals': 7.25.7(@babel/core@7.25.2) - '@babel/plugin-transform-modules-commonjs': 7.25.7(@babel/core@7.25.2) - '@babel/plugin-transform-named-capturing-groups-regex': 7.25.7(@babel/core@7.25.2) - '@babel/plugin-transform-parameters': 7.25.7(@babel/core@7.25.2) - '@babel/plugin-transform-private-methods': 7.25.7(@babel/core@7.25.2) - '@babel/plugin-transform-private-property-in-object': 7.25.8(@babel/core@7.25.2) - '@babel/plugin-transform-react-display-name': 7.25.7(@babel/core@7.25.2) - '@babel/plugin-transform-react-jsx': 7.25.7(@babel/core@7.25.2) - '@babel/plugin-transform-react-jsx-self': 7.25.7(@babel/core@7.25.2) - '@babel/plugin-transform-react-jsx-source': 7.25.7(@babel/core@7.25.2) - '@babel/plugin-transform-runtime': 7.25.7(@babel/core@7.25.2) - '@babel/plugin-transform-shorthand-properties': 7.25.7(@babel/core@7.25.2) - '@babel/plugin-transform-spread': 7.25.7(@babel/core@7.25.2) - '@babel/plugin-transform-sticky-regex': 7.25.7(@babel/core@7.25.2) - '@babel/plugin-transform-typescript': 7.25.7(@babel/core@7.25.2) - '@babel/plugin-transform-unicode-regex': 7.25.7(@babel/core@7.25.2) - '@babel/template': 7.25.7 + '@babel/plugin-transform-arrow-functions': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-transform-async-to-generator': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-transform-block-scoping': 7.25.0(@babel/core@7.25.2) + '@babel/plugin-transform-classes': 7.25.4(@babel/core@7.25.2) + '@babel/plugin-transform-computed-properties': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-transform-destructuring': 7.24.8(@babel/core@7.25.2) + '@babel/plugin-transform-flow-strip-types': 7.25.2(@babel/core@7.25.2) + '@babel/plugin-transform-function-name': 7.25.1(@babel/core@7.25.2) + '@babel/plugin-transform-literals': 7.25.2(@babel/core@7.25.2) + '@babel/plugin-transform-modules-commonjs': 7.24.8(@babel/core@7.25.2) + '@babel/plugin-transform-named-capturing-groups-regex': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-transform-parameters': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-transform-private-methods': 7.25.4(@babel/core@7.25.2) + '@babel/plugin-transform-private-property-in-object': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-transform-react-display-name': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-transform-react-jsx': 7.25.2(@babel/core@7.25.2) + '@babel/plugin-transform-react-jsx-self': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-transform-react-jsx-source': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-transform-runtime': 7.25.4(@babel/core@7.25.2) + '@babel/plugin-transform-shorthand-properties': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-transform-spread': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-transform-sticky-regex': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-transform-typescript': 7.25.2(@babel/core@7.25.2) + '@babel/plugin-transform-unicode-regex': 7.24.7(@babel/core@7.25.2) + '@babel/template': 7.25.0 '@react-native/babel-plugin-codegen': 0.74.83(@babel/preset-env@7.22.5(@babel/core@7.25.2)) babel-plugin-transform-flow-enums: 0.0.2(@babel/core@7.25.2) react-refresh: 0.14.2 @@ -21293,58 +20089,9 @@ snapshots: - '@babel/preset-env' - supports-color - '@react-native/babel-preset@0.74.83(@babel/core@7.25.8)(@babel/preset-env@7.22.5(@babel/core@7.25.8))': - dependencies: - '@babel/core': 7.25.8 - '@babel/plugin-proposal-async-generator-functions': 7.20.7(@babel/core@7.25.8) - '@babel/plugin-proposal-class-properties': 7.18.6(@babel/core@7.25.8) - '@babel/plugin-proposal-export-default-from': 7.25.8(@babel/core@7.25.8) - '@babel/plugin-proposal-logical-assignment-operators': 7.20.7(@babel/core@7.25.8) - '@babel/plugin-proposal-nullish-coalescing-operator': 7.18.6(@babel/core@7.25.8) - '@babel/plugin-proposal-numeric-separator': 7.18.6(@babel/core@7.25.8) - '@babel/plugin-proposal-object-rest-spread': 7.20.7(@babel/core@7.25.8) - '@babel/plugin-proposal-optional-catch-binding': 7.18.6(@babel/core@7.25.8) - '@babel/plugin-proposal-optional-chaining': 7.21.0(@babel/core@7.25.8) - '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.25.8) - '@babel/plugin-syntax-export-default-from': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-syntax-flow': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.25.8) - '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.25.8) - '@babel/plugin-transform-arrow-functions': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-async-to-generator': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-block-scoping': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-classes': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-computed-properties': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-destructuring': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-flow-strip-types': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-function-name': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-literals': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-modules-commonjs': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-named-capturing-groups-regex': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-parameters': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-private-methods': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-private-property-in-object': 7.25.8(@babel/core@7.25.8) - '@babel/plugin-transform-react-display-name': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-react-jsx': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-react-jsx-self': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-react-jsx-source': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-runtime': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-shorthand-properties': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-spread': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-sticky-regex': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-typescript': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-unicode-regex': 7.25.7(@babel/core@7.25.8) - '@babel/template': 7.25.7 - '@react-native/babel-plugin-codegen': 0.74.83(@babel/preset-env@7.22.5(@babel/core@7.25.8)) - babel-plugin-transform-flow-enums: 0.0.2(@babel/core@7.25.8) - react-refresh: 0.14.2 - transitivePeerDependencies: - - '@babel/preset-env' - - supports-color - '@react-native/codegen@0.74.83(@babel/preset-env@7.22.5(@babel/core@7.25.2))': dependencies: - '@babel/parser': 7.25.8 + '@babel/parser': 7.25.6 '@babel/preset-env': 7.22.5(@babel/core@7.25.2) glob: 7.2.3 hermes-parser: 0.19.1 @@ -21355,19 +20102,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@react-native/codegen@0.74.83(@babel/preset-env@7.22.5(@babel/core@7.25.8))': - dependencies: - '@babel/parser': 7.25.8 - '@babel/preset-env': 7.22.5(@babel/core@7.25.8) - glob: 7.2.3 - hermes-parser: 0.19.1 - invariant: 2.2.4 - jscodeshift: 0.14.0(@babel/preset-env@7.22.5(@babel/core@7.25.8)) - mkdirp: 0.5.6 - nullthrows: 1.1.1 - transitivePeerDependencies: - - supports-color - '@react-native/community-cli-plugin@0.74.83(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: '@react-native-community/cli-server-api': 13.6.6(bufferutil@4.0.8)(utf-8-validate@5.0.10) @@ -21390,28 +20124,6 @@ snapshots: - supports-color - utf-8-validate - '@react-native/community-cli-plugin@0.74.83(@babel/core@7.25.8)(@babel/preset-env@7.22.5(@babel/core@7.25.8))(bufferutil@4.0.8)(utf-8-validate@5.0.10)': - dependencies: - '@react-native-community/cli-server-api': 13.6.6(bufferutil@4.0.8)(utf-8-validate@5.0.10) - '@react-native-community/cli-tools': 13.6.6 - '@react-native/dev-middleware': 0.74.83(bufferutil@4.0.8)(utf-8-validate@5.0.10) - '@react-native/metro-babel-transformer': 0.74.83(@babel/core@7.25.8)(@babel/preset-env@7.22.5(@babel/core@7.25.8)) - chalk: 4.1.2 - execa: 5.1.1 - metro: 0.80.12(bufferutil@4.0.8)(utf-8-validate@5.0.10) - metro-config: 0.80.12(bufferutil@4.0.8)(utf-8-validate@5.0.10) - metro-core: 0.80.12 - node-fetch: 2.7.0 - querystring: 0.2.1 - readline: 1.3.0 - transitivePeerDependencies: - - '@babel/core' - - '@babel/preset-env' - - bufferutil - - encoding - - supports-color - - utf-8-validate - '@react-native/debugger-frontend@0.74.83': {} '@react-native/dev-middleware@0.74.83(bufferutil@4.0.8)(utf-8-validate@5.0.10)': @@ -21449,41 +20161,22 @@ snapshots: - '@babel/preset-env' - supports-color - '@react-native/metro-babel-transformer@0.74.83(@babel/core@7.25.8)(@babel/preset-env@7.22.5(@babel/core@7.25.8))': - dependencies: - '@babel/core': 7.25.8 - '@react-native/babel-preset': 0.74.83(@babel/core@7.25.8)(@babel/preset-env@7.22.5(@babel/core@7.25.8)) - hermes-parser: 0.19.1 - nullthrows: 1.1.1 - transitivePeerDependencies: - - '@babel/preset-env' - - supports-color - '@react-native/normalize-colors@0.74.83': {} - '@react-native/virtualized-lists@0.74.83(@types/react@18.3.11)(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.11)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)': - dependencies: - invariant: 2.2.4 - nullthrows: 1.1.1 - react: 18.3.1 - react-native: 0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.11)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10) - optionalDependencies: - '@types/react': 18.3.11 - - '@react-native/virtualized-lists@0.74.83(@types/react@18.3.11)(react-native@0.74.1(@babel/core@7.25.8)(@babel/preset-env@7.22.5(@babel/core@7.25.8))(@types/react@18.3.11)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)': + '@react-native/virtualized-lists@0.74.83(@types/react@18.3.12)(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.12)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)': dependencies: invariant: 2.2.4 nullthrows: 1.1.1 react: 18.3.1 - react-native: 0.74.1(@babel/core@7.25.8)(@babel/preset-env@7.22.5(@babel/core@7.25.8))(@types/react@18.3.11)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10) + react-native: 0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.12)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10) optionalDependencies: - '@types/react': 18.3.11 + '@types/react': 18.3.12 '@repeaterjs/repeater@3.0.4': {} '@rnx-kit/chromium-edge-launcher@1.0.0': dependencies: - '@types/node': 18.19.57 + '@types/node': 18.19.54 escape-string-regexp: 4.0.0 is-wsl: 2.2.0 lighthouse-logger: 1.4.2 @@ -21492,10 +20185,10 @@ snapshots: transitivePeerDependencies: - supports-color - '@rollup/plugin-babel@5.3.1(@babel/core@7.25.8)(@types/babel__core@7.20.5)(rollup@2.79.2)': + '@rollup/plugin-babel@5.3.1(@babel/core@7.25.2)(@types/babel__core@7.20.5)(rollup@2.79.2)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-module-imports': 7.25.7 + '@babel/core': 7.25.2 + '@babel/helper-module-imports': 7.24.7 '@rollup/pluginutils': 3.1.0(rollup@2.79.2) rollup: 2.79.2 optionalDependencies: @@ -21503,13 +20196,13 @@ snapshots: transitivePeerDependencies: - supports-color - '@rollup/plugin-inject@5.0.5(rollup@4.24.0)': + '@rollup/plugin-inject@5.0.5(rollup@4.22.5)': dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.24.0) + '@rollup/pluginutils': 5.1.0(rollup@4.22.5) estree-walker: 2.0.2 magic-string: 0.30.11 optionalDependencies: - rollup: 4.24.0 + rollup: 4.22.5 '@rollup/plugin-node-resolve@11.2.1(rollup@2.79.2)': dependencies: @@ -21534,60 +20227,60 @@ snapshots: picomatch: 2.3.1 rollup: 2.79.2 - '@rollup/pluginutils@5.1.0(rollup@4.24.0)': + '@rollup/pluginutils@5.1.0(rollup@4.22.5)': dependencies: '@types/estree': 1.0.6 estree-walker: 2.0.2 picomatch: 2.3.1 optionalDependencies: - rollup: 4.24.0 + rollup: 4.22.5 - '@rollup/rollup-android-arm-eabi@4.24.0': + '@rollup/rollup-android-arm-eabi@4.22.5': optional: true - '@rollup/rollup-android-arm64@4.24.0': + '@rollup/rollup-android-arm64@4.22.5': optional: true - '@rollup/rollup-darwin-arm64@4.24.0': + '@rollup/rollup-darwin-arm64@4.22.5': optional: true - '@rollup/rollup-darwin-x64@4.24.0': + '@rollup/rollup-darwin-x64@4.22.5': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.24.0': + '@rollup/rollup-linux-arm-gnueabihf@4.22.5': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.24.0': + '@rollup/rollup-linux-arm-musleabihf@4.22.5': optional: true - '@rollup/rollup-linux-arm64-gnu@4.24.0': + '@rollup/rollup-linux-arm64-gnu@4.22.5': optional: true - '@rollup/rollup-linux-arm64-musl@4.24.0': + '@rollup/rollup-linux-arm64-musl@4.22.5': optional: true - '@rollup/rollup-linux-powerpc64le-gnu@4.24.0': + '@rollup/rollup-linux-powerpc64le-gnu@4.22.5': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.24.0': + '@rollup/rollup-linux-riscv64-gnu@4.22.5': optional: true - '@rollup/rollup-linux-s390x-gnu@4.24.0': + '@rollup/rollup-linux-s390x-gnu@4.22.5': optional: true - '@rollup/rollup-linux-x64-gnu@4.24.0': + '@rollup/rollup-linux-x64-gnu@4.22.5': optional: true - '@rollup/rollup-linux-x64-musl@4.24.0': + '@rollup/rollup-linux-x64-musl@4.22.5': optional: true - '@rollup/rollup-win32-arm64-msvc@4.24.0': + '@rollup/rollup-win32-arm64-msvc@4.22.5': optional: true - '@rollup/rollup-win32-ia32-msvc@4.24.0': + '@rollup/rollup-win32-ia32-msvc@4.22.5': optional: true - '@rollup/rollup-win32-x64-msvc@4.24.0': + '@rollup/rollup-win32-x64-msvc@4.22.5': optional: true '@rtsao/scc@1.1.0': {} @@ -21749,7 +20442,7 @@ snapshots: '@solana/web3.js@1.91.7(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: - '@babel/runtime': 7.25.7 + '@babel/runtime': 7.25.4 '@noble/curves': 1.6.0 '@noble/hashes': 1.5.0 '@solana/buffer-layout': 4.0.1 @@ -21931,11 +20624,11 @@ snapshots: '@svgr/hast-util-to-babel-ast@5.5.0': dependencies: - '@babel/types': 7.25.8 + '@babel/types': 7.25.6 '@svgr/plugin-jsx@5.5.0': dependencies: - '@babel/core': 7.25.8 + '@babel/core': 7.25.2 '@svgr/babel-preset': 5.5.0 '@svgr/hast-util-to-babel-ast': 5.5.0 svg-parser: 2.0.4 @@ -21950,10 +20643,10 @@ snapshots: '@svgr/webpack@5.5.0': dependencies: - '@babel/core': 7.25.8 - '@babel/plugin-transform-react-constant-elements': 7.22.5(@babel/core@7.25.8) - '@babel/preset-env': 7.22.5(@babel/core@7.25.8) - '@babel/preset-react': 7.22.5(@babel/core@7.25.8) + '@babel/core': 7.25.2 + '@babel/plugin-transform-react-constant-elements': 7.22.5(@babel/core@7.25.2) + '@babel/preset-env': 7.22.5(@babel/core@7.25.2) + '@babel/preset-react': 7.22.5(@babel/core@7.25.2) '@svgr/core': 5.5.0 '@svgr/plugin-jsx': 5.5.0 '@svgr/plugin-svgo': 5.5.0 @@ -21991,7 +20684,7 @@ snapshots: '@swc/core-win32-x64-msvc@1.7.14': optional: true - '@swc/core@1.7.14(@swc/helpers@0.5.12)': + '@swc/core@1.7.14': dependencies: '@swc/counter': 0.1.3 '@swc/types': 0.1.12 @@ -22006,7 +20699,6 @@ snapshots: '@swc/core-win32-arm64-msvc': 1.7.14 '@swc/core-win32-ia32-msvc': 1.7.14 '@swc/core-win32-x64-msvc': 1.7.14 - '@swc/helpers': 0.5.12 optional: true '@swc/counter@0.1.3': {} @@ -22018,7 +20710,7 @@ snapshots: '@swc/helpers@0.5.5': dependencies: '@swc/counter': 0.1.3 - tslib: 2.8.0 + tslib: 2.7.0 '@swc/types@0.1.12': dependencies: @@ -22043,7 +20735,7 @@ snapshots: tsx: 4.19.1 zod: 3.23.8 - '@tanstack/router-plugin@1.58.12(vite@5.4.9(@types/node@22.7.7)(terser@5.36.0))(webpack-sources@3.2.3)': + '@tanstack/router-plugin@1.58.12(vite@5.4.10(@types/node@22.7.5)(terser@5.34.1))(webpack-sources@3.2.3)': dependencies: '@babel/core': 7.25.2 '@babel/generator': 7.25.6 @@ -22064,7 +20756,7 @@ snapshots: unplugin: 1.14.1(webpack-sources@3.2.3) zod: 3.23.8 optionalDependencies: - vite: 5.4.9(@types/node@22.7.7)(terser@5.36.0) + vite: 5.4.10(@types/node@22.7.5)(terser@5.34.1) transitivePeerDependencies: - supports-color - webpack-sources @@ -22101,14 +20793,14 @@ snapshots: lz-string: 1.5.0 pretty-format: 27.5.1 - '@testing-library/react@16.0.1(@testing-library/dom@10.4.0)(@types/react-dom@18.3.0)(@types/react@18.3.11)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@testing-library/react@16.0.1(@testing-library/dom@10.4.0)(@types/react-dom@18.3.0)(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: '@babel/runtime': 7.25.4 '@testing-library/dom': 10.4.0 react: 18.3.1 react-dom: 18.3.1(react@18.3.1) optionalDependencies: - '@types/react': 18.3.11 + '@types/react': 18.3.12 '@types/react-dom': 18.3.0 '@testing-library/user-event@14.5.2(@testing-library/dom@10.4.0)': @@ -22137,24 +20829,24 @@ snapshots: '@types/babel__core@7.20.5': dependencies: - '@babel/parser': 7.25.8 - '@babel/types': 7.25.8 + '@babel/parser': 7.25.6 + '@babel/types': 7.25.6 '@types/babel__generator': 7.6.8 '@types/babel__template': 7.4.4 '@types/babel__traverse': 7.20.6 '@types/babel__generator@7.6.8': dependencies: - '@babel/types': 7.25.8 + '@babel/types': 7.25.6 '@types/babel__template@7.4.4': dependencies: '@babel/parser': 7.25.6 - '@babel/types': 7.25.8 + '@babel/types': 7.25.6 '@types/babel__traverse@7.20.6': dependencies: - '@babel/types': 7.25.8 + '@babel/types': 7.25.6 '@types/bn.js@5.1.6': dependencies: @@ -22163,22 +20855,22 @@ snapshots: '@types/body-parser@1.19.2': dependencies: '@types/connect': 3.4.35 - '@types/node': 22.7.7 + '@types/node': 22.7.4 '@types/bonjour@3.5.10': dependencies: - '@types/node': 22.7.7 + '@types/node': 22.7.4 '@types/cli-table@0.3.4': {} '@types/connect-history-api-fallback@1.5.0': dependencies: '@types/express-serve-static-core': 4.17.35 - '@types/node': 22.7.7 + '@types/node': 22.7.4 '@types/connect@3.4.35': dependencies: - '@types/node': 22.7.7 + '@types/node': 22.5.5 '@types/cookie@0.6.0': {} @@ -22206,7 +20898,7 @@ snapshots: '@types/express-serve-static-core@4.17.35': dependencies: - '@types/node': 22.7.7 + '@types/node': 22.7.4 '@types/qs': 6.9.7 '@types/range-parser': 1.2.4 '@types/send': 0.17.1 @@ -22223,11 +20915,11 @@ snapshots: '@types/glob@8.1.0': dependencies: '@types/minimatch': 5.1.2 - '@types/node': 22.7.7 + '@types/node': 22.5.5 '@types/graceful-fs@4.1.6': dependencies: - '@types/node': 22.7.7 + '@types/node': 22.7.4 '@types/hast@3.0.4': dependencies: @@ -22239,7 +20931,7 @@ snapshots: '@types/http-proxy@1.17.11': dependencies: - '@types/node': 22.7.7 + '@types/node': 22.7.4 '@types/istanbul-lib-coverage@2.0.4': {} @@ -22276,7 +20968,7 @@ snapshots: '@types/keyv@3.1.4': dependencies: - '@types/node': 22.7.7 + '@types/node': 22.7.4 '@types/linkify-it@5.0.0': {} @@ -22308,13 +21000,13 @@ snapshots: '@types/mkdirp@0.5.2': dependencies: - '@types/node': 22.7.7 + '@types/node': 22.5.5 '@types/ms@0.7.34': {} '@types/mute-stream@0.0.4': dependencies: - '@types/node': 22.7.7 + '@types/node': 22.7.4 '@types/node-fetch@2.6.11': dependencies: @@ -22323,11 +21015,11 @@ snapshots: '@types/node-forge@1.3.11': dependencies: - '@types/node': 22.7.7 + '@types/node': 22.7.4 '@types/node@12.20.55': {} - '@types/node@18.19.57': + '@types/node@18.19.54': dependencies: undici-types: 5.26.5 @@ -22339,11 +21031,11 @@ snapshots: dependencies: undici-types: 6.19.8 - '@types/node@22.7.5': + '@types/node@22.7.4': dependencies: undici-types: 6.19.8 - '@types/node@22.7.7': + '@types/node@22.7.5': dependencies: undici-types: 6.19.8 @@ -22372,29 +21064,29 @@ snapshots: '@types/react-dom@18.3.0': dependencies: - '@types/react': 18.3.11 + '@types/react': 18.3.12 '@types/react@18.3.1': dependencies: '@types/prop-types': 15.7.5 csstype: 3.1.3 - '@types/react@18.3.11': + '@types/react@18.3.12': dependencies: '@types/prop-types': 15.7.5 csstype: 3.1.3 '@types/resolve@0.0.8': dependencies: - '@types/node': 22.7.7 + '@types/node': 22.5.5 '@types/resolve@1.17.1': dependencies: - '@types/node': 22.7.7 + '@types/node': 22.7.4 '@types/responselike@1.0.3': dependencies: - '@types/node': 22.7.7 + '@types/node': 22.7.4 '@types/retry@0.12.0': {} @@ -22405,7 +21097,7 @@ snapshots: '@types/secp256k1@4.0.6': dependencies: - '@types/node': 22.7.7 + '@types/node': 22.7.4 '@types/seedrandom@2.4.34': {} @@ -22416,7 +21108,7 @@ snapshots: '@types/send@0.17.1': dependencies: '@types/mime': 1.3.2 - '@types/node': 22.7.7 + '@types/node': 22.7.4 '@types/serve-index@1.9.1': dependencies: @@ -22426,13 +21118,13 @@ snapshots: dependencies: '@types/http-errors': 2.0.1 '@types/mime': 3.0.1 - '@types/node': 22.7.7 + '@types/node': 22.7.4 '@types/sinonjs__fake-timers@8.1.5': {} '@types/sockjs@0.3.33': dependencies: - '@types/node': 22.7.7 + '@types/node': 22.7.4 '@types/stack-utils@2.0.1': {} @@ -22462,11 +21154,11 @@ snapshots: '@types/ws@7.4.7': dependencies: - '@types/node': 22.7.7 + '@types/node': 22.5.5 '@types/ws@8.5.12': dependencies: - '@types/node': 22.7.7 + '@types/node': 22.5.5 '@types/yargs-parser@21.0.0': {} @@ -22480,17 +21172,13 @@ snapshots: dependencies: '@types/yargs-parser': 21.0.0 - '@types/yargs@17.0.24': - dependencies: - '@types/yargs-parser': 21.0.0 - '@types/yargs@17.0.33': dependencies: '@types/yargs-parser': 21.0.3 '@types/yauzl@2.10.3': dependencies: - '@types/node': 22.7.7 + '@types/node': 22.7.4 optional: true '@typescript-eslint/eslint-plugin@5.59.0(@typescript-eslint/parser@5.59.0(eslint@9.9.1(jiti@2.3.3))(typescript@5.6.3))(eslint@9.9.1(jiti@2.3.3))(typescript@5.6.3)': @@ -22505,7 +21193,7 @@ snapshots: grapheme-splitter: 1.0.4 ignore: 5.2.4 natural-compare-lite: 1.4.0 - semver: 7.6.3 + semver: 7.3.8 tsutils: 3.21.0(typescript@5.6.3) optionalDependencies: typescript: 5.6.3 @@ -22532,14 +21220,14 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/eslint-plugin@8.8.0(@typescript-eslint/parser@8.8.0(eslint@8.57.0)(typescript@5.6.3))(eslint@8.57.0)(typescript@5.6.3)': + '@typescript-eslint/eslint-plugin@8.11.0(@typescript-eslint/parser@8.11.0(eslint@8.57.0)(typescript@5.6.3))(eslint@8.57.0)(typescript@5.6.3)': dependencies: '@eslint-community/regexpp': 4.11.1 - '@typescript-eslint/parser': 8.8.0(eslint@8.57.0)(typescript@5.6.3) - '@typescript-eslint/scope-manager': 8.8.0 - '@typescript-eslint/type-utils': 8.8.0(eslint@8.57.0)(typescript@5.6.3) - '@typescript-eslint/utils': 8.8.0(eslint@8.57.0)(typescript@5.6.3) - '@typescript-eslint/visitor-keys': 8.8.0 + '@typescript-eslint/parser': 8.11.0(eslint@8.57.0)(typescript@5.6.3) + '@typescript-eslint/scope-manager': 8.11.0 + '@typescript-eslint/type-utils': 8.11.0(eslint@8.57.0)(typescript@5.6.3) + '@typescript-eslint/utils': 8.11.0(eslint@8.57.0)(typescript@5.6.3) + '@typescript-eslint/visitor-keys': 8.11.0 eslint: 8.57.0 graphemer: 1.4.0 ignore: 5.3.2 @@ -22583,12 +21271,12 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.8.0(eslint@8.57.0)(typescript@5.6.3)': + '@typescript-eslint/parser@8.11.0(eslint@8.57.0)(typescript@5.6.3)': dependencies: - '@typescript-eslint/scope-manager': 8.8.0 - '@typescript-eslint/types': 8.8.0 - '@typescript-eslint/typescript-estree': 8.8.0(typescript@5.6.3) - '@typescript-eslint/visitor-keys': 8.8.0 + '@typescript-eslint/scope-manager': 8.11.0 + '@typescript-eslint/types': 8.11.0 + '@typescript-eslint/typescript-estree': 8.11.0(typescript@5.6.3) + '@typescript-eslint/visitor-keys': 8.11.0 debug: 4.3.7(supports-color@5.5.0) eslint: 8.57.0 optionalDependencies: @@ -22616,10 +21304,10 @@ snapshots: '@typescript-eslint/types': 6.9.1 '@typescript-eslint/visitor-keys': 6.9.1 - '@typescript-eslint/scope-manager@8.8.0': + '@typescript-eslint/scope-manager@8.11.0': dependencies: - '@typescript-eslint/types': 8.8.0 - '@typescript-eslint/visitor-keys': 8.8.0 + '@typescript-eslint/types': 8.11.0 + '@typescript-eslint/visitor-keys': 8.11.0 '@typescript-eslint/type-utils@5.59.0(eslint@9.9.1(jiti@2.3.3))(typescript@5.6.3)': dependencies: @@ -22645,10 +21333,10 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/type-utils@8.8.0(eslint@8.57.0)(typescript@5.6.3)': + '@typescript-eslint/type-utils@8.11.0(eslint@8.57.0)(typescript@5.6.3)': dependencies: - '@typescript-eslint/typescript-estree': 8.8.0(typescript@5.6.3) - '@typescript-eslint/utils': 8.8.0(eslint@8.57.0)(typescript@5.6.3) + '@typescript-eslint/typescript-estree': 8.11.0(typescript@5.6.3) + '@typescript-eslint/utils': 8.11.0(eslint@8.57.0)(typescript@5.6.3) debug: 4.3.7(supports-color@5.5.0) ts-api-utils: 1.3.0(typescript@5.6.3) optionalDependencies: @@ -22665,7 +21353,7 @@ snapshots: '@typescript-eslint/types@6.9.1': {} - '@typescript-eslint/types@8.8.0': {} + '@typescript-eslint/types@8.11.0': {} '@typescript-eslint/typescript-estree@5.59.0(typescript@5.6.3)': dependencies: @@ -22699,7 +21387,7 @@ snapshots: dependencies: '@typescript-eslint/types': 6.21.0 '@typescript-eslint/visitor-keys': 6.21.0 - debug: 4.3.6 + debug: 4.3.7(supports-color@5.5.0) globby: 11.1.0 is-glob: 4.0.3 minimatch: 9.0.3 @@ -22724,10 +21412,10 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/typescript-estree@8.8.0(typescript@5.6.3)': + '@typescript-eslint/typescript-estree@8.11.0(typescript@5.6.3)': dependencies: - '@typescript-eslint/types': 8.8.0 - '@typescript-eslint/visitor-keys': 8.8.0 + '@typescript-eslint/types': 8.11.0 + '@typescript-eslint/visitor-keys': 8.11.0 debug: 4.3.7(supports-color@5.5.0) fast-glob: 3.3.2 is-glob: 4.0.3 @@ -22783,12 +21471,12 @@ snapshots: - supports-color - typescript - '@typescript-eslint/utils@8.8.0(eslint@8.57.0)(typescript@5.6.3)': + '@typescript-eslint/utils@8.11.0(eslint@8.57.0)(typescript@5.6.3)': dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) - '@typescript-eslint/scope-manager': 8.8.0 - '@typescript-eslint/types': 8.8.0 - '@typescript-eslint/typescript-estree': 8.8.0(typescript@5.6.3) + '@typescript-eslint/scope-manager': 8.11.0 + '@typescript-eslint/types': 8.11.0 + '@typescript-eslint/typescript-estree': 8.11.0(typescript@5.6.3) eslint: 8.57.0 transitivePeerDependencies: - supports-color @@ -22814,41 +21502,41 @@ snapshots: '@typescript-eslint/types': 6.9.1 eslint-visitor-keys: 3.4.3 - '@typescript-eslint/visitor-keys@8.8.0': + '@typescript-eslint/visitor-keys@8.11.0': dependencies: - '@typescript-eslint/types': 8.8.0 + '@typescript-eslint/types': 8.11.0 eslint-visitor-keys: 3.4.3 '@ungap/structured-clone@1.2.0': {} - '@vitejs/plugin-react@4.3.3(vite@5.4.9(@types/node@22.5.5)(terser@5.36.0))': + '@vitejs/plugin-react@4.3.3(vite@5.4.10(@types/node@22.5.5)(terser@5.34.1))': dependencies: - '@babel/core': 7.25.8 - '@babel/plugin-transform-react-jsx-self': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-react-jsx-source': 7.25.7(@babel/core@7.25.8) + '@babel/core': 7.25.2 + '@babel/plugin-transform-react-jsx-self': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-transform-react-jsx-source': 7.24.7(@babel/core@7.25.2) '@types/babel__core': 7.20.5 react-refresh: 0.14.2 - vite: 5.4.9(@types/node@22.5.5)(terser@5.36.0) + vite: 5.4.10(@types/node@22.5.5)(terser@5.34.1) transitivePeerDependencies: - supports-color - '@vitejs/plugin-react@4.3.3(vite@5.4.9(@types/node@22.7.7)(terser@5.36.0))': + '@vitejs/plugin-react@4.3.3(vite@5.4.10(@types/node@22.7.5)(terser@5.34.1))': dependencies: - '@babel/core': 7.25.8 - '@babel/plugin-transform-react-jsx-self': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-react-jsx-source': 7.25.7(@babel/core@7.25.8) + '@babel/core': 7.25.2 + '@babel/plugin-transform-react-jsx-self': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-transform-react-jsx-source': 7.24.7(@babel/core@7.25.2) '@types/babel__core': 7.20.5 react-refresh: 0.14.2 - vite: 5.4.9(@types/node@22.7.7)(terser@5.36.0) + vite: 5.4.10(@types/node@22.7.5)(terser@5.34.1) transitivePeerDependencies: - supports-color - '@vitejs/plugin-vue@5.1.2(vite@5.4.9(@types/node@22.7.7)(terser@5.36.0))(vue@3.5.12(typescript@5.6.3))': + '@vitejs/plugin-vue@5.1.2(vite@5.4.10(@types/node@22.7.5)(terser@5.34.1))(vue@3.5.12(typescript@5.6.3))': dependencies: - vite: 5.4.9(@types/node@22.7.7)(terser@5.36.0) + vite: 5.4.10(@types/node@22.7.5)(terser@5.34.1) vue: 3.5.12(typescript@5.6.3) - '@vitest/browser@2.0.5(bufferutil@4.0.8)(playwright@1.47.2)(typescript@5.6.3)(utf-8-validate@5.0.10)(vitest@2.0.5)(webdriverio@9.0.9(bufferutil@4.0.8)(utf-8-validate@5.0.10))': + '@vitest/browser@2.0.5(bufferutil@4.0.8)(playwright@1.47.2)(typescript@5.6.3)(utf-8-validate@5.0.10)(vitest@2.0.5)(webdriverio@9.0.9(bufferutil@4.0.8)(utf-8-validate@6.0.4))': dependencies: '@testing-library/dom': 10.4.0 '@testing-library/user-event': 14.5.2(@testing-library/dom@10.4.0) @@ -22856,11 +21544,11 @@ snapshots: magic-string: 0.30.11 msw: 2.4.7(typescript@5.6.3) sirv: 2.0.4 - vitest: 2.0.5(@types/node@22.5.5)(@vitest/browser@2.0.5)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.36.0) + vitest: 2.0.5(@types/node@22.5.5)(@vitest/browser@2.0.5)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.34.1) ws: 8.18.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) optionalDependencies: playwright: 1.47.2 - webdriverio: 9.0.9(bufferutil@4.0.8)(utf-8-validate@5.0.10) + webdriverio: 9.0.9(bufferutil@4.0.8)(utf-8-validate@6.0.4) transitivePeerDependencies: - bufferutil - typescript @@ -22875,7 +21563,7 @@ snapshots: magic-string: 0.30.11 msw: 2.4.7(typescript@5.6.3) sirv: 2.0.4 - vitest: 2.0.5(@types/node@22.5.5)(@vitest/browser@2.0.5)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@6.0.4))(terser@5.36.0) + vitest: 2.0.5(@types/node@22.5.5)(@vitest/browser@2.0.5)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@6.0.4))(terser@5.34.1) ws: 8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.4) optionalDependencies: playwright: 1.47.2 @@ -22885,7 +21573,7 @@ snapshots: - typescript - utf-8-validate - '@vitest/coverage-istanbul@2.0.5(vitest@2.0.5(@types/node@22.5.5)(@vitest/browser@2.0.5)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@6.0.4))(terser@5.36.0))': + '@vitest/coverage-istanbul@2.0.5(vitest@2.0.5(@types/node@22.5.5)(@vitest/browser@2.0.5)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@6.0.4))(terser@5.34.1))': dependencies: '@istanbuljs/schema': 0.1.3 debug: 4.3.7(supports-color@5.5.0) @@ -22897,7 +21585,7 @@ snapshots: magicast: 0.3.5 test-exclude: 7.0.1 tinyrainbow: 1.2.0 - vitest: 2.0.5(@types/node@22.5.5)(@vitest/browser@2.0.5)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@6.0.4))(terser@5.36.0) + vitest: 2.0.5(@types/node@22.5.5)(@vitest/browser@2.0.5)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@6.0.4))(terser@5.34.1) transitivePeerDependencies: - supports-color @@ -22940,7 +21628,7 @@ snapshots: '@vue/compiler-core@3.5.12': dependencies: - '@babel/parser': 7.25.8 + '@babel/parser': 7.25.6 '@vue/shared': 3.5.12 entities: 4.5.0 estree-walker: 2.0.2 @@ -22953,7 +21641,7 @@ snapshots: '@vue/compiler-sfc@3.5.12': dependencies: - '@babel/parser': 7.25.8 + '@babel/parser': 7.25.6 '@vue/compiler-core': 3.5.12 '@vue/compiler-dom': 3.5.12 '@vue/compiler-ssr': 3.5.12 @@ -23047,15 +21735,15 @@ snapshots: - '@vue/composition-api' - vue - '@wagmi/connectors@5.1.14(@types/react@18.3.11)(@wagmi/core@2.13.9(@tanstack/query-core@5.56.2)(@types/react@18.3.11)(immer@9.0.21)(react@18.3.1)(typescript@5.6.3)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8)))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.11)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.24.0)(typescript@5.6.3)(utf-8-validate@5.0.10)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8)': + '@wagmi/connectors@5.1.14(@types/react@18.3.12)(@wagmi/core@2.14.1(@tanstack/query-core@5.56.2)(@types/react@18.3.12)(immer@9.0.21)(react@18.3.1)(typescript@5.6.3)(use-sync-external-store@1.2.0(react@18.3.1))(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8)))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.12)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.22.5)(typescript@5.6.3)(utf-8-validate@5.0.10)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8)': dependencies: '@coinbase/wallet-sdk': 4.0.4 - '@metamask/sdk': 0.28.4(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.11)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.24.0)(utf-8-validate@5.0.10) + '@metamask/sdk': 0.28.4(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.12)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.22.5)(utf-8-validate@5.0.10) '@safe-global/safe-apps-provider': 0.18.3(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8) '@safe-global/safe-apps-sdk': 9.1.0(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8) - '@wagmi/core': 2.13.9(@tanstack/query-core@5.56.2)(@types/react@18.3.11)(immer@9.0.21)(react@18.3.1)(typescript@5.6.3)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8)) - '@walletconnect/ethereum-provider': 2.16.1(@types/react@18.3.11)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10) - '@walletconnect/modal': 2.6.2(@types/react@18.3.11)(react@18.3.1) + '@wagmi/core': 2.14.1(@tanstack/query-core@5.56.2)(@types/react@18.3.12)(immer@9.0.21)(react@18.3.1)(typescript@5.6.3)(use-sync-external-store@1.2.0(react@18.3.1))(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8)) + '@walletconnect/ethereum-provider': 2.16.1(@types/react@18.3.12)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10) + '@walletconnect/modal': 2.6.2(@types/react@18.3.12)(react@18.3.1) cbw-sdk: '@coinbase/wallet-sdk@3.9.3' viem: 2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8) optionalDependencies: @@ -23086,51 +21774,12 @@ snapshots: - utf-8-validate - zod - '@wagmi/connectors@5.1.14(@types/react@18.3.11)(@wagmi/core@2.13.9(@tanstack/query-core@5.56.2)(@types/react@18.3.11)(immer@9.0.21)(react@18.3.1)(typescript@5.6.3)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8)))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.8)(@babel/preset-env@7.22.5(@babel/core@7.25.8))(@types/react@18.3.11)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.24.0)(typescript@5.6.3)(utf-8-validate@5.0.10)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8)': - dependencies: - '@coinbase/wallet-sdk': 4.0.4 - '@metamask/sdk': 0.28.4(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.8)(@babel/preset-env@7.22.5(@babel/core@7.25.8))(@types/react@18.3.11)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.24.0)(utf-8-validate@5.0.10) - '@safe-global/safe-apps-provider': 0.18.3(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8) - '@safe-global/safe-apps-sdk': 9.1.0(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8) - '@wagmi/core': 2.13.9(@tanstack/query-core@5.56.2)(@types/react@18.3.11)(immer@9.0.21)(react@18.3.1)(typescript@5.6.3)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8)) - '@walletconnect/ethereum-provider': 2.16.1(@types/react@18.3.11)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10) - '@walletconnect/modal': 2.6.2(@types/react@18.3.11)(react@18.3.1) - cbw-sdk: '@coinbase/wallet-sdk@3.9.3' - viem: 2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8) - optionalDependencies: - typescript: 5.6.3 - transitivePeerDependencies: - - '@azure/app-configuration' - - '@azure/cosmos' - - '@azure/data-tables' - - '@azure/identity' - - '@azure/keyvault-secrets' - - '@azure/storage-blob' - - '@capacitor/preferences' - - '@netlify/blobs' - - '@planetscale/database' - - '@react-native-async-storage/async-storage' - - '@types/react' - - '@upstash/redis' - - '@vercel/kv' - - bufferutil - - encoding - - ioredis - - react - - react-dom - - react-native - - rollup - - supports-color - - uWebSockets.js - - utf-8-validate - - zod - - '@wagmi/core@2.13.4(@tanstack/query-core@5.56.2)(@types/react@18.3.11)(immer@9.0.21)(react@18.3.1)(typescript@5.6.3)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8))': + '@wagmi/core@2.13.4(@tanstack/query-core@5.56.2)(@types/react@18.3.12)(immer@9.0.21)(react@18.3.1)(typescript@5.6.3)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8))': dependencies: eventemitter3: 5.0.1 mipd: 0.0.7(typescript@5.6.3) viem: 2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8) - zustand: 4.4.1(@types/react@18.3.11)(immer@9.0.21)(react@18.3.1) + zustand: 4.4.1(@types/react@18.3.12)(immer@9.0.21)(react@18.3.1) optionalDependencies: '@tanstack/query-core': 5.56.2 typescript: 5.6.3 @@ -23139,12 +21788,12 @@ snapshots: - immer - react - '@wagmi/core@2.13.9(@tanstack/query-core@5.56.2)(@types/react@18.3.11)(immer@9.0.21)(react@18.3.1)(typescript@5.6.3)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8))': + '@wagmi/core@2.14.1(@tanstack/query-core@5.56.2)(@types/react@18.3.12)(immer@9.0.21)(react@18.3.1)(typescript@5.6.3)(use-sync-external-store@1.2.0(react@18.3.1))(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8))': dependencies: eventemitter3: 5.0.1 mipd: 0.0.7(typescript@5.6.3) viem: 2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8) - zustand: 4.4.1(@types/react@18.3.11)(immer@9.0.21)(react@18.3.1) + zustand: 5.0.0(@types/react@18.3.12)(immer@9.0.21)(react@18.3.1)(use-sync-external-store@1.2.0(react@18.3.1)) optionalDependencies: '@tanstack/query-core': 5.56.2 typescript: 5.6.3 @@ -23152,6 +21801,7 @@ snapshots: - '@types/react' - immer - react + - use-sync-external-store '@wallet-standard/base@1.0.1': {} @@ -23287,13 +21937,13 @@ snapshots: dependencies: tslib: 1.14.1 - '@walletconnect/ethereum-provider@2.13.0(@types/react@18.3.11)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10)': + '@walletconnect/ethereum-provider@2.13.0(@types/react@18.3.12)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10)': dependencies: '@walletconnect/jsonrpc-http-connection': 1.0.8 '@walletconnect/jsonrpc-provider': 1.0.14 '@walletconnect/jsonrpc-types': 1.0.4 '@walletconnect/jsonrpc-utils': 1.0.8 - '@walletconnect/modal': 2.6.2(@types/react@18.3.11)(react@18.3.1) + '@walletconnect/modal': 2.6.2(@types/react@18.3.12)(react@18.3.1) '@walletconnect/sign-client': 2.13.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@walletconnect/types': 2.13.0 '@walletconnect/universal-provider': 2.13.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) @@ -23320,13 +21970,13 @@ snapshots: - uWebSockets.js - utf-8-validate - '@walletconnect/ethereum-provider@2.16.1(@types/react@18.3.11)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10)': + '@walletconnect/ethereum-provider@2.16.1(@types/react@18.3.12)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10)': dependencies: '@walletconnect/jsonrpc-http-connection': 1.0.8 '@walletconnect/jsonrpc-provider': 1.0.14 '@walletconnect/jsonrpc-types': 1.0.4 '@walletconnect/jsonrpc-utils': 1.0.8 - '@walletconnect/modal': 2.6.2(@types/react@18.3.11)(react@18.3.1) + '@walletconnect/modal': 2.6.2(@types/react@18.3.12)(react@18.3.1) '@walletconnect/sign-client': 2.16.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@walletconnect/types': 2.16.1 '@walletconnect/universal-provider': 2.16.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) @@ -23444,16 +22094,16 @@ snapshots: '@walletconnect/mobile-registry@1.4.0': {} - '@walletconnect/modal-core@2.6.2(@types/react@18.3.11)(react@18.3.1)': + '@walletconnect/modal-core@2.6.2(@types/react@18.3.12)(react@18.3.1)': dependencies: - valtio: 1.11.2(@types/react@18.3.11)(react@18.3.1) + valtio: 1.11.2(@types/react@18.3.12)(react@18.3.1) transitivePeerDependencies: - '@types/react' - react - '@walletconnect/modal-ui@2.6.2(@types/react@18.3.11)(react@18.3.1)': + '@walletconnect/modal-ui@2.6.2(@types/react@18.3.12)(react@18.3.1)': dependencies: - '@walletconnect/modal-core': 2.6.2(@types/react@18.3.11)(react@18.3.1) + '@walletconnect/modal-core': 2.6.2(@types/react@18.3.12)(react@18.3.1) lit: 2.8.0 motion: 10.16.2 qrcode: 1.5.3 @@ -23461,10 +22111,10 @@ snapshots: - '@types/react' - react - '@walletconnect/modal@2.6.2(@types/react@18.3.11)(react@18.3.1)': + '@walletconnect/modal@2.6.2(@types/react@18.3.12)(react@18.3.1)': dependencies: - '@walletconnect/modal-core': 2.6.2(@types/react@18.3.11)(react@18.3.1) - '@walletconnect/modal-ui': 2.6.2(@types/react@18.3.11)(react@18.3.1) + '@walletconnect/modal-core': 2.6.2(@types/react@18.3.12)(react@18.3.1) + '@walletconnect/modal-ui': 2.6.2(@types/react@18.3.12)(react@18.3.1) transitivePeerDependencies: - '@types/react' - react @@ -23986,11 +22636,11 @@ snapshots: bignumber.js: 9.1.2 dayjs: 1.11.10 - '@web3modal/core@5.0.0(@types/react@18.3.11)(react@18.3.1)': + '@web3modal/core@5.0.0(@types/react@18.3.12)(react@18.3.1)': dependencies: '@web3modal/common': 5.0.0 '@web3modal/wallet': 5.0.0 - valtio: 1.11.2(@types/react@18.3.11)(react@18.3.1) + valtio: 1.11.2(@types/react@18.3.12)(react@18.3.1) transitivePeerDependencies: - '@types/react' - react @@ -23999,9 +22649,9 @@ snapshots: dependencies: buffer: 6.0.3 - '@web3modal/scaffold-react@5.0.0(@types/react@18.3.11)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@web3modal/scaffold-react@5.0.0(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: - '@web3modal/scaffold': 5.0.0(@types/react@18.3.11)(react@18.3.1) + '@web3modal/scaffold': 5.0.0(@types/react@18.3.12)(react@18.3.1) optionalDependencies: react: 18.3.1 react-dom: 18.3.1(react@18.3.1) @@ -24022,18 +22672,18 @@ snapshots: - ioredis - uWebSockets.js - '@web3modal/scaffold-utils@5.0.0(@types/react@18.3.11)(react@18.3.1)': + '@web3modal/scaffold-utils@5.0.0(@types/react@18.3.12)(react@18.3.1)': dependencies: - '@web3modal/core': 5.0.0(@types/react@18.3.11)(react@18.3.1) + '@web3modal/core': 5.0.0(@types/react@18.3.12)(react@18.3.1) '@web3modal/polyfills': 5.0.0 - valtio: 1.11.2(@types/react@18.3.11)(react@18.3.1) + valtio: 1.11.2(@types/react@18.3.12)(react@18.3.1) transitivePeerDependencies: - '@types/react' - react - '@web3modal/scaffold-vue@5.0.0(@types/react@18.3.11)(react@18.3.1)(vue@3.5.12(typescript@5.6.3))': + '@web3modal/scaffold-vue@5.0.0(@types/react@18.3.12)(react@18.3.1)(vue@3.5.12(typescript@5.6.3))': dependencies: - '@web3modal/scaffold': 5.0.0(@types/react@18.3.11)(react@18.3.1) + '@web3modal/scaffold': 5.0.0(@types/react@18.3.12)(react@18.3.1) optionalDependencies: vue: 3.5.12(typescript@5.6.3) transitivePeerDependencies: @@ -24054,12 +22704,12 @@ snapshots: - react - uWebSockets.js - '@web3modal/scaffold@5.0.0(@types/react@18.3.11)(react@18.3.1)': + '@web3modal/scaffold@5.0.0(@types/react@18.3.12)(react@18.3.1)': dependencies: '@web3modal/common': 5.0.0 - '@web3modal/core': 5.0.0(@types/react@18.3.11)(react@18.3.1) - '@web3modal/scaffold-utils': 5.0.0(@types/react@18.3.11)(react@18.3.1) - '@web3modal/siwe': 5.0.0(@types/react@18.3.11)(react@18.3.1) + '@web3modal/core': 5.0.0(@types/react@18.3.12)(react@18.3.1) + '@web3modal/scaffold-utils': 5.0.0(@types/react@18.3.12)(react@18.3.1) + '@web3modal/siwe': 5.0.0(@types/react@18.3.12)(react@18.3.1) '@web3modal/ui': 5.0.0 '@web3modal/wallet': 5.0.0 lit: 3.1.0 @@ -24081,13 +22731,13 @@ snapshots: - react - uWebSockets.js - '@web3modal/siwe@5.0.0(@types/react@18.3.11)(react@18.3.1)': + '@web3modal/siwe@5.0.0(@types/react@18.3.12)(react@18.3.1)': dependencies: '@walletconnect/utils': 2.12.0 - '@web3modal/core': 5.0.0(@types/react@18.3.11)(react@18.3.1) - '@web3modal/scaffold-utils': 5.0.0(@types/react@18.3.11)(react@18.3.1) + '@web3modal/core': 5.0.0(@types/react@18.3.12)(react@18.3.1) + '@web3modal/scaffold-utils': 5.0.0(@types/react@18.3.12)(react@18.3.1) lit: 3.1.0 - valtio: 1.11.2(@types/react@18.3.11)(react@18.3.1) + valtio: 1.11.2(@types/react@18.3.12)(react@18.3.1) transitivePeerDependencies: - '@azure/app-configuration' - '@azure/cosmos' @@ -24106,7 +22756,7 @@ snapshots: - react - uWebSockets.js - '@web3modal/solana@5.0.0(@types/react@18.3.11)(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(utf-8-validate@5.0.10)(vue@3.5.12(typescript@5.6.3))': + '@web3modal/solana@5.0.0(@types/react@18.3.12)(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(utf-8-validate@5.0.10)(vue@3.5.12(typescript@5.6.3))': dependencies: '@ethersproject/sha2': 5.7.0 '@solana/wallet-adapter-backpack': 0.1.14(@solana/web3.js@1.91.7(bufferutil@4.0.8)(utf-8-validate@5.0.10)) @@ -24118,10 +22768,10 @@ snapshots: '@solana/web3.js': 1.91.7(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@walletconnect/universal-provider': 2.11.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@web3modal/polyfills': 5.0.0 - '@web3modal/scaffold': 5.0.0(@types/react@18.3.11)(react@18.3.1) - '@web3modal/scaffold-react': 5.0.0(@types/react@18.3.11)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@web3modal/scaffold-utils': 5.0.0(@types/react@18.3.11)(react@18.3.1) - '@web3modal/scaffold-vue': 5.0.0(@types/react@18.3.11)(react@18.3.1)(vue@3.5.12(typescript@5.6.3)) + '@web3modal/scaffold': 5.0.0(@types/react@18.3.12)(react@18.3.1) + '@web3modal/scaffold-react': 5.0.0(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@web3modal/scaffold-utils': 5.0.0(@types/react@18.3.12)(react@18.3.1) + '@web3modal/scaffold-vue': 5.0.0(@types/react@18.3.12)(react@18.3.1)(vue@3.5.12(typescript@5.6.3)) bn.js: 5.2.1 bs58: 5.0.0 optionalDependencies: @@ -24153,53 +22803,17 @@ snapshots: lit: 3.1.0 qrcode: 1.5.3 - '@web3modal/wagmi@5.0.0(s4njjfnugwcf5wzrzy5iqctzlu)': + '@web3modal/wagmi@5.0.0(lv2wncl7f35mm3jrrc7bwhlvna)': dependencies: - '@wagmi/connectors': 5.1.14(@types/react@18.3.11)(@wagmi/core@2.13.9(@tanstack/query-core@5.56.2)(@types/react@18.3.11)(immer@9.0.21)(react@18.3.1)(typescript@5.6.3)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8)))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.8)(@babel/preset-env@7.22.5(@babel/core@7.25.8))(@types/react@18.3.11)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.24.0)(typescript@5.6.3)(utf-8-validate@5.0.10)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8) - '@wagmi/core': 2.13.4(@tanstack/query-core@5.56.2)(@types/react@18.3.11)(immer@9.0.21)(react@18.3.1)(typescript@5.6.3)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8)) - '@walletconnect/ethereum-provider': 2.13.0(@types/react@18.3.11)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10) + '@wagmi/connectors': 5.1.14(@types/react@18.3.12)(@wagmi/core@2.14.1(@tanstack/query-core@5.56.2)(@types/react@18.3.12)(immer@9.0.21)(react@18.3.1)(typescript@5.6.3)(use-sync-external-store@1.2.0(react@18.3.1))(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8)))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.12)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.22.5)(typescript@5.6.3)(utf-8-validate@5.0.10)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8) + '@wagmi/core': 2.13.4(@tanstack/query-core@5.56.2)(@types/react@18.3.12)(immer@9.0.21)(react@18.3.1)(typescript@5.6.3)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8)) + '@walletconnect/ethereum-provider': 2.13.0(@types/react@18.3.12)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10) '@web3modal/polyfills': 5.0.0 - '@web3modal/scaffold': 5.0.0(@types/react@18.3.11)(react@18.3.1) - '@web3modal/scaffold-react': 5.0.0(@types/react@18.3.11)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@web3modal/scaffold-utils': 5.0.0(@types/react@18.3.11)(react@18.3.1) - '@web3modal/scaffold-vue': 5.0.0(@types/react@18.3.11)(react@18.3.1)(vue@3.5.12(typescript@5.6.3)) - '@web3modal/siwe': 5.0.0(@types/react@18.3.11)(react@18.3.1) - viem: 2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8) - optionalDependencies: - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) - vue: 3.5.12(typescript@5.6.3) - transitivePeerDependencies: - - '@azure/app-configuration' - - '@azure/cosmos' - - '@azure/data-tables' - - '@azure/identity' - - '@azure/keyvault-secrets' - - '@azure/storage-blob' - - '@capacitor/preferences' - - '@netlify/blobs' - - '@planetscale/database' - - '@react-native-async-storage/async-storage' - - '@types/react' - - '@upstash/redis' - - '@vercel/kv' - - bufferutil - - encoding - - ioredis - - uWebSockets.js - - utf-8-validate - - '@web3modal/wagmi@5.0.0(sspqhkod4bnfuztkcao3fpdx6m)': - dependencies: - '@wagmi/connectors': 5.1.14(@types/react@18.3.11)(@wagmi/core@2.13.9(@tanstack/query-core@5.56.2)(@types/react@18.3.11)(immer@9.0.21)(react@18.3.1)(typescript@5.6.3)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8)))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.11)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.24.0)(typescript@5.6.3)(utf-8-validate@5.0.10)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8) - '@wagmi/core': 2.13.4(@tanstack/query-core@5.56.2)(@types/react@18.3.11)(immer@9.0.21)(react@18.3.1)(typescript@5.6.3)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8)) - '@walletconnect/ethereum-provider': 2.13.0(@types/react@18.3.11)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10) - '@web3modal/polyfills': 5.0.0 - '@web3modal/scaffold': 5.0.0(@types/react@18.3.11)(react@18.3.1) - '@web3modal/scaffold-react': 5.0.0(@types/react@18.3.11)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@web3modal/scaffold-utils': 5.0.0(@types/react@18.3.11)(react@18.3.1) - '@web3modal/scaffold-vue': 5.0.0(@types/react@18.3.11)(react@18.3.1)(vue@3.5.12(typescript@5.6.3)) - '@web3modal/siwe': 5.0.0(@types/react@18.3.11)(react@18.3.1) + '@web3modal/scaffold': 5.0.0(@types/react@18.3.12)(react@18.3.1) + '@web3modal/scaffold-react': 5.0.0(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@web3modal/scaffold-utils': 5.0.0(@types/react@18.3.12)(react@18.3.1) + '@web3modal/scaffold-vue': 5.0.0(@types/react@18.3.12)(react@18.3.1)(vue@3.5.12(typescript@5.6.3)) + '@web3modal/siwe': 5.0.0(@types/react@18.3.12)(react@18.3.1) viem: 2.20.1(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8) optionalDependencies: react: 18.3.1 @@ -24308,12 +22922,12 @@ snapshots: '@webgpu/types@0.1.16': {} - '@whatwg-node/fetch@0.9.21': + '@whatwg-node/fetch@0.9.22': dependencies: - '@whatwg-node/node-fetch': 0.5.26 + '@whatwg-node/node-fetch': 0.5.27 urlpattern-polyfill: 10.0.0 - '@whatwg-node/node-fetch@0.5.26': + '@whatwg-node/node-fetch@0.5.27': dependencies: '@kamilkisiela/fast-url-parser': 1.1.4 busboy: 1.6.0 @@ -24364,10 +22978,6 @@ snapshots: dependencies: acorn: 8.12.1 - acorn-jsx@5.3.2(acorn@8.13.0): - dependencies: - acorn: 8.13.0 - acorn-node@1.8.2: dependencies: acorn: 7.4.1 @@ -24378,15 +22988,13 @@ snapshots: acorn-walk@8.3.4: dependencies: - acorn: 8.13.0 + acorn: 8.12.1 optional: true acorn@7.4.1: {} acorn@8.12.1: {} - acorn@8.13.0: {} - address@1.2.2: {} adjust-sourcemap-loader@4.0.0: @@ -24786,16 +23394,16 @@ snapshots: b4a@1.6.6: {} - babel-core@7.0.0-bridge.0(@babel/core@7.25.8): + babel-core@7.0.0-bridge.0(@babel/core@7.25.2): dependencies: - '@babel/core': 7.25.8 + '@babel/core': 7.25.2 babel-dead-code-elimination@1.0.6: dependencies: - '@babel/core': 7.25.8 + '@babel/core': 7.25.2 '@babel/parser': 7.25.6 '@babel/traverse': 7.25.6 - '@babel/types': 7.25.8 + '@babel/types': 7.25.6 transitivePeerDependencies: - supports-color @@ -24813,32 +23421,32 @@ snapshots: transitivePeerDependencies: - supports-color - babel-jest@27.5.1(@babel/core@7.25.8): + babel-jest@27.5.1(@babel/core@7.25.2): dependencies: - '@babel/core': 7.25.8 + '@babel/core': 7.25.2 '@jest/transform': 27.5.1 '@jest/types': 27.5.1 '@types/babel__core': 7.20.5 babel-plugin-istanbul: 6.1.1 - babel-preset-jest: 27.5.1(@babel/core@7.25.8) + babel-preset-jest: 27.5.1(@babel/core@7.25.2) chalk: 4.1.2 graceful-fs: 4.2.11 slash: 3.0.0 transitivePeerDependencies: - supports-color - babel-loader@8.3.0(@babel/core@7.22.5)(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)): + babel-loader@8.3.0(@babel/core@7.22.5)(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)): dependencies: '@babel/core': 7.22.5 find-cache-dir: 3.3.2 loader-utils: 2.0.4 make-dir: 3.1.0 schema-utils: 2.7.1 - webpack: 5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19) + webpack: 5.88.0(@swc/core@1.7.14)(esbuild@0.17.19) babel-plugin-istanbul@6.1.1: dependencies: - '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-plugin-utils': 7.24.8 '@istanbuljs/load-nyc-config': 1.1.0 '@istanbuljs/schema': 0.1.3 istanbul-lib-instrument: 5.2.1 @@ -24848,8 +23456,8 @@ snapshots: babel-plugin-jest-hoist@27.5.1: dependencies: - '@babel/template': 7.25.7 - '@babel/types': 7.25.8 + '@babel/template': 7.25.0 + '@babel/types': 7.25.6 '@types/babel__core': 7.20.5 '@types/babel__traverse': 7.20.6 @@ -24865,40 +23473,22 @@ snapshots: babel-plugin-polyfill-corejs2@0.4.11(@babel/core@7.25.2): dependencies: - '@babel/compat-data': 7.25.8 + '@babel/compat-data': 7.25.4 '@babel/core': 7.25.2 '@babel/helper-define-polyfill-provider': 0.6.2(@babel/core@7.25.2) semver: 6.3.1 transitivePeerDependencies: - supports-color - babel-plugin-polyfill-corejs2@0.4.11(@babel/core@7.25.8): - dependencies: - '@babel/compat-data': 7.25.8 - '@babel/core': 7.25.8 - '@babel/helper-define-polyfill-provider': 0.6.2(@babel/core@7.25.8) - semver: 6.3.1 - transitivePeerDependencies: - - supports-color - babel-plugin-polyfill-corejs2@0.4.3(@babel/core@7.25.2): dependencies: - '@babel/compat-data': 7.25.8 + '@babel/compat-data': 7.25.4 '@babel/core': 7.25.2 '@babel/helper-define-polyfill-provider': 0.4.0(@babel/core@7.25.2) semver: 6.3.1 transitivePeerDependencies: - supports-color - babel-plugin-polyfill-corejs2@0.4.3(@babel/core@7.25.8): - dependencies: - '@babel/compat-data': 7.25.8 - '@babel/core': 7.25.8 - '@babel/helper-define-polyfill-provider': 0.4.0(@babel/core@7.25.8) - semver: 6.3.1 - transitivePeerDependencies: - - supports-color - babel-plugin-polyfill-corejs3@0.10.6(@babel/core@7.25.2): dependencies: '@babel/core': 7.25.2 @@ -24907,14 +23497,6 @@ snapshots: transitivePeerDependencies: - supports-color - babel-plugin-polyfill-corejs3@0.10.6(@babel/core@7.25.8): - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-define-polyfill-provider': 0.6.2(@babel/core@7.25.8) - core-js-compat: 3.38.1 - transitivePeerDependencies: - - supports-color - babel-plugin-polyfill-corejs3@0.8.1(@babel/core@7.25.2): dependencies: '@babel/core': 7.25.2 @@ -24923,14 +23505,6 @@ snapshots: transitivePeerDependencies: - supports-color - babel-plugin-polyfill-corejs3@0.8.1(@babel/core@7.25.8): - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-define-polyfill-provider': 0.4.0(@babel/core@7.25.8) - core-js-compat: 3.31.0 - transitivePeerDependencies: - - supports-color - babel-plugin-polyfill-regenerator@0.5.0(@babel/core@7.25.2): dependencies: '@babel/core': 7.25.2 @@ -24938,13 +23512,6 @@ snapshots: transitivePeerDependencies: - supports-color - babel-plugin-polyfill-regenerator@0.5.0(@babel/core@7.25.8): - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-define-polyfill-provider': 0.4.0(@babel/core@7.25.8) - transitivePeerDependencies: - - supports-color - babel-plugin-polyfill-regenerator@0.6.2(@babel/core@7.25.2): dependencies: '@babel/core': 7.25.2 @@ -24952,24 +23519,11 @@ snapshots: transitivePeerDependencies: - supports-color - babel-plugin-polyfill-regenerator@0.6.2(@babel/core@7.25.8): - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-define-polyfill-provider': 0.6.2(@babel/core@7.25.8) - transitivePeerDependencies: - - supports-color - babel-plugin-syntax-trailing-function-commas@7.0.0-beta.0: {} babel-plugin-transform-flow-enums@0.0.2(@babel/core@7.25.2): dependencies: - '@babel/plugin-syntax-flow': 7.25.7(@babel/core@7.25.2) - transitivePeerDependencies: - - '@babel/core' - - babel-plugin-transform-flow-enums@0.0.2(@babel/core@7.25.8): - dependencies: - '@babel/plugin-syntax-flow': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-syntax-flow': 7.24.7(@babel/core@7.25.2) transitivePeerDependencies: - '@babel/core' @@ -24991,51 +23545,51 @@ snapshots: '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.22.5) '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.22.5) - babel-preset-current-node-syntax@1.0.1(@babel/core@7.25.8): - dependencies: - '@babel/core': 7.25.8 - '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.25.8) - '@babel/plugin-syntax-bigint': 7.8.3(@babel/core@7.25.8) - '@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@7.25.8) - '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.25.8) - '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.25.8) - '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.25.8) - '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.25.8) - '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.25.8) - '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.25.8) - '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.25.8) - '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.25.8) - '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.25.8) - - babel-preset-fbjs@3.4.0(@babel/core@7.25.8): - dependencies: - '@babel/core': 7.25.8 - '@babel/plugin-proposal-class-properties': 7.18.6(@babel/core@7.25.8) - '@babel/plugin-proposal-object-rest-spread': 7.20.7(@babel/core@7.25.8) - '@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@7.25.8) - '@babel/plugin-syntax-flow': 7.24.6(@babel/core@7.25.8) - '@babel/plugin-syntax-jsx': 7.24.7(@babel/core@7.25.8) - '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.25.8) - '@babel/plugin-transform-arrow-functions': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-block-scoped-functions': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-block-scoping': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-classes': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-computed-properties': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-destructuring': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-flow-strip-types': 7.24.6(@babel/core@7.25.8) - '@babel/plugin-transform-for-of': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-function-name': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-literals': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-member-expression-literals': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-modules-commonjs': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-object-super': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-parameters': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-property-literals': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-react-display-name': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-react-jsx': 7.23.4(@babel/core@7.25.8) - '@babel/plugin-transform-shorthand-properties': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-spread': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-template-literals': 7.22.5(@babel/core@7.25.8) + babel-preset-current-node-syntax@1.0.1(@babel/core@7.25.2): + dependencies: + '@babel/core': 7.25.2 + '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.25.2) + '@babel/plugin-syntax-bigint': 7.8.3(@babel/core@7.25.2) + '@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@7.25.2) + '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.25.2) + '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.25.2) + '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.25.2) + '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.25.2) + '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.25.2) + '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.25.2) + '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.25.2) + '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.25.2) + '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.25.2) + + babel-preset-fbjs@3.4.0(@babel/core@7.25.2): + dependencies: + '@babel/core': 7.25.2 + '@babel/plugin-proposal-class-properties': 7.18.6(@babel/core@7.25.2) + '@babel/plugin-proposal-object-rest-spread': 7.20.7(@babel/core@7.25.2) + '@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@7.25.2) + '@babel/plugin-syntax-flow': 7.24.6(@babel/core@7.25.2) + '@babel/plugin-syntax-jsx': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.25.2) + '@babel/plugin-transform-arrow-functions': 7.22.5(@babel/core@7.25.2) + '@babel/plugin-transform-block-scoped-functions': 7.22.5(@babel/core@7.25.2) + '@babel/plugin-transform-block-scoping': 7.22.5(@babel/core@7.25.2) + '@babel/plugin-transform-classes': 7.22.5(@babel/core@7.25.2) + '@babel/plugin-transform-computed-properties': 7.22.5(@babel/core@7.25.2) + '@babel/plugin-transform-destructuring': 7.22.5(@babel/core@7.25.2) + '@babel/plugin-transform-flow-strip-types': 7.24.6(@babel/core@7.25.2) + '@babel/plugin-transform-for-of': 7.22.5(@babel/core@7.25.2) + '@babel/plugin-transform-function-name': 7.22.5(@babel/core@7.25.2) + '@babel/plugin-transform-literals': 7.22.5(@babel/core@7.25.2) + '@babel/plugin-transform-member-expression-literals': 7.22.5(@babel/core@7.25.2) + '@babel/plugin-transform-modules-commonjs': 7.22.5(@babel/core@7.25.2) + '@babel/plugin-transform-object-super': 7.22.5(@babel/core@7.25.2) + '@babel/plugin-transform-parameters': 7.22.5(@babel/core@7.25.2) + '@babel/plugin-transform-property-literals': 7.22.5(@babel/core@7.25.2) + '@babel/plugin-transform-react-display-name': 7.22.5(@babel/core@7.25.2) + '@babel/plugin-transform-react-jsx': 7.23.4(@babel/core@7.25.2) + '@babel/plugin-transform-shorthand-properties': 7.22.5(@babel/core@7.25.2) + '@babel/plugin-transform-spread': 7.22.5(@babel/core@7.25.2) + '@babel/plugin-transform-template-literals': 7.22.5(@babel/core@7.25.2) babel-plugin-syntax-trailing-function-commas: 7.0.0-beta.0 transitivePeerDependencies: - supports-color @@ -25046,28 +23600,28 @@ snapshots: babel-plugin-jest-hoist: 27.5.1 babel-preset-current-node-syntax: 1.0.1(@babel/core@7.22.5) - babel-preset-jest@27.5.1(@babel/core@7.25.8): + babel-preset-jest@27.5.1(@babel/core@7.25.2): dependencies: - '@babel/core': 7.25.8 + '@babel/core': 7.25.2 babel-plugin-jest-hoist: 27.5.1 - babel-preset-current-node-syntax: 1.0.1(@babel/core@7.25.8) + babel-preset-current-node-syntax: 1.0.1(@babel/core@7.25.2) babel-preset-react-app@10.0.1: dependencies: - '@babel/core': 7.25.8 - '@babel/plugin-proposal-class-properties': 7.18.6(@babel/core@7.25.8) - '@babel/plugin-proposal-decorators': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-proposal-nullish-coalescing-operator': 7.18.6(@babel/core@7.25.8) - '@babel/plugin-proposal-numeric-separator': 7.18.6(@babel/core@7.25.8) - '@babel/plugin-proposal-optional-chaining': 7.21.0(@babel/core@7.25.8) - '@babel/plugin-proposal-private-methods': 7.18.6(@babel/core@7.25.8) - '@babel/plugin-proposal-private-property-in-object': 7.21.11(@babel/core@7.25.8) - '@babel/plugin-transform-flow-strip-types': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-react-display-name': 7.22.5(@babel/core@7.25.8) - '@babel/plugin-transform-runtime': 7.22.5(@babel/core@7.25.8) - '@babel/preset-env': 7.22.5(@babel/core@7.25.8) - '@babel/preset-react': 7.22.5(@babel/core@7.25.8) - '@babel/preset-typescript': 7.22.5(@babel/core@7.25.8) + '@babel/core': 7.25.2 + '@babel/plugin-proposal-class-properties': 7.18.6(@babel/core@7.25.2) + '@babel/plugin-proposal-decorators': 7.22.5(@babel/core@7.25.2) + '@babel/plugin-proposal-nullish-coalescing-operator': 7.18.6(@babel/core@7.25.2) + '@babel/plugin-proposal-numeric-separator': 7.18.6(@babel/core@7.25.2) + '@babel/plugin-proposal-optional-chaining': 7.21.0(@babel/core@7.25.2) + '@babel/plugin-proposal-private-methods': 7.18.6(@babel/core@7.25.2) + '@babel/plugin-proposal-private-property-in-object': 7.21.11(@babel/core@7.25.2) + '@babel/plugin-transform-flow-strip-types': 7.22.5(@babel/core@7.25.2) + '@babel/plugin-transform-react-display-name': 7.22.5(@babel/core@7.25.2) + '@babel/plugin-transform-runtime': 7.22.5(@babel/core@7.25.2) + '@babel/preset-env': 7.22.5(@babel/core@7.25.2) + '@babel/preset-react': 7.22.5(@babel/core@7.25.2) + '@babel/preset-typescript': 7.22.5(@babel/core@7.25.2) '@babel/runtime': 7.25.4 babel-plugin-macros: 3.1.0 babel-plugin-transform-react-remove-prop-types: 0.4.24 @@ -25340,14 +23894,14 @@ snapshots: browserslist@4.21.9: dependencies: - caniuse-lite: 1.0.30001664 + caniuse-lite: 1.0.30001647 electron-to-chromium: 1.4.442 node-releases: 2.0.12 update-browserslist-db: 1.0.11(browserslist@4.21.9) browserslist@4.23.3: dependencies: - caniuse-lite: 1.0.30001664 + caniuse-lite: 1.0.30001647 electron-to-chromium: 1.5.4 node-releases: 2.0.18 update-browserslist-db: 1.1.0(browserslist@4.23.3) @@ -25413,16 +23967,16 @@ snapshots: builtin-status-codes@3.0.0: {} - bun@1.1.31: + bun@1.1.32: optionalDependencies: - '@oven/bun-darwin-aarch64': 1.1.31 - '@oven/bun-darwin-x64': 1.1.31 - '@oven/bun-darwin-x64-baseline': 1.1.31 - '@oven/bun-linux-aarch64': 1.1.31 - '@oven/bun-linux-x64': 1.1.31 - '@oven/bun-linux-x64-baseline': 1.1.31 - '@oven/bun-windows-x64': 1.1.31 - '@oven/bun-windows-x64-baseline': 1.1.31 + '@oven/bun-darwin-aarch64': 1.1.32 + '@oven/bun-darwin-x64': 1.1.32 + '@oven/bun-darwin-x64-baseline': 1.1.32 + '@oven/bun-linux-aarch64': 1.1.32 + '@oven/bun-linux-x64': 1.1.32 + '@oven/bun-linux-x64-baseline': 1.1.32 + '@oven/bun-windows-x64': 1.1.32 + '@oven/bun-windows-x64-baseline': 1.1.32 bundle-name@4.1.0: dependencies: @@ -25659,7 +24213,7 @@ snapshots: chrome-launcher@0.15.2: dependencies: - '@types/node': 22.7.7 + '@types/node': 22.7.5 escape-string-regexp: 4.0.0 is-wsl: 2.2.0 lighthouse-logger: 1.4.2 @@ -26160,7 +24714,7 @@ snapshots: dependencies: hyphenate-style-name: 1.0.4 - css-loader@6.8.1(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)): + css-loader@6.8.1(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)): dependencies: icss-utils: 5.1.0(postcss@8.4.49) postcss: 8.4.49 @@ -26169,10 +24723,10 @@ snapshots: postcss-modules-scope: 3.0.0(postcss@8.4.49) postcss-modules-values: 4.0.0(postcss@8.4.49) postcss-value-parser: 4.2.0 - semver: 7.3.8 - webpack: 5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19) + semver: 7.6.3 + webpack: 5.88.0(@swc/core@1.7.14)(esbuild@0.17.19) - css-minimizer-webpack-plugin@3.4.1(esbuild@0.17.19)(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)): + css-minimizer-webpack-plugin@3.4.1(esbuild@0.17.19)(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)): dependencies: cssnano: 5.1.15(postcss@8.4.49) jest-worker: 27.5.1 @@ -26180,7 +24734,7 @@ snapshots: schema-utils: 4.2.0 serialize-javascript: 6.0.1 source-map: 0.6.1 - webpack: 5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19) + webpack: 5.88.0(@swc/core@1.7.14)(esbuild@0.17.19) optionalDependencies: esbuild: 0.17.19 @@ -26438,7 +24992,7 @@ snapshots: date-fns@2.30.0: dependencies: - '@babel/runtime': 7.25.7 + '@babel/runtime': 7.25.6 dayjs@1.11.10: {} @@ -26930,7 +25484,7 @@ snapshots: is-weakref: 1.0.2 object-inspect: 1.12.3 object-keys: 1.1.1 - object.assign: 4.1.5 + object.assign: 4.1.4 regexp.prototype.flags: 1.5.2 safe-regex-test: 1.0.0 string.prototype.trim: 1.2.7 @@ -27026,6 +25580,23 @@ snapshots: iterator.prototype: 1.1.2 safe-array-concat: 1.1.2 + es-iterator-helpers@1.1.0: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.23.3 + es-errors: 1.3.0 + es-set-tostringtag: 2.0.3 + function-bind: 1.1.2 + get-intrinsic: 1.2.4 + globalthis: 1.0.4 + has-property-descriptors: 1.0.2 + has-proto: 1.0.3 + has-symbols: 1.0.3 + internal-slot: 1.0.7 + iterator.prototype: 1.1.3 + safe-array-concat: 1.1.2 + es-module-lexer@1.3.0: {} es-object-atoms@1.0.0: @@ -27197,6 +25768,10 @@ snapshots: '@esbuild/win32-ia32': 0.24.0 '@esbuild/win32-x64': 0.24.0 + escalade@3.1.1: {} + + escalade@3.1.2: {} + escalade@3.2.0: {} escape-goat@2.1.1: {} @@ -27254,7 +25829,7 @@ snapshots: eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.3))(eslint@8.57.0))(eslint@8.57.0) eslint-plugin-import: 2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.3))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.3))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) eslint-plugin-jsx-a11y: 6.9.0(eslint@8.57.0) - eslint-plugin-react: 7.35.0(eslint@8.57.0) + eslint-plugin-react: 7.37.2(eslint@8.57.0) eslint-plugin-react-hooks: 4.6.2(eslint@8.57.0) optionalDependencies: typescript: 5.6.3 @@ -27266,7 +25841,7 @@ snapshots: dependencies: eslint: 8.57.0 - eslint-config-react-app@7.0.1(@babel/plugin-syntax-flow@7.25.7(@babel/core@7.22.5))(@babel/plugin-transform-react-jsx@7.25.7(@babel/core@7.22.5))(eslint@9.9.1(jiti@2.3.3))(jest@27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.5.5)(typescript@5.6.3))(utf-8-validate@5.0.10))(typescript@5.6.3): + eslint-config-react-app@7.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.22.5))(@babel/plugin-transform-react-jsx@7.25.2(@babel/core@7.22.5))(eslint@9.9.1(jiti@2.3.3))(jest@27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.3))(utf-8-validate@5.0.10))(typescript@5.6.3): dependencies: '@babel/core': 7.22.5 '@babel/eslint-parser': 7.22.5(@babel/core@7.22.5)(eslint@9.9.1(jiti@2.3.3)) @@ -27276,9 +25851,9 @@ snapshots: babel-preset-react-app: 10.0.1 confusing-browser-globals: 1.0.11 eslint: 9.9.1(jiti@2.3.3) - eslint-plugin-flowtype: 8.0.3(@babel/plugin-syntax-flow@7.25.7(@babel/core@7.22.5))(@babel/plugin-transform-react-jsx@7.25.7(@babel/core@7.22.5))(eslint@9.9.1(jiti@2.3.3)) + eslint-plugin-flowtype: 8.0.3(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.22.5))(@babel/plugin-transform-react-jsx@7.25.2(@babel/core@7.22.5))(eslint@9.9.1(jiti@2.3.3)) eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.59.0(eslint@9.9.1(jiti@2.3.3))(typescript@5.6.3))(eslint@9.9.1(jiti@2.3.3)) - eslint-plugin-jest: 25.7.0(@typescript-eslint/eslint-plugin@5.59.0(@typescript-eslint/parser@5.59.0(eslint@9.9.1(jiti@2.3.3))(typescript@5.6.3))(eslint@9.9.1(jiti@2.3.3))(typescript@5.6.3))(eslint@9.9.1(jiti@2.3.3))(jest@27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.5.5)(typescript@5.6.3))(utf-8-validate@5.0.10))(typescript@5.6.3) + eslint-plugin-jest: 25.7.0(@typescript-eslint/eslint-plugin@5.59.0(@typescript-eslint/parser@5.59.0(eslint@9.9.1(jiti@2.3.3))(typescript@5.6.3))(eslint@9.9.1(jiti@2.3.3))(typescript@5.6.3))(eslint@9.9.1(jiti@2.3.3))(jest@27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.3))(utf-8-validate@5.0.10))(typescript@5.6.3) eslint-plugin-jsx-a11y: 6.9.0(eslint@9.9.1(jiti@2.3.3)) eslint-plugin-react: 7.35.0(eslint@9.9.1(jiti@2.3.3)) eslint-plugin-react-hooks: 4.6.2(eslint@9.9.1(jiti@2.3.3)) @@ -27296,7 +25871,7 @@ snapshots: eslint-import-resolver-node@0.3.9: dependencies: debug: 3.2.7 - is-core-module: 2.15.1 + is-core-module: 2.15.0 resolve: 1.22.8 transitivePeerDependencies: - supports-color @@ -27355,10 +25930,10 @@ snapshots: eslint: 8.57.0 ignore: 5.2.4 - eslint-plugin-flowtype@8.0.3(@babel/plugin-syntax-flow@7.25.7(@babel/core@7.22.5))(@babel/plugin-transform-react-jsx@7.25.7(@babel/core@7.22.5))(eslint@9.9.1(jiti@2.3.3)): + eslint-plugin-flowtype@8.0.3(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.22.5))(@babel/plugin-transform-react-jsx@7.25.2(@babel/core@7.22.5))(eslint@9.9.1(jiti@2.3.3)): dependencies: - '@babel/plugin-syntax-flow': 7.25.7(@babel/core@7.22.5) - '@babel/plugin-transform-react-jsx': 7.25.7(@babel/core@7.22.5) + '@babel/plugin-syntax-flow': 7.24.7(@babel/core@7.22.5) + '@babel/plugin-transform-react-jsx': 7.25.2(@babel/core@7.22.5) eslint: 9.9.1(jiti@2.3.3) lodash: 4.17.21 string-natural-compare: 3.0.1 @@ -27445,13 +26020,13 @@ snapshots: - eslint-import-resolver-webpack - supports-color - eslint-plugin-jest@25.7.0(@typescript-eslint/eslint-plugin@5.59.0(@typescript-eslint/parser@5.59.0(eslint@9.9.1(jiti@2.3.3))(typescript@5.6.3))(eslint@9.9.1(jiti@2.3.3))(typescript@5.6.3))(eslint@9.9.1(jiti@2.3.3))(jest@27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.5.5)(typescript@5.6.3))(utf-8-validate@5.0.10))(typescript@5.6.3): + eslint-plugin-jest@25.7.0(@typescript-eslint/eslint-plugin@5.59.0(@typescript-eslint/parser@5.59.0(eslint@9.9.1(jiti@2.3.3))(typescript@5.6.3))(eslint@9.9.1(jiti@2.3.3))(typescript@5.6.3))(eslint@9.9.1(jiti@2.3.3))(jest@27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.3))(utf-8-validate@5.0.10))(typescript@5.6.3): dependencies: '@typescript-eslint/experimental-utils': 5.60.1(eslint@9.9.1(jiti@2.3.3))(typescript@5.6.3) eslint: 9.9.1(jiti@2.3.3) optionalDependencies: '@typescript-eslint/eslint-plugin': 5.59.0(@typescript-eslint/parser@5.59.0(eslint@9.9.1(jiti@2.3.3))(typescript@5.6.3))(eslint@9.9.1(jiti@2.3.3))(typescript@5.6.3) - jest: 27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.5.5)(typescript@5.6.3))(utf-8-validate@5.0.10) + jest: 27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.3))(utf-8-validate@5.0.10) transitivePeerDependencies: - supports-color - typescript @@ -27533,28 +26108,6 @@ snapshots: dependencies: eslint: 8.57.0 - eslint-plugin-react@7.35.0(eslint@8.57.0): - dependencies: - array-includes: 3.1.8 - array.prototype.findlast: 1.2.5 - array.prototype.flatmap: 1.3.2 - array.prototype.tosorted: 1.1.4 - doctrine: 2.1.0 - es-iterator-helpers: 1.0.19 - eslint: 8.57.0 - estraverse: 5.3.0 - hasown: 2.0.2 - jsx-ast-utils: 3.3.5 - minimatch: 3.1.2 - object.entries: 1.1.8 - object.fromentries: 2.0.8 - object.values: 1.2.0 - prop-types: 15.8.1 - resolve: 2.0.0-next.5 - semver: 6.3.1 - string.prototype.matchall: 4.0.11 - string.prototype.repeat: 1.0.0 - eslint-plugin-react@7.35.0(eslint@9.9.1(jiti@2.3.3)): dependencies: array-includes: 3.1.8 @@ -27577,14 +26130,14 @@ snapshots: string.prototype.matchall: 4.0.11 string.prototype.repeat: 1.0.0 - eslint-plugin-react@7.37.1(eslint@8.57.0): + eslint-plugin-react@7.37.2(eslint@8.57.0): dependencies: array-includes: 3.1.8 array.prototype.findlast: 1.2.5 array.prototype.flatmap: 1.3.2 array.prototype.tosorted: 1.1.4 doctrine: 2.1.0 - es-iterator-helpers: 1.0.19 + es-iterator-helpers: 1.1.0 eslint: 8.57.0 estraverse: 5.3.0 hasown: 2.0.2 @@ -27633,7 +26186,7 @@ snapshots: eslint-visitor-keys@4.1.0: {} - eslint-webpack-plugin@3.2.0(eslint@9.9.1(jiti@2.3.3))(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)): + eslint-webpack-plugin@3.2.0(eslint@9.9.1(jiti@2.3.3))(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)): dependencies: '@types/eslint': 8.40.2 eslint: 9.9.1(jiti@2.3.3) @@ -27641,7 +26194,7 @@ snapshots: micromatch: 4.0.8 normalize-path: 3.0.0 schema-utils: 4.2.0 - webpack: 5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19) + webpack: 5.88.0(@swc/core@1.7.14)(esbuild@0.17.19) eslint@8.57.0: dependencies: @@ -27694,7 +26247,7 @@ snapshots: '@eslint/eslintrc': 3.1.0 '@eslint/js': 9.9.1 '@humanwhocodes/module-importer': 1.0.1 - '@humanwhocodes/retry': 0.3.1 + '@humanwhocodes/retry': 0.3.0 '@nodelib/fs.walk': 1.2.8 ajv: 6.12.6 chalk: 4.1.2 @@ -27736,8 +26289,8 @@ snapshots: espree@10.2.0: dependencies: - acorn: 8.13.0 - acorn-jsx: 5.3.2(acorn@8.13.0) + acorn: 8.12.1 + acorn-jsx: 5.3.2(acorn@8.12.1) eslint-visitor-keys: 4.1.0 espree@9.6.1: @@ -27783,7 +26336,7 @@ snapshots: eth-block-tracker@7.1.0: dependencies: '@metamask/eth-json-rpc-provider': 1.0.1 - '@metamask/safe-event-emitter': 3.1.2 + '@metamask/safe-event-emitter': 3.1.1 '@metamask/utils': 5.0.2 json-rpc-random-id: 1.0.1 pify: 3.0.0 @@ -27792,7 +26345,7 @@ snapshots: eth-json-rpc-filters@6.0.1: dependencies: - '@metamask/safe-event-emitter': 3.1.2 + '@metamask/safe-event-emitter': 3.1.1 async-mutex: 0.2.6 eth-query: 2.1.2 json-rpc-engine: 6.1.0 @@ -28086,11 +26639,11 @@ snapshots: dependencies: flat-cache: 4.0.1 - file-loader@6.2.0(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)): + file-loader@6.2.0(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)): dependencies: loader-utils: 2.0.4 schema-utils: 3.3.0 - webpack: 5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19) + webpack: 5.88.0(@swc/core@1.7.14)(esbuild@0.17.19) file-uri-to-path@1.0.0: {} @@ -28183,7 +26736,7 @@ snapshots: flow-enums-runtime@0.0.6: {} - flow-parser@0.250.0: {} + flow-parser@0.247.1: {} focus-trap@7.5.4: dependencies: @@ -28214,9 +26767,9 @@ snapshots: forever-agent@0.6.1: {} - fork-ts-checker-webpack-plugin@6.5.3(eslint@9.9.1(jiti@2.3.3))(typescript@5.6.3)(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)): + fork-ts-checker-webpack-plugin@6.5.3(eslint@9.9.1(jiti@2.3.3))(typescript@5.6.3)(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)): dependencies: - '@babel/code-frame': 7.25.7 + '@babel/code-frame': 7.24.7 '@types/json-schema': 7.0.12 chalk: 4.1.2 chokidar: 3.6.0 @@ -28230,7 +26783,7 @@ snapshots: semver: 7.6.3 tapable: 1.1.3 typescript: 5.6.3 - webpack: 5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19) + webpack: 5.88.0(@swc/core@1.7.14)(esbuild@0.17.19) optionalDependencies: eslint: 9.9.1(jiti@2.3.3) @@ -28319,8 +26872,8 @@ snapshots: function.prototype.name@1.1.5: dependencies: call-bind: 1.0.7 - define-properties: 1.2.1 - es-abstract: 1.23.3 + define-properties: 1.2.0 + es-abstract: 1.21.2 functions-have-names: 1.2.3 function.prototype.name@1.1.6: @@ -28550,20 +27103,20 @@ snapshots: graphemer@1.4.0: {} - graphql-config@5.1.3(@types/node@22.7.7)(bufferutil@4.0.8)(cosmiconfig-toml-loader@1.0.0)(graphql@16.9.0)(typescript@5.6.3)(utf-8-validate@6.0.4): + graphql-config@5.1.3(@types/node@22.7.5)(bufferutil@4.0.8)(cosmiconfig-toml-loader@1.0.0)(graphql@16.9.0)(typescript@5.6.3)(utf-8-validate@6.0.4): dependencies: '@graphql-tools/graphql-file-loader': 8.0.1(graphql@16.9.0) '@graphql-tools/json-file-loader': 8.0.1(graphql@16.9.0) '@graphql-tools/load': 8.0.2(graphql@16.9.0) '@graphql-tools/merge': 9.0.4(graphql@16.9.0) - '@graphql-tools/url-loader': 8.0.2(@types/node@22.7.7)(bufferutil@4.0.8)(graphql@16.9.0)(utf-8-validate@6.0.4) + '@graphql-tools/url-loader': 8.0.2(@types/node@22.7.5)(bufferutil@4.0.8)(graphql@16.9.0)(utf-8-validate@6.0.4) '@graphql-tools/utils': 10.2.2(graphql@16.9.0) cosmiconfig: 8.3.6(typescript@5.6.3) graphql: 16.9.0 jiti: 2.3.3 minimatch: 9.0.5 string-env-interpolation: 1.0.1 - tslib: 2.8.0 + tslib: 2.7.0 optionalDependencies: cosmiconfig-toml-loader: 1.0.0 transitivePeerDependencies: @@ -28780,14 +27333,14 @@ snapshots: relateurl: 0.2.7 terser: 5.18.2 - html-webpack-plugin@5.5.3(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)): + html-webpack-plugin@5.5.3(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)): dependencies: '@types/html-minifier-terser': 6.1.0 html-minifier-terser: 6.1.0 lodash: 4.17.21 pretty-error: 4.0.0 tapable: 2.2.1 - webpack: 5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19) + webpack: 5.88.0(@swc/core@1.7.14)(esbuild@0.17.19) htmlescape@1.1.1: {} @@ -28917,11 +27470,11 @@ snapshots: i18next-browser-languagedetector@7.1.0: dependencies: - '@babel/runtime': 7.25.7 + '@babel/runtime': 7.25.6 i18next@23.11.5: dependencies: - '@babel/runtime': 7.25.7 + '@babel/runtime': 7.25.6 iconv-lite@0.4.24: dependencies: @@ -29384,8 +27937,8 @@ snapshots: istanbul-lib-instrument@5.2.1: dependencies: - '@babel/core': 7.25.8 - '@babel/parser': 7.25.8 + '@babel/core': 7.25.2 + '@babel/parser': 7.25.6 '@istanbuljs/schema': 0.1.3 istanbul-lib-coverage: 3.2.2 semver: 6.3.1 @@ -29394,7 +27947,7 @@ snapshots: istanbul-lib-instrument@6.0.3: dependencies: - '@babel/core': 7.25.8 + '@babel/core': 7.25.2 '@babel/parser': 7.25.6 '@istanbuljs/schema': 0.1.3 istanbul-lib-coverage: 3.2.2 @@ -29448,6 +28001,14 @@ snapshots: reflect.getprototypeof: 1.0.6 set-function-name: 2.0.2 + iterator.prototype@1.1.3: + dependencies: + define-properties: 1.2.1 + get-intrinsic: 1.2.4 + has-symbols: 1.0.3 + reflect.getprototypeof: 1.0.6 + set-function-name: 2.0.2 + jackspeak@2.3.6: dependencies: '@isaacs/cliui': 8.0.2 @@ -29496,7 +28057,7 @@ snapshots: '@jest/environment': 27.5.1 '@jest/test-result': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 22.7.7 + '@types/node': 22.7.4 chalk: 4.1.2 co: 4.6.0 dedent: 0.7.0 @@ -29515,16 +28076,16 @@ snapshots: transitivePeerDependencies: - supports-color - jest-cli@27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.5.5)(typescript@5.6.3))(utf-8-validate@5.0.10): + jest-cli@27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.3))(utf-8-validate@5.0.10): dependencies: - '@jest/core': 27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.5.5)(typescript@5.6.3))(utf-8-validate@5.0.10) + '@jest/core': 27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.3))(utf-8-validate@5.0.10) '@jest/test-result': 27.5.1 '@jest/types': 27.5.1 chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 import-local: 3.1.0 - jest-config: 27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.5.5)(typescript@5.6.3))(utf-8-validate@5.0.10) + jest-config: 27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.3))(utf-8-validate@5.0.10) jest-util: 27.5.1 jest-validate: 27.5.1 prompts: 2.4.2 @@ -29536,12 +28097,12 @@ snapshots: - ts-node - utf-8-validate - jest-config@27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.5.5)(typescript@5.6.3))(utf-8-validate@5.0.10): + jest-config@27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.3))(utf-8-validate@5.0.10): dependencies: - '@babel/core': 7.25.8 + '@babel/core': 7.25.2 '@jest/test-sequencer': 27.5.1 '@jest/types': 27.5.1 - babel-jest: 27.5.1(@babel/core@7.25.8) + babel-jest: 27.5.1(@babel/core@7.25.2) chalk: 4.1.2 ci-info: 3.9.0 deepmerge: 4.3.1 @@ -29563,7 +28124,7 @@ snapshots: slash: 3.0.0 strip-json-comments: 3.1.1 optionalDependencies: - ts-node: 10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.5.5)(typescript@5.6.3) + ts-node: 10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.3) transitivePeerDependencies: - bufferutil - canvas @@ -29601,7 +28162,7 @@ snapshots: '@jest/environment': 27.5.1 '@jest/fake-timers': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 22.7.7 + '@types/node': 22.7.4 jest-mock: 27.5.1 jest-util: 27.5.1 jsdom: 16.7.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) @@ -29616,7 +28177,7 @@ snapshots: '@jest/environment': 27.5.1 '@jest/fake-timers': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 22.7.7 + '@types/node': 22.7.4 jest-mock: 27.5.1 jest-util: 27.5.1 @@ -29625,7 +28186,7 @@ snapshots: '@jest/environment': 29.7.0 '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.7.7 + '@types/node': 22.7.5 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -29637,7 +28198,7 @@ snapshots: dependencies: '@jest/types': 27.5.1 '@types/graceful-fs': 4.1.6 - '@types/node': 22.7.7 + '@types/node': 22.7.4 anymatch: 3.1.3 fb-watchman: 2.0.2 graceful-fs: 4.2.11 @@ -29656,7 +28217,7 @@ snapshots: '@jest/source-map': 27.5.1 '@jest/test-result': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 22.7.7 + '@types/node': 22.7.4 chalk: 4.1.2 co: 4.6.0 expect: 27.5.1 @@ -29693,7 +28254,7 @@ snapshots: jest-message-util@27.5.1: dependencies: - '@babel/code-frame': 7.25.7 + '@babel/code-frame': 7.24.7 '@jest/types': 27.5.1 '@types/stack-utils': 2.0.1 chalk: 4.1.2 @@ -29705,7 +28266,7 @@ snapshots: jest-message-util@28.1.3: dependencies: - '@babel/code-frame': 7.25.7 + '@babel/code-frame': 7.24.7 '@jest/types': 28.1.3 '@types/stack-utils': 2.0.3 chalk: 4.1.2 @@ -29717,7 +28278,7 @@ snapshots: jest-message-util@29.7.0: dependencies: - '@babel/code-frame': 7.25.7 + '@babel/code-frame': 7.24.7 '@jest/types': 29.6.3 '@types/stack-utils': 2.0.3 chalk: 4.1.2 @@ -29730,12 +28291,12 @@ snapshots: jest-mock@27.5.1: dependencies: '@jest/types': 27.5.1 - '@types/node': 22.7.7 + '@types/node': 22.7.4 jest-mock@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 22.7.7 + '@types/node': 22.7.5 jest-util: 29.7.0 jest-pnp-resolver@1.2.3(jest-resolve@27.5.1): @@ -29774,7 +28335,7 @@ snapshots: '@jest/test-result': 27.5.1 '@jest/transform': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 22.7.7 + '@types/node': 22.7.4 chalk: 4.1.2 emittery: 0.8.1 graceful-fs: 4.2.11 @@ -29825,21 +28386,21 @@ snapshots: jest-serializer@27.5.1: dependencies: - '@types/node': 22.7.7 + '@types/node': 22.7.4 graceful-fs: 4.2.11 jest-snapshot@27.5.1: dependencies: - '@babel/core': 7.25.8 - '@babel/generator': 7.25.7 - '@babel/plugin-syntax-typescript': 7.25.4(@babel/core@7.25.8) - '@babel/traverse': 7.25.7 - '@babel/types': 7.25.8 + '@babel/core': 7.25.2 + '@babel/generator': 7.25.6 + '@babel/plugin-syntax-typescript': 7.25.4(@babel/core@7.25.2) + '@babel/traverse': 7.25.6 + '@babel/types': 7.25.6 '@jest/transform': 27.5.1 '@jest/types': 27.5.1 '@types/babel__traverse': 7.20.6 '@types/prettier': 2.7.3 - babel-preset-current-node-syntax: 1.0.1(@babel/core@7.25.8) + babel-preset-current-node-syntax: 1.0.1(@babel/core@7.25.2) chalk: 4.1.2 expect: 27.5.1 graceful-fs: 4.2.11 @@ -29858,7 +28419,7 @@ snapshots: jest-util@27.5.1: dependencies: '@jest/types': 27.5.1 - '@types/node': 22.7.7 + '@types/node': 22.7.4 chalk: 4.1.2 ci-info: 3.9.0 graceful-fs: 4.2.11 @@ -29867,7 +28428,7 @@ snapshots: jest-util@28.1.3: dependencies: '@jest/types': 28.1.3 - '@types/node': 22.7.7 + '@types/node': 22.7.5 chalk: 4.1.2 ci-info: 3.9.0 graceful-fs: 4.2.11 @@ -29876,7 +28437,7 @@ snapshots: jest-util@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 22.7.7 + '@types/node': 22.5.5 chalk: 4.1.2 ci-info: 3.9.0 graceful-fs: 4.2.11 @@ -29900,11 +28461,11 @@ snapshots: leven: 3.1.0 pretty-format: 29.7.0 - jest-watch-typeahead@1.1.0(jest@27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.5.5)(typescript@5.6.3))(utf-8-validate@5.0.10)): + jest-watch-typeahead@1.1.0(jest@27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.3))(utf-8-validate@5.0.10)): dependencies: ansi-escapes: 4.3.2 chalk: 4.1.2 - jest: 27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.5.5)(typescript@5.6.3))(utf-8-validate@5.0.10) + jest: 27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.3))(utf-8-validate@5.0.10) jest-regex-util: 28.0.2 jest-watcher: 28.1.3 slash: 4.0.0 @@ -29915,7 +28476,7 @@ snapshots: dependencies: '@jest/test-result': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 22.7.7 + '@types/node': 22.7.4 ansi-escapes: 4.3.2 chalk: 4.1.2 jest-util: 27.5.1 @@ -29925,7 +28486,7 @@ snapshots: dependencies: '@jest/test-result': 28.1.3 '@jest/types': 28.1.3 - '@types/node': 22.7.7 + '@types/node': 22.7.5 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.10.2 @@ -29934,34 +28495,34 @@ snapshots: jest-worker@26.6.2: dependencies: - '@types/node': 22.7.7 + '@types/node': 22.7.4 merge-stream: 2.0.0 supports-color: 7.2.0 jest-worker@27.5.1: dependencies: - '@types/node': 22.7.7 + '@types/node': 22.7.4 merge-stream: 2.0.0 supports-color: 8.1.1 jest-worker@28.1.3: dependencies: - '@types/node': 22.7.7 + '@types/node': 22.7.4 merge-stream: 2.0.0 supports-color: 8.1.1 jest-worker@29.7.0: dependencies: - '@types/node': 22.7.7 + '@types/node': 22.7.5 jest-util: 29.7.0 merge-stream: 2.0.0 supports-color: 8.1.1 - jest@27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.5.5)(typescript@5.6.3))(utf-8-validate@5.0.10): + jest@27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.3))(utf-8-validate@5.0.10): dependencies: - '@jest/core': 27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.5.5)(typescript@5.6.3))(utf-8-validate@5.0.10) + '@jest/core': 27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.3))(utf-8-validate@5.0.10) import-local: 3.1.0 - jest-cli: 27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.5.5)(typescript@5.6.3))(utf-8-validate@5.0.10) + jest-cli: 27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.3))(utf-8-validate@5.0.10) transitivePeerDependencies: - bufferutil - canvas @@ -30010,44 +28571,19 @@ snapshots: jscodeshift@0.14.0(@babel/preset-env@7.22.5(@babel/core@7.25.2)): dependencies: - '@babel/core': 7.25.8 - '@babel/parser': 7.25.8 - '@babel/plugin-proposal-class-properties': 7.18.6(@babel/core@7.25.8) - '@babel/plugin-proposal-nullish-coalescing-operator': 7.18.6(@babel/core@7.25.8) - '@babel/plugin-proposal-optional-chaining': 7.21.0(@babel/core@7.25.8) - '@babel/plugin-transform-modules-commonjs': 7.25.7(@babel/core@7.25.8) + '@babel/core': 7.25.2 + '@babel/parser': 7.25.6 + '@babel/plugin-proposal-class-properties': 7.18.6(@babel/core@7.25.2) + '@babel/plugin-proposal-nullish-coalescing-operator': 7.18.6(@babel/core@7.25.2) + '@babel/plugin-proposal-optional-chaining': 7.21.0(@babel/core@7.25.2) + '@babel/plugin-transform-modules-commonjs': 7.24.8(@babel/core@7.25.2) '@babel/preset-env': 7.22.5(@babel/core@7.25.2) - '@babel/preset-flow': 7.25.7(@babel/core@7.25.8) - '@babel/preset-typescript': 7.25.7(@babel/core@7.25.8) - '@babel/register': 7.25.7(@babel/core@7.25.8) - babel-core: 7.0.0-bridge.0(@babel/core@7.25.8) - chalk: 4.1.2 - flow-parser: 0.250.0 - graceful-fs: 4.2.11 - micromatch: 4.0.8 - neo-async: 2.6.2 - node-dir: 0.1.17 - recast: 0.21.5 - temp: 0.8.4 - write-file-atomic: 2.4.3 - transitivePeerDependencies: - - supports-color - - jscodeshift@0.14.0(@babel/preset-env@7.22.5(@babel/core@7.25.8)): - dependencies: - '@babel/core': 7.25.8 - '@babel/parser': 7.25.8 - '@babel/plugin-proposal-class-properties': 7.18.6(@babel/core@7.25.8) - '@babel/plugin-proposal-nullish-coalescing-operator': 7.18.6(@babel/core@7.25.8) - '@babel/plugin-proposal-optional-chaining': 7.21.0(@babel/core@7.25.8) - '@babel/plugin-transform-modules-commonjs': 7.25.7(@babel/core@7.25.8) - '@babel/preset-env': 7.22.5(@babel/core@7.25.8) - '@babel/preset-flow': 7.25.7(@babel/core@7.25.8) - '@babel/preset-typescript': 7.25.7(@babel/core@7.25.8) - '@babel/register': 7.25.7(@babel/core@7.25.8) - babel-core: 7.0.0-bridge.0(@babel/core@7.25.8) + '@babel/preset-flow': 7.24.7(@babel/core@7.25.2) + '@babel/preset-typescript': 7.24.7(@babel/core@7.25.2) + '@babel/register': 7.24.6(@babel/core@7.25.2) + babel-core: 7.0.0-bridge.0(@babel/core@7.25.2) chalk: 4.1.2 - flow-parser: 0.250.0 + flow-parser: 0.247.1 graceful-fs: 4.2.11 micromatch: 4.0.8 neo-async: 2.6.2 @@ -30133,8 +28669,6 @@ snapshots: jsesc@2.5.2: {} - jsesc@3.0.2: {} - json-buffer@3.0.0: {} json-buffer@3.0.1: {} @@ -30274,7 +28808,7 @@ snapshots: launch-editor@2.6.0: dependencies: - picocolors: 1.1.1 + picocolors: 1.1.0 shell-quote: 1.8.1 lazystream@1.0.1: @@ -30565,7 +29099,7 @@ snapshots: magicast@0.3.5: dependencies: '@babel/parser': 7.25.6 - '@babel/types': 7.25.8 + '@babel/types': 7.25.6 source-map-js: 1.2.1 make-dir@2.1.0: @@ -30679,15 +29213,15 @@ snapshots: merge2@1.4.1: {} - meros@1.3.0(@types/node@22.7.7): + meros@1.3.0(@types/node@22.7.5): optionalDependencies: - '@types/node': 22.7.7 + '@types/node': 22.7.5 methods@1.1.2: {} metro-babel-transformer@0.80.12: dependencies: - '@babel/core': 7.25.8 + '@babel/core': 7.25.2 flow-enums-runtime: 0.0.6 hermes-parser: 0.23.1 nullthrows: 1.1.1 @@ -30746,7 +29280,7 @@ snapshots: metro-minify-terser@0.80.12: dependencies: flow-enums-runtime: 0.0.6 - terser: 5.36.0 + terser: 5.34.1 metro-resolver@0.80.12: dependencies: @@ -30754,13 +29288,13 @@ snapshots: metro-runtime@0.80.12: dependencies: - '@babel/runtime': 7.25.7 + '@babel/runtime': 7.25.6 flow-enums-runtime: 0.0.6 metro-source-map@0.80.12: dependencies: - '@babel/traverse': 7.25.7 - '@babel/types': 7.25.8 + '@babel/traverse': 7.25.6 + '@babel/types': 7.25.6 flow-enums-runtime: 0.0.6 invariant: 2.2.4 metro-symbolicate: 0.80.12 @@ -30785,10 +29319,10 @@ snapshots: metro-transform-plugins@0.80.12: dependencies: - '@babel/core': 7.25.8 - '@babel/generator': 7.25.7 - '@babel/template': 7.25.7 - '@babel/traverse': 7.25.7 + '@babel/core': 7.25.2 + '@babel/generator': 7.25.6 + '@babel/template': 7.25.0 + '@babel/traverse': 7.25.6 flow-enums-runtime: 0.0.6 nullthrows: 1.1.1 transitivePeerDependencies: @@ -30796,10 +29330,10 @@ snapshots: metro-transform-worker@0.80.12(bufferutil@4.0.8)(utf-8-validate@5.0.10): dependencies: - '@babel/core': 7.25.8 - '@babel/generator': 7.25.7 - '@babel/parser': 7.25.8 - '@babel/types': 7.25.8 + '@babel/core': 7.25.2 + '@babel/generator': 7.25.6 + '@babel/parser': 7.25.6 + '@babel/types': 7.25.6 flow-enums-runtime: 0.0.6 metro: 0.80.12(bufferutil@4.0.8)(utf-8-validate@5.0.10) metro-babel-transformer: 0.80.12 @@ -30816,13 +29350,13 @@ snapshots: metro@0.80.12(bufferutil@4.0.8)(utf-8-validate@5.0.10): dependencies: - '@babel/code-frame': 7.25.7 - '@babel/core': 7.25.8 - '@babel/generator': 7.25.7 - '@babel/parser': 7.25.8 - '@babel/template': 7.25.7 - '@babel/traverse': 7.25.7 - '@babel/types': 7.25.8 + '@babel/code-frame': 7.24.7 + '@babel/core': 7.25.2 + '@babel/generator': 7.25.6 + '@babel/parser': 7.25.6 + '@babel/template': 7.25.0 + '@babel/traverse': 7.25.6 + '@babel/types': 7.25.6 accepts: 1.3.8 chalk: 4.1.2 ci-info: 2.0.0 @@ -30897,10 +29431,10 @@ snapshots: mimic-response@1.0.1: {} - mini-css-extract-plugin@2.7.6(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)): + mini-css-extract-plugin@2.7.6(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)): dependencies: schema-utils: 4.2.0 - webpack: 5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19) + webpack: 5.88.0(@swc/core@1.7.14)(esbuild@0.17.19) minify-stream@2.1.0: dependencies: @@ -31195,7 +29729,7 @@ snapshots: next-tick@1.1.0: {} - next@14.2.15(@babel/core@7.25.8)(@playwright/test@1.47.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + next@14.2.15(@babel/core@7.25.2)(@playwright/test@1.47.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: '@next/env': 14.2.15 '@swc/helpers': 0.5.5 @@ -31205,7 +29739,7 @@ snapshots: postcss: 8.4.31 react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - styled-jsx: 5.1.1(@babel/core@7.25.8)(react@18.3.1) + styled-jsx: 5.1.1(@babel/core@7.25.2)(react@18.3.1) optionalDependencies: '@next/swc-darwin-arm64': 14.2.15 '@next/swc-darwin-x64': 14.2.15 @@ -31728,7 +30262,7 @@ snapshots: registry-url: 5.1.0 semver: 6.3.1 - package-manager-detector@0.2.2: {} + package-manager-detector@0.2.0: {} pako@1.0.11: {} @@ -31766,7 +30300,7 @@ snapshots: parse-json@5.2.0: dependencies: - '@babel/code-frame': 7.25.7 + '@babel/code-frame': 7.24.7 error-ex: 1.3.2 json-parse-even-better-errors: 2.3.1 lines-and-columns: 1.2.4 @@ -32105,29 +30639,29 @@ snapshots: postcss: 8.4.49 postcss-value-parser: 4.2.0 - postcss-load-config@3.1.4(postcss@8.4.49)(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.5.5)(typescript@5.6.3)): + postcss-load-config@3.1.4(postcss@8.4.49)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.3)): dependencies: lilconfig: 2.1.0 yaml: 1.10.2 optionalDependencies: postcss: 8.4.49 - ts-node: 10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.5.5)(typescript@5.6.3) + ts-node: 10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.3) - postcss-load-config@4.0.1(postcss@8.4.49)(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.5.5)(typescript@5.6.3)): + postcss-load-config@4.0.1(postcss@8.4.49)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.3)): dependencies: lilconfig: 2.1.0 yaml: 2.6.0 optionalDependencies: postcss: 8.4.49 - ts-node: 10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.5.5)(typescript@5.6.3) + ts-node: 10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.3) - postcss-load-config@4.0.1(postcss@8.4.49)(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.7.7)(typescript@5.6.3)): + postcss-load-config@4.0.1(postcss@8.4.49)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.7.5)(typescript@5.6.3)): dependencies: lilconfig: 2.1.0 yaml: 2.6.0 optionalDependencies: postcss: 8.4.49 - ts-node: 10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.7.7)(typescript@5.6.3) + ts-node: 10.9.1(@swc/core@1.7.14)(@types/node@22.7.5)(typescript@5.6.3) postcss-load-config@6.0.1(jiti@2.3.3)(postcss@8.4.49)(tsx@4.19.1)(yaml@2.6.0): dependencies: @@ -32138,13 +30672,13 @@ snapshots: tsx: 4.19.1 yaml: 2.6.0 - postcss-loader@6.2.1(postcss@8.4.49)(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)): + postcss-loader@6.2.1(postcss@8.4.49)(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)): dependencies: cosmiconfig: 7.1.0 klona: 2.0.6 postcss: 8.4.49 semver: 7.3.8 - webpack: 5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19) + webpack: 5.88.0(@swc/core@1.7.14)(esbuild@0.17.19) postcss-logical@5.0.4(postcss@8.4.49): dependencies: @@ -32406,7 +30940,7 @@ snapshots: postcss@8.4.31: dependencies: nanoid: 3.3.7 - picocolors: 1.1.1 + picocolors: 1.1.0 source-map-js: 1.2.1 postcss@8.4.49: @@ -32417,8 +30951,6 @@ snapshots: preact@10.24.1: {} - preact@10.24.3: {} - preact@10.4.1: {} prelude-ls@1.1.2: {} @@ -32696,7 +31228,7 @@ snapshots: regenerator-runtime: 0.13.11 whatwg-fetch: 3.6.2 - react-dev-utils@12.0.1(eslint@9.9.1(jiti@2.3.3))(typescript@5.6.3)(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)): + react-dev-utils@12.0.1(eslint@9.9.1(jiti@2.3.3))(typescript@5.6.3)(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)): dependencies: '@babel/code-frame': 7.22.5 address: 1.2.2 @@ -32707,7 +31239,7 @@ snapshots: escape-string-regexp: 4.0.0 filesize: 8.0.7 find-up: 5.0.0 - fork-ts-checker-webpack-plugin: 6.5.3(eslint@9.9.1(jiti@2.3.3))(typescript@5.6.3)(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)) + fork-ts-checker-webpack-plugin: 6.5.3(eslint@9.9.1(jiti@2.3.3))(typescript@5.6.3)(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)) global-modules: 2.0.0 globby: 11.1.0 gzip-size: 6.0.0 @@ -32722,7 +31254,7 @@ snapshots: shell-quote: 1.8.1 strip-ansi: 6.0.1 text-table: 0.2.0 - webpack: 5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19) + webpack: 5.88.0(@swc/core@1.7.14)(esbuild@0.17.19) optionalDependencies: typescript: 5.6.3 transitivePeerDependencies: @@ -32730,7 +31262,7 @@ snapshots: - supports-color - vue-template-compiler - react-devtools-core@5.3.2(bufferutil@4.0.8)(utf-8-validate@5.0.10): + react-devtools-core@5.3.1(bufferutil@4.0.8)(utf-8-validate@5.0.10): dependencies: shell-quote: 1.8.1 ws: 7.5.10(bufferutil@4.0.8)(utf-8-validate@5.0.10) @@ -32752,21 +31284,14 @@ snapshots: react-is@18.3.1: {} - react-native-webview@11.26.1(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.11)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1): + react-native-webview@11.26.1(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.12)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1): dependencies: escape-string-regexp: 2.0.0 invariant: 2.2.4 react: 18.3.1 - react-native: 0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.11)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10) + react-native: 0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.12)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10) - react-native-webview@11.26.1(react-native@0.74.1(@babel/core@7.25.8)(@babel/preset-env@7.22.5(@babel/core@7.25.8))(@types/react@18.3.11)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1): - dependencies: - escape-string-regexp: 2.0.0 - invariant: 2.2.4 - react: 18.3.1 - react-native: 0.74.1(@babel/core@7.25.8)(@babel/preset-env@7.22.5(@babel/core@7.25.8))(@types/react@18.3.11)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10) - - react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.11)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10): + react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.12)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10): dependencies: '@jest/create-cache-key-function': 29.7.0 '@react-native-community/cli': 13.6.6(bufferutil@4.0.8)(utf-8-validate@5.0.10) @@ -32778,7 +31303,7 @@ snapshots: '@react-native/gradle-plugin': 0.74.83 '@react-native/js-polyfills': 0.74.83 '@react-native/normalize-colors': 0.74.83 - '@react-native/virtualized-lists': 0.74.83(@types/react@18.3.11)(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.11)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1) + '@react-native/virtualized-lists': 0.74.83(@types/react@18.3.12)(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.12)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1) abort-controller: 3.0.0 anser: 1.4.10 ansi-regex: 5.0.1 @@ -32797,7 +31322,7 @@ snapshots: pretty-format: 26.6.2 promise: 8.3.0 react: 18.3.1 - react-devtools-core: 5.3.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) + react-devtools-core: 5.3.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) react-refresh: 0.14.2 react-shallow-renderer: 16.15.0(react@18.3.1) regenerator-runtime: 0.13.11 @@ -32807,57 +31332,7 @@ snapshots: ws: 6.2.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) yargs: 17.7.2 optionalDependencies: - '@types/react': 18.3.11 - transitivePeerDependencies: - - '@babel/core' - - '@babel/preset-env' - - bufferutil - - encoding - - supports-color - - utf-8-validate - - react-native@0.74.1(@babel/core@7.25.8)(@babel/preset-env@7.22.5(@babel/core@7.25.8))(@types/react@18.3.11)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10): - dependencies: - '@jest/create-cache-key-function': 29.7.0 - '@react-native-community/cli': 13.6.6(bufferutil@4.0.8)(utf-8-validate@5.0.10) - '@react-native-community/cli-platform-android': 13.6.6 - '@react-native-community/cli-platform-ios': 13.6.6 - '@react-native/assets-registry': 0.74.83 - '@react-native/codegen': 0.74.83(@babel/preset-env@7.22.5(@babel/core@7.25.8)) - '@react-native/community-cli-plugin': 0.74.83(@babel/core@7.25.8)(@babel/preset-env@7.22.5(@babel/core@7.25.8))(bufferutil@4.0.8)(utf-8-validate@5.0.10) - '@react-native/gradle-plugin': 0.74.83 - '@react-native/js-polyfills': 0.74.83 - '@react-native/normalize-colors': 0.74.83 - '@react-native/virtualized-lists': 0.74.83(@types/react@18.3.11)(react-native@0.74.1(@babel/core@7.25.8)(@babel/preset-env@7.22.5(@babel/core@7.25.8))(@types/react@18.3.11)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1) - abort-controller: 3.0.0 - anser: 1.4.10 - ansi-regex: 5.0.1 - base64-js: 1.5.1 - chalk: 4.1.2 - event-target-shim: 5.0.1 - flow-enums-runtime: 0.0.6 - invariant: 2.2.4 - jest-environment-node: 29.7.0 - jsc-android: 250231.0.0 - memoize-one: 5.2.1 - metro-runtime: 0.80.12 - metro-source-map: 0.80.12 - mkdirp: 0.5.6 - nullthrows: 1.1.1 - pretty-format: 26.6.2 - promise: 8.3.0 - react: 18.3.1 - react-devtools-core: 5.3.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) - react-refresh: 0.14.2 - react-shallow-renderer: 16.15.0(react@18.3.1) - regenerator-runtime: 0.13.11 - scheduler: 0.24.0-canary-efb381bbf-20230505 - stacktrace-parser: 0.1.10 - whatwg-fetch: 3.6.20 - ws: 6.2.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) - yargs: 17.7.2 - optionalDependencies: - '@types/react': 18.3.11 + '@types/react': 18.3.12 transitivePeerDependencies: - '@babel/core' - '@babel/preset-env' @@ -32889,56 +31364,56 @@ snapshots: optionalDependencies: '@types/react': 18.3.1 - react-scripts@5.0.1(@babel/plugin-syntax-flow@7.25.7(@babel/core@7.22.5))(@babel/plugin-transform-react-jsx@7.25.7(@babel/core@7.22.5))(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/babel__core@7.20.5)(bufferutil@4.0.8)(esbuild@0.17.19)(eslint@9.9.1(jiti@2.3.3))(react@18.3.1)(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.5.5)(typescript@5.6.3))(type-fest@3.1.0)(typescript@5.6.3)(utf-8-validate@5.0.10): + react-scripts@5.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.22.5))(@babel/plugin-transform-react-jsx@7.25.2(@babel/core@7.22.5))(@swc/core@1.7.14)(@types/babel__core@7.20.5)(bufferutil@4.0.8)(esbuild@0.17.19)(eslint@9.9.1(jiti@2.3.3))(react@18.3.1)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.3))(type-fest@3.1.0)(typescript@5.6.3)(utf-8-validate@5.0.10): dependencies: '@babel/core': 7.22.5 - '@pmmmwh/react-refresh-webpack-plugin': 0.5.10(react-refresh@0.11.0)(type-fest@3.1.0)(webpack-dev-server@4.15.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)))(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)) + '@pmmmwh/react-refresh-webpack-plugin': 0.5.10(react-refresh@0.11.0)(type-fest@3.1.0)(webpack-dev-server@4.15.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)))(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)) '@svgr/webpack': 5.5.0 babel-jest: 27.5.1(@babel/core@7.22.5) - babel-loader: 8.3.0(@babel/core@7.22.5)(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)) + babel-loader: 8.3.0(@babel/core@7.22.5)(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)) babel-plugin-named-asset-import: 0.3.8(@babel/core@7.22.5) babel-preset-react-app: 10.0.1 bfj: 7.0.2 browserslist: 4.21.9 camelcase: 6.3.0 case-sensitive-paths-webpack-plugin: 2.4.0 - css-loader: 6.8.1(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)) - css-minimizer-webpack-plugin: 3.4.1(esbuild@0.17.19)(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)) + css-loader: 6.8.1(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)) + css-minimizer-webpack-plugin: 3.4.1(esbuild@0.17.19)(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)) dotenv: 10.0.0 dotenv-expand: 5.1.0 eslint: 9.9.1(jiti@2.3.3) - eslint-config-react-app: 7.0.1(@babel/plugin-syntax-flow@7.25.7(@babel/core@7.22.5))(@babel/plugin-transform-react-jsx@7.25.7(@babel/core@7.22.5))(eslint@9.9.1(jiti@2.3.3))(jest@27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.5.5)(typescript@5.6.3))(utf-8-validate@5.0.10))(typescript@5.6.3) - eslint-webpack-plugin: 3.2.0(eslint@9.9.1(jiti@2.3.3))(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)) - file-loader: 6.2.0(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)) + eslint-config-react-app: 7.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.22.5))(@babel/plugin-transform-react-jsx@7.25.2(@babel/core@7.22.5))(eslint@9.9.1(jiti@2.3.3))(jest@27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.3))(utf-8-validate@5.0.10))(typescript@5.6.3) + eslint-webpack-plugin: 3.2.0(eslint@9.9.1(jiti@2.3.3))(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)) + file-loader: 6.2.0(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)) fs-extra: 10.1.0 - html-webpack-plugin: 5.5.3(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)) + html-webpack-plugin: 5.5.3(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)) identity-obj-proxy: 3.0.0 - jest: 27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.5.5)(typescript@5.6.3))(utf-8-validate@5.0.10) + jest: 27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.3))(utf-8-validate@5.0.10) jest-resolve: 27.5.1 - jest-watch-typeahead: 1.1.0(jest@27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.5.5)(typescript@5.6.3))(utf-8-validate@5.0.10)) - mini-css-extract-plugin: 2.7.6(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)) + jest-watch-typeahead: 1.1.0(jest@27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.3))(utf-8-validate@5.0.10)) + mini-css-extract-plugin: 2.7.6(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)) postcss: 8.4.49 postcss-flexbugs-fixes: 5.0.2(postcss@8.4.49) - postcss-loader: 6.2.1(postcss@8.4.49)(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)) + postcss-loader: 6.2.1(postcss@8.4.49)(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)) postcss-normalize: 10.0.1(browserslist@4.21.9)(postcss@8.4.49) postcss-preset-env: 7.8.3(postcss@8.4.49) prompts: 2.4.2 react: 18.3.1 react-app-polyfill: 3.0.0 - react-dev-utils: 12.0.1(eslint@9.9.1(jiti@2.3.3))(typescript@5.6.3)(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)) + react-dev-utils: 12.0.1(eslint@9.9.1(jiti@2.3.3))(typescript@5.6.3)(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)) react-refresh: 0.11.0 resolve: 1.22.2 resolve-url-loader: 4.0.0 - sass-loader: 12.6.0(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)) + sass-loader: 12.6.0(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)) semver: 7.3.8 - source-map-loader: 3.0.2(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)) - style-loader: 3.3.3(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)) - tailwindcss: 3.4.14(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.5.5)(typescript@5.6.3)) - terser-webpack-plugin: 5.3.9(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)) - webpack: 5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19) - webpack-dev-server: 4.15.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)) - webpack-manifest-plugin: 4.1.1(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)) - workbox-webpack-plugin: 6.6.0(@types/babel__core@7.20.5)(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)) + source-map-loader: 3.0.2(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)) + style-loader: 3.3.3(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)) + tailwindcss: 3.4.14(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.3)) + terser-webpack-plugin: 5.3.9(@swc/core@1.7.14)(esbuild@0.17.19)(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)) + webpack: 5.88.0(@swc/core@1.7.14)(esbuild@0.17.19) + webpack-dev-server: 4.15.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)) + webpack-manifest-plugin: 4.1.1(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)) + workbox-webpack-plugin: 6.6.0(@types/babel__core@7.20.5)(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)) optionalDependencies: fsevents: 2.3.3 typescript: 5.6.3 @@ -33111,10 +31586,6 @@ snapshots: dependencies: regenerate: 1.4.2 - regenerate-unicode-properties@10.2.0: - dependencies: - regenerate: 1.4.2 - regenerate@1.4.2: {} regenerator-runtime@0.13.11: {} @@ -33123,7 +31594,7 @@ snapshots: regenerator-transform@0.15.1: dependencies: - '@babel/runtime': 7.25.4 + '@babel/runtime': 7.25.6 regex-parser@2.2.11: {} @@ -33143,15 +31614,6 @@ snapshots: unicode-match-property-ecmascript: 2.0.0 unicode-match-property-value-ecmascript: 2.1.0 - regexpu-core@6.1.1: - dependencies: - regenerate: 1.4.2 - regenerate-unicode-properties: 10.2.0 - regjsgen: 0.8.0 - regjsparser: 0.11.1 - unicode-match-property-ecmascript: 2.0.0 - unicode-match-property-value-ecmascript: 2.2.0 - registry-auth-token@4.2.2: dependencies: rc: 1.2.8 @@ -33160,12 +31622,6 @@ snapshots: dependencies: rc: 1.2.8 - regjsgen@0.8.0: {} - - regjsparser@0.11.1: - dependencies: - jsesc: 3.0.2 - regjsparser@0.9.1: dependencies: jsesc: 0.5.0 @@ -33176,7 +31632,7 @@ snapshots: relay-runtime@12.0.0: dependencies: - '@babel/runtime': 7.25.7 + '@babel/runtime': 7.25.6 fbjs: 3.0.5 invariant: 2.2.4 transitivePeerDependencies: @@ -33277,7 +31733,7 @@ snapshots: resolve@2.0.0-next.5: dependencies: - is-core-module: 2.15.1 + is-core-module: 2.15.0 path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 @@ -33333,20 +31789,20 @@ snapshots: rollup-plugin-terser@7.0.2(rollup@2.79.2): dependencies: - '@babel/code-frame': 7.25.7 + '@babel/code-frame': 7.24.7 jest-worker: 26.6.2 rollup: 2.79.2 serialize-javascript: 4.0.0 terser: 5.34.1 - rollup-plugin-visualizer@5.12.0(rollup@4.24.0): + rollup-plugin-visualizer@5.12.0(rollup@4.22.5): dependencies: open: 8.4.2 picomatch: 2.3.1 source-map: 0.7.4 yargs: 17.7.2 optionalDependencies: - rollup: 4.24.0 + rollup: 4.22.5 rollup@2.79.2: optionalDependencies: @@ -33356,26 +31812,26 @@ snapshots: optionalDependencies: fsevents: 2.3.3 - rollup@4.24.0: + rollup@4.22.5: dependencies: '@types/estree': 1.0.6 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.24.0 - '@rollup/rollup-android-arm64': 4.24.0 - '@rollup/rollup-darwin-arm64': 4.24.0 - '@rollup/rollup-darwin-x64': 4.24.0 - '@rollup/rollup-linux-arm-gnueabihf': 4.24.0 - '@rollup/rollup-linux-arm-musleabihf': 4.24.0 - '@rollup/rollup-linux-arm64-gnu': 4.24.0 - '@rollup/rollup-linux-arm64-musl': 4.24.0 - '@rollup/rollup-linux-powerpc64le-gnu': 4.24.0 - '@rollup/rollup-linux-riscv64-gnu': 4.24.0 - '@rollup/rollup-linux-s390x-gnu': 4.24.0 - '@rollup/rollup-linux-x64-gnu': 4.24.0 - '@rollup/rollup-linux-x64-musl': 4.24.0 - '@rollup/rollup-win32-arm64-msvc': 4.24.0 - '@rollup/rollup-win32-ia32-msvc': 4.24.0 - '@rollup/rollup-win32-x64-msvc': 4.24.0 + '@rollup/rollup-android-arm-eabi': 4.22.5 + '@rollup/rollup-android-arm64': 4.22.5 + '@rollup/rollup-darwin-arm64': 4.22.5 + '@rollup/rollup-darwin-x64': 4.22.5 + '@rollup/rollup-linux-arm-gnueabihf': 4.22.5 + '@rollup/rollup-linux-arm-musleabihf': 4.22.5 + '@rollup/rollup-linux-arm64-gnu': 4.22.5 + '@rollup/rollup-linux-arm64-musl': 4.22.5 + '@rollup/rollup-linux-powerpc64le-gnu': 4.22.5 + '@rollup/rollup-linux-riscv64-gnu': 4.22.5 + '@rollup/rollup-linux-s390x-gnu': 4.22.5 + '@rollup/rollup-linux-x64-gnu': 4.22.5 + '@rollup/rollup-linux-x64-musl': 4.22.5 + '@rollup/rollup-win32-arm64-msvc': 4.22.5 + '@rollup/rollup-win32-ia32-msvc': 4.22.5 + '@rollup/rollup-win32-x64-msvc': 4.22.5 fsevents: 2.3.3 rpc-websockets@7.11.0: @@ -33402,7 +31858,7 @@ snapshots: rtl-css-js@1.16.1: dependencies: - '@babel/runtime': 7.25.7 + '@babel/runtime': 7.25.4 run-applescript@7.0.0: {} @@ -33451,11 +31907,11 @@ snapshots: sanitize.css@13.0.0: {} - sass-loader@12.6.0(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)): + sass-loader@12.6.0(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)): dependencies: klona: 2.0.6 neo-async: 2.6.2 - webpack: 5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19) + webpack: 5.88.0(@swc/core@1.7.14)(esbuild@0.17.19) sax@1.2.4: {} @@ -33834,12 +32290,12 @@ snapshots: source-map-js@1.2.1: {} - source-map-loader@3.0.2(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)): + source-map-loader@3.0.2(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)): dependencies: abab: 2.0.6 iconv-lite: 0.6.3 source-map-js: 1.2.1 - webpack: 5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19) + webpack: 5.88.0(@swc/core@1.7.14)(esbuild@0.17.19) source-map-support@0.5.21: dependencies: @@ -33879,7 +32335,7 @@ snapshots: spdx-correct@3.2.0: dependencies: spdx-expression-parse: 3.0.1 - spdx-license-ids: 3.0.20 + spdx-license-ids: 3.0.13 spdx-exceptions@2.3.0: {} @@ -33890,8 +32346,6 @@ snapshots: spdx-license-ids@3.0.13: {} - spdx-license-ids@3.0.20: {} - spdy-transport@3.0.0: dependencies: debug: 4.3.7(supports-color@5.5.0) @@ -34136,8 +32590,8 @@ snapshots: string.prototype.trim@1.2.7: dependencies: call-bind: 1.0.7 - define-properties: 1.2.1 - es-abstract: 1.23.3 + define-properties: 1.2.0 + es-abstract: 1.21.2 string.prototype.trim@1.2.9: dependencies: @@ -34149,8 +32603,8 @@ snapshots: string.prototype.trimend@1.0.6: dependencies: call-bind: 1.0.7 - define-properties: 1.2.1 - es-abstract: 1.23.3 + define-properties: 1.2.0 + es-abstract: 1.21.2 string.prototype.trimend@1.0.8: dependencies: @@ -34161,8 +32615,8 @@ snapshots: string.prototype.trimstart@1.0.6: dependencies: call-bind: 1.0.7 - define-properties: 1.2.1 - es-abstract: 1.23.3 + define-properties: 1.2.0 + es-abstract: 1.21.2 string.prototype.trimstart@1.0.8: dependencies: @@ -34222,16 +32676,16 @@ snapshots: strnum@1.0.5: {} - style-loader@3.3.3(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)): + style-loader@3.3.3(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)): dependencies: - webpack: 5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19) + webpack: 5.88.0(@swc/core@1.7.14)(esbuild@0.17.19) - styled-jsx@5.1.1(@babel/core@7.25.8)(react@18.3.1): + styled-jsx@5.1.1(@babel/core@7.25.2)(react@18.3.1): dependencies: client-only: 0.0.1 react: 18.3.1 optionalDependencies: - '@babel/core': 7.25.8 + '@babel/core': 7.25.2 stylehacks@5.1.1(postcss@8.4.49): dependencies: @@ -34313,7 +32767,7 @@ snapshots: css-select: 4.3.0 css-tree: 1.1.3 csso: 4.2.0 - picocolors: 1.1.1 + picocolors: 1.1.0 stable: 0.1.8 swap-case@2.0.2: @@ -34325,7 +32779,7 @@ snapshots: synckit@0.9.1: dependencies: '@pkgr/core': 0.1.1 - tslib: 2.8.0 + tslib: 2.7.0 syncpack@12.3.3(typescript@5.6.3): dependencies: @@ -34359,7 +32813,7 @@ snapshots: tachyons@4.12.0: {} - tailwindcss@3.4.14(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.5.5)(typescript@5.6.3)): + tailwindcss@3.4.14(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.3)): dependencies: '@alloc/quick-lru': 5.2.0 arg: 5.0.2 @@ -34374,11 +32828,11 @@ snapshots: micromatch: 4.0.8 normalize-path: 3.0.0 object-hash: 3.0.0 - picocolors: 1.1.1 + picocolors: 1.1.0 postcss: 8.4.49 postcss-import: 15.1.0(postcss@8.4.49) postcss-js: 4.0.1(postcss@8.4.49) - postcss-load-config: 4.0.1(postcss@8.4.49)(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.5.5)(typescript@5.6.3)) + postcss-load-config: 4.0.1(postcss@8.4.49)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.3)) postcss-nested: 6.0.1(postcss@8.4.49) postcss-selector-parser: 6.0.13 resolve: 1.22.8 @@ -34386,7 +32840,7 @@ snapshots: transitivePeerDependencies: - ts-node - tailwindcss@3.4.14(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.7.7)(typescript@5.6.3)): + tailwindcss@3.4.14(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.7.5)(typescript@5.6.3)): dependencies: '@alloc/quick-lru': 5.2.0 arg: 5.0.2 @@ -34401,11 +32855,11 @@ snapshots: micromatch: 4.0.8 normalize-path: 3.0.0 object-hash: 3.0.0 - picocolors: 1.1.1 + picocolors: 1.1.0 postcss: 8.4.49 postcss-import: 15.1.0(postcss@8.4.49) postcss-js: 4.0.1(postcss@8.4.49) - postcss-load-config: 4.0.1(postcss@8.4.49)(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.7.7)(typescript@5.6.3)) + postcss-load-config: 4.0.1(postcss@8.4.49)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.7.5)(typescript@5.6.3)) postcss-nested: 6.0.1(postcss@8.4.49) postcss-selector-parser: 6.0.13 resolve: 1.22.8 @@ -34451,16 +32905,16 @@ snapshots: ansi-escapes: 4.3.2 supports-hyperlinks: 2.3.0 - terser-webpack-plugin@5.3.9(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)): + terser-webpack-plugin@5.3.9(@swc/core@1.7.14)(esbuild@0.17.19)(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)): dependencies: '@jridgewell/trace-mapping': 0.3.25 jest-worker: 27.5.1 schema-utils: 3.3.0 serialize-javascript: 6.0.1 terser: 5.34.1 - webpack: 5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19) + webpack: 5.88.0(@swc/core@1.7.14)(esbuild@0.17.19) optionalDependencies: - '@swc/core': 1.7.14(@swc/helpers@0.5.12) + '@swc/core': 1.7.14 esbuild: 0.17.19 terser@4.8.1: @@ -34484,13 +32938,6 @@ snapshots: commander: 2.20.3 source-map-support: 0.5.21 - terser@5.36.0: - dependencies: - '@jridgewell/source-map': 0.3.6 - acorn: 8.13.0 - commander: 2.20.3 - source-map-support: 0.5.21 - test-exclude@6.0.0: dependencies: '@istanbuljs/schema': 0.1.3 @@ -34676,7 +33123,7 @@ snapshots: ts-log@2.2.5: {} - ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.5.5)(typescript@5.6.3): + ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.3): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.11 @@ -34684,7 +33131,7 @@ snapshots: '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 '@types/node': 22.5.5 - acorn: 8.13.0 + acorn: 8.12.1 acorn-walk: 8.3.4 arg: 4.1.3 create-require: 1.1.1 @@ -34694,18 +33141,18 @@ snapshots: v8-compile-cache-lib: 3.0.1 yn: 3.1.1 optionalDependencies: - '@swc/core': 1.7.14(@swc/helpers@0.5.12) + '@swc/core': 1.7.14 optional: true - ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.7.7)(typescript@5.6.3): + ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.7.5)(typescript@5.6.3): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.11 '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 22.7.7 - acorn: 8.13.0 + '@types/node': 22.7.5 + acorn: 8.12.1 acorn-walk: 8.3.4 arg: 4.1.3 create-require: 1.1.1 @@ -34715,7 +33162,7 @@ snapshots: v8-compile-cache-lib: 3.0.1 yn: 3.1.1 optionalDependencies: - '@swc/core': 1.7.14(@swc/helpers@0.5.12) + '@swc/core': 1.7.14 optional: true ts-toolbelt@9.6.0: {} @@ -34739,7 +33186,7 @@ snapshots: tslib@2.8.0: {} - tsup@6.7.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(postcss@8.4.49)(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.5.5)(typescript@5.6.3))(typescript@5.6.3): + tsup@6.7.0(@swc/core@1.7.14)(postcss@8.4.49)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.3))(typescript@5.6.3): dependencies: bundle-require: 4.0.1(esbuild@0.17.19) cac: 6.7.14 @@ -34749,14 +33196,14 @@ snapshots: execa: 5.1.1 globby: 11.1.0 joycon: 3.1.1 - postcss-load-config: 3.1.4(postcss@8.4.49)(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.5.5)(typescript@5.6.3)) + postcss-load-config: 3.1.4(postcss@8.4.49)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.3)) resolve-from: 5.0.0 rollup: 3.25.3 source-map: 0.8.0-beta.0 sucrase: 3.32.0 tree-kill: 1.2.2 optionalDependencies: - '@swc/core': 1.7.14(@swc/helpers@0.5.12) + '@swc/core': 1.7.14 postcss: 8.4.49 typescript: 5.6.3 transitivePeerDependencies: @@ -34921,11 +33368,11 @@ snapshots: dependencies: ts-toolbelt: 9.6.0 - typescript-eslint@8.8.0(eslint@8.57.0)(typescript@5.6.3): + typescript-eslint@8.11.0(eslint@8.57.0)(typescript@5.6.3): dependencies: - '@typescript-eslint/eslint-plugin': 8.8.0(@typescript-eslint/parser@8.8.0(eslint@8.57.0)(typescript@5.6.3))(eslint@8.57.0)(typescript@5.6.3) - '@typescript-eslint/parser': 8.8.0(eslint@8.57.0)(typescript@5.6.3) - '@typescript-eslint/utils': 8.8.0(eslint@8.57.0)(typescript@5.6.3) + '@typescript-eslint/eslint-plugin': 8.11.0(@typescript-eslint/parser@8.11.0(eslint@8.57.0)(typescript@5.6.3))(eslint@8.57.0)(typescript@5.6.3) + '@typescript-eslint/parser': 8.11.0(eslint@8.57.0)(typescript@5.6.3) + '@typescript-eslint/utils': 8.11.0(eslint@8.57.0)(typescript@5.6.3) optionalDependencies: typescript: 5.6.3 transitivePeerDependencies: @@ -35008,8 +33455,6 @@ snapshots: unicode-match-property-value-ecmascript@2.1.0: {} - unicode-match-property-value-ecmascript@2.2.0: {} - unicode-property-aliases-ecmascript@2.1.0: {} unicorn-magic@0.1.0: {} @@ -35073,20 +33518,20 @@ snapshots: update-browserslist-db@1.0.11(browserslist@4.21.9): dependencies: browserslist: 4.21.9 - escalade: 3.2.0 - picocolors: 1.1.1 + escalade: 3.1.1 + picocolors: 1.1.0 update-browserslist-db@1.1.0(browserslist@4.23.3): dependencies: browserslist: 4.23.3 - escalade: 3.2.0 - picocolors: 1.1.1 + escalade: 3.1.2 + picocolors: 1.1.0 update-browserslist-db@1.1.1(browserslist@4.24.0): dependencies: browserslist: 4.24.0 escalade: 3.2.0 - picocolors: 1.1.1 + picocolors: 1.1.0 update-notifier@5.1.0: dependencies: @@ -35220,12 +33665,12 @@ snapshots: validator@13.12.0: {} - valtio@1.11.2(@types/react@18.3.11)(react@18.3.1): + valtio@1.11.2(@types/react@18.3.12)(react@18.3.1): dependencies: proxy-compare: 2.5.1 use-sync-external-store: 1.2.0(react@18.3.1) optionalDependencies: - '@types/react': 18.3.11 + '@types/react': 18.3.12 react: 18.3.1 value-or-promise@1.0.12: {} @@ -35260,13 +33705,13 @@ snapshots: - utf-8-validate - zod - vite-node@2.0.5(@types/node@22.5.5)(terser@5.36.0): + vite-node@2.0.5(@types/node@22.5.5)(terser@5.34.1): dependencies: cac: 6.7.14 debug: 4.3.7(supports-color@5.5.0) pathe: 1.1.2 tinyrainbow: 1.2.0 - vite: 5.4.9(@types/node@22.5.5)(terser@5.36.0) + vite: 5.4.10(@types/node@22.5.5)(terser@5.34.1) transitivePeerDependencies: - '@types/node' - less @@ -35278,13 +33723,13 @@ snapshots: - supports-color - terser - vite-node@2.0.5(@types/node@22.7.7)(terser@5.36.0): + vite-node@2.0.5(@types/node@22.7.5)(terser@5.34.1): dependencies: cac: 6.7.14 debug: 4.3.7(supports-color@5.5.0) pathe: 1.1.2 tinyrainbow: 1.2.0 - vite: 5.4.9(@types/node@22.7.7)(terser@5.36.0) + vite: 5.4.10(@types/node@22.7.5)(terser@5.34.1) transitivePeerDependencies: - '@types/node' - less @@ -35296,17 +33741,17 @@ snapshots: - supports-color - terser - vite-plugin-json5@1.1.2(@rollup/pluginutils@5.1.0(rollup@4.24.0))(vite@5.4.9(@types/node@22.5.5)(terser@5.36.0)): + vite-plugin-json5@1.1.2(@rollup/pluginutils@5.1.0(rollup@4.22.5))(vite@5.4.10(@types/node@22.5.5)(terser@5.34.1)): dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.24.0) + '@rollup/pluginutils': 5.1.0(rollup@4.22.5) json5: 2.2.3 - vite: 5.4.9(@types/node@22.5.5)(terser@5.36.0) + vite: 5.4.10(@types/node@22.5.5)(terser@5.34.1) - vite-plugin-node-polyfills@0.22.0(rollup@4.24.0)(vite@5.4.9(@types/node@22.5.5)(terser@5.36.0)): + vite-plugin-node-polyfills@0.22.0(rollup@4.22.5)(vite@5.4.10(@types/node@22.5.5)(terser@5.34.1)): dependencies: - '@rollup/plugin-inject': 5.0.5(rollup@4.24.0) + '@rollup/plugin-inject': 5.0.5(rollup@4.22.5) node-stdlib-browser: 1.2.0 - vite: 5.4.9(@types/node@22.5.5)(terser@5.36.0) + vite: 5.4.10(@types/node@22.5.5)(terser@5.34.1) transitivePeerDependencies: - rollup @@ -35316,44 +33761,44 @@ snapshots: fast-glob: 3.3.1 minimatch: 6.2.0 - vite@5.4.9(@types/node@22.5.5)(terser@5.36.0): + vite@5.4.10(@types/node@22.5.5)(terser@5.34.1): dependencies: esbuild: 0.21.5 postcss: 8.4.49 - rollup: 4.24.0 + rollup: 4.22.5 optionalDependencies: '@types/node': 22.5.5 fsevents: 2.3.3 - terser: 5.36.0 + terser: 5.34.1 - vite@5.4.9(@types/node@22.7.7)(terser@5.36.0): + vite@5.4.10(@types/node@22.7.5)(terser@5.34.1): dependencies: esbuild: 0.21.5 postcss: 8.4.49 - rollup: 4.24.0 + rollup: 4.22.5 optionalDependencies: - '@types/node': 22.7.7 + '@types/node': 22.7.5 fsevents: 2.3.3 - terser: 5.36.0 + terser: 5.34.1 - vitepress-plugin-search@1.0.4-alpha.22(flexsearch@0.7.43)(vitepress@1.3.4(@algolia/client-search@4.22.1)(@types/node@22.7.7)(@types/react@18.3.11)(axios@1.7.7)(idb-keyval@6.2.1)(postcss@8.4.49)(qrcode@1.5.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(search-insights@2.11.0)(terser@5.36.0)(typescript@5.6.3))(vue@3.5.12(typescript@5.6.3)): + vitepress-plugin-search@1.0.4-alpha.22(flexsearch@0.7.43)(vitepress@1.3.4(@algolia/client-search@4.22.1)(@types/node@22.7.5)(@types/react@18.3.12)(axios@1.7.7)(idb-keyval@6.2.1)(postcss@8.4.49)(qrcode@1.5.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(search-insights@2.11.0)(terser@5.34.1)(typescript@5.6.3))(vue@3.5.12(typescript@5.6.3)): dependencies: '@types/flexsearch': 0.7.3 '@types/markdown-it': 12.2.3 flexsearch: 0.7.43 glob-to-regexp: 0.4.1 markdown-it: 13.0.1 - vitepress: 1.3.4(@algolia/client-search@4.22.1)(@types/node@22.7.7)(@types/react@18.3.11)(axios@1.7.7)(idb-keyval@6.2.1)(postcss@8.4.49)(qrcode@1.5.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(search-insights@2.11.0)(terser@5.36.0)(typescript@5.6.3) + vitepress: 1.3.4(@algolia/client-search@4.22.1)(@types/node@22.7.5)(@types/react@18.3.12)(axios@1.7.7)(idb-keyval@6.2.1)(postcss@8.4.49)(qrcode@1.5.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(search-insights@2.11.0)(terser@5.34.1)(typescript@5.6.3) vue: 3.5.12(typescript@5.6.3) - vitepress@1.3.4(@algolia/client-search@4.22.1)(@types/node@22.7.7)(@types/react@18.3.11)(axios@1.7.7)(idb-keyval@6.2.1)(postcss@8.4.49)(qrcode@1.5.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(search-insights@2.11.0)(terser@5.36.0)(typescript@5.6.3): + vitepress@1.3.4(@algolia/client-search@4.22.1)(@types/node@22.7.5)(@types/react@18.3.12)(axios@1.7.7)(idb-keyval@6.2.1)(postcss@8.4.49)(qrcode@1.5.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(search-insights@2.11.0)(terser@5.34.1)(typescript@5.6.3): dependencies: '@docsearch/css': 3.6.1 - '@docsearch/js': 3.6.1(@algolia/client-search@4.22.1)(@types/react@18.3.11)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(search-insights@2.11.0) + '@docsearch/js': 3.6.1(@algolia/client-search@4.22.1)(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(search-insights@2.11.0) '@shikijs/core': 1.14.1 '@shikijs/transformers': 1.14.1 '@types/markdown-it': 14.1.2 - '@vitejs/plugin-vue': 5.1.2(vite@5.4.9(@types/node@22.7.7)(terser@5.36.0))(vue@3.5.12(typescript@5.6.3)) + '@vitejs/plugin-vue': 5.1.2(vite@5.4.10(@types/node@22.7.5)(terser@5.34.1))(vue@3.5.12(typescript@5.6.3)) '@vue/devtools-api': 7.3.8 '@vue/shared': 3.4.38 '@vueuse/core': 11.0.0(vue@3.5.12(typescript@5.6.3)) @@ -35362,7 +33807,7 @@ snapshots: mark.js: 8.11.1 minisearch: 7.1.0 shiki: 1.14.1 - vite: 5.4.9(@types/node@22.7.7)(terser@5.36.0) + vite: 5.4.10(@types/node@22.7.5)(terser@5.34.1) vue: 3.5.12(typescript@5.6.3) optionalDependencies: postcss: 8.4.49 @@ -35394,7 +33839,7 @@ snapshots: - typescript - universal-cookie - vitest@2.0.5(@types/node@22.5.5)(@vitest/browser@2.0.5)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.36.0): + vitest@2.0.5(@types/node@22.5.5)(@vitest/browser@2.0.5)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.34.1): dependencies: '@ampproject/remapping': 2.3.0 '@vitest/expect': 2.0.5 @@ -35412,12 +33857,12 @@ snapshots: tinybench: 2.9.0 tinypool: 1.0.1 tinyrainbow: 1.2.0 - vite: 5.4.9(@types/node@22.5.5)(terser@5.36.0) - vite-node: 2.0.5(@types/node@22.5.5)(terser@5.36.0) + vite: 5.4.10(@types/node@22.5.5)(terser@5.34.1) + vite-node: 2.0.5(@types/node@22.5.5)(terser@5.34.1) why-is-node-running: 2.3.0 optionalDependencies: '@types/node': 22.5.5 - '@vitest/browser': 2.0.5(bufferutil@4.0.8)(playwright@1.47.2)(typescript@5.6.3)(utf-8-validate@5.0.10)(vitest@2.0.5)(webdriverio@9.0.9(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + '@vitest/browser': 2.0.5(bufferutil@4.0.8)(playwright@1.47.2)(typescript@5.6.3)(utf-8-validate@5.0.10)(vitest@2.0.5)(webdriverio@9.0.9(bufferutil@4.0.8)(utf-8-validate@6.0.4)) jsdom: 16.7.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) transitivePeerDependencies: - less @@ -35429,7 +33874,7 @@ snapshots: - supports-color - terser - vitest@2.0.5(@types/node@22.5.5)(@vitest/browser@2.0.5)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@6.0.4))(terser@5.36.0): + vitest@2.0.5(@types/node@22.5.5)(@vitest/browser@2.0.5)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@6.0.4))(terser@5.34.1): dependencies: '@ampproject/remapping': 2.3.0 '@vitest/expect': 2.0.5 @@ -35447,8 +33892,8 @@ snapshots: tinybench: 2.9.0 tinypool: 1.0.1 tinyrainbow: 1.2.0 - vite: 5.4.9(@types/node@22.5.5)(terser@5.36.0) - vite-node: 2.0.5(@types/node@22.5.5)(terser@5.36.0) + vite: 5.4.10(@types/node@22.5.5)(terser@5.34.1) + vite-node: 2.0.5(@types/node@22.5.5)(terser@5.34.1) why-is-node-running: 2.3.0 optionalDependencies: '@types/node': 22.5.5 @@ -35464,7 +33909,7 @@ snapshots: - supports-color - terser - vitest@2.0.5(@types/node@22.7.7)(@vitest/browser@2.0.5)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.36.0): + vitest@2.0.5(@types/node@22.7.5)(@vitest/browser@2.0.5)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.34.1): dependencies: '@ampproject/remapping': 2.3.0 '@vitest/expect': 2.0.5 @@ -35482,12 +33927,12 @@ snapshots: tinybench: 2.9.0 tinypool: 1.0.1 tinyrainbow: 1.2.0 - vite: 5.4.9(@types/node@22.7.7)(terser@5.36.0) - vite-node: 2.0.5(@types/node@22.7.7)(terser@5.36.0) + vite: 5.4.10(@types/node@22.7.5)(terser@5.34.1) + vite-node: 2.0.5(@types/node@22.7.5)(terser@5.34.1) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 22.7.7 - '@vitest/browser': 2.0.5(bufferutil@4.0.8)(playwright@1.47.2)(typescript@5.6.3)(utf-8-validate@5.0.10)(vitest@2.0.5)(webdriverio@9.0.9(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + '@types/node': 22.7.5 + '@vitest/browser': 2.0.5(bufferutil@4.0.8)(playwright@1.47.2)(typescript@5.6.3)(utf-8-validate@5.0.10)(vitest@2.0.5)(webdriverio@9.0.9(bufferutil@4.0.8)(utf-8-validate@6.0.4)) jsdom: 16.7.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) transitivePeerDependencies: - less @@ -35559,23 +34004,6 @@ snapshots: '@noble/curves': 1.6.0 '@noble/hashes': 1.5.0 - webdriver@9.0.8(bufferutil@4.0.8)(utf-8-validate@5.0.10): - dependencies: - '@types/node': 20.14.15 - '@types/ws': 8.5.12 - '@wdio/config': 9.0.8 - '@wdio/logger': 9.0.8 - '@wdio/protocols': 9.0.8 - '@wdio/types': 9.0.8 - '@wdio/utils': 9.0.8 - deepmerge-ts: 7.1.0 - ws: 8.18.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) - transitivePeerDependencies: - - bufferutil - - supports-color - - utf-8-validate - optional: true - webdriver@9.0.8(bufferutil@4.0.8)(utf-8-validate@6.0.4): dependencies: '@types/node': 20.14.15 @@ -35592,41 +34020,6 @@ snapshots: - supports-color - utf-8-validate - webdriverio@9.0.9(bufferutil@4.0.8)(utf-8-validate@5.0.10): - dependencies: - '@types/node': 20.14.15 - '@types/sinonjs__fake-timers': 8.1.5 - '@wdio/config': 9.0.8 - '@wdio/logger': 9.0.8 - '@wdio/protocols': 9.0.8 - '@wdio/repl': 9.0.8 - '@wdio/types': 9.0.8 - '@wdio/utils': 9.0.8 - archiver: 7.0.1 - aria-query: 5.3.0 - cheerio: 1.0.0 - css-shorthand-properties: 1.1.1 - css-value: 0.0.1 - grapheme-splitter: 1.0.4 - htmlfy: 0.2.1 - import-meta-resolve: 4.1.0 - is-plain-obj: 4.1.0 - jszip: 3.10.1 - lodash.clonedeep: 4.5.0 - lodash.zip: 4.2.0 - minimatch: 9.0.5 - query-selector-shadow-dom: 1.0.1 - resq: 1.11.0 - rgb2hex: 0.2.5 - serialize-error: 11.0.3 - urlpattern-polyfill: 10.0.0 - webdriver: 9.0.8(bufferutil@4.0.8)(utf-8-validate@5.0.10) - transitivePeerDependencies: - - bufferutil - - supports-color - - utf-8-validate - optional: true - webdriverio@9.0.9(bufferutil@4.0.8)(utf-8-validate@6.0.4): dependencies: '@types/node': 20.14.15 @@ -35673,16 +34066,16 @@ snapshots: webidl-conversions@6.1.0: {} - webpack-dev-middleware@5.3.3(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)): + webpack-dev-middleware@5.3.3(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)): dependencies: colorette: 2.0.20 memfs: 3.5.3 mime-types: 2.1.35 range-parser: 1.2.1 schema-utils: 4.2.0 - webpack: 5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19) + webpack: 5.88.0(@swc/core@1.7.14)(esbuild@0.17.19) - webpack-dev-server@4.15.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)): + webpack-dev-server@4.15.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)): dependencies: '@types/bonjour': 3.5.10 '@types/connect-history-api-fallback': 1.5.0 @@ -35712,20 +34105,20 @@ snapshots: serve-index: 1.9.1 sockjs: 0.3.24 spdy: 4.0.2 - webpack-dev-middleware: 5.3.3(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)) + webpack-dev-middleware: 5.3.3(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)) ws: 8.18.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) optionalDependencies: - webpack: 5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19) + webpack: 5.88.0(@swc/core@1.7.14)(esbuild@0.17.19) transitivePeerDependencies: - bufferutil - debug - supports-color - utf-8-validate - webpack-manifest-plugin@4.1.1(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)): + webpack-manifest-plugin@4.1.1(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)): dependencies: tapable: 2.2.1 - webpack: 5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19) + webpack: 5.88.0(@swc/core@1.7.14)(esbuild@0.17.19) webpack-sources: 2.3.1 webpack-sources@1.4.3: @@ -35742,7 +34135,7 @@ snapshots: webpack-virtual-modules@0.6.2: {} - webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19): + webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19): dependencies: '@types/eslint-scope': 3.7.4 '@types/estree': 1.0.5 @@ -35765,7 +34158,7 @@ snapshots: neo-async: 2.6.2 schema-utils: 3.3.0 tapable: 2.2.1 - terser-webpack-plugin: 5.3.9(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)) + terser-webpack-plugin: 5.3.9(@swc/core@1.7.14)(esbuild@0.17.19)(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)) watchpack: 2.4.0 webpack-sources: 3.2.3 transitivePeerDependencies: @@ -35895,10 +34288,10 @@ snapshots: workbox-build@6.6.0(@types/babel__core@7.20.5): dependencies: '@apideck/better-ajv-errors': 0.3.6(ajv@8.12.0) - '@babel/core': 7.25.8 - '@babel/preset-env': 7.22.5(@babel/core@7.25.8) - '@babel/runtime': 7.25.7 - '@rollup/plugin-babel': 5.3.1(@babel/core@7.25.8)(@types/babel__core@7.20.5)(rollup@2.79.2) + '@babel/core': 7.25.2 + '@babel/preset-env': 7.22.5(@babel/core@7.25.2) + '@babel/runtime': 7.25.4 + '@rollup/plugin-babel': 5.3.1(@babel/core@7.25.2)(@types/babel__core@7.20.5)(rollup@2.79.2) '@rollup/plugin-node-resolve': 11.2.1(rollup@2.79.2) '@rollup/plugin-replace': 2.4.2(rollup@2.79.2) '@surma/rollup-plugin-off-main-thread': 2.2.3 @@ -35991,12 +34384,12 @@ snapshots: workbox-sw@6.6.0: {} - workbox-webpack-plugin@6.6.0(@types/babel__core@7.20.5)(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)): + workbox-webpack-plugin@6.6.0(@types/babel__core@7.20.5)(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)): dependencies: fast-json-stable-stringify: 2.1.0 pretty-bytes: 5.6.0 upath: 1.2.0 - webpack: 5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19) + webpack: 5.88.0(@swc/core@1.7.14)(esbuild@0.17.19) webpack-sources: 1.4.3 workbox-build: 6.6.0(@types/babel__core@7.20.5) transitivePeerDependencies: @@ -36174,7 +34567,7 @@ snapshots: yargs@16.2.0: dependencies: cliui: 7.0.4 - escalade: 3.2.0 + escalade: 3.1.2 get-caller-file: 2.0.5 require-directory: 2.1.1 string-width: 4.2.3 @@ -36184,7 +34577,7 @@ snapshots: yargs@17.7.2: dependencies: cliui: 8.0.1 - escalade: 3.2.0 + escalade: 3.1.2 get-caller-file: 2.0.5 require-directory: 2.1.1 string-width: 4.2.3 @@ -36226,10 +34619,17 @@ snapshots: zod@3.23.8: {} - zustand@4.4.1(@types/react@18.3.11)(immer@9.0.21)(react@18.3.1): + zustand@4.4.1(@types/react@18.3.12)(immer@9.0.21)(react@18.3.1): dependencies: use-sync-external-store: 1.2.0(react@18.3.1) optionalDependencies: - '@types/react': 18.3.11 + '@types/react': 18.3.12 + immer: 9.0.21 + react: 18.3.1 + + zustand@5.0.0(@types/react@18.3.12)(immer@9.0.21)(react@18.3.1)(use-sync-external-store@1.2.0(react@18.3.1)): + optionalDependencies: + '@types/react': 18.3.12 immer: 9.0.21 react: 18.3.1 + use-sync-external-store: 1.2.0(react@18.3.1) diff --git a/templates/nextjs/src/sway-api/common.ts b/templates/nextjs/src/sway-api/common.ts new file mode 100644 index 00000000000..2f0308eff49 --- /dev/null +++ b/templates/nextjs/src/sway-api/common.ts @@ -0,0 +1,53 @@ +/* Autogenerated file. Do not edit manually. */ + +/* eslint-disable eslint-comments/no-unlimited-disable */ +/* eslint-disable */ + +/* + Fuels version: 0.97.1 + Forc version: 0.65.2 +*/ + + +import type { FunctionFragment, InvokeFunction } from 'fuels'; + +/** + * Mimics Sway Enum. + * Requires one and only one Key-Value pair and raises error if more are provided. + */ +export type Enum = { + [K in keyof T]: Pick & { [P in Exclude]?: never }; +}[keyof T]; + +/** + * Mimics Sway Option type. + */ +export type Option = T | undefined; + +/** + * Mimics Sway Result enum type. + * Ok represents the success case, while Err represents the error case. + */ +export type Result = Enum<{ Ok: T; Err: E }>; + +/** + * Mimics Sway array type. For example, [u64; 10] is converted to ArrayOfLength. + */ +export type ArrayOfLength< + T, + Length extends number, + Arr extends unknown[] = [], +> = Arr['length'] extends Length ? Arr : ArrayOfLength; + +interface Types { + functions: Record; + configurables: Partial>; +} + +export type ProgramFunctionMapper = { + [K in keyof T]: InvokeFunction; +}; + +export type InterfaceFunctionMapper = { + [K in keyof T]: FunctionFragment; +}; \ No newline at end of file diff --git a/templates/vite/src/sway-api/common.ts b/templates/vite/src/sway-api/common.ts new file mode 100644 index 00000000000..2f0308eff49 --- /dev/null +++ b/templates/vite/src/sway-api/common.ts @@ -0,0 +1,53 @@ +/* Autogenerated file. Do not edit manually. */ + +/* eslint-disable eslint-comments/no-unlimited-disable */ +/* eslint-disable */ + +/* + Fuels version: 0.97.1 + Forc version: 0.65.2 +*/ + + +import type { FunctionFragment, InvokeFunction } from 'fuels'; + +/** + * Mimics Sway Enum. + * Requires one and only one Key-Value pair and raises error if more are provided. + */ +export type Enum = { + [K in keyof T]: Pick & { [P in Exclude]?: never }; +}[keyof T]; + +/** + * Mimics Sway Option type. + */ +export type Option = T | undefined; + +/** + * Mimics Sway Result enum type. + * Ok represents the success case, while Err represents the error case. + */ +export type Result = Enum<{ Ok: T; Err: E }>; + +/** + * Mimics Sway array type. For example, [u64; 10] is converted to ArrayOfLength. + */ +export type ArrayOfLength< + T, + Length extends number, + Arr extends unknown[] = [], +> = Arr['length'] extends Length ? Arr : ArrayOfLength; + +interface Types { + functions: Record; + configurables: Partial>; +} + +export type ProgramFunctionMapper = { + [K in keyof T]: InvokeFunction; +}; + +export type InterfaceFunctionMapper = { + [K in keyof T]: FunctionFragment; +}; \ No newline at end of file diff --git a/templates/vite/test/integration/predicate.test.ts b/templates/vite/test/integration/predicate.test.ts index 17a9b6f9540..511585156c8 100644 --- a/templates/vite/test/integration/predicate.test.ts +++ b/templates/vite/test/integration/predicate.test.ts @@ -7,7 +7,10 @@ import { describe, test, expect } from 'vitest'; * * Can't find these imports? Make sure you've run `fuels build` to generate these with typegen. */ -import { TestPredicate, TestPredicateInputs } from '../../src/sway-api/predicates/TestPredicate'; +import { + TestPredicate, + TestPredicateParameters, +} from '../../src/sway-api/predicates/TestPredicate'; /** * @group node @@ -30,7 +33,7 @@ describe('Predicate', () => { } = launched; // For a predicate, we need to pass in an argument to evaluate the predicate. - const predicateData: TestPredicateInputs = [1337]; + const predicateData: TestPredicateParameters['data'] = [1337]; // Now, we can instantiate our predicate. const predicate = new TestPredicate({ From 378e67ed3eedfea248a8138993a4f4807afbeab8 Mon Sep 17 00:00:00 2001 From: nedsalk Date: Fri, 13 Dec 2024 09:58:27 +0100 Subject: [PATCH 063/126] fix storage slots and imports in tests --- apps/demo-typegen/package.json | 6 +++--- apps/demo-typegen/src/demo.test.ts | 7 +++---- .../snippets/enums/using-enums-of-enums-1.ts | 4 ++-- .../snippets/enums/using-enums-of-enums-2.ts | 4 ++-- .../types/snippets/enums/using-sway-enums.ts | 4 ++-- .../renderers/ts/templates/contract-factory.hbs | 17 ++++------------- .../src/abi/fixtures/contract-factory.txt | 17 ++++------------- .../src/storage-test-contract.test.ts | 6 +++--- packages/fuels/test/features/build.test.ts | 4 ++-- 9 files changed, 25 insertions(+), 44 deletions(-) diff --git a/apps/demo-typegen/package.json b/apps/demo-typegen/package.json index 9ce2943d96a..19d8c31aad8 100644 --- a/apps/demo-typegen/package.json +++ b/apps/demo-typegen/package.json @@ -10,9 +10,9 @@ "forc:script": "pnpm fuels-forc build -p demo-script --release", "forc:predicate": "pnpm fuels-forc build -p demo-predicate --release", "build:types": "run-p types:*", - "types:contract": "pnpm fuels typegen -i demo-contract/out/release/demo-contract-abi.json -o src/contract-types", - "types:script": "pnpm fuels typegen -i demo-script/out/release/demo-script-abi.json -o src/script-types --script", - "types:predicate": "pnpm fuels typegen -i demo-predicate/out/release/demo-predicate-abi.json -o src/predicate-types --predicate" + "types:contract": "pnpm fuels typegen -i demo-contract/out/release -o src/contract-types", + "types:script": "pnpm fuels typegen -i demo-script/out/release -o src/script-types", + "types:predicate": "pnpm fuels typegen -i demo-predicate/out/release -o src/predicate-types" }, "license": "Apache-2.0", "dependencies": { diff --git a/apps/demo-typegen/src/demo.test.ts b/apps/demo-typegen/src/demo.test.ts index f9b0c654d44..9a6503ac2f7 100644 --- a/apps/demo-typegen/src/demo.test.ts +++ b/apps/demo-typegen/src/demo.test.ts @@ -2,11 +2,9 @@ import { toHex, Address, Wallet, FuelError, ErrorCode } from 'fuels'; import { expectToThrowFuelError, launchTestNode } from 'fuels/test-utils'; -import storageSlots from '../demo-contract/out/release/demo-contract-storage_slots.json'; - import { DemoContract, DemoContractFactory } from './contract-types'; import { DemoPredicate } from './predicate-types'; -import type { DemoPredicateInputs } from './predicate-types/DemoPredicate'; +import type { DemoPredicateParameters } from './predicate-types'; import { DemoScript } from './script-types'; /** @@ -21,6 +19,7 @@ describe('ExampleContract', () => { wallets: [wallet], } = launched; + const storageSlots = DemoContractFactory.storageSlots; // #region typegen-demo-contract-storage-slots // #context import { DemoContractFactory } from './sway-programs-api'; @@ -163,7 +162,7 @@ test('Example predicate', async () => { const receiver = Wallet.fromAddress(Address.fromRandom(), provider); - const predicateData: DemoPredicateInputs = []; + const predicateData: DemoPredicateParameters['data'] = []; const predicate = new DemoPredicate({ provider, data: predicateData, diff --git a/apps/docs/src/guide/types/snippets/enums/using-enums-of-enums-1.ts b/apps/docs/src/guide/types/snippets/enums/using-enums-of-enums-1.ts index 06a256f7ec5..d7924bccdab 100644 --- a/apps/docs/src/guide/types/snippets/enums/using-enums-of-enums-1.ts +++ b/apps/docs/src/guide/types/snippets/enums/using-enums-of-enums-1.ts @@ -2,7 +2,7 @@ import { Provider, Wallet } from 'fuels'; import { LOCAL_NETWORK_URL, WALLET_PVT_KEY } from '../../../../env'; import { EchoEnumFactory } from '../../../../typegend'; -import { UserErrorInput } from '../../../../typegend/contracts/EchoEnum'; +import { UserError } from '../../../../typegend/contracts/EchoEnumTypes'; const provider = await Provider.create(LOCAL_NETWORK_URL); const wallet = Wallet.fromPrivateKey(WALLET_PVT_KEY, provider); @@ -10,7 +10,7 @@ const deploy = await EchoEnumFactory.deploy(wallet); const { contract } = await deploy.waitForResult(); // #region snippet-1 -const enumParam = { UserError: UserErrorInput.InsufficientPermissions }; +const enumParam = { UserError: UserError.InsufficientPermissions }; const { value } = await contract.functions.echo_error_enum(enumParam).get(); diff --git a/apps/docs/src/guide/types/snippets/enums/using-enums-of-enums-2.ts b/apps/docs/src/guide/types/snippets/enums/using-enums-of-enums-2.ts index cf9faa6cc0d..7e94ecbecde 100644 --- a/apps/docs/src/guide/types/snippets/enums/using-enums-of-enums-2.ts +++ b/apps/docs/src/guide/types/snippets/enums/using-enums-of-enums-2.ts @@ -2,7 +2,7 @@ import { Provider, Wallet } from 'fuels'; import { LOCAL_NETWORK_URL, WALLET_PVT_KEY } from '../../../../env'; import { EchoEnumFactory } from '../../../../typegend'; -import { StateErrorInput } from '../../../../typegend/contracts/EchoEnum'; +import { StateError } from '../../../../typegend/contracts/EchoEnumTypes'; const provider = await Provider.create(LOCAL_NETWORK_URL); const wallet = Wallet.fromPrivateKey(WALLET_PVT_KEY, provider); @@ -10,7 +10,7 @@ const deploy = await EchoEnumFactory.deploy(wallet); const { contract } = await deploy.waitForResult(); // #region snippet-1 -const enumParam = { StateError: StateErrorInput.Completed }; +const enumParam = { StateError: StateError.Completed }; const { value } = await contract.functions.echo_error_enum(enumParam).get(); diff --git a/apps/docs/src/guide/types/snippets/enums/using-sway-enums.ts b/apps/docs/src/guide/types/snippets/enums/using-sway-enums.ts index 64e796e9ef8..59b399b3be1 100644 --- a/apps/docs/src/guide/types/snippets/enums/using-sway-enums.ts +++ b/apps/docs/src/guide/types/snippets/enums/using-sway-enums.ts @@ -3,14 +3,14 @@ import { Provider, Wallet } from 'fuels'; import { LOCAL_NETWORK_URL, WALLET_PVT_KEY } from '../../../../env'; import { EchoEnumFactory } from '../../../../typegend'; -import { StateErrorInput } from '../../../../typegend/contracts/EchoEnum'; +import { StateError } from '../../../../typegend/contracts/EchoEnumTypes'; const provider = await Provider.create(LOCAL_NETWORK_URL); const wallet = Wallet.fromPrivateKey(WALLET_PVT_KEY, provider); const deploy = await EchoEnumFactory.deploy(wallet); const { contract } = await deploy.waitForResult(); -const enumParam = StateErrorInput.Completed; +const enumParam = StateError.Completed; const { value } = await contract.functions .echo_state_error_enum(enumParam) diff --git a/packages/abi/src/gen/renderers/ts/templates/contract-factory.hbs b/packages/abi/src/gen/renderers/ts/templates/contract-factory.hbs index 607b594d671..386eacd5ec7 100644 --- a/packages/abi/src/gen/renderers/ts/templates/contract-factory.hbs +++ b/packages/abi/src/gen/renderers/ts/templates/contract-factory.hbs @@ -7,28 +7,19 @@ import { bytecode } from './{{name}}-bytecode'; import abi from './{{name}}-abi.json'; import storageSlots from './{{name}}-storage-slots.json'; -export class {{name}}Factory extends ContractFactory { +export class {{name}}Factory extends ContractFactory<{{name}}> { static readonly bytecode = bytecode; static readonly storageSlots: StorageSlot[] = storageSlots; constructor(accountOrProvider: Account | Provider) { - super(bytecode, abi, accountOrProvider); + super(bytecode, abi, accountOrProvider, {{name}}Factory.storageSlots); } - override deploy( - deployOptions?: DeployContractOptions - ): Promise> { - return super.deploy({ - storageSlots: {{name}}Factory.storageSlots, - ...deployOptions, - }); - } - - static async deploy ( + static deploy ( wallet: Account, options: DeployContractOptions = {} - ): Promise> { + ) { const factory = new {{name}}Factory(wallet); return factory.deploy(options); } diff --git a/packages/fuel-gauge/src/abi/fixtures/contract-factory.txt b/packages/fuel-gauge/src/abi/fixtures/contract-factory.txt index 102c0cd954f..c0789916ba4 100644 --- a/packages/fuel-gauge/src/abi/fixtures/contract-factory.txt +++ b/packages/fuel-gauge/src/abi/fixtures/contract-factory.txt @@ -16,28 +16,19 @@ import { bytecode } from './AbiContract-bytecode'; import abi from './AbiContract-abi.json'; import storageSlots from './AbiContract-storage-slots.json'; -export class AbiContractFactory extends ContractFactory { +export class AbiContractFactory extends ContractFactory { static readonly bytecode = bytecode; static readonly storageSlots: StorageSlot[] = storageSlots; constructor(accountOrProvider: Account | Provider) { - super(bytecode, abi, accountOrProvider); + super(bytecode, abi, accountOrProvider, AbiContractFactory.storageSlots); } - override deploy( - deployOptions?: DeployContractOptions - ): Promise> { - return super.deploy({ - storageSlots: AbiContractFactory.storageSlots, - ...deployOptions, - }); - } - - static async deploy ( + static deploy ( wallet: Account, options: DeployContractOptions = {} - ): Promise> { + ) { const factory = new AbiContractFactory(wallet); return factory.deploy(options); } diff --git a/packages/fuel-gauge/src/storage-test-contract.test.ts b/packages/fuel-gauge/src/storage-test-contract.test.ts index c47bddbedfe..300b533f014 100644 --- a/packages/fuel-gauge/src/storage-test-contract.test.ts +++ b/packages/fuel-gauge/src/storage-test-contract.test.ts @@ -123,7 +123,7 @@ describe('StorageTestContract', () => { }); it('should allow for overriding storage slots', async () => { - const { storageSlots } = StorageTestContract; + const { storageSlots } = StorageTestContractFactory; expect(storageSlots.length).toBeGreaterThan(2); const modifiedStorageSlots = storageSlots.slice(1).map(({ key }) => ({ @@ -176,7 +176,7 @@ describe('StorageTestContract', () => { }); test('automatically loads storage slots when using deployAsCreateTx', async () => { - const { storageSlots } = StorageTestContract; + const { storageSlots } = StorageTestContractFactory; const expectedStorageSlots = storageSlots.map(({ key, value }) => ({ key: `0x${key}`, value: `0x${value}`, @@ -197,7 +197,7 @@ describe('StorageTestContract', () => { }); test('automatically loads storage slots when using deployAsBlobTx', async () => { - const { storageSlots } = StorageTestContract; + const { storageSlots } = StorageTestContractFactory; const expectedStorageSlots = storageSlots.map(({ key, value }) => ({ key: `0x${key}`, value: `0x${value}`, diff --git a/packages/fuels/test/features/build.test.ts b/packages/fuels/test/features/build.test.ts index f03a6388419..68e159870df 100644 --- a/packages/fuels/test/features/build.test.ts +++ b/packages/fuels/test/features/build.test.ts @@ -98,7 +98,7 @@ describe('build', { timeout: 180000 }, () => { ].map((f) => join(paths.outputDir, f)); files.forEach((file) => expect(existsSync(file), `${file} does not exist`).toBeTruthy()); - expect(readdirSync(paths.outputContractsDir)).toHaveLength(3); + expect(readdirSync(paths.outputContractsDir)).toHaveLength(7); expect(autoStartFuelCore).toHaveBeenCalledTimes(0); expect(deploy).toHaveBeenCalledTimes(0); @@ -132,7 +132,7 @@ describe('build', { timeout: 180000 }, () => { ].map((f) => join(paths.outputDir, f)); files.forEach((file) => expect(existsSync(file), `${file} does not exist`).toBeTruthy()); - expect(readdirSync(paths.outputContractsDir)).toHaveLength(9); + expect(readdirSync(paths.outputContractsDir)).toHaveLength(25); expect(autoStartFuelCore).toHaveBeenCalledTimes(0); expect(deploy).toHaveBeenCalledTimes(0); From b904bdf8eb2e4ca5de862336dea100036e0718e7 Mon Sep 17 00:00:00 2001 From: nedsalk Date: Fri, 13 Dec 2024 10:10:01 +0100 Subject: [PATCH 064/126] fix linting --- packages/fuel-gauge/src/abi/abi-coder.test.ts | 8 ++++---- packages/fuel-gauge/src/fee.test.ts | 2 +- packages/fuels/src/cli/commands/typegen/index.ts | 2 +- templates/nextjs/test/integration/predicate.test.ts | 7 +++++-- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/packages/fuel-gauge/src/abi/abi-coder.test.ts b/packages/fuel-gauge/src/abi/abi-coder.test.ts index 08362679878..08f6456d859 100644 --- a/packages/fuel-gauge/src/abi/abi-coder.test.ts +++ b/packages/fuel-gauge/src/abi/abi-coder.test.ts @@ -4,6 +4,7 @@ import { expectToThrowFuelError, launchTestNode } from 'fuels/test-utils'; import { AbiContractFactory } from '../../test/typegen'; import type { AbiContract } from '../../test/typegen'; +import type { Option, Result } from '../../test/typegen/common'; import { EnumWithNative, ExternalEnum } from '../../test/typegen/contracts/AbiContractTypes'; import type { EnumWithBuiltinTypeInput, @@ -29,7 +30,6 @@ import type { StructWithSingleOptionOutput, StructWithSingleOptionInput, } from '../../test/typegen/contracts/AbiContractTypes'; -import type { Option, Result, Vec } from '../../test/typegen/contracts/common'; import { U16_MAX, @@ -789,7 +789,7 @@ describe('AbiCoder', () => { describe('types_array_with_vector', () => { it('should encode/decode just fine', async () => { - const input = [[1, 2, 3]] as [Vec]; + const input = [[1, 2, 3]] as [BigNumberish[]]; const expected = [[3, 2, 1]]; const { waitForResult } = await contract.functions.types_array_with_vector(input).call(); @@ -1751,8 +1751,8 @@ describe('AbiCoder', () => { describe('types_vector_option', () => { it('should encode/decode just fine', async () => { - const input: Vec = [{ a: [1, 2, 3, 4, 5] }]; - const expected: Vec = [{ a: [5, 4, 3, 2, 1] }]; + const input: StructWithMultiOptionInput[] = [{ a: [1, 2, 3, 4, 5] }]; + const expected: StructWithMultiOptionOutput[] = [{ a: [5, 4, 3, 2, 1] }]; const { waitForResult } = await contract.functions.types_vector_option(input).call(); diff --git a/packages/fuel-gauge/src/fee.test.ts b/packages/fuel-gauge/src/fee.test.ts index f5c5a53440e..469ff6dbb85 100644 --- a/packages/fuel-gauge/src/fee.test.ts +++ b/packages/fuel-gauge/src/fee.test.ts @@ -16,7 +16,7 @@ import { MultiTokenContract, MultiTokenContractFactory, } from '../test/typegen/contracts'; -import type { AddressInput } from '../test/typegen/contracts/MultiTokenContract'; +import type { AddressInput } from '../test/typegen/contracts/MultiTokenContractTypes'; import { PredicateU32 } from '../test/typegen/predicates/PredicateU32'; /** diff --git a/packages/fuels/src/cli/commands/typegen/index.ts b/packages/fuels/src/cli/commands/typegen/index.ts index 17683c5f256..da0fed1ec6d 100644 --- a/packages/fuels/src/cli/commands/typegen/index.ts +++ b/packages/fuels/src/cli/commands/typegen/index.ts @@ -16,7 +16,7 @@ interface RunTypegen { } function runFuelsTypegen(options: RunTypegen) { - const { inputs, output, silent } = options; + const { inputs, output } = options; const programDetails = getProgramDetails(inputs); diff --git a/templates/nextjs/test/integration/predicate.test.ts b/templates/nextjs/test/integration/predicate.test.ts index 17a9b6f9540..511585156c8 100644 --- a/templates/nextjs/test/integration/predicate.test.ts +++ b/templates/nextjs/test/integration/predicate.test.ts @@ -7,7 +7,10 @@ import { describe, test, expect } from 'vitest'; * * Can't find these imports? Make sure you've run `fuels build` to generate these with typegen. */ -import { TestPredicate, TestPredicateInputs } from '../../src/sway-api/predicates/TestPredicate'; +import { + TestPredicate, + TestPredicateParameters, +} from '../../src/sway-api/predicates/TestPredicate'; /** * @group node @@ -30,7 +33,7 @@ describe('Predicate', () => { } = launched; // For a predicate, we need to pass in an argument to evaluate the predicate. - const predicateData: TestPredicateInputs = [1337]; + const predicateData: TestPredicateParameters['data'] = [1337]; // Now, we can instantiate our predicate. const predicate = new TestPredicate({ From 0b016072f780ff59c58358f793c0278f7713e033 Mon Sep 17 00:00:00 2001 From: nedsalk Date: Fri, 13 Dec 2024 10:24:12 +0100 Subject: [PATCH 065/126] fix linting --- .../snippets/storage-slots/override-storage-slots.ts | 7 ++----- .../src/guide/predicates/snippets/custom-transactions.ts | 4 ++-- .../types/snippets/native-parameters/identity-address.ts | 2 +- .../types/snippets/native-parameters/identity-contract.ts | 2 +- apps/docs/src/guide/types/snippets/vectors.ts | 2 +- 5 files changed, 7 insertions(+), 10 deletions(-) diff --git a/apps/docs/src/guide/contracts/snippets/storage-slots/override-storage-slots.ts b/apps/docs/src/guide/contracts/snippets/storage-slots/override-storage-slots.ts index 0bb07720123..a4666980897 100644 --- a/apps/docs/src/guide/contracts/snippets/storage-slots/override-storage-slots.ts +++ b/apps/docs/src/guide/contracts/snippets/storage-slots/override-storage-slots.ts @@ -2,16 +2,13 @@ import { Provider, Wallet } from 'fuels'; import { LOCAL_NETWORK_URL, WALLET_PVT_KEY } from '../../../../env'; -import { - StorageTestContract, - StorageTestContractFactory, -} from '../../../../typegend'; +import { StorageTestContractFactory } from '../../../../typegend'; const provider = await Provider.create(LOCAL_NETWORK_URL); const deployer = Wallet.fromPrivateKey(WALLET_PVT_KEY, provider); const deploymentTx = await StorageTestContractFactory.deploy(deployer, { - storageSlots: StorageTestContract.storageSlots, + storageSlots: StorageTestContractFactory.storageSlots, }); await deploymentTx.waitForResult(); diff --git a/apps/docs/src/guide/predicates/snippets/custom-transactions.ts b/apps/docs/src/guide/predicates/snippets/custom-transactions.ts index cbf976af3a0..5e6bc37f36e 100644 --- a/apps/docs/src/guide/predicates/snippets/custom-transactions.ts +++ b/apps/docs/src/guide/predicates/snippets/custom-transactions.ts @@ -3,7 +3,7 @@ import { Provider, ScriptTransactionRequest, Wallet } from 'fuels'; import { LOCAL_NETWORK_URL, WALLET_PVT_KEY } from '../../../env'; import { ConfigurablePin } from '../../../typegend'; -import type { ConfigurablePinInputs } from '../../../typegend/predicates/ConfigurablePin'; +import type { ConfigurablePinParameters } from '../../../typegend/predicates/ConfigurablePin'; // Setup const provider = await Provider.create(LOCAL_NETWORK_URL); @@ -15,7 +15,7 @@ const amountToReceiver = 100_000; // Instantiate the predicate using valid predicate data, aka the pin we need // to send the funds to the receiver -const data: ConfigurablePinInputs = [1337]; +const data: ConfigurablePinParameters['data'] = [1337]; const predicate = new ConfigurablePin({ provider, data }); // Fund the predicate, so that we can send these funds via predicate logic diff --git a/apps/docs/src/guide/types/snippets/native-parameters/identity-address.ts b/apps/docs/src/guide/types/snippets/native-parameters/identity-address.ts index 36642e3fb95..a2886145e72 100644 --- a/apps/docs/src/guide/types/snippets/native-parameters/identity-address.ts +++ b/apps/docs/src/guide/types/snippets/native-parameters/identity-address.ts @@ -5,7 +5,7 @@ import { InputOutputTypesFactory } from '../../../../typegend'; import type { IdentityOutput, AddressOutput, -} from '../../../../typegend/contracts/InputOutputTypes'; +} from '../../../../typegend/contracts/InputOutputTypesTypes'; const provider = await Provider.create(LOCAL_NETWORK_URL); const wallet = Wallet.fromPrivateKey(WALLET_PVT_KEY, provider); diff --git a/apps/docs/src/guide/types/snippets/native-parameters/identity-contract.ts b/apps/docs/src/guide/types/snippets/native-parameters/identity-contract.ts index 6a1021ef45a..0a700158a99 100644 --- a/apps/docs/src/guide/types/snippets/native-parameters/identity-contract.ts +++ b/apps/docs/src/guide/types/snippets/native-parameters/identity-contract.ts @@ -5,7 +5,7 @@ import { InputOutputTypesFactory } from '../../../../typegend'; import type { ContractIdOutput, IdentityOutput, -} from '../../../../typegend/contracts/InputOutputTypes'; +} from '../../../../typegend/contracts/InputOutputTypesTypes'; const provider = await Provider.create(LOCAL_NETWORK_URL); const wallet = Wallet.fromPrivateKey(WALLET_PVT_KEY, provider); diff --git a/apps/docs/src/guide/types/snippets/vectors.ts b/apps/docs/src/guide/types/snippets/vectors.ts index 9fcedea29e9..cd4adb14264 100644 --- a/apps/docs/src/guide/types/snippets/vectors.ts +++ b/apps/docs/src/guide/types/snippets/vectors.ts @@ -6,7 +6,7 @@ import { BytecodeInputFactory, EchoEmployeeDataVectorFactory, } from '../../../typegend'; -import type { EmployeeDataInput } from '../../../typegend/contracts/EchoEmployeeDataVector'; +import type { EmployeeDataInput } from '../../../typegend/contracts/EchoEmployeeDataVectorTypes'; const provider = await Provider.create(LOCAL_NETWORK_URL); const wallet = Wallet.fromPrivateKey(WALLET_PVT_KEY, provider); From 2feadf189f4fa727bec848e6d3a96ec3bdfe35ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nedim=20Salki=C4=87?= Date: Fri, 13 Dec 2024 10:27:13 +0100 Subject: [PATCH 066/126] Update .changeset/poor-years-hang.md Co-authored-by: Peter Smith --- .changeset/poor-years-hang.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/poor-years-hang.md b/.changeset/poor-years-hang.md index 8eca3b2a1a9..ff8b978b830 100644 --- a/.changeset/poor-years-hang.md +++ b/.changeset/poor-years-hang.md @@ -1,4 +1,4 @@ --- --- -docs: migrate `guide/types` snippets +feat: ABI Gen From b44629953a352a28056bfe9cc93ae0b2e181a910 Mon Sep 17 00:00:00 2001 From: nedsalk Date: Fri, 13 Dec 2024 13:50:58 +0100 Subject: [PATCH 067/126] improve type arguments representation --- packages/abi/src/parser/abi.ts | 10 +++-- .../specifications/v1/resolvable-type.ts | 28 ++++++++++++-- .../parser/specifications/v1/resolved-type.ts | 32 ++++++++++++++-- packages/fuel-gauge/src/abi/abi-parser.json | 38 +++++++++---------- 4 files changed, 77 insertions(+), 31 deletions(-) diff --git a/packages/abi/src/parser/abi.ts b/packages/abi/src/parser/abi.ts index db339ea8585..345851ec354 100644 --- a/packages/abi/src/parser/abi.ts +++ b/packages/abi/src/parser/abi.ts @@ -65,23 +65,25 @@ export interface AbiMetadataType { export interface AbiTypeComponent { name: string; - type: AbiConcreteType | AbiMetadataComponent; + type: AbiConcreteType | AbiAppliedMetadataType; } /** - * AbiMetadataComponents point to a metadata type but aren't the same, + * AbiAppliedMetadataType point to a metadata type but aren't the same as metadata types, * as the metadata type describes the structure of the type, * whereas the component is an actual implementation of that type. */ -export interface AbiMetadataComponent { +export interface AbiAppliedMetadataType { swayType: string; components?: AbiTypeComponent[]; metadata: { metadataTypeId: number; - typeArguments?: AbiConcreteType[]; + typeArguments?: AbiTypeArgument[]; }; } +export type AbiTypeArgument = AbiConcreteType | AbiAppliedMetadataType; + export interface AbiFunctionInput { name: string; type: AbiConcreteType; diff --git a/packages/abi/src/parser/specifications/v1/resolvable-type.ts b/packages/abi/src/parser/specifications/v1/resolvable-type.ts index d48381363f9..f1841ac8475 100644 --- a/packages/abi/src/parser/specifications/v1/resolvable-type.ts +++ b/packages/abi/src/parser/specifications/v1/resolvable-type.ts @@ -1,7 +1,7 @@ import { FuelError } from '@fuel-ts/errors'; import { swayTypeMatchers } from '../../../matchers/sway-type-matchers'; -import type { AbiConcreteType, AbiTypeComponent, AbiMetadataType } from '../../abi'; +import type { AbiTypeComponent, AbiMetadataType, AbiTypeArgument } from '../../abi'; import type { ResolvedComponent } from './resolved-type'; import { ResolvedType } from './resolved-type'; @@ -69,9 +69,29 @@ export class ResolvableType { })); } if (this.typeParamsArgsMap) { - result.metadata.typeArguments = this.typeParamsArgsMap.map( - ([, rt]) => rt.toAbiType() as AbiConcreteType - ); + result.metadata.typeArguments = this.typeParamsArgsMap.map(([, rt]) => rt.toTypeArgument()); + } + + return result; + } + + toTypeArgument(): AbiTypeArgument { + const result: AbiTypeArgument = { + swayType: this.swayType, + metadata: { + metadataTypeId: this.metadataTypeId, + }, + }; + + if (this.typeParamsArgsMap) { + result.metadata.typeArguments = this.typeParamsArgsMap.map(([, ta]) => ta.toTypeArgument()); + } + + if (this.components) { + result.components = this.components.map((component) => ({ + name: component.name, + type: component.type.toComponentType(), + })); } return result; diff --git a/packages/abi/src/parser/specifications/v1/resolved-type.ts b/packages/abi/src/parser/specifications/v1/resolved-type.ts index 8fe7cf7ac1a..3b74a805ed5 100644 --- a/packages/abi/src/parser/specifications/v1/resolved-type.ts +++ b/packages/abi/src/parser/specifications/v1/resolved-type.ts @@ -1,4 +1,4 @@ -import type { AbiConcreteType, AbiTypeComponent } from '../../abi'; +import type { AbiConcreteType, AbiTypeArgument, AbiTypeComponent } from '../../abi'; import type { AbiMetadataTypeV1 } from './specification'; @@ -50,9 +50,7 @@ export class ResolvedType { metadataTypeId: this.metadataType.metadataTypeId, }; if (this.typeParamsArgsMap && this.metadataType?.typeParameters?.length) { - result.metadata.typeArguments = this.typeParamsArgsMap.map( - (t) => t[1].toAbiType() as AbiConcreteType - ); + result.metadata.typeArguments = this.typeParamsArgsMap.map((t) => t[1].toTypeArgument()); } } @@ -66,6 +64,32 @@ export class ResolvedType { return result; } + toTypeArgument(): AbiTypeArgument { + if (typeof this.typeId === 'string') { + return this.toAbiType(); + } + + const result: AbiTypeArgument = { + swayType: this.swayType, + metadata: { + metadataTypeId: this.typeId, + }, + }; + + if (this.typeParamsArgsMap) { + result.metadata.typeArguments = this.typeParamsArgsMap.map(([, rt]) => rt.toTypeArgument()); + } + + if (this.components) { + result.components = this.components.map((component) => ({ + name: component.name, + type: component.type.toComponentType(), + })); + } + + return result; + } + public toAbiType(): AbiConcreteType { const res: AbiConcreteType = { concreteTypeId: this.typeId as string, diff --git a/packages/fuel-gauge/src/abi/abi-parser.json b/packages/fuel-gauge/src/abi/abi-parser.json index adaea93393b..676d2904955 100644 --- a/packages/fuel-gauge/src/abi/abi-parser.json +++ b/packages/fuel-gauge/src/abi/abi-parser.json @@ -47,7 +47,6 @@ "swayType": "bool" }, { - "concreteTypeId": 3, "swayType": "b256", "metadata": { "metadataTypeId": 3 @@ -228,8 +227,18 @@ "metadataTypeId": 14, "typeArguments": [ { - "metadataTypeId": 9, "swayType": "struct GenericStruct", + "metadata": { + "metadataTypeId": 9, + "typeArguments": [ + { + "swayType": "generic E", + "metadata": { + "metadataTypeId": 4 + } + } + ] + }, "components": [ { "name": "a", @@ -256,12 +265,6 @@ } } } - ], - "typeParameters": [ - { - "metadataTypeId": 4, - "swayType": "generic E" - } ] } ] @@ -275,8 +278,10 @@ "metadataTypeId": 9, "typeArguments": [ { - "metadataTypeId": 4, - "swayType": "generic E" + "swayType": "generic E", + "metadata": { + "metadataTypeId": 4 + } } ] }, @@ -320,7 +325,6 @@ "metadataTypeId": 14, "typeArguments": [ { - "concreteTypeId": 9, "swayType": "struct GenericStruct", "metadata": { "metadataTypeId": 9, @@ -411,8 +415,10 @@ "metadataTypeId": 8, "typeArguments": [ { - "metadataTypeId": 4, - "swayType": "generic E" + "swayType": "generic E", + "metadata": { + "metadataTypeId": 4 + } }, { "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef", @@ -583,7 +589,6 @@ "swayType": "bool" }, { - "concreteTypeId": 3, "swayType": "b256", "metadata": { "metadataTypeId": 3 @@ -789,7 +794,6 @@ "metadataTypeId": 14, "typeArguments": [ { - "concreteTypeId": 9, "swayType": "struct GenericStruct", "metadata": { "metadataTypeId": 9, @@ -880,7 +884,6 @@ "metadataTypeId": 14, "typeArguments": [ { - "concreteTypeId": 9, "swayType": "struct GenericStruct", "metadata": { "metadataTypeId": 9, @@ -1291,7 +1294,6 @@ "metadataTypeId": 14, "typeArguments": [ { - "concreteTypeId": 9, "swayType": "struct GenericStruct", "metadata": { "metadataTypeId": 9, @@ -1382,7 +1384,6 @@ "metadataTypeId": 14, "typeArguments": [ { - "concreteTypeId": 9, "swayType": "struct GenericStruct", "metadata": { "metadataTypeId": 9, @@ -1605,7 +1606,6 @@ "swayType": "bool" }, { - "concreteTypeId": 3, "swayType": "b256", "metadata": { "metadataTypeId": 3 From e330aba4da0ff4fe0df5ce4f2dcea02f10f83a0d Mon Sep 17 00:00:00 2001 From: nedsalk Date: Fri, 13 Dec 2024 13:54:00 +0100 Subject: [PATCH 068/126] fix type arguments --- packages/abi/src/gen/renderers/ts/typers/struct.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/abi/src/gen/renderers/ts/typers/struct.ts b/packages/abi/src/gen/renderers/ts/typers/struct.ts index c77659030c4..d692ebc1064 100644 --- a/packages/abi/src/gen/renderers/ts/typers/struct.ts +++ b/packages/abi/src/gen/renderers/ts/typers/struct.ts @@ -1,7 +1,7 @@ import { assertUnreachable } from '@fuel-ts/utils'; import { ENUM_REGEX, STRUCT_REGEX, TUPLE_REGEX } from '../../../../matchers/sway-type-matchers'; -import type { AbiConcreteType, AbiTypeComponent, AbiMetadataType } from '../../../../parser'; +import type { AbiTypeComponent, AbiMetadataType, AbiTypeArgument } from '../../../../parser'; import { flattenImports } from './helpers'; import type { TyperReturn, Typer, GlobalTyper, TyperAbiType } from './types'; @@ -22,7 +22,7 @@ function wrapStructContent(text: string, wrap: '{}' | '[]' | 'Enum'): string { } function componentMapper( - c: AbiTypeComponent | { name: string; type: AbiConcreteType | AbiMetadataType }, + c: AbiTypeComponent, includeName: boolean, generateTsType: GlobalTyper ): TyperReturn { @@ -74,9 +74,7 @@ export function mapComponents(params: { } function mapGenericTypeParameters( - typeArgs: - | AbiMetadataType['typeParameters'] - | NonNullable['typeArguments'], + typeArgs: AbiTypeArgument[] | AbiMetadataType['typeParameters'], typer: GlobalTyper ): TyperReturn { if (!typeArgs) { From f526b0492c7783e69a59f795bcc73b344e7b1a0f Mon Sep 17 00:00:00 2001 From: nedsalk Date: Fri, 13 Dec 2024 14:20:44 +0100 Subject: [PATCH 069/126] explanatory comment --- packages/abi/src/gen/renderers/ts/typers/simple.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/abi/src/gen/renderers/ts/typers/simple.ts b/packages/abi/src/gen/renderers/ts/typers/simple.ts index 8616d7a067c..9440f5aec51 100644 --- a/packages/abi/src/gen/renderers/ts/typers/simple.ts +++ b/packages/abi/src/gen/renderers/ts/typers/simple.ts @@ -73,6 +73,7 @@ const voidTyperReturn: TyperReturn = { input: 'undefined', output: 'void' }; export const voidTyper: Typer = () => voidTyperReturn; export const genericTyper: Typer = ({ abiType }) => { + // extracts the `T` part from `generic T` const typeName = GENERIC_REGEX.exec(abiType.swayType)?.[1] as string; return { input: typeName, From 10681978ae73df5605717c92f99c023b6056bf6d Mon Sep 17 00:00:00 2001 From: nedsalk Date: Fri, 13 Dec 2024 14:24:18 +0100 Subject: [PATCH 070/126] move types to separate file --- packages/abi/src/gen/abi-gen-types.ts | 23 +++++++++++++++++- packages/abi/src/gen/abi-gen.ts | 24 +------------------ packages/abi/src/gen/index.ts | 2 +- packages/abi/src/gen/renderers/getRenderer.ts | 2 +- .../abi/src/gen/renderers/ts/render-ts.ts | 2 +- .../ts/renderers/render-index-files.ts | 2 +- .../renderers/ts/renderers/render-program.ts | 2 +- .../renderers/ts/renderers/render-programs.ts | 2 +- .../renderers/ts/renderers/render-types.ts | 2 +- packages/abi/src/gen/renderers/types.ts | 2 +- 10 files changed, 31 insertions(+), 32 deletions(-) diff --git a/packages/abi/src/gen/abi-gen-types.ts b/packages/abi/src/gen/abi-gen-types.ts index 10051c76805..1c146005e3c 100644 --- a/packages/abi/src/gen/abi-gen-types.ts +++ b/packages/abi/src/gen/abi-gen-types.ts @@ -1 +1,22 @@ -// Placeholder +import type { BinaryVersions } from '@fuel-ts/versions'; + +import type { Abi } from '../parser'; + +export interface AbiGenInput { + programDetails: ProgramDetails[]; + versions: BinaryVersions; + mode?: 'ts'; +} + +export interface AbiGenResult { + filename: string; + content: string; +} + +export interface ProgramDetails { + name: string; + binCompressed: string; + abi: Abi; + abiContents: string; + storageSlots?: string; +} diff --git a/packages/abi/src/gen/abi-gen.ts b/packages/abi/src/gen/abi-gen.ts index cce88032829..36778bcaaac 100644 --- a/packages/abi/src/gen/abi-gen.ts +++ b/packages/abi/src/gen/abi-gen.ts @@ -1,28 +1,6 @@ -import type { BinaryVersions } from '@fuel-ts/versions'; - -import type { Abi } from '../parser'; - +import type { AbiGenInput, AbiGenResult } from './abi-gen-types'; import { getRenderer } from './renderers/getRenderer'; -export interface AbiGenInput { - programDetails: ProgramDetails[]; - versions: BinaryVersions; - mode?: 'ts'; -} - -export interface AbiGenResult { - filename: string; - content: string; -} - -export interface ProgramDetails { - name: string; - binCompressed: string; - abi: Abi; - abiContents: string; - storageSlots?: string; -} - export class AbiGen { public static generate({ programDetails, mode, versions }: AbiGenInput): AbiGenResult[] { const render = getRenderer(mode); diff --git a/packages/abi/src/gen/index.ts b/packages/abi/src/gen/index.ts index 68cc18ab955..29b42ee4313 100644 --- a/packages/abi/src/gen/index.ts +++ b/packages/abi/src/gen/index.ts @@ -1,2 +1,2 @@ export { AbiGen } from './abi-gen'; -export type { ProgramDetails } from './abi-gen'; +export * from './abi-gen-types'; diff --git a/packages/abi/src/gen/renderers/getRenderer.ts b/packages/abi/src/gen/renderers/getRenderer.ts index 91a008ce0d4..bf43bb5d832 100644 --- a/packages/abi/src/gen/renderers/getRenderer.ts +++ b/packages/abi/src/gen/renderers/getRenderer.ts @@ -1,6 +1,6 @@ import { assertUnreachable } from '@fuel-ts/utils'; -import type { AbiGenInput } from '../abi-gen'; +import type { AbiGenInput } from '../abi-gen-types'; import { renderTs } from './ts/render-ts'; import type { Renderer } from './types'; diff --git a/packages/abi/src/gen/renderers/ts/render-ts.ts b/packages/abi/src/gen/renderers/ts/render-ts.ts index f959f45f30b..6654b4c6902 100644 --- a/packages/abi/src/gen/renderers/ts/render-ts.ts +++ b/packages/abi/src/gen/renderers/ts/render-ts.ts @@ -1,4 +1,4 @@ -import type { AbiGenResult, ProgramDetails } from '../../abi-gen'; +import type { AbiGenResult, ProgramDetails } from '../../abi-gen-types'; import type { Renderer } from '../types'; import { renderPrograms } from './renderers/render-programs'; diff --git a/packages/abi/src/gen/renderers/ts/renderers/render-index-files.ts b/packages/abi/src/gen/renderers/ts/renderers/render-index-files.ts index 969acb63861..b704a0ad632 100644 --- a/packages/abi/src/gen/renderers/ts/renderers/render-index-files.ts +++ b/packages/abi/src/gen/renderers/ts/renderers/render-index-files.ts @@ -1,7 +1,7 @@ import type { BinaryVersions } from '@fuel-ts/versions'; import type { Abi } from '../../../../parser'; -import type { AbiGenResult } from '../../../abi-gen'; +import type { AbiGenResult } from '../../../abi-gen-types'; import indexTemplate from '../templates/index.hbs'; import { getParentDirWrapper } from './get-parent-dir-wrapper'; diff --git a/packages/abi/src/gen/renderers/ts/renderers/render-program.ts b/packages/abi/src/gen/renderers/ts/renderers/render-program.ts index 7a9ff163135..31f926f602b 100644 --- a/packages/abi/src/gen/renderers/ts/renderers/render-program.ts +++ b/packages/abi/src/gen/renderers/ts/renderers/render-program.ts @@ -1,7 +1,7 @@ import { assertUnreachable } from '@fuel-ts/utils'; import type { BinaryVersions } from '@fuel-ts/versions'; -import type { ProgramDetails } from '../../../abi-gen'; +import type { ProgramDetails } from '../../../abi-gen-types'; import type { TsAbiGenResult } from '../../types'; import bytecodeTemplate from '../templates/bytecode.hbs'; import contractFactoryTemplate from '../templates/contract-factory.hbs'; diff --git a/packages/abi/src/gen/renderers/ts/renderers/render-programs.ts b/packages/abi/src/gen/renderers/ts/renderers/render-programs.ts index 1f29d8b75e8..95e6bac7e0c 100644 --- a/packages/abi/src/gen/renderers/ts/renderers/render-programs.ts +++ b/packages/abi/src/gen/renderers/ts/renderers/render-programs.ts @@ -1,7 +1,7 @@ import type { BinaryVersions } from '@fuel-ts/versions'; import type { Abi } from '../../../..'; -import type { AbiGenResult, ProgramDetails } from '../../../abi-gen'; +import type { AbiGenResult, ProgramDetails } from '../../../abi-gen-types'; import { renderIndexFiles } from './render-index-files'; import { renderProgram } from './render-program'; diff --git a/packages/abi/src/gen/renderers/ts/renderers/render-types.ts b/packages/abi/src/gen/renderers/ts/renderers/render-types.ts index 8578e97401a..f2ff1b1e361 100644 --- a/packages/abi/src/gen/renderers/ts/renderers/render-types.ts +++ b/packages/abi/src/gen/renderers/ts/renderers/render-types.ts @@ -2,7 +2,7 @@ import type { BinaryVersions } from '@fuel-ts/versions'; import { createMatcher, swayTypeMatchers } from '../../../../matchers/sway-type-matchers'; import type { Abi, AbiFunctionInput } from '../../../../parser'; -import type { ProgramDetails } from '../../../abi-gen'; +import type { ProgramDetails } from '../../../abi-gen-types'; import type { TsAbiGenResult } from '../../types'; import typesTemplate from '../templates/types.hbs'; import { generateTsType } from '../typers/generate-ts-type'; diff --git a/packages/abi/src/gen/renderers/types.ts b/packages/abi/src/gen/renderers/types.ts index ef53e98ecc6..a0e6d9045fa 100644 --- a/packages/abi/src/gen/renderers/types.ts +++ b/packages/abi/src/gen/renderers/types.ts @@ -1,6 +1,6 @@ import type { BinaryVersions } from '@fuel-ts/versions'; -import type { AbiGenResult, ProgramDetails } from '../abi-gen'; +import type { AbiGenResult, ProgramDetails } from '../abi-gen-types'; export type Renderer = (details: ProgramDetails[], versions: BinaryVersions) => AbiGenResult[]; From 972721b0f9c518d60056f8fdb298d2b6b585a3fe Mon Sep 17 00:00:00 2001 From: nedsalk Date: Fri, 13 Dec 2024 14:34:39 +0100 Subject: [PATCH 071/126] move fixtures into folders --- packages/fuel-gauge/src/abi/abi-gen.test.ts | 34 +++++++++---------- .../fixtures/{ => contracts}/contract-abi.txt | 0 .../{ => contracts}/contract-bytecode.txt | 0 .../{ => contracts}/contract-factory.txt | 0 .../{ => contracts}/contract-index.txt | 0 .../contract-storage-slots.txt | 0 .../{ => contracts}/contract-types.txt | 0 .../abi/fixtures/{ => contracts}/contract.txt | 0 .../{ => predicates}/predicate-abi.txt | 0 .../{ => predicates}/predicate-index.txt | 0 .../{ => predicates}/predicate-types.txt | 0 .../fixtures/{ => predicates}/predicate.txt | 0 .../abi/fixtures/{ => scripts}/script-abi.txt | 0 .../fixtures/{ => scripts}/script-index.txt | 0 .../fixtures/{ => scripts}/script-types.txt | 0 .../src/abi/fixtures/{ => scripts}/script.txt | 0 16 files changed, 17 insertions(+), 17 deletions(-) rename packages/fuel-gauge/src/abi/fixtures/{ => contracts}/contract-abi.txt (100%) rename packages/fuel-gauge/src/abi/fixtures/{ => contracts}/contract-bytecode.txt (100%) rename packages/fuel-gauge/src/abi/fixtures/{ => contracts}/contract-factory.txt (100%) rename packages/fuel-gauge/src/abi/fixtures/{ => contracts}/contract-index.txt (100%) rename packages/fuel-gauge/src/abi/fixtures/{ => contracts}/contract-storage-slots.txt (100%) rename packages/fuel-gauge/src/abi/fixtures/{ => contracts}/contract-types.txt (100%) rename packages/fuel-gauge/src/abi/fixtures/{ => contracts}/contract.txt (100%) rename packages/fuel-gauge/src/abi/fixtures/{ => predicates}/predicate-abi.txt (100%) rename packages/fuel-gauge/src/abi/fixtures/{ => predicates}/predicate-index.txt (100%) rename packages/fuel-gauge/src/abi/fixtures/{ => predicates}/predicate-types.txt (100%) rename packages/fuel-gauge/src/abi/fixtures/{ => predicates}/predicate.txt (100%) rename packages/fuel-gauge/src/abi/fixtures/{ => scripts}/script-abi.txt (100%) rename packages/fuel-gauge/src/abi/fixtures/{ => scripts}/script-index.txt (100%) rename packages/fuel-gauge/src/abi/fixtures/{ => scripts}/script-types.txt (100%) rename packages/fuel-gauge/src/abi/fixtures/{ => scripts}/script.txt (100%) diff --git a/packages/fuel-gauge/src/abi/abi-gen.test.ts b/packages/fuel-gauge/src/abi/abi-gen.test.ts index 48b7776f132..fb81e92890a 100644 --- a/packages/fuel-gauge/src/abi/abi-gen.test.ts +++ b/packages/fuel-gauge/src/abi/abi-gen.test.ts @@ -14,23 +14,23 @@ describe('AbiGen', () => { ['index', 'index.ts'], ['common', 'common.ts'], - ['contract-index', 'contracts/index.ts'], - ['contract', 'contracts/AbiContract.ts'], - ['contract-types', 'contracts/AbiContractTypes.ts'], - ['contract-factory', 'contracts/AbiContractFactory.ts'], - ['contract-bytecode', 'contracts/AbiContract-bytecode.ts'], - ['contract-abi', 'contracts/AbiContract-abi.json'], - ['contract-storage-slots', 'contracts/AbiContract-storage-slots.json'], - - ['predicate-index', 'predicates/index.ts'], - ['predicate', 'predicates/AbiPredicate.ts'], - ['predicate-types', 'predicates/AbiPredicateTypes.ts'], - ['predicate-abi', 'predicates/AbiPredicate-abi.json'], - - ['script-index', 'scripts/index.ts'], - ['script', 'scripts/AbiScript.ts'], - ['script-types', 'scripts/AbiScriptTypes.ts'], - ['script-abi', 'scripts/AbiScript-abi.json'], + ['contracts/contract-index', 'contracts/index.ts'], + ['contracts/contract', 'contracts/AbiContract.ts'], + ['contracts/contract-types', 'contracts/AbiContractTypes.ts'], + ['contracts/contract-factory', 'contracts/AbiContractFactory.ts'], + ['contracts/contract-bytecode', 'contracts/AbiContract-bytecode.ts'], + ['contracts/contract-abi', 'contracts/AbiContract-abi.json'], + ['contracts/contract-storage-slots', 'contracts/AbiContract-storage-slots.json'], + + ['predicates/predicate-index', 'predicates/index.ts'], + ['predicates/predicate', 'predicates/AbiPredicate.ts'], + ['predicates/predicate-types', 'predicates/AbiPredicateTypes.ts'], + ['predicates/predicate-abi', 'predicates/AbiPredicate-abi.json'], + + ['scripts/script-index', 'scripts/index.ts'], + ['scripts/script', 'scripts/AbiScript.ts'], + ['scripts/script-types', 'scripts/AbiScriptTypes.ts'], + ['scripts/script-abi', 'scripts/AbiScript-abi.json'], ]); const { buildDir: contractDir } = getAbiForcProject(AbiProjectsEnum.ABI_CONTRACT); diff --git a/packages/fuel-gauge/src/abi/fixtures/contract-abi.txt b/packages/fuel-gauge/src/abi/fixtures/contracts/contract-abi.txt similarity index 100% rename from packages/fuel-gauge/src/abi/fixtures/contract-abi.txt rename to packages/fuel-gauge/src/abi/fixtures/contracts/contract-abi.txt diff --git a/packages/fuel-gauge/src/abi/fixtures/contract-bytecode.txt b/packages/fuel-gauge/src/abi/fixtures/contracts/contract-bytecode.txt similarity index 100% rename from packages/fuel-gauge/src/abi/fixtures/contract-bytecode.txt rename to packages/fuel-gauge/src/abi/fixtures/contracts/contract-bytecode.txt diff --git a/packages/fuel-gauge/src/abi/fixtures/contract-factory.txt b/packages/fuel-gauge/src/abi/fixtures/contracts/contract-factory.txt similarity index 100% rename from packages/fuel-gauge/src/abi/fixtures/contract-factory.txt rename to packages/fuel-gauge/src/abi/fixtures/contracts/contract-factory.txt diff --git a/packages/fuel-gauge/src/abi/fixtures/contract-index.txt b/packages/fuel-gauge/src/abi/fixtures/contracts/contract-index.txt similarity index 100% rename from packages/fuel-gauge/src/abi/fixtures/contract-index.txt rename to packages/fuel-gauge/src/abi/fixtures/contracts/contract-index.txt diff --git a/packages/fuel-gauge/src/abi/fixtures/contract-storage-slots.txt b/packages/fuel-gauge/src/abi/fixtures/contracts/contract-storage-slots.txt similarity index 100% rename from packages/fuel-gauge/src/abi/fixtures/contract-storage-slots.txt rename to packages/fuel-gauge/src/abi/fixtures/contracts/contract-storage-slots.txt diff --git a/packages/fuel-gauge/src/abi/fixtures/contract-types.txt b/packages/fuel-gauge/src/abi/fixtures/contracts/contract-types.txt similarity index 100% rename from packages/fuel-gauge/src/abi/fixtures/contract-types.txt rename to packages/fuel-gauge/src/abi/fixtures/contracts/contract-types.txt diff --git a/packages/fuel-gauge/src/abi/fixtures/contract.txt b/packages/fuel-gauge/src/abi/fixtures/contracts/contract.txt similarity index 100% rename from packages/fuel-gauge/src/abi/fixtures/contract.txt rename to packages/fuel-gauge/src/abi/fixtures/contracts/contract.txt diff --git a/packages/fuel-gauge/src/abi/fixtures/predicate-abi.txt b/packages/fuel-gauge/src/abi/fixtures/predicates/predicate-abi.txt similarity index 100% rename from packages/fuel-gauge/src/abi/fixtures/predicate-abi.txt rename to packages/fuel-gauge/src/abi/fixtures/predicates/predicate-abi.txt diff --git a/packages/fuel-gauge/src/abi/fixtures/predicate-index.txt b/packages/fuel-gauge/src/abi/fixtures/predicates/predicate-index.txt similarity index 100% rename from packages/fuel-gauge/src/abi/fixtures/predicate-index.txt rename to packages/fuel-gauge/src/abi/fixtures/predicates/predicate-index.txt diff --git a/packages/fuel-gauge/src/abi/fixtures/predicate-types.txt b/packages/fuel-gauge/src/abi/fixtures/predicates/predicate-types.txt similarity index 100% rename from packages/fuel-gauge/src/abi/fixtures/predicate-types.txt rename to packages/fuel-gauge/src/abi/fixtures/predicates/predicate-types.txt diff --git a/packages/fuel-gauge/src/abi/fixtures/predicate.txt b/packages/fuel-gauge/src/abi/fixtures/predicates/predicate.txt similarity index 100% rename from packages/fuel-gauge/src/abi/fixtures/predicate.txt rename to packages/fuel-gauge/src/abi/fixtures/predicates/predicate.txt diff --git a/packages/fuel-gauge/src/abi/fixtures/script-abi.txt b/packages/fuel-gauge/src/abi/fixtures/scripts/script-abi.txt similarity index 100% rename from packages/fuel-gauge/src/abi/fixtures/script-abi.txt rename to packages/fuel-gauge/src/abi/fixtures/scripts/script-abi.txt diff --git a/packages/fuel-gauge/src/abi/fixtures/script-index.txt b/packages/fuel-gauge/src/abi/fixtures/scripts/script-index.txt similarity index 100% rename from packages/fuel-gauge/src/abi/fixtures/script-index.txt rename to packages/fuel-gauge/src/abi/fixtures/scripts/script-index.txt diff --git a/packages/fuel-gauge/src/abi/fixtures/script-types.txt b/packages/fuel-gauge/src/abi/fixtures/scripts/script-types.txt similarity index 100% rename from packages/fuel-gauge/src/abi/fixtures/script-types.txt rename to packages/fuel-gauge/src/abi/fixtures/scripts/script-types.txt diff --git a/packages/fuel-gauge/src/abi/fixtures/script.txt b/packages/fuel-gauge/src/abi/fixtures/scripts/script.txt similarity index 100% rename from packages/fuel-gauge/src/abi/fixtures/script.txt rename to packages/fuel-gauge/src/abi/fixtures/scripts/script.txt From b4a9fd5ad28dcb4eef99f96c001cdcd818bfb3cb Mon Sep 17 00:00:00 2001 From: nedsalk Date: Fri, 13 Dec 2024 14:41:52 +0100 Subject: [PATCH 072/126] move `mapComponents` and add explanations --- .../src/gen/renderers/ts/typers/iterators.ts | 2 +- .../abi/src/gen/renderers/ts/typers/struct.ts | 74 +---------------- .../abi/src/gen/renderers/ts/typers/utils.ts | 81 +++++++++++++++++++ 3 files changed, 85 insertions(+), 72 deletions(-) create mode 100644 packages/abi/src/gen/renderers/ts/typers/utils.ts diff --git a/packages/abi/src/gen/renderers/ts/typers/iterators.ts b/packages/abi/src/gen/renderers/ts/typers/iterators.ts index 2d906ab4da6..24df397f422 100644 --- a/packages/abi/src/gen/renderers/ts/typers/iterators.ts +++ b/packages/abi/src/gen/renderers/ts/typers/iterators.ts @@ -1,7 +1,7 @@ import { ARRAY_REGEX } from '../../../../matchers/sway-type-matchers'; -import { mapComponents } from './struct'; import type { Typer } from './types'; +import { mapComponents } from './utils'; export const tupleTyper: Typer = ({ abiType }, typer) => mapComponents({ parent: abiType, includeComponentNames: false, typer }); diff --git a/packages/abi/src/gen/renderers/ts/typers/struct.ts b/packages/abi/src/gen/renderers/ts/typers/struct.ts index d692ebc1064..fbbcc5942fa 100644 --- a/packages/abi/src/gen/renderers/ts/typers/struct.ts +++ b/packages/abi/src/gen/renderers/ts/typers/struct.ts @@ -1,77 +1,9 @@ -import { assertUnreachable } from '@fuel-ts/utils'; - -import { ENUM_REGEX, STRUCT_REGEX, TUPLE_REGEX } from '../../../../matchers/sway-type-matchers'; -import type { AbiTypeComponent, AbiMetadataType, AbiTypeArgument } from '../../../../parser'; +import { ENUM_REGEX, STRUCT_REGEX } from '../../../../matchers/sway-type-matchers'; +import type { AbiMetadataType, AbiTypeArgument } from '../../../../parser'; import { flattenImports } from './helpers'; import type { TyperReturn, Typer, GlobalTyper, TyperAbiType } from './types'; - -function wrapStructContent(text: string, wrap: '{}' | '[]' | 'Enum'): string { - switch (wrap) { - case '{}': - return `{ ${text} }`; - case '[]': - return `[${text}]`; - case 'Enum': { - const wrappedAsObj = wrapStructContent(text, '{}'); - return `Enum<${wrappedAsObj}>`; - } - default: - return assertUnreachable(wrap); - } -} - -function componentMapper( - c: AbiTypeComponent, - includeName: boolean, - generateTsType: GlobalTyper -): TyperReturn { - const mapped = generateTsType({ abiType: c.type, asReference: true }); - - if (!includeName) { - return mapped; - } - - return { - ...mapped, - input: `${c.name}: ${mapped.input}`, - output: `${c.name}: ${mapped.output}`, - }; -} - -export function mapComponents(params: { - parent: TyperAbiType; - includeComponentNames: boolean; - typer: GlobalTyper; -}) { - const { parent, includeComponentNames, typer } = params; - const components = parent.components; - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - const mapped = components!.map((c) => componentMapper(c, includeComponentNames, typer)); - - // eslint-disable-next-line no-nested-ternary - const wrap = ENUM_REGEX.test(parent.swayType) - ? 'Enum' - : TUPLE_REGEX.test(parent.swayType) - ? '[]' - : '{}'; - - const input = wrapStructContent(mapped.map((m) => m.input).join(', '), wrap); - const output = wrapStructContent(mapped.map((m) => m.output).join(', '), wrap); - - const { fuelsTypeImports, commonTypeImports } = flattenImports(mapped); - - if (wrap === 'Enum') { - commonTypeImports.push('Enum'); - } - - return { - input, - output, - fuelsTypeImports, - commonTypeImports, - }; -} +import { mapComponents } from './utils'; function mapGenericTypeParameters( typeArgs: AbiTypeArgument[] | AbiMetadataType['typeParameters'], diff --git a/packages/abi/src/gen/renderers/ts/typers/utils.ts b/packages/abi/src/gen/renderers/ts/typers/utils.ts new file mode 100644 index 00000000000..9305850eb43 --- /dev/null +++ b/packages/abi/src/gen/renderers/ts/typers/utils.ts @@ -0,0 +1,81 @@ +import { assertUnreachable } from '@fuel-ts/utils'; + +import { ENUM_REGEX, TUPLE_REGEX } from '../../../../matchers/sway-type-matchers'; +import type { AbiTypeComponent } from '../../../../parser'; + +import { flattenImports } from './helpers'; +import type { TyperAbiType, GlobalTyper, TyperReturn } from './types'; + +function componentMapper( + c: AbiTypeComponent, + includeName: boolean, + generateTsType: GlobalTyper +): TyperReturn { + const mapped = generateTsType({ abiType: c.type, asReference: true }); + + if (!includeName) { + return mapped; + } + + return { + ...mapped, + input: `${c.name}: ${mapped.input}`, + output: `${c.name}: ${mapped.output}`, + }; +} + +function wrapStructContent(text: string, wrap: '{}' | '[]' | 'Enum'): string { + switch (wrap) { + case '{}': + return `{ ${text} }`; + case '[]': + return `[${text}]`; + case 'Enum': { + const wrappedAsObj = wrapStructContent(text, '{}'); + return `Enum<${wrappedAsObj}>`; + } + default: + return assertUnreachable(wrap); + } +} + +/** + * This function maps components for a given parent type + * which can be a tuple or struct (and enum). + */ +export function mapComponents(params: { + parent: TyperAbiType; + /** + * Component names are included for structs and enums, + * but they're not included for tuples (we ignore the `__tuple_element` name). + */ + includeComponentNames: boolean; + typer: GlobalTyper; +}) { + const { parent, includeComponentNames, typer } = params; + const components = parent.components as AbiTypeComponent[]; + const mapped = components.map((c) => componentMapper(c, includeComponentNames, typer)); + + // eslint-disable-next-line no-nested-ternary + const wrap = ENUM_REGEX.test(parent.swayType) + ? 'Enum' + : TUPLE_REGEX.test(parent.swayType) + ? '[]' + : '{}'; + + const input = wrapStructContent(mapped.map((m) => m.input).join(', '), wrap); + const output = wrapStructContent(mapped.map((m) => m.output).join(', '), wrap); + + const { fuelsTypeImports, commonTypeImports } = flattenImports(mapped); + + if (wrap === 'Enum') { + commonTypeImports.push('Enum'); + } + + return { + input, + output, + fuelsTypeImports, + commonTypeImports, + }; +} From 9aac5cb160a5ccb533e4e9bcb28dd816618d3c07 Mon Sep 17 00:00:00 2001 From: nedsalk Date: Fri, 13 Dec 2024 15:00:57 +0100 Subject: [PATCH 073/126] move logic to shared folder --- .../gen/renderers/ts/renderers/render-types.ts | 18 ++++-------------- .../evaluate-function-inputs-optionality.ts | 15 +++++++++++++++ 2 files changed, 19 insertions(+), 14 deletions(-) create mode 100644 packages/abi/src/utils/evaluate-function-inputs-optionality.ts diff --git a/packages/abi/src/gen/renderers/ts/renderers/render-types.ts b/packages/abi/src/gen/renderers/ts/renderers/render-types.ts index f2ff1b1e361..983bb075fd9 100644 --- a/packages/abi/src/gen/renderers/ts/renderers/render-types.ts +++ b/packages/abi/src/gen/renderers/ts/renderers/render-types.ts @@ -1,7 +1,8 @@ import type { BinaryVersions } from '@fuel-ts/versions'; -import { createMatcher, swayTypeMatchers } from '../../../../matchers/sway-type-matchers'; -import type { Abi, AbiFunctionInput } from '../../../../parser'; +import { createMatcher } from '../../../../matchers/sway-type-matchers'; +import type { Abi } from '../../../../parser'; +import { evaluateFunctionInputsOptionality } from '../../../../utils/evaluate-function-inputs-optionality'; import type { ProgramDetails } from '../../../abi-gen-types'; import type { TsAbiGenResult } from '../../types'; import typesTemplate from '../templates/types.hbs'; @@ -64,18 +65,7 @@ function mergeTypeImports(mTypes: TyperReturn[], cTypesMap: Record) { return abi.functions.map((fn) => { - let isMandatory = false; - const inputs = fn.inputs.reduceRight<(AbiFunctionInput & { isOptional: boolean })[]>( - (result, input) => { - const isTypeMandatory = - !swayTypeMatchers.void(input.type.swayType) && - !swayTypeMatchers.option(input.type.swayType); - - isMandatory = isMandatory || isTypeMandatory; - return [{ ...input, isOptional: !isMandatory }, ...result]; - }, - [] - ); + const inputs = evaluateFunctionInputsOptionality(fn); return { name: fn.name, diff --git a/packages/abi/src/utils/evaluate-function-inputs-optionality.ts b/packages/abi/src/utils/evaluate-function-inputs-optionality.ts new file mode 100644 index 00000000000..280e64c917a --- /dev/null +++ b/packages/abi/src/utils/evaluate-function-inputs-optionality.ts @@ -0,0 +1,15 @@ +import { swayTypeMatchers } from '../matchers/sway-type-matchers'; +import type { AbiFunction, AbiFunctionInput } from '../parser'; + +export function evaluateFunctionInputsOptionality( + fn: AbiFunction +): (AbiFunctionInput & { isOptional: boolean })[] { + let isMandatory = false; + return fn.inputs.reduceRight<(AbiFunctionInput & { isOptional: boolean })[]>((result, input) => { + const isTypeMandatory = + !swayTypeMatchers.void(input.type.swayType) && !swayTypeMatchers.option(input.type.swayType); + + isMandatory = isMandatory || isTypeMandatory; + return [{ ...input, isOptional: !isMandatory }, ...result]; + }, []); +} From 55b481b1e4f88ddad0f8aa36ef1ff56ad3c4e83a Mon Sep 17 00:00:00 2001 From: nedsalk Date: Fri, 13 Dec 2024 16:30:33 +0100 Subject: [PATCH 074/126] add type docs explaining functions --- .../src/gen/renderers/ts/renderers/render-index-files.ts | 4 ++++ .../abi/src/gen/renderers/ts/renderers/render-program.ts | 6 ++++++ .../abi/src/gen/renderers/ts/renderers/render-programs.ts | 5 +++++ packages/abi/src/gen/renderers/ts/renderers/render-types.ts | 5 +++++ 4 files changed, 20 insertions(+) diff --git a/packages/abi/src/gen/renderers/ts/renderers/render-index-files.ts b/packages/abi/src/gen/renderers/ts/renderers/render-index-files.ts index b704a0ad632..06efbbe594c 100644 --- a/packages/abi/src/gen/renderers/ts/renderers/render-index-files.ts +++ b/packages/abi/src/gen/renderers/ts/renderers/render-index-files.ts @@ -7,6 +7,10 @@ import indexTemplate from '../templates/index.hbs'; import { getParentDirWrapper } from './get-parent-dir-wrapper'; import { templateRenderer } from './template-renderer'; +/** + * @returns an array of index files + * that includes the root index.ts and the index.ts for each provided program type. + */ export function renderIndexFiles( indexContents: Map, versions: BinaryVersions diff --git a/packages/abi/src/gen/renderers/ts/renderers/render-program.ts b/packages/abi/src/gen/renderers/ts/renderers/render-program.ts index 31f926f602b..62fd0b2e585 100644 --- a/packages/abi/src/gen/renderers/ts/renderers/render-program.ts +++ b/packages/abi/src/gen/renderers/ts/renderers/render-program.ts @@ -12,6 +12,12 @@ import scriptTemplate from '../templates/script.hbs'; import { getParentDirWrapper } from './get-parent-dir-wrapper'; import { templateRenderer } from './template-renderer'; +/** + * Renders program-related files based on the program type. + * @returns An array of results containing filenames and their corresponding content. + * The files returned are all related to the program except the types. + * This includes the abi, bytecode, and the program-related classes. + */ export function renderProgram( { abi, binCompressed, name, abiContents, storageSlots }: ProgramDetails, versions: BinaryVersions diff --git a/packages/abi/src/gen/renderers/ts/renderers/render-programs.ts b/packages/abi/src/gen/renderers/ts/renderers/render-programs.ts index 95e6bac7e0c..489529f6451 100644 --- a/packages/abi/src/gen/renderers/ts/renderers/render-programs.ts +++ b/packages/abi/src/gen/renderers/ts/renderers/render-programs.ts @@ -7,6 +7,11 @@ import { renderIndexFiles } from './render-index-files'; import { renderProgram } from './render-program'; import { renderTypes } from './render-types'; +/** + * For the given program details, render all program-related files. + * That includes the abi, bytecode, program-related classes, + * type files and the index files. + */ export function renderPrograms(details: ProgramDetails[], versions: BinaryVersions) { const results: AbiGenResult[] = []; const indexContents = new Map(); diff --git a/packages/abi/src/gen/renderers/ts/renderers/render-types.ts b/packages/abi/src/gen/renderers/ts/renderers/render-types.ts index 983bb075fd9..83c4390babe 100644 --- a/packages/abi/src/gen/renderers/ts/renderers/render-types.ts +++ b/packages/abi/src/gen/renderers/ts/renderers/render-types.ts @@ -75,6 +75,11 @@ function mapFunctions(abi: Abi, cTypes: Record) { }); } +/** + * Renders the types file for a program. + * @returns An object containing the filename and the content of the types file. + * The type rendering logic is the same for all program types. + */ export function renderTypes( { name, abi }: ProgramDetails, versions: BinaryVersions From 09a9e974f053f8fa357f84eb98ab2d4725ec4e0e Mon Sep 17 00:00:00 2001 From: nedsalk Date: Fri, 13 Dec 2024 16:45:54 +0100 Subject: [PATCH 075/126] add doc blocks for `AbiGen` and related types --- packages/abi/src/gen/abi-gen-types.ts | 33 +++++++++++++++++++++++++++ packages/abi/src/gen/abi-gen.ts | 10 ++++++++ 2 files changed, 43 insertions(+) diff --git a/packages/abi/src/gen/abi-gen-types.ts b/packages/abi/src/gen/abi-gen-types.ts index 1c146005e3c..0709880a21c 100644 --- a/packages/abi/src/gen/abi-gen-types.ts +++ b/packages/abi/src/gen/abi-gen-types.ts @@ -3,20 +3,53 @@ import type { BinaryVersions } from '@fuel-ts/versions'; import type { Abi } from '../parser'; export interface AbiGenInput { + /** + * The details of the program to generate the files for. + */ programDetails: ProgramDetails[]; + /** + * The versions of the binaries used to generate the files. + */ versions: BinaryVersions; + /** + * The mode to generate the files in. + * Defaults to 'ts' which generates typescript files. + */ mode?: 'ts'; } export interface AbiGenResult { + /** + * The filename of the generated file. + */ filename: string; + /** + * The content of the generated file. + */ content: string; } export interface ProgramDetails { + /** + * The name of the program to generate files for. + * This will be used to name the generated files, + * as well as throughout the generated code. + */ name: string; + /** + * The compressed bytecode of the program in base64 format. + */ binCompressed: string; + /** + * The abi of the program in the format returned via `AbiParser`. + */ abi: Abi; + /** + * The original abi contents in string format. + */ abiContents: string; + /** + * The storage slots, if working with a contract. + */ storageSlots?: string; } diff --git a/packages/abi/src/gen/abi-gen.ts b/packages/abi/src/gen/abi-gen.ts index 36778bcaaac..db6b2d9f46a 100644 --- a/packages/abi/src/gen/abi-gen.ts +++ b/packages/abi/src/gen/abi-gen.ts @@ -1,7 +1,17 @@ import type { AbiGenInput, AbiGenResult } from './abi-gen-types'; import { getRenderer } from './renderers/getRenderer'; +/** + * The main class to generate files for given sway programs. + * These contents of these generated files make it easier to interact + * with the sway programs, because type definitions are added, + * as well as some automatic loading is done for the user. + */ export class AbiGen { + /** + * @returns an array of generated files for the given program details. + * They can be saved to disk as-is or further processed. + */ public static generate({ programDetails, mode, versions }: AbiGenInput): AbiGenResult[] { const render = getRenderer(mode); return render(programDetails, versions); From 1703d8fd754271c4b200452a6fc2c27bd07991f0 Mon Sep 17 00:00:00 2001 From: nedsalk Date: Fri, 13 Dec 2024 16:58:46 +0100 Subject: [PATCH 076/126] remove unnecessary flags --- apps/docs/src/guide/fuels-cli/commands.md | 3 -- .../src/guide/fuels-cli/generating-types.md | 31 +++---------------- .../guide/fuels-cli/using-generated-types.md | 6 ++-- packages/fuels/src/cli.ts | 15 --------- 4 files changed, 8 insertions(+), 47 deletions(-) diff --git a/apps/docs/src/guide/fuels-cli/commands.md b/apps/docs/src/guide/fuels-cli/commands.md index d67a4d96ec0..0c6a1283153 100644 --- a/apps/docs/src/guide/fuels-cli/commands.md +++ b/apps/docs/src/guide/fuels-cli/commands.md @@ -157,9 +157,6 @@ npx fuels@{{fuels}} help typegen Options: -i, --inputs Input paths/globals to your Abi JSON files -o, --output Directory path for generated files - -c, --contract Generate types for Contracts [default] - -s, --script Generate types for Scripts - -p, --predicate Generate types for Predicates -S, --silent Omit output messages ``` diff --git a/apps/docs/src/guide/fuels-cli/generating-types.md b/apps/docs/src/guide/fuels-cli/generating-types.md index 6a42b1b530d..af4a21de6bc 100644 --- a/apps/docs/src/guide/fuels-cli/generating-types.md +++ b/apps/docs/src/guide/fuels-cli/generating-types.md @@ -27,22 +27,19 @@ Generate Typescript from Sway ABI JSON files Options: -i, --inputs Input paths/globals to your ABI JSON files -o, --output Directory path for generated files - -c, --contract Generate types for Contracts [default] - -s, --script Generate types for Scripts - -p, --predicate Generate types for Predicates -S, --silent Omit output messages -h, --help Display help ``` -## Generating Types for Contracts +## Generating Types -You can generate types for a Sway contract using the command below: +You can generate types for a Sway program using the command below: - + ```console -pnpm fuels typegen -i ./abis/*-abi.json -o ./types +pnpm fuels typegen -i ./my-program/out/release -o ./types ``` @@ -50,30 +47,12 @@ pnpm fuels typegen -i ./abis/*-abi.json -o ./types -The path after the input flag `-i` should point to the file ending in `-abi.json` produced when the contract was built. +The path after the input flag `-i` should point to the file folder where the `forc build` results are. The path after the output flag `-o` will be the output directory for the generated types. -You can omit the `--contract` option here since it's the default. - -## Generating Types for Scripts - -To generate types for a Sway script, use the `--script` flag: - -```console -pnpm fuels typegen -i ./abis/*-abi.json -o ./types --script -``` - -## Generating Types for Predicates - -To generate types for a Sway predicate, use the `--predicate` flag: - -```console -pnpm fuels typegen -i ./abis/*-abi.json -o ./types --predicate -``` - --- See also: diff --git a/apps/docs/src/guide/fuels-cli/using-generated-types.md b/apps/docs/src/guide/fuels-cli/using-generated-types.md index 4702c2e0394..a5f935690e1 100644 --- a/apps/docs/src/guide/fuels-cli/using-generated-types.md +++ b/apps/docs/src/guide/fuels-cli/using-generated-types.md @@ -5,7 +5,7 @@ After generating types via: ```console -pnpm fuels typegen -i ./abis/*-abi.json -o ./types +pnpm fuels typegen -i ./my-contract/out/release -o ./types ``` We can use these files like so: @@ -29,7 +29,7 @@ Typegen tries to resolve, auto-load, and embed the [Storage Slots](../contracts/ After generating types via: ```console -pnpm fuels typegen -i ./abis/*-abi.json -o ./types --script +pnpm fuels typegen -i ./my-script/out/release -o ./types ``` We can use these files like so: @@ -41,7 +41,7 @@ We can use these files like so: After generating types via: ```console -pnpm fuels typegen -i ./abis/*-abi.json -o ./types --predicate +pnpm fuels typegen -i ./my-predicate/out/release -o ./types ``` We can use these files like so: diff --git a/packages/fuels/src/cli.ts b/packages/fuels/src/cli.ts index 3e839f54022..de943487272 100644 --- a/packages/fuels/src/cli.ts +++ b/packages/fuels/src/cli.ts @@ -94,21 +94,6 @@ export const configureCli = () => { .description(`Generate Typescript from Sway ABI JSON files`) .requiredOption('-i, --inputs ', 'Input paths/globals to your ABI JSON files') .requiredOption('-o, --output ', 'Directory path for generated files') - .addOption( - new Option('-c, --contract', 'Generate types for Contracts [default]') - .conflicts(['script', 'predicate']) - .implies({ script: undefined, predicate: undefined }) - ) - .addOption( - new Option('-s, --script', 'Generate types for Scripts') - .conflicts(['contract', 'predicate']) - .implies({ contract: undefined, predicate: undefined }) - ) - .addOption( - new Option('-p, --predicate', 'Generate types for Predicates') - .conflicts(['contract', 'script']) - .implies({ contract: undefined, script: undefined }) - ) .option('-S, --silent', 'Omit output messages') .action(withProgram(command, Commands.typegen, typegen)); From 30aaa43814d35fa16bb5b9e666f9897900c3d5c5 Mon Sep 17 00:00:00 2001 From: nedsalk Date: Fri, 13 Dec 2024 17:05:54 +0100 Subject: [PATCH 077/126] remove todo --- packages/abi/src/gen/renderers/ts/typers/types.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/abi/src/gen/renderers/ts/typers/types.ts b/packages/abi/src/gen/renderers/ts/typers/types.ts index ccfd9fadc79..e31a4c8f5e9 100644 --- a/packages/abi/src/gen/renderers/ts/typers/types.ts +++ b/packages/abi/src/gen/renderers/ts/typers/types.ts @@ -15,7 +15,6 @@ export type TyperParams = { asReference?: boolean; }; -// TODO: Better naming? export type GlobalTyper = (p: TyperParams) => TyperReturn; export type Typer = (params: TyperParams, typer: GlobalTyper) => TyperReturn; From e6ea6fad73a0c6b036d235ac29ff7b633cf8c3d3 Mon Sep 17 00:00:00 2001 From: nedsalk Date: Fri, 13 Dec 2024 17:08:56 +0100 Subject: [PATCH 078/126] input/output --- .../fuel-gauge/src/coverage-contract.test.ts | 23 +++++++++++++------ 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/packages/fuel-gauge/src/coverage-contract.test.ts b/packages/fuel-gauge/src/coverage-contract.test.ts index dee3d32e0e6..1a26bcf14d6 100644 --- a/packages/fuel-gauge/src/coverage-contract.test.ts +++ b/packages/fuel-gauge/src/coverage-contract.test.ts @@ -708,26 +708,35 @@ describe('Coverage Contract', { timeout: 15_000 }, () => { it('should test native enum [Red->Green]', async () => { using contractInstance = await setupContract(); - const { waitForResult } = await contractInstance.functions.color_enum(ColorEnum.Red).call(); + const INPUT = ColorEnum.Red; + const OUTPUT = ColorEnum.Green; + + const { waitForResult } = await contractInstance.functions.color_enum(INPUT).call(); const { value } = await waitForResult(); - expect(value).toStrictEqual(ColorEnum.Green); + expect(value).toStrictEqual(OUTPUT); }); it('should test native enum [Green->Blue]', async () => { using contractInstance = await setupContract(); - const { waitForResult } = await contractInstance.functions.color_enum(ColorEnum.Green).call(); + const INPUT = ColorEnum.Green; + const OUTPUT = ColorEnum.Blue; + + const { waitForResult } = await contractInstance.functions.color_enum(INPUT).call(); const { value } = await waitForResult(); - expect(value).toStrictEqual(ColorEnum.Blue); + expect(value).toStrictEqual(OUTPUT); }); it('should test native enum [Blue->Red]', async () => { using contractInstance = await setupContract(); - const { waitForResult } = await contractInstance.functions.color_enum(ColorEnum.Blue).call(); + const INPUT = ColorEnum.Blue; + const OUTPUT = ColorEnum.Red; + + const { waitForResult } = await contractInstance.functions.color_enum(INPUT).call(); const { value } = await waitForResult(); - expect(value).toStrictEqual(ColorEnum.Red); + expect(value).toStrictEqual(OUTPUT); }); it('should test mixed native enum [Native->NotNative]', async () => { @@ -804,7 +813,7 @@ describe('Coverage Contract', { timeout: 15_000 }, () => { expect(isStatusSuccess).toBeTruthy(); }); - it('should support array in vec', async () => { + it('should support vec in array', async () => { using contractInstance = await setupContract(); const INPUT: [Array, Array] = [ From 14459252d8c68f68925a2778a3f34ec9d84978aa Mon Sep 17 00:00:00 2001 From: nedsalk Date: Sun, 15 Dec 2024 21:05:06 +0100 Subject: [PATCH 079/126] remove rawUntypedPtr --- packages/abi/src/gen/renderers/ts/renderers/render-types.ts | 1 - packages/abi/src/gen/renderers/ts/typers/typer-matcher.ts | 3 --- 2 files changed, 4 deletions(-) diff --git a/packages/abi/src/gen/renderers/ts/renderers/render-types.ts b/packages/abi/src/gen/renderers/ts/renderers/render-types.ts index 83c4390babe..f40ef48b232 100644 --- a/packages/abi/src/gen/renderers/ts/renderers/render-types.ts +++ b/packages/abi/src/gen/renderers/ts/renderers/render-types.ts @@ -37,7 +37,6 @@ const metadataTypeFilter = createMatcher({ tuple: false, array: false, evmAddress: false, - rawUntypedPtr: false, rawUntypedSlice: false, }); diff --git a/packages/abi/src/gen/renderers/ts/typers/typer-matcher.ts b/packages/abi/src/gen/renderers/ts/typers/typer-matcher.ts index e762062da9a..03da529b250 100644 --- a/packages/abi/src/gen/renderers/ts/typers/typer-matcher.ts +++ b/packages/abi/src/gen/renderers/ts/typers/typer-matcher.ts @@ -48,7 +48,4 @@ export const typerMatcher = createMatcher({ void: voidTyper, assetId: structTyper, evmAddress: evmAddressTyper, - rawUntypedPtr: () => { - throw new Error('not implemented'); - }, }); From 9e7a2668344416de1bb9bcd3318dbc375daa64c6 Mon Sep 17 00:00:00 2001 From: nedsalk Date: Mon, 16 Dec 2024 09:08:24 +0100 Subject: [PATCH 080/126] made `abi` and `storage-slots` ts files --- .../gen/renderers/ts/renderers/render-program.ts | 14 ++++++++++---- .../abi/src/gen/renderers/ts/templates/abi.hbs | 3 +++ .../renderers/ts/templates/contract-factory.hbs | 10 +++++----- .../src/gen/renderers/ts/templates/contract.hbs | 2 +- .../src/gen/renderers/ts/templates/predicate.hbs | 2 +- .../abi/src/gen/renderers/ts/templates/script.hbs | 2 +- .../gen/renderers/ts/templates/storage-slots.hbs | 5 +++++ packages/fuel-gauge/src/abi/abi-gen.test.ts | 11 +++++------ .../src/abi/fixtures/contracts/contract-abi.txt | 15 +++++++++++++-- .../abi/fixtures/contracts/contract-factory.txt | 8 ++++---- .../fixtures/contracts/contract-storage-slots.txt | 15 ++++++++++++++- .../src/abi/fixtures/contracts/contract.txt | 2 +- .../src/abi/fixtures/predicates/predicate-abi.txt | 15 +++++++++++++-- .../src/abi/fixtures/predicates/predicate.txt | 2 +- .../src/abi/fixtures/scripts/script-abi.txt | 15 +++++++++++++-- .../src/abi/fixtures/scripts/script.txt | 2 +- 16 files changed, 91 insertions(+), 32 deletions(-) create mode 100644 packages/abi/src/gen/renderers/ts/templates/abi.hbs create mode 100644 packages/abi/src/gen/renderers/ts/templates/storage-slots.hbs diff --git a/packages/abi/src/gen/renderers/ts/renderers/render-program.ts b/packages/abi/src/gen/renderers/ts/renderers/render-program.ts index 62fd0b2e585..aad511d1de0 100644 --- a/packages/abi/src/gen/renderers/ts/renderers/render-program.ts +++ b/packages/abi/src/gen/renderers/ts/renderers/render-program.ts @@ -3,11 +3,13 @@ import type { BinaryVersions } from '@fuel-ts/versions'; import type { ProgramDetails } from '../../../abi-gen-types'; import type { TsAbiGenResult } from '../../types'; +import abiTemplate from '../templates/abi.hbs'; import bytecodeTemplate from '../templates/bytecode.hbs'; import contractFactoryTemplate from '../templates/contract-factory.hbs'; import contractTemplate from '../templates/contract.hbs'; import predicateTemplate from '../templates/predicate.hbs'; import scriptTemplate from '../templates/script.hbs'; +import storageSlotsTemplate from '../templates/storage-slots.hbs'; import { getParentDirWrapper } from './get-parent-dir-wrapper'; import { templateRenderer } from './template-renderer'; @@ -24,8 +26,8 @@ export function renderProgram( ): TsAbiGenResult[] { const results: TsAbiGenResult[] = [ { - filename: `${name}-abi.json`, - content: abiContents, + filename: `${name}-abi.ts`, + content: templateRenderer({ template: abiTemplate, versions, data: { abiContents } }), }, { filename: `${name}-bytecode.ts`, @@ -55,8 +57,12 @@ export function renderProgram( exportInIndexFile: true, }, { - filename: `${name}-storage-slots.json`, - content: storageSlots as string, + filename: `${name}-storage-slots.ts`, + content: templateRenderer({ + template: storageSlotsTemplate, + versions, + data: { storageSlots }, + }), } ); break; diff --git a/packages/abi/src/gen/renderers/ts/templates/abi.hbs b/packages/abi/src/gen/renderers/ts/templates/abi.hbs new file mode 100644 index 00000000000..0516073cc70 --- /dev/null +++ b/packages/abi/src/gen/renderers/ts/templates/abi.hbs @@ -0,0 +1,3 @@ +{{header}} + +export const abi = {{abiContents}}; \ No newline at end of file diff --git a/packages/abi/src/gen/renderers/ts/templates/contract-factory.hbs b/packages/abi/src/gen/renderers/ts/templates/contract-factory.hbs index 386eacd5ec7..b57f0ea8e33 100644 --- a/packages/abi/src/gen/renderers/ts/templates/contract-factory.hbs +++ b/packages/abi/src/gen/renderers/ts/templates/contract-factory.hbs @@ -1,16 +1,16 @@ {{header}} -import { Contract, ContractFactory } from 'fuels'; -import type { Account, Provider, DeployContractOptions, DeployContractResult, StorageSlot } from 'fuels'; +import { ContractFactory } from 'fuels'; +import type { Account, Provider, DeployContractOptions } from 'fuels'; import { {{name}} } from './{{name}}'; import { bytecode } from './{{name}}-bytecode'; -import abi from './{{name}}-abi.json'; -import storageSlots from './{{name}}-storage-slots.json'; +import { abi } from './{{name}}-abi'; +import { storageSlots } from './{{name}}-storage-slots'; export class {{name}}Factory extends ContractFactory<{{name}}> { static readonly bytecode = bytecode; - static readonly storageSlots: StorageSlot[] = storageSlots; + static readonly storageSlots = storageSlots; constructor(accountOrProvider: Account | Provider) { super(bytecode, abi, accountOrProvider, {{name}}Factory.storageSlots); diff --git a/packages/abi/src/gen/renderers/ts/templates/contract.hbs b/packages/abi/src/gen/renderers/ts/templates/contract.hbs index 6907ada417b..1b5fa4f75c2 100644 --- a/packages/abi/src/gen/renderers/ts/templates/contract.hbs +++ b/packages/abi/src/gen/renderers/ts/templates/contract.hbs @@ -4,7 +4,7 @@ import { Contract, Interface } from "fuels"; import type { AbstractAddress, Account, Provider } from 'fuels'; import type { {{name}}Types } from './{{name}}Types'; import type { InterfaceFunctionMapper, ProgramFunctionMapper } from '../common'; -import abi from './{{name}}-abi.json'; +import { abi } from './{{name}}-abi'; export class {{name}}Interface extends Interface { declare functions: InterfaceFunctionMapper<{{name}}Types['functions']>; diff --git a/packages/abi/src/gen/renderers/ts/templates/predicate.hbs b/packages/abi/src/gen/renderers/ts/templates/predicate.hbs index 6ec23299af7..0fa5fe23b58 100644 --- a/packages/abi/src/gen/renderers/ts/templates/predicate.hbs +++ b/packages/abi/src/gen/renderers/ts/templates/predicate.hbs @@ -2,7 +2,7 @@ import { Predicate } from 'fuels'; import type { PredicateParams } from 'fuels'; -import abi from './{{name}}-abi.json'; +import { abi } from './{{name}}-abi'; import { bytecode } from './{{name}}-bytecode'; import type { {{name}}Types } from './{{name}}Types'; diff --git a/packages/abi/src/gen/renderers/ts/templates/script.hbs b/packages/abi/src/gen/renderers/ts/templates/script.hbs index 1a0aae30279..0e9e1c01f7b 100644 --- a/packages/abi/src/gen/renderers/ts/templates/script.hbs +++ b/packages/abi/src/gen/renderers/ts/templates/script.hbs @@ -2,7 +2,7 @@ import { Script } from 'fuels'; import type { Account } from 'fuels'; -import abi from './{{name}}-abi.json'; +import { abi } from './{{name}}-abi'; import { bytecode } from './{{name}}-bytecode'; import type { {{name}}Types } from './{{name}}Types'; diff --git a/packages/abi/src/gen/renderers/ts/templates/storage-slots.hbs b/packages/abi/src/gen/renderers/ts/templates/storage-slots.hbs new file mode 100644 index 00000000000..a877acccda5 --- /dev/null +++ b/packages/abi/src/gen/renderers/ts/templates/storage-slots.hbs @@ -0,0 +1,5 @@ +{{header}} + +import type { StorageSlot } from 'fuels'; + +export const storageSlots: StorageSlot[] = {{storageSlots}}; \ No newline at end of file diff --git a/packages/fuel-gauge/src/abi/abi-gen.test.ts b/packages/fuel-gauge/src/abi/abi-gen.test.ts index fb81e92890a..682b3a7812f 100644 --- a/packages/fuel-gauge/src/abi/abi-gen.test.ts +++ b/packages/fuel-gauge/src/abi/abi-gen.test.ts @@ -1,4 +1,4 @@ -import { readFileSync } from 'fs'; +import { readFileSync, writeFileSync } from 'fs'; import { AbiGen } from 'fuels'; import { getProgramDetails } from 'fuels/cli-utils'; import { join } from 'path'; @@ -19,18 +19,18 @@ describe('AbiGen', () => { ['contracts/contract-types', 'contracts/AbiContractTypes.ts'], ['contracts/contract-factory', 'contracts/AbiContractFactory.ts'], ['contracts/contract-bytecode', 'contracts/AbiContract-bytecode.ts'], - ['contracts/contract-abi', 'contracts/AbiContract-abi.json'], - ['contracts/contract-storage-slots', 'contracts/AbiContract-storage-slots.json'], + ['contracts/contract-abi', 'contracts/AbiContract-abi.ts'], + ['contracts/contract-storage-slots', 'contracts/AbiContract-storage-slots.ts'], ['predicates/predicate-index', 'predicates/index.ts'], ['predicates/predicate', 'predicates/AbiPredicate.ts'], ['predicates/predicate-types', 'predicates/AbiPredicateTypes.ts'], - ['predicates/predicate-abi', 'predicates/AbiPredicate-abi.json'], + ['predicates/predicate-abi', 'predicates/AbiPredicate-abi.ts'], ['scripts/script-index', 'scripts/index.ts'], ['scripts/script', 'scripts/AbiScript.ts'], ['scripts/script-types', 'scripts/AbiScriptTypes.ts'], - ['scripts/script-abi', 'scripts/AbiScript-abi.json'], + ['scripts/script-abi', 'scripts/AbiScript-abi.ts'], ]); const { buildDir: contractDir } = getAbiForcProject(AbiProjectsEnum.ABI_CONTRACT); @@ -49,7 +49,6 @@ describe('AbiGen', () => { `packages/fuel-gauge/src/abi/fixtures/${fixture}.txt` ); const fixtureContent = readFileSync(fixtureFile).toString(); - const result = results.find((r) => r.filename === filename); expect(result?.content).toEqual(fixtureContent); diff --git a/packages/fuel-gauge/src/abi/fixtures/contracts/contract-abi.txt b/packages/fuel-gauge/src/abi/fixtures/contracts/contract-abi.txt index 18067c5ae43..316180f7fe2 100644 --- a/packages/fuel-gauge/src/abi/fixtures/contracts/contract-abi.txt +++ b/packages/fuel-gauge/src/abi/fixtures/contracts/contract-abi.txt @@ -1,4 +1,15 @@ -{ +/* Autogenerated file. Do not edit manually. */ + +/* eslint-disable eslint-comments/no-unlimited-disable */ +/* eslint-disable */ + +/* + Fuels version: 0.94.8 + Forc version: 0.64.0 +*/ + + +export const abi = { "programType": "contract", "specVersion": "1", "encodingVersion": "1", @@ -2794,4 +2805,4 @@ "offset": 119296 } ] -} \ No newline at end of file +}; \ No newline at end of file diff --git a/packages/fuel-gauge/src/abi/fixtures/contracts/contract-factory.txt b/packages/fuel-gauge/src/abi/fixtures/contracts/contract-factory.txt index c0789916ba4..22e9e30083d 100644 --- a/packages/fuel-gauge/src/abi/fixtures/contracts/contract-factory.txt +++ b/packages/fuel-gauge/src/abi/fixtures/contracts/contract-factory.txt @@ -10,16 +10,16 @@ import { Contract, ContractFactory } from 'fuels'; -import type { Account, Provider, DeployContractOptions, DeployContractResult, StorageSlot } from 'fuels'; +import type { Account, Provider, DeployContractOptions, DeployContractResult } from 'fuels'; import { AbiContract } from './AbiContract'; import { bytecode } from './AbiContract-bytecode'; -import abi from './AbiContract-abi.json'; -import storageSlots from './AbiContract-storage-slots.json'; +import { abi } from './AbiContract-abi'; +import { storageSlots } from './AbiContract-storage-slots'; export class AbiContractFactory extends ContractFactory { static readonly bytecode = bytecode; - static readonly storageSlots: StorageSlot[] = storageSlots; + static readonly storageSlots = storageSlots; constructor(accountOrProvider: Account | Provider) { super(bytecode, abi, accountOrProvider, AbiContractFactory.storageSlots); diff --git a/packages/fuel-gauge/src/abi/fixtures/contracts/contract-storage-slots.txt b/packages/fuel-gauge/src/abi/fixtures/contracts/contract-storage-slots.txt index 0637a088a01..30fcd6402c3 100644 --- a/packages/fuel-gauge/src/abi/fixtures/contracts/contract-storage-slots.txt +++ b/packages/fuel-gauge/src/abi/fixtures/contracts/contract-storage-slots.txt @@ -1 +1,14 @@ -[] \ No newline at end of file +/* Autogenerated file. Do not edit manually. */ + +/* eslint-disable eslint-comments/no-unlimited-disable */ +/* eslint-disable */ + +/* + Fuels version: 0.94.8 + Forc version: 0.64.0 +*/ + + +import type { StorageSlot } from 'fuels'; + +export const storageSlots: StorageSlot[] = []; \ No newline at end of file diff --git a/packages/fuel-gauge/src/abi/fixtures/contracts/contract.txt b/packages/fuel-gauge/src/abi/fixtures/contracts/contract.txt index 1ebfb7e0b9d..2febe876dfc 100644 --- a/packages/fuel-gauge/src/abi/fixtures/contracts/contract.txt +++ b/packages/fuel-gauge/src/abi/fixtures/contracts/contract.txt @@ -13,7 +13,7 @@ import { Contract, Interface } from "fuels"; import type { AbstractAddress, Account, Provider } from 'fuels'; import type { AbiContractTypes } from './AbiContractTypes'; import type { InterfaceFunctionMapper, ProgramFunctionMapper } from '../common'; -import abi from './AbiContract-abi.json'; +import { abi } from './AbiContract-abi'; export class AbiContractInterface extends Interface { declare functions: InterfaceFunctionMapper; diff --git a/packages/fuel-gauge/src/abi/fixtures/predicates/predicate-abi.txt b/packages/fuel-gauge/src/abi/fixtures/predicates/predicate-abi.txt index 81c9c403b53..227b7ab63a8 100644 --- a/packages/fuel-gauge/src/abi/fixtures/predicates/predicate-abi.txt +++ b/packages/fuel-gauge/src/abi/fixtures/predicates/predicate-abi.txt @@ -1,4 +1,15 @@ -{ +/* Autogenerated file. Do not edit manually. */ + +/* eslint-disable eslint-comments/no-unlimited-disable */ +/* eslint-disable */ + +/* + Fuels version: 0.94.8 + Forc version: 0.64.0 +*/ + + +export const abi = { "programType": "predicate", "specVersion": "1", "encodingVersion": "1", @@ -269,4 +280,4 @@ "offset": 1904 } ] -} \ No newline at end of file +}; \ No newline at end of file diff --git a/packages/fuel-gauge/src/abi/fixtures/predicates/predicate.txt b/packages/fuel-gauge/src/abi/fixtures/predicates/predicate.txt index 4af2eee2d5d..74022af3bca 100644 --- a/packages/fuel-gauge/src/abi/fixtures/predicates/predicate.txt +++ b/packages/fuel-gauge/src/abi/fixtures/predicates/predicate.txt @@ -11,7 +11,7 @@ import { Predicate } from 'fuels'; import type { PredicateParams } from 'fuels'; -import abi from './AbiPredicate-abi.json'; +import { abi } from './AbiPredicate-abi'; import { bytecode } from './AbiPredicate-bytecode'; import type { AbiPredicateTypes } from './AbiPredicateTypes'; diff --git a/packages/fuel-gauge/src/abi/fixtures/scripts/script-abi.txt b/packages/fuel-gauge/src/abi/fixtures/scripts/script-abi.txt index 93d5c24a82c..6387bfcb5bb 100644 --- a/packages/fuel-gauge/src/abi/fixtures/scripts/script-abi.txt +++ b/packages/fuel-gauge/src/abi/fixtures/scripts/script-abi.txt @@ -1,4 +1,15 @@ -{ +/* Autogenerated file. Do not edit manually. */ + +/* eslint-disable eslint-comments/no-unlimited-disable */ +/* eslint-disable */ + +/* + Fuels version: 0.94.8 + Forc version: 0.64.0 +*/ + + +export const abi = { "programType": "script", "specVersion": "1", "encodingVersion": "1", @@ -269,4 +280,4 @@ "offset": 2328 } ] -} \ No newline at end of file +}; \ No newline at end of file diff --git a/packages/fuel-gauge/src/abi/fixtures/scripts/script.txt b/packages/fuel-gauge/src/abi/fixtures/scripts/script.txt index d9338dd6836..e67eeea0317 100644 --- a/packages/fuel-gauge/src/abi/fixtures/scripts/script.txt +++ b/packages/fuel-gauge/src/abi/fixtures/scripts/script.txt @@ -11,7 +11,7 @@ import { Script } from 'fuels'; import type { Account } from 'fuels'; -import abi from './AbiScript-abi.json'; +import { abi } from './AbiScript-abi'; import { bytecode } from './AbiScript-bytecode'; import type { AbiScriptTypes } from './AbiScriptTypes'; From cf65fbf8aabef03bba428fdf3e00eecb22131d7b Mon Sep 17 00:00:00 2001 From: nedsalk Date: Mon, 16 Dec 2024 09:10:12 +0100 Subject: [PATCH 081/126] move from linting to cast --- packages/abi/src/gen/renderers/ts/typers/iterators.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/abi/src/gen/renderers/ts/typers/iterators.ts b/packages/abi/src/gen/renderers/ts/typers/iterators.ts index 24df397f422..3ed4f99743d 100644 --- a/packages/abi/src/gen/renderers/ts/typers/iterators.ts +++ b/packages/abi/src/gen/renderers/ts/typers/iterators.ts @@ -1,4 +1,5 @@ import { ARRAY_REGEX } from '../../../../matchers/sway-type-matchers'; +import type { AbiTypeComponent } from '../../../../parser'; import type { Typer } from './types'; import { mapComponents } from './utils'; @@ -9,8 +10,7 @@ export const tupleTyper: Typer = ({ abiType }, typer) => export const arrayTyper: Typer = ({ abiType }, typer) => { const length = ARRAY_REGEX.exec(abiType.swayType)?.[2]; - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - const { type } = abiType.components![0]!; + const { type } = abiType.components?.[0] as AbiTypeComponent; const mapped = typer({ abiType: type, asReference: true }); const input = `ArrayOfLength<${mapped.input}, ${length}>`; @@ -25,8 +25,7 @@ export const arrayTyper: Typer = ({ abiType }, typer) => { }; export const vectorTyper: Typer = ({ abiType }, typer) => { - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - const { type } = abiType.components![0]!; + const { type } = abiType.components?.[0] as AbiTypeComponent; const mapped = typer({ abiType: type, asReference: true }); const input = `${mapped.input}[]`; const output = `${mapped.output}[]`; From 7a0ae00f777e6566279acd02bcfb07069f958d29 Mon Sep 17 00:00:00 2001 From: nedsalk Date: Mon, 16 Dec 2024 09:24:30 +0100 Subject: [PATCH 082/126] remove usage of `fuels-typegen` --- apps/docs/src/guide/fuels-cli/commands.md | 2 +- packages/recipes/scripts/build-recipes.ts | 2 +- scripts/changeset/changeset-version-with-docs.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/docs/src/guide/fuels-cli/commands.md b/apps/docs/src/guide/fuels-cli/commands.md index 0c6a1283153..290c602d642 100644 --- a/apps/docs/src/guide/fuels-cli/commands.md +++ b/apps/docs/src/guide/fuels-cli/commands.md @@ -73,7 +73,7 @@ npx fuels@{{fuels}} build ``` 1. Build all Sway programs under your `workspace` using `forc` [1](https://docs.fuel.network/docs/forc/commands/forc_build/) -1. Generate types for them using `fuels-typegen` [2](#fuels-typegen) +1. Generate types for them using `fuels typegen` [2](#fuels-typegen) ```console-vue npx fuels@{{fuels}} build --deploy diff --git a/packages/recipes/scripts/build-recipes.ts b/packages/recipes/scripts/build-recipes.ts index 0e4003f3f86..e69f7ed05a7 100644 --- a/packages/recipes/scripts/build-recipes.ts +++ b/packages/recipes/scripts/build-recipes.ts @@ -2,7 +2,7 @@ import { execSync } from 'child_process'; import { readFileSync, writeFileSync } from 'fs'; import { join } from 'path'; -execSync(`fuels-typegen -i src/contracts/**/*-abi.json -o src/types`); +execSync(`fuels typegen -i src/contracts/src14 -o src/types`); const supportedRecipes = ['Src14OwnedProxy'].map((s) => [s, `${s}Factory`]).flat(); const importReplacementMap = { diff --git a/scripts/changeset/changeset-version-with-docs.ts b/scripts/changeset/changeset-version-with-docs.ts index bbded5b557a..6f492d04dd0 100644 --- a/scripts/changeset/changeset-version-with-docs.ts +++ b/scripts/changeset/changeset-version-with-docs.ts @@ -18,7 +18,7 @@ import { error } from 'console'; /** * Invoke versions' build script (will rewrite version files if needed) - * and build the versions package, so that fuels-typegen picks up the + * and build the versions package, so that fuels typegen picks up the * new fuels version when generating the proxy contract below. */ execSync(`pnpm -C packages/versions build`); From 6b25941c48c9fccf30bdf2abb00d75ce6a8a8038 Mon Sep 17 00:00:00 2001 From: nedsalk Date: Mon, 16 Dec 2024 09:26:36 +0100 Subject: [PATCH 083/126] change to `FuelError` --- packages/fuels/src/cli/commands/typegen/utils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/fuels/src/cli/commands/typegen/utils.ts b/packages/fuels/src/cli/commands/typegen/utils.ts index 7036ea39dde..ef13ab612a4 100644 --- a/packages/fuels/src/cli/commands/typegen/utils.ts +++ b/packages/fuels/src/cli/commands/typegen/utils.ts @@ -1,4 +1,5 @@ import { type ProgramDetails, type AbiSpecification, AbiParser } from '@fuel-ts/abi'; +import { ErrorCode, FuelError } from '@fuel-ts/errors'; import { compressBytecode, hexlify } from '@fuel-ts/utils'; import { readFileSync } from 'fs'; import { globSync } from 'glob'; @@ -29,8 +30,7 @@ function normalizeProjectName(str: string): string { const errMsg = `The provided string '${str}' results in an empty output after`.concat( ` normalization, therefore, it can't normalize string.` ); - // throw new FuelError(ErrorCode.PARSE_FAILED, errMsg); - throw new Error(errMsg); + throw new FuelError(ErrorCode.PARSE_FAILED, errMsg); } return output; From 3f06b38a5bafc7f34f821f974c08f7e469a82d8f Mon Sep 17 00:00:00 2001 From: nedsalk Date: Mon, 16 Dec 2024 09:40:51 +0100 Subject: [PATCH 084/126] simplify inputs/output types for script and predicate --- .../abi/src/gen/renderers/ts/renderers/render-types.ts | 1 + packages/abi/src/gen/renderers/ts/templates/predicate.hbs | 4 ++-- packages/abi/src/gen/renderers/ts/templates/script.hbs | 4 ++-- packages/abi/src/gen/renderers/ts/templates/types.hbs | 7 +++++++ .../src/abi/fixtures/contracts/contract-factory.txt | 4 ++-- .../src/abi/fixtures/predicates/predicate-types.txt | 8 ++------ .../fuel-gauge/src/abi/fixtures/predicates/predicate.txt | 4 ++-- .../fuel-gauge/src/abi/fixtures/scripts/script-types.txt | 8 ++------ packages/fuel-gauge/src/abi/fixtures/scripts/script.txt | 4 ++-- 9 files changed, 22 insertions(+), 22 deletions(-) diff --git a/packages/abi/src/gen/renderers/ts/renderers/render-types.ts b/packages/abi/src/gen/renderers/ts/renderers/render-types.ts index f40ef48b232..1f3dacf270b 100644 --- a/packages/abi/src/gen/renderers/ts/renderers/render-types.ts +++ b/packages/abi/src/gen/renderers/ts/renderers/render-types.ts @@ -111,6 +111,7 @@ export function renderTypes( template: typesTemplate, versions, data: { + isContract: abi.programType === 'contract', name, fuelsTypeImports, commonTypeImports, diff --git a/packages/abi/src/gen/renderers/ts/templates/predicate.hbs b/packages/abi/src/gen/renderers/ts/templates/predicate.hbs index 0fa5fe23b58..54a8fb73ab9 100644 --- a/packages/abi/src/gen/renderers/ts/templates/predicate.hbs +++ b/packages/abi/src/gen/renderers/ts/templates/predicate.hbs @@ -8,14 +8,14 @@ import type { {{name}}Types } from './{{name}}Types'; export type {{name}}Parameters = Omit< PredicateParams< - {{name}}Types['functions']['main']['inputs'], + {{name}}Types['inputs'], {{name}}Types['configurables'] >, 'abi' | 'bytecode' >; export class {{name}} extends Predicate< - {{name}}Types['functions']['main']['inputs'], + {{name}}Types['inputs'], {{name}}Types['configurables'] > { public static readonly abi = abi; diff --git a/packages/abi/src/gen/renderers/ts/templates/script.hbs b/packages/abi/src/gen/renderers/ts/templates/script.hbs index 0e9e1c01f7b..985bc6f21fb 100644 --- a/packages/abi/src/gen/renderers/ts/templates/script.hbs +++ b/packages/abi/src/gen/renderers/ts/templates/script.hbs @@ -7,8 +7,8 @@ import { bytecode } from './{{name}}-bytecode'; import type { {{name}}Types } from './{{name}}Types'; export class {{name}} extends Script< - {{name}}Types['functions']['main']['inputs'], - {{name}}Types['functions']['main']['output'] + {{name}}Types['inputs'], + {{name}}Types['output'] > { public static readonly abi = abi; public static readonly bytecode = bytecode; diff --git a/packages/abi/src/gen/renderers/ts/templates/types.hbs b/packages/abi/src/gen/renderers/ts/templates/types.hbs index 134b9296b51..8624ec21820 100644 --- a/packages/abi/src/gen/renderers/ts/templates/types.hbs +++ b/packages/abi/src/gen/renderers/ts/templates/types.hbs @@ -13,6 +13,7 @@ export type {{output}}; {{/each}} export interface {{name}}Types { + {{#if isContract}} functions: { {{#each functions}} {{name}}: { @@ -21,6 +22,12 @@ export interface {{name}}Types { }; {{/each}} }; + {{else}} + {{#each functions}} + inputs: {{inputs}}; + output: {{output}}; + {{/each}} + {{/if}} configurables: {{#if configurables}}Partial<{ {{#each configurables}} {{name}}: {{input}}; diff --git a/packages/fuel-gauge/src/abi/fixtures/contracts/contract-factory.txt b/packages/fuel-gauge/src/abi/fixtures/contracts/contract-factory.txt index 22e9e30083d..a6d514737c1 100644 --- a/packages/fuel-gauge/src/abi/fixtures/contracts/contract-factory.txt +++ b/packages/fuel-gauge/src/abi/fixtures/contracts/contract-factory.txt @@ -9,8 +9,8 @@ */ -import { Contract, ContractFactory } from 'fuels'; -import type { Account, Provider, DeployContractOptions, DeployContractResult } from 'fuels'; +import { ContractFactory } from 'fuels'; +import type { Account, Provider, DeployContractOptions } from 'fuels'; import { AbiContract } from './AbiContract'; import { bytecode } from './AbiContract-bytecode'; import { abi } from './AbiContract-abi'; diff --git a/packages/fuel-gauge/src/abi/fixtures/predicates/predicate-types.txt b/packages/fuel-gauge/src/abi/fixtures/predicates/predicate-types.txt index 89561596428..72b3230e521 100644 --- a/packages/fuel-gauge/src/abi/fixtures/predicates/predicate-types.txt +++ b/packages/fuel-gauge/src/abi/fixtures/predicates/predicate-types.txt @@ -23,12 +23,8 @@ export type ValidationInput = { has_account: boolean, total_complete: BigNumberi export type ValidationOutput = { has_account: boolean, total_complete: BN }; export interface AbiPredicateTypes { - functions: { - main: { - inputs: [configurables: ConfigurablesInput, vec: ValidationInput[], enm: MyGenericEnumInput, opt: Option, res: Result, BigNumberish>]; - output: boolean; - }; - }; + inputs: [configurables: ConfigurablesInput, vec: ValidationInput[], enm: MyGenericEnumInput, opt: Option, res: Result, BigNumberish>]; + output: boolean; configurables: Partial<{ U8_VALUE: BigNumberish; B256_VALUE: string; diff --git a/packages/fuel-gauge/src/abi/fixtures/predicates/predicate.txt b/packages/fuel-gauge/src/abi/fixtures/predicates/predicate.txt index 74022af3bca..844543912f9 100644 --- a/packages/fuel-gauge/src/abi/fixtures/predicates/predicate.txt +++ b/packages/fuel-gauge/src/abi/fixtures/predicates/predicate.txt @@ -17,14 +17,14 @@ import type { AbiPredicateTypes } from './AbiPredicateTypes'; export type AbiPredicateParameters = Omit< PredicateParams< - AbiPredicateTypes['functions']['main']['inputs'], + AbiPredicateTypes['inputs'], AbiPredicateTypes['configurables'] >, 'abi' | 'bytecode' >; export class AbiPredicate extends Predicate< - AbiPredicateTypes['functions']['main']['inputs'], + AbiPredicateTypes['inputs'], AbiPredicateTypes['configurables'] > { public static readonly abi = abi; diff --git a/packages/fuel-gauge/src/abi/fixtures/scripts/script-types.txt b/packages/fuel-gauge/src/abi/fixtures/scripts/script-types.txt index 9df6b880c23..f4b6788bedb 100644 --- a/packages/fuel-gauge/src/abi/fixtures/scripts/script-types.txt +++ b/packages/fuel-gauge/src/abi/fixtures/scripts/script-types.txt @@ -23,12 +23,8 @@ export type ValidationInput = { has_account: boolean, total_complete: BigNumberi export type ValidationOutput = { has_account: boolean, total_complete: BN }; export interface AbiScriptTypes { - functions: { - main: { - inputs: [configurables: ConfigurablesInput, vec: ValidationInput[], enm: MyGenericEnumInput, opt: Option, res: Result, BigNumberish>]; - output: boolean; - }; - }; + inputs: [configurables: ConfigurablesInput, vec: ValidationInput[], enm: MyGenericEnumInput, opt: Option, res: Result, BigNumberish>]; + output: boolean; configurables: Partial<{ U8_VALUE: BigNumberish; B256_VALUE: string; diff --git a/packages/fuel-gauge/src/abi/fixtures/scripts/script.txt b/packages/fuel-gauge/src/abi/fixtures/scripts/script.txt index e67eeea0317..38f9be8c55d 100644 --- a/packages/fuel-gauge/src/abi/fixtures/scripts/script.txt +++ b/packages/fuel-gauge/src/abi/fixtures/scripts/script.txt @@ -16,8 +16,8 @@ import { bytecode } from './AbiScript-bytecode'; import type { AbiScriptTypes } from './AbiScriptTypes'; export class AbiScript extends Script< - AbiScriptTypes['functions']['main']['inputs'], - AbiScriptTypes['functions']['main']['output'] + AbiScriptTypes['inputs'], + AbiScriptTypes['output'] > { public static readonly abi = abi; public static readonly bytecode = bytecode; From 032b736b73f9df0b8986097cf363a638eb75250d Mon Sep 17 00:00:00 2001 From: nedsalk Date: Mon, 16 Dec 2024 09:48:26 +0100 Subject: [PATCH 085/126] improve index file rendering --- .../renderers/ts/renderers/render-index-files.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/packages/abi/src/gen/renderers/ts/renderers/render-index-files.ts b/packages/abi/src/gen/renderers/ts/renderers/render-index-files.ts index 06efbbe594c..6cff8af7a7b 100644 --- a/packages/abi/src/gen/renderers/ts/renderers/render-index-files.ts +++ b/packages/abi/src/gen/renderers/ts/renderers/render-index-files.ts @@ -21,22 +21,25 @@ export function renderIndexFiles( const { withParentDir, removeParentDir } = getParentDirWrapper(programType); results.push({ + // from index.ts to e.g. contracts/index.ts filename: withParentDir('index.ts'), content: templateRenderer({ versions, template: indexTemplate, data: { - paths: files.map( - (filename) => - // remove .ts extension - removeParentDir(filename).split('.')[0] - ), + paths: files.map((filename) => { + // from e.g. contracts/AbiContract.ts to AbiContract.ts + const relativePathToFile = removeParentDir(filename); + // remove .ts extension + return relativePathToFile.split('.')[0]; + }), }, }), }); }); results.push({ + // this is the main index.ts file in the root directory filename: 'index.ts', content: templateRenderer({ versions, From ae86e26c00042d8a2a005c5b647fb2b3d9779b7f Mon Sep 17 00:00:00 2001 From: nedsalk Date: Mon, 16 Dec 2024 10:04:58 +0100 Subject: [PATCH 086/126] export types from base program file (and thus index) --- apps/demo-typegen/src/demo.test.ts | 4 ++-- .../guide/predicates/snippets/custom-transactions.ts | 4 ++-- .../abi/src/gen/renderers/ts/templates/contract.hbs | 8 +++++--- .../abi/src/gen/renderers/ts/templates/predicate.hbs | 12 +++++++----- .../abi/src/gen/renderers/ts/templates/script.hbs | 8 +++++--- .../src/abi/fixtures/contracts/contract.txt | 8 +++++--- .../src/abi/fixtures/predicates/predicate.txt | 12 +++++++----- .../fuel-gauge/src/abi/fixtures/scripts/script.txt | 8 +++++--- 8 files changed, 38 insertions(+), 26 deletions(-) diff --git a/apps/demo-typegen/src/demo.test.ts b/apps/demo-typegen/src/demo.test.ts index 9a6503ac2f7..86d19f112c8 100644 --- a/apps/demo-typegen/src/demo.test.ts +++ b/apps/demo-typegen/src/demo.test.ts @@ -4,7 +4,7 @@ import { expectToThrowFuelError, launchTestNode } from 'fuels/test-utils'; import { DemoContract, DemoContractFactory } from './contract-types'; import { DemoPredicate } from './predicate-types'; -import type { DemoPredicateParameters } from './predicate-types'; +import type { DemoPredicateTypes } from './predicate-types'; import { DemoScript } from './script-types'; /** @@ -162,7 +162,7 @@ test('Example predicate', async () => { const receiver = Wallet.fromAddress(Address.fromRandom(), provider); - const predicateData: DemoPredicateParameters['data'] = []; + const predicateData: DemoPredicateTypes['inputs'] = []; const predicate = new DemoPredicate({ provider, data: predicateData, diff --git a/apps/docs/src/guide/predicates/snippets/custom-transactions.ts b/apps/docs/src/guide/predicates/snippets/custom-transactions.ts index 5e6bc37f36e..35839a1d699 100644 --- a/apps/docs/src/guide/predicates/snippets/custom-transactions.ts +++ b/apps/docs/src/guide/predicates/snippets/custom-transactions.ts @@ -3,7 +3,7 @@ import { Provider, ScriptTransactionRequest, Wallet } from 'fuels'; import { LOCAL_NETWORK_URL, WALLET_PVT_KEY } from '../../../env'; import { ConfigurablePin } from '../../../typegend'; -import type { ConfigurablePinParameters } from '../../../typegend/predicates/ConfigurablePin'; +import type { ConfigurablePinTypes } from '../../../typegend/predicates/ConfigurablePin'; // Setup const provider = await Provider.create(LOCAL_NETWORK_URL); @@ -15,7 +15,7 @@ const amountToReceiver = 100_000; // Instantiate the predicate using valid predicate data, aka the pin we need // to send the funds to the receiver -const data: ConfigurablePinParameters['data'] = [1337]; +const data: ConfigurablePinTypes['inputs'] = [1337]; const predicate = new ConfigurablePin({ provider, data }); // Fund the predicate, so that we can send these funds via predicate logic diff --git a/packages/abi/src/gen/renderers/ts/templates/contract.hbs b/packages/abi/src/gen/renderers/ts/templates/contract.hbs index 1b5fa4f75c2..9353d81cd51 100644 --- a/packages/abi/src/gen/renderers/ts/templates/contract.hbs +++ b/packages/abi/src/gen/renderers/ts/templates/contract.hbs @@ -2,12 +2,14 @@ import { Contract, Interface } from "fuels"; import type { AbstractAddress, Account, Provider } from 'fuels'; -import type { {{name}}Types } from './{{name}}Types'; +import type { {{name}}Types as Types } from './{{name}}Types'; import type { InterfaceFunctionMapper, ProgramFunctionMapper } from '../common'; import { abi } from './{{name}}-abi'; +export type {{name}}Types = Types; + export class {{name}}Interface extends Interface { - declare functions: InterfaceFunctionMapper<{{name}}Types['functions']>; + declare functions: InterfaceFunctionMapper; constructor() { super(abi); @@ -16,7 +18,7 @@ export class {{name}}Interface extends Interface { export class {{name}} extends Contract { declare interface: {{name}}Interface; - declare functions: ProgramFunctionMapper<{{name}}Types['functions']>; + declare functions: ProgramFunctionMapper; public static readonly abi = abi; diff --git a/packages/abi/src/gen/renderers/ts/templates/predicate.hbs b/packages/abi/src/gen/renderers/ts/templates/predicate.hbs index 54a8fb73ab9..f489c5f88db 100644 --- a/packages/abi/src/gen/renderers/ts/templates/predicate.hbs +++ b/packages/abi/src/gen/renderers/ts/templates/predicate.hbs @@ -4,19 +4,21 @@ import { Predicate } from 'fuels'; import type { PredicateParams } from 'fuels'; import { abi } from './{{name}}-abi'; import { bytecode } from './{{name}}-bytecode'; -import type { {{name}}Types } from './{{name}}Types'; +import type { {{name}}Types as Types } from './{{name}}Types'; + +export type {{name}}Types = Types; export type {{name}}Parameters = Omit< PredicateParams< - {{name}}Types['inputs'], - {{name}}Types['configurables'] + Types['inputs'], + Types['configurables'] >, 'abi' | 'bytecode' >; export class {{name}} extends Predicate< - {{name}}Types['inputs'], - {{name}}Types['configurables'] + Types['inputs'], + Types['configurables'] > { public static readonly abi = abi; public static readonly bytecode = bytecode; diff --git a/packages/abi/src/gen/renderers/ts/templates/script.hbs b/packages/abi/src/gen/renderers/ts/templates/script.hbs index 985bc6f21fb..40be5aaade1 100644 --- a/packages/abi/src/gen/renderers/ts/templates/script.hbs +++ b/packages/abi/src/gen/renderers/ts/templates/script.hbs @@ -4,11 +4,13 @@ import { Script } from 'fuels'; import type { Account } from 'fuels'; import { abi } from './{{name}}-abi'; import { bytecode } from './{{name}}-bytecode'; -import type { {{name}}Types } from './{{name}}Types'; +import type { {{name}}Types as Types } from './{{name}}Types'; + +export type {{name}}Types = Types; export class {{name}} extends Script< - {{name}}Types['inputs'], - {{name}}Types['output'] + Types['inputs'], + Types['output'] > { public static readonly abi = abi; public static readonly bytecode = bytecode; diff --git a/packages/fuel-gauge/src/abi/fixtures/contracts/contract.txt b/packages/fuel-gauge/src/abi/fixtures/contracts/contract.txt index 2febe876dfc..593d6cf4c5b 100644 --- a/packages/fuel-gauge/src/abi/fixtures/contracts/contract.txt +++ b/packages/fuel-gauge/src/abi/fixtures/contracts/contract.txt @@ -11,12 +11,14 @@ import { Contract, Interface } from "fuels"; import type { AbstractAddress, Account, Provider } from 'fuels'; -import type { AbiContractTypes } from './AbiContractTypes'; +import type { AbiContractTypes as Types } from './AbiContractTypes'; import type { InterfaceFunctionMapper, ProgramFunctionMapper } from '../common'; import { abi } from './AbiContract-abi'; +export type AbiContractTypes = Types; + export class AbiContractInterface extends Interface { - declare functions: InterfaceFunctionMapper; + declare functions: InterfaceFunctionMapper; constructor() { super(abi); @@ -25,7 +27,7 @@ export class AbiContractInterface extends Interface { export class AbiContract extends Contract { declare interface: AbiContractInterface; - declare functions: ProgramFunctionMapper; + declare functions: ProgramFunctionMapper; public static readonly abi = abi; diff --git a/packages/fuel-gauge/src/abi/fixtures/predicates/predicate.txt b/packages/fuel-gauge/src/abi/fixtures/predicates/predicate.txt index 844543912f9..0da637ec42d 100644 --- a/packages/fuel-gauge/src/abi/fixtures/predicates/predicate.txt +++ b/packages/fuel-gauge/src/abi/fixtures/predicates/predicate.txt @@ -13,19 +13,21 @@ import { Predicate } from 'fuels'; import type { PredicateParams } from 'fuels'; import { abi } from './AbiPredicate-abi'; import { bytecode } from './AbiPredicate-bytecode'; -import type { AbiPredicateTypes } from './AbiPredicateTypes'; +import type { AbiPredicateTypes as Types } from './AbiPredicateTypes'; + +export type AbiPredicateTypes = Types; export type AbiPredicateParameters = Omit< PredicateParams< - AbiPredicateTypes['inputs'], - AbiPredicateTypes['configurables'] + Types['inputs'], + Types['configurables'] >, 'abi' | 'bytecode' >; export class AbiPredicate extends Predicate< - AbiPredicateTypes['inputs'], - AbiPredicateTypes['configurables'] + Types['inputs'], + Types['configurables'] > { public static readonly abi = abi; public static readonly bytecode = bytecode; diff --git a/packages/fuel-gauge/src/abi/fixtures/scripts/script.txt b/packages/fuel-gauge/src/abi/fixtures/scripts/script.txt index 38f9be8c55d..e9c653effe6 100644 --- a/packages/fuel-gauge/src/abi/fixtures/scripts/script.txt +++ b/packages/fuel-gauge/src/abi/fixtures/scripts/script.txt @@ -13,11 +13,13 @@ import { Script } from 'fuels'; import type { Account } from 'fuels'; import { abi } from './AbiScript-abi'; import { bytecode } from './AbiScript-bytecode'; -import type { AbiScriptTypes } from './AbiScriptTypes'; +import type { AbiScriptTypes as Types } from './AbiScriptTypes'; + +export type AbiScriptTypes = Types; export class AbiScript extends Script< - AbiScriptTypes['inputs'], - AbiScriptTypes['output'] + Types['inputs'], + Types['output'] > { public static readonly abi = abi; public static readonly bytecode = bytecode; From 6f79a265c6867f3627af1a4d2dee99297539c950 Mon Sep 17 00:00:00 2001 From: nedsalk Date: Mon, 16 Dec 2024 10:09:15 +0100 Subject: [PATCH 087/126] cleanup type rendering --- .../renderers/ts/renderers/render-types.ts | 38 +++++++++---------- 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/packages/abi/src/gen/renderers/ts/renderers/render-types.ts b/packages/abi/src/gen/renderers/ts/renderers/render-types.ts index 1f3dacf270b..4d61c40ed13 100644 --- a/packages/abi/src/gen/renderers/ts/renderers/render-types.ts +++ b/packages/abi/src/gen/renderers/ts/renderers/render-types.ts @@ -74,58 +74,54 @@ function mapFunctions(abi: Abi, cTypes: Record) { }); } +function mapConfigurables(abi: Abi, cTypes: Record) { + return abi.configurables.length > 0 + ? abi.configurables.map(({ name, type }) => ({ + name, + input: cTypes[type.concreteTypeId].input, + })) + : undefined; +} + /** * Renders the types file for a program. * @returns An object containing the filename and the content of the types file. * The type rendering logic is the same for all program types. */ export function renderTypes( - { name, abi }: ProgramDetails, + { name: programName, abi }: ProgramDetails, versions: BinaryVersions ): TsAbiGenResult { const mTypes = abi.metadataTypes .filter(metadataTypeFilter) - .map((t) => generateTsType({ abiType: t })); + .map((abiType) => generateTsType({ abiType })); const cTypes = abi.concreteTypes.reduce>((res, abiType) => { res[abiType.concreteTypeId] = generateTsType({ abiType, asReference: true }); return res; }, {}); - const functions = mapFunctions(abi, cTypes); - - const configurables = - abi.configurables.length > 0 - ? abi.configurables.map((c) => ({ - name: c.name, - input: cTypes[c.type.concreteTypeId].input, - })) - : undefined; - const { fuelsTypeImports, commonTypeImports } = mergeTypeImports(mTypes, cTypes); - const enums = mTypes.filter((t) => t.tsType === 'enum').sort(sortAlphabetically); - const types = mTypes.filter((t) => t.tsType === 'type').sort(sortAlphabetically); - const content = templateRenderer({ template: typesTemplate, versions, data: { isContract: abi.programType === 'contract', - name, + name: programName, fuelsTypeImports, commonTypeImports, - enums, - types, - functions, - configurables, + enums: mTypes.filter((t) => t.tsType === 'enum').sort(sortAlphabetically), + types: mTypes.filter((t) => t.tsType === 'type').sort(sortAlphabetically), + functions: mapFunctions(abi, cTypes), + configurables: mapConfigurables(abi, cTypes), }, }); const { withParentDir } = getParentDirWrapper(abi.programType); return { - filename: withParentDir(`${name}Types.ts`), + filename: withParentDir(`${programName}Types.ts`), content, }; } From 67c5e38f554f59a28bbfbcf9a43faf3238bfb445 Mon Sep 17 00:00:00 2001 From: nedsalk Date: Mon, 16 Dec 2024 10:20:59 +0100 Subject: [PATCH 088/126] simplified program rendering --- .../renderers/ts/renderers/render-program.ts | 12 ++++++++---- .../renderers/ts/renderers/render-programs.ts | 13 +++++-------- .../gen/renderers/ts/renderers/render-types.ts | 17 +++++------------ 3 files changed, 18 insertions(+), 24 deletions(-) diff --git a/packages/abi/src/gen/renderers/ts/renderers/render-program.ts b/packages/abi/src/gen/renderers/ts/renderers/render-program.ts index aad511d1de0..f45826ff73f 100644 --- a/packages/abi/src/gen/renderers/ts/renderers/render-program.ts +++ b/packages/abi/src/gen/renderers/ts/renderers/render-program.ts @@ -12,6 +12,7 @@ import scriptTemplate from '../templates/script.hbs'; import storageSlotsTemplate from '../templates/storage-slots.hbs'; import { getParentDirWrapper } from './get-parent-dir-wrapper'; +import { renderTypes } from './render-types'; import { templateRenderer } from './template-renderer'; /** @@ -20,11 +21,14 @@ import { templateRenderer } from './template-renderer'; * The files returned are all related to the program except the types. * This includes the abi, bytecode, and the program-related classes. */ -export function renderProgram( - { abi, binCompressed, name, abiContents, storageSlots }: ProgramDetails, - versions: BinaryVersions -): TsAbiGenResult[] { +export function renderProgram(details: ProgramDetails, versions: BinaryVersions): TsAbiGenResult[] { + const { abi, binCompressed, name, abiContents, storageSlots } = details; + const results: TsAbiGenResult[] = [ + { + filename: `${name}Types.ts`, + content: renderTypes(details, versions), + }, { filename: `${name}-abi.ts`, content: templateRenderer({ template: abiTemplate, versions, data: { abiContents } }), diff --git a/packages/abi/src/gen/renderers/ts/renderers/render-programs.ts b/packages/abi/src/gen/renderers/ts/renderers/render-programs.ts index 489529f6451..9fb760f8788 100644 --- a/packages/abi/src/gen/renderers/ts/renderers/render-programs.ts +++ b/packages/abi/src/gen/renderers/ts/renderers/render-programs.ts @@ -5,7 +5,6 @@ import type { AbiGenResult, ProgramDetails } from '../../../abi-gen-types'; import { renderIndexFiles } from './render-index-files'; import { renderProgram } from './render-program'; -import { renderTypes } from './render-types'; /** * For the given program details, render all program-related files. @@ -17,19 +16,17 @@ export function renderPrograms(details: ProgramDetails[], versions: BinaryVersio const indexContents = new Map(); for (const d of details) { - const program = renderProgram(d, versions); - const types = renderTypes(d, versions); - const renderResults = [program, types].flat(); + const files = renderProgram(d, versions); - results.push(...renderResults); + results.push(...files); - renderResults.forEach((r) => { - if (!r.exportInIndexFile) { + files.forEach((file) => { + if (!file.exportInIndexFile) { return; } const contents = indexContents.get(d.abi.programType) ?? []; - contents.push(r.filename); + contents.push(file.filename); indexContents.set(d.abi.programType, contents); }); } diff --git a/packages/abi/src/gen/renderers/ts/renderers/render-types.ts b/packages/abi/src/gen/renderers/ts/renderers/render-types.ts index 4d61c40ed13..d8a88e2a362 100644 --- a/packages/abi/src/gen/renderers/ts/renderers/render-types.ts +++ b/packages/abi/src/gen/renderers/ts/renderers/render-types.ts @@ -4,13 +4,11 @@ import { createMatcher } from '../../../../matchers/sway-type-matchers'; import type { Abi } from '../../../../parser'; import { evaluateFunctionInputsOptionality } from '../../../../utils/evaluate-function-inputs-optionality'; import type { ProgramDetails } from '../../../abi-gen-types'; -import type { TsAbiGenResult } from '../../types'; import typesTemplate from '../templates/types.hbs'; import { generateTsType } from '../typers/generate-ts-type'; import { flattenImports } from '../typers/helpers'; import type { TyperReturn } from '../typers/types'; -import { getParentDirWrapper } from './get-parent-dir-wrapper'; import { templateRenderer } from './template-renderer'; const metadataTypeFilter = createMatcher({ @@ -40,7 +38,7 @@ const metadataTypeFilter = createMatcher({ rawUntypedSlice: false, }); -function sortAlphabetically(a: TyperReturn, b: TyperReturn) { +export function sortAlphabetically(a: TyperReturn, b: TyperReturn) { if (a.input < b.input) { return -1; } @@ -91,7 +89,7 @@ function mapConfigurables(abi: Abi, cTypes: Record) { export function renderTypes( { name: programName, abi }: ProgramDetails, versions: BinaryVersions -): TsAbiGenResult { +): string { const mTypes = abi.metadataTypes .filter(metadataTypeFilter) .map((abiType) => generateTsType({ abiType })); @@ -111,17 +109,12 @@ export function renderTypes( name: programName, fuelsTypeImports, commonTypeImports, - enums: mTypes.filter((t) => t.tsType === 'enum').sort(sortAlphabetically), - types: mTypes.filter((t) => t.tsType === 'type').sort(sortAlphabetically), + enums: mTypes.filter(({ tsType }) => tsType === 'enum').sort(sortAlphabetically), + types: mTypes.filter(({ tsType }) => tsType === 'type').sort(sortAlphabetically), functions: mapFunctions(abi, cTypes), configurables: mapConfigurables(abi, cTypes), }, }); - const { withParentDir } = getParentDirWrapper(abi.programType); - - return { - filename: withParentDir(`${programName}Types.ts`), - content, - }; + return content; } From d4a7bf32e457d9bfe59c02743cd5cdd3f74a6b9d Mon Sep 17 00:00:00 2001 From: nedsalk Date: Mon, 16 Dec 2024 12:42:40 +0100 Subject: [PATCH 089/126] fix recipes --- .../cli/commands/deploy/deployContracts.ts | 2 +- packages/recipes/scripts/build-recipes.ts | 30 ++--- packages/recipes/src/types/common.d.ts | 31 ----- packages/recipes/src/types/common.ts | 53 +++++++++ .../Src14OwnedProxy-abi.ts} | 108 +----------------- .../Src14OwnedProxy-bytecode.ts} | 26 +---- .../Src14OwnedProxy-storage-slots.ts | 30 +++++ .../src/types/contracts/Src14OwnedProxy.ts | 39 +++++++ .../types/contracts/Src14OwnedProxyFactory.ts | 31 +++++ .../types/contracts/Src14OwnedProxyTypes.ts | 68 +++++++++++ packages/recipes/src/types/contracts/index.ts | 12 ++ packages/recipes/src/types/index.ts | 11 +- templates/nextjs/src/sway-api/common.ts | 4 +- templates/vite/src/sway-api/common.ts | 4 +- 14 files changed, 269 insertions(+), 180 deletions(-) delete mode 100644 packages/recipes/src/types/common.d.ts create mode 100644 packages/recipes/src/types/common.ts rename packages/recipes/src/types/{Src14OwnedProxy.ts => contracts/Src14OwnedProxy-abi.ts} (80%) rename packages/recipes/src/types/{Src14OwnedProxyFactory.ts => contracts/Src14OwnedProxy-bytecode.ts} (89%) create mode 100644 packages/recipes/src/types/contracts/Src14OwnedProxy-storage-slots.ts create mode 100644 packages/recipes/src/types/contracts/Src14OwnedProxy.ts create mode 100644 packages/recipes/src/types/contracts/Src14OwnedProxyFactory.ts create mode 100644 packages/recipes/src/types/contracts/Src14OwnedProxyTypes.ts create mode 100644 packages/recipes/src/types/contracts/index.ts diff --git a/packages/fuels/src/cli/commands/deploy/deployContracts.ts b/packages/fuels/src/cli/commands/deploy/deployContracts.ts index a7c6da13d2b..52aac577516 100644 --- a/packages/fuels/src/cli/commands/deploy/deployContracts.ts +++ b/packages/fuels/src/cli/commands/deploy/deployContracts.ts @@ -48,7 +48,7 @@ export async function deployContract( const proxyBytecode = Src14OwnedProxyFactory.bytecode; const proxyAbi = Src14OwnedProxy.abi; - const proxyStorageSlots = Src14OwnedProxy.storageSlots ?? []; + const proxyStorageSlots = Src14OwnedProxyFactory.storageSlots ?? []; const isProxyEnabled = tomlContents?.proxy?.enabled; const proxyAddress = tomlContents?.proxy?.address; diff --git a/packages/recipes/scripts/build-recipes.ts b/packages/recipes/scripts/build-recipes.ts index e69f7ed05a7..6e10361966c 100644 --- a/packages/recipes/scripts/build-recipes.ts +++ b/packages/recipes/scripts/build-recipes.ts @@ -4,7 +4,13 @@ import { join } from 'path'; execSync(`fuels typegen -i src/contracts/src14 -o src/types`); -const supportedRecipes = ['Src14OwnedProxy'].map((s) => [s, `${s}Factory`]).flat(); +const typesPath = join(__dirname, '..', 'src', 'types'); +const supportedRecipes = ['Src14OwnedProxy'] + .map((s) => [s, `${s}Factory`, `${s}Types`, `${s}-bytecode`, `${s}-storage-slots`]) + .flat() + .map((s) => join(typesPath, 'contracts', `${s}.ts`)) + .concat([join(typesPath, 'common.ts')]); + const importReplacementMap = { Contract: '@fuel-ts/program', ContractFactory: '@fuel-ts/contract', @@ -20,12 +26,11 @@ const importReplacementMap = { decompressBytecode: '@fuel-ts/utils', }; -for (const recipe of supportedRecipes) { - const contractPath = join(__dirname, '..', 'src', 'types', `${recipe}.ts`); - let contractContents = readFileSync(contractPath, 'utf-8'); +for (const filepath of supportedRecipes) { + let contents = readFileSync(filepath, 'utf-8'); // Find all imports from 'fuels' const fuelImportsRegex = /import\s+(type\s+)?{([^}]+)}\s+from\s+['"]fuels['"];?/gs; - const matches = [...contractContents.matchAll(fuelImportsRegex)]; + const matches = [...contents.matchAll(fuelImportsRegex)]; // Extract the imported items and create new import statements const importsByPackage = new Map>(); @@ -58,18 +63,15 @@ for (const recipe of supportedRecipes) { .map(([pkg, imports]) => `import { ${Array.from(imports).join(', ')} } from '${pkg}';`) .join('\n'); + // Add new imports at the top of the file + const importRegex = /.*(?=import )/s; + contents = contents.replace(importRegex, (match) => `${match}\n${newImports}`); + // Replace all 'fuels' imports with the new imports matches.forEach((match) => { - contractContents = contractContents.replace(match[0], ''); + contents = contents.replace(match[0], ''); }); - // Add new imports at the top of the file - const versionCommentRegex = /\/\*\s*Fuels version: \d+\.\d+\.\d+\s*\*\/\s*/; - contractContents = contractContents.replace( - versionCommentRegex, - (match) => `${match}\n${newImports}` - ); - // Write the modified contents back to the file - writeFileSync(contractPath, contractContents); + writeFileSync(filepath, contents); } diff --git a/packages/recipes/src/types/common.d.ts b/packages/recipes/src/types/common.d.ts deleted file mode 100644 index d7ca20eaa69..00000000000 --- a/packages/recipes/src/types/common.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ - -/* eslint-disable max-classes-per-file */ -/* eslint-disable @typescript-eslint/no-unused-vars */ -/* eslint-disable @typescript-eslint/consistent-type-imports */ - -/* - Fuels version: 0.97.0 -*/ - -/** - * Mimics Sway Enum. - * Requires one and only one Key-Value pair and raises error if more are provided. - */ -export type Enum = { - [K in keyof T]: Pick & { [P in Exclude]?: never }; -}[keyof T]; - -/** - * Mimics Sway Option and Vectors. - * Vectors are treated like arrays in Typescript. - */ -export type Option = T | undefined; - -export type Vec = T[]; - -/** - * Mimics Sway Result enum type. - * Ok represents the success case, while Err represents the error case. - */ -export type Result = Enum<{ Ok: T; Err: E }>; diff --git a/packages/recipes/src/types/common.ts b/packages/recipes/src/types/common.ts new file mode 100644 index 00000000000..9ae5ed30108 --- /dev/null +++ b/packages/recipes/src/types/common.ts @@ -0,0 +1,53 @@ +/* Autogenerated file. Do not edit manually. */ + +/* eslint-disable eslint-comments/no-unlimited-disable */ +/* eslint-disable */ + +/* + Fuels version: 0.97.2 + Forc version: 0.66.5 +*/ + +import { type FunctionFragment } from '@fuel-ts/abi-coder'; +import { type InvokeFunction } from '@fuel-ts/program'; + +/** + * Mimics Sway Enum. + * Requires one and only one Key-Value pair and raises error if more are provided. + */ +export type Enum = { + [K in keyof T]: Pick & { [P in Exclude]?: never }; +}[keyof T]; + +/** + * Mimics Sway Option type. + */ +export type Option = T | undefined; + +/** + * Mimics Sway Result enum type. + * Ok represents the success case, while Err represents the error case. + */ +export type Result = Enum<{ Ok: T; Err: E }>; + +/** + * Mimics Sway array type. For example, [u64; 10] is converted to ArrayOfLength. + */ +export type ArrayOfLength< + T, + Length extends number, + Arr extends unknown[] = [], +> = Arr['length'] extends Length ? Arr : ArrayOfLength; + +interface Types { + functions: Record; + configurables: Partial>; +} + +export type ProgramFunctionMapper = { + [K in keyof T]: InvokeFunction; +}; + +export type InterfaceFunctionMapper = { + [K in keyof T]: FunctionFragment; +}; diff --git a/packages/recipes/src/types/Src14OwnedProxy.ts b/packages/recipes/src/types/contracts/Src14OwnedProxy-abi.ts similarity index 80% rename from packages/recipes/src/types/Src14OwnedProxy.ts rename to packages/recipes/src/types/contracts/Src14OwnedProxy-abi.ts index dcfab7009a8..5a2469f9582 100644 --- a/packages/recipes/src/types/Src14OwnedProxy.ts +++ b/packages/recipes/src/types/contracts/Src14OwnedProxy-abi.ts @@ -1,62 +1,14 @@ /* Autogenerated file. Do not edit manually. */ -/* eslint-disable max-classes-per-file */ -/* eslint-disable @typescript-eslint/no-unused-vars */ -/* eslint-disable @typescript-eslint/consistent-type-imports */ +/* eslint-disable eslint-comments/no-unlimited-disable */ +/* eslint-disable */ /* - Fuels version: 0.97.0 + Fuels version: 0.97.2 + Forc version: 0.66.5 */ -import { Contract, type InvokeFunction } from '@fuel-ts/program'; -import { Interface, type FunctionFragment } from '@fuel-ts/abi-coder'; -import { type Provider, type Account } from '@fuel-ts/account'; -import { type StorageSlot } from '@fuel-ts/transactions'; -import { type AbstractAddress, type StrSlice } from '@fuel-ts/interfaces'; -import type { Option, Enum } from './common'; - -export enum AccessErrorInput { - NotOwner = 'NotOwner', -} -export enum AccessErrorOutput { - NotOwner = 'NotOwner', -} -export type IdentityInput = Enum<{ Address: AddressInput; ContractId: ContractIdInput }>; -export type IdentityOutput = Enum<{ Address: AddressOutput; ContractId: ContractIdOutput }>; -export enum InitializationErrorInput { - CannotReinitialized = 'CannotReinitialized', -} -export enum InitializationErrorOutput { - CannotReinitialized = 'CannotReinitialized', -} -export enum SetProxyOwnerErrorInput { - CannotUninitialize = 'CannotUninitialize', -} -export enum SetProxyOwnerErrorOutput { - CannotUninitialize = 'CannotUninitialize', -} -export type StateInput = Enum<{ - Uninitialized: undefined; - Initialized: IdentityInput; - Revoked: undefined; -}>; -export type StateOutput = Enum<{ Uninitialized: void; Initialized: IdentityOutput; Revoked: void }>; - -export type AddressInput = { bits: string }; -export type AddressOutput = AddressInput; -export type ContractIdInput = { bits: string }; -export type ContractIdOutput = ContractIdInput; -export type ProxyOwnerSetInput = { new_proxy_owner: StateInput }; -export type ProxyOwnerSetOutput = { new_proxy_owner: StateOutput }; -export type ProxyTargetSetInput = { new_target: ContractIdInput }; -export type ProxyTargetSetOutput = { new_target: ContractIdOutput }; - -export type Src14OwnedProxyConfigurables = Partial<{ - INITIAL_TARGET: Option; - INITIAL_OWNER: StateInput; -}>; - -const abi = { +export const abi = { programType: 'contract', specVersion: '1', encodingVersion: '1', @@ -633,53 +585,3 @@ const abi = { }, ], }; - -const storageSlots: StorageSlot[] = [ - { - key: '7bb458adc1d118713319a5baa00a2d049dd64d2916477d2688d76970c898cd55', - value: '0000000000000000000000000000000000000000000000000000000000000000', - }, - { - key: '7bb458adc1d118713319a5baa00a2d049dd64d2916477d2688d76970c898cd56', - value: '0000000000000000000000000000000000000000000000000000000000000000', - }, - { - key: 'bb79927b15d9259ea316f2ecb2297d6cc8851888a98278c0a2e03e1a091ea754', - value: '0000000000000000000000000000000000000000000000000000000000000000', - }, - { - key: 'bb79927b15d9259ea316f2ecb2297d6cc8851888a98278c0a2e03e1a091ea755', - value: '0000000000000000000000000000000000000000000000000000000000000000', - }, -]; -export class Src14OwnedProxyInterface extends Interface { - constructor() { - super(abi); - } - - declare functions: { - proxy_target: FunctionFragment; - set_proxy_target: FunctionFragment; - proxy_owner: FunctionFragment; - initialize_proxy: FunctionFragment; - set_proxy_owner: FunctionFragment; - }; -} - -export class Src14OwnedProxy extends Contract { - static readonly abi = abi; - static readonly storageSlots = storageSlots; - - declare interface: Src14OwnedProxyInterface; - declare functions: { - proxy_target: InvokeFunction<[], Option>; - set_proxy_target: InvokeFunction<[new_target: ContractIdInput], void>; - proxy_owner: InvokeFunction<[], StateOutput>; - initialize_proxy: InvokeFunction<[], void>; - set_proxy_owner: InvokeFunction<[new_proxy_owner: StateInput], void>; - }; - - constructor(id: string | AbstractAddress, accountOrProvider: Account | Provider) { - super(id, abi, accountOrProvider); - } -} diff --git a/packages/recipes/src/types/Src14OwnedProxyFactory.ts b/packages/recipes/src/types/contracts/Src14OwnedProxy-bytecode.ts similarity index 89% rename from packages/recipes/src/types/Src14OwnedProxyFactory.ts rename to packages/recipes/src/types/contracts/Src14OwnedProxy-bytecode.ts index b0789cb3f5a..a55371448b1 100644 --- a/packages/recipes/src/types/Src14OwnedProxyFactory.ts +++ b/packages/recipes/src/types/contracts/Src14OwnedProxy-bytecode.ts @@ -1,31 +1,15 @@ /* Autogenerated file. Do not edit manually. */ -/* eslint-disable max-classes-per-file */ -/* eslint-disable @typescript-eslint/no-unused-vars */ -/* eslint-disable @typescript-eslint/consistent-type-imports */ +/* eslint-disable eslint-comments/no-unlimited-disable */ +/* eslint-disable */ /* - Fuels version: 0.97.0 + Fuels version: 0.97.2 + Forc version: 0.66.5 */ -import { ContractFactory, type DeployContractOptions } from '@fuel-ts/contract'; import { decompressBytecode } from '@fuel-ts/utils'; -import { type Provider, type Account } from '@fuel-ts/account'; -import { Src14OwnedProxy } from './Src14OwnedProxy'; -const bytecode = decompressBytecode( +export const bytecode = decompressBytecode( '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' ); - -export class Src14OwnedProxyFactory extends ContractFactory { - static readonly bytecode = bytecode; - - constructor(accountOrProvider: Account | Provider) { - super(bytecode, Src14OwnedProxy.abi, accountOrProvider, Src14OwnedProxy.storageSlots); - } - - static deploy(wallet: Account, options: DeployContractOptions = {}) { - const factory = new Src14OwnedProxyFactory(wallet); - return factory.deploy(options); - } -} diff --git a/packages/recipes/src/types/contracts/Src14OwnedProxy-storage-slots.ts b/packages/recipes/src/types/contracts/Src14OwnedProxy-storage-slots.ts new file mode 100644 index 00000000000..6d07d2a000f --- /dev/null +++ b/packages/recipes/src/types/contracts/Src14OwnedProxy-storage-slots.ts @@ -0,0 +1,30 @@ +/* Autogenerated file. Do not edit manually. */ + +/* eslint-disable eslint-comments/no-unlimited-disable */ +/* eslint-disable */ + +/* + Fuels version: 0.97.2 + Forc version: 0.66.5 +*/ + +import { type StorageSlot } from '@fuel-ts/transactions'; + +export const storageSlots: StorageSlot[] = [ + { + key: '7bb458adc1d118713319a5baa00a2d049dd64d2916477d2688d76970c898cd55', + value: '0000000000000000000000000000000000000000000000000000000000000000', + }, + { + key: '7bb458adc1d118713319a5baa00a2d049dd64d2916477d2688d76970c898cd56', + value: '0000000000000000000000000000000000000000000000000000000000000000', + }, + { + key: 'bb79927b15d9259ea316f2ecb2297d6cc8851888a98278c0a2e03e1a091ea754', + value: '0000000000000000000000000000000000000000000000000000000000000000', + }, + { + key: 'bb79927b15d9259ea316f2ecb2297d6cc8851888a98278c0a2e03e1a091ea755', + value: '0000000000000000000000000000000000000000000000000000000000000000', + }, +]; diff --git a/packages/recipes/src/types/contracts/Src14OwnedProxy.ts b/packages/recipes/src/types/contracts/Src14OwnedProxy.ts new file mode 100644 index 00000000000..6188241352d --- /dev/null +++ b/packages/recipes/src/types/contracts/Src14OwnedProxy.ts @@ -0,0 +1,39 @@ +/* Autogenerated file. Do not edit manually. */ + +/* eslint-disable eslint-comments/no-unlimited-disable */ +/* eslint-disable */ + +/* + Fuels version: 0.97.2 + Forc version: 0.66.5 +*/ + +import type { Src14OwnedProxyTypes as Types } from './Src14OwnedProxyTypes'; +import type { InterfaceFunctionMapper, ProgramFunctionMapper } from '../common'; + +import { Contract } from '@fuel-ts/program'; +import { Interface } from '@fuel-ts/abi-coder'; +import { type AbstractAddress } from '@fuel-ts/interfaces'; +import { type Account, type Provider } from '@fuel-ts/account'; +import { abi } from './Src14OwnedProxy-abi'; + +export type Src14OwnedProxyTypes = Types; + +export class Src14OwnedProxyInterface extends Interface { + declare functions: InterfaceFunctionMapper; + + constructor() { + super(abi); + } +} + +export class Src14OwnedProxy extends Contract { + declare interface: Src14OwnedProxyInterface; + declare functions: ProgramFunctionMapper; + + public static readonly abi = abi; + + constructor(id: string | AbstractAddress, accountOrProvider: Account | Provider) { + super(id, abi, accountOrProvider); + } +} diff --git a/packages/recipes/src/types/contracts/Src14OwnedProxyFactory.ts b/packages/recipes/src/types/contracts/Src14OwnedProxyFactory.ts new file mode 100644 index 00000000000..53c3e9ea6a9 --- /dev/null +++ b/packages/recipes/src/types/contracts/Src14OwnedProxyFactory.ts @@ -0,0 +1,31 @@ +/* Autogenerated file. Do not edit manually. */ + +/* eslint-disable eslint-comments/no-unlimited-disable */ +/* eslint-disable */ + +/* + Fuels version: 0.97.2 + Forc version: 0.66.5 +*/ + +import { Src14OwnedProxy } from './Src14OwnedProxy'; +import { bytecode } from './Src14OwnedProxy-bytecode'; +import { abi } from './Src14OwnedProxy-abi'; + +import { ContractFactory, type DeployContractOptions } from '@fuel-ts/contract'; +import { type Account, type Provider } from '@fuel-ts/account'; +import { storageSlots } from './Src14OwnedProxy-storage-slots'; + +export class Src14OwnedProxyFactory extends ContractFactory { + static readonly bytecode = bytecode; + static readonly storageSlots = storageSlots; + + constructor(accountOrProvider: Account | Provider) { + super(bytecode, abi, accountOrProvider, Src14OwnedProxyFactory.storageSlots); + } + + static deploy(wallet: Account, options: DeployContractOptions = {}) { + const factory = new Src14OwnedProxyFactory(wallet); + return factory.deploy(options); + } +} diff --git a/packages/recipes/src/types/contracts/Src14OwnedProxyTypes.ts b/packages/recipes/src/types/contracts/Src14OwnedProxyTypes.ts new file mode 100644 index 00000000000..6c9890fe64f --- /dev/null +++ b/packages/recipes/src/types/contracts/Src14OwnedProxyTypes.ts @@ -0,0 +1,68 @@ +/* Autogenerated file. Do not edit manually. */ + +/* eslint-disable eslint-comments/no-unlimited-disable */ +/* eslint-disable */ + +/* + Fuels version: 0.97.2 + Forc version: 0.66.5 +*/ + +import { type StrSlice } from '@fuel-ts/interfaces'; +import type { Enum, Option } from '../common'; + +export enum AccessError { + NotOwner = 'NotOwner', +} +export enum InitializationError { + CannotReinitialized = 'CannotReinitialized', +} +export enum SetProxyOwnerError { + CannotUninitialize = 'CannotUninitialize', +} + +export type AddressInput = { bits: string }; +export type AddressOutput = AddressInput; +export type ContractIdInput = { bits: string }; +export type ContractIdOutput = ContractIdInput; +export type IdentityInput = Enum<{ Address: AddressInput; ContractId: ContractIdInput }>; +export type IdentityOutput = Enum<{ Address: AddressOutput; ContractId: ContractIdOutput }>; +export type ProxyOwnerSetInput = { new_proxy_owner: StateInput }; +export type ProxyOwnerSetOutput = { new_proxy_owner: StateOutput }; +export type ProxyTargetSetInput = { new_target: ContractIdInput }; +export type ProxyTargetSetOutput = { new_target: ContractIdOutput }; +export type StateInput = Enum<{ + Uninitialized: undefined; + Initialized: IdentityInput; + Revoked: undefined; +}>; +export type StateOutput = Enum<{ Uninitialized: void; Initialized: IdentityOutput; Revoked: void }>; + +export interface Src14OwnedProxyTypes { + functions: { + proxy_target: { + inputs: []; + output: Option; + }; + set_proxy_target: { + inputs: [new_target: ContractIdInput]; + output: void; + }; + proxy_owner: { + inputs: []; + output: StateOutput; + }; + initialize_proxy: { + inputs: []; + output: void; + }; + set_proxy_owner: { + inputs: [new_proxy_owner: StateInput]; + output: void; + }; + }; + configurables: Partial<{ + INITIAL_TARGET: Option; + INITIAL_OWNER: StateInput; + }>; +} diff --git a/packages/recipes/src/types/contracts/index.ts b/packages/recipes/src/types/contracts/index.ts new file mode 100644 index 00000000000..e053ca83eeb --- /dev/null +++ b/packages/recipes/src/types/contracts/index.ts @@ -0,0 +1,12 @@ +/* Autogenerated file. Do not edit manually. */ + +/* eslint-disable eslint-comments/no-unlimited-disable */ +/* eslint-disable */ + +/* + Fuels version: 0.97.2 + Forc version: 0.66.5 +*/ + +export * from './Src14OwnedProxy'; +export * from './Src14OwnedProxyFactory'; diff --git a/packages/recipes/src/types/index.ts b/packages/recipes/src/types/index.ts index 22dd3591167..7ff54d58a6e 100644 --- a/packages/recipes/src/types/index.ts +++ b/packages/recipes/src/types/index.ts @@ -1,12 +1,11 @@ /* Autogenerated file. Do not edit manually. */ -/* eslint-disable max-classes-per-file */ -/* eslint-disable @typescript-eslint/no-unused-vars */ -/* eslint-disable @typescript-eslint/consistent-type-imports */ +/* eslint-disable eslint-comments/no-unlimited-disable */ +/* eslint-disable */ /* - Fuels version: 0.97.0 + Fuels version: 0.97.2 + Forc version: 0.66.5 */ -export { Src14OwnedProxy } from './Src14OwnedProxy'; -export { Src14OwnedProxyFactory } from './Src14OwnedProxyFactory'; +export * from './contracts'; diff --git a/templates/nextjs/src/sway-api/common.ts b/templates/nextjs/src/sway-api/common.ts index 2f0308eff49..68069dcde69 100644 --- a/templates/nextjs/src/sway-api/common.ts +++ b/templates/nextjs/src/sway-api/common.ts @@ -4,8 +4,8 @@ /* eslint-disable */ /* - Fuels version: 0.97.1 - Forc version: 0.65.2 + Fuels version: 0.97.2 + Forc version: 0.66.5 */ diff --git a/templates/vite/src/sway-api/common.ts b/templates/vite/src/sway-api/common.ts index 2f0308eff49..68069dcde69 100644 --- a/templates/vite/src/sway-api/common.ts +++ b/templates/vite/src/sway-api/common.ts @@ -4,8 +4,8 @@ /* eslint-disable */ /* - Fuels version: 0.97.1 - Forc version: 0.65.2 + Fuels version: 0.97.2 + Forc version: 0.66.5 */ From c0f01f7dc7a8f1e7c95f8682aa4e6be0707c8d21 Mon Sep 17 00:00:00 2001 From: nedsalk Date: Mon, 16 Dec 2024 12:43:55 +0100 Subject: [PATCH 090/126] reorder deps --- packages/abi/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/abi/package.json b/packages/abi/package.json index 409885f8c2b..815a077c67e 100644 --- a/packages/abi/package.json +++ b/packages/abi/package.json @@ -26,8 +26,8 @@ "postbuild": "tsx ../../scripts/postbuild.ts" }, "dependencies": { - "@fuel-ts/utils": "workspace:*", "@fuel-ts/errors": "workspace:*", + "@fuel-ts/utils": "workspace:*", "@fuel-ts/versions": "workspace:*", "handlebars": "^4.7.8" }, From 3bf2df2ef6703e5391af709e0e923736c5c071dc Mon Sep 17 00:00:00 2001 From: nedsalk Date: Mon, 16 Dec 2024 12:49:11 +0100 Subject: [PATCH 091/126] refactor render-index-files --- .../ts/renderers/render-index-files.ts | 49 +++++++++++-------- 1 file changed, 29 insertions(+), 20 deletions(-) diff --git a/packages/abi/src/gen/renderers/ts/renderers/render-index-files.ts b/packages/abi/src/gen/renderers/ts/renderers/render-index-files.ts index 6cff8af7a7b..e8c239bdc33 100644 --- a/packages/abi/src/gen/renderers/ts/renderers/render-index-files.ts +++ b/packages/abi/src/gen/renderers/ts/renderers/render-index-files.ts @@ -20,37 +20,46 @@ export function renderIndexFiles( indexContents.forEach((files, programType) => { const { withParentDir, removeParentDir } = getParentDirWrapper(programType); + // from index.ts to e.g. contracts/index.ts + const indexFilename = withParentDir('index.ts'); + + const pathsToFiles = files.map((file) => { + // from e.g. contracts/AbiContract.ts to AbiContract.ts + const relativePathToFile = removeParentDir(file); + // remove .ts extension + return relativePathToFile.split('.')[0]; + }); + + const content = templateRenderer({ + versions, + template: indexTemplate, + data: { + paths: pathsToFiles, + }, + }); + results.push({ - // from index.ts to e.g. contracts/index.ts - filename: withParentDir('index.ts'), - content: templateRenderer({ - versions, - template: indexTemplate, - data: { - paths: files.map((filename) => { - // from e.g. contracts/AbiContract.ts to AbiContract.ts - const relativePathToFile = removeParentDir(filename); - // remove .ts extension - return relativePathToFile.split('.')[0]; - }), - }, - }), + filename: indexFilename, + content, }); }); - results.push({ - // this is the main index.ts file in the root directory + const mainIndexFileImportPaths = [...indexContents.keys()] + .sort() + .map((programType) => getParentDirWrapper(programType).parentDir); + + const mainIndexFile: AbiGenResult = { filename: 'index.ts', content: templateRenderer({ versions, template: indexTemplate, data: { - paths: [...indexContents.keys()] - .sort() - .map((programType) => getParentDirWrapper(programType).parentDir), + paths: mainIndexFileImportPaths, }, }), - }); + }; + + results.push(mainIndexFile); return results; } From 988c7ec1ee036ab1b193b254d131a8428492c647 Mon Sep 17 00:00:00 2001 From: nedsalk Date: Mon, 16 Dec 2024 12:51:03 +0100 Subject: [PATCH 092/126] remove file --- packages/abi/src/gen/renderers/ts/README.md | 1 - 1 file changed, 1 deletion(-) delete mode 100644 packages/abi/src/gen/renderers/ts/README.md diff --git a/packages/abi/src/gen/renderers/ts/README.md b/packages/abi/src/gen/renderers/ts/README.md deleted file mode 100644 index b224b495b0f..00000000000 --- a/packages/abi/src/gen/renderers/ts/README.md +++ /dev/null @@ -1 +0,0 @@ -describe core concepts, find out where to put them From e18240a803b1ea04ca707b35279532007789b180 Mon Sep 17 00:00:00 2001 From: nedsalk Date: Mon, 16 Dec 2024 12:52:16 +0100 Subject: [PATCH 093/126] update changeset --- .changeset/poor-years-hang.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.changeset/poor-years-hang.md b/.changeset/poor-years-hang.md index ff8b978b830..9857ac56499 100644 --- a/.changeset/poor-years-hang.md +++ b/.changeset/poor-years-hang.md @@ -1,4 +1,6 @@ --- +"@fuel-ts/abi": minorgp +"fuels": minor --- -feat: ABI Gen +feat!: ABI Gen From 0b03ce5a04037f0e28c445a41017289414fa0206 Mon Sep 17 00:00:00 2001 From: nedsalk Date: Mon, 16 Dec 2024 12:59:13 +0100 Subject: [PATCH 094/126] fix changeset --- .changeset/poor-years-hang.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/poor-years-hang.md b/.changeset/poor-years-hang.md index 9857ac56499..e1335f22087 100644 --- a/.changeset/poor-years-hang.md +++ b/.changeset/poor-years-hang.md @@ -1,5 +1,5 @@ --- -"@fuel-ts/abi": minorgp +"@fuel-ts/abi": minor "fuels": minor --- From e03ae55190d14736b3f421d181d70f5218767afe Mon Sep 17 00:00:00 2001 From: nedsalk Date: Mon, 16 Dec 2024 13:41:57 +0100 Subject: [PATCH 095/126] fix recipes build --- packages/fuels/package.json | 3 ++- packages/recipes/package.json | 4 ++-- packages/recipes/scripts/build-recipes.ts | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/fuels/package.json b/packages/fuels/package.json index 35bb4b853dd..8f9191b4045 100644 --- a/packages/fuels/package.json +++ b/packages/fuels/package.json @@ -55,7 +55,8 @@ "build:package": "tsup", "build:browser": "pnpm vite build", "build:minified": "pnpm uglifyjs --compress --mangle --output dist/browser.min.mjs -- dist/browser.mjs", - "postbuild": "run-s type:declarations", + "postbuild": "run-s build:recipes type:declarations", + "build:recipes": "cd ../recipes && pnpm build:all && cd ../fuels", "type:declarations": "tsc --emitDeclarationOnly -p tsconfig.dts.json", "type:check": "tsc --noEmit", "prepublishOnly": "cp ../../README.md ./README.md" diff --git a/packages/recipes/package.json b/packages/recipes/package.json index bc566fe267c..05218f8f2d3 100644 --- a/packages/recipes/package.json +++ b/packages/recipes/package.json @@ -20,9 +20,9 @@ "dist" ], "scripts": { - "build": "run-s build:recipes build:package build:format", + "build:all": "run-s build:recipes build build:format", "build:recipes": "tsx ./scripts/build-recipes.ts", - "build:package": "tsup", + "build": "tsup", "build:format": "prettier --config ../../.prettierrc --log-level error --write .", "postbuild": "tsx ../../scripts/postbuild.ts" }, diff --git a/packages/recipes/scripts/build-recipes.ts b/packages/recipes/scripts/build-recipes.ts index 6e10361966c..702a5eaf0b8 100644 --- a/packages/recipes/scripts/build-recipes.ts +++ b/packages/recipes/scripts/build-recipes.ts @@ -2,7 +2,7 @@ import { execSync } from 'child_process'; import { readFileSync, writeFileSync } from 'fs'; import { join } from 'path'; -execSync(`fuels typegen -i src/contracts/src14 -o src/types`); +execSync(`node ../fuels/dist/bin.js typegen -i src/contracts/src14 -o src/types`); const typesPath = join(__dirname, '..', 'src', 'types'); const supportedRecipes = ['Src14OwnedProxy'] From ab83ccc059658941fe491b4647ea04101fdff181 Mon Sep 17 00:00:00 2001 From: nedsalk Date: Mon, 16 Dec 2024 14:16:11 +0100 Subject: [PATCH 096/126] fix test --- .../docs/src/guide/contracts/snippets/proxy-contracts.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/apps/docs/src/guide/contracts/snippets/proxy-contracts.ts b/apps/docs/src/guide/contracts/snippets/proxy-contracts.ts index ef1b0385778..543a0aaf2b4 100644 --- a/apps/docs/src/guide/contracts/snippets/proxy-contracts.ts +++ b/apps/docs/src/guide/contracts/snippets/proxy-contracts.ts @@ -1,10 +1,5 @@ // #region proxy-2 -import { - Provider, - Wallet, - Src14OwnedProxy, - Src14OwnedProxyFactory, -} from 'fuels'; +import { Provider, Wallet, Src14OwnedProxyFactory } from 'fuels'; import { LOCAL_NETWORK_URL, WALLET_PVT_KEY } from '../../../env'; import { @@ -28,7 +23,7 @@ const { contract: counterContract } = await deploy.waitForResult(); * initialize the storage slots. */ const storageSlots = counterContractFactory.storageSlots.concat( - Src14OwnedProxy.storageSlots + Src14OwnedProxyFactory.storageSlots ); /** * These configurables are specific to our recommended SRC14 compliant From 69dfcb76fed2905beee0011f30bfeed5333a6728 Mon Sep 17 00:00:00 2001 From: nedsalk Date: Mon, 16 Dec 2024 14:24:10 +0100 Subject: [PATCH 097/126] cleanup --- packages/fuels/src/cli/commands/typegen/index.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/fuels/src/cli/commands/typegen/index.ts b/packages/fuels/src/cli/commands/typegen/index.ts index da0fed1ec6d..99aacca53f1 100644 --- a/packages/fuels/src/cli/commands/typegen/index.ts +++ b/packages/fuels/src/cli/commands/typegen/index.ts @@ -12,7 +12,6 @@ import { getProgramDetails } from './utils'; interface RunTypegen { inputs: string[]; output: string; - silent: boolean; } function runFuelsTypegen(options: RunTypegen) { @@ -45,9 +44,9 @@ function runFuelsTypegen(options: RunTypegen) { export function typegen(program: Command) { const options = program.opts(); - const { inputs, output, silent } = options; + const { inputs, output } = options; - runFuelsTypegen({ inputs, output, silent }); + runFuelsTypegen({ inputs, output }); } export function generateTypes(config: FuelsConfig) { @@ -62,5 +61,5 @@ export function generateTypes(config: FuelsConfig) { .map((path) => `${path}/out/${config.buildMode}`) .concat(loaderPaths); - runFuelsTypegen({ inputs: paths, output, silent: false }); + runFuelsTypegen({ inputs: paths, output }); } From ad36793f04b5b765af414ba79a0e09d26c04c03a Mon Sep 17 00:00:00 2001 From: nedsalk Date: Mon, 16 Dec 2024 14:58:38 +0100 Subject: [PATCH 098/126] fix knip --- .knip.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.knip.json b/.knip.json index 00277f04afe..3b39e412a3f 100644 --- a/.knip.json +++ b/.knip.json @@ -39,5 +39,6 @@ "ts-generator", "webdriverio", "syncpack" - ] + ], + "ignoreBinaries": ["build:all"] } From c280227289776102741a67ea70381d36131bd3d0 Mon Sep 17 00:00:00 2001 From: nedsalk Date: Mon, 16 Dec 2024 15:22:33 +0100 Subject: [PATCH 099/126] fix lint --- packages/fuel-gauge/src/abi/abi-gen.test.ts | 2 +- packages/fuel-gauge/src/recipes.test.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/fuel-gauge/src/abi/abi-gen.test.ts b/packages/fuel-gauge/src/abi/abi-gen.test.ts index 682b3a7812f..b0e0bfc9945 100644 --- a/packages/fuel-gauge/src/abi/abi-gen.test.ts +++ b/packages/fuel-gauge/src/abi/abi-gen.test.ts @@ -1,4 +1,4 @@ -import { readFileSync, writeFileSync } from 'fs'; +import { readFileSync } from 'fs'; import { AbiGen } from 'fuels'; import { getProgramDetails } from 'fuels/cli-utils'; import { join } from 'path'; diff --git a/packages/fuel-gauge/src/recipes.test.ts b/packages/fuel-gauge/src/recipes.test.ts index 6fa4daec1ed..32e5343bb04 100644 --- a/packages/fuel-gauge/src/recipes.test.ts +++ b/packages/fuel-gauge/src/recipes.test.ts @@ -34,13 +34,13 @@ describe('recipes', () => { .proxy_target() .call(); const firstTarget = await waitForFirstTarget(); - expect(firstTarget.value.bits).toEqual(targetAddress); + expect(firstTarget.value?.bits).toEqual(targetAddress); const anotherProxy = new Src14OwnedProxy(proxyAddress, wallet); const { waitForResult: waitForAnotherTarget } = await anotherProxy.functions .proxy_target() .call(); const anotherTarget = await waitForAnotherTarget(); - expect(anotherTarget.value.bits).toEqual(targetAddress); + expect(anotherTarget.value?.bits).toEqual(targetAddress); }); }); From 05a613ac81ff78dbafa1a0fb8af38a2484877a75 Mon Sep 17 00:00:00 2001 From: nedsalk Date: Mon, 16 Dec 2024 17:12:08 +0100 Subject: [PATCH 100/126] export inputs, outputs and configurables --- packages/abi/src/gen/renderers/ts/templates/contract.hbs | 1 + packages/abi/src/gen/renderers/ts/templates/predicate.hbs | 3 +++ packages/abi/src/gen/renderers/ts/templates/script.hbs | 3 +++ packages/fuel-gauge/src/abi/fixtures/contracts/contract.txt | 1 + packages/fuel-gauge/src/abi/fixtures/predicates/predicate.txt | 3 +++ packages/fuel-gauge/src/abi/fixtures/scripts/script.txt | 3 +++ 6 files changed, 14 insertions(+) diff --git a/packages/abi/src/gen/renderers/ts/templates/contract.hbs b/packages/abi/src/gen/renderers/ts/templates/contract.hbs index 9353d81cd51..a111cdea1ac 100644 --- a/packages/abi/src/gen/renderers/ts/templates/contract.hbs +++ b/packages/abi/src/gen/renderers/ts/templates/contract.hbs @@ -7,6 +7,7 @@ import type { InterfaceFunctionMapper, ProgramFunctionMapper } from '../common'; import { abi } from './{{name}}-abi'; export type {{name}}Types = Types; +export type {{name}}Configurables = Types['configurables']; export class {{name}}Interface extends Interface { declare functions: InterfaceFunctionMapper; diff --git a/packages/abi/src/gen/renderers/ts/templates/predicate.hbs b/packages/abi/src/gen/renderers/ts/templates/predicate.hbs index f489c5f88db..46c2017f1ec 100644 --- a/packages/abi/src/gen/renderers/ts/templates/predicate.hbs +++ b/packages/abi/src/gen/renderers/ts/templates/predicate.hbs @@ -7,6 +7,9 @@ import { bytecode } from './{{name}}-bytecode'; import type { {{name}}Types as Types } from './{{name}}Types'; export type {{name}}Types = Types; +export type {{name}}Inputs = Types['inputs']; +export type {{name}}Output = Types['output']; +export type {{name}}Configurables = Types['configurables']; export type {{name}}Parameters = Omit< PredicateParams< diff --git a/packages/abi/src/gen/renderers/ts/templates/script.hbs b/packages/abi/src/gen/renderers/ts/templates/script.hbs index 40be5aaade1..d0cf4617b22 100644 --- a/packages/abi/src/gen/renderers/ts/templates/script.hbs +++ b/packages/abi/src/gen/renderers/ts/templates/script.hbs @@ -7,6 +7,9 @@ import { bytecode } from './{{name}}-bytecode'; import type { {{name}}Types as Types } from './{{name}}Types'; export type {{name}}Types = Types; +export type {{name}}Inputs = Types['inputs']; +export type {{name}}Output = Types['output']; +export type {{name}}Configurables = Types['configurables']; export class {{name}} extends Script< Types['inputs'], diff --git a/packages/fuel-gauge/src/abi/fixtures/contracts/contract.txt b/packages/fuel-gauge/src/abi/fixtures/contracts/contract.txt index 593d6cf4c5b..6c59cea9de3 100644 --- a/packages/fuel-gauge/src/abi/fixtures/contracts/contract.txt +++ b/packages/fuel-gauge/src/abi/fixtures/contracts/contract.txt @@ -16,6 +16,7 @@ import type { InterfaceFunctionMapper, ProgramFunctionMapper } from '../common'; import { abi } from './AbiContract-abi'; export type AbiContractTypes = Types; +export type AbiContractConfigurables = Types['configurables']; export class AbiContractInterface extends Interface { declare functions: InterfaceFunctionMapper; diff --git a/packages/fuel-gauge/src/abi/fixtures/predicates/predicate.txt b/packages/fuel-gauge/src/abi/fixtures/predicates/predicate.txt index 0da637ec42d..e791373ad64 100644 --- a/packages/fuel-gauge/src/abi/fixtures/predicates/predicate.txt +++ b/packages/fuel-gauge/src/abi/fixtures/predicates/predicate.txt @@ -16,6 +16,9 @@ import { bytecode } from './AbiPredicate-bytecode'; import type { AbiPredicateTypes as Types } from './AbiPredicateTypes'; export type AbiPredicateTypes = Types; +export type AbiPredicateInputs = Types['inputs']; +export type AbiPredicateOutput = Types['output']; +export type AbiPredicateConfigurables = Types['configurables']; export type AbiPredicateParameters = Omit< PredicateParams< diff --git a/packages/fuel-gauge/src/abi/fixtures/scripts/script.txt b/packages/fuel-gauge/src/abi/fixtures/scripts/script.txt index e9c653effe6..a958f66d36b 100644 --- a/packages/fuel-gauge/src/abi/fixtures/scripts/script.txt +++ b/packages/fuel-gauge/src/abi/fixtures/scripts/script.txt @@ -16,6 +16,9 @@ import { bytecode } from './AbiScript-bytecode'; import type { AbiScriptTypes as Types } from './AbiScriptTypes'; export type AbiScriptTypes = Types; +export type AbiScriptInputs = Types['inputs']; +export type AbiScriptOutput = Types['output']; +export type AbiScriptConfigurables = Types['configurables']; export class AbiScript extends Script< Types['inputs'], From 569e3561a8fe515da4d1ace4fef889a8bc3294f1 Mon Sep 17 00:00:00 2001 From: nedsalk Date: Mon, 23 Dec 2024 10:04:14 +0100 Subject: [PATCH 101/126] remove already included --silent flag --- packages/fuels/src/cli.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/fuels/src/cli.ts b/packages/fuels/src/cli.ts index de943487272..d1421ce75a2 100644 --- a/packages/fuels/src/cli.ts +++ b/packages/fuels/src/cli.ts @@ -94,7 +94,6 @@ export const configureCli = () => { .description(`Generate Typescript from Sway ABI JSON files`) .requiredOption('-i, --inputs ', 'Input paths/globals to your ABI JSON files') .requiredOption('-o, --output ', 'Directory path for generated files') - .option('-S, --silent', 'Omit output messages') .action(withProgram(command, Commands.typegen, typegen)); // Versions From 5446c305109146eed017fa9624008aae61b9ee5f Mon Sep 17 00:00:00 2001 From: nedsalk Date: Tue, 24 Dec 2024 10:22:28 +0100 Subject: [PATCH 102/126] added non-happy paths testing --- packages/abi/src/gen/abi-gen-types.ts | 2 +- .../renderers/ts/renderers/render-program.ts | 31 ++-- packages/fuel-gauge/src/abi/abi-gen.test.ts | 37 ++++- packages/fuels/.gitignore | 1 + packages/fuels/package.json | 3 +- .../src/cli/commands/typegen/utils.test.ts | 135 ++++++++++++++++-- .../fuels/src/cli/commands/typegen/utils.ts | 68 +++++++-- packages/fuels/test/fixtures/fuels.config.ts | 8 +- 8 files changed, 242 insertions(+), 43 deletions(-) diff --git a/packages/abi/src/gen/abi-gen-types.ts b/packages/abi/src/gen/abi-gen-types.ts index 0709880a21c..032c27a243f 100644 --- a/packages/abi/src/gen/abi-gen-types.ts +++ b/packages/abi/src/gen/abi-gen-types.ts @@ -39,7 +39,7 @@ export interface ProgramDetails { /** * The compressed bytecode of the program in base64 format. */ - binCompressed: string; + binCompressed?: string; /** * The abi of the program in the format returned via `AbiParser`. */ diff --git a/packages/abi/src/gen/renderers/ts/renderers/render-program.ts b/packages/abi/src/gen/renderers/ts/renderers/render-program.ts index f45826ff73f..c1602344495 100644 --- a/packages/abi/src/gen/renderers/ts/renderers/render-program.ts +++ b/packages/abi/src/gen/renderers/ts/renderers/render-program.ts @@ -33,11 +33,14 @@ export function renderProgram(details: ProgramDetails, versions: BinaryVersions) filename: `${name}-abi.ts`, content: templateRenderer({ template: abiTemplate, versions, data: { abiContents } }), }, - { + ]; + + if (binCompressed) { + results.push({ filename: `${name}-bytecode.ts`, content: templateRenderer({ template: bytecodeTemplate, versions, data: { binCompressed } }), - }, - ]; + }); + } switch (abi.programType) { case 'contract': @@ -51,15 +54,7 @@ export function renderProgram(details: ProgramDetails, versions: BinaryVersions) }), exportInIndexFile: true, }, - { - filename: `${name}Factory.ts`, - content: templateRenderer({ - template: contractFactoryTemplate, - versions, - data: { name }, - }), - exportInIndexFile: true, - }, + { filename: `${name}-storage-slots.ts`, content: templateRenderer({ @@ -69,6 +64,18 @@ export function renderProgram(details: ProgramDetails, versions: BinaryVersions) }), } ); + + if (binCompressed) { + results.push({ + filename: `${name}Factory.ts`, + content: templateRenderer({ + template: contractFactoryTemplate, + versions, + data: { name }, + }), + exportInIndexFile: true, + }); + } break; case 'predicate': results.push({ diff --git a/packages/fuel-gauge/src/abi/abi-gen.test.ts b/packages/fuel-gauge/src/abi/abi-gen.test.ts index b0e0bfc9945..3d4aec40524 100644 --- a/packages/fuel-gauge/src/abi/abi-gen.test.ts +++ b/packages/fuel-gauge/src/abi/abi-gen.test.ts @@ -1,15 +1,30 @@ -import { readFileSync } from 'fs'; -import { AbiGen } from 'fuels'; +import { cpSync, mkdirSync, readFileSync, rmdirSync, rmSync } from 'fs'; +import { AbiGen, randomUUID } from 'fuels'; import { getProgramDetails } from 'fuels/cli-utils'; import { join } from 'path'; import { AbiProjectsEnum, getAbiForcProject } from './utils'; +function getUniqueBuildOutputs(buildOutputsPath: string) { + const uniquePath = join(buildOutputsPath, '../', randomUUID()); + + mkdirSync(uniquePath, { recursive: true }); + + cpSync(buildOutputsPath, uniquePath, { recursive: true }); + + return { + path: uniquePath, + [Symbol.dispose]: () => { + rmdirSync(uniquePath, { recursive: true }); + }, + }; +} + /** * @group node */ describe('AbiGen', () => { - test('AbiGen generates all files correctly', () => { + test('Generates all files correctly', () => { const fixtureResultMap = new Map([ ['index', 'index.ts'], ['common', 'common.ts'], @@ -56,4 +71,20 @@ describe('AbiGen', () => { expect(results.filter((r) => r.filename === filename)).toHaveLength(1); }); }); + + test('skips contract factory and bytecode generation when bytecode is missing', () => { + const { buildDir, name } = getAbiForcProject(AbiProjectsEnum.ABI_CONTRACT); + using customBuildOutputs = getUniqueBuildOutputs(buildDir); + + rmSync(join(customBuildOutputs.path, `${name}.bin`)); + const programDetails = getProgramDetails([customBuildOutputs.path]); + + const results = AbiGen.generate({ + programDetails, + versions: { FUELS: '0.94.8', FORC: '0.64.0' }, + }); + + expect(results.map((r) => r.filename)).not.toContain(/AbiContractFactory.ts/); + expect(results.map((r) => r.filename)).not.toContain(/AbiContract-bytecode.ts/); + }); }); diff --git a/packages/fuels/.gitignore b/packages/fuels/.gitignore index 289ea019274..d6ba43d5252 100644 --- a/packages/fuels/.gitignore +++ b/packages/fuels/.gitignore @@ -1,2 +1,3 @@ README.md test/__temp__* +test/fixtures/typegend \ No newline at end of file diff --git a/packages/fuels/package.json b/packages/fuels/package.json index 8f9191b4045..755448f62c8 100644 --- a/packages/fuels/package.json +++ b/packages/fuels/package.json @@ -59,7 +59,8 @@ "build:recipes": "cd ../recipes && pnpm build:all && cd ../fuels", "type:declarations": "tsc --emitDeclarationOnly -p tsconfig.dts.json", "type:check": "tsc --noEmit", - "prepublishOnly": "cp ../../README.md ./README.md" + "prepublishOnly": "cp ../../README.md ./README.md", + "pretest": "pnpm fuels build --path $PWD/test/fixtures --deploy" }, "license": "Apache-2.0", "dependencies": { diff --git a/packages/fuels/src/cli/commands/typegen/utils.test.ts b/packages/fuels/src/cli/commands/typegen/utils.test.ts index 9deb720ff00..47743165d8d 100644 --- a/packages/fuels/src/cli/commands/typegen/utils.test.ts +++ b/packages/fuels/src/cli/commands/typegen/utils.test.ts @@ -1,14 +1,133 @@ -import { getProgramDetails } from './utils'; +import { randomUUID } from '@fuel-ts/crypto'; +import { ErrorCode, FuelError } from '@fuel-ts/errors'; +import { expectToThrowFuelError } from '@fuel-ts/errors/test-utils'; +import { globSync } from 'glob'; +import { cpSync, mkdirSync, rmdirSync, rmSync } from 'node:fs'; +import path from 'node:path'; +import { getProgramDetails, normalizeProjectName } from './utils'; + +/** + * @group node + */ +describe('normalizeProjectName', () => { + test('should normalize project name', () => { + expect(normalizeProjectName('DsToken')).toEqual('DsToken'); + expect(normalizeProjectName('test')).toEqual('Test'); + expect(normalizeProjectName('ds-token')).toEqual('DsToken'); + expect(normalizeProjectName('ds_token')).toEqual('DsToken'); + expect(normalizeProjectName('Aaa_bbb_CCDD-EEE')).toEqual('AaaBbbCCDDEEE'); + expect(normalizeProjectName('ds token')).toEqual('DsToken'); + expect(normalizeProjectName('name.abi')).toEqual('NameAbi'); + expect(normalizeProjectName('1234name.abi')).toEqual('NameAbi'); + expect(normalizeProjectName('ERC20.abi')).toEqual('ERC20Abi'); + expect(normalizeProjectName('my-contract')).toEqual('MyContract'); + expect(normalizeProjectName('my contract')).toEqual('MyContract'); + expect(normalizeProjectName('my.contract')).toEqual('MyContract'); + expect(normalizeProjectName('still-my.contract')).toEqual('StillMyContract'); + expect(normalizeProjectName('also my.contract')).toEqual('AlsoMyContract'); + }); + + test('throws if name cannot be normalized', async () => { + await expectToThrowFuelError( + () => normalizeProjectName(''), + new FuelError( + ErrorCode.PARSE_FAILED, + `The provided string '' results in an empty output after`.concat( + ` normalization, therefore, it can't normalize string.` + ) + ) + ); + }); +}); + +function getUniqueBuildOutputs(buildOutputsPath: string) { + const uniquePath = path.join(buildOutputsPath, '../', randomUUID()); + + mkdirSync(uniquePath, { recursive: true }); + + cpSync(buildOutputsPath, uniquePath, { recursive: true }); + + return { + path: uniquePath, + [Symbol.dispose]: () => { + rmdirSync(uniquePath, { recursive: true }); + }, + }; +} /** * @group node */ -describe('utils', () => { - test('getProgramDetails skips invalid folder and logs it', () => { - const spy = vi.spyOn(console, 'log'); - const buildDirs = ['invalid-folder']; - const result = getProgramDetails(buildDirs); - expect(result).toEqual([]); - expect(spy).toHaveBeenCalledWith('No build outputs found in invalid-folder, skipping...'); +describe('getProgramDetails', () => { + const workspacePath = path.join(process.cwd(), 'packages/fuels/test/fixtures/workspace'); + const buildOutputs = { + predicate: path.join(workspacePath, 'predicates/predicate/out/release'), + script: path.join(workspacePath, 'scripts/script/out/release'), + contract: path.join(workspacePath, 'contracts/bar/out/release'), + }; + test('works with valid folder', () => { + const result = getProgramDetails([buildOutputs.predicate]); + + expect(result).toHaveLength(1); + }); + test('works with valid abi json file as path', () => { + const result = getProgramDetails([ + path.join(buildOutputs.predicate, 'predicate-true-abi.json'), + ]); + + expect(result).toHaveLength(1); + }); + + test('throws if no abi json file found', async () => { + using predicateOutputs = getUniqueBuildOutputs(buildOutputs.predicate); + const abiJsonFile = globSync(`${predicateOutputs.path}/*-abi.json`)[0]; + rmSync(abiJsonFile); + + await expectToThrowFuelError( + () => getProgramDetails([predicateOutputs.path]), + new FuelError(ErrorCode.NO_ABIS_FOUND, `No abi file found in ${predicateOutputs.path}`) + ); + }); + + test('throws when missing bytecode for predicate', async () => { + using predicateOutputs = getUniqueBuildOutputs(buildOutputs.predicate); + const binFile = globSync(`${predicateOutputs.path}/*.bin`)[0]; + rmSync(binFile); + + await expectToThrowFuelError( + () => getProgramDetails([predicateOutputs.path]), + new FuelError( + ErrorCode.BIN_FILE_NOT_FOUND, + `For predicates, the bytecode is required. No bytecode found for predicate at ${predicateOutputs.path}.` + ) + ); + }); + + test('throws when missing bytecode for script', async () => { + using scriptOutputs = getUniqueBuildOutputs(buildOutputs.script); + const binFile = globSync(`${scriptOutputs.path}/*.bin`)[0]; + rmSync(binFile); + await expectToThrowFuelError( + () => getProgramDetails([scriptOutputs.path]), + new FuelError( + ErrorCode.BIN_FILE_NOT_FOUND, + `For scripts, the bytecode is required. No bytecode found for script at ${scriptOutputs.path}.` + ) + ); + }); + + test('logs when missing bytecode for contract', () => { + using contractOutputs = getUniqueBuildOutputs(buildOutputs.contract); + const binFile = globSync(`${contractOutputs.path}/*.bin`)[0]; + rmSync(binFile); + + const spy = vi.spyOn(console, 'log').mockImplementationOnce(() => {}); + const result = getProgramDetails([contractOutputs.path]); + + expect(spy).toHaveBeenCalledWith( + `No bytecode found for contract at ${contractOutputs.path}, will not generate ContractFactory for it.` + ); + + expect(result).toHaveLength(1); }); }); diff --git a/packages/fuels/src/cli/commands/typegen/utils.ts b/packages/fuels/src/cli/commands/typegen/utils.ts index ef13ab612a4..2b3c85c068d 100644 --- a/packages/fuels/src/cli/commands/typegen/utils.ts +++ b/packages/fuels/src/cli/commands/typegen/utils.ts @@ -1,6 +1,6 @@ import { type ProgramDetails, type AbiSpecification, AbiParser } from '@fuel-ts/abi'; import { ErrorCode, FuelError } from '@fuel-ts/errors'; -import { compressBytecode, hexlify } from '@fuel-ts/utils'; +import { assertUnreachable, compressBytecode, hexlify } from '@fuel-ts/utils'; import { readFileSync } from 'fs'; import { globSync } from 'glob'; @@ -13,7 +13,7 @@ import { log } from '../../utils/logger'; * myFile.ts —— MyFileTs * my-abi.json —— MyAbiJson */ -function normalizeProjectName(str: string): string { +export function normalizeProjectName(str: string): string { const transformations: ((s: string) => string)[] = [ (s) => s.replace(/\s+/g, '-'), // spaces to - (s) => s.replace(/\./g, '-'), // dots to - @@ -21,7 +21,6 @@ function normalizeProjectName(str: string): string { (s) => s.replace(/-[a-z]/g, (match) => match.slice(-1).toUpperCase()), // delete '-' and capitalize the letter after them (s) => s.replace(/-/g, ''), // delete any '-' left (s) => s.replace(/^\d+/, ''), // removes leading digits - (s) => s[0].toUpperCase() + s.slice(1), // capitalize first letter ]; const output = transformations.reduce((s, t) => t(s), str); @@ -33,28 +32,67 @@ function normalizeProjectName(str: string): string { throw new FuelError(ErrorCode.PARSE_FAILED, errMsg); } - return output; + return output[0].toUpperCase() + output.slice(1); // capitalize first letter } -export function getProgramDetails(buildDirs: string[]) { +function handleMissingBinary(path: string, abi: AbiSpecification) { + const programType = abi.programType as 'predicate' | 'script' | 'contract' | 'library'; + switch (programType) { + case 'predicate': + throw new FuelError( + ErrorCode.BIN_FILE_NOT_FOUND, + `For predicates, the bytecode is required. No bytecode found for predicate at ${path}.` + ); + case 'script': + throw new FuelError( + ErrorCode.BIN_FILE_NOT_FOUND, + `For scripts, the bytecode is required. No bytecode found for script at ${path}.` + ); + case 'contract': + log(`No bytecode found for contract at ${path}, will not generate ContractFactory for it.`); + + break; + case 'library': + // ignore; + break; + default: + assertUnreachable(programType); + } +} + +/** + * + * @param paths paths to the build outputs. The path can also be to the abi json file. + * @returns program details for the AbiGen to work with. + */ +export function getProgramDetails(paths: string[]) { const details: ProgramDetails[] = []; - buildDirs.forEach((dir) => { - const [binPath] = globSync(`${dir}/*.bin`); - if (binPath === undefined) { - log(`No build outputs found in ${dir}, skipping...`); - return; + paths.forEach((path) => { + const abiPath = path.match(/.+-abi\.json/) ? path : globSync(`${path}/*-abi.json`)[0]; + if (abiPath === undefined) { + throw new FuelError(ErrorCode.NO_ABIS_FOUND, `No abi file found in ${path}`); } + + const dir = abiPath.match(/.*\//)?.[0] as string; + const projectName = abiPath.match(/([^/])+(?=-abi\.json)/)?.[0] as string; + const abiContentsStr = readFileSync(abiPath).toString(); + const abi = JSON.parse(abiContentsStr) as AbiSpecification; + const [storageSlotsPath] = globSync(`${dir}/*-storage_slots.json`); - const projectName = binPath.match(/([^/])+(?=\.bin)/)?.[0] as string; - const abiContents = readFileSync(`${dir}/${projectName}-abi.json`).toString(); const storageSlots = storageSlotsPath ? readFileSync(storageSlotsPath).toString() : undefined; - const binCompressed = compressBytecode(hexlify(readFileSync(binPath))); + + const [binPath] = globSync(`${dir}/*.bin`); + if (binPath === undefined) { + handleMissingBinary(path, abi); + } + + const binCompressed = binPath && compressBytecode(hexlify(readFileSync(binPath))); details.push({ name: normalizeProjectName(projectName), - abi: AbiParser.parse(JSON.parse(abiContents) as AbiSpecification), + abi: AbiParser.parse(JSON.parse(abiContentsStr) as AbiSpecification), binCompressed, - abiContents, + abiContents: abiContentsStr, storageSlots, }); }); diff --git a/packages/fuels/test/fixtures/fuels.config.ts b/packages/fuels/test/fixtures/fuels.config.ts index 2e25eae894c..4aeb67ebf9b 100644 --- a/packages/fuels/test/fixtures/fuels.config.ts +++ b/packages/fuels/test/fixtures/fuels.config.ts @@ -19,7 +19,7 @@ export const fuelsConfig: FuelsConfig = { ], scripts: [join(scriptsDir, 'script')], predicates: [join(predicatesDir, 'predicate')], - output: '/output', + output: './typegen', forcPath: 'fuels-forc', fuelCorePath: 'fuels-core', deployConfig: {}, @@ -27,6 +27,8 @@ export const fuelsConfig: FuelsConfig = { fuelCorePort: 4000, providerUrl: 'http://127.0.0.1:4000/v1/graphql', configPath: __filename, - forcBuildFlags: [], - buildMode: 'debug', + forcBuildFlags: ['--release'], + buildMode: 'release', }; + +export default fuelsConfig; From fe159f6b102c77b1507fe5bd0ab46d57ae7da740 Mon Sep 17 00:00:00 2001 From: nedsalk Date: Thu, 26 Dec 2024 13:03:56 +0100 Subject: [PATCH 103/126] mvoed cli into abi package --- apps/demo-typegen/package.json | 1 - packages/abi-typegen/package.json | 4 +- packages/abi/package.json | 19 +- packages/abi/src/bin.ts | 15 + packages/abi/src/cli.ts | 1 + packages/abi/src/gen/cli/index.ts | 1 + packages/abi/src/gen/cli/run.ts | 52 ++ packages/abi/src/gen/cli/utils.test.ts | 38 + .../typegen => abi/src/gen/cli}/utils.ts | 23 +- packages/abi/tsup.config.ts | 4 +- packages/abi/typegen.js | 2 + packages/fuel-gauge/package.json | 1 + packages/fuel-gauge/src/abi/abi-gen.test.ts | 129 +++- .../fuel-gauge/src/abi/fixtures/common.txt | 4 +- .../abi/fixtures/contracts/contract-abi.txt | 4 +- .../fixtures/contracts/contract-bytecode.txt | 4 +- .../fixtures/contracts/contract-factory.txt | 4 +- .../abi/fixtures/contracts/contract-index.txt | 4 +- .../contracts/contract-storage-slots.txt | 4 +- .../abi/fixtures/contracts/contract-types.txt | 4 +- .../src/abi/fixtures/contracts/contract.txt | 4 +- .../fuel-gauge/src/abi/fixtures/index.txt | 4 +- .../abi/fixtures/predicates/predicate-abi.txt | 4 +- .../fixtures/predicates/predicate-index.txt | 4 +- .../fixtures/predicates/predicate-types.txt | 4 +- .../src/abi/fixtures/predicates/predicate.txt | 4 +- .../src/abi/fixtures/scripts/script-abi.txt | 4 +- .../src/abi/fixtures/scripts/script-index.txt | 4 +- .../src/abi/fixtures/scripts/script-types.txt | 4 +- .../src/abi/fixtures/scripts/script.txt | 4 +- packages/fuels/package.json | 10 +- packages/fuels/src/cli-utils.ts | 1 - packages/fuels/src/cli.ts | 9 +- .../src/cli/commands/build/index.test.ts | 2 +- .../fuels/src/cli/commands/build/index.ts | 2 +- .../fuels/src/cli/commands/deploy/index.ts | 2 +- .../fuels/src/cli/commands/generate-types.ts | 16 + .../fuels/src/cli/commands/typegen/index.ts | 65 -- .../src/cli/commands/typegen/utils.test.ts | 133 ---- packages/recipes/package.json | 5 +- packages/recipes/scripts/build-recipes.ts | 2 +- packages/recipes/src/types/Src14OwnedProxy.ts | 685 ++++++++++++++++++ .../src/types/Src14OwnedProxyFactory.ts | 31 + packages/recipes/src/types/common.d.ts | 31 + .../src/types/contracts/Src14OwnedProxy.ts | 1 + pnpm-lock.yaml | 16 + 46 files changed, 1070 insertions(+), 299 deletions(-) create mode 100755 packages/abi/src/bin.ts create mode 100644 packages/abi/src/cli.ts create mode 100644 packages/abi/src/gen/cli/index.ts create mode 100644 packages/abi/src/gen/cli/run.ts create mode 100644 packages/abi/src/gen/cli/utils.test.ts rename packages/{fuels/src/cli/commands/typegen => abi/src/gen/cli}/utils.ts (89%) create mode 100755 packages/abi/typegen.js create mode 100644 packages/fuels/src/cli/commands/generate-types.ts delete mode 100644 packages/fuels/src/cli/commands/typegen/index.ts delete mode 100644 packages/fuels/src/cli/commands/typegen/utils.test.ts create mode 100644 packages/recipes/src/types/Src14OwnedProxy.ts create mode 100644 packages/recipes/src/types/Src14OwnedProxyFactory.ts create mode 100644 packages/recipes/src/types/common.d.ts diff --git a/apps/demo-typegen/package.json b/apps/demo-typegen/package.json index 19d8c31aad8..d3a83e30ff6 100644 --- a/apps/demo-typegen/package.json +++ b/apps/demo-typegen/package.json @@ -4,7 +4,6 @@ "description": "Simple demo using Typegen generated types", "author": "Fuel Labs (https://fuel.network/)", "scripts": { - "pretest": "run-s build:forc build:types", "build:forc": "run-p forc:*", "forc:contract": "pnpm fuels-forc build -p demo-contract --release", "forc:script": "pnpm fuels-forc build -p demo-script --release", diff --git a/packages/abi-typegen/package.json b/packages/abi-typegen/package.json index 1f093876522..f600c63d6b2 100644 --- a/packages/abi-typegen/package.json +++ b/packages/abi-typegen/package.json @@ -3,9 +3,7 @@ "version": "0.97.2", "description": "Generates Typescript definitions from Sway ABI Json files", "author": "Fuel Labs (https://fuel.network/)", - "bin": { - "fuels-typegen": "typegen.js" - }, + "main": "dist/index.js", "module": "dist/index.mjs", "types": "dist/index.d.ts", diff --git a/packages/abi/package.json b/packages/abi/package.json index 815a077c67e..973f50cf75e 100644 --- a/packages/abi/package.json +++ b/packages/abi/package.json @@ -11,11 +11,26 @@ "engines": { "node": "^18.20.3 || ^20.0.0 || ^22.0.0" }, + "bin": { + "fuels-typegen": "typegen.js" + }, "exports": { ".": { "require": "./dist/index.js", "import": "./dist/index.mjs", "types": "./dist/index.d.ts" + }, + "./cli": { + "types": "./dist/cli.d.ts", + "require": "./dist/cli.js", + "import": "./dist/cli.mjs" + } + }, + "typesVersions": { + "*": { + "cli": [ + "./dist/cli.d.ts" + ] } }, "files": [ @@ -29,7 +44,9 @@ "@fuel-ts/errors": "workspace:*", "@fuel-ts/utils": "workspace:*", "@fuel-ts/versions": "workspace:*", - "handlebars": "^4.7.8" + "handlebars": "^4.7.8", + "commander": "^12.1.0", + "glob": "^10.4.5" }, "devDependencies": {} } diff --git a/packages/abi/src/bin.ts b/packages/abi/src/bin.ts new file mode 100755 index 00000000000..5fbab5c3c62 --- /dev/null +++ b/packages/abi/src/bin.ts @@ -0,0 +1,15 @@ +import { getBinaryVersions } from '@fuel-ts/versions/cli'; +import { Command } from 'commander'; + +import { configureTypegenCliOptions } from './cli'; + +const program = new Command(); + +program.name('fuels-typegen'); +program.version(getBinaryVersions().FUELS); +program.usage(`-i ../out/*-abi.json -o ./generated/`); + +program.option('-S, --silent', 'Omit output messages', false); +configureTypegenCliOptions(program); + +program.parse(process.argv); diff --git a/packages/abi/src/cli.ts b/packages/abi/src/cli.ts new file mode 100644 index 00000000000..c37108bd746 --- /dev/null +++ b/packages/abi/src/cli.ts @@ -0,0 +1 @@ +export * from './gen/cli'; diff --git a/packages/abi/src/gen/cli/index.ts b/packages/abi/src/gen/cli/index.ts new file mode 100644 index 00000000000..939508c0f1b --- /dev/null +++ b/packages/abi/src/gen/cli/index.ts @@ -0,0 +1 @@ +export { configureTypegenCliOptions, runTypegen } from './run'; diff --git a/packages/abi/src/gen/cli/run.ts b/packages/abi/src/gen/cli/run.ts new file mode 100644 index 00000000000..e858e08c840 --- /dev/null +++ b/packages/abi/src/gen/cli/run.ts @@ -0,0 +1,52 @@ +import { getBinaryVersions } from '@fuel-ts/versions/cli'; +import type { Command } from 'commander'; +import { mkdirSync, writeFileSync } from 'fs'; +import { join } from 'path'; + +import { AbiGen } from '../abi-gen'; + +import { getProgramDetails, loggingConfig } from './utils'; + +export interface RunTypegenOptions { + inputs: string[]; + output: string; + silent?: boolean; +} + +export function runTypegen(options: RunTypegenOptions) { + const { inputs, output, silent } = options; + + loggingConfig.silent = !!silent; + + const programDetails = getProgramDetails(inputs); + + const results = AbiGen.generate({ programDetails, versions: getBinaryVersions() }); + + mkdirSync(output, { recursive: true }); + + const subDirectories = new Set(); + + results.forEach((r) => { + const dir = r.filename.split('/').slice(0, -1).join('/'); + if (dir !== '') { + subDirectories.add(dir); + } + }); + + subDirectories.forEach((dir) => { + mkdirSync(join(output, dir), { recursive: true }); + }); + + results.forEach((r) => { + const outputPath = join(output, r.filename); + writeFileSync(outputPath, r.content); + }); +} + +export function configureTypegenCliOptions(program: Command) { + return program + .description(`Generate Typescript from Sway ABI JSON files`) + .requiredOption('-i, --inputs ', 'Input paths/globals to your ABI JSON files') + .requiredOption('-o, --output ', 'Directory path for generated files') + .action(runTypegen); +} diff --git a/packages/abi/src/gen/cli/utils.test.ts b/packages/abi/src/gen/cli/utils.test.ts new file mode 100644 index 00000000000..394b52180f9 --- /dev/null +++ b/packages/abi/src/gen/cli/utils.test.ts @@ -0,0 +1,38 @@ +import { ErrorCode, FuelError } from '@fuel-ts/errors'; +import { expectToThrowFuelError } from '@fuel-ts/errors/test-utils'; + +import { normalizeProjectName } from './utils'; + +/** + * @group node + */ +describe('normalizeProjectName', () => { + test('should normalize project name', () => { + expect(normalizeProjectName('DsToken')).toEqual('DsToken'); + expect(normalizeProjectName('test')).toEqual('Test'); + expect(normalizeProjectName('ds-token')).toEqual('DsToken'); + expect(normalizeProjectName('ds_token')).toEqual('DsToken'); + expect(normalizeProjectName('Aaa_bbb_CCDD-EEE')).toEqual('AaaBbbCCDDEEE'); + expect(normalizeProjectName('ds token')).toEqual('DsToken'); + expect(normalizeProjectName('name.abi')).toEqual('NameAbi'); + expect(normalizeProjectName('1234name.abi')).toEqual('NameAbi'); + expect(normalizeProjectName('ERC20.abi')).toEqual('ERC20Abi'); + expect(normalizeProjectName('my-contract')).toEqual('MyContract'); + expect(normalizeProjectName('my contract')).toEqual('MyContract'); + expect(normalizeProjectName('my.contract')).toEqual('MyContract'); + expect(normalizeProjectName('still-my.contract')).toEqual('StillMyContract'); + expect(normalizeProjectName('also my.contract')).toEqual('AlsoMyContract'); + }); + + test('throws if name cannot be normalized', async () => { + await expectToThrowFuelError( + () => normalizeProjectName(''), + new FuelError( + ErrorCode.PARSE_FAILED, + `The provided string '' results in an empty output after`.concat( + ` normalization, therefore, it can't normalize string.` + ) + ) + ); + }); +}); diff --git a/packages/fuels/src/cli/commands/typegen/utils.ts b/packages/abi/src/gen/cli/utils.ts similarity index 89% rename from packages/fuels/src/cli/commands/typegen/utils.ts rename to packages/abi/src/gen/cli/utils.ts index 2b3c85c068d..136488d0740 100644 --- a/packages/fuels/src/cli/commands/typegen/utils.ts +++ b/packages/abi/src/gen/cli/utils.ts @@ -1,10 +1,23 @@ -import { type ProgramDetails, type AbiSpecification, AbiParser } from '@fuel-ts/abi'; import { ErrorCode, FuelError } from '@fuel-ts/errors'; import { assertUnreachable, compressBytecode, hexlify } from '@fuel-ts/utils'; import { readFileSync } from 'fs'; import { globSync } from 'glob'; -import { log } from '../../utils/logger'; +import type { AbiSpecification } from '../../parser'; +import { AbiParser } from '../../parser'; +import type { ProgramDetails } from '../abi-gen-types'; + +export const loggingConfig = { + silent: false, +}; + +export function log(...args: Parameters) { + if (!loggingConfig.silent) { + // eslint-disable-next-line no-console + console.log(...args); + } +} + /** * Converts `some.string-value` into `SomeStringValue`. * @@ -50,7 +63,6 @@ function handleMissingBinary(path: string, abi: AbiSpecification) { ); case 'contract': log(`No bytecode found for contract at ${path}, will not generate ContractFactory for it.`); - break; case 'library': // ignore; @@ -60,11 +72,6 @@ function handleMissingBinary(path: string, abi: AbiSpecification) { } } -/** - * - * @param paths paths to the build outputs. The path can also be to the abi json file. - * @returns program details for the AbiGen to work with. - */ export function getProgramDetails(paths: string[]) { const details: ProgramDetails[] = []; paths.forEach((path) => { diff --git a/packages/abi/tsup.config.ts b/packages/abi/tsup.config.ts index 8ff482a0339..48e24be8656 100644 --- a/packages/abi/tsup.config.ts +++ b/packages/abi/tsup.config.ts @@ -1,8 +1,8 @@ -import { index } from '@internal/tsup'; +import { indexBinAndCliConfig } from '@internal/tsup'; import type { Options } from 'tsup'; const configs: Options = { - ...index, + ...indexBinAndCliConfig, loader: { '.hbs': 'text', }, diff --git a/packages/abi/typegen.js b/packages/abi/typegen.js new file mode 100755 index 00000000000..ae13c3e8f43 --- /dev/null +++ b/packages/abi/typegen.js @@ -0,0 +1,2 @@ +#!/usr/bin/env node +require('./dist/bin.js'); diff --git a/packages/fuel-gauge/package.json b/packages/fuel-gauge/package.json index 740c95be9a7..251f047e660 100644 --- a/packages/fuel-gauge/package.json +++ b/packages/fuel-gauge/package.json @@ -15,6 +15,7 @@ "fuels": "workspace:*" }, "devDependencies": { + "@fuel-ts/abi": "workspace:*", "@fuel-ts/account": "workspace:*", "@fuel-ts/errors": "workspace:*", "@fuel-ts/merkle": "workspace:*", diff --git a/packages/fuel-gauge/src/abi/abi-gen.test.ts b/packages/fuel-gauge/src/abi/abi-gen.test.ts index 3d4aec40524..1d17fb82651 100644 --- a/packages/fuel-gauge/src/abi/abi-gen.test.ts +++ b/packages/fuel-gauge/src/abi/abi-gen.test.ts @@ -1,23 +1,23 @@ -import { cpSync, mkdirSync, readFileSync, rmdirSync, rmSync } from 'fs'; -import { AbiGen, randomUUID } from 'fuels'; -import { getProgramDetails } from 'fuels/cli-utils'; +import { runTypegen } from '@fuel-ts/abi/cli'; +import { randomUUID } from 'crypto'; +import { cpSync, mkdirSync, readdirSync, readFileSync, rmdirSync, rmSync } from 'fs'; +import { FuelError } from 'fuels'; +import { expectToThrowFuelError } from 'fuels/test-utils'; +import { tmpdir } from 'os'; import { join } from 'path'; import { AbiProjectsEnum, getAbiForcProject } from './utils'; -function getUniqueBuildOutputs(buildOutputsPath: string) { - const uniquePath = join(buildOutputsPath, '../', randomUUID()); +function generateTmpDir(fromDir?: string) { + const dir = join(tmpdir(), 'fuels', randomUUID()); - mkdirSync(uniquePath, { recursive: true }); + mkdirSync(dir, { recursive: true }); - cpSync(buildOutputsPath, uniquePath, { recursive: true }); + if (fromDir) { + cpSync(fromDir, dir, { recursive: true }); + } - return { - path: uniquePath, - [Symbol.dispose]: () => { - rmdirSync(uniquePath, { recursive: true }); - }, - }; + return { path: dir, [Symbol.dispose]: () => rmdirSync(dir, { recursive: true }) }; } /** @@ -50,12 +50,13 @@ describe('AbiGen', () => { const { buildDir: contractDir } = getAbiForcProject(AbiProjectsEnum.ABI_CONTRACT); const { buildDir: predicateDir } = getAbiForcProject(AbiProjectsEnum.ABI_PREDICATE); - const { buildDir: scriptDir } = getAbiForcProject(AbiProjectsEnum.ABI_SCRIPT); + const { abiPath: scriptAbiPath } = getAbiForcProject(AbiProjectsEnum.ABI_SCRIPT); - const programDetails = getProgramDetails([contractDir, predicateDir, scriptDir]); - const results = AbiGen.generate({ - programDetails, - versions: { FUELS: '0.94.8', FORC: '0.64.0' }, + using output = generateTmpDir(); + + runTypegen({ + inputs: [contractDir, predicateDir, scriptAbiPath], + output: output.path, }); fixtureResultMap.forEach((filename, fixture) => { @@ -63,28 +64,92 @@ describe('AbiGen', () => { process.cwd(), `packages/fuel-gauge/src/abi/fixtures/${fixture}.txt` ); - const fixtureContent = readFileSync(fixtureFile).toString(); - const result = results.find((r) => r.filename === filename); - expect(result?.content).toEqual(fixtureContent); + const expected = readFileSync(fixtureFile).toString(); + const generated = readFileSync(join(output.path, filename)).toString(); - // verify only one file generated - expect(results.filter((r) => r.filename === filename)).toHaveLength(1); + expect(generated).toEqual(expected); }); }); - test('skips contract factory and bytecode generation when bytecode is missing', () => { + test('throws if no abi json file found', async () => { + const { buildDir, name } = getAbiForcProject(AbiProjectsEnum.ABI_SCRIPT); + using tmpDir = generateTmpDir(buildDir); + + rmSync(join(tmpDir.path, `${name}-abi.json`)); + + await expectToThrowFuelError( + () => + runTypegen({ + inputs: [tmpDir.path], + output: tmpDir.path, + }), + new FuelError(FuelError.CODES.NO_ABIS_FOUND, `No abi file found in ${tmpDir.path}`) + ); + }); + + test('skips contract factory and bytecode generation when bytecode is missing and logs it', () => { const { buildDir, name } = getAbiForcProject(AbiProjectsEnum.ABI_CONTRACT); - using customBuildOutputs = getUniqueBuildOutputs(buildDir); + using tmpDir = generateTmpDir(buildDir); + + rmSync(join(tmpDir.path, `${name}.bin`)); - rmSync(join(customBuildOutputs.path, `${name}.bin`)); - const programDetails = getProgramDetails([customBuildOutputs.path]); + const spy = vi.spyOn(console, 'log').mockImplementationOnce(() => {}); - const results = AbiGen.generate({ - programDetails, - versions: { FUELS: '0.94.8', FORC: '0.64.0' }, + runTypegen({ + inputs: [tmpDir.path], + output: tmpDir.path, }); - expect(results.map((r) => r.filename)).not.toContain(/AbiContractFactory.ts/); - expect(results.map((r) => r.filename)).not.toContain(/AbiContract-bytecode.ts/); + expect(spy).toHaveBeenCalledWith( + `No bytecode found for contract at ${tmpDir.path}, will not generate ContractFactory for it.` + ); + + const contractsOutputs = readdirSync(join(tmpDir.path, 'contracts')); + + expect(contractsOutputs).toContain('index.ts'); + expect(contractsOutputs).toContain('AbiContract.ts'); + expect(contractsOutputs).toContain('AbiContractTypes.ts'); + expect(contractsOutputs).toContain('AbiContract-abi.ts'); + expect(contractsOutputs).toContain('AbiContract-storage-slots.ts'); + expect(contractsOutputs).not.toContain('AbiContractFactory.ts'); + expect(contractsOutputs).not.toContain('AbiContract-bytecode.ts'); + }); + + test('throws when missing bytecode for script', async () => { + const { buildDir, name } = getAbiForcProject(AbiProjectsEnum.ABI_SCRIPT); + using tmpDir = generateTmpDir(buildDir); + + rmSync(join(tmpDir.path, `${name}.bin`)); + + await expectToThrowFuelError( + () => + runTypegen({ + inputs: [tmpDir.path], + output: tmpDir.path, + }), + new FuelError( + FuelError.CODES.BIN_FILE_NOT_FOUND, + `For scripts, the bytecode is required. No bytecode found for script at ${tmpDir.path}.` + ) + ); + }); + + test('throws when missing bytecode for predicate', async () => { + const { buildDir, name } = getAbiForcProject(AbiProjectsEnum.ABI_PREDICATE); + using tmpDir = generateTmpDir(buildDir); + + rmSync(join(tmpDir.path, `${name}.bin`)); + + await expectToThrowFuelError( + () => + runTypegen({ + inputs: [tmpDir.path], + output: tmpDir.path, + }), + new FuelError( + FuelError.CODES.BIN_FILE_NOT_FOUND, + `For predicates, the bytecode is required. No bytecode found for predicate at ${tmpDir.path}.` + ) + ); }); }); diff --git a/packages/fuel-gauge/src/abi/fixtures/common.txt b/packages/fuel-gauge/src/abi/fixtures/common.txt index d381d056e30..68069dcde69 100644 --- a/packages/fuel-gauge/src/abi/fixtures/common.txt +++ b/packages/fuel-gauge/src/abi/fixtures/common.txt @@ -4,8 +4,8 @@ /* eslint-disable */ /* - Fuels version: 0.94.8 - Forc version: 0.64.0 + Fuels version: 0.97.2 + Forc version: 0.66.5 */ diff --git a/packages/fuel-gauge/src/abi/fixtures/contracts/contract-abi.txt b/packages/fuel-gauge/src/abi/fixtures/contracts/contract-abi.txt index 316180f7fe2..22d82bef5e6 100644 --- a/packages/fuel-gauge/src/abi/fixtures/contracts/contract-abi.txt +++ b/packages/fuel-gauge/src/abi/fixtures/contracts/contract-abi.txt @@ -4,8 +4,8 @@ /* eslint-disable */ /* - Fuels version: 0.94.8 - Forc version: 0.64.0 + Fuels version: 0.97.2 + Forc version: 0.66.5 */ diff --git a/packages/fuel-gauge/src/abi/fixtures/contracts/contract-bytecode.txt b/packages/fuel-gauge/src/abi/fixtures/contracts/contract-bytecode.txt index c62f31cde79..49c458789d2 100644 --- a/packages/fuel-gauge/src/abi/fixtures/contracts/contract-bytecode.txt +++ b/packages/fuel-gauge/src/abi/fixtures/contracts/contract-bytecode.txt @@ -4,8 +4,8 @@ /* eslint-disable */ /* - Fuels version: 0.94.8 - Forc version: 0.64.0 + Fuels version: 0.97.2 + Forc version: 0.66.5 */ diff --git a/packages/fuel-gauge/src/abi/fixtures/contracts/contract-factory.txt b/packages/fuel-gauge/src/abi/fixtures/contracts/contract-factory.txt index a6d514737c1..14f428d70cf 100644 --- a/packages/fuel-gauge/src/abi/fixtures/contracts/contract-factory.txt +++ b/packages/fuel-gauge/src/abi/fixtures/contracts/contract-factory.txt @@ -4,8 +4,8 @@ /* eslint-disable */ /* - Fuels version: 0.94.8 - Forc version: 0.64.0 + Fuels version: 0.97.2 + Forc version: 0.66.5 */ diff --git a/packages/fuel-gauge/src/abi/fixtures/contracts/contract-index.txt b/packages/fuel-gauge/src/abi/fixtures/contracts/contract-index.txt index e245c6ade81..2170601c27c 100644 --- a/packages/fuel-gauge/src/abi/fixtures/contracts/contract-index.txt +++ b/packages/fuel-gauge/src/abi/fixtures/contracts/contract-index.txt @@ -4,8 +4,8 @@ /* eslint-disable */ /* - Fuels version: 0.94.8 - Forc version: 0.64.0 + Fuels version: 0.97.2 + Forc version: 0.66.5 */ diff --git a/packages/fuel-gauge/src/abi/fixtures/contracts/contract-storage-slots.txt b/packages/fuel-gauge/src/abi/fixtures/contracts/contract-storage-slots.txt index 30fcd6402c3..3fc62c7120e 100644 --- a/packages/fuel-gauge/src/abi/fixtures/contracts/contract-storage-slots.txt +++ b/packages/fuel-gauge/src/abi/fixtures/contracts/contract-storage-slots.txt @@ -4,8 +4,8 @@ /* eslint-disable */ /* - Fuels version: 0.94.8 - Forc version: 0.64.0 + Fuels version: 0.97.2 + Forc version: 0.66.5 */ diff --git a/packages/fuel-gauge/src/abi/fixtures/contracts/contract-types.txt b/packages/fuel-gauge/src/abi/fixtures/contracts/contract-types.txt index 0f8baa53276..2d061293f5b 100644 --- a/packages/fuel-gauge/src/abi/fixtures/contracts/contract-types.txt +++ b/packages/fuel-gauge/src/abi/fixtures/contracts/contract-types.txt @@ -4,8 +4,8 @@ /* eslint-disable */ /* - Fuels version: 0.94.8 - Forc version: 0.64.0 + Fuels version: 0.97.2 + Forc version: 0.66.5 */ diff --git a/packages/fuel-gauge/src/abi/fixtures/contracts/contract.txt b/packages/fuel-gauge/src/abi/fixtures/contracts/contract.txt index 6c59cea9de3..700995bbe17 100644 --- a/packages/fuel-gauge/src/abi/fixtures/contracts/contract.txt +++ b/packages/fuel-gauge/src/abi/fixtures/contracts/contract.txt @@ -4,8 +4,8 @@ /* eslint-disable */ /* - Fuels version: 0.94.8 - Forc version: 0.64.0 + Fuels version: 0.97.2 + Forc version: 0.66.5 */ diff --git a/packages/fuel-gauge/src/abi/fixtures/index.txt b/packages/fuel-gauge/src/abi/fixtures/index.txt index e1de8a583ec..239de1f8832 100644 --- a/packages/fuel-gauge/src/abi/fixtures/index.txt +++ b/packages/fuel-gauge/src/abi/fixtures/index.txt @@ -4,8 +4,8 @@ /* eslint-disable */ /* - Fuels version: 0.94.8 - Forc version: 0.64.0 + Fuels version: 0.97.2 + Forc version: 0.66.5 */ diff --git a/packages/fuel-gauge/src/abi/fixtures/predicates/predicate-abi.txt b/packages/fuel-gauge/src/abi/fixtures/predicates/predicate-abi.txt index 227b7ab63a8..ba3776b5838 100644 --- a/packages/fuel-gauge/src/abi/fixtures/predicates/predicate-abi.txt +++ b/packages/fuel-gauge/src/abi/fixtures/predicates/predicate-abi.txt @@ -4,8 +4,8 @@ /* eslint-disable */ /* - Fuels version: 0.94.8 - Forc version: 0.64.0 + Fuels version: 0.97.2 + Forc version: 0.66.5 */ diff --git a/packages/fuel-gauge/src/abi/fixtures/predicates/predicate-index.txt b/packages/fuel-gauge/src/abi/fixtures/predicates/predicate-index.txt index 68281d5ac1d..22acbb72a48 100644 --- a/packages/fuel-gauge/src/abi/fixtures/predicates/predicate-index.txt +++ b/packages/fuel-gauge/src/abi/fixtures/predicates/predicate-index.txt @@ -4,8 +4,8 @@ /* eslint-disable */ /* - Fuels version: 0.94.8 - Forc version: 0.64.0 + Fuels version: 0.97.2 + Forc version: 0.66.5 */ diff --git a/packages/fuel-gauge/src/abi/fixtures/predicates/predicate-types.txt b/packages/fuel-gauge/src/abi/fixtures/predicates/predicate-types.txt index 72b3230e521..9110639f116 100644 --- a/packages/fuel-gauge/src/abi/fixtures/predicates/predicate-types.txt +++ b/packages/fuel-gauge/src/abi/fixtures/predicates/predicate-types.txt @@ -4,8 +4,8 @@ /* eslint-disable */ /* - Fuels version: 0.94.8 - Forc version: 0.64.0 + Fuels version: 0.97.2 + Forc version: 0.66.5 */ diff --git a/packages/fuel-gauge/src/abi/fixtures/predicates/predicate.txt b/packages/fuel-gauge/src/abi/fixtures/predicates/predicate.txt index e791373ad64..20ef591eb2a 100644 --- a/packages/fuel-gauge/src/abi/fixtures/predicates/predicate.txt +++ b/packages/fuel-gauge/src/abi/fixtures/predicates/predicate.txt @@ -4,8 +4,8 @@ /* eslint-disable */ /* - Fuels version: 0.94.8 - Forc version: 0.64.0 + Fuels version: 0.97.2 + Forc version: 0.66.5 */ diff --git a/packages/fuel-gauge/src/abi/fixtures/scripts/script-abi.txt b/packages/fuel-gauge/src/abi/fixtures/scripts/script-abi.txt index 6387bfcb5bb..0b07cbd63ad 100644 --- a/packages/fuel-gauge/src/abi/fixtures/scripts/script-abi.txt +++ b/packages/fuel-gauge/src/abi/fixtures/scripts/script-abi.txt @@ -4,8 +4,8 @@ /* eslint-disable */ /* - Fuels version: 0.94.8 - Forc version: 0.64.0 + Fuels version: 0.97.2 + Forc version: 0.66.5 */ diff --git a/packages/fuel-gauge/src/abi/fixtures/scripts/script-index.txt b/packages/fuel-gauge/src/abi/fixtures/scripts/script-index.txt index 4ff9d0d2d23..0ee8ca76857 100644 --- a/packages/fuel-gauge/src/abi/fixtures/scripts/script-index.txt +++ b/packages/fuel-gauge/src/abi/fixtures/scripts/script-index.txt @@ -4,8 +4,8 @@ /* eslint-disable */ /* - Fuels version: 0.94.8 - Forc version: 0.64.0 + Fuels version: 0.97.2 + Forc version: 0.66.5 */ diff --git a/packages/fuel-gauge/src/abi/fixtures/scripts/script-types.txt b/packages/fuel-gauge/src/abi/fixtures/scripts/script-types.txt index f4b6788bedb..fcfe3423f41 100644 --- a/packages/fuel-gauge/src/abi/fixtures/scripts/script-types.txt +++ b/packages/fuel-gauge/src/abi/fixtures/scripts/script-types.txt @@ -4,8 +4,8 @@ /* eslint-disable */ /* - Fuels version: 0.94.8 - Forc version: 0.64.0 + Fuels version: 0.97.2 + Forc version: 0.66.5 */ diff --git a/packages/fuel-gauge/src/abi/fixtures/scripts/script.txt b/packages/fuel-gauge/src/abi/fixtures/scripts/script.txt index a958f66d36b..3367b27a3b9 100644 --- a/packages/fuel-gauge/src/abi/fixtures/scripts/script.txt +++ b/packages/fuel-gauge/src/abi/fixtures/scripts/script.txt @@ -4,8 +4,8 @@ /* eslint-disable */ /* - Fuels version: 0.94.8 - Forc version: 0.64.0 + Fuels version: 0.97.2 + Forc version: 0.66.5 */ diff --git a/packages/fuels/package.json b/packages/fuels/package.json index 755448f62c8..2b5de646751 100644 --- a/packages/fuels/package.json +++ b/packages/fuels/package.json @@ -42,8 +42,8 @@ "test-utils": [ "./dist/test-utils.d.ts" ], - "cli-utils": [ - "./dist/cli-utils.d.ts" + "./cli-utils": [ + "/dist/cli-utils.d.ts" ] } }, @@ -55,12 +55,10 @@ "build:package": "tsup", "build:browser": "pnpm vite build", "build:minified": "pnpm uglifyjs --compress --mangle --output dist/browser.min.mjs -- dist/browser.mjs", - "postbuild": "run-s build:recipes type:declarations", - "build:recipes": "cd ../recipes && pnpm build:all && cd ../fuels", + "postbuild": "run-s type:declarations", "type:declarations": "tsc --emitDeclarationOnly -p tsconfig.dts.json", "type:check": "tsc --noEmit", - "prepublishOnly": "cp ../../README.md ./README.md", - "pretest": "pnpm fuels build --path $PWD/test/fixtures --deploy" + "prepublishOnly": "cp ../../README.md ./README.md" }, "license": "Apache-2.0", "dependencies": { diff --git a/packages/fuels/src/cli-utils.ts b/packages/fuels/src/cli-utils.ts index 29bcaba4559..c34747c1079 100644 --- a/packages/fuels/src/cli-utils.ts +++ b/packages/fuels/src/cli-utils.ts @@ -1,2 +1 @@ export * from '@fuel-ts/utils/cli-utils'; -export { getProgramDetails } from './cli/commands/typegen/utils'; diff --git a/packages/fuels/src/cli.ts b/packages/fuels/src/cli.ts index d1421ce75a2..301e27856d7 100644 --- a/packages/fuels/src/cli.ts +++ b/packages/fuels/src/cli.ts @@ -1,3 +1,4 @@ +import { configureTypegenCliOptions } from '@fuel-ts/abi/cli'; import { versions } from '@fuel-ts/versions'; import { runVersions } from '@fuel-ts/versions/cli'; import { Command, Option } from 'commander'; @@ -7,7 +8,6 @@ import { deploy } from './cli/commands/deploy'; import { dev } from './cli/commands/dev'; import { init } from './cli/commands/init'; import { node } from './cli/commands/node'; -import { typegen } from './cli/commands/typegen'; import { withBinaryPaths } from './cli/commands/withBinaryPaths'; import { withConfig } from './cli/commands/withConfig'; import { withProgram } from './cli/commands/withProgram'; @@ -89,12 +89,7 @@ export const configureCli = () => { /** * Routing external commands from sub-packages' CLIs */ - - (command = program.command(Commands.typegen)) - .description(`Generate Typescript from Sway ABI JSON files`) - .requiredOption('-i, --inputs ', 'Input paths/globals to your ABI JSON files') - .requiredOption('-o, --output ', 'Directory path for generated files') - .action(withProgram(command, Commands.typegen, typegen)); + command = configureTypegenCliOptions(program.command(Commands.typegen)); // Versions (command = program.command('versions')) diff --git a/packages/fuels/src/cli/commands/build/index.test.ts b/packages/fuels/src/cli/commands/build/index.test.ts index 39e89a63559..4deed12d989 100644 --- a/packages/fuels/src/cli/commands/build/index.test.ts +++ b/packages/fuels/src/cli/commands/build/index.test.ts @@ -1,6 +1,6 @@ import { fuelsConfig } from '../../../../test/fixtures/fuels.config'; import { mockLogger } from '../../../../test/utils/mockLogger'; -import * as generateTypesMod from '../typegen/index'; +import * as generateTypesMod from '../generate-types'; import { build } from '.'; import * as buildSwayProgramsMod from './buildSwayPrograms'; diff --git a/packages/fuels/src/cli/commands/build/index.ts b/packages/fuels/src/cli/commands/build/index.ts index 2d1f8dd9d38..88c77a21bc4 100644 --- a/packages/fuels/src/cli/commands/build/index.ts +++ b/packages/fuels/src/cli/commands/build/index.ts @@ -4,7 +4,7 @@ import type { FuelsConfig } from '../../types'; import { log } from '../../utils/logger'; import { deploy } from '../deploy'; import { autoStartFuelCore } from '../dev/autoStartFuelCore'; -import { generateTypes } from '../typegen'; +import { generateTypes } from '../generate-types'; import { buildSwayPrograms } from './buildSwayPrograms'; diff --git a/packages/fuels/src/cli/commands/deploy/index.ts b/packages/fuels/src/cli/commands/deploy/index.ts index 79a91270c44..c223b7b5488 100644 --- a/packages/fuels/src/cli/commands/deploy/index.ts +++ b/packages/fuels/src/cli/commands/deploy/index.ts @@ -1,5 +1,5 @@ import type { FuelsConfig } from '../../types'; -import { generateTypes } from '../typegen'; +import { generateTypes } from '../generate-types'; import { deployContracts } from './deployContracts'; import { deployPredicates } from './deployPredicates'; diff --git a/packages/fuels/src/cli/commands/generate-types.ts b/packages/fuels/src/cli/commands/generate-types.ts new file mode 100644 index 00000000000..ac992252b67 --- /dev/null +++ b/packages/fuels/src/cli/commands/generate-types.ts @@ -0,0 +1,16 @@ +import { runTypegen } from '@fuel-ts/abi/cli'; + +import type { FuelsConfig } from '../types'; + +export function generateTypes(config: FuelsConfig) { + const { contracts, scripts, predicates, output } = config; + + const loaderPaths = scripts.concat(predicates).map((path) => `${path}/out`); + + const paths = contracts + .concat(scripts, predicates) + .map((path) => `${path}/out/${config.buildMode}`) + .concat(loaderPaths); + + runTypegen({ inputs: paths, output }); +} diff --git a/packages/fuels/src/cli/commands/typegen/index.ts b/packages/fuels/src/cli/commands/typegen/index.ts deleted file mode 100644 index 99aacca53f1..00000000000 --- a/packages/fuels/src/cli/commands/typegen/index.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { AbiGen } from '@fuel-ts/abi'; -import { getBinaryVersions } from '@fuel-ts/versions/cli'; -import type { Command } from 'commander'; -import { mkdirSync, writeFileSync } from 'fs'; -import { join } from 'path'; - -import type { FuelsConfig } from '../../types'; -import { debug } from '../../utils/logger'; - -import { getProgramDetails } from './utils'; - -interface RunTypegen { - inputs: string[]; - output: string; -} - -function runFuelsTypegen(options: RunTypegen) { - const { inputs, output } = options; - - const programDetails = getProgramDetails(inputs); - - const results = AbiGen.generate({ programDetails, versions: getBinaryVersions() }); - - mkdirSync(output, { recursive: true }); - - const subDirectories = new Set(); - - results.forEach((r) => { - const dir = r.filename.split('/').slice(0, -1).join('/'); - if (dir !== '') { - subDirectories.add(dir); - } - }); - - subDirectories.forEach((dir) => { - mkdirSync(join(output, dir), { recursive: true }); - }); - - results.forEach((r) => { - const outputPath = join(output, r.filename); - writeFileSync(outputPath, r.content); - }); -} - -export function typegen(program: Command) { - const options = program.opts(); - const { inputs, output } = options; - - runFuelsTypegen({ inputs, output }); -} - -export function generateTypes(config: FuelsConfig) { - debug('Generating types...'); - - const { contracts, scripts, predicates, output } = config; - - const loaderPaths = scripts.concat(predicates).map((path) => `${path}/out`); - - const paths = contracts - .concat(scripts, predicates) - .map((path) => `${path}/out/${config.buildMode}`) - .concat(loaderPaths); - - runFuelsTypegen({ inputs: paths, output }); -} diff --git a/packages/fuels/src/cli/commands/typegen/utils.test.ts b/packages/fuels/src/cli/commands/typegen/utils.test.ts deleted file mode 100644 index 47743165d8d..00000000000 --- a/packages/fuels/src/cli/commands/typegen/utils.test.ts +++ /dev/null @@ -1,133 +0,0 @@ -import { randomUUID } from '@fuel-ts/crypto'; -import { ErrorCode, FuelError } from '@fuel-ts/errors'; -import { expectToThrowFuelError } from '@fuel-ts/errors/test-utils'; -import { globSync } from 'glob'; -import { cpSync, mkdirSync, rmdirSync, rmSync } from 'node:fs'; -import path from 'node:path'; - -import { getProgramDetails, normalizeProjectName } from './utils'; - -/** - * @group node - */ -describe('normalizeProjectName', () => { - test('should normalize project name', () => { - expect(normalizeProjectName('DsToken')).toEqual('DsToken'); - expect(normalizeProjectName('test')).toEqual('Test'); - expect(normalizeProjectName('ds-token')).toEqual('DsToken'); - expect(normalizeProjectName('ds_token')).toEqual('DsToken'); - expect(normalizeProjectName('Aaa_bbb_CCDD-EEE')).toEqual('AaaBbbCCDDEEE'); - expect(normalizeProjectName('ds token')).toEqual('DsToken'); - expect(normalizeProjectName('name.abi')).toEqual('NameAbi'); - expect(normalizeProjectName('1234name.abi')).toEqual('NameAbi'); - expect(normalizeProjectName('ERC20.abi')).toEqual('ERC20Abi'); - expect(normalizeProjectName('my-contract')).toEqual('MyContract'); - expect(normalizeProjectName('my contract')).toEqual('MyContract'); - expect(normalizeProjectName('my.contract')).toEqual('MyContract'); - expect(normalizeProjectName('still-my.contract')).toEqual('StillMyContract'); - expect(normalizeProjectName('also my.contract')).toEqual('AlsoMyContract'); - }); - - test('throws if name cannot be normalized', async () => { - await expectToThrowFuelError( - () => normalizeProjectName(''), - new FuelError( - ErrorCode.PARSE_FAILED, - `The provided string '' results in an empty output after`.concat( - ` normalization, therefore, it can't normalize string.` - ) - ) - ); - }); -}); - -function getUniqueBuildOutputs(buildOutputsPath: string) { - const uniquePath = path.join(buildOutputsPath, '../', randomUUID()); - - mkdirSync(uniquePath, { recursive: true }); - - cpSync(buildOutputsPath, uniquePath, { recursive: true }); - - return { - path: uniquePath, - [Symbol.dispose]: () => { - rmdirSync(uniquePath, { recursive: true }); - }, - }; -} -/** - * @group node - */ -describe('getProgramDetails', () => { - const workspacePath = path.join(process.cwd(), 'packages/fuels/test/fixtures/workspace'); - const buildOutputs = { - predicate: path.join(workspacePath, 'predicates/predicate/out/release'), - script: path.join(workspacePath, 'scripts/script/out/release'), - contract: path.join(workspacePath, 'contracts/bar/out/release'), - }; - test('works with valid folder', () => { - const result = getProgramDetails([buildOutputs.predicate]); - - expect(result).toHaveLength(1); - }); - test('works with valid abi json file as path', () => { - const result = getProgramDetails([ - path.join(buildOutputs.predicate, 'predicate-true-abi.json'), - ]); - - expect(result).toHaveLength(1); - }); - - test('throws if no abi json file found', async () => { - using predicateOutputs = getUniqueBuildOutputs(buildOutputs.predicate); - const abiJsonFile = globSync(`${predicateOutputs.path}/*-abi.json`)[0]; - rmSync(abiJsonFile); - - await expectToThrowFuelError( - () => getProgramDetails([predicateOutputs.path]), - new FuelError(ErrorCode.NO_ABIS_FOUND, `No abi file found in ${predicateOutputs.path}`) - ); - }); - - test('throws when missing bytecode for predicate', async () => { - using predicateOutputs = getUniqueBuildOutputs(buildOutputs.predicate); - const binFile = globSync(`${predicateOutputs.path}/*.bin`)[0]; - rmSync(binFile); - - await expectToThrowFuelError( - () => getProgramDetails([predicateOutputs.path]), - new FuelError( - ErrorCode.BIN_FILE_NOT_FOUND, - `For predicates, the bytecode is required. No bytecode found for predicate at ${predicateOutputs.path}.` - ) - ); - }); - - test('throws when missing bytecode for script', async () => { - using scriptOutputs = getUniqueBuildOutputs(buildOutputs.script); - const binFile = globSync(`${scriptOutputs.path}/*.bin`)[0]; - rmSync(binFile); - await expectToThrowFuelError( - () => getProgramDetails([scriptOutputs.path]), - new FuelError( - ErrorCode.BIN_FILE_NOT_FOUND, - `For scripts, the bytecode is required. No bytecode found for script at ${scriptOutputs.path}.` - ) - ); - }); - - test('logs when missing bytecode for contract', () => { - using contractOutputs = getUniqueBuildOutputs(buildOutputs.contract); - const binFile = globSync(`${contractOutputs.path}/*.bin`)[0]; - rmSync(binFile); - - const spy = vi.spyOn(console, 'log').mockImplementationOnce(() => {}); - const result = getProgramDetails([contractOutputs.path]); - - expect(spy).toHaveBeenCalledWith( - `No bytecode found for contract at ${contractOutputs.path}, will not generate ContractFactory for it.` - ); - - expect(result).toHaveLength(1); - }); -}); diff --git a/packages/recipes/package.json b/packages/recipes/package.json index 05218f8f2d3..7e1dc41b943 100644 --- a/packages/recipes/package.json +++ b/packages/recipes/package.json @@ -20,14 +20,15 @@ "dist" ], "scripts": { - "build:all": "run-s build:recipes build build:format", + "build": "run-s build:recipes build:package build:format", "build:recipes": "tsx ./scripts/build-recipes.ts", - "build": "tsup", + "build:package": "tsup", "build:format": "prettier --config ../../.prettierrc --log-level error --write .", "postbuild": "tsx ../../scripts/postbuild.ts" }, "license": "Apache-2.0", "dependencies": { + "@fuel-ts/abi": "workspace:*", "@fuel-ts/abi-coder": "workspace:*", "@fuel-ts/abi-typegen": "workspace:*", "@fuel-ts/account": "workspace:*", diff --git a/packages/recipes/scripts/build-recipes.ts b/packages/recipes/scripts/build-recipes.ts index 702a5eaf0b8..343eaa0af7d 100644 --- a/packages/recipes/scripts/build-recipes.ts +++ b/packages/recipes/scripts/build-recipes.ts @@ -2,7 +2,7 @@ import { execSync } from 'child_process'; import { readFileSync, writeFileSync } from 'fs'; import { join } from 'path'; -execSync(`node ../fuels/dist/bin.js typegen -i src/contracts/src14 -o src/types`); +execSync(`fuels-typegen -i src/contracts/src14 -o src/types`); const typesPath = join(__dirname, '..', 'src', 'types'); const supportedRecipes = ['Src14OwnedProxy'] diff --git a/packages/recipes/src/types/Src14OwnedProxy.ts b/packages/recipes/src/types/Src14OwnedProxy.ts new file mode 100644 index 00000000000..aab3c9532ae --- /dev/null +++ b/packages/recipes/src/types/Src14OwnedProxy.ts @@ -0,0 +1,685 @@ +/* Autogenerated file. Do not edit manually. */ + +/* eslint-disable max-classes-per-file */ +/* eslint-disable @typescript-eslint/no-unused-vars */ +/* eslint-disable @typescript-eslint/consistent-type-imports */ + +/* + Fuels version: 0.97.2 +*/ + +import { Contract, type InvokeFunction } from '@fuel-ts/program'; +import { Interface, type FunctionFragment } from '@fuel-ts/abi-coder'; +import { type Provider, type Account } from '@fuel-ts/account'; +import { type StorageSlot } from '@fuel-ts/transactions'; +import { type AbstractAddress, type StrSlice } from '@fuel-ts/interfaces'; +import type { Option, Enum } from './common'; + +export enum AccessErrorInput { + NotOwner = 'NotOwner', +} +export enum AccessErrorOutput { + NotOwner = 'NotOwner', +} +export type IdentityInput = Enum<{ Address: AddressInput; ContractId: ContractIdInput }>; +export type IdentityOutput = Enum<{ Address: AddressOutput; ContractId: ContractIdOutput }>; +export enum InitializationErrorInput { + CannotReinitialized = 'CannotReinitialized', +} +export enum InitializationErrorOutput { + CannotReinitialized = 'CannotReinitialized', +} +export enum SetProxyOwnerErrorInput { + CannotUninitialize = 'CannotUninitialize', +} +export enum SetProxyOwnerErrorOutput { + CannotUninitialize = 'CannotUninitialize', +} +export type StateInput = Enum<{ + Uninitialized: undefined; + Initialized: IdentityInput; + Revoked: undefined; +}>; +export type StateOutput = Enum<{ Uninitialized: void; Initialized: IdentityOutput; Revoked: void }>; + +export type AddressInput = { bits: string }; +export type AddressOutput = AddressInput; +export type ContractIdInput = { bits: string }; +export type ContractIdOutput = ContractIdInput; +export type ProxyOwnerSetInput = { new_proxy_owner: StateInput }; +export type ProxyOwnerSetOutput = { new_proxy_owner: StateOutput }; +export type ProxyTargetSetInput = { new_target: ContractIdInput }; +export type ProxyTargetSetOutput = { new_target: ContractIdOutput }; + +export type Src14OwnedProxyConfigurables = Partial<{ + INITIAL_TARGET: Option; + INITIAL_OWNER: StateInput; +}>; + +const abi = { + programType: 'contract', + specVersion: '1', + encodingVersion: '1', + concreteTypes: [ + { + type: '()', + concreteTypeId: '2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d', + }, + { + type: 'enum standards::src5::AccessError', + concreteTypeId: '3f702ea3351c9c1ece2b84048006c8034a24cbc2bad2e740d0412b4172951d3d', + metadataTypeId: 1, + }, + { + type: 'enum standards::src5::State', + concreteTypeId: '192bc7098e2fe60635a9918afb563e4e5419d386da2bdbf0d716b4bc8549802c', + metadataTypeId: 2, + }, + { + type: 'enum std::option::Option', + concreteTypeId: '0d79387ad3bacdc3b7aad9da3a96f4ce60d9a1b6002df254069ad95a3931d5c8', + metadataTypeId: 4, + typeArguments: ['29c10735d33b5159f0c71ee1dbd17b36a3e69e41f00fab0d42e1bd9f428d8a54'], + }, + { + type: 'enum sway_libs::ownership::errors::InitializationError', + concreteTypeId: '1dfe7feadc1d9667a4351761230f948744068a090fe91b1bc6763a90ed5d3893', + metadataTypeId: 5, + }, + { + type: 'enum sway_libs::upgradability::errors::SetProxyOwnerError', + concreteTypeId: '3c6e90ae504df6aad8b34a93ba77dc62623e00b777eecacfa034a8ac6e890c74', + metadataTypeId: 6, + }, + { + type: 'str', + concreteTypeId: '8c25cb3686462e9a86d2883c5688a22fe738b0bbc85f458d2d2b5f3f667c6d5a', + }, + { + type: 'struct std::contract_id::ContractId', + concreteTypeId: '29c10735d33b5159f0c71ee1dbd17b36a3e69e41f00fab0d42e1bd9f428d8a54', + metadataTypeId: 9, + }, + { + type: 'struct sway_libs::upgradability::events::ProxyOwnerSet', + concreteTypeId: '96dd838b44f99d8ccae2a7948137ab6256c48ca4abc6168abc880de07fba7247', + metadataTypeId: 10, + }, + { + type: 'struct sway_libs::upgradability::events::ProxyTargetSet', + concreteTypeId: '1ddc0adda1270a016c08ffd614f29f599b4725407c8954c8b960bdf651a9a6c8', + metadataTypeId: 11, + }, + ], + metadataTypes: [ + { + type: 'b256', + metadataTypeId: 0, + }, + { + type: 'enum standards::src5::AccessError', + metadataTypeId: 1, + components: [ + { + name: 'NotOwner', + typeId: '2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d', + }, + ], + }, + { + type: 'enum standards::src5::State', + metadataTypeId: 2, + components: [ + { + name: 'Uninitialized', + typeId: '2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d', + }, + { + name: 'Initialized', + typeId: 3, + }, + { + name: 'Revoked', + typeId: '2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d', + }, + ], + }, + { + type: 'enum std::identity::Identity', + metadataTypeId: 3, + components: [ + { + name: 'Address', + typeId: 8, + }, + { + name: 'ContractId', + typeId: 9, + }, + ], + }, + { + type: 'enum std::option::Option', + metadataTypeId: 4, + components: [ + { + name: 'None', + typeId: '2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d', + }, + { + name: 'Some', + typeId: 7, + }, + ], + typeParameters: [7], + }, + { + type: 'enum sway_libs::ownership::errors::InitializationError', + metadataTypeId: 5, + components: [ + { + name: 'CannotReinitialized', + typeId: '2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d', + }, + ], + }, + { + type: 'enum sway_libs::upgradability::errors::SetProxyOwnerError', + metadataTypeId: 6, + components: [ + { + name: 'CannotUninitialize', + typeId: '2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d', + }, + ], + }, + { + type: 'generic T', + metadataTypeId: 7, + }, + { + type: 'struct std::address::Address', + metadataTypeId: 8, + components: [ + { + name: 'bits', + typeId: 0, + }, + ], + }, + { + type: 'struct std::contract_id::ContractId', + metadataTypeId: 9, + components: [ + { + name: 'bits', + typeId: 0, + }, + ], + }, + { + type: 'struct sway_libs::upgradability::events::ProxyOwnerSet', + metadataTypeId: 10, + components: [ + { + name: 'new_proxy_owner', + typeId: 2, + }, + ], + }, + { + type: 'struct sway_libs::upgradability::events::ProxyTargetSet', + metadataTypeId: 11, + components: [ + { + name: 'new_target', + typeId: 9, + }, + ], + }, + ], + functions: [ + { + inputs: [], + name: 'proxy_target', + output: '0d79387ad3bacdc3b7aad9da3a96f4ce60d9a1b6002df254069ad95a3931d5c8', + attributes: [ + { + name: 'doc-comment', + arguments: [' Returns the target contract of the proxy contract.'], + }, + { + name: 'doc-comment', + arguments: [''], + }, + { + name: 'doc-comment', + arguments: [' # Returns'], + }, + { + name: 'doc-comment', + arguments: [''], + }, + { + name: 'doc-comment', + arguments: [ + ' * [Option] - The new proxy contract to which all fallback calls will be passed or `None`.', + ], + }, + { + name: 'doc-comment', + arguments: [''], + }, + { + name: 'doc-comment', + arguments: [' # Number of Storage Accesses'], + }, + { + name: 'doc-comment', + arguments: [''], + }, + { + name: 'doc-comment', + arguments: [' * Reads: `1`'], + }, + { + name: 'storage', + arguments: ['read'], + }, + ], + }, + { + inputs: [ + { + name: 'new_target', + concreteTypeId: '29c10735d33b5159f0c71ee1dbd17b36a3e69e41f00fab0d42e1bd9f428d8a54', + }, + ], + name: 'set_proxy_target', + output: '2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d', + attributes: [ + { + name: 'doc-comment', + arguments: [' Change the target contract of the proxy contract.'], + }, + { + name: 'doc-comment', + arguments: [''], + }, + { + name: 'doc-comment', + arguments: [' # Additional Information'], + }, + { + name: 'doc-comment', + arguments: [''], + }, + { + name: 'doc-comment', + arguments: [' This method can only be called by the `proxy_owner`.'], + }, + { + name: 'doc-comment', + arguments: [''], + }, + { + name: 'doc-comment', + arguments: [' # Arguments'], + }, + { + name: 'doc-comment', + arguments: [''], + }, + { + name: 'doc-comment', + arguments: [ + ' * `new_target`: [ContractId] - The new proxy contract to which all fallback calls will be passed.', + ], + }, + { + name: 'doc-comment', + arguments: [''], + }, + { + name: 'doc-comment', + arguments: [' # Reverts'], + }, + { + name: 'doc-comment', + arguments: [''], + }, + { + name: 'doc-comment', + arguments: [' * When not called by `proxy_owner`.'], + }, + { + name: 'doc-comment', + arguments: [''], + }, + { + name: 'doc-comment', + arguments: [' # Number of Storage Accesses'], + }, + { + name: 'doc-comment', + arguments: [''], + }, + { + name: 'doc-comment', + arguments: [' * Reads: `1`'], + }, + { + name: 'doc-comment', + arguments: [' * Write: `1`'], + }, + { + name: 'storage', + arguments: ['read', 'write'], + }, + ], + }, + { + inputs: [], + name: 'proxy_owner', + output: '192bc7098e2fe60635a9918afb563e4e5419d386da2bdbf0d716b4bc8549802c', + attributes: [ + { + name: 'doc-comment', + arguments: [' Returns the owner of the proxy contract.'], + }, + { + name: 'doc-comment', + arguments: [''], + }, + { + name: 'doc-comment', + arguments: [' # Returns'], + }, + { + name: 'doc-comment', + arguments: [''], + }, + { + name: 'doc-comment', + arguments: [' * [State] - Represents the state of ownership for this contract.'], + }, + { + name: 'doc-comment', + arguments: [''], + }, + { + name: 'doc-comment', + arguments: [' # Number of Storage Accesses'], + }, + { + name: 'doc-comment', + arguments: [''], + }, + { + name: 'doc-comment', + arguments: [' * Reads: `1`'], + }, + { + name: 'storage', + arguments: ['read'], + }, + ], + }, + { + inputs: [], + name: 'initialize_proxy', + output: '2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d', + attributes: [ + { + name: 'doc-comment', + arguments: [' Initializes the proxy contract.'], + }, + { + name: 'doc-comment', + arguments: [''], + }, + { + name: 'doc-comment', + arguments: [' # Additional Information'], + }, + { + name: 'doc-comment', + arguments: [''], + }, + { + name: 'doc-comment', + arguments: [ + ' This method sets the storage values using the values of the configurable constants `INITIAL_TARGET` and `INITIAL_OWNER`.', + ], + }, + { + name: 'doc-comment', + arguments: [' This then allows methods that write to storage to be called.'], + }, + { + name: 'doc-comment', + arguments: [' This method can only be called once.'], + }, + { + name: 'doc-comment', + arguments: [''], + }, + { + name: 'doc-comment', + arguments: [' # Reverts'], + }, + { + name: 'doc-comment', + arguments: [''], + }, + { + name: 'doc-comment', + arguments: [' * When `storage::SRC14.proxy_owner` is not [State::Uninitialized].'], + }, + { + name: 'doc-comment', + arguments: [''], + }, + { + name: 'doc-comment', + arguments: [' # Number of Storage Accesses'], + }, + { + name: 'doc-comment', + arguments: [''], + }, + { + name: 'doc-comment', + arguments: [' * Writes: `2`'], + }, + { + name: 'storage', + arguments: ['write'], + }, + ], + }, + { + inputs: [ + { + name: 'new_proxy_owner', + concreteTypeId: '192bc7098e2fe60635a9918afb563e4e5419d386da2bdbf0d716b4bc8549802c', + }, + ], + name: 'set_proxy_owner', + output: '2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d', + attributes: [ + { + name: 'doc-comment', + arguments: [' Changes proxy ownership to the passed State.'], + }, + { + name: 'doc-comment', + arguments: [''], + }, + { + name: 'doc-comment', + arguments: [' # Additional Information'], + }, + { + name: 'doc-comment', + arguments: [''], + }, + { + name: 'doc-comment', + arguments: [ + ' This method can be used to transfer ownership between Identities or to revoke ownership.', + ], + }, + { + name: 'doc-comment', + arguments: [''], + }, + { + name: 'doc-comment', + arguments: [' # Arguments'], + }, + { + name: 'doc-comment', + arguments: [''], + }, + { + name: 'doc-comment', + arguments: [' * `new_proxy_owner`: [State] - The new state of the proxy ownership.'], + }, + { + name: 'doc-comment', + arguments: [''], + }, + { + name: 'doc-comment', + arguments: [' # Reverts'], + }, + { + name: 'doc-comment', + arguments: [''], + }, + { + name: 'doc-comment', + arguments: [' * When the sender is not the current proxy owner.'], + }, + { + name: 'doc-comment', + arguments: [' * When the new state of the proxy ownership is [State::Uninitialized].'], + }, + { + name: 'doc-comment', + arguments: [''], + }, + { + name: 'doc-comment', + arguments: [' # Number of Storage Accesses'], + }, + { + name: 'doc-comment', + arguments: [''], + }, + { + name: 'doc-comment', + arguments: [' * Reads: `1`'], + }, + { + name: 'doc-comment', + arguments: [' * Writes: `1`'], + }, + { + name: 'storage', + arguments: ['write'], + }, + ], + }, + ], + loggedTypes: [ + { + logId: '4571204900286667806', + concreteTypeId: '3f702ea3351c9c1ece2b84048006c8034a24cbc2bad2e740d0412b4172951d3d', + }, + { + logId: '2151606668983994881', + concreteTypeId: '1ddc0adda1270a016c08ffd614f29f599b4725407c8954c8b960bdf651a9a6c8', + }, + { + logId: '2161305517876418151', + concreteTypeId: '1dfe7feadc1d9667a4351761230f948744068a090fe91b1bc6763a90ed5d3893', + }, + { + logId: '4354576968059844266', + concreteTypeId: '3c6e90ae504df6aad8b34a93ba77dc62623e00b777eecacfa034a8ac6e890c74', + }, + { + logId: '10870989709723147660', + concreteTypeId: '96dd838b44f99d8ccae2a7948137ab6256c48ca4abc6168abc880de07fba7247', + }, + { + logId: '10098701174489624218', + concreteTypeId: '8c25cb3686462e9a86d2883c5688a22fe738b0bbc85f458d2d2b5f3f667c6d5a', + }, + ], + messagesTypes: [], + configurables: [ + { + name: 'INITIAL_TARGET', + concreteTypeId: '0d79387ad3bacdc3b7aad9da3a96f4ce60d9a1b6002df254069ad95a3931d5c8', + offset: 13368, + }, + { + name: 'INITIAL_OWNER', + concreteTypeId: '192bc7098e2fe60635a9918afb563e4e5419d386da2bdbf0d716b4bc8549802c', + offset: 13320, + }, + ], +}; + +const storageSlots: StorageSlot[] = [ + { + key: '7bb458adc1d118713319a5baa00a2d049dd64d2916477d2688d76970c898cd55', + value: '0000000000000000000000000000000000000000000000000000000000000000', + }, + { + key: '7bb458adc1d118713319a5baa00a2d049dd64d2916477d2688d76970c898cd56', + value: '0000000000000000000000000000000000000000000000000000000000000000', + }, + { + key: 'bb79927b15d9259ea316f2ecb2297d6cc8851888a98278c0a2e03e1a091ea754', + value: '0000000000000000000000000000000000000000000000000000000000000000', + }, + { + key: 'bb79927b15d9259ea316f2ecb2297d6cc8851888a98278c0a2e03e1a091ea755', + value: '0000000000000000000000000000000000000000000000000000000000000000', + }, +]; +export class Src14OwnedProxyInterface extends Interface { + constructor() { + super(abi); + } + + declare functions: { + proxy_target: FunctionFragment; + set_proxy_target: FunctionFragment; + proxy_owner: FunctionFragment; + initialize_proxy: FunctionFragment; + set_proxy_owner: FunctionFragment; + }; +} + +export class Src14OwnedProxy extends Contract { + static readonly abi = abi; + static readonly storageSlots = storageSlots; + + declare interface: Src14OwnedProxyInterface; + declare functions: { + proxy_target: InvokeFunction<[], Option>; + set_proxy_target: InvokeFunction<[new_target: ContractIdInput], void>; + proxy_owner: InvokeFunction<[], StateOutput>; + initialize_proxy: InvokeFunction<[], void>; + set_proxy_owner: InvokeFunction<[new_proxy_owner: StateInput], void>; + }; + + constructor(id: string | AbstractAddress, accountOrProvider: Account | Provider) { + super(id, abi, accountOrProvider); + } +} diff --git a/packages/recipes/src/types/Src14OwnedProxyFactory.ts b/packages/recipes/src/types/Src14OwnedProxyFactory.ts new file mode 100644 index 00000000000..30762b7a0e9 --- /dev/null +++ b/packages/recipes/src/types/Src14OwnedProxyFactory.ts @@ -0,0 +1,31 @@ +/* Autogenerated file. Do not edit manually. */ + +/* eslint-disable max-classes-per-file */ +/* eslint-disable @typescript-eslint/no-unused-vars */ +/* eslint-disable @typescript-eslint/consistent-type-imports */ + +/* + Fuels version: 0.97.2 +*/ + +import { ContractFactory, type DeployContractOptions } from '@fuel-ts/contract'; +import { decompressBytecode } from '@fuel-ts/utils'; +import { type Provider, type Account } from '@fuel-ts/account'; +import { Src14OwnedProxy } from './Src14OwnedProxy'; + +const bytecode = decompressBytecode( + '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' +); + +export class Src14OwnedProxyFactory extends ContractFactory { + static readonly bytecode = bytecode; + + constructor(accountOrProvider: Account | Provider) { + super(bytecode, Src14OwnedProxy.abi, accountOrProvider, Src14OwnedProxy.storageSlots); + } + + static deploy(wallet: Account, options: DeployContractOptions = {}) { + const factory = new Src14OwnedProxyFactory(wallet); + return factory.deploy(options); + } +} diff --git a/packages/recipes/src/types/common.d.ts b/packages/recipes/src/types/common.d.ts new file mode 100644 index 00000000000..ef3dec5e95c --- /dev/null +++ b/packages/recipes/src/types/common.d.ts @@ -0,0 +1,31 @@ +/* Autogenerated file. Do not edit manually. */ + +/* eslint-disable max-classes-per-file */ +/* eslint-disable @typescript-eslint/no-unused-vars */ +/* eslint-disable @typescript-eslint/consistent-type-imports */ + +/* + Fuels version: 0.97.2 +*/ + +/** + * Mimics Sway Enum. + * Requires one and only one Key-Value pair and raises error if more are provided. + */ +export type Enum = { + [K in keyof T]: Pick & { [P in Exclude]?: never }; +}[keyof T]; + +/** + * Mimics Sway Option and Vectors. + * Vectors are treated like arrays in Typescript. + */ +export type Option = T | undefined; + +export type Vec = T[]; + +/** + * Mimics Sway Result enum type. + * Ok represents the success case, while Err represents the error case. + */ +export type Result = Enum<{ Ok: T; Err: E }>; diff --git a/packages/recipes/src/types/contracts/Src14OwnedProxy.ts b/packages/recipes/src/types/contracts/Src14OwnedProxy.ts index 6188241352d..4f9ed736914 100644 --- a/packages/recipes/src/types/contracts/Src14OwnedProxy.ts +++ b/packages/recipes/src/types/contracts/Src14OwnedProxy.ts @@ -18,6 +18,7 @@ import { type Account, type Provider } from '@fuel-ts/account'; import { abi } from './Src14OwnedProxy-abi'; export type Src14OwnedProxyTypes = Types; +export type Src14OwnedProxyConfigurables = Types['configurables']; export class Src14OwnedProxyInterface extends Interface { declare functions: InterfaceFunctionMapper; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5336eabebb8..e0dad7df2fa 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -646,6 +646,12 @@ importers: '@fuel-ts/versions': specifier: workspace:* version: link:../versions + commander: + specifier: ^12.1.0 + version: 12.1.0 + glob: + specifier: ^10.4.5 + version: 10.4.5 handlebars: specifier: ^4.7.8 version: 4.7.8 @@ -929,10 +935,16 @@ importers: packages/fuel-gauge: dependencies: + commander: + specifier: ^12.1.0 + version: 12.1.0 fuels: specifier: workspace:* version: link:../fuels devDependencies: + '@fuel-ts/abi': + specifier: workspace:* + version: link:../abi '@fuel-ts/account': specifier: workspace:* version: link:../account @@ -1154,6 +1166,9 @@ importers: packages/recipes: dependencies: + '@fuel-ts/abi': + specifier: workspace:* + version: link:../abi '@fuel-ts/abi-coder': specifier: workspace:* version: link:../abi-coder @@ -14166,6 +14181,7 @@ packages: sudo-prompt@9.2.1: resolution: {integrity: sha512-Mu7R0g4ig9TUuGSxJavny5Rv0egCEtpZRNMrZaYS1vxkiIxGiGUwoezU3LazIQ+KE04hTrTfNPgxU5gzi7F5Pw==} + deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. summary@2.1.0: resolution: {integrity: sha512-nMIjMrd5Z2nuB2RZCKJfFMjgS3fygbeyGk9PxPPaJR1RIcyN9yn4A63Isovzm3ZtQuEkLBVgMdPup8UeLH7aQw==} From 403e2ca04aacf7623ea94ce07086af89bfd7ed39 Mon Sep 17 00:00:00 2001 From: nedsalk Date: Thu, 26 Dec 2024 13:35:25 +0100 Subject: [PATCH 104/126] cleanup --- .knip.json | 3 +- apps/demo-typegen/package.json | 7 +- apps/demo-typegen/src/demo.test.ts | 7 +- .../guide/fuels-cli/using-generated-types.md | 6 +- .../snippets/custom-transactions.ts | 4 +- packages/abi-typegen/package.json | 1 - packages/abi/src/bin.ts | 2 +- packages/abi/src/gen/cli/run.ts | 2 +- packages/recipes/src/index.ts | 1 - packages/recipes/src/types/Src14OwnedProxy.ts | 685 ------------------ .../src/types/Src14OwnedProxyFactory.ts | 31 - packages/recipes/src/types/common.d.ts | 31 - 12 files changed, 15 insertions(+), 765 deletions(-) delete mode 100644 packages/recipes/src/index.ts delete mode 100644 packages/recipes/src/types/Src14OwnedProxy.ts delete mode 100644 packages/recipes/src/types/Src14OwnedProxyFactory.ts delete mode 100644 packages/recipes/src/types/common.d.ts diff --git a/.knip.json b/.knip.json index 3b39e412a3f..00277f04afe 100644 --- a/.knip.json +++ b/.knip.json @@ -39,6 +39,5 @@ "ts-generator", "webdriverio", "syncpack" - ], - "ignoreBinaries": ["build:all"] + ] } diff --git a/apps/demo-typegen/package.json b/apps/demo-typegen/package.json index d3a83e30ff6..0e296e8f500 100644 --- a/apps/demo-typegen/package.json +++ b/apps/demo-typegen/package.json @@ -4,14 +4,15 @@ "description": "Simple demo using Typegen generated types", "author": "Fuel Labs (https://fuel.network/)", "scripts": { + "pretest": "run-s build:forc build:types", "build:forc": "run-p forc:*", "forc:contract": "pnpm fuels-forc build -p demo-contract --release", "forc:script": "pnpm fuels-forc build -p demo-script --release", "forc:predicate": "pnpm fuels-forc build -p demo-predicate --release", "build:types": "run-p types:*", - "types:contract": "pnpm fuels typegen -i demo-contract/out/release -o src/contract-types", - "types:script": "pnpm fuels typegen -i demo-script/out/release -o src/script-types", - "types:predicate": "pnpm fuels typegen -i demo-predicate/out/release -o src/predicate-types" + "types:contract": "pnpm fuels typegen -i demo-contract/out/release/demo-contract-abi.json -o src/contract-types", + "types:script": "pnpm fuels typegen -i demo-script/out/release/demo-script-abi.json -o src/script-types", + "types:predicate": "pnpm fuels typegen -i demo-predicate/out/release/demo-predicate-abi.json -o src/predicate-types" }, "license": "Apache-2.0", "dependencies": { diff --git a/apps/demo-typegen/src/demo.test.ts b/apps/demo-typegen/src/demo.test.ts index 86d19f112c8..6288d806b9c 100644 --- a/apps/demo-typegen/src/demo.test.ts +++ b/apps/demo-typegen/src/demo.test.ts @@ -4,7 +4,7 @@ import { expectToThrowFuelError, launchTestNode } from 'fuels/test-utils'; import { DemoContract, DemoContractFactory } from './contract-types'; import { DemoPredicate } from './predicate-types'; -import type { DemoPredicateTypes } from './predicate-types'; +import type { DemoPredicateInputs } from './predicate-types/DemoPredicate'; import { DemoScript } from './script-types'; /** @@ -19,12 +19,11 @@ describe('ExampleContract', () => { wallets: [wallet], } = launched; - const storageSlots = DemoContractFactory.storageSlots; // #region typegen-demo-contract-storage-slots // #context import { DemoContractFactory } from './sway-programs-api'; const { waitForResult } = await DemoContractFactory.deploy(wallet, { - storageSlots, + storageSlots: DemoContractFactory.storageSlots, }); const { contract } = await waitForResult(); @@ -162,7 +161,7 @@ test('Example predicate', async () => { const receiver = Wallet.fromAddress(Address.fromRandom(), provider); - const predicateData: DemoPredicateTypes['inputs'] = []; + const predicateData: DemoPredicateInputs = []; const predicate = new DemoPredicate({ provider, data: predicateData, diff --git a/apps/docs/src/guide/fuels-cli/using-generated-types.md b/apps/docs/src/guide/fuels-cli/using-generated-types.md index a5f935690e1..7e38ecf61c3 100644 --- a/apps/docs/src/guide/fuels-cli/using-generated-types.md +++ b/apps/docs/src/guide/fuels-cli/using-generated-types.md @@ -5,7 +5,7 @@ After generating types via: ```console -pnpm fuels typegen -i ./my-contract/out/release -o ./types +pnpm fuels typegen -i ./abis/*-abi.json -o ./types ``` We can use these files like so: @@ -29,7 +29,7 @@ Typegen tries to resolve, auto-load, and embed the [Storage Slots](../contracts/ After generating types via: ```console -pnpm fuels typegen -i ./my-script/out/release -o ./types +pnpm fuels typegen -i ./abis/*-abi.json -o ./types ``` We can use these files like so: @@ -41,7 +41,7 @@ We can use these files like so: After generating types via: ```console -pnpm fuels typegen -i ./my-predicate/out/release -o ./types +pnpm fuels typegen -i ./abis/*-abi.json -o ./types ``` We can use these files like so: diff --git a/apps/docs/src/guide/predicates/snippets/custom-transactions.ts b/apps/docs/src/guide/predicates/snippets/custom-transactions.ts index 35839a1d699..cbf976af3a0 100644 --- a/apps/docs/src/guide/predicates/snippets/custom-transactions.ts +++ b/apps/docs/src/guide/predicates/snippets/custom-transactions.ts @@ -3,7 +3,7 @@ import { Provider, ScriptTransactionRequest, Wallet } from 'fuels'; import { LOCAL_NETWORK_URL, WALLET_PVT_KEY } from '../../../env'; import { ConfigurablePin } from '../../../typegend'; -import type { ConfigurablePinTypes } from '../../../typegend/predicates/ConfigurablePin'; +import type { ConfigurablePinInputs } from '../../../typegend/predicates/ConfigurablePin'; // Setup const provider = await Provider.create(LOCAL_NETWORK_URL); @@ -15,7 +15,7 @@ const amountToReceiver = 100_000; // Instantiate the predicate using valid predicate data, aka the pin we need // to send the funds to the receiver -const data: ConfigurablePinTypes['inputs'] = [1337]; +const data: ConfigurablePinInputs = [1337]; const predicate = new ConfigurablePin({ provider, data }); // Fund the predicate, so that we can send these funds via predicate logic diff --git a/packages/abi-typegen/package.json b/packages/abi-typegen/package.json index f600c63d6b2..a04f23e465b 100644 --- a/packages/abi-typegen/package.json +++ b/packages/abi-typegen/package.json @@ -3,7 +3,6 @@ "version": "0.97.2", "description": "Generates Typescript definitions from Sway ABI Json files", "author": "Fuel Labs (https://fuel.network/)", - "main": "dist/index.js", "module": "dist/index.mjs", "types": "dist/index.d.ts", diff --git a/packages/abi/src/bin.ts b/packages/abi/src/bin.ts index 5fbab5c3c62..4d4c3bed880 100755 --- a/packages/abi/src/bin.ts +++ b/packages/abi/src/bin.ts @@ -8,8 +8,8 @@ const program = new Command(); program.name('fuels-typegen'); program.version(getBinaryVersions().FUELS); program.usage(`-i ../out/*-abi.json -o ./generated/`); - program.option('-S, --silent', 'Omit output messages', false); + configureTypegenCliOptions(program); program.parse(process.argv); diff --git a/packages/abi/src/gen/cli/run.ts b/packages/abi/src/gen/cli/run.ts index e858e08c840..ab87e9c61d4 100644 --- a/packages/abi/src/gen/cli/run.ts +++ b/packages/abi/src/gen/cli/run.ts @@ -45,7 +45,7 @@ export function runTypegen(options: RunTypegenOptions) { export function configureTypegenCliOptions(program: Command) { return program - .description(`Generate Typescript from Sway ABI JSON files`) + .description(`Generate Typescript from forc build outputs`) .requiredOption('-i, --inputs ', 'Input paths/globals to your ABI JSON files') .requiredOption('-o, --output ', 'Directory path for generated files') .action(runTypegen); diff --git a/packages/recipes/src/index.ts b/packages/recipes/src/index.ts deleted file mode 100644 index fcb073fefcd..00000000000 --- a/packages/recipes/src/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './types'; diff --git a/packages/recipes/src/types/Src14OwnedProxy.ts b/packages/recipes/src/types/Src14OwnedProxy.ts deleted file mode 100644 index aab3c9532ae..00000000000 --- a/packages/recipes/src/types/Src14OwnedProxy.ts +++ /dev/null @@ -1,685 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ - -/* eslint-disable max-classes-per-file */ -/* eslint-disable @typescript-eslint/no-unused-vars */ -/* eslint-disable @typescript-eslint/consistent-type-imports */ - -/* - Fuels version: 0.97.2 -*/ - -import { Contract, type InvokeFunction } from '@fuel-ts/program'; -import { Interface, type FunctionFragment } from '@fuel-ts/abi-coder'; -import { type Provider, type Account } from '@fuel-ts/account'; -import { type StorageSlot } from '@fuel-ts/transactions'; -import { type AbstractAddress, type StrSlice } from '@fuel-ts/interfaces'; -import type { Option, Enum } from './common'; - -export enum AccessErrorInput { - NotOwner = 'NotOwner', -} -export enum AccessErrorOutput { - NotOwner = 'NotOwner', -} -export type IdentityInput = Enum<{ Address: AddressInput; ContractId: ContractIdInput }>; -export type IdentityOutput = Enum<{ Address: AddressOutput; ContractId: ContractIdOutput }>; -export enum InitializationErrorInput { - CannotReinitialized = 'CannotReinitialized', -} -export enum InitializationErrorOutput { - CannotReinitialized = 'CannotReinitialized', -} -export enum SetProxyOwnerErrorInput { - CannotUninitialize = 'CannotUninitialize', -} -export enum SetProxyOwnerErrorOutput { - CannotUninitialize = 'CannotUninitialize', -} -export type StateInput = Enum<{ - Uninitialized: undefined; - Initialized: IdentityInput; - Revoked: undefined; -}>; -export type StateOutput = Enum<{ Uninitialized: void; Initialized: IdentityOutput; Revoked: void }>; - -export type AddressInput = { bits: string }; -export type AddressOutput = AddressInput; -export type ContractIdInput = { bits: string }; -export type ContractIdOutput = ContractIdInput; -export type ProxyOwnerSetInput = { new_proxy_owner: StateInput }; -export type ProxyOwnerSetOutput = { new_proxy_owner: StateOutput }; -export type ProxyTargetSetInput = { new_target: ContractIdInput }; -export type ProxyTargetSetOutput = { new_target: ContractIdOutput }; - -export type Src14OwnedProxyConfigurables = Partial<{ - INITIAL_TARGET: Option; - INITIAL_OWNER: StateInput; -}>; - -const abi = { - programType: 'contract', - specVersion: '1', - encodingVersion: '1', - concreteTypes: [ - { - type: '()', - concreteTypeId: '2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d', - }, - { - type: 'enum standards::src5::AccessError', - concreteTypeId: '3f702ea3351c9c1ece2b84048006c8034a24cbc2bad2e740d0412b4172951d3d', - metadataTypeId: 1, - }, - { - type: 'enum standards::src5::State', - concreteTypeId: '192bc7098e2fe60635a9918afb563e4e5419d386da2bdbf0d716b4bc8549802c', - metadataTypeId: 2, - }, - { - type: 'enum std::option::Option', - concreteTypeId: '0d79387ad3bacdc3b7aad9da3a96f4ce60d9a1b6002df254069ad95a3931d5c8', - metadataTypeId: 4, - typeArguments: ['29c10735d33b5159f0c71ee1dbd17b36a3e69e41f00fab0d42e1bd9f428d8a54'], - }, - { - type: 'enum sway_libs::ownership::errors::InitializationError', - concreteTypeId: '1dfe7feadc1d9667a4351761230f948744068a090fe91b1bc6763a90ed5d3893', - metadataTypeId: 5, - }, - { - type: 'enum sway_libs::upgradability::errors::SetProxyOwnerError', - concreteTypeId: '3c6e90ae504df6aad8b34a93ba77dc62623e00b777eecacfa034a8ac6e890c74', - metadataTypeId: 6, - }, - { - type: 'str', - concreteTypeId: '8c25cb3686462e9a86d2883c5688a22fe738b0bbc85f458d2d2b5f3f667c6d5a', - }, - { - type: 'struct std::contract_id::ContractId', - concreteTypeId: '29c10735d33b5159f0c71ee1dbd17b36a3e69e41f00fab0d42e1bd9f428d8a54', - metadataTypeId: 9, - }, - { - type: 'struct sway_libs::upgradability::events::ProxyOwnerSet', - concreteTypeId: '96dd838b44f99d8ccae2a7948137ab6256c48ca4abc6168abc880de07fba7247', - metadataTypeId: 10, - }, - { - type: 'struct sway_libs::upgradability::events::ProxyTargetSet', - concreteTypeId: '1ddc0adda1270a016c08ffd614f29f599b4725407c8954c8b960bdf651a9a6c8', - metadataTypeId: 11, - }, - ], - metadataTypes: [ - { - type: 'b256', - metadataTypeId: 0, - }, - { - type: 'enum standards::src5::AccessError', - metadataTypeId: 1, - components: [ - { - name: 'NotOwner', - typeId: '2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d', - }, - ], - }, - { - type: 'enum standards::src5::State', - metadataTypeId: 2, - components: [ - { - name: 'Uninitialized', - typeId: '2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d', - }, - { - name: 'Initialized', - typeId: 3, - }, - { - name: 'Revoked', - typeId: '2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d', - }, - ], - }, - { - type: 'enum std::identity::Identity', - metadataTypeId: 3, - components: [ - { - name: 'Address', - typeId: 8, - }, - { - name: 'ContractId', - typeId: 9, - }, - ], - }, - { - type: 'enum std::option::Option', - metadataTypeId: 4, - components: [ - { - name: 'None', - typeId: '2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d', - }, - { - name: 'Some', - typeId: 7, - }, - ], - typeParameters: [7], - }, - { - type: 'enum sway_libs::ownership::errors::InitializationError', - metadataTypeId: 5, - components: [ - { - name: 'CannotReinitialized', - typeId: '2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d', - }, - ], - }, - { - type: 'enum sway_libs::upgradability::errors::SetProxyOwnerError', - metadataTypeId: 6, - components: [ - { - name: 'CannotUninitialize', - typeId: '2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d', - }, - ], - }, - { - type: 'generic T', - metadataTypeId: 7, - }, - { - type: 'struct std::address::Address', - metadataTypeId: 8, - components: [ - { - name: 'bits', - typeId: 0, - }, - ], - }, - { - type: 'struct std::contract_id::ContractId', - metadataTypeId: 9, - components: [ - { - name: 'bits', - typeId: 0, - }, - ], - }, - { - type: 'struct sway_libs::upgradability::events::ProxyOwnerSet', - metadataTypeId: 10, - components: [ - { - name: 'new_proxy_owner', - typeId: 2, - }, - ], - }, - { - type: 'struct sway_libs::upgradability::events::ProxyTargetSet', - metadataTypeId: 11, - components: [ - { - name: 'new_target', - typeId: 9, - }, - ], - }, - ], - functions: [ - { - inputs: [], - name: 'proxy_target', - output: '0d79387ad3bacdc3b7aad9da3a96f4ce60d9a1b6002df254069ad95a3931d5c8', - attributes: [ - { - name: 'doc-comment', - arguments: [' Returns the target contract of the proxy contract.'], - }, - { - name: 'doc-comment', - arguments: [''], - }, - { - name: 'doc-comment', - arguments: [' # Returns'], - }, - { - name: 'doc-comment', - arguments: [''], - }, - { - name: 'doc-comment', - arguments: [ - ' * [Option] - The new proxy contract to which all fallback calls will be passed or `None`.', - ], - }, - { - name: 'doc-comment', - arguments: [''], - }, - { - name: 'doc-comment', - arguments: [' # Number of Storage Accesses'], - }, - { - name: 'doc-comment', - arguments: [''], - }, - { - name: 'doc-comment', - arguments: [' * Reads: `1`'], - }, - { - name: 'storage', - arguments: ['read'], - }, - ], - }, - { - inputs: [ - { - name: 'new_target', - concreteTypeId: '29c10735d33b5159f0c71ee1dbd17b36a3e69e41f00fab0d42e1bd9f428d8a54', - }, - ], - name: 'set_proxy_target', - output: '2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d', - attributes: [ - { - name: 'doc-comment', - arguments: [' Change the target contract of the proxy contract.'], - }, - { - name: 'doc-comment', - arguments: [''], - }, - { - name: 'doc-comment', - arguments: [' # Additional Information'], - }, - { - name: 'doc-comment', - arguments: [''], - }, - { - name: 'doc-comment', - arguments: [' This method can only be called by the `proxy_owner`.'], - }, - { - name: 'doc-comment', - arguments: [''], - }, - { - name: 'doc-comment', - arguments: [' # Arguments'], - }, - { - name: 'doc-comment', - arguments: [''], - }, - { - name: 'doc-comment', - arguments: [ - ' * `new_target`: [ContractId] - The new proxy contract to which all fallback calls will be passed.', - ], - }, - { - name: 'doc-comment', - arguments: [''], - }, - { - name: 'doc-comment', - arguments: [' # Reverts'], - }, - { - name: 'doc-comment', - arguments: [''], - }, - { - name: 'doc-comment', - arguments: [' * When not called by `proxy_owner`.'], - }, - { - name: 'doc-comment', - arguments: [''], - }, - { - name: 'doc-comment', - arguments: [' # Number of Storage Accesses'], - }, - { - name: 'doc-comment', - arguments: [''], - }, - { - name: 'doc-comment', - arguments: [' * Reads: `1`'], - }, - { - name: 'doc-comment', - arguments: [' * Write: `1`'], - }, - { - name: 'storage', - arguments: ['read', 'write'], - }, - ], - }, - { - inputs: [], - name: 'proxy_owner', - output: '192bc7098e2fe60635a9918afb563e4e5419d386da2bdbf0d716b4bc8549802c', - attributes: [ - { - name: 'doc-comment', - arguments: [' Returns the owner of the proxy contract.'], - }, - { - name: 'doc-comment', - arguments: [''], - }, - { - name: 'doc-comment', - arguments: [' # Returns'], - }, - { - name: 'doc-comment', - arguments: [''], - }, - { - name: 'doc-comment', - arguments: [' * [State] - Represents the state of ownership for this contract.'], - }, - { - name: 'doc-comment', - arguments: [''], - }, - { - name: 'doc-comment', - arguments: [' # Number of Storage Accesses'], - }, - { - name: 'doc-comment', - arguments: [''], - }, - { - name: 'doc-comment', - arguments: [' * Reads: `1`'], - }, - { - name: 'storage', - arguments: ['read'], - }, - ], - }, - { - inputs: [], - name: 'initialize_proxy', - output: '2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d', - attributes: [ - { - name: 'doc-comment', - arguments: [' Initializes the proxy contract.'], - }, - { - name: 'doc-comment', - arguments: [''], - }, - { - name: 'doc-comment', - arguments: [' # Additional Information'], - }, - { - name: 'doc-comment', - arguments: [''], - }, - { - name: 'doc-comment', - arguments: [ - ' This method sets the storage values using the values of the configurable constants `INITIAL_TARGET` and `INITIAL_OWNER`.', - ], - }, - { - name: 'doc-comment', - arguments: [' This then allows methods that write to storage to be called.'], - }, - { - name: 'doc-comment', - arguments: [' This method can only be called once.'], - }, - { - name: 'doc-comment', - arguments: [''], - }, - { - name: 'doc-comment', - arguments: [' # Reverts'], - }, - { - name: 'doc-comment', - arguments: [''], - }, - { - name: 'doc-comment', - arguments: [' * When `storage::SRC14.proxy_owner` is not [State::Uninitialized].'], - }, - { - name: 'doc-comment', - arguments: [''], - }, - { - name: 'doc-comment', - arguments: [' # Number of Storage Accesses'], - }, - { - name: 'doc-comment', - arguments: [''], - }, - { - name: 'doc-comment', - arguments: [' * Writes: `2`'], - }, - { - name: 'storage', - arguments: ['write'], - }, - ], - }, - { - inputs: [ - { - name: 'new_proxy_owner', - concreteTypeId: '192bc7098e2fe60635a9918afb563e4e5419d386da2bdbf0d716b4bc8549802c', - }, - ], - name: 'set_proxy_owner', - output: '2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d', - attributes: [ - { - name: 'doc-comment', - arguments: [' Changes proxy ownership to the passed State.'], - }, - { - name: 'doc-comment', - arguments: [''], - }, - { - name: 'doc-comment', - arguments: [' # Additional Information'], - }, - { - name: 'doc-comment', - arguments: [''], - }, - { - name: 'doc-comment', - arguments: [ - ' This method can be used to transfer ownership between Identities or to revoke ownership.', - ], - }, - { - name: 'doc-comment', - arguments: [''], - }, - { - name: 'doc-comment', - arguments: [' # Arguments'], - }, - { - name: 'doc-comment', - arguments: [''], - }, - { - name: 'doc-comment', - arguments: [' * `new_proxy_owner`: [State] - The new state of the proxy ownership.'], - }, - { - name: 'doc-comment', - arguments: [''], - }, - { - name: 'doc-comment', - arguments: [' # Reverts'], - }, - { - name: 'doc-comment', - arguments: [''], - }, - { - name: 'doc-comment', - arguments: [' * When the sender is not the current proxy owner.'], - }, - { - name: 'doc-comment', - arguments: [' * When the new state of the proxy ownership is [State::Uninitialized].'], - }, - { - name: 'doc-comment', - arguments: [''], - }, - { - name: 'doc-comment', - arguments: [' # Number of Storage Accesses'], - }, - { - name: 'doc-comment', - arguments: [''], - }, - { - name: 'doc-comment', - arguments: [' * Reads: `1`'], - }, - { - name: 'doc-comment', - arguments: [' * Writes: `1`'], - }, - { - name: 'storage', - arguments: ['write'], - }, - ], - }, - ], - loggedTypes: [ - { - logId: '4571204900286667806', - concreteTypeId: '3f702ea3351c9c1ece2b84048006c8034a24cbc2bad2e740d0412b4172951d3d', - }, - { - logId: '2151606668983994881', - concreteTypeId: '1ddc0adda1270a016c08ffd614f29f599b4725407c8954c8b960bdf651a9a6c8', - }, - { - logId: '2161305517876418151', - concreteTypeId: '1dfe7feadc1d9667a4351761230f948744068a090fe91b1bc6763a90ed5d3893', - }, - { - logId: '4354576968059844266', - concreteTypeId: '3c6e90ae504df6aad8b34a93ba77dc62623e00b777eecacfa034a8ac6e890c74', - }, - { - logId: '10870989709723147660', - concreteTypeId: '96dd838b44f99d8ccae2a7948137ab6256c48ca4abc6168abc880de07fba7247', - }, - { - logId: '10098701174489624218', - concreteTypeId: '8c25cb3686462e9a86d2883c5688a22fe738b0bbc85f458d2d2b5f3f667c6d5a', - }, - ], - messagesTypes: [], - configurables: [ - { - name: 'INITIAL_TARGET', - concreteTypeId: '0d79387ad3bacdc3b7aad9da3a96f4ce60d9a1b6002df254069ad95a3931d5c8', - offset: 13368, - }, - { - name: 'INITIAL_OWNER', - concreteTypeId: '192bc7098e2fe60635a9918afb563e4e5419d386da2bdbf0d716b4bc8549802c', - offset: 13320, - }, - ], -}; - -const storageSlots: StorageSlot[] = [ - { - key: '7bb458adc1d118713319a5baa00a2d049dd64d2916477d2688d76970c898cd55', - value: '0000000000000000000000000000000000000000000000000000000000000000', - }, - { - key: '7bb458adc1d118713319a5baa00a2d049dd64d2916477d2688d76970c898cd56', - value: '0000000000000000000000000000000000000000000000000000000000000000', - }, - { - key: 'bb79927b15d9259ea316f2ecb2297d6cc8851888a98278c0a2e03e1a091ea754', - value: '0000000000000000000000000000000000000000000000000000000000000000', - }, - { - key: 'bb79927b15d9259ea316f2ecb2297d6cc8851888a98278c0a2e03e1a091ea755', - value: '0000000000000000000000000000000000000000000000000000000000000000', - }, -]; -export class Src14OwnedProxyInterface extends Interface { - constructor() { - super(abi); - } - - declare functions: { - proxy_target: FunctionFragment; - set_proxy_target: FunctionFragment; - proxy_owner: FunctionFragment; - initialize_proxy: FunctionFragment; - set_proxy_owner: FunctionFragment; - }; -} - -export class Src14OwnedProxy extends Contract { - static readonly abi = abi; - static readonly storageSlots = storageSlots; - - declare interface: Src14OwnedProxyInterface; - declare functions: { - proxy_target: InvokeFunction<[], Option>; - set_proxy_target: InvokeFunction<[new_target: ContractIdInput], void>; - proxy_owner: InvokeFunction<[], StateOutput>; - initialize_proxy: InvokeFunction<[], void>; - set_proxy_owner: InvokeFunction<[new_proxy_owner: StateInput], void>; - }; - - constructor(id: string | AbstractAddress, accountOrProvider: Account | Provider) { - super(id, abi, accountOrProvider); - } -} diff --git a/packages/recipes/src/types/Src14OwnedProxyFactory.ts b/packages/recipes/src/types/Src14OwnedProxyFactory.ts deleted file mode 100644 index 30762b7a0e9..00000000000 --- a/packages/recipes/src/types/Src14OwnedProxyFactory.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ - -/* eslint-disable max-classes-per-file */ -/* eslint-disable @typescript-eslint/no-unused-vars */ -/* eslint-disable @typescript-eslint/consistent-type-imports */ - -/* - Fuels version: 0.97.2 -*/ - -import { ContractFactory, type DeployContractOptions } from '@fuel-ts/contract'; -import { decompressBytecode } from '@fuel-ts/utils'; -import { type Provider, type Account } from '@fuel-ts/account'; -import { Src14OwnedProxy } from './Src14OwnedProxy'; - -const bytecode = decompressBytecode( - 'H4sIAAAAAAAAA9Vbe3Abx3lfgCAFvayz+TAFSjaUUjJkRwosUQ4ly9IhIATSEM2DSVpUGBhg64c0cSyIlVQ5tsccN001aSZlHcdlO06GrtOp6z4GAB+C7T7YR2bUiTtlZhxbTeMWmiatFAst60YZqm6j/r5v93DHw4GOJ84f0QznFne73+5+j9/32FVgISxOCOEV/K/Dn7o259GuXRO/JcSQ8c6CML4nwkZJF8HFnWLovZLXeK/kOyG89+JbGN9C+BZe+q2uEfRE4LIBGiv1VHThdi0i5gJdGTHa7TW0WNNY4JLmoFfXE4jPi3T5ep/q112j337Vr8WIF3PV373nAol5YfTls6OG8Id6m9E3+DG0tVB5F96/onG7b0akejWh9XaMpWNhYcSnL44exPv49JzLnNtoTtDMpMvaR0FvmxHPaaPd6B/rGDMSxRCP7WmaMxJ5I10Wt47qYg2etxnR/CJ/i7Tj29nuSr/42Tlux3yYLygC36+aMxiIzotTuuck+LeD+If9hoxEIQS6MdDX8DxgRAudNvrzNvql96Hvl/TFJdDfaaPfDbo9oL8az7tBf8hGf8GiXxTL0/cuKPpPg36Hjf4R0O1V678H9E9b9IuaRX+m9X3on1f0HwD9XTb6Z0A3Cfrr8LwX9Ccs+jOWnOIzkm+16c8p+juXvl/9f0Z0GnonHP19CeqfigmR6hGeVER4jb5Z7FH7a+jL32Atf2tEp84ELoUxV9XYQzQWOnVO6pRvzIi+AhugdTehPVtpV8/r/TyPTcxWdIv246CfIf3dHNGEES0GjXihRHSq9+z5slrHBOYLy3XkJ7nN6zg7brar17F6c0AXYjP+lr5fNWW+x/4nqsc1PK3mHLLmLGatOaddxtSxboHPsGHF6/7Zc6MDGJNs1o347CJ4/i/pcrgEvl/AvOcCl3Teb+CCk5b/tmq5zVyE3P4cNP4C4/8S40+7y63uklr7GUtuReKXktuMfxm5tSq5ST10lVvdu6bcoON3KB0PGokpjTAq8H1nf8/vME4lcoRlQann+TFux9rnHLTfgQ2QzuCbbw57PgJcDIZ660lOYab/PejIBez77aq1vyH3nfdjfDePjxaL3I5gzmh+Pn1Z22P0Cr+kuRnYOTuEdjfhMeQziXYoFKsXkq9OPVxxCnbrH+3C2Eg75Dnt5geO0V5TPeBNr+ZJxTTowNkh6EAwlKzXoaunIb//hA4sQJb/ZcSnFqUO0J6ctPyHXXRgHuNeBY3XoAN/Bj08X0MHjigd6LZ0oPCSKXfIbX0qnhtMJXL3dXh891q2MA0ZOmmt/JaiFcR48If1qZPb0haOuNjCtiW2kBTe1CDah9U+0oXiaAbjUy0C6/A1xjRxqktsT0VzhxojQge+ebHGwB28pkLRiAi/EX8lyHyMgY/xmUnwYBp8nEmX9VkjMW0ELpLukS059c/7lotMNJtMwqD1b6D17+DtRcgEOFRLJit+6JQJYgoN6wG+G/l0OVOAXKbAk87ARYll1bbtnXKRaxFzn8U68BSvYDywwU2u3neVLM7bbDtj2fb0Ym3b9mxStl3xN9W27X3PtO2vCHHzc34zXhKTgeikCMTHRSAxJgJ9JWH052CP5h6dcZgI8B4jAnGOWIv1HjGiuU6JD851iTbqC7sKh8o+yCOX5XZ02mr3+PTAD4V4htZxNSwmsK7fxvruXhS0zhXmOuUasb5ESaTB38AVzHc1aPZfofo/Ze3Lc5HHDGNfh0qw+6q1fZL40QjdOdUt7sZTx3M1/Li3MdJEfthzB2JKrHMB6/RChjch1jpjrhnjd5PfAu40utCOUkzY2BsUpw6KGxt7gkRb0kvkzmHMesR2uuRx2Dm2i2XZB5s08TESlLgWoXgyn8EaQ6HedoqhbwC9bPqyuA7vgzXohVkGhLtl4CbRonZ0Ghhs0TIiGvkO2D3Fl9inTvtsIswtcjvG89WDHzrmg83ivfKf/P1wE2SSgRzB96uGKZenlFwq+iblWJL40RMkDBEUN2u9u0Q6Aru4gtjoqubUA7u+ZphGAnKFrpKtMW/KhPM5ndtxxNrqvRZDPM5xCPhJ+A7d4yfpHeaC3mVc9M4+H3x/lX1ka9nHSSH+2GYfrZgXtrhUP9AnyrqXhO4ZogUYqQMjpX4A16EfKzEHYgCao4r+J1ievGfSDciN2tEZWtcEyzPZZMoqCFn5+H0XvWcbPMftSJfVtmxwwYUXdVWyw94CV/BnyanOaa/gm2b2Z9wq+8YC0VxlLObSbONN+91vG29YfAcNwjXob+CdXLV+98Fe+pEfDaAP4jHCeEefWwL9ZI+78AcdMwTZ5QbYWJhzM9gYYbJjzK2Krr4M3U0c//RDt7hPvVsfznu2JjuMwBWd9m3YcGv/B+CbZxm+fYh8rzsXOITx/ZBzdOHjMgbMXwQtituADYiTONajGCxvWHEb7LYqbhMPKfzvlvg/NcZtxv9Cd6Udz8MnuuUHvqwt1pHzRwuUE9A4Fz/oOy79YIH8oBmPIp6nfMvN54tBRf+IlQtMEQ6qXGAqo74Beym2yl2PmOYG+t3WA9w7KPxtPR1jW7pBuzsLbJ7K7O7xzcN3NJDfgO3BZxTO23zGdYQHsG/KNf1tsQ5diyHeTMA+D5IdYr0xxLDURvxsHwteE35hXe2ob+SGVSylfFQ+KOOoKRm7ESaTXQ8SxhmQOWR6VXfqnN3WupdiXJblz3FUuV6H7/Nh3SEzPgbGdIf6pqFPYdKnbhfa12x+2MLPYdCGL8Yawbcm4l9I62mnusTN6ll/s3z61qea5jAfeHRC534x/KZ+8ll/M56w35zpI7EmrLWDeEE1CenfIANT9g6575R6Aru1dFnlOFV9Q8ofS9/C+UqecAO8QJ6RyMs19LBvzr7Y63uB7IJ1BjqK71m8H8f7SV4b6xJ8bDRntRO5jLWOnMyfUD8A35vS5Wwzy/0wyZL9KzC64l+vKX6vs8lSt+Mm4T/+6vHXAH+0gv2gigWYZ3GSo0Zy1G24tK46nhLjLn7wNHSklbARa2wNleFT4oypreyDh3MNqUO5FbAZ8lF+LdksmpMxHT7PQ/4J77xtg4NiywCYvPEBPTCUFVryAT2dhO/W0R9xGPvDcmYlYvBVWP9qrL+V6UfY32e4jbwO/VspXlE+fdzmx8wYxM4jpe+kiz5h2W+uFXF6Hb3Dk/kGGWFfLKMw+NYaSkyT/mH+9jmFp9D/Cp6afLPbFvI1Sx6Yw+A1S50l2hSbEF61ks6m+nL1sGWN/A7yFr/Rq/vBY9QVKZ/B3rm21GXV8qTsjnz4PsVjs2H/PNktchCOSRx5xXa2jzTHyeFQClg1nA8D47YcBz4Bo6j+cx68HKY8H+8fOt5NeZFpu2RDs0XLhmaGpM06/XHdE7LOCrsxx/WofJ/G9SAOYgwlGzpLORRjOHKjuxzr/W/269H8ONa0g2p4JmZSXNAC3mLN7ci9QqgD6Oa3VDRfrzB3DfD3DNqUI9hy2akh7O3T+DuGuuWQGVdBz9eCb7rE5yL5FunH4lN+zD+i1i1tn8ZR/MZx91mKq8kPUCyHmtL0S2bu6tjPd5SPJblCR4qEm5r0sVMU33Ebaxamz6DaO35/Vu1hFdqP2b7V0TfKeRojPs7XtaSuI+6MEW2su5KfgietDppPKJoRtB930HzCheYnZT7suq+vK99MMlD58BTlHKrOkfM76J+20Yf/RV32skiCp1TXMWVxI+Regoz2jsQ+EYHeTaBWAd63YJ4Z5LCuddl/VjUuo9KXfDS1Y1vw3qIPmYVtMtuFvRVr7O0zam+qpk97m6Y4w9wb9rGEr19SfKV9ZbCvg1h7ybGvIvb1ceyrDt9O2/bVWmNfL6l9Bd33ZdG37ws6QLVaVR8iG5mi2HCJjQS6eK2eQBfXfr5CY1CDq9iZrG25+doKX6geq+I9qrHPEu+xlgbCINTV3Hy6937l08flfqjvzEVuR4gPs5W9uceagmurWPfDdMYBXsbB5wTbYWXdUxR78t4hkwUlo1a0R13wYFzZ/GnL5gtk89C7Qg7P+4xelddzjq/wS557vGTm31jXKkULOIrzoMvaR4EZ5C/8CjMqfRn3VIwI7CLd4pgW63tPrU/Fi9OaWhvFKXJvsYzM/3mfM7LOETlB9TiV5z/A8bYL3zg+MvdPeSTe3YQzBML8f8J4lcdW1VPvUzVdqj2a9k28NuuYbYgbsqhjHqc6Jn5vIL5K3PCg5kQ6ZWG3ev/oM+SrKvGRx4yPbPm8p1TxxxTj0t7gD+Fbw1bcD9/UJTI1cHOD+t2EdovJV9s3wXqP8yz6bsMkE6c2mO9UP9gJ8yxK80q54BnTwvjzq9hQ+rVIkORO+sfxKugYKh9Y41jHLer3BrQ/4lg/favYKNeQQEvOi2dMC8l5cQ5jxcYUb1AOpM6uqmLkAGHJMrRs8a06H6hNawXRknENZGXlFmY9omasW6lxmTEu5nghOh1UMY5bfGvPexdteW+nzHuR61p5r8opeQ+o/9TOe08q3bblvaRPZt57xJb3XqxhUwWXvDdXO+8VXHems1Rb3gvfUzPv3eeS99r0H3jzwfLecSvvzVPOgTOjwiL22WnLe7nu6ZL3EnaZeS/VGSnvrYwFvU5uSz1PO/LeTpX3Up1c1iIJt6y8d/GnyE3DP2FuGv4wc1PozuhPmpui75M/T7lpla2q/MXFLt1qjr73qzkGoiUxgjqqqunX2+uqhLXQQ8Za9b1Bfa/47JEuTx31AY16uS7hrJPZ68LIoaz9OGq07ZRjNCd9c5TrNsrntpGIF/VHrj0G8dTxbAIfyBdQzkE1I1lb70esSfkdxhEekm+C7TRQX+SEK+zfIXuq4aOG2UX7Ixqo+WrIXbV6/qbqm1Sz5n7JDrOfhj5ezFfH3xQ97hPrYvxFP8qBSX/pnopZJxizycsNkxEPLJFziDCZ6o9LbRc1AZsOgG7IRQ/sdHE/pRrrHTWM4PI1DJu9Uz5LfKT4IQnMg79ifGWsz827nXdDrgXyTWwbZR5Ddwh4jPO8GH1zCmMXuD/OlEF30rRj51nmSeF73XYW63IXIj+vvpmY7Acmr6yNyfn53T0dhDcW3vYhRxqi857YmDwPBy7E8/N3xnzjsv6/xH7NuokNL71WTT4NvBy24iclX4opvmCLmW6kNvqQjo8tjY8RE1BthfYWz1GM6a3lr8CbF1zOZo+RDgHD6O6BjI8SeaqPUB0I/g9nNHxuDJrV9Gaqz40R/w2QLtSTn2lQe6Fza2o7zq1zYfY7/QUaI8+a+/OoUwW3wj5vBTbehvkn5fzI/6rn/3b1/MDqyrk17jOUg3tA607Q2gtaiBNqnVuLAy68CdnWaJ2H96MuUw5uAd1bQBe5W+6MPMt2XeOPXdZI9T5zjROgtRO0OkBrF2jBZmqucaPLGtdRrGDTgSG5Fjf51/P5tn18OqWJdCroSaegN1ey0F3o5tWM0/fYdFfI8+Cl9ctWaz/QQaplRsxaJp+VGdymPGA4twq1TIrp11AdXIv59OZYM/sXrmXCj7QNDuiqlimolskx1KcI42JzqGsKbiebKXYIaoj/if+obV6P2uYNqG020jm6rbZJd1a4tsn+2HxPbVqTdX6J89ZKrdPct73+uMRPAQNCzrMu8PcA+atUMixSg2FPqjfstdmzXe9x11BHHdbAXb3wGtDSLJlV0fwSywz+DndE5F2IQzncxQuvBY3rsF/IP4fzMvjtqrimvk+dWfOZ3zL+x4zpbBjvteIMC+NxT4vxmvDTxHjcBXHDeO9tDoynOLgGxnu3qhxW9pcYz3dE3THe+zUXjKe43sT40gfE+JILxo8B48MK4zEHY3zJwnjwZ5nzefhI1IoRb8UXdmsxDZiawx0g5z5WrKZarPTtFK9TjV5bCb1sw3MV363j+jR/O8/9UDfHeuncGvEI67c6l8N5bDVebFe1Kds5HuxT3SujGo/7fTTRoPwY6tmV2M3tTF/FEuy/KI7gengYdxICB6lgnRTPoha8Q4d8dKFvge6nN8I29KwIRurEvYhF78Y7GW9U3VWwxxvFKswZ5lhdCx0GD/rhryyf8wvKz9yv2g7bk/dFlsqhoYPthM8ouIZR4jbH9nxWQDhBcTvdeeUzC2DYuhTOyimnQx95V1jyl843TJmNm++hf42UE9HdaIV5VNOzMC/ZpW8Br0IbB0RggDFP3kdEvUiLDQicZzTzfWfUAVDLaWL68EvAP5ozByxpAR7cqO5KkK2a/oDupgL/2EaoLiTfo61s0vyG8wK33KgB90QqOa6qL+H+oFVf2oy9bcKaPkL1JZVPtqraxQTnTYy9aC+5LwKZLn+2pGIkyBr662I737HbDseflNPLGgV8WNVZkh3bcFcLdBGrVmORb4fCLcRjzD+ZS+B+OOfV0v4kJsD+3M5YQOPv+F6KvLO3AxiwhzAglVi4U+sJ4mxqYa/WG55L9S/chXrbHPA8C6wJhgabxzDXDUbMCPHv2OYxo0sPc/45BOzsGRwzDuFeOsWe6CvnBoOXYuMlFQdiPO7IXxZtqs4J3nfNGd068A41mMqdzgLdtwe+bXa904la4OdULbIFtRO6B9MFvqk7V1V9v6l0hWogpq5U7kBDV7ZDV4LQlU32WiSwFHfWKjhj6oJNXnXynBFxskM33yS9xJrWgkeEj3TGD/mg3rSsfOpvN+WjZPQpyGifxGlVVyNb7kPewPUAxlnEjqBVuVvr3Lvfo7CW7sJDVoQFU6Sf8Hmw1XjhTKWdKJCv4bW6+07PBcddbr5H6ND/keq71Pg/BZW71HRfP9iLOOEeYEKftG/3u9Sof2ypvm+Zp9pEJ2jsxvg9GN/tdt8S6zDv0VIOp2Su7l5KmX8MMm+DzDfwPVqpS83QJdJNA7pUuQPm0GM+h7DO4/iOlTqDWwiD5nrQDCzVI+iJFbsu55P31/bJ/oWfpU+GbDln+qA+GePeruWTf1b/sqPHTj+WPjEy+vCD9N+CxC8/eCJtf/f49NCf/NW3Wo/vXP/7r06u2ub76pu9W1viT24589bR7LmJvx+UfY/9yqMPjjK9o48ePXF05JGjn31QkrHoyT4bv7vq7RduWeV5nf8J7/7s9hd3bXj+pmv8T4jXHnvm8eZ/3Py1F1vevVzY+uQj536t9cwfPn167vdK+wIrb/qDgQMjjzzyiyO/9OnY6Oix0T17BniR9xw70S+XL764+Zt3fP7A9t/N/+ZE57Nf/vrLvkvPvzZ7cNOb//qZYwfLl18+uv/V/5j8h4eu+8Ku/xk+uePbe3/06xf23ZVr+sG7/m8Uv9HxR0fvemvl2vu9D6f3bfzxUz/47sbnHn7u7V/9ja6rX/3i3kfH/9To/dHLkms7/1c+d7yuns+r50H5vF19335ePtvfkM8W9X3lEfn0qff1n1PPDvV8Vj7rJuXT88b/AzdExjYINgAA' -); - -export class Src14OwnedProxyFactory extends ContractFactory { - static readonly bytecode = bytecode; - - constructor(accountOrProvider: Account | Provider) { - super(bytecode, Src14OwnedProxy.abi, accountOrProvider, Src14OwnedProxy.storageSlots); - } - - static deploy(wallet: Account, options: DeployContractOptions = {}) { - const factory = new Src14OwnedProxyFactory(wallet); - return factory.deploy(options); - } -} diff --git a/packages/recipes/src/types/common.d.ts b/packages/recipes/src/types/common.d.ts deleted file mode 100644 index ef3dec5e95c..00000000000 --- a/packages/recipes/src/types/common.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ - -/* eslint-disable max-classes-per-file */ -/* eslint-disable @typescript-eslint/no-unused-vars */ -/* eslint-disable @typescript-eslint/consistent-type-imports */ - -/* - Fuels version: 0.97.2 -*/ - -/** - * Mimics Sway Enum. - * Requires one and only one Key-Value pair and raises error if more are provided. - */ -export type Enum = { - [K in keyof T]: Pick & { [P in Exclude]?: never }; -}[keyof T]; - -/** - * Mimics Sway Option and Vectors. - * Vectors are treated like arrays in Typescript. - */ -export type Option = T | undefined; - -export type Vec = T[]; - -/** - * Mimics Sway Result enum type. - * Ok represents the success case, while Err represents the error case. - */ -export type Result = Enum<{ Ok: T; Err: E }>; From 143f35615b5c251b2c82c67007b35bf7aded1ab9 Mon Sep 17 00:00:00 2001 From: nedsalk Date: Thu, 26 Dec 2024 13:38:36 +0100 Subject: [PATCH 105/126] export types from contract/predicate/script --- packages/abi/src/gen/renderers/ts/templates/contract.hbs | 3 ++- packages/abi/src/gen/renderers/ts/templates/predicate.hbs | 3 ++- packages/abi/src/gen/renderers/ts/templates/script.hbs | 3 ++- packages/fuel-gauge/src/abi/fixtures/contracts/contract.txt | 3 ++- packages/fuel-gauge/src/abi/fixtures/predicates/predicate.txt | 3 ++- packages/fuel-gauge/src/abi/fixtures/scripts/script.txt | 3 ++- 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/packages/abi/src/gen/renderers/ts/templates/contract.hbs b/packages/abi/src/gen/renderers/ts/templates/contract.hbs index a111cdea1ac..78e3049b9fc 100644 --- a/packages/abi/src/gen/renderers/ts/templates/contract.hbs +++ b/packages/abi/src/gen/renderers/ts/templates/contract.hbs @@ -6,7 +6,8 @@ import type { {{name}}Types as Types } from './{{name}}Types'; import type { InterfaceFunctionMapper, ProgramFunctionMapper } from '../common'; import { abi } from './{{name}}-abi'; -export type {{name}}Types = Types; +export * from './{{name}}Types'; + export type {{name}}Configurables = Types['configurables']; export class {{name}}Interface extends Interface { diff --git a/packages/abi/src/gen/renderers/ts/templates/predicate.hbs b/packages/abi/src/gen/renderers/ts/templates/predicate.hbs index 46c2017f1ec..2925628d4e5 100644 --- a/packages/abi/src/gen/renderers/ts/templates/predicate.hbs +++ b/packages/abi/src/gen/renderers/ts/templates/predicate.hbs @@ -6,7 +6,8 @@ import { abi } from './{{name}}-abi'; import { bytecode } from './{{name}}-bytecode'; import type { {{name}}Types as Types } from './{{name}}Types'; -export type {{name}}Types = Types; +export * from './{{name}}Types'; + export type {{name}}Inputs = Types['inputs']; export type {{name}}Output = Types['output']; export type {{name}}Configurables = Types['configurables']; diff --git a/packages/abi/src/gen/renderers/ts/templates/script.hbs b/packages/abi/src/gen/renderers/ts/templates/script.hbs index d0cf4617b22..b304d851616 100644 --- a/packages/abi/src/gen/renderers/ts/templates/script.hbs +++ b/packages/abi/src/gen/renderers/ts/templates/script.hbs @@ -6,7 +6,8 @@ import { abi } from './{{name}}-abi'; import { bytecode } from './{{name}}-bytecode'; import type { {{name}}Types as Types } from './{{name}}Types'; -export type {{name}}Types = Types; +export * from './{{name}}Types'; + export type {{name}}Inputs = Types['inputs']; export type {{name}}Output = Types['output']; export type {{name}}Configurables = Types['configurables']; diff --git a/packages/fuel-gauge/src/abi/fixtures/contracts/contract.txt b/packages/fuel-gauge/src/abi/fixtures/contracts/contract.txt index 700995bbe17..400021efba2 100644 --- a/packages/fuel-gauge/src/abi/fixtures/contracts/contract.txt +++ b/packages/fuel-gauge/src/abi/fixtures/contracts/contract.txt @@ -15,7 +15,8 @@ import type { AbiContractTypes as Types } from './AbiContractTypes'; import type { InterfaceFunctionMapper, ProgramFunctionMapper } from '../common'; import { abi } from './AbiContract-abi'; -export type AbiContractTypes = Types; +export * from './AbiContractTypes'; + export type AbiContractConfigurables = Types['configurables']; export class AbiContractInterface extends Interface { diff --git a/packages/fuel-gauge/src/abi/fixtures/predicates/predicate.txt b/packages/fuel-gauge/src/abi/fixtures/predicates/predicate.txt index 20ef591eb2a..4881d4792a8 100644 --- a/packages/fuel-gauge/src/abi/fixtures/predicates/predicate.txt +++ b/packages/fuel-gauge/src/abi/fixtures/predicates/predicate.txt @@ -15,7 +15,8 @@ import { abi } from './AbiPredicate-abi'; import { bytecode } from './AbiPredicate-bytecode'; import type { AbiPredicateTypes as Types } from './AbiPredicateTypes'; -export type AbiPredicateTypes = Types; +export * from './AbiPredicateTypes'; + export type AbiPredicateInputs = Types['inputs']; export type AbiPredicateOutput = Types['output']; export type AbiPredicateConfigurables = Types['configurables']; diff --git a/packages/fuel-gauge/src/abi/fixtures/scripts/script.txt b/packages/fuel-gauge/src/abi/fixtures/scripts/script.txt index 3367b27a3b9..c4c64cc2c45 100644 --- a/packages/fuel-gauge/src/abi/fixtures/scripts/script.txt +++ b/packages/fuel-gauge/src/abi/fixtures/scripts/script.txt @@ -15,7 +15,8 @@ import { abi } from './AbiScript-abi'; import { bytecode } from './AbiScript-bytecode'; import type { AbiScriptTypes as Types } from './AbiScriptTypes'; -export type AbiScriptTypes = Types; +export * from './AbiScriptTypes'; + export type AbiScriptInputs = Types['inputs']; export type AbiScriptOutput = Types['output']; export type AbiScriptConfigurables = Types['configurables']; From aa6b0afd815187e7412dd99924ac2b793a0d8131 Mon Sep 17 00:00:00 2001 From: nedsalk Date: Thu, 26 Dec 2024 13:53:40 +0100 Subject: [PATCH 106/126] improve upon index exports now that types are also re-exported --- .../ts/renderers/render-index-files.ts | 22 +++++++++++++------ .../renderers/ts/renderers/render-program.ts | 8 +++---- .../renderers/ts/renderers/render-programs.ts | 8 +++---- .../src/gen/renderers/ts/templates/index.hbs | 4 ++-- packages/abi/src/gen/renderers/types.ts | 2 +- .../abi/fixtures/contracts/contract-index.txt | 4 ++-- .../fixtures/predicates/predicate-index.txt | 2 +- .../src/abi/fixtures/scripts/script-index.txt | 2 +- 8 files changed, 30 insertions(+), 22 deletions(-) diff --git a/packages/abi/src/gen/renderers/ts/renderers/render-index-files.ts b/packages/abi/src/gen/renderers/ts/renderers/render-index-files.ts index e8c239bdc33..ce0f4c07a24 100644 --- a/packages/abi/src/gen/renderers/ts/renderers/render-index-files.ts +++ b/packages/abi/src/gen/renderers/ts/renderers/render-index-files.ts @@ -7,12 +7,16 @@ import indexTemplate from '../templates/index.hbs'; import { getParentDirWrapper } from './get-parent-dir-wrapper'; import { templateRenderer } from './template-renderer'; +export type IndexContents = Map< + Abi['programType'], + { filename: string; exportedContent: string[] }[] +>; /** * @returns an array of index files * that includes the root index.ts and the index.ts for each provided program type. */ export function renderIndexFiles( - indexContents: Map, + indexContents: IndexContents, versions: BinaryVersions ): AbiGenResult[] { const results: AbiGenResult[] = []; @@ -23,18 +27,21 @@ export function renderIndexFiles( // from index.ts to e.g. contracts/index.ts const indexFilename = withParentDir('index.ts'); - const pathsToFiles = files.map((file) => { + const exports = files.map(({ filename, exportedContent }) => { // from e.g. contracts/AbiContract.ts to AbiContract.ts - const relativePathToFile = removeParentDir(file); + const relativePathToFile = removeParentDir(filename); // remove .ts extension - return relativePathToFile.split('.')[0]; + return { + path: relativePathToFile.split('.')[0], + exportedContent: `{ ${exportedContent.join(', ')} }`, + }; }); const content = templateRenderer({ versions, template: indexTemplate, data: { - paths: pathsToFiles, + exports, }, }); @@ -46,7 +53,8 @@ export function renderIndexFiles( const mainIndexFileImportPaths = [...indexContents.keys()] .sort() - .map((programType) => getParentDirWrapper(programType).parentDir); + .map((programType) => getParentDirWrapper(programType).parentDir) + .map((path) => ({ path, exportedContent: '*' })); const mainIndexFile: AbiGenResult = { filename: 'index.ts', @@ -54,7 +62,7 @@ export function renderIndexFiles( versions, template: indexTemplate, data: { - paths: mainIndexFileImportPaths, + exports: mainIndexFileImportPaths, }, }), }; diff --git a/packages/abi/src/gen/renderers/ts/renderers/render-program.ts b/packages/abi/src/gen/renderers/ts/renderers/render-program.ts index c1602344495..7bcb0c6a017 100644 --- a/packages/abi/src/gen/renderers/ts/renderers/render-program.ts +++ b/packages/abi/src/gen/renderers/ts/renderers/render-program.ts @@ -52,7 +52,7 @@ export function renderProgram(details: ProgramDetails, versions: BinaryVersions) versions, data: { name }, }), - exportInIndexFile: true, + exportInIndexFile: [name], }, { @@ -73,7 +73,7 @@ export function renderProgram(details: ProgramDetails, versions: BinaryVersions) versions, data: { name }, }), - exportInIndexFile: true, + exportInIndexFile: [`${name}Factory`], }); } break; @@ -85,7 +85,7 @@ export function renderProgram(details: ProgramDetails, versions: BinaryVersions) versions, data: { name }, }), - exportInIndexFile: true, + exportInIndexFile: [name], }); break; case 'script': @@ -96,7 +96,7 @@ export function renderProgram(details: ProgramDetails, versions: BinaryVersions) versions, data: { name }, }), - exportInIndexFile: true, + exportInIndexFile: [name], }); break; case 'library': diff --git a/packages/abi/src/gen/renderers/ts/renderers/render-programs.ts b/packages/abi/src/gen/renderers/ts/renderers/render-programs.ts index 9fb760f8788..269e90f8676 100644 --- a/packages/abi/src/gen/renderers/ts/renderers/render-programs.ts +++ b/packages/abi/src/gen/renderers/ts/renderers/render-programs.ts @@ -1,8 +1,8 @@ import type { BinaryVersions } from '@fuel-ts/versions'; -import type { Abi } from '../../../..'; import type { AbiGenResult, ProgramDetails } from '../../../abi-gen-types'; +import type { IndexContents } from './render-index-files'; import { renderIndexFiles } from './render-index-files'; import { renderProgram } from './render-program'; @@ -13,7 +13,7 @@ import { renderProgram } from './render-program'; */ export function renderPrograms(details: ProgramDetails[], versions: BinaryVersions) { const results: AbiGenResult[] = []; - const indexContents = new Map(); + const indexContents: IndexContents = new Map(); for (const d of details) { const files = renderProgram(d, versions); @@ -21,12 +21,12 @@ export function renderPrograms(details: ProgramDetails[], versions: BinaryVersio results.push(...files); files.forEach((file) => { - if (!file.exportInIndexFile) { + if (!file.exportInIndexFile?.length) { return; } const contents = indexContents.get(d.abi.programType) ?? []; - contents.push(file.filename); + contents.push({ filename: file.filename, exportedContent: file.exportInIndexFile }); indexContents.set(d.abi.programType, contents); }); } diff --git a/packages/abi/src/gen/renderers/ts/templates/index.hbs b/packages/abi/src/gen/renderers/ts/templates/index.hbs index 39825a6ebac..f323c7973da 100644 --- a/packages/abi/src/gen/renderers/ts/templates/index.hbs +++ b/packages/abi/src/gen/renderers/ts/templates/index.hbs @@ -1,5 +1,5 @@ {{header}} -{{#each paths}} -export * from './{{this}}'; +{{#each exports}} +export {{exportedContent}} from './{{path}}'; {{/each}} \ No newline at end of file diff --git a/packages/abi/src/gen/renderers/types.ts b/packages/abi/src/gen/renderers/types.ts index a0e6d9045fa..5d18ccaa6e9 100644 --- a/packages/abi/src/gen/renderers/types.ts +++ b/packages/abi/src/gen/renderers/types.ts @@ -5,5 +5,5 @@ import type { AbiGenResult, ProgramDetails } from '../abi-gen-types'; export type Renderer = (details: ProgramDetails[], versions: BinaryVersions) => AbiGenResult[]; export type TsAbiGenResult = AbiGenResult & { - exportInIndexFile?: boolean; + exportInIndexFile?: string[]; }; diff --git a/packages/fuel-gauge/src/abi/fixtures/contracts/contract-index.txt b/packages/fuel-gauge/src/abi/fixtures/contracts/contract-index.txt index 2170601c27c..5e648294442 100644 --- a/packages/fuel-gauge/src/abi/fixtures/contracts/contract-index.txt +++ b/packages/fuel-gauge/src/abi/fixtures/contracts/contract-index.txt @@ -9,5 +9,5 @@ */ -export * from './AbiContract'; -export * from './AbiContractFactory'; +export { AbiContract } from './AbiContract'; +export { AbiContractFactory } from './AbiContractFactory'; diff --git a/packages/fuel-gauge/src/abi/fixtures/predicates/predicate-index.txt b/packages/fuel-gauge/src/abi/fixtures/predicates/predicate-index.txt index 22acbb72a48..d2c603cd3b7 100644 --- a/packages/fuel-gauge/src/abi/fixtures/predicates/predicate-index.txt +++ b/packages/fuel-gauge/src/abi/fixtures/predicates/predicate-index.txt @@ -9,4 +9,4 @@ */ -export * from './AbiPredicate'; +export { AbiPredicate } from './AbiPredicate'; diff --git a/packages/fuel-gauge/src/abi/fixtures/scripts/script-index.txt b/packages/fuel-gauge/src/abi/fixtures/scripts/script-index.txt index 0ee8ca76857..29c9f742d6d 100644 --- a/packages/fuel-gauge/src/abi/fixtures/scripts/script-index.txt +++ b/packages/fuel-gauge/src/abi/fixtures/scripts/script-index.txt @@ -9,4 +9,4 @@ */ -export * from './AbiScript'; +export { AbiScript } from './AbiScript'; From ff6cbac6b28d68ac699a03328238dc66cd42d867 Mon Sep 17 00:00:00 2001 From: nedsalk Date: Thu, 26 Dec 2024 14:19:07 +0100 Subject: [PATCH 107/126] fix pnpm-lock.yaml --- pnpm-lock.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e0dad7df2fa..67c3a166991 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -935,9 +935,6 @@ importers: packages/fuel-gauge: dependencies: - commander: - specifier: ^12.1.0 - version: 12.1.0 fuels: specifier: workspace:* version: link:../fuels From 632a46c522fcabbf0d4e37847da638b27f61943e Mon Sep 17 00:00:00 2001 From: nedsalk Date: Thu, 26 Dec 2024 14:21:06 +0100 Subject: [PATCH 108/126] rename --- .../abi/src/gen/renderers/ts/renderers/render-index-files.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/abi/src/gen/renderers/ts/renderers/render-index-files.ts b/packages/abi/src/gen/renderers/ts/renderers/render-index-files.ts index ce0f4c07a24..12c9c479871 100644 --- a/packages/abi/src/gen/renderers/ts/renderers/render-index-files.ts +++ b/packages/abi/src/gen/renderers/ts/renderers/render-index-files.ts @@ -51,7 +51,7 @@ export function renderIndexFiles( }); }); - const mainIndexFileImportPaths = [...indexContents.keys()] + const mainIndexFileExports = [...indexContents.keys()] .sort() .map((programType) => getParentDirWrapper(programType).parentDir) .map((path) => ({ path, exportedContent: '*' })); @@ -62,7 +62,7 @@ export function renderIndexFiles( versions, template: indexTemplate, data: { - exports: mainIndexFileImportPaths, + exports: mainIndexFileExports, }, }), }; From 57902f325233a289e3e3983e4a13d0082409fbc4 Mon Sep 17 00:00:00 2001 From: nedsalk Date: Thu, 26 Dec 2024 14:41:56 +0100 Subject: [PATCH 109/126] fix recipes --- packages/recipes/src/index.ts | 1 + 1 file changed, 1 insertion(+) create mode 100644 packages/recipes/src/index.ts diff --git a/packages/recipes/src/index.ts b/packages/recipes/src/index.ts new file mode 100644 index 00000000000..fcb073fefcd --- /dev/null +++ b/packages/recipes/src/index.ts @@ -0,0 +1 @@ +export * from './types'; From 4feb731ef407990735a733d25897002107bed009 Mon Sep 17 00:00:00 2001 From: nedsalk Date: Fri, 27 Dec 2024 08:40:55 +0100 Subject: [PATCH 110/126] log instead of throwing --- packages/abi/src/gen/cli/utils.ts | 3 +- packages/fuel-gauge/src/abi/abi-gen.test.ts | 32 ++++++++++++------- .../src/types/contracts/Src14OwnedProxy.ts | 3 +- packages/recipes/src/types/contracts/index.ts | 4 +-- 4 files changed, 27 insertions(+), 15 deletions(-) diff --git a/packages/abi/src/gen/cli/utils.ts b/packages/abi/src/gen/cli/utils.ts index 136488d0740..dd2f987b3cc 100644 --- a/packages/abi/src/gen/cli/utils.ts +++ b/packages/abi/src/gen/cli/utils.ts @@ -77,7 +77,8 @@ export function getProgramDetails(paths: string[]) { paths.forEach((path) => { const abiPath = path.match(/.+-abi\.json/) ? path : globSync(`${path}/*-abi.json`)[0]; if (abiPath === undefined) { - throw new FuelError(ErrorCode.NO_ABIS_FOUND, `No abi file found in ${path}`); + log(`No abi file found in ${path}, skipping this path.`); + return; } const dir = abiPath.match(/.*\//)?.[0] as string; diff --git a/packages/fuel-gauge/src/abi/abi-gen.test.ts b/packages/fuel-gauge/src/abi/abi-gen.test.ts index 1d17fb82651..e71c595953d 100644 --- a/packages/fuel-gauge/src/abi/abi-gen.test.ts +++ b/packages/fuel-gauge/src/abi/abi-gen.test.ts @@ -71,20 +71,30 @@ describe('AbiGen', () => { }); }); - test('throws if no abi json file found', async () => { - const { buildDir, name } = getAbiForcProject(AbiProjectsEnum.ABI_SCRIPT); - using tmpDir = generateTmpDir(buildDir); + test('logs if no abi json file found and skips path', () => { + const logSpy = vi.spyOn(console, 'log').mockImplementationOnce(() => {}); + const { buildDir: scriptBuildDir, name: scriptName } = getAbiForcProject( + AbiProjectsEnum.ABI_SCRIPT + ); + const { buildDir: predicateBuildDir } = getAbiForcProject(AbiProjectsEnum.ABI_PREDICATE); + using scriptDir = generateTmpDir(scriptBuildDir); - rmSync(join(tmpDir.path, `${name}-abi.json`)); + rmSync(join(scriptDir.path, `${scriptName}-abi.json`)); - await expectToThrowFuelError( - () => - runTypegen({ - inputs: [tmpDir.path], - output: tmpDir.path, - }), - new FuelError(FuelError.CODES.NO_ABIS_FOUND, `No abi file found in ${tmpDir.path}`) + using predicateDir = generateTmpDir(predicateBuildDir); + + runTypegen({ + inputs: [scriptDir.path, predicateDir.path], + output: scriptDir.path, + }); + + expect(logSpy).toHaveBeenCalledWith( + `No abi file found in ${scriptDir.path}, skipping this path.` ); + const outputDirContents = readdirSync(scriptDir.path); + + expect(outputDirContents).not.toContain('scripts'); + expect(outputDirContents).toContain('predicates'); }); test('skips contract factory and bytecode generation when bytecode is missing and logs it', () => { diff --git a/packages/recipes/src/types/contracts/Src14OwnedProxy.ts b/packages/recipes/src/types/contracts/Src14OwnedProxy.ts index 4f9ed736914..34e5ff3ce10 100644 --- a/packages/recipes/src/types/contracts/Src14OwnedProxy.ts +++ b/packages/recipes/src/types/contracts/Src14OwnedProxy.ts @@ -17,7 +17,8 @@ import { type AbstractAddress } from '@fuel-ts/interfaces'; import { type Account, type Provider } from '@fuel-ts/account'; import { abi } from './Src14OwnedProxy-abi'; -export type Src14OwnedProxyTypes = Types; +export * from './Src14OwnedProxyTypes'; + export type Src14OwnedProxyConfigurables = Types['configurables']; export class Src14OwnedProxyInterface extends Interface { diff --git a/packages/recipes/src/types/contracts/index.ts b/packages/recipes/src/types/contracts/index.ts index e053ca83eeb..8a4a504afc5 100644 --- a/packages/recipes/src/types/contracts/index.ts +++ b/packages/recipes/src/types/contracts/index.ts @@ -8,5 +8,5 @@ Forc version: 0.66.5 */ -export * from './Src14OwnedProxy'; -export * from './Src14OwnedProxyFactory'; +export { Src14OwnedProxy } from './Src14OwnedProxy'; +export { Src14OwnedProxyFactory } from './Src14OwnedProxyFactory'; From 62323df1bbd432c9b6520d41b322880aa2bf6f5d Mon Sep 17 00:00:00 2001 From: nedsalk Date: Fri, 27 Dec 2024 09:05:52 +0100 Subject: [PATCH 111/126] fix lint --- packages/abi/package.json | 2 +- pnpm-lock.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/abi/package.json b/packages/abi/package.json index 973f50cf75e..cd672d9abfe 100644 --- a/packages/abi/package.json +++ b/packages/abi/package.json @@ -45,7 +45,7 @@ "@fuel-ts/utils": "workspace:*", "@fuel-ts/versions": "workspace:*", "handlebars": "^4.7.8", - "commander": "^12.1.0", + "commander": "12.1.0", "glob": "^10.4.5" }, "devDependencies": {} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 67c3a166991..6bfbc41eb1e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -647,7 +647,7 @@ importers: specifier: workspace:* version: link:../versions commander: - specifier: ^12.1.0 + specifier: 12.1.0 version: 12.1.0 glob: specifier: ^10.4.5 From 6a008782259bb6583224a104913fca923b271fd4 Mon Sep 17 00:00:00 2001 From: nedsalk Date: Fri, 27 Dec 2024 11:36:25 +0100 Subject: [PATCH 112/126] add `forc` and `fuel-core` to path --- .github/actions/test-setup/action.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/actions/test-setup/action.yaml b/.github/actions/test-setup/action.yaml index 8d7c3d6cf0c..ffaccaf9315 100644 --- a/.github/actions/test-setup/action.yaml +++ b/.github/actions/test-setup/action.yaml @@ -42,3 +42,11 @@ runs: - name: Build run: pnpm build shell: bash + + - name: Set forc and fuel-core paths + shell: bash + run: | + echo "$GITHUB_WORKSPACE/internal/forc/forc-binaries" >> $GITHUB_PATH + echo "$GITHUB_WORKSPACE/internal/fuel-core/fuel-core-binaries" >> $GITHUB_PATH + forc --version + fuel-core --version From ab574c3e571a624a72a6b5046c79934b2df29aaa Mon Sep 17 00:00:00 2001 From: nedsalk Date: Fri, 27 Dec 2024 11:46:46 +0100 Subject: [PATCH 113/126] try again --- .github/actions/test-setup/action.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/test-setup/action.yaml b/.github/actions/test-setup/action.yaml index ffaccaf9315..8a43fa3cee5 100644 --- a/.github/actions/test-setup/action.yaml +++ b/.github/actions/test-setup/action.yaml @@ -46,7 +46,7 @@ runs: - name: Set forc and fuel-core paths shell: bash run: | - echo "$GITHUB_WORKSPACE/internal/forc/forc-binaries" >> $GITHUB_PATH - echo "$GITHUB_WORKSPACE/internal/fuel-core/fuel-core-binaries" >> $GITHUB_PATH + echo "$GITHUB_WORKSPACE/internal/forc/forc-binaries/forc" >> $GITHUB_PATH + echo "$GITHUB_WORKSPACE/internal/fuel-core/fuel-core-binaries/fuel-core" >> $GITHUB_PATH forc --version fuel-core --version From cddae24d3783916ece39b9ecf0d4768a90d4047b Mon Sep 17 00:00:00 2001 From: nedsalk Date: Fri, 27 Dec 2024 11:52:22 +0100 Subject: [PATCH 114/126] try again --- .github/actions/test-setup/action.yaml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/actions/test-setup/action.yaml b/.github/actions/test-setup/action.yaml index 8a43fa3cee5..f7f9f5995c0 100644 --- a/.github/actions/test-setup/action.yaml +++ b/.github/actions/test-setup/action.yaml @@ -39,14 +39,20 @@ runs: with: bun-version: ${{ inputs.bun-version }} - - name: Build - run: pnpm build + - name: Set forc and fuel-core paths shell: bash + run: | + echo "$GITHUB_WORKSPACE/internal/forc/forc-binaries" >> $GITHUB_PATH + echo "$GITHUB_WORKSPACE/internal/fuel-core/fuel-core-binaries" >> $GITHUB_PATH - - name: Set forc and fuel-core paths + - name: Test forc and fuel-core shell: bash run: | - echo "$GITHUB_WORKSPACE/internal/forc/forc-binaries/forc" >> $GITHUB_PATH - echo "$GITHUB_WORKSPACE/internal/fuel-core/fuel-core-binaries/fuel-core" >> $GITHUB_PATH + echo $GITHUB_WORKSPACE + echo $GITHUB_PATH forc --version fuel-core --version + + - name: Build + run: pnpm build + shell: bash From a3a969d17b3a6eb5bf937d74e2ecb150873b58cf Mon Sep 17 00:00:00 2001 From: nedsalk Date: Fri, 27 Dec 2024 12:51:33 +0100 Subject: [PATCH 115/126] fix lint --- apps/demo-typegen/src/demo.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/demo-typegen/src/demo.test.ts b/apps/demo-typegen/src/demo.test.ts index 6288d806b9c..b9c10c12e19 100644 --- a/apps/demo-typegen/src/demo.test.ts +++ b/apps/demo-typegen/src/demo.test.ts @@ -4,7 +4,7 @@ import { expectToThrowFuelError, launchTestNode } from 'fuels/test-utils'; import { DemoContract, DemoContractFactory } from './contract-types'; import { DemoPredicate } from './predicate-types'; -import type { DemoPredicateInputs } from './predicate-types/DemoPredicate'; +import type { DemoPredicateInputs } from './predicate-types/predicates/DemoPredicate'; import { DemoScript } from './script-types'; /** From ff22e9455d44d5f2c02a3d51ba511762fe088e30 Mon Sep 17 00:00:00 2001 From: nedsalk Date: Fri, 27 Dec 2024 14:19:31 +0100 Subject: [PATCH 116/126] Increase timeout --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 4c998dc5738..c09553fc93a 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -25,7 +25,7 @@ jobs: { name: node, version: 22.3.0, display-name: "node@22" }, { name: browser, display-name: "browser" }, ] - timeout-minutes: 25 + timeout-minutes: 100 steps: - name: Checkout uses: actions/checkout@v4 From c3a2b9a95fb308a28e4998829268237edf23e839 Mon Sep 17 00:00:00 2001 From: nedsalk Date: Mon, 30 Dec 2024 14:40:07 +0100 Subject: [PATCH 117/126] cleanup --- .github/actions/test-setup/action.yaml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/actions/test-setup/action.yaml b/.github/actions/test-setup/action.yaml index f7f9f5995c0..0c649356d13 100644 --- a/.github/actions/test-setup/action.yaml +++ b/.github/actions/test-setup/action.yaml @@ -45,14 +45,6 @@ runs: echo "$GITHUB_WORKSPACE/internal/forc/forc-binaries" >> $GITHUB_PATH echo "$GITHUB_WORKSPACE/internal/fuel-core/fuel-core-binaries" >> $GITHUB_PATH - - name: Test forc and fuel-core - shell: bash - run: | - echo $GITHUB_WORKSPACE - echo $GITHUB_PATH - forc --version - fuel-core --version - - name: Build run: pnpm build shell: bash From a96bfa0c30b6159960bee8e10b70503e900103cb Mon Sep 17 00:00:00 2001 From: nedsalk Date: Mon, 30 Dec 2024 14:40:36 +0100 Subject: [PATCH 118/126] revert timeout --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index c09553fc93a..4c998dc5738 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -25,7 +25,7 @@ jobs: { name: node, version: 22.3.0, display-name: "node@22" }, { name: browser, display-name: "browser" }, ] - timeout-minutes: 100 + timeout-minutes: 25 steps: - name: Checkout uses: actions/checkout@v4 From d4ccfe851c4cc4b4d8b2f58472dde89ae61cead0 Mon Sep 17 00:00:00 2001 From: nedsalk Date: Wed, 1 Jan 2025 14:22:34 +0100 Subject: [PATCH 119/126] chore: use playwright in browser tests --- .github/workflows/test.yaml | 4 + apps/create-fuels-counter-guide/package.json | 2 +- package.json | 5 +- pnpm-lock.yaml | 201 ++++++++++++------- templates/nextjs/package.json | 2 +- templates/vite/package.json | 2 +- vitest.browser.config.mts | 12 +- 7 files changed, 145 insertions(+), 83 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index b79ce8e82db..b4eebdd9f42 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -41,6 +41,10 @@ jobs: - name: Pretest run: pnpm pretest + - name: Install playwright dependencies + if: matrix.env.name == 'browser' + run: pnpm exec playwright install --with-deps --only-shell chromium + - name: Run Tests - ${{ matrix.env.name }} run: pnpm test:${{ matrix.env.name }} diff --git a/apps/create-fuels-counter-guide/package.json b/apps/create-fuels-counter-guide/package.json index 56d4f41121a..907c08498c4 100644 --- a/apps/create-fuels-counter-guide/package.json +++ b/apps/create-fuels-counter-guide/package.json @@ -30,7 +30,7 @@ "@vitejs/plugin-react": "^4.3.3", "@eslint/js": "^9.10.0", "@types/node": "^22.5.5", - "@playwright/test": "^1.47.2", + "@playwright/test": "^1.49.1", "@types/react": "^18.3.11", "@types/react-dom": "^18.3", "autoprefixer": "^10.4.20", diff --git a/package.json b/package.json index 0bc25643490..07d7e871f14 100644 --- a/package.json +++ b/package.json @@ -80,7 +80,7 @@ "@internal/fuel-core": "workspace:*", "@internal/tsup": "workspace:*", "@istanbuljs/nyc-config-typescript": "^1.0.2", - "@playwright/test": "^1.47.2", + "@playwright/test": "^1.49.1", "@types/node": "^22.5.5", "@types/node-fetch": "^2.6.11", "@types/web": "^0.0.174", @@ -124,8 +124,7 @@ "vite-plugin-json5": "^1.1.2", "vite-plugin-node-polyfills": "^0.22.0", "vite-plugin-plain-text": "^1.4.2", - "vitest": "~2.0.5", - "webdriverio": "^9.0.9" + "vitest": "~2.0.5" }, "pnpm": { "overrides": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e26d2d2d068..84d3d93dfba 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -45,8 +45,8 @@ importers: specifier: ^1.0.2 version: 1.0.2(nyc@17.1.0) '@playwright/test': - specifier: ^1.47.2 - version: 1.47.2 + specifier: ^1.49.1 + version: 1.49.1 '@types/node': specifier: ^22.5.5 version: 22.5.5 @@ -64,10 +64,10 @@ importers: version: 6.21.0(eslint@8.57.0)(typescript@5.6.3) '@vitest/browser': specifier: ~2.0.5 - version: 2.0.5(bufferutil@4.0.8)(playwright@1.47.2)(typescript@5.6.3)(utf-8-validate@6.0.4)(vitest@2.0.5)(webdriverio@9.0.9(bufferutil@4.0.8)(utf-8-validate@6.0.4)) + version: 2.0.5(bufferutil@4.0.8)(playwright@1.49.1)(typescript@5.6.3)(utf-8-validate@6.0.4)(vitest@2.0.5)(webdriverio@9.0.9(bufferutil@4.0.8)(utf-8-validate@6.0.4)) '@vitest/coverage-istanbul': specifier: ~2.0.5 - version: 2.0.5(vitest@2.0.5) + version: 2.0.5(vitest@2.0.5(@types/node@22.5.5)(@vitest/browser@2.0.5)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@6.0.4))(terser@5.36.0)) autocannon: specifier: ^7.15.0 version: 7.15.0 @@ -179,9 +179,6 @@ importers: vitest: specifier: ~2.0.5 version: 2.0.5(@types/node@22.5.5)(@vitest/browser@2.0.5)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@6.0.4))(terser@5.36.0) - webdriverio: - specifier: ^9.0.9 - version: 9.0.9(bufferutil@4.0.8)(utf-8-validate@6.0.4) apps/create-fuels-counter-guide: dependencies: @@ -223,8 +220,8 @@ importers: specifier: ^9.10.0 version: 9.10.0 '@playwright/test': - specifier: ^1.47.2 - version: 1.47.2 + specifier: ^1.49.1 + version: 1.49.1 '@types/node': specifier: ^22.5.5 version: 22.5.5 @@ -318,7 +315,7 @@ importers: version: link:../../packages/fuels next: specifier: 14.2.15 - version: 14.2.15(@babel/core@7.25.8)(@playwright/test@1.47.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 14.2.15(@babel/core@7.25.8)(@playwright/test@1.49.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: specifier: ^18.3.1 version: 18.3.1 @@ -456,7 +453,7 @@ importers: version: link:../../packages/fuels next: specifier: 14.2.15 - version: 14.2.15(@babel/core@7.25.8)(@playwright/test@1.47.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 14.2.15(@babel/core@7.25.8)(@playwright/test@1.49.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: specifier: ^18.3.1 version: 18.3.1 @@ -1269,7 +1266,7 @@ importers: version: link:../../packages/fuels next: specifier: 14.2.15 - version: 14.2.15(@babel/core@7.25.8)(@playwright/test@1.47.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 14.2.15(@babel/core@7.25.8)(@playwright/test@1.49.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: specifier: ^18.3.1 version: 18.3.1 @@ -1284,8 +1281,8 @@ importers: version: 17.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) devDependencies: '@playwright/test': - specifier: ^1.47.2 - version: 1.47.2 + specifier: ^1.49.1 + version: 1.49.1 '@types/node': specifier: ^22.5.5 version: 22.5.5 @@ -1357,8 +1354,8 @@ importers: specifier: ^9.10.0 version: 9.10.0 '@playwright/test': - specifier: ^1.47.2 - version: 1.47.2 + specifier: ^1.49.1 + version: 1.49.1 '@tanstack/router-plugin': specifier: ^1.58.12 version: 1.58.12(vite@5.4.9(@types/node@22.7.7)(terser@5.36.0))(webpack-sources@3.2.3) @@ -4549,8 +4546,8 @@ packages: resolution: {integrity: sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==} engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} - '@playwright/test@1.47.2': - resolution: {integrity: sha512-jTXRsoSPONAs8Za9QEQdyjFn+0ZQFjCiIztAIF6bi1HqhBzG9Ma7g1WotyiGqFSBRZjIEqMdT8RUlbk1QVhzCQ==} + '@playwright/test@1.49.1': + resolution: {integrity: sha512-Ky+BVzPz8pL6PQxHqNRW1k3mIyv933LML7HktS8uik0bUXNCdPhoS/kLihiO1tMf/egaJb4IutXd7UywvXEW+g==} engines: {node: '>=18'} hasBin: true @@ -9178,10 +9175,6 @@ packages: fast-stable-stringify@1.0.0: resolution: {integrity: sha512-wpYMUmFu5f00Sm0cj2pfivpmawLZ0NKdviQ4w9zJeR8JVtOpOxHmLaJuj0vxvGqMJQWyP/COUkF75/57OKyRag==} - fast-xml-parser@4.4.1: - resolution: {integrity: sha512-xkjOecfnKGkSsOwtZ5Pz7Us/T6mrbPQrq0nh+aCO5V9nk5NLWmasAHumTKjiPJPWANe+kAZ84Jc8ooJkzZ88Sw==} - hasBin: true - fast-xml-parser@4.5.0: resolution: {integrity: sha512-/PlTQCI96+fZMAOLMZK4CWG1ItCbfZ/0jx7UIJFChPNrx7tcEgerUgWbeieCM9MfHInUDyK8DWYZ+YrywDJuTg==} hasBin: true @@ -12291,13 +12284,13 @@ packages: resolution: {integrity: sha512-nDywThFk1i4BQK4twPQ6TA4RT8bDY96yeuCVBWL3ePARCiEKDRSrNGbFIgUJpLp+XeIR65v8ra7WuJOFUBtkMA==} engines: {node: '>=8'} - playwright-core@1.47.2: - resolution: {integrity: sha512-3JvMfF+9LJfe16l7AbSmU555PaTl2tPyQsVInqm3id16pdDfvZ8TTZ/pyzmkbDrZTQefyzU7AIHlZqQnxpqHVQ==} + playwright-core@1.49.1: + resolution: {integrity: sha512-BzmpVcs4kE2CH15rWfzpjzVGhWERJfmnXmniSyKeRZUs9Ws65m+RGIi7mjJK/euCegfn3i7jvqWeWyHe9y3Vgg==} engines: {node: '>=18'} hasBin: true - playwright@1.47.2: - resolution: {integrity: sha512-nx1cLMmQWqmA3UsnjaaokyoUpdVaaDhJhMoxX2qj3McpjnsqFHs516QAKYhqHAgOP+oCFTEOCOAaD1RgD/RQfA==} + playwright@1.49.1: + resolution: {integrity: sha512-VYL8zLoNTBxVOrJBbDuRgDWa3i+mfQgDTrL8Ah9QXZ7ax4Dsj0MSq5bYgytRnDVVe+njoKnfsYkH3HzqVj5UZA==} engines: {node: '>=18'} hasBin: true @@ -20820,9 +20813,9 @@ snapshots: '@pkgr/core@0.1.1': {} - '@playwright/test@1.47.2': + '@playwright/test@1.49.1': dependencies: - playwright: 1.47.2 + playwright: 1.49.1 '@pmmmwh/react-refresh-webpack-plugin@0.5.10(react-refresh@0.11.0)(type-fest@3.1.0)(webpack-dev-server@4.15.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)))(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19))': dependencies: @@ -20846,6 +20839,7 @@ snapshots: '@promptbook/utils@0.63.0': dependencies: spacetrim: 0.11.39 + optional: true '@puppeteer/browsers@2.4.0': dependencies: @@ -20859,6 +20853,7 @@ snapshots: yargs: 17.7.2 transitivePeerDependencies: - supports-color + optional: true '@radix-ui/primitive@1.0.1': dependencies: @@ -22264,6 +22259,7 @@ snapshots: '@types/node@20.14.15': dependencies: undici-types: 5.26.5 + optional: true '@types/node@22.5.5': dependencies: @@ -22358,7 +22354,8 @@ snapshots: '@types/mime': 3.0.1 '@types/node': 22.7.7 - '@types/sinonjs__fake-timers@8.1.5': {} + '@types/sinonjs__fake-timers@8.1.5': + optional: true '@types/sockjs@0.3.33': dependencies: @@ -22386,7 +22383,8 @@ snapshots: '@types/webgl-ext@0.0.30': {} - '@types/which@2.0.2': {} + '@types/which@2.0.2': + optional: true '@types/wrap-ansi@3.0.0': {} @@ -22778,7 +22776,7 @@ snapshots: vite: 5.4.9(@types/node@22.7.7)(terser@5.36.0) vue: 3.5.12(typescript@5.6.3) - '@vitest/browser@2.0.5(bufferutil@4.0.8)(playwright@1.47.2)(typescript@5.6.3)(utf-8-validate@5.0.10)(vitest@2.0.5)(webdriverio@9.0.9(bufferutil@4.0.8)(utf-8-validate@5.0.10))': + '@vitest/browser@2.0.5(bufferutil@4.0.8)(playwright@1.49.1)(typescript@5.6.3)(utf-8-validate@5.0.10)(vitest@2.0.5)(webdriverio@9.0.9(bufferutil@4.0.8)(utf-8-validate@5.0.10))': dependencies: '@testing-library/dom': 10.4.0 '@testing-library/user-event': 14.5.2(@testing-library/dom@10.4.0) @@ -22789,7 +22787,7 @@ snapshots: vitest: 2.0.5(@types/node@22.5.5)(@vitest/browser@2.0.5)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.36.0) ws: 8.18.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) optionalDependencies: - playwright: 1.47.2 + playwright: 1.49.1 webdriverio: 9.0.9(bufferutil@4.0.8)(utf-8-validate@5.0.10) transitivePeerDependencies: - bufferutil @@ -22797,7 +22795,7 @@ snapshots: - utf-8-validate optional: true - '@vitest/browser@2.0.5(bufferutil@4.0.8)(playwright@1.47.2)(typescript@5.6.3)(utf-8-validate@6.0.4)(vitest@2.0.5)(webdriverio@9.0.9(bufferutil@4.0.8)(utf-8-validate@6.0.4))': + '@vitest/browser@2.0.5(bufferutil@4.0.8)(playwright@1.49.1)(typescript@5.6.3)(utf-8-validate@6.0.4)(vitest@2.0.5)(webdriverio@9.0.9(bufferutil@4.0.8)(utf-8-validate@6.0.4))': dependencies: '@testing-library/dom': 10.4.0 '@testing-library/user-event': 14.5.2(@testing-library/dom@10.4.0) @@ -22808,14 +22806,14 @@ snapshots: vitest: 2.0.5(@types/node@22.5.5)(@vitest/browser@2.0.5)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@6.0.4))(terser@5.36.0) ws: 8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.4) optionalDependencies: - playwright: 1.47.2 + playwright: 1.49.1 webdriverio: 9.0.9(bufferutil@4.0.8)(utf-8-validate@6.0.4) transitivePeerDependencies: - bufferutil - typescript - utf-8-validate - '@vitest/coverage-istanbul@2.0.5(vitest@2.0.5)': + '@vitest/coverage-istanbul@2.0.5(vitest@2.0.5(@types/node@22.5.5)(@vitest/browser@2.0.5)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@6.0.4))(terser@5.36.0))': dependencies: '@istanbuljs/schema': 0.1.3 debug: 4.3.7(supports-color@5.5.0) @@ -23868,6 +23866,7 @@ snapshots: import-meta-resolve: 4.1.0 transitivePeerDependencies: - supports-color + optional: true '@wdio/logger@8.38.0': dependencies: @@ -23875,6 +23874,7 @@ snapshots: loglevel: 1.9.1 loglevel-plugin-prefix: 0.8.4 strip-ansi: 7.1.0 + optional: true '@wdio/logger@9.0.8': dependencies: @@ -23882,16 +23882,20 @@ snapshots: loglevel: 1.9.1 loglevel-plugin-prefix: 0.8.4 strip-ansi: 7.1.0 + optional: true - '@wdio/protocols@9.0.8': {} + '@wdio/protocols@9.0.8': + optional: true '@wdio/repl@9.0.8': dependencies: '@types/node': 20.14.15 + optional: true '@wdio/types@9.0.8': dependencies: '@types/node': 20.14.15 + optional: true '@wdio/utils@9.0.8': dependencies: @@ -23910,6 +23914,7 @@ snapshots: wait-port: 1.1.0 transitivePeerDependencies: - supports-color + optional: true '@web3modal/common@5.0.0': dependencies: @@ -24256,7 +24261,8 @@ snapshots: '@xtuc/long@4.2.2': {} - '@zip.js/zip.js@2.7.48': {} + '@zip.js/zip.js@2.7.48': + optional: true JSONStream@1.3.5: dependencies: @@ -24461,6 +24467,7 @@ snapshots: lodash: 4.17.21 normalize-path: 3.0.0 readable-stream: 4.5.2 + optional: true archiver@7.0.1: dependencies: @@ -24471,6 +24478,7 @@ snapshots: readdir-glob: 1.1.3 tar-stream: 3.1.7 zip-stream: 6.0.1 + optional: true archy@1.0.0: {} @@ -25309,9 +25317,11 @@ snapshots: buffer-alloc-unsafe: 1.1.0 buffer-fill: 1.0.0 - buffer-crc32@0.2.13: {} + buffer-crc32@0.2.13: + optional: true - buffer-crc32@1.0.0: {} + buffer-crc32@1.0.0: + optional: true buffer-equal@0.0.1: {} @@ -25816,6 +25826,7 @@ snapshots: is-stream: 2.0.1 normalize-path: 3.0.0 readable-stream: 4.5.2 + optional: true compressible@2.0.18: dependencies: @@ -25996,6 +26007,7 @@ snapshots: dependencies: crc-32: 1.2.2 readable-stream: 4.5.2 + optional: true create-ecdh@4.0.4: dependencies: @@ -26144,7 +26156,8 @@ snapshots: domutils: 3.1.0 nth-check: 2.1.1 - css-shorthand-properties@1.1.1: {} + css-shorthand-properties@1.1.1: + optional: true css-tree@1.0.0-alpha.37: dependencies: @@ -26156,7 +26169,8 @@ snapshots: mdn-data: 2.0.14 source-map: 0.6.1 - css-value@0.0.1: {} + css-value@0.0.1: + optional: true css-what@3.4.2: {} @@ -26401,7 +26415,8 @@ snapshots: decamelize@1.2.0: {} - decamelize@6.0.0: {} + decamelize@6.0.0: + optional: true decimal.js@10.4.3: {} @@ -26440,7 +26455,8 @@ snapshots: deep-is@0.1.4: {} - deepmerge-ts@7.1.0: {} + deepmerge-ts@7.1.0: + optional: true deepmerge@4.3.1: {} @@ -26717,6 +26733,7 @@ snapshots: dependencies: '@types/which': 2.0.2 which: 2.0.2 + optional: true edgedriver@5.6.1: dependencies: @@ -26724,9 +26741,10 @@ snapshots: '@zip.js/zip.js': 2.7.48 decamelize: 6.0.0 edge-paths: 3.0.5 - fast-xml-parser: 4.4.1 + fast-xml-parser: 4.5.0 node-fetch: 3.3.2 which: 4.0.0 + optional: true ee-first@1.1.1: {} @@ -27903,6 +27921,7 @@ snapshots: '@types/yauzl': 2.10.3 transitivePeerDependencies: - supports-color + optional: true extsprintf@1.3.0: {} @@ -27914,13 +27933,15 @@ snapshots: fast-decode-uri-component@1.0.1: {} - fast-deep-equal@2.0.1: {} + fast-deep-equal@2.0.1: + optional: true fast-deep-equal@3.1.3: {} fast-diff@1.3.0: {} - fast-fifo@1.3.2: {} + fast-fifo@1.3.2: + optional: true fast-glob@3.3.1: dependencies: @@ -27954,10 +27975,6 @@ snapshots: fast-stable-stringify@1.0.0: {} - fast-xml-parser@4.4.1: - dependencies: - strnum: 1.0.5 - fast-xml-parser@4.5.0: dependencies: strnum: 1.0.5 @@ -27993,6 +28010,7 @@ snapshots: fd-slicer@1.1.0: dependencies: pend: 1.2.0 + optional: true fetch-blob@3.2.0: dependencies: @@ -28273,6 +28291,7 @@ snapshots: which: 4.0.0 transitivePeerDependencies: - supports-color + optional: true generate-function@2.3.1: dependencies: @@ -28317,7 +28336,8 @@ snapshots: get-port-please@3.1.2: {} - get-port@7.1.0: {} + get-port@7.1.0: + optional: true get-stream@4.1.0: dependencies: @@ -28718,7 +28738,8 @@ snapshots: htmlescape@1.1.1: {} - htmlfy@0.2.1: {} + htmlfy@0.2.1: + optional: true htmlparser2@6.1.0: dependencies: @@ -28882,7 +28903,8 @@ snapshots: dependencies: queue: 6.0.2 - immediate@3.0.6: {} + immediate@3.0.6: + optional: true immer@9.0.21: {} @@ -28907,7 +28929,8 @@ snapshots: pkg-dir: 4.2.0 resolve-cwd: 3.0.0 - import-meta-resolve@4.1.0: {} + import-meta-resolve@4.1.0: + optional: true imurmurhash@0.1.4: {} @@ -29170,7 +29193,8 @@ snapshots: is-plain-obj@3.0.0: {} - is-plain-obj@4.1.0: {} + is-plain-obj@4.1.0: + optional: true is-plain-object@2.0.4: dependencies: @@ -29276,7 +29300,8 @@ snapshots: isexe@2.0.0: {} - isexe@3.1.1: {} + isexe@3.1.1: + optional: true isobject@3.0.1: {} @@ -30140,6 +30165,7 @@ snapshots: pako: 1.0.11 readable-stream: 2.3.8 setimmediate: 1.0.5 + optional: true keccak@3.0.4: dependencies: @@ -30207,6 +30233,7 @@ snapshots: lazystream@1.0.1: dependencies: readable-stream: 2.3.8 + optional: true leven@2.1.0: {} @@ -30225,6 +30252,7 @@ snapshots: lie@3.3.0: dependencies: immediate: 3.0.6 + optional: true lighthouse-logger@1.4.2: dependencies: @@ -30349,6 +30377,7 @@ snapshots: '@promptbook/utils': 0.63.0 type-fest: 2.13.0 userhome: 1.0.0 + optional: true locate-path@3.0.0: dependencies: @@ -30391,7 +30420,8 @@ snapshots: lodash.uniq@4.5.0: {} - lodash.zip@4.2.0: {} + lodash.zip@4.2.0: + optional: true lodash@4.17.21: {} @@ -30418,9 +30448,11 @@ snapshots: dayjs: 1.11.13 yargs: 15.4.1 - loglevel-plugin-prefix@0.8.4: {} + loglevel-plugin-prefix@0.8.4: + optional: true - loglevel@1.9.1: {} + loglevel@1.9.1: + optional: true long@4.0.0: {} @@ -31118,7 +31150,7 @@ snapshots: next-tick@1.1.0: {} - next@14.2.15(@babel/core@7.25.8)(@playwright/test@1.47.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + next@14.2.15(@babel/core@7.25.8)(@playwright/test@1.49.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: '@next/env': 14.2.15 '@swc/helpers': 0.5.5 @@ -31139,7 +31171,7 @@ snapshots: '@next/swc-win32-arm64-msvc': 14.2.15 '@next/swc-win32-ia32-msvc': 14.2.15 '@next/swc-win32-x64-msvc': 14.2.15 - '@playwright/test': 1.47.2 + '@playwright/test': 1.49.1 transitivePeerDependencies: - '@babel/core' - babel-plugin-macros @@ -31768,7 +31800,8 @@ snapshots: safe-buffer: 5.2.1 sha.js: 2.4.11 - pend@1.2.0: {} + pend@1.2.0: + optional: true perfect-debounce@1.0.0: {} @@ -31841,11 +31874,11 @@ snapshots: dependencies: find-up: 3.0.0 - playwright-core@1.47.2: {} + playwright-core@1.49.1: {} - playwright@1.47.2: + playwright@1.49.1: dependencies: - playwright-core: 1.47.2 + playwright-core: 1.49.1 optionalDependencies: fsevents: 2.3.2 @@ -32536,7 +32569,8 @@ snapshots: qs@6.5.3: {} - query-selector-shadow-dom@1.0.1: {} + query-selector-shadow-dom@1.0.1: + optional: true query-string@7.1.3: dependencies: @@ -32990,6 +33024,7 @@ snapshots: readdir-glob@1.1.3: dependencies: minimatch: 5.1.6 + optional: true readdirp@3.6.0: dependencies: @@ -33201,6 +33236,7 @@ snapshots: resq@1.11.0: dependencies: fast-deep-equal: 2.0.1 + optional: true restore-cursor@2.0.0: dependencies: @@ -33225,7 +33261,8 @@ snapshots: rfdc@1.4.1: {} - rgb2hex@0.2.5: {} + rgb2hex@0.2.5: + optional: true rimraf@2.6.3: dependencies: @@ -33333,7 +33370,8 @@ snapshots: dependencies: tslib: 2.8.0 - safaridriver@0.1.2: {} + safaridriver@0.1.2: + optional: true safe-array-concat@1.1.2: dependencies: @@ -33509,6 +33547,7 @@ snapshots: serialize-error@11.0.3: dependencies: type-fest: 2.19.0 + optional: true serialize-error@2.1.0: {} @@ -33773,7 +33812,8 @@ snapshots: sourcemap-codec@1.4.8: {} - spacetrim@0.11.39: {} + spacetrim@0.11.39: + optional: true spawn-wrap@2.0.0: dependencies: @@ -33961,6 +34001,7 @@ snapshots: text-decoder: 1.1.1 optionalDependencies: bare-events: 2.4.2 + optional: true strict-event-emitter@0.5.1: {} @@ -34337,12 +34378,14 @@ snapshots: optionalDependencies: bare-fs: 2.3.1 bare-path: 2.1.3 + optional: true tar-stream@3.1.7: dependencies: b4a: 1.6.6 fast-fifo: 1.3.2 streamx: 2.18.0 + optional: true temp-dir@2.0.0: {} @@ -34419,6 +34462,7 @@ snapshots: text-decoder@1.1.1: dependencies: b4a: 1.6.6 + optional: true text-encoding-utf-8@1.0.2: {} @@ -34756,7 +34800,8 @@ snapshots: type-fest@0.8.1: {} - type-fest@2.13.0: {} + type-fest@2.13.0: + optional: true type-fest@2.19.0: {} @@ -34877,6 +34922,7 @@ snapshots: dependencies: buffer: 5.7.1 through: 2.3.8 + optional: true unc-path-regex@0.1.2: {} @@ -35069,7 +35115,8 @@ snapshots: dependencies: react: 18.3.1 - userhome@1.0.0: {} + userhome@1.0.0: + optional: true utf-8-validate@5.0.10: dependencies: @@ -35330,7 +35377,7 @@ snapshots: why-is-node-running: 2.3.0 optionalDependencies: '@types/node': 22.5.5 - '@vitest/browser': 2.0.5(bufferutil@4.0.8)(playwright@1.47.2)(typescript@5.6.3)(utf-8-validate@5.0.10)(vitest@2.0.5)(webdriverio@9.0.9(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + '@vitest/browser': 2.0.5(bufferutil@4.0.8)(playwright@1.49.1)(typescript@5.6.3)(utf-8-validate@5.0.10)(vitest@2.0.5)(webdriverio@9.0.9(bufferutil@4.0.8)(utf-8-validate@5.0.10)) jsdom: 16.7.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) transitivePeerDependencies: - less @@ -35365,7 +35412,7 @@ snapshots: why-is-node-running: 2.3.0 optionalDependencies: '@types/node': 22.5.5 - '@vitest/browser': 2.0.5(bufferutil@4.0.8)(playwright@1.47.2)(typescript@5.6.3)(utf-8-validate@6.0.4)(vitest@2.0.5)(webdriverio@9.0.9(bufferutil@4.0.8)(utf-8-validate@6.0.4)) + '@vitest/browser': 2.0.5(bufferutil@4.0.8)(playwright@1.49.1)(typescript@5.6.3)(utf-8-validate@6.0.4)(vitest@2.0.5)(webdriverio@9.0.9(bufferutil@4.0.8)(utf-8-validate@6.0.4)) jsdom: 16.7.0(bufferutil@4.0.8)(utf-8-validate@6.0.4) transitivePeerDependencies: - less @@ -35400,7 +35447,7 @@ snapshots: why-is-node-running: 2.3.0 optionalDependencies: '@types/node': 22.7.7 - '@vitest/browser': 2.0.5(bufferutil@4.0.8)(playwright@1.47.2)(typescript@5.6.3)(utf-8-validate@5.0.10)(vitest@2.0.5)(webdriverio@9.0.9(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + '@vitest/browser': 2.0.5(bufferutil@4.0.8)(playwright@1.49.1)(typescript@5.6.3)(utf-8-validate@5.0.10)(vitest@2.0.5)(webdriverio@9.0.9(bufferutil@4.0.8)(utf-8-validate@5.0.10)) jsdom: 16.7.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) transitivePeerDependencies: - less @@ -35445,6 +35492,7 @@ snapshots: debug: 4.3.7(supports-color@5.5.0) transitivePeerDependencies: - supports-color + optional: true walker@1.0.8: dependencies: @@ -35504,6 +35552,7 @@ snapshots: - bufferutil - supports-color - utf-8-validate + optional: true webdriverio@9.0.9(bufferutil@4.0.8)(utf-8-validate@5.0.10): dependencies: @@ -35573,6 +35622,7 @@ snapshots: - bufferutil - supports-color - utf-8-validate + optional: true webextension-polyfill@0.10.0: {} @@ -35778,6 +35828,7 @@ snapshots: which@4.0.0: dependencies: isexe: 3.1.1 + optional: true why-is-node-running@2.3.0: dependencies: @@ -36108,6 +36159,7 @@ snapshots: dependencies: buffer-crc32: 0.2.13 fd-slicer: 1.1.0 + optional: true yn@3.1.1: optional: true @@ -36128,6 +36180,7 @@ snapshots: archiver-utils: 5.0.2 compress-commons: 6.0.2 readable-stream: 4.5.2 + optional: true zod-validation-error@3.4.0(zod@3.23.8): dependencies: diff --git a/templates/nextjs/package.json b/templates/nextjs/package.json index 938024bfed4..f13ecaf53e9 100644 --- a/templates/nextjs/package.json +++ b/templates/nextjs/package.json @@ -29,7 +29,7 @@ }, "devDependencies": { "@types/node": "^22.5.5", - "@playwright/test": "^1.47.2", + "@playwright/test": "^1.49.1", "@types/react": "^18.3.11", "@types/react-dom": "^18.3", "autoprefixer": "^10.4.20", diff --git a/templates/vite/package.json b/templates/vite/package.json index 948a2eda76f..4a1a2e42200 100644 --- a/templates/vite/package.json +++ b/templates/vite/package.json @@ -29,7 +29,7 @@ "@vitejs/plugin-react": "^4.3.3", "@eslint/js": "^9.10.0", "@tanstack/router-plugin": "^1.58.12", - "@playwright/test": "^1.47.2", + "@playwright/test": "^1.49.1", "@types/react": "^18.3.11", "@types/react-dom": "^18.3", "autoprefixer": "^10.4.20", diff --git a/vitest.browser.config.mts b/vitest.browser.config.mts index 229dd4f1c66..d0646b81e26 100644 --- a/vitest.browser.config.mts +++ b/vitest.browser.config.mts @@ -30,7 +30,12 @@ const config: UserConfig = { }), ], optimizeDeps: { - exclude: ["fsevents", "path-scurry", "@vitest/coverage-istanbul"], + exclude: [ + "fsevents", + "path-scurry", + "@vitest/coverage-istanbul", + "chromium-bidi", + ], include: ["events", "timers/promises"], entries: ["**/*.test.ts"], }, @@ -43,10 +48,11 @@ const config: UserConfig = { reportsDirectory: "coverage/environments/browser", }, browser: { - provider: "webdriverio", + provider: "playwright", + isolate: false, headless: true, enabled: true, - name: "chrome", + name: "chromium", }, }, }; From be771438af810ea3dd59573e9fc01606fcd8c1d4 Mon Sep 17 00:00:00 2001 From: nedsalk Date: Wed, 1 Jan 2025 14:58:39 +0100 Subject: [PATCH 120/126] revert isolate flag for safety --- vitest.browser.config.mts | 1 - 1 file changed, 1 deletion(-) diff --git a/vitest.browser.config.mts b/vitest.browser.config.mts index d0646b81e26..537bfe82ecd 100644 --- a/vitest.browser.config.mts +++ b/vitest.browser.config.mts @@ -49,7 +49,6 @@ const config: UserConfig = { }, browser: { provider: "playwright", - isolate: false, headless: true, enabled: true, name: "chromium", From 423834cbaf08799b5f210e8c3cd66c19c54f9465 Mon Sep 17 00:00:00 2001 From: nedsalk Date: Thu, 2 Jan 2025 15:16:18 +0100 Subject: [PATCH 121/126] revert some changes --- apps/docs/src/guide/fuels-cli/generating-types.md | 2 +- .../snippets/native-parameters/identity-contract.ts | 2 +- apps/docs/src/guide/types/snippets/vectors.ts | 2 +- packages/fuel-gauge/src/dry-run-multiple-txs.test.ts | 2 +- packages/fuel-gauge/src/fee.test.ts | 2 +- packages/fuel-gauge/src/options.test.ts | 2 +- .../fuel-gauge/src/script-with-configurable.test.ts | 10 +++++----- packages/fuel-gauge/src/script-with-vectors.test.ts | 2 +- packages/fuel-gauge/src/token-test-contract.test.ts | 2 +- packages/fuel-gauge/src/transaction-summary.test.ts | 5 +---- packages/fuel-gauge/src/vectors.test.ts | 2 +- templates/vite/test/integration/predicate.test.ts | 7 ++----- 12 files changed, 17 insertions(+), 23 deletions(-) diff --git a/apps/docs/src/guide/fuels-cli/generating-types.md b/apps/docs/src/guide/fuels-cli/generating-types.md index af4a21de6bc..168ab5de845 100644 --- a/apps/docs/src/guide/fuels-cli/generating-types.md +++ b/apps/docs/src/guide/fuels-cli/generating-types.md @@ -47,7 +47,7 @@ pnpm fuels typegen -i ./my-program/out/release -o ./types -The path after the input flag `-i` should point to the file folder where the `forc build` results are. +The path after the input flag `-i` should point to the folder where the `forc build` outputs are. The path after the output flag `-o` will be the output directory for the generated types. diff --git a/apps/docs/src/guide/types/snippets/native-parameters/identity-contract.ts b/apps/docs/src/guide/types/snippets/native-parameters/identity-contract.ts index 0a700158a99..6a1021ef45a 100644 --- a/apps/docs/src/guide/types/snippets/native-parameters/identity-contract.ts +++ b/apps/docs/src/guide/types/snippets/native-parameters/identity-contract.ts @@ -5,7 +5,7 @@ import { InputOutputTypesFactory } from '../../../../typegend'; import type { ContractIdOutput, IdentityOutput, -} from '../../../../typegend/contracts/InputOutputTypesTypes'; +} from '../../../../typegend/contracts/InputOutputTypes'; const provider = await Provider.create(LOCAL_NETWORK_URL); const wallet = Wallet.fromPrivateKey(WALLET_PVT_KEY, provider); diff --git a/apps/docs/src/guide/types/snippets/vectors.ts b/apps/docs/src/guide/types/snippets/vectors.ts index cd4adb14264..9fcedea29e9 100644 --- a/apps/docs/src/guide/types/snippets/vectors.ts +++ b/apps/docs/src/guide/types/snippets/vectors.ts @@ -6,7 +6,7 @@ import { BytecodeInputFactory, EchoEmployeeDataVectorFactory, } from '../../../typegend'; -import type { EmployeeDataInput } from '../../../typegend/contracts/EchoEmployeeDataVectorTypes'; +import type { EmployeeDataInput } from '../../../typegend/contracts/EchoEmployeeDataVector'; const provider = await Provider.create(LOCAL_NETWORK_URL); const wallet = Wallet.fromPrivateKey(WALLET_PVT_KEY, provider); diff --git a/packages/fuel-gauge/src/dry-run-multiple-txs.test.ts b/packages/fuel-gauge/src/dry-run-multiple-txs.test.ts index 5f5346d976f..729f6dbd1a1 100644 --- a/packages/fuel-gauge/src/dry-run-multiple-txs.test.ts +++ b/packages/fuel-gauge/src/dry-run-multiple-txs.test.ts @@ -14,7 +14,7 @@ import { MultiTokenContractFactory, RevertErrorFactory, } from '../test/typegen/contracts'; -import type { AddressInput } from '../test/typegen/contracts/MultiTokenContractTypes'; +import type { AddressInput } from '../test/typegen/contracts/MultiTokenContract'; /** * @group node diff --git a/packages/fuel-gauge/src/fee.test.ts b/packages/fuel-gauge/src/fee.test.ts index 469ff6dbb85..f5c5a53440e 100644 --- a/packages/fuel-gauge/src/fee.test.ts +++ b/packages/fuel-gauge/src/fee.test.ts @@ -16,7 +16,7 @@ import { MultiTokenContract, MultiTokenContractFactory, } from '../test/typegen/contracts'; -import type { AddressInput } from '../test/typegen/contracts/MultiTokenContractTypes'; +import type { AddressInput } from '../test/typegen/contracts/MultiTokenContract'; import { PredicateU32 } from '../test/typegen/predicates/PredicateU32'; /** diff --git a/packages/fuel-gauge/src/options.test.ts b/packages/fuel-gauge/src/options.test.ts index 373635aea79..6e7cfd30178 100644 --- a/packages/fuel-gauge/src/options.test.ts +++ b/packages/fuel-gauge/src/options.test.ts @@ -2,8 +2,8 @@ import type { BigNumberish } from 'fuels'; import { launchTestNode } from 'fuels/test-utils'; import type { Option } from '../test/typegen/common'; +import type { DeepStructInput } from '../test/typegen/contracts/Options'; import { OptionsFactory } from '../test/typegen/contracts/OptionsFactory'; -import type { DeepStructInput } from '../test/typegen/contracts/OptionsTypes'; import { launchTestContract } from './utils'; diff --git a/packages/fuel-gauge/src/script-with-configurable.test.ts b/packages/fuel-gauge/src/script-with-configurable.test.ts index cd93ebce39a..c2004172124 100644 --- a/packages/fuel-gauge/src/script-with-configurable.test.ts +++ b/packages/fuel-gauge/src/script-with-configurable.test.ts @@ -1,9 +1,9 @@ import { launchTestNode } from 'fuels/test-utils'; import { ScriptWithConfigurable } from '../test/typegen'; -import type { ScriptWithConfigurableTypes } from '../test/typegen/scripts/ScriptWithConfigurableTypes'; +import type { ScriptWithConfigurableConfigurables } from '../test/typegen/scripts/ScriptWithConfigurable'; -const defaultValues: Required = { +const defaultValues: Required = { FEE: 5, }; @@ -36,7 +36,7 @@ describe('Script With Configurable', () => { wallets: [wallet], } = launched; - const configurableConstants: Required = { + const configurableConstants: Required = { FEE: 71, }; @@ -59,7 +59,7 @@ describe('Script With Configurable', () => { wallets: [wallet], } = launched; - const configurableConstants: Required = { + const configurableConstants: Required = { FEE: 35, }; @@ -80,7 +80,7 @@ describe('Script With Configurable', () => { wallets: [wallet], } = launched; - const configurableConstants: ScriptWithConfigurableTypes['configurables'] = { FEE: 10 }; + const configurableConstants: ScriptWithConfigurableConfigurables = { FEE: 10 }; const input = { FEE: 15 }; diff --git a/packages/fuel-gauge/src/script-with-vectors.test.ts b/packages/fuel-gauge/src/script-with-vectors.test.ts index e8c4ace2c7f..a24723eda5b 100644 --- a/packages/fuel-gauge/src/script-with-vectors.test.ts +++ b/packages/fuel-gauge/src/script-with-vectors.test.ts @@ -7,7 +7,7 @@ import { ScriptWithVectorAdvanced, ScriptWithVectorMixed, } from '../test/typegen'; -import { StateError, UserError } from '../test/typegen/scripts/ScriptWithVectorAdvancedTypes'; +import { StateError, UserError } from '../test/typegen/scripts/ScriptWithVectorAdvanced'; /** * @group node diff --git a/packages/fuel-gauge/src/token-test-contract.test.ts b/packages/fuel-gauge/src/token-test-contract.test.ts index e4730bcb434..5a930e59060 100644 --- a/packages/fuel-gauge/src/token-test-contract.test.ts +++ b/packages/fuel-gauge/src/token-test-contract.test.ts @@ -4,7 +4,7 @@ import { toHex, Wallet, bn } from 'fuels'; import { expectToThrowFuelError, launchTestNode } from 'fuels/test-utils'; import { TokenContractFactory } from '../test/typegen'; -import type { AddressInput } from '../test/typegen/contracts/TokenContractTypes'; +import type { AddressInput } from '../test/typegen/contracts/TokenContract'; /** * @group node diff --git a/packages/fuel-gauge/src/transaction-summary.test.ts b/packages/fuel-gauge/src/transaction-summary.test.ts index d8f66c8d95d..ca8d53e9acd 100644 --- a/packages/fuel-gauge/src/transaction-summary.test.ts +++ b/packages/fuel-gauge/src/transaction-summary.test.ts @@ -33,10 +33,7 @@ import { } from 'fuels/test-utils'; import { MultiTokenContractFactory, TokenContractFactory } from '../test/typegen'; -import type { - ContractIdInput, - TransferParamsInput, -} from '../test/typegen/contracts/TokenContractTypes'; +import type { ContractIdInput, TransferParamsInput } from '../test/typegen/contracts/TokenContract'; function convertBnsToHex(value: unknown): unknown { if (value instanceof BN) { diff --git a/packages/fuel-gauge/src/vectors.test.ts b/packages/fuel-gauge/src/vectors.test.ts index 53ae7941d15..c3b1df2f34c 100644 --- a/packages/fuel-gauge/src/vectors.test.ts +++ b/packages/fuel-gauge/src/vectors.test.ts @@ -2,7 +2,7 @@ import { bn, randomBytes, hexlify } from 'fuels'; import type { BigNumberish, BN } from 'fuels'; import { VectorsFactory } from '../test/typegen/contracts'; -import { SmallEnum } from '../test/typegen/contracts/CoverageContractTypes'; +import { SmallEnum } from '../test/typegen/contracts/CoverageContract'; import { launchTestContract } from './utils'; diff --git a/templates/vite/test/integration/predicate.test.ts b/templates/vite/test/integration/predicate.test.ts index 511585156c8..17a9b6f9540 100644 --- a/templates/vite/test/integration/predicate.test.ts +++ b/templates/vite/test/integration/predicate.test.ts @@ -7,10 +7,7 @@ import { describe, test, expect } from 'vitest'; * * Can't find these imports? Make sure you've run `fuels build` to generate these with typegen. */ -import { - TestPredicate, - TestPredicateParameters, -} from '../../src/sway-api/predicates/TestPredicate'; +import { TestPredicate, TestPredicateInputs } from '../../src/sway-api/predicates/TestPredicate'; /** * @group node @@ -33,7 +30,7 @@ describe('Predicate', () => { } = launched; // For a predicate, we need to pass in an argument to evaluate the predicate. - const predicateData: TestPredicateParameters['data'] = [1337]; + const predicateData: TestPredicateInputs = [1337]; // Now, we can instantiate our predicate. const predicate = new TestPredicate({ From 764397946f5c3a8b2fbcda2d66fd078aa4de61ff Mon Sep 17 00:00:00 2001 From: nedsalk Date: Thu, 2 Jan 2025 15:32:11 +0100 Subject: [PATCH 122/126] update docs --- apps/docs/src/guide/fuels-cli/generating-types.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/docs/src/guide/fuels-cli/generating-types.md b/apps/docs/src/guide/fuels-cli/generating-types.md index 168ab5de845..57523586e26 100644 --- a/apps/docs/src/guide/fuels-cli/generating-types.md +++ b/apps/docs/src/guide/fuels-cli/generating-types.md @@ -39,7 +39,7 @@ You can generate types for a Sway program using the command below: ```console -pnpm fuels typegen -i ./my-program/out/release -o ./types +pnpm fuels typegen -i ./abis/*-abi.json -o ./types ``` @@ -47,7 +47,10 @@ pnpm fuels typegen -i ./my-program/out/release -o ./types -The path after the input flag `-i` should point to the folder where the `forc build` outputs are. +The path after the input flag `-i` should point to the file ending in `-abi.json` produced when the Sway program was built. + +- For scripts and predicates, you'll need the bytecode of the program to be in the same folder for the command to work. +- For contracts, the command will work without the bytecode but the corresponding `ContractFactory` file won't be generated as factories need the bytecode to operate. The path after the output flag `-o` will be the output directory for the generated types. From 1e51d6bc3212585e67eb8c533ccf5578559bce32 Mon Sep 17 00:00:00 2001 From: nedsalk Date: Thu, 2 Jan 2025 15:33:52 +0100 Subject: [PATCH 123/126] update imports --- apps/demo-typegen/src/demo.test.ts | 2 +- .../src/guide/types/snippets/enums/using-enums-of-enums-1.ts | 2 +- .../src/guide/types/snippets/enums/using-enums-of-enums-2.ts | 2 +- apps/docs/src/guide/types/snippets/enums/using-sway-enums.ts | 2 +- .../guide/types/snippets/native-parameters/identity-address.ts | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/demo-typegen/src/demo.test.ts b/apps/demo-typegen/src/demo.test.ts index b9c10c12e19..6288d806b9c 100644 --- a/apps/demo-typegen/src/demo.test.ts +++ b/apps/demo-typegen/src/demo.test.ts @@ -4,7 +4,7 @@ import { expectToThrowFuelError, launchTestNode } from 'fuels/test-utils'; import { DemoContract, DemoContractFactory } from './contract-types'; import { DemoPredicate } from './predicate-types'; -import type { DemoPredicateInputs } from './predicate-types/predicates/DemoPredicate'; +import type { DemoPredicateInputs } from './predicate-types/DemoPredicate'; import { DemoScript } from './script-types'; /** diff --git a/apps/docs/src/guide/types/snippets/enums/using-enums-of-enums-1.ts b/apps/docs/src/guide/types/snippets/enums/using-enums-of-enums-1.ts index d7924bccdab..d437e1c5dbb 100644 --- a/apps/docs/src/guide/types/snippets/enums/using-enums-of-enums-1.ts +++ b/apps/docs/src/guide/types/snippets/enums/using-enums-of-enums-1.ts @@ -2,7 +2,7 @@ import { Provider, Wallet } from 'fuels'; import { LOCAL_NETWORK_URL, WALLET_PVT_KEY } from '../../../../env'; import { EchoEnumFactory } from '../../../../typegend'; -import { UserError } from '../../../../typegend/contracts/EchoEnumTypes'; +import { UserError } from '../../../../typegend/contracts/EchoEnum'; const provider = await Provider.create(LOCAL_NETWORK_URL); const wallet = Wallet.fromPrivateKey(WALLET_PVT_KEY, provider); diff --git a/apps/docs/src/guide/types/snippets/enums/using-enums-of-enums-2.ts b/apps/docs/src/guide/types/snippets/enums/using-enums-of-enums-2.ts index 7e94ecbecde..e76a4e7fc77 100644 --- a/apps/docs/src/guide/types/snippets/enums/using-enums-of-enums-2.ts +++ b/apps/docs/src/guide/types/snippets/enums/using-enums-of-enums-2.ts @@ -2,7 +2,7 @@ import { Provider, Wallet } from 'fuels'; import { LOCAL_NETWORK_URL, WALLET_PVT_KEY } from '../../../../env'; import { EchoEnumFactory } from '../../../../typegend'; -import { StateError } from '../../../../typegend/contracts/EchoEnumTypes'; +import { StateError } from '../../../../typegend/contracts/EchoEnum'; const provider = await Provider.create(LOCAL_NETWORK_URL); const wallet = Wallet.fromPrivateKey(WALLET_PVT_KEY, provider); diff --git a/apps/docs/src/guide/types/snippets/enums/using-sway-enums.ts b/apps/docs/src/guide/types/snippets/enums/using-sway-enums.ts index 59b399b3be1..0cb6181662a 100644 --- a/apps/docs/src/guide/types/snippets/enums/using-sway-enums.ts +++ b/apps/docs/src/guide/types/snippets/enums/using-sway-enums.ts @@ -3,7 +3,7 @@ import { Provider, Wallet } from 'fuels'; import { LOCAL_NETWORK_URL, WALLET_PVT_KEY } from '../../../../env'; import { EchoEnumFactory } from '../../../../typegend'; -import { StateError } from '../../../../typegend/contracts/EchoEnumTypes'; +import { StateError } from '../../../../typegend/contracts/EchoEnum'; const provider = await Provider.create(LOCAL_NETWORK_URL); const wallet = Wallet.fromPrivateKey(WALLET_PVT_KEY, provider); diff --git a/apps/docs/src/guide/types/snippets/native-parameters/identity-address.ts b/apps/docs/src/guide/types/snippets/native-parameters/identity-address.ts index a2886145e72..36642e3fb95 100644 --- a/apps/docs/src/guide/types/snippets/native-parameters/identity-address.ts +++ b/apps/docs/src/guide/types/snippets/native-parameters/identity-address.ts @@ -5,7 +5,7 @@ import { InputOutputTypesFactory } from '../../../../typegend'; import type { IdentityOutput, AddressOutput, -} from '../../../../typegend/contracts/InputOutputTypesTypes'; +} from '../../../../typegend/contracts/InputOutputTypes'; const provider = await Provider.create(LOCAL_NETWORK_URL); const wallet = Wallet.fromPrivateKey(WALLET_PVT_KEY, provider); From 81d61b913d70cb0ebb0e6e41567803470efcdc2b Mon Sep 17 00:00:00 2001 From: nedsalk Date: Thu, 2 Jan 2025 15:35:21 +0100 Subject: [PATCH 124/126] revert file --- scripts/changeset/changeset-version-with-docs.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/changeset/changeset-version-with-docs.ts b/scripts/changeset/changeset-version-with-docs.ts index 6f492d04dd0..bbded5b557a 100644 --- a/scripts/changeset/changeset-version-with-docs.ts +++ b/scripts/changeset/changeset-version-with-docs.ts @@ -18,7 +18,7 @@ import { error } from 'console'; /** * Invoke versions' build script (will rewrite version files if needed) - * and build the versions package, so that fuels typegen picks up the + * and build the versions package, so that fuels-typegen picks up the * new fuels version when generating the proxy contract below. */ execSync(`pnpm -C packages/versions build`); From f8d45b79a6d25b21f32149371d72b1d2015c8633 Mon Sep 17 00:00:00 2001 From: nedsalk Date: Thu, 2 Jan 2025 15:35:52 +0100 Subject: [PATCH 125/126] revert input --- templates/nextjs/test/integration/predicate.test.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/templates/nextjs/test/integration/predicate.test.ts b/templates/nextjs/test/integration/predicate.test.ts index 511585156c8..17a9b6f9540 100644 --- a/templates/nextjs/test/integration/predicate.test.ts +++ b/templates/nextjs/test/integration/predicate.test.ts @@ -7,10 +7,7 @@ import { describe, test, expect } from 'vitest'; * * Can't find these imports? Make sure you've run `fuels build` to generate these with typegen. */ -import { - TestPredicate, - TestPredicateParameters, -} from '../../src/sway-api/predicates/TestPredicate'; +import { TestPredicate, TestPredicateInputs } from '../../src/sway-api/predicates/TestPredicate'; /** * @group node @@ -33,7 +30,7 @@ describe('Predicate', () => { } = launched; // For a predicate, we need to pass in an argument to evaluate the predicate. - const predicateData: TestPredicateParameters['data'] = [1337]; + const predicateData: TestPredicateInputs = [1337]; // Now, we can instantiate our predicate. const predicate = new TestPredicate({ From 32e18a522afce6c94c24abcd41e4686a293ea54b Mon Sep 17 00:00:00 2001 From: nedsalk Date: Thu, 2 Jan 2025 16:02:59 +0100 Subject: [PATCH 126/126] fix import --- apps/demo-typegen/src/demo.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/demo-typegen/src/demo.test.ts b/apps/demo-typegen/src/demo.test.ts index 6288d806b9c..b9c10c12e19 100644 --- a/apps/demo-typegen/src/demo.test.ts +++ b/apps/demo-typegen/src/demo.test.ts @@ -4,7 +4,7 @@ import { expectToThrowFuelError, launchTestNode } from 'fuels/test-utils'; import { DemoContract, DemoContractFactory } from './contract-types'; import { DemoPredicate } from './predicate-types'; -import type { DemoPredicateInputs } from './predicate-types/DemoPredicate'; +import type { DemoPredicateInputs } from './predicate-types/predicates/DemoPredicate'; import { DemoScript } from './script-types'; /**