> For the complete documentation index, see [llms.txt](https://docs.frequencychain.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.frequencychain.org/5.-smart-contract-development-remix-+-hardhat/5.1-understanding-smart-contracts.md).

# 5.1 Understanding Smart Contracts

Before deployment, it is important to understand how smart contracts function.

A smart contract is deployed to the blockchain as code, has a permanent address, can store data and execute functions and cannot be modified once deployed.

When a user interacts with a contract, they are sending a transaction that triggers a function within that contract. This transaction is validated by the network and executed deterministically across all nodes.

<p align="center">Smart Contract Architecture</p>

<figure><img src="https://1067227230-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLwgYv3BMBEDsxgxyrgOJ%2Fuploads%2FAMrzPbIZbcUKrXlxjBFi%2Fsec5.1.png?alt=media&amp;token=c7a9d1eb-31b0-4ef9-b27d-7574c786e55e" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.frequencychain.org/5.-smart-contract-development-remix-+-hardhat/5.1-understanding-smart-contracts.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
