Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
ce56bd7
added legacy directory
konstantinkoniukov May 12, 2026
97749a9
edited config for docs 2.0
konstantinkoniukov May 12, 2026
53f20d6
edited origins/destinations page
konstantinkoniukov May 12, 2026
052af60
edited hyperlane page
konstantinkoniukov May 12, 2026
66a942b
removed unused images
konstantinkoniukov May 12, 2026
9204f19
removed unused images
konstantinkoniukov May 12, 2026
7a372f6
updated reactive contracts page
konstantinkoniukov May 12, 2026
0029a77
updated reactvm page
konstantinkoniukov May 12, 2026
b176923
removing unneeded files, editing slugs for legacy pages
konstantinkoniukov May 14, 2026
14f8bd3
updated the index page
konstantinkoniukov May 14, 2026
c65d97e
updated the origins/destinations page
konstantinkoniukov May 14, 2026
b8f0e1b
updated the Hyperlane page
konstantinkoniukov May 14, 2026
6a805f6
updated the reactive contract page
konstantinkoniukov May 14, 2026
d3d215f
updated the reactvm contract page
konstantinkoniukov May 14, 2026
c0951a0
updated the economy contract page
konstantinkoniukov May 14, 2026
860b12c
updated the mainnet contract page
konstantinkoniukov May 14, 2026
96cbc51
updated the library page
konstantinkoniukov May 14, 2026
29b5c04
updated the events/callbacks page
konstantinkoniukov May 14, 2026
8d73144
updated the subscriptions page
konstantinkoniukov May 15, 2026
eb045a9
updated the rpc methods page
konstantinkoniukov May 15, 2026
58df8e8
updated the demos page
konstantinkoniukov May 15, 2026
7d8e9c6
updated the index page
konstantinkoniukov May 21, 2026
f4b8909
updated system contract address
konstantinkoniukov May 21, 2026
b9f17d9
updated system contract address
konstantinkoniukov May 21, 2026
195c796
updated origin/destination page
konstantinkoniukov May 21, 2026
ba326fe
updated RC page
konstantinkoniukov May 21, 2026
a67bb5a
unlisted reactvm
konstantinkoniukov May 22, 2026
9bba824
updated the index page
konstantinkoniukov May 22, 2026
460999d
unlisted pages (temporarily)
konstantinkoniukov May 22, 2026
c3e3476
updated reactive lib
konstantinkoniukov May 22, 2026
81ab12b
updated rnk rpc methods
konstantinkoniukov May 25, 2026
88f4a5f
added more redirects
konstantinkoniukov May 26, 2026
b8eefd2
edited lasna button
konstantinkoniukov May 26, 2026
b14fffa
updated mainnet testnet info
konstantinkoniukov May 26, 2026
535b39e
removed education section
konstantinkoniukov May 26, 2026
37f54f1
removed education section2
konstantinkoniukov May 26, 2026
607efa7
made an archive folder
konstantinkoniukov May 26, 2026
4f804cb
minor edit
konstantinkoniukov May 26, 2026
8b935f5
updated reactive library
konstantinkoniukov May 26, 2026
cb325bf
updated reactive mainnet page
konstantinkoniukov May 26, 2026
0a283f7
updated events/callback page
konstantinkoniukov May 26, 2026
4056c21
updated events/callback page
konstantinkoniukov May 26, 2026
3895b37
minor chabges
konstantinkoniukov May 26, 2026
f8cd6e1
upddated subscriptions
konstantinkoniukov May 26, 2026
d93a892
upddated index page
konstantinkoniukov May 26, 2026
e1a6f9c
minor edit
konstantinkoniukov May 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ sidebar_position: 4
description: A comprehensive blockchain and DeFi glossary for developers, traders, and builders joining Reactive Network. Learn essential Web3, EVM, cross-chain, and Reactive Contract concepts—from Airdrops and Finality to TPS, block time, and automated DeFi execution.
slug: glossary
hide_title: true
unlisted: true
---

![Glossary Image](img/glossary.jpg)
Expand Down
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ title: Introduction
description: Educational course on Reactive Contracts covering events, callbacks, subscriptions, oracles, and ReactVM. Includes lectures, GitHub code examples, and video workshops for developers building on Reactive Network.
slug: /education/introduction
hide_title: true
unlisted: true
---

![Reactive Network Education Image](../img/reactive-education.jpg)
Expand All @@ -16,9 +17,9 @@ This course walks you through how Reactive contracts work, step by step. You'll

