StateMutability enum

Enum class representing different state mutabilities of Ethereum functions.

Inheritance
Available extensions

Values

pure → const StateMutability

Function with no side effects and doesn't read from or modify the blockchain state.

const StateMutability('pure', [16])
view → const StateMutability

Function that doesn't modify the blockchain state but can read from it.

const StateMutability('view', [17])
payable → const StateMutability

Function that can receive Ether and modify the blockchain state.

const StateMutability('payable', [18])
nonpayable → const StateMutability

Function that can modify the blockchain state but cannot receive Ether.

const StateMutability('nonpayable', [19])

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
isExcutable bool
no setter
name String
final
name String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tags List<int>
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

fromName(String? name) StateMutability
Retrieves a StateMutability instance based on its name (case-insensitive).
fromValue(List<int>? tags) StateMutability

Constants

values → const List<StateMutability>
A constant List of the values in this enum, in order of their declaration.