repo
stringlengths
7
64
file_url
stringlengths
81
338
file_path
stringlengths
5
257
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:25:31
2026-01-05 01:50:38
truncated
bool
2 classes
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/types/enums/TargetEnum.ts
packages/abi-typegen/src/types/enums/TargetEnum.ts
export enum TargetEnum { INPUT = 'input', OUTPUT = 'output', }
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/abi/Abi.test.ts
packages/abi-typegen/src/abi/Abi.test.ts
import { safeExec } from '@fuel-ts/errors/test-utils'; import { AbiTypegenProjectsEnum, getTypegenForcProject, } from '../../test/fixtures/forc-projects/index'; import { ProgramTypeEnum } from '../types/enums/ProgramTypeEnum'; import type { JsonAbiType } from '../types/interfaces/JsonAbi'; import * as parseFunctio...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/abi/Abi.ts
packages/abi-typegen/src/abi/Abi.ts
import { ErrorCode, FuelError } from '@fuel-ts/errors'; import { normalizeString } from '@fuel-ts/utils'; import type { ProgramTypeEnum } from '../types/enums/ProgramTypeEnum'; import type { IConfigurable } from '../types/interfaces/IConfigurable'; import type { IErrorCode } from '../types/interfaces/IErrorCode'; impo...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/abi/configurable/Configurable.ts
packages/abi-typegen/src/abi/configurable/Configurable.ts
import type { IConfigurable } from '../../types/interfaces/IConfigurable'; import type { IType } from '../../types/interfaces/IType'; import type { JsonAbiConfigurable } from '../../types/interfaces/JsonAbi'; import { resolveInputLabel } from '../../utils/getTypeDeclaration'; export class Configurable implements IConf...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/abi/configurable/Configurable.test.ts
packages/abi-typegen/src/abi/configurable/Configurable.test.ts
import { AbiTypegenProjectsEnum, getTypegenForcProject, } from '../../../test/fixtures/forc-projects/index'; import type { IType } from '../../types/interfaces/IType'; import type { JsonAbiType } from '../../types/interfaces/JsonAbi'; import * as findTypeMod from '../../utils/findType'; import { Configurable } fro...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/abi/errors/ErrorCode.ts
packages/abi-typegen/src/abi/errors/ErrorCode.ts
import type { IErrorCode } from '../../types/interfaces/IErrorCode'; export class ErrorCode { public code: string; public value: IErrorCode['value']; constructor(params: IErrorCode) { this.code = params.code; this.value = params.value; } }
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/abi/types/RawUntypedSlice.ts
packages/abi-typegen/src/abi/types/RawUntypedSlice.ts
import type { IType } from '../../types/interfaces/IType'; import { ArrayType } from './ArrayType'; export class RawUntypedSlice extends ArrayType { public static override swayType = 'raw untyped slice'; public override name = 'rawUntypedSlice'; public static override MATCH_REGEX: RegExp = /^raw untyped slice...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/abi/types/TupleType.ts
packages/abi-typegen/src/abi/types/TupleType.ts
import { TargetEnum } from '../../types/enums/TargetEnum'; import type { IType } from '../../types/interfaces/IType'; import { findType } from '../../utils/findType'; import { parseTypeArguments } from '../../utils/parseTypeArguments'; import { AType } from './AType'; export class TupleType extends AType implements I...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/abi/types/BoolType.ts
packages/abi-typegen/src/abi/types/BoolType.ts
import type { IType } from '../../types/interfaces/IType'; import { AType } from './AType'; export class BoolType extends AType implements IType { public static swayType = 'bool'; public name = 'bool'; static MATCH_REGEX: RegExp = /^bool$/m; static isSuitableFor(params: { type: string }) { return BoolT...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/abi/types/StrType.test.ts
packages/abi-typegen/src/abi/types/StrType.test.ts
import { BoolType } from './BoolType'; import { StrType } from './StrType'; /** * @group node */ describe('StrType.ts', () => { test('should properly parse type attributes', () => { const str = new StrType({ rawAbiType: { components: null, typeParameters: null, typeId: 1, ...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/abi/types/ResultType.ts
packages/abi-typegen/src/abi/types/ResultType.ts
import type { IType } from '../../types/interfaces/IType'; import { AType } from './AType'; export class ResultType extends AType implements IType { public static swayType = 'enum Result'; public name = 'result'; static MATCH_REGEX: RegExp = /^enum (std::result::)?Result$/m; static isSuitableFor(params: { ...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/abi/types/EnumType.test.ts
packages/abi-typegen/src/abi/types/EnumType.test.ts
import { AbiTypegenProjectsEnum, getTypegenForcProject, } from '../../../test/fixtures/forc-projects/index'; import { TargetEnum } from '../../types/enums/TargetEnum'; import type { JsonAbiType } from '../../types/interfaces/JsonAbi'; import { findType } from '../../utils/findType'; import { makeType } from '../../...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/abi/types/B512Type.ts
packages/abi-typegen/src/abi/types/B512Type.ts
import { B256Type } from './B256Type'; export class B512Type extends B256Type { public static override swayType = 'struct B512'; public override name = 'b512'; static override MATCH_REGEX = /^struct (std::b512::)?B512$/m; static override isSuitableFor(params: { type: string }) { return B512Type.MATCH_RE...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/abi/types/VectorType.ts
packages/abi-typegen/src/abi/types/VectorType.ts
import type { IType } from '../../types/interfaces/IType'; import { ArrayType } from './ArrayType'; export class VectorType extends ArrayType { public static override swayType = 'struct Vec'; public override name = 'vector'; static override MATCH_REGEX: RegExp = /^struct (std::vec::)?Vec/m; static IGNORE_RE...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/abi/types/U32Type.test.ts
packages/abi-typegen/src/abi/types/U32Type.test.ts
import { U32Type } from './U32Type'; import { U64Type } from './U64Type'; /** * @group node */ describe('U32Type.ts', () => { test('should properly parse type attributes', () => { const u32 = new U32Type({ rawAbiType: { components: null, typeParameters: null, typeId: 1, ty...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/abi/types/U8Type.test.ts
packages/abi-typegen/src/abi/types/U8Type.test.ts
import { U16Type } from './U16Type'; import { U8Type } from './U8Type'; /** * @group node */ describe('U8Type.ts', () => { test('should properly parse type attributes', () => { const u8 = new U8Type({ rawAbiType: { components: null, typeParameters: null, typeId: 1, type: U...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/abi/types/U64Type.ts
packages/abi-typegen/src/abi/types/U64Type.ts
import type { IType } from '../../types/interfaces/IType'; import { U8Type } from './U8Type'; export class U64Type extends U8Type implements IType { public static override swayType = 'u64'; public override name = 'u64'; public static override MATCH_REGEX: RegExp = /^u64$/m; public override parseComponentsA...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/abi/types/U8Type.ts
packages/abi-typegen/src/abi/types/U8Type.ts
import type { JsonAbiType } from '../../index'; import type { IType } from '../../types/interfaces/IType'; import { AType } from './AType'; export class U8Type extends AType implements IType { public static swayType = 'u8'; public name = 'u8'; public static MATCH_REGEX: RegExp = /^u8$/m; constructor(params...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/abi/types/EmptyType.test.ts
packages/abi-typegen/src/abi/types/EmptyType.test.ts
import { EmptyType } from './EmptyType'; /** * @group node */ describe('EmptyType.ts', () => { test('should properly parse type attributes', () => { const emptyType = new EmptyType({ rawAbiType: { components: null, typeParameters: null, typeId: 0, type: EmptyType.swayType,...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/abi/types/EvmAddressType.ts
packages/abi-typegen/src/abi/types/EvmAddressType.ts
import type { IType } from '../../types/interfaces/IType'; import { AType } from './AType'; export class EvmAddressType extends AType implements IType { public static swayType = 'struct EvmAddress'; public name = 'evmAddress'; static MATCH_REGEX: RegExp = /^struct (std::vm::evm::evm_address::)?EvmAddress$/m; ...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/abi/types/AType.ts
packages/abi-typegen/src/abi/types/AType.ts
import type { ITypeAttributes } from '../../types/interfaces/IType'; import type { JsonAbiType } from '../../types/interfaces/JsonAbi'; export class AType { public rawAbiType: JsonAbiType; public attributes: ITypeAttributes; public requiredFuelsMembersImports: string[]; constructor(params: { rawAbiType: JsonA...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/abi/types/AssetIdType.test.ts
packages/abi-typegen/src/abi/types/AssetIdType.test.ts
import { AssetIdType } from './AssetIdType'; import { BoolType } from './BoolType'; /** * @group node */ describe('AssetIdType.ts', () => { test('should properly parse type attributes', () => { const b512 = new AssetIdType({ rawAbiType: { components: null, typeParameters: null, ty...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/abi/types/StrSliceType.ts
packages/abi-typegen/src/abi/types/StrSliceType.ts
import type { IType } from '../../types/interfaces/IType'; import { AType } from './AType'; export class StrSliceType extends AType implements IType { public static swayType = 'str'; public name = 'strSlice'; static MATCH_REGEX: RegExp = /^str$/m; static isSuitableFor(params: { type: string }) { return...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/abi/types/RawUntypedPtr.ts
packages/abi-typegen/src/abi/types/RawUntypedPtr.ts
import type { IType } from '../../types/interfaces/IType'; import { U64Type } from './U64Type'; export class RawUntypedPtr extends U64Type implements IType { public static override swayType = 'raw untyped ptr'; public override name = 'rawUntypedPtr'; public static override MATCH_REGEX: RegExp = /^raw untyped ...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/abi/types/EvmAddressType.test.ts
packages/abi-typegen/src/abi/types/EvmAddressType.test.ts
import { AbiTypegenProjectsEnum, getTypegenForcProject, } from '../../../test/fixtures/forc-projects/index'; import type { JsonAbiType } from '../../index'; import { findType } from '../../utils/findType'; import { makeType } from '../../utils/makeType'; import * as parseTypeArgumentsMod from '../../utils/parseType...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/abi/types/ArrayType.test.ts
packages/abi-typegen/src/abi/types/ArrayType.test.ts
import { AbiTypegenProjectsEnum, getTypegenForcProject, } from '../../../test/fixtures/forc-projects'; import type { JsonAbiType } from '../../types/interfaces/JsonAbi'; import { findType } from '../../utils/findType'; import { makeType } from '../../utils/makeType'; import * as parseTypeArgumentsMod from '../../ut...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/abi/types/GenericType.test.ts
packages/abi-typegen/src/abi/types/GenericType.test.ts
import { GenericType } from './GenericType'; import { StructType } from './StructType'; /** * @group node */ describe('GenericType.ts', () => { test('should properly parse type attributes', () => { const generic = new GenericType({ rawAbiType: { components: null, typeParameters: null, ...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/abi/types/StructType.test.ts
packages/abi-typegen/src/abi/types/StructType.test.ts
import { AbiTypegenProjectsEnum, getTypegenForcProject, } from '../../../test/fixtures/forc-projects/index'; import type { JsonAbiType } from '../../index'; import { TargetEnum } from '../../types/enums/TargetEnum'; import { findType } from '../../utils/findType'; import { makeType } from '../../utils/makeType'; im...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/abi/types/VectorType.test.ts
packages/abi-typegen/src/abi/types/VectorType.test.ts
import { StructType } from './StructType'; import { VectorType } from './VectorType'; /** * @group node */ describe('VectorType.ts', () => { test('should properly parse type attributes', () => { const vector = new VectorType({ rawAbiType: { components: null, typeParameters: null, ...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/abi/types/U16Type.test.ts
packages/abi-typegen/src/abi/types/U16Type.test.ts
import { U16Type } from './U16Type'; import { U32Type } from './U32Type'; /** * @group node */ describe('U16Type.ts', () => { test('should properly parse type attributes', () => { const u16 = new U16Type({ rawAbiType: { components: null, typeParameters: null, typeId: 1, ty...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/abi/types/U32Type.ts
packages/abi-typegen/src/abi/types/U32Type.ts
import type { IType } from '../../types/interfaces/IType'; import { U8Type } from './U8Type'; export class U32Type extends U8Type implements IType { public static override swayType = 'u32'; public override name = 'u32'; public static override MATCH_REGEX: RegExp = /^u32$/m; static override isSuitableFor(pa...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/abi/types/GenericType.ts
packages/abi-typegen/src/abi/types/GenericType.ts
import type { IType } from '../../types/interfaces/IType'; import { extractStructName } from '../../utils/extractStructName'; import { AType } from './AType'; export class GenericType extends AType implements IType { public static swayType = 'generic T'; public name = 'generic'; static MATCH_REGEX: RegExp = /...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/abi/types/ResultType.test.ts
packages/abi-typegen/src/abi/types/ResultType.test.ts
import { AbiTypegenProjectsEnum, getTypegenForcProject, } from '../../../test/fixtures/forc-projects/index'; import type { JsonAbiType } from '../../index'; import { parseTypes } from '../../utils/parseTypes'; import { EnumType } from './EnumType'; import { ResultType } from './ResultType'; /** * @group node */...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/abi/types/EmptyType.ts
packages/abi-typegen/src/abi/types/EmptyType.ts
import type { JsonAbiType } from '../..'; import type { IType } from '../../types/interfaces/IType'; import { AType } from './AType'; export class EmptyType extends AType implements IType { public static swayType = '()'; public name = 'empty'; static MATCH_REGEX: RegExp = /^\(\)$/m; constructor(params: { r...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/abi/types/B256Type.test.ts
packages/abi-typegen/src/abi/types/B256Type.test.ts
import { B256Type } from './B256Type'; import { BoolType } from './BoolType'; /** * @group node */ describe('B256Type.ts', () => { test('should properly parse type attributes', () => { const b256 = new B256Type({ rawAbiType: { components: null, typeParameters: null, typeId: 1, ...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/abi/types/TupleType.test.ts
packages/abi-typegen/src/abi/types/TupleType.test.ts
import { AbiTypegenProjectsEnum, getTypegenForcProject, } from '../../../test/fixtures/forc-projects/index'; import type { JsonAbiType } from '../../index'; import { findType } from '../../utils/findType'; import { makeType } from '../../utils/makeType'; import * as parseTypeArgumentsMod from '../../utils/parseType...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/abi/types/RawUntypedSlice.test.ts
packages/abi-typegen/src/abi/types/RawUntypedSlice.test.ts
import { RawUntypedSlice } from './RawUntypedSlice'; import { StructType } from './StructType'; /** * @group node */ describe('RawUntypedSlice.ts', () => { test('should properly parse type attributes', () => { const rawSlice = new RawUntypedSlice({ rawAbiType: { components: null, typePara...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/abi/types/U16Type.ts
packages/abi-typegen/src/abi/types/U16Type.ts
import type { IType } from '../../types/interfaces/IType'; import { U8Type } from './U8Type'; export class U16Type extends U8Type implements IType { public static override swayType = 'u16'; public override name = 'u16'; public static override MATCH_REGEX: RegExp = /^u16$/m; static override isSuitableFor(pa...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/abi/types/U256Type.ts
packages/abi-typegen/src/abi/types/U256Type.ts
import type { IType } from '../../types/interfaces/IType'; import { U64Type } from './U64Type'; export class U256Type extends U64Type implements IType { public static override swayType = 'u256'; public override name = 'u256'; public static override MATCH_REGEX: RegExp = /^u256$/m; static override isSuitabl...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/abi/types/OptionType.ts
packages/abi-typegen/src/abi/types/OptionType.ts
import type { IType } from '../../types/interfaces/IType'; import { AType } from './AType'; export class OptionType extends AType implements IType { public static swayType = 'enum Option'; public name = 'option'; static MATCH_REGEX: RegExp = /^enum (std::option::)?Option$/m; static isSuitableFor(params: { ...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/abi/types/ArrayType.ts
packages/abi-typegen/src/abi/types/ArrayType.ts
import { TargetEnum } from '../../types/enums/TargetEnum'; import type { IType } from '../../types/interfaces/IType'; import { findType } from '../../utils/findType'; import { parseTypeArguments } from '../../utils/parseTypeArguments'; import { AType } from './AType'; export class ArrayType extends AType implements I...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/abi/types/U64Type.test.ts
packages/abi-typegen/src/abi/types/U64Type.test.ts
import { U32Type } from './U32Type'; import { U64Type } from './U64Type'; /** * @group node */ describe('U64Type.ts', () => { test('should properly parse type attributes', () => { const u64 = new U64Type({ rawAbiType: { components: null, typeParameters: null, typeId: 1, ty...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/abi/types/OptionType.test.ts
packages/abi-typegen/src/abi/types/OptionType.test.ts
import { AbiTypegenProjectsEnum, getTypegenForcProject, } from '../../../test/fixtures/forc-projects/index'; import type { JsonAbiType } from '../../index'; import { findType } from '../../utils/findType'; import { makeType } from '../../utils/makeType'; import { EnumType } from './EnumType'; import { OptionType }...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/abi/types/StdStringType.test.ts
packages/abi-typegen/src/abi/types/StdStringType.test.ts
import { StdStringType } from './StdStringType'; import { StructType } from './StructType'; /** * @group node */ describe('StdStringType.ts', () => { test('should properly parse type attributes', () => { const stdString = new StdStringType({ rawAbiType: { components: null, typeParameters:...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/abi/types/StructType.ts
packages/abi-typegen/src/abi/types/StructType.ts
import type { JsonAbiArgument } from '../../index'; import type { TargetEnum } from '../../types/enums/TargetEnum'; import type { IType } from '../../types/interfaces/IType'; import { extractStructName } from '../../utils/extractStructName'; import { findType } from '../../utils/findType'; import { parseTypeArguments }...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/abi/types/BytesType.test.ts
packages/abi-typegen/src/abi/types/BytesType.test.ts
import { BytesType } from './BytesType'; import { StructType } from './StructType'; /** * @group node */ describe('BytesType.ts', () => { test('should properly parse type attributes', () => { const bytes = new BytesType({ rawAbiType: { components: null, typeParameters: null, typeI...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/abi/types/U256Type.test.ts
packages/abi-typegen/src/abi/types/U256Type.test.ts
import { U256Type } from './U256Type'; import { U64Type } from './U64Type'; /** * @group node */ describe('U256Type.ts', () => { test('should properly parse type attributes', () => { const u256 = new U256Type({ rawAbiType: { components: null, typeParameters: null, typeId: 1, ...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/abi/types/BytesType.ts
packages/abi-typegen/src/abi/types/BytesType.ts
import type { IType } from '../../types/interfaces/IType'; import { ArrayType } from './ArrayType'; export class BytesType extends ArrayType { public static override swayType = 'struct Bytes'; public override name = 'bytes'; static override MATCH_REGEX: RegExp = /^struct (std::bytes::)?Bytes/m; static over...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/abi/types/AssetIdType.ts
packages/abi-typegen/src/abi/types/AssetIdType.ts
import { B256Type } from './B256Type'; export class AssetIdType extends B256Type { public static override swayType = 'struct AssetId'; public override name = 'AssetId'; static override MATCH_REGEX = /^struct AssetId$/m; static override isSuitableFor(params: { type: string }) { return AssetIdType.MATCH_R...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/abi/types/BoolType.test.ts
packages/abi-typegen/src/abi/types/BoolType.test.ts
import { BoolType } from './BoolType'; import { U16Type } from './U16Type'; /** * @group node */ describe('BoolType.ts', () => { test('should properly parse type attributes', () => { const bool = new BoolType({ rawAbiType: { components: null, typeParameters: null, typeId: 1, ...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/abi/types/StdStringType.ts
packages/abi-typegen/src/abi/types/StdStringType.ts
import type { IType } from '../../types/interfaces/IType'; import { AType } from './AType'; export class StdStringType extends AType implements IType { public static swayType = 'struct String'; public name = 'stdString'; static MATCH_REGEX: RegExp = /^struct (std::string::)?String/m; static isSuitableFor(p...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/abi/types/B512Type.test.ts
packages/abi-typegen/src/abi/types/B512Type.test.ts
import { B512Type } from './B512Type'; import { BoolType } from './BoolType'; /** * @group node */ describe('B512Type.ts', () => { test('should properly parse type attributes', () => { const b512 = new B512Type({ rawAbiType: { components: null, typeParameters: null, typeId: 1, ...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/abi/types/StrSlicesType.test.ts
packages/abi-typegen/src/abi/types/StrSlicesType.test.ts
import { BoolType } from './BoolType'; import { StdStringType } from './StdStringType'; import { StrSliceType } from './StrSliceType'; import { StrType } from './StrType'; /** * @group node */ describe('StrSlicesType.ts', () => { test('should properly parse type attributes', () => { const strSlices = new StrSl...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/abi/types/RawUntypedPtr.test.ts
packages/abi-typegen/src/abi/types/RawUntypedPtr.test.ts
import { RawUntypedPtr } from './RawUntypedPtr'; import { U8Type } from './U8Type'; /** * @group node */ describe('RawUntypedPtrType.ts', () => { test('should properly parse type attributes', () => { const rawUntypedPtr = new RawUntypedPtr({ rawAbiType: { components: null, typeParameters:...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/abi/types/B256Type.ts
packages/abi-typegen/src/abi/types/B256Type.ts
import { StrType } from './StrType'; export class B256Type extends StrType { public static override swayType = 'b256'; public override name = 'b256'; static override MATCH_REGEX = /^b256$/m; static override isSuitableFor(params: { type: string }) { return B256Type.MATCH_REGEX.test(params.type); } }
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/abi/types/EnumType.ts
packages/abi-typegen/src/abi/types/EnumType.ts
import type { JsonAbiArgument } from '../../index'; import type { TargetEnum } from '../../types/enums/TargetEnum'; import type { IType } from '../../types/interfaces/IType'; import { extractStructName } from '../../utils/extractStructName'; import { findType } from '../../utils/findType'; import { parseTypeArguments }...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/abi/types/StrType.ts
packages/abi-typegen/src/abi/types/StrType.ts
import type { IType } from '../../types/interfaces/IType'; import { AType } from './AType'; export class StrType extends AType implements IType { // Note: the str length expressed in '[3]' could be any length public static swayType = 'str[3]'; public name = 'str'; static MATCH_REGEX: RegExp = /^str\[(.+)\]$...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/abi/functions/Function.test.ts
packages/abi-typegen/src/abi/functions/Function.test.ts
import { AbiTypegenProjectsEnum, getTypegenForcProject, } from '../../../test/fixtures/forc-projects/index'; import { parseTypes } from '../../utils/parseTypes'; import { Function } from './Function'; /** * @group node */ describe('Function.ts', () => { /* Method: `getDeclaration` */ test('should prop...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/abi/functions/Function.ts
packages/abi-typegen/src/abi/functions/Function.ts
import type { IFunction, JsonAbiFunction, IFunctionAttributes } from '../../index'; import { TargetEnum } from '../../types/enums/TargetEnum'; import type { IType } from '../../types/interfaces/IType'; import { getFunctionInputs } from '../../utils/getFunctionInputs'; import { resolveInputLabel } from '../../utils/getT...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/templates/renderHbsTemplate.test.ts
packages/abi-typegen/src/templates/renderHbsTemplate.test.ts
import { mockVersions } from '../../test/utils/mockVersions'; import { renderHbsTemplate } from './renderHbsTemplate'; /** * @group node */ describe('renderHbsTemplate.ts', () => { test('should render given template w/ data while injecting header', () => { // mocking const { versions, restore } = mockVers...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/templates/renderHbsTemplate.ts
packages/abi-typegen/src/templates/renderHbsTemplate.ts
import type { BinaryVersions } from '@fuel-ts/versions'; import Handlebars from 'handlebars'; import headerTemplate from './common/_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 rend...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/templates/utils/formatStructs.test.ts
packages/abi-typegen/src/templates/utils/formatStructs.test.ts
import { AbiTypegenProjectsEnum, getTypegenForcProject, } from '../../../test/fixtures/forc-projects/index'; import { Abi } from '../../abi/Abi'; import { ProgramTypeEnum } from '../../types/enums/ProgramTypeEnum'; import { formatStructs } from './formatStructs'; /** * @group node */ describe('formatStructs.ts'...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/templates/utils/formatStructs.ts
packages/abi-typegen/src/templates/utils/formatStructs.ts
import type { StructType } from '../../abi/types/StructType'; import { TargetEnum } from '../../types/enums/TargetEnum'; import type { IType } from '../../types/interfaces/IType'; export function formatStructs(params: { types: IType[] }) { const { types } = params; const structs = types .filter((t) => t.name ...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/templates/utils/formatEnums.ts
packages/abi-typegen/src/templates/utils/formatEnums.ts
import type { EnumType } from '../../abi/types/EnumType'; import { TargetEnum } from '../../types/enums/TargetEnum'; import type { IType } from '../../types/interfaces/IType'; export function formatEnums(params: { types: IType[] }) { const { types } = params; const enums = types .filter((t) => t.name === 'enu...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/templates/utils/formatEnums.test.ts
packages/abi-typegen/src/templates/utils/formatEnums.test.ts
import { AbiTypegenProjectsEnum, getTypegenForcProject, } from '../../../test/fixtures/forc-projects/index'; import { Abi } from '../../abi/Abi'; import { ProgramTypeEnum } from '../../types/enums/ProgramTypeEnum'; import { formatEnums } from './formatEnums'; /** * @group node */ describe('formatEnums.ts', () =...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/templates/utils/formatImports.test.ts
packages/abi-typegen/src/templates/utils/formatImports.test.ts
import { BoolType } from '../../abi/types/BoolType'; import { U8Type } from '../../abi/types/U8Type'; import { formatImports } from './formatImports'; /** * @group node */ describe('formatImports.ts', () => { const baseMembers = ['Contract']; const u8 = new U8Type({ rawAbiType: { typeId: 1, typ...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/templates/utils/formatImports.ts
packages/abi-typegen/src/templates/utils/formatImports.ts
import { uniq } from 'ramda'; import type { IType } from '../../types/interfaces/IType'; const caseInsensitiveSort = (a: string, b: string) => a.toLowerCase().localeCompare(b.toLowerCase()); export function formatImports(params: { types: IType[]; baseMembers?: string[] }) { const { types, baseMembers = [] } = pa...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/templates/predicate/main.test.ts
packages/abi-typegen/src/templates/predicate/main.test.ts
import { safeExec } from '@fuel-ts/errors/test-utils'; import * as utilsMod from '@fuel-ts/utils'; import { join } from 'path'; import { AbiTypegenProjectsEnum, getTypegenForcProject, } from '../../../test/fixtures/forc-projects/index'; import mainTemplate from '../../../test/fixtures/templates/predicate/main.hbs'...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/templates/predicate/main.ts
packages/abi-typegen/src/templates/predicate/main.ts
import { ErrorCode, FuelError } from '@fuel-ts/errors'; import { compressBytecode } from '@fuel-ts/utils'; import type { BinaryVersions } from '@fuel-ts/versions'; import type { Abi } from '../../abi/Abi'; import { renderHbsTemplate } from '../renderHbsTemplate'; import { formatEnums } from '../utils/formatEnums'; imp...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/templates/common/index.test.ts
packages/abi-typegen/src/templates/common/index.test.ts
import { mockVersions } from '../../../test/utils/mockVersions'; import { renderIndexTemplate } from './index'; /** * @group node */ describe('templates/index', () => { test('should render index template for contracts', () => { // mocking const { versions, restore } = mockVersions(); // executing ...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/templates/common/common.ts
packages/abi-typegen/src/templates/common/common.ts
import type { BinaryVersions } from '@fuel-ts/versions'; import { renderHbsTemplate } from '../renderHbsTemplate'; import commonTemplate from './common.hbs'; export function renderCommonTemplate(params: { versions: BinaryVersions }) { const { versions } = params; const text = renderHbsTemplate({ template: common...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/templates/common/common.test.ts
packages/abi-typegen/src/templates/common/common.test.ts
import { mockVersions } from '../../../test/utils/mockVersions'; import { renderCommonTemplate } from './common'; /** * @group node */ describe('templates/common', () => { test('should render common template', () => { // mocking const { versions, restore } = mockVersions(); // executing const ren...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/templates/common/index.ts
packages/abi-typegen/src/templates/common/index.ts
import type { BinaryVersions } from '@fuel-ts/versions'; import type { IFile } from '../../types/interfaces/IFile'; import { renderHbsTemplate } from '../renderHbsTemplate'; import indexTemplate from './index.hbs'; export function renderIndexTemplate(params: { files: Pick<IFile, 'path'>[]; versions: BinaryVersio...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/templates/script/main.test.ts
packages/abi-typegen/src/templates/script/main.test.ts
import { safeExec } from '@fuel-ts/errors/test-utils'; import * as utilsMod from '@fuel-ts/utils'; import { join } from 'path'; import { AbiTypegenProjectsEnum, getTypegenForcProject, } from '../../../test/fixtures/forc-projects/index'; import mainTemplate from '../../../test/fixtures/templates/script/main.hbs'; i...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/templates/script/main.ts
packages/abi-typegen/src/templates/script/main.ts
import { ErrorCode, FuelError } from '@fuel-ts/errors'; import { compressBytecode } from '@fuel-ts/utils'; import type { BinaryVersions } from '@fuel-ts/versions'; import type { Abi } from '../../abi/Abi'; import { renderHbsTemplate } from '../renderHbsTemplate'; import { formatEnums } from '../utils/formatEnums'; imp...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/templates/contract/main.test.ts
packages/abi-typegen/src/templates/contract/main.test.ts
import { join } from 'path'; import { AbiTypegenProjectsEnum, getTypegenForcProject, } from '../../../test/fixtures/forc-projects/index'; import expectedMainFullTemplate from '../../../test/fixtures/templates/contract/main.hbs'; import expectedMainMinimalConfigurableTemplate from '../../../test/fixtures/templates/...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/templates/contract/main.ts
packages/abi-typegen/src/templates/contract/main.ts
import type { BinaryVersions } from '@fuel-ts/versions'; import type { Abi } from '../../abi/Abi'; import { renderHbsTemplate } from '../renderHbsTemplate'; import { formatEnums } from '../utils/formatEnums'; import { formatImports } from '../utils/formatImports'; import { formatStructs } from '../utils/formatStructs'...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/templates/contract/factory.ts
packages/abi-typegen/src/templates/contract/factory.ts
import { compressBytecode } from '@fuel-ts/utils'; import type { BinaryVersions } from '@fuel-ts/versions'; import type { Abi } from '../../abi/Abi'; import { renderHbsTemplate } from '../renderHbsTemplate'; import factoryTemplate from './factory.hbs'; export function renderFactoryTemplate(params: { abi: Abi; versio...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/src/templates/contract/factory.test.ts
packages/abi-typegen/src/templates/contract/factory.test.ts
import * as utilsMod from '@fuel-ts/utils'; import { join } from 'path'; import { AbiTypegenProjectsEnum, getTypegenForcProject, } from '../../../test/fixtures/forc-projects/index'; import factoryTemplate from '../../../test/fixtures/templates/contract/factory.hbs'; import { mockVersions } from '../../../test/util...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/test/fixtures/forc-projects/index.ts
packages/abi-typegen/test/fixtures/forc-projects/index.ts
import { getForcProject } from '@fuel-ts/utils/test-utils'; import { join } from 'path'; import type { JsonAbiOld } from '../../../src'; import type { JsonAbi } from '../../../src/types/interfaces/JsonAbiNew'; import { transpileAbi } from '../../../src/utils/transpile-abi'; export enum AbiTypegenProjectsEnum { ARRA...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/test/utils/getNewAbiTypegen.ts
packages/abi-typegen/test/utils/getNewAbiTypegen.ts
import type { IFile, JsonAbiType, JsonAbiConfigurable } from '../../src/index'; import { AbiTypeGen } from '../../src/index'; import { ProgramTypeEnum } from '../../src/types/enums/ProgramTypeEnum'; import { DEFAULT_MOCK_VERSIONS } from './mockVersions'; export function getNewAbiTypegen( params: { programType?:...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/test/utils/updateFixture.ts
packages/abi-typegen/test/utils/updateFixture.ts
import { writeFileSync } from 'fs'; export function autoUpdateFixture(path: string, contents: string) { if (process.env.UPDATE_FIXTURES === 'true') { if (!/fixtures/.test(path)) { throw new Error(`This path may no be a fixture: ${path}`); } const { log } = console; log('Updated fixture', path);...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/abi-typegen/test/utils/mockVersions.ts
packages/abi-typegen/test/utils/mockVersions.ts
import * as versionsMod from '@fuel-ts/versions'; export const DEFAULT_MOCK_VERSIONS: versionsMod.Versions = { FUELS: '11.11.11', FORC: '22.22.22', FUEL_CORE: '33.33.33', }; export function mockVersions(values: versionsMod.BinaryVersions = DEFAULT_MOCK_VERSIONS) { const mock = vi.spyOn(versionsMod, 'versions'...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/contract/tsup.config.ts
packages/contract/tsup.config.ts
import { tsupDefaults } from '@internal/tsup'; import type { Options } from 'tsup'; const configs: Options = { ...tsupDefaults, entry: { index: 'src/index.ts', 'test-utils': 'src/test-utils.ts', }, }; export default configs;
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/contract/src/contract-factory.ts
packages/contract/src/contract-factory.ts
import { Interface, WORD_SIZE } from '@fuel-ts/abi-coder'; import type { JsonAbi, InputValue } from '@fuel-ts/abi-coder'; import type { Account, CreateTransactionRequestLike, PreConfirmationTransactionResult, Provider, TransactionRequest, TransactionResult, TransactionType, } from '@fuel-ts/account'; impo...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/contract/src/util.ts
packages/contract/src/util.ts
import { sha256 } from '@fuel-ts/hasher'; import { calcRoot, SparseMerkleTree } from '@fuel-ts/merkle'; import type { StorageSlot } from '@fuel-ts/transactions'; import type { BytesLike } from '@fuel-ts/utils'; import { chunkAndPadBytes, hexlify, concat, arrayify } from '@fuel-ts/utils'; /** * Get the Merkle root of ...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/contract/src/test-utils.ts
packages/contract/src/test-utils.ts
export * from './test-utils/launch-test-node';
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/contract/src/index.ts
packages/contract/src/index.ts
export { default as ContractFactory, DeployContractOptions, DeployContractResult, } from './contract-factory'; export { getContractRoot, getContractStorageRoot, getContractId, hexlifyWithPrefix } from './util';
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/contract/src/loader/utils.ts
packages/contract/src/loader/utils.ts
import { WORD_SIZE } from '@fuel-ts/abi-coder'; import { concat } from '@fuel-ts/utils'; export const getContractChunks = (bytecode: Uint8Array, chunkSize: number) => { const chunks = []; for (let offset = 0, index = 0; offset < bytecode.length; offset += chunkSize, index++) { let chunk = bytecode.slice(offse...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/contract/src/loader/utils.test.ts
packages/contract/src/loader/utils.test.ts
import { WORD_SIZE } from '@fuel-ts/abi-coder'; import { getContractChunks } from './utils'; /** * @group node * @group browser */ describe('getContractChunks', () => { it('splits bytecode into chunks', () => { const bytecode = new Uint8Array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]); cons...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/contract/src/loader/types.ts
packages/contract/src/loader/types.ts
import type { BlobTransactionRequest } from '@fuel-ts/account'; export type ContractChunk = { id: number; size: number; bytecode: Uint8Array; blobId: string; transactionRequest: BlobTransactionRequest; };
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/contract/src/loader/index.ts
packages/contract/src/loader/index.ts
export * from './loader-script'; export * from './types'; export * from './utils';
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/contract/src/loader/loader-script.ts
packages/contract/src/loader/loader-script.ts
import { BYTES_32 } from '@fuel-ts/abi-coder'; import { InstructionSet } from '@fuel-ts/program'; import { arrayify, concat } from '@fuel-ts/utils'; import * as asm from '@fuels/vm-asm'; export const getLoaderInstructions = (blobIds: string[]): Uint8Array => { const { RegId, Instruction } = asm; const numberOfIns...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/contract/src/loader/loader-script.test.ts
packages/contract/src/loader/loader-script.test.ts
import { WORD_SIZE } from '@fuel-ts/abi-coder'; import { arrayify } from '@fuel-ts/utils'; import { getLoaderInstructions } from './loader-script'; /** * @group node * @group browser */ describe('Loader Script', () => { it('generates loader bytecode for a list of blob ids', () => { const blobIds = ['0x01', '...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/contract/src/test-utils/launch-test-node.ts
packages/contract/src/test-utils/launch-test-node.ts
import type { Account, WalletUnlocked } from '@fuel-ts/account'; import { setupTestProviderAndWallets } from '@fuel-ts/account/test-utils'; import type { LaunchCustomProviderAndGetWalletsOptions, SetupTestProviderAndWalletsReturn, } from '@fuel-ts/account/test-utils'; import { FuelError } from '@fuel-ts/errors'; im...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/packages/contract/src/test-utils/launch-test-node.test.ts
packages/contract/src/test-utils/launch-test-node.test.ts
import type { JsonAbi } from '@fuel-ts/abi-coder'; import { Provider } from '@fuel-ts/account'; import * as setupTestProviderAndWalletsMod from '@fuel-ts/account/test-utils'; import { randomBytes, randomUUID } from '@fuel-ts/crypto'; import { FuelError } from '@fuel-ts/errors'; import { expectToThrowFuelError, safeExec...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
FuelLabs/fuels-ts
https://github.com/FuelLabs/fuels-ts/blob/9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2/playwright-tests/create-fuels.test.ts
playwright-tests/create-fuels.test.ts
import type { Page } from '@playwright/test'; import { test, expect } from '@playwright/test'; const WEB_SERVER_URL = 'http://localhost:5173'; const setup = async ({ page }: { page: Page }) => { await page.goto(WEB_SERVER_URL, { waitUntil: 'networkidle' }); await page.waitForTimeout(2000); const connectWallet...
typescript
Apache-2.0
9a7b69726b3181a0c2c8f0dd2da83e86774ed1b2
2026-01-04T15:46:46.933446Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/vitest.config.ts
vitest.config.ts
import { defineConfig } from 'vitest/config' export default defineConfig({ test: { projects: [ '{packages,tooling,scripts}/*/vitest.config.{ts,mjs}', 'cli/vitest.config.*', ], exclude: ['**/node_modules/**', '**/dist/**', 'system-tests/**'], coverage: { provider: 'v8', reporte...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/system-tests/globals.d.ts
system-tests/globals.d.ts
import { expect as _expect } from 'chai' import _sinon from 'sinon' declare global { // these are made global in `spec_helper` const expect: typeof _expect const sinon: typeof _sinon }
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/system-tests/test-binary/node_versions_spec.ts
system-tests/test-binary/node_versions_spec.ts
import systemTests from '../lib/system-tests' function smokeTestDockerImage (dockerImage: string) { context('e2e', () => { systemTests.it(`can run in ${dockerImage}`, { withBinary: true, browser: 'electron', dockerImage, spec: 'test1.js', specDir: 'tests', project: 'todos', ...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false