Icon HelpCircleForumIcon Link

⌘K

Icon HelpCircleForumIcon Link

@fuel-ts/script v0.94.2 Docs


Icon LinkClass: Script<TInput, TOutput>

Script provides a typed interface for interacting with the script program type.

Icon LinkExtends

  • AbstractScript

Icon LinkType Parameters

TInput extends any[]

TOutput

Icon LinkConstructors

Icon Linknew Script()

Icon InfoCircle

new Script<TInput, TOutput>(bytecode, abi, account): Script <TInput, TOutput>

Create a new instance of the Script class.

Icon LinkParameters

bytecode: BytesLike

The compiled bytecode of the script.

abi: JsonAbi

The ABI interface for the script.

account: Account

The account associated with the script.

Icon LinkReturns

Script <TInput, TOutput>

Icon LinkOverrides

AbstractScript.constructor

Icon LinkDefined in

script.ts:70 Icon Link

Icon LinkProperties

Icon Linkaccount

Icon InfoCircle

account: Account

The account associated with the script.

Icon LinkOverrides

AbstractScript.account

Icon LinkDefined in

script.ts:46 Icon Link


Icon Linkbytes

Icon InfoCircle

bytes: Uint8Array

The compiled bytecode of the script.

Icon LinkOverrides

AbstractScript.bytes

Icon LinkDefined in

script.ts:36 Icon Link


Icon Linkfunctions

Icon InfoCircle

functions: object

Functions that can be invoked within the script.

Icon Linkmain

Icon InfoCircle

main: InvokeMain<TInput, TOutput>

Icon LinkDefined in

script.ts:61 Icon Link


Icon Linkinterface

Icon InfoCircle

interface: Interface

The ABI interface for the script.

Icon LinkOverrides

AbstractScript.interface

Icon LinkDefined in

script.ts:41 Icon Link


Icon Linkprovider

Icon InfoCircle

provider: Provider

The provider used for interacting with the network.

Icon LinkOverrides

AbstractScript.provider

Icon LinkDefined in

script.ts:56 Icon Link


Icon Linkscript

Icon InfoCircle

script: ScriptRequest <InputValue<void>[], Result<TOutput>>

The script request object.

Icon LinkDefined in

script.ts:51 Icon Link

Icon LinkMethods

Icon LinksetConfigurableConstants()

Icon InfoCircle

setConfigurableConstants(configurables): Script <TInput, TOutput>

Set the configurable constants of the script.

Icon LinkParameters

configurables

An object containing the configurable constants and their values.

Icon LinkReturns

Script <TInput, TOutput>

This instance of the Script.

Icon LinkThrows

Will throw an error if the script has no configurable constants to be set or if an invalid constant is provided.

Icon LinkDefined in

script.ts:91 Icon Link