# Modifiers

## Introduction

Modifiers are constructs used to modify a [Function](/akb-wiki/astrakode-wiki/smart-contract-ide/technologies/ethereum/components/functions.md)'s behavior, for instance by defining a prerequisite to be checked before the function is executed.

## Configuration

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.

<figure><img src="/files/ylBNCeuKV5bTU83NdZ9F" alt=""><figcaption></figcaption></figure>

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.

<figure><img src="/files/B1aCLbryT6zf46ubUAjc" alt=""><figcaption></figcaption></figure>

Define a condition that the modifier will enforce using a dedicated operation.

1. **Define Condition**: Specify the condition that the modifier will check.
2. **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.

<figure><img src="/files/PqtPVdUwr4Po5hV1e54U" alt=""><figcaption></figcaption></figure>

## Settings

A Modifier Call is used to call a Modifier in a [Function](/akb-wiki/astrakode-wiki/smart-contract-ide/technologies/ethereum/components/functions.md) declaration. The modifier is then executed at the beginning of the function.

Select the Modifier object of this call.

[Map](/akb-wiki/astrakode-wiki/smart-contract-ide/technologies/ethereum/components/mapping.md) the required Modifier Input to available [Data Entities](/akb-wiki/astrakode-wiki/smart-contract-ide/technologies/ethereum/components/data-entities.md).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.astrakode.tech/akb-wiki/astrakode-wiki/smart-contract-ide/technologies/ethereum/components/modifiers.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