Start with the introduction for a closer look at what Reactive contracts can do and how they operate across EVM-compatible chains, then check the prerequisites to make sure you have the right background before moving on.

[Introduction to Reactive Contracts →](./reactive-contracts.md)
[Introduction to Reactive Contracts →](reactive-contracts.md)

[Prerequisites →](./prerequisites.md)
[Prerequisites →](prerequisites.md)

## Module One

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: Technical and Knowledge Prerequisites for Mastering Reactive Contracts
sidebar_position: 2
description: What you need to know before starting the Reactive Contracts course. Covers required background in Solidity, EVM, Git, and command line tools, plus wallet setup for Ethereum Sepolia testnet deployment.
slug: prerequisites
unlisted: true
---

# Technical and Knowledge Prerequisites for Mastering Reactive Contracts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: "What Are Reactive Contracts and Why Do They Matter"
sidebar_position: 1
description: Reactive Contracts are smart contracts that autonomously monitor and respond to events across EVM-compatible blockchains. Explains what they are, how they differ from traditional smart contracts, and why cross-chain automation matters.
slug: reactive-contracts
unlisted: true
---

# What Are Reactive Contracts and Why Do They Matter
Expand All @@ -13,7 +14,7 @@ Regular smart contracts sit idle until someone sends them a transaction. They ca

Reactive contracts work differently. They monitor events across EVM-compatible chains and respond to them automatically, executing logic and triggering on-chain actions without anyone having to intervene. No manual transactions, no centralized bots, no private key management on your end.

![Basic Reactive Workflow](./img/basic-reactive-workflow.jpg)
![Basic Reactive Workflow](img/basic-reactive-workflow.jpg)

## Why This Matters

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: "Lesson 2: How Events and Callbacks Work"
sidebar_position: 2
description: Learn how EVM events and callbacks work in Reactive Contracts. Covers event creation and emission, the IReactive interface and react() method, and how callbacks trigger cross-chain transactions on destination chains.
slug: how-events-work
unlisted: true
---

# Lesson 2: How Events and Callbacks Work
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: "Lesson 5: How Oracles Work"
sidebar_position: 5
description: How oracles bring off-chain data onto the blockchain and why they matter for Reactive Contracts. Covers the oracle problem, multisig security, Chainlink integration, and how Reactive Contracts can respond to oracle events in real time.
slug: how-oracles-work
unlisted: true
---

# Lesson 5: How Oracles Work
Expand Down
Original file line number Diff line number Diff line change
@@ -1,32 +1,39 @@
---
title: "Module 1: Beginner — Foundations of Reactive Contracts"
sidebar_position: 1
description: Introduction to Reactive Contracts covering how they respond to on-chain events, EVM event handling and callbacks, the ReactVM dual-state environment, subscriptions, and how oracles connect blockchain with off-chain data.
slug: /education/module-1
---
[//]: # (---)

[//]: # (title: "Module 1: Beginner — Foundations of Reactive Contracts")

[//]: # (sidebar_position: 1)

[//]: # (description: Introduction to Reactive Contracts covering how they respond to on-chain events, EVM event handling and callbacks, the ReactVM dual-state environment, subscriptions, and how oracles connect blockchain with off-chain data.)

[//]: # (slug: /education/module-1)

[//]: # (unlisted: true)

[//]: # (---)

# Module 1: Beginner — Foundations of Reactive Contracts

# Overview

Module 1 covers the core concepts behind Reactive contracts: how they work, what makes them different from regular smart contracts, and the infrastructure that supports them. By the end of this module, you'll understand how Reactive contracts detect events, execute responses, and interact with off-chain data.

[Lesson 1: Reactive Contracts](./reactive-contracts.md)
[Lesson 1: Reactive Contracts](reactive-contracts.md)

How Reactive contracts work in practice, focusing on their reactive nature. Walks through real use cases like data collection with oracles and executing stop orders on decentralized exchanges.

[Lesson 2: How Events and Callbacks Work](./how-events-work.md)
[Lesson 2: How Events and Callbacks Work](how-events-work.md)

How EVM events and callbacks enable communication between smart contracts and external systems. Includes a practical example using Chainlink's price oracle integration.

[Lesson 3: ReactVM and Reactive Network As a Dual-State Environment](./react-vm.md)
[Lesson 3: ReactVM and Reactive Network As a Dual-State Environment](react-vm.md)

Reactive Network runs on a dual-state environment: ReactVM for Reactive logic and Reactive Network (RNK) for on-chain execution. This lesson explains how state management and transactions work across both.

[Lesson 4: How Subscriptions Work](./subscriptions.md)
[Lesson 4: How Subscriptions Work](subscriptions.md)

Subscriptions are how Reactive contracts listen for specific on-chain events. This lesson covers setting them up, managing them, and using them to automate contract execution.

[Lesson 5: How Oracles Work](./how-oracles-work.md)
[Lesson 5: How Oracles Work](how-oracles-work.md)

Oracles bridge the gap between blockchain and real-world data. This lesson explains how they work, covers multisig protocols for securing oracle data, and walks through applications in DeFi, insurance, and prediction markets.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: "Lesson 3: ReactVM and the Dual-State Environment"
sidebar_position: 3
description: Learn how Reactive contracts operate across two separate states — one on Reactive Network and one in a private ReactVM instance. Covers execution context detection, managing dual variable sets, and how transactions flow in each environment.
slug: react-vm
unlisted: true
---

# Lesson 3: ReactVM and the Dual-State Environment
Expand All @@ -24,7 +25,7 @@ By the end of this lesson, you'll understand:

Every deployed Reactive contract has two instances: one on Reactive Network and one in a dedicated ReactVM. Both instances are physically stored and executed on each network node. This separation is an architectural decision made to ensure high performance even with large volumes of events.

![Reactive Network | ReactVM](./img/reactvm.jpg)
![Reactive Network | ReactVM](img/reactvm.jpg)

**Reactive Network** operates as a standard EVM blockchain with additional system contracts that handle subscribing and unsubscribing to events on origin chains like Ethereum, BNB, Polygon, or Optimism. Each deployer address has its own dedicated ReactVM.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: "Lesson 1: Reactive Contracts"
sidebar_position: 1
description: Learn how Reactive Contracts differ from traditional smart contracts and practical use cases including oracle data aggregation, Uniswap stop orders, DEX arbitrage, and cross-chain pool rebalancing.
slug: reactive-contracts
unlisted: true
---

# Lesson 1: Reactive Contracts
Expand All @@ -25,7 +26,7 @@ With traditional smart contracts, control flows from the outside in. An external

Reactive contracts invert that. The contract itself defines which events it cares about and what to do when they happen. Execution is triggered by on-chain events, not by someone signing a transaction.

![Inversion of Control](./img/inversion-of-control.jpg)
![Inversion of Control](img/inversion-of-control.jpg)

To see why this matters, consider the alternative. Without a Reactive contract, you'd need to set up a separate service (typically a bot) to monitor blockchains using centralized data providers. That bot holds private keys for the funds it manages and submits transactions from its own EOA address. It works, but it introduces a centralized point of control that can fail, be compromised, or go offline.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: "Lesson 4: How Subscriptions Work"
sidebar_position: 4
description: Learn how to set up and manage event subscriptions in Reactive Contracts. Covers static subscriptions in the constructor, subscription criteria and wildcards, prohibited patterns, and dynamic subscription management through callbacks.
slug: how-subscriptions-work
unlisted: true
---

# Lesson 4: How Subscriptions Work
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: "Lesson 7: Basic Reactive Functions"
sidebar_position: 2
description: Walkthrough of a Reactive Contract that implements a Uniswap V2 stop order. Covers the contract structure, event subscriptions, the react() function, threshold logic, and the full execution flow from initialization to trade completion.
slug: basic-reactive-functions
unlisted: true
---

# Lesson 7: Basic Reactive Functions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: "Lesson 6: How Uniswap V2 Works"
sidebar_position: 1
description: Discover how Uniswap V2 pools and smart contracts work, including the constant product formula and key events like Swap and Sync. Learn about token swaps, liquidity provisioning, and see a smart contract example.
slug: how-uniswap-works
unlisted: true
---

# Lesson 6: How Uniswap V2 Works
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
---
title: "Module 2: Intermediate - Building Blocks for Reactivity"
sidebar_position: 1
description: Practical introduction to DeFi and Reactive Contracts. Covers how Uniswap V2 liquidity pools and smart contracts work, then shows how Reactive Contracts can autonomously execute trades based on real-time on-chain conditions.
slug: /education/module-2
---
[//]: # (---)

[//]: # (title: "Module 2: Intermediate - Building Blocks for Reactivity")

[//]: # (sidebar_position: 1)

[//]: # (description: Practical introduction to DeFi and Reactive Contracts. Covers how Uniswap V2 liquidity pools and smart contracts work, then shows how Reactive Contracts can autonomously execute trades based on real-time on-chain conditions.)

[//]: # (slug: /education/module-2)

[//]: # (unlisted: true)

[//]: # (---)

# Module 2: Intermediate - Building Blocks for Reactivity

Expand All @@ -13,10 +20,10 @@ Module 1 covered the core concepts: how Reactive contracts work, how they proces

You'll start by learning how Uniswap V2 works under the hood: its liquidity pools, smart contracts, and trading mechanics. Then you'll see how a Reactive contract can plug into that system and autonomously execute trades when specific conditions are met. This is where the theory from Module 1 starts turning into practical applications.

[Lesson 6: How Uniswap V2 Works](./how-uniswap-works.md)
[Lesson 6: How Uniswap V2 Works](how-uniswap-works.md)

How Uniswap V2's liquidity pools and smart contracts enable decentralized trading. Covers the constant product formula, how swaps work, and what events Uniswap emits, which is what a Reactive contract will subscribe to in the next lesson.

[Lesson 7: Basic Reactive Functions](./basic-reactive-functions.md)
[Lesson 7: Basic Reactive Functions](basic-reactive-functions.md)

How Reactive contracts operate in a DeFi context. Walks through how a Reactive contract can monitor Uniswap events and autonomously execute trades when on-chain conditions match predefined criteria.
33 changes: 33 additions & 0 deletions archive/education/use-cases/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
[//]: # (---)

[//]: # (title: "Use Cases")

[//]: # (sidebar_position: 1)

[//]: # (description: Discover practical uses of Reactive Contracts with demos on low-latency log monitoring and Uniswap V2 stop orders. Deploy and test these examples to boost your expertise.)

[//]: # (slug: /education/use-cases)

[//]: # (unlisted: true)

[//]: # (---)

# Use Cases

## Overview

The Use Cases section primarily focuses on analyzing scenarios where Reactive Contracts might be a game changer.

The [Basic Demo](use-case-1.md) is a basic use case of the Reactive Network enabling low-latency event monitoring, capturing logs from origin chain contracts, processing them, and triggering callbacks on the destination chain.

The [Deploying Reactive Contracts with Remix](remix-ide-demo.mdx) article is a guide for deploying a Reactive Contract using the Remix Development Environment.

The [Uniswap V2 Stop Order Demo](use-case-3.md) is a demo of a simple Reactive contract that implements a stop order upon a Uniswap V2 liquidity pool. Study its setup and try deploying and testing it yourself.

The [Approval Magic Demo](use-case-2.md) extends reactive and subscription-based concepts to implement an approval-based token exchange across multiple chains.

If you have an idea for another use case, feel free to submit and turn it into a bounty, using our [Unicornization](https://reactive.network/unicornization) program.

## GitHub Repository

Visit the [Reactive Contract Demos](https://github.com/Reactive-Network/reactive-smart-contract-demos) repository on GitHub to clone the project and start exploring!
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@ title: "Deploying Reactive Contracts with Remix"
sidebar_position: 2
description: Learn how to deploy a basic reactive contract using Remix IDE. Ideal for mastering Reactive Network fundamentals.
slug: remix-ide-demo
unlisted: true
---

import LasnaButton from "../../../src/components/lasna-button";
import DownloadButton from "../../../src/components/download-zip";

# Deploying Reactive Contracts with Remix

## Overview
Expand All @@ -24,7 +22,7 @@ Before getting started, ensure you have a basic understanding of the following:

You'll also need three smart contracts, along with their abstract contracts and interfaces, to run the demo. All contracts should remain in the same folder. Download all the necessary files using the button below:

<DownloadButton />
[//]: # (<DownloadButton />)

<hr />

Expand All @@ -40,7 +38,7 @@ The exchange rate is **1/100**, meaning you'll receive **100 REACT** for **1 Sep
Do not send more than 5 SepETH per request, as doing so will cause you to lose the excess amount without receiving any additional REACT. The maximum that should be sent in a single transaction is 5 SepETH, which will yield 500 REACT.
:::

<LasnaButton />
[//]: # (<LasnaButton />)

<hr />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: "Use Case: Reactive Network Demo"
sidebar_position: 1
description: Learn to build and deploy a Basic Reactive Contract. Understand low-latency log monitoring and cross-chain calls using Ethereum testnets. Ideal for mastering Reactive Network fundamentals.
slug: use-case-1
unlisted: true
---

# Use Case: Reactive Network Demo
Expand All @@ -14,7 +15,7 @@ This article focuses on building and deploying a reactive contract, using the ba
* Low-latency monitoring of logs emitted by contracts on the origin chain.
* Executing calls from the Reactive Network to contracts on the destination chain.

![Basic Demo](./img/use-case-1.png)
![Basic Demo](img/use-case-1.png)

## Contracts

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: "Use Case: Approval Magic Demo"
sidebar_position: 4
description: Explore how the reactive network automates token approvals and transfers across multiple chains. Learn about the ApprovalService, ApprovalListener, and client contracts like ApprovalEthExch and ApprovalMagicSwap, and how they optimize gas costs while ensuring secure, real-time token interactions. Gain practical insights into its setup, functionality, and deployment.
slug: use-case-2
unlisted: true
---

# Use Case: Approval Magic Demo
Expand All @@ -13,7 +14,7 @@ This article focuses on the [Approval Magic Demo](https://github.com/Reactive-Ne

## Magic Exchange Flow

![Exchange](./img/magic-exchange.png)
![Exchange](img/magic-exchange.png)

1. Validator calls `callback()` on `CallbackProxy`.
2. `CallbackProxy` calls `onApproval()` on `ApprovalService`.
Expand All @@ -25,7 +26,7 @@ This article focuses on the [Approval Magic Demo](https://github.com/Reactive-Ne

## Magic Swap Flow

![Swap](./img/magic-swap.png)
![Swap](img/magic-swap.png)

1. Validator calls `callback()` on `CallbackProxy`.
2. `CallbackProxy` calls `onApproval()` on `ApprovalService`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@ title: "Use Case: Uniswap V2 Stop Order Demo"
sidebar_position: 3
description: Discover how a Reactive Contract executes stop orders on Uniswap V2 pools, automating trade actions based on predefined conditions. Gain practical insights into its setup, functionality, and deployment.
slug: use-case-3
unlisted: true
---

# Use Case: Uniswap V2 Stop Order Demo

## Overview

This article focuses on the [Uniswap V2 Stop Order Demo](https://github.com/Reactive-Network/reactive-smart-contract-demos/tree/main/src/demos/uniswap-v2-stop-order) where a reactive contract listens for `Sync` events in a Uniswap V2 pool and triggers asset sales when the exchange rate hits a specified threshold. This demo extends the principles introduced in the [Reactive Network Demo](./use-case-1.md), which provides an introduction to building Reactive Contracts that respond to real-time events.
This article focuses on the [Uniswap V2 Stop Order Demo](https://github.com/Reactive-Network/reactive-smart-contract-demos/tree/main/src/demos/uniswap-v2-stop-order) where a reactive contract listens for `Sync` events in a Uniswap V2 pool and triggers asset sales when the exchange rate hits a specified threshold. This demo extends the principles introduced in the [Reactive Network Demo](use-case-1.md), which provides an introduction to building Reactive Contracts that respond to real-time events.

![Uniswap V2 Stop Order](./img/uniswap-stop-order.jpg)
![Uniswap V2 Stop Order](img/uniswap-stop-order.jpg)

## Contracts

Expand Down
3 changes: 2 additions & 1 deletion docs/docs/debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ sidebar_position: 15
description: The page dedicated to debugging of most frequent errors and issues on Reactive Network.
slug: /debugging
hide_title: true
unlisted: true
---

![Debugging Image](./img/debugging.jpg)
Expand Down Expand Up @@ -61,7 +62,7 @@ You can verify a contract’s balance anytime on Reactscan or via Foundry cast c
cast balance $CONTRACT_ADDR --rpc-url $RPC_URL
```

To check the outstanding debt, query the relevant proxy contract (`0x0000000000000000000000000000000000fffFfF` on Reactive):
To check the outstanding debt, query the relevant proxy contract (`0x8888888888888888888888888888888888888888` on Reactive):

```bash
cast call $PROXY_ADDR "debts(address)" $CONTRACT_ADDR --rpc-url $RPC_URL | cast to-dec
Expand Down
Loading
Loading