A Fragment which represents a method.

Extends

Properties

PropertyModifierTypeDescriptionInherited from
constantreadonlybooleanIf the function is constant (e.g. pure or view functions).-
gasreadonlynull | bigintThe recommended gas limit to send when calling this function.-
inputsreadonlyreadonly ParamType[]The inputs for the fragment.NamedFragment.inputs
namereadonlystringThe name of the fragment.NamedFragment.name
outputsreadonlyreadonly ParamType[]The returned types for the result of calling this function.-
payablereadonlybooleanIf the function can be sent value during invocation.-
stateMutabilityreadonly"payable" | "nonpayable" | "view" | "pure"The state mutability (e.g. payable, nonpayable, view or pure)-
typereadonlyFragmentTypeThe type of the fragment.NamedFragment.type

Accessors

selector

get selector(): string

The Function selector.

Returns

string

Source

abi/fragments.ts:1632

Methods

format()

format(format?): string

Returns a string representation of this function as format.

Parameters

ParameterType
format?FormatType

Returns

string

Overrides

NamedFragment.format

Source

abi/fragments.ts:1639


from()

static from(obj): FunctionFragment

Returns a new FunctionFragment for obj.

Parameters

ParameterType
objany

Returns

FunctionFragment

Overrides

NamedFragment.from

Source

abi/fragments.ts:1693


getSelector()

static getSelector(name, params?): string

Return the selector for a function with name and params.

Parameters

ParameterType
namestring
params?any[]

Returns

string

Source

abi/fragments.ts:1684


isConstructor()

static isConstructor(value): value is ConstructorFragment

Returns true if value is a ConstructorFragment.

Parameters

ParameterType
valueany

Returns

value is ConstructorFragment

Inherited from

NamedFragment.isConstructor

Source

abi/fragments.ts:1122


isError()

static isError(value): value is ErrorFragment

Returns true if value is an ErrorFragment.

Parameters

ParameterType
valueany

Returns

value is ErrorFragment

Inherited from

NamedFragment.isError

Source

abi/fragments.ts:1129


isEvent()

static isEvent(value): value is EventFragment

Returns true if value is an EventFragment.

Parameters

ParameterType
valueany

Returns

value is EventFragment

Inherited from

NamedFragment.isEvent

Source

abi/fragments.ts:1136


isFragment()

static isFragment(value): value is FunctionFragment

Returns true and provides a type guard if value is a FunctionFragment.

Parameters

ParameterType
valueany

Returns

value is FunctionFragment

Source

abi/fragments.ts:1756


isFunction()

static isFunction(value): value is FunctionFragment

Returns true if value is a FunctionFragment.

Parameters

ParameterType
valueany

Returns

value is FunctionFragment

Inherited from

NamedFragment.isFunction

Source

abi/fragments.ts:1143


isStruct()

static isStruct(value): value is StructFragment

Returns true if value is a StructFragment.

Parameters

ParameterType
valueany

Returns

value is StructFragment

Inherited from

NamedFragment.isStruct

Source

abi/fragments.ts:1150