注意: 此页面尚未翻译成中文。以下内容为英文原版。A Fragment which represents a method.
Property | Modifier | Type | Description | Inherited from |
---|---|---|---|---|
constant | readonly | boolean | If the function is constant (e.g. pure or view functions). | - |
gas | readonly | null | bigint | The recommended gas limit to send when calling this function. | - |
inputs | readonly | readonly ParamType [] | The inputs for the fragment. | NamedFragment .inputs |
name | readonly | string | The name of the fragment. | NamedFragment .name |
outputs | readonly | readonly ParamType [] | The returned types for the result of calling this function. | - |
payable | readonly | boolean | If the function can be sent value during invocation. | - |
stateMutability | readonly | "payable" | "nonpayable" | "view" | "pure" | The state mutability (e.g. payable , nonpayable , view or pure ) | - |
type | readonly | FragmentType | The type of the fragment. | NamedFragment .type |
string
format
.
Parameter | Type |
---|---|
format ? | FormatType |
string
NamedFragment
.format
obj
.
Parameter | Type |
---|---|
obj | any |
FunctionFragment
NamedFragment
.from
name
and params
.
Parameter | Type |
---|---|
name | string |
params ? | any [] |
string
value
is a ConstructorFragment.
Parameter | Type |
---|---|
value | any |
value is ConstructorFragment
NamedFragment
.isConstructor
value
is an ErrorFragment.
Parameter | Type |
---|---|
value | any |
value is ErrorFragment
NamedFragment
.isError
value
is an EventFragment.
Parameter | Type |
---|---|
value | any |
value is EventFragment
NamedFragment
.isEvent
true
and provides a type guard if value
is a FunctionFragment.
Parameter | Type |
---|---|
value | any |
value is FunctionFragment
value
is a FunctionFragment.
Parameter | Type |
---|---|
value | any |
value is FunctionFragment
NamedFragment
.isFunction
value
is a StructFragment.
Parameter | Type |
---|---|
value | any |
value is StructFragment
NamedFragment
.isStruct