From 05a613ac81ff78dbafa1a0fb8af38a2484877a75 Mon Sep 17 00:00:00 2001 From: nedsalk Date: Mon, 16 Dec 2024 17:12:08 +0100 Subject: [PATCH] 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 9353d81cd5..a111cdea1a 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 f489c5f88d..46c2017f1e 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 40be5aaade..d0cf4617b2 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 593d6cf4c5..6c59cea9de 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 0da637ec42..e791373ad6 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 e9c653effe..a958f66d36 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'],