Skip to content

FunctionFragment

Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/abi/fragments.d.ts:396

A Fragment which represents a method.

readonly constant: boolean;

Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/abi/fragments.d.ts:400

If the function is constant (e.g. pure or view functions).


readonly gas: null | bigint;

Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/abi/fragments.d.ts:417

The recommended gas limit to send when calling this function.


readonly inputs: readonly ParamType[];

Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/abi/fragments.d.ts:231

The inputs for the fragment.

NamedFragment.inputs


readonly name: string;

Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/abi/fragments.d.ts:274

The name of the fragment.

NamedFragment.name


readonly outputs: readonly ParamType[];

Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/abi/fragments.d.ts:404

The returned types for the result of calling this function.


readonly payable: boolean;

Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/abi/fragments.d.ts:413

If the function can be sent value during invocation.


readonly stateMutability: "view" | "nonpayable" | "payable" | "pure";

Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/abi/fragments.d.ts:409

The state mutability (e.g. payable, nonpayable, view or pure)


readonly type: FragmentType;

Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/abi/fragments.d.ts:227

The type of the fragment.

NamedFragment.type

get selector(): string;

Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/abi/fragments.d.ts:425

The Function selector.

string

format(format?): string;

Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/abi/fragments.d.ts:429

Returns a string representation of this function as %%format%%.

ParameterType
format?FormatType

string

NamedFragment.format


static from(obj): FunctionFragment;

Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/abi/fragments.d.ts:437

Returns a new FunctionFragment for %%obj%%.

ParameterType
objany

FunctionFragment

NamedFragment.from


static getSelector(name, params?): string;

Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/abi/fragments.d.ts:433

Return the selector for a function with %%name%% and %%params%%.

ParameterType
namestring
params?any[]

string


static isConstructor(value): value is ConstructorFragment;

Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/abi/fragments.d.ts:248

Returns true if %%value%% is a [[ConstructorFragment]].

ParameterType
valueany

value is ConstructorFragment

NamedFragment.isConstructor


static isError(value): value is ErrorFragment;

Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/abi/fragments.d.ts:252

Returns true if %%value%% is an [[ErrorFragment]].

ParameterType
valueany

value is ErrorFragment

NamedFragment.isError


static isEvent(value): value is EventFragment;

Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/abi/fragments.d.ts:256

Returns true if %%value%% is an [[EventFragment]].

ParameterType
valueany

value is EventFragment

NamedFragment.isEvent


static isFragment(value): value is FunctionFragment;

Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/abi/fragments.d.ts:442

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

ParameterType
valueany

value is FunctionFragment


static isFunction(value): value is FunctionFragment;

Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/abi/fragments.d.ts:260

Returns true if %%value%% is a [[FunctionFragment]].

ParameterType
valueany

value is FunctionFragment

NamedFragment.isFunction


static isStruct(value): value is StructFragment;

Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/abi/fragments.d.ts:264

Returns true if %%value%% is a [[StructFragment]].

ParameterType
valueany

value is StructFragment

NamedFragment.isStruct