> For the complete documentation index, see [llms.txt](https://hub.bsvblockchain.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hub.bsvblockchain.org/higher-learning/bsv-academy/deep-dive-in-bsv-blockchain/the-power-of-tokens-and-smart-contracts/smart-contracts-on-bsv-scrypt.md).

# Smart Contracts on BSV: sCrypt

<figure><img src="https://github.com/bsv-blockchain/gitbook-bsv-academy/blob/master/.gitbook/assets/Slide29.jpg" alt=""><figcaption></figcaption></figure>

### Bitcoin Script Features

Smart contracts on BSV utilize **Bitcoin Script**, a stack-based programming language with unique characteristics:

* **Restored Opcodes**: Many opcodes that were disabled in other Bitcoin forks are re-enabled, allowing for **complex logic**.
* **Deterministic Execution**: Contracts execute predictably, either succeeding or failing **atomically** without mid-execution failures.

This **reliability** is crucial for developers looking to create robust applications on the blockchain.

### sCrypt Framework

The **sCrypt framework** enhances the usability of Bitcoin Script by allowing developers to write contracts in **TypeScript**. Key features include:

* **Simplified Development**: Developers can leverage familiar TypeScript syntax, making the **learning curve** less steep.
* **Compilation to Script**: Contracts written in TypeScript are compiled into Bitcoin Script, streamlining the **deployment process**.

This framework significantly lowers the **barrier to entry** for creating smart contracts on BSV.

### Benefits of BSV Smart Contracts

BSV smart contracts offer numerous advantages that make them appealing for developers and businesses:

* **Low Transaction Costs**: The cost of executing contracts is minimal, often just a **fraction of a cent**.
* **Scalability**: BSV's architecture supports **high transaction throughput**, making it suitable for large-scale applications.
* **Predictable Execution**: The deterministic nature of BSV contracts ensures that outcomes are **consistent and reliable**.

These benefits position BSV as a strong contender for businesses looking to implement **blockchain solutions**.


---

# 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://hub.bsvblockchain.org/higher-learning/bsv-academy/deep-dive-in-bsv-blockchain/the-power-of-tokens-and-smart-contracts/smart-contracts-on-bsv-scrypt.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.
