# Syntax & Smart Contract requirements

General syntax model:&#x20;

* &#x20;`// ACL` commented line. (top code recommended)
* `var input = {}:` Smart Contract object. Data structure where the requested metadat&#x61;*(headers, path, jwt, etc.)* is stored.
* `if(ACL)=>{}`statement, deploy conditions. This is the ACL-feature execution context, indeed.
* `throw` excepted output.

This are the requirements to implement successfully the ACL feature. Let's dive a bit into them just to understand the context of their implementation.

`"// ACL"` comment: new instance of ACL execution is required.

`var intput = {};` reserve memory location for self execution inputs.

`if(ACL){`

`if (path[2] === "_storage"){`

&#x20;   `res= { private:"you have no perms to            see this" };`

`sendResponse(res);`

`}else { <Smart-Contract-Logic> }`

This statement is the place to deploy every case in which the ACL should throw anything special. for example: *"this route should be private"* or *"this request should return directly data".*

*"Throw Exception"* if custom actions are required otherwise will execute a normal API request.&#x20;


---

# 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.nxtfi.org/access-control-layer/syntax-and-smart-contract-requirements.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.
