evmole

Type Alias StateMutability

Source
pub type StateMutability = StateMutability;
Expand description

Function’s state mutability

Aliased Type§

enum StateMutability {
    Pure,
    View,
    NonPayable,
    Payable,
}

Variants§

§

Pure

Pure functions promise not to read from or modify the state.

§

View

View functions promise not to modify the state.

§

NonPayable

Nonpayable functions promise not to receive Ether.

This is the solidity default: https://docs.soliditylang.org/en/latest/abi-spec.html#json

The state mutability nonpayable is reflected in Solidity by not specifying a state mutability modifier at all.

§

Payable

Payable functions make no promises.