# Pirichain Smart Scenario

Pirichain smart scenario system has capacity of analyzing and processing data on the basis of typescript and javascript. The information has been added by the companies to allow the queries that the companies want with the smart scenarios written by the software experts. Besides query, it is possible to run different scenarios by creating certain conditions. The diagram in Figure 2.1 shows the relationship of smart scenarios with the whole system. In addition, the actions that smart scenarios can do on the system are also explained in the boxes in the diagram.

<figure><img src="/files/OedjnmGbc4FyJKeworDV" alt=""><figcaption><p><strong>Figure 2.1:</strong> Pirichain Smart scenario relationship with modules</p></figcaption></figure>

Pirichain smart scenarios undertake tasks that cover the entire system. According to the scenario structure to be written on the system, whether information transfers are made or the assets are sent to the desired addresses according to a certain condition, this completely changes according to the modeling to be determined by the users.

As the simplest form of expression; information added to the block network, flour, water, sugar, oil etc. Considering that they are products, either pies or breads can be made with smart scenarios. This is entirely up to the developer's own needs and abilities. Whatever the software requirement analysis requires, the desired data modeling can be done with Pirichain's ready-made functions, and the needs can be shaped with complex queries. Pirichain scenario development interface is shown in Figure 2.2 (code block below).

{% code overflow="wrap" lineNumbers="true" %}

```typescript
async function init(param1,param2,param3)
{
// Your code goes here...
 // You can execute only you 

 if (EXECUTER_ADDRESS!==OWNER_ADDRESS) 
 return "You dont have permission for execute this scenario!"; 

 var dummyTest=await Transaction.getBalance(EXECUTER_ADDRESS);
 return dummyTest;
}

```

{% endcode %}


---

# 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://whitepaper.pirichain.com/pirichain-smart-scenario/pirichain-smart-scenario.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.
