Modifiers
Last updated
Last updated
Modifiers are constructs used to modify a Function's behavior, for instance by defining a prerequisite to be checked before the function is executed.
A modifier's name is used to name and differentiate modifiers. Choose a name that is specific and descriptive enough to clearly indicate the modifier's purpose and distinguish it from other modifiers. The name will be used as a keyword in the code to reference the modifier.
By carefully naming your modifiers, you can ensure they are clear, functional, and easily distinguishable within your smart contract.
Define the input required by this modifier. This input must be available when the modifier is triggered, as it will be used to enforce the conditions or prerequisites defined by the modifier.
By specifying the necessary input for your modifier, you ensure that it functions correctly and as intended within your smart contract.
Define a condition that the modifier will enforce using a dedicated operation.
Define Condition: Specify the condition that the modifier will check.
Flow Control:
If Condition is Met: The flow will continue to the next element.
If Condition is Not Met: Select the element to which the flow should split if the condition is not met.
By defining these conditions and flow controls, you can ensure that your modifier enforces the necessary prerequisites and manages the flow of execution within your smart contract.
A Modifier Call is used to call a Modifier in a Function declaration. The modifier is then executed at the beginning of the function.
Select the Modifier object of this call.
Map the required Modifier Input to available Data Entities.