Skip to content

Class: FunctionInvocationResult<T, TTransactionType>

@fuel-ts/program.FunctionInvocationResult

Represents the result of a function invocation with transaction details.

Type parameters

NameTypeDescription
TanyThe type of the returned value.
TTransactionTypevoidThe type of the transaction.

Hierarchy

Constructors

constructor

new FunctionInvocationResult<T, TTransactionType>(funcScopes, transactionResponse, transactionResult, program, isMultiCall): FunctionInvocationResult<T, TTransactionType>

Constructs an instance of FunctionInvocationResult.

Type parameters

NameType
Tany
TTransactionTypevoid

Parameters

NameTypeDescription
funcScopesInvocationScopeLike | InvocationScopeLike[]The function scopes.
transactionResponseTransactionResponseThe transaction response.
transactionResultTransactionResult<TTransactionType>The transaction result.
programAbstractProgramThe program.
isMultiCallbooleanWhether it's a multi-call.

Returns

FunctionInvocationResult<T, TTransactionType>

Overrides

InvocationResult.constructor

Defined in

functions/invocation-results.ts:156

Properties

functionScopes

Readonly functionScopes: InvocationScopeLike[]

Inherited from

InvocationResult.functionScopes

Defined in

functions/invocation-results.ts:41


gasUsed

Readonly gasUsed: BN

Inherited from

InvocationResult.gasUsed

Defined in

functions/invocation-results.ts:43


isMultiCall

Readonly isMultiCall: boolean

Inherited from

InvocationResult.isMultiCall

Defined in

functions/invocation-results.ts:42


logs

Readonly logs: any[]

Defined in

functions/invocation-results.ts:145


program

Readonly program: AbstractProgram

Defined in

functions/invocation-results.ts:144


transactionId

Readonly transactionId: string

Defined in

functions/invocation-results.ts:141


transactionResponse

Readonly transactionResponse: TransactionResponse

Defined in

functions/invocation-results.ts:142


transactionResult

Readonly transactionResult: TransactionResult<TTransactionType>

Defined in

functions/invocation-results.ts:143


value

Readonly value: T

Inherited from

InvocationResult.value

Defined in

functions/invocation-results.ts:44

Methods

getAbiFromAllCalls

getAbiFromAllCalls(): JsonAbisFromAllCalls

Gets the ABI from all calls.

Returns

JsonAbisFromAllCalls

The ABIs from all calls.

Inherited from

InvocationResult.getAbiFromAllCalls

Defined in

functions/invocation-results.ts:83


getDecodedLogs

getDecodedLogs(receipts): unknown[]

Decodes the logs from the receipts.

Parameters

NameTypeDescription
receiptsTransactionResultReceipt[]The transaction result receipts.

Returns

unknown[]

The decoded logs.

Inherited from

InvocationResult.getDecodedLogs

Defined in

functions/invocation-results.ts:119


getDecodedValue

getDecodedValue(callResult): T

Decodes the value from the call result.

Parameters

NameTypeDescription
callResultCallResultThe call result.

Returns

T

The decoded value.

Inherited from

InvocationResult.getDecodedValue

Defined in

functions/invocation-results.ts:93


build

build<T, TTransactionType>(funcScope, transactionResponse, isMultiCall, program): Promise<FunctionInvocationResult<T, TTransactionType>>

Builds an instance of FunctionInvocationResult.

Type parameters

NameType
TT
TTransactionTypevoid

Parameters

NameTypeDescription
funcScopeInvocationScopeLike | InvocationScopeLike[]The function scope.
transactionResponseTransactionResponseThe transaction response.
isMultiCallbooleanWhether it's a multi-call.
programAbstractProgramThe program.

Returns

Promise<FunctionInvocationResult<T, TTransactionType>>

The function invocation result.

Defined in

functions/invocation-results.ts:180