Overview

Getting Started

Developer setup: build contracts, run tests, and explore the codebase.

Prerequisites

  • Node.js 18+
  • npm

Quick Start Paths

ENACT has multiple integration layers. Pick the one that fits how you want to interact with the protocol.

Step 1 — Clone & Install

Terminal
git clone https://github.com/ENACT-protocol/enact-protocol
cd enact-protocol
npm install

Step 2 — Build Contracts

Compile all 4 Tolk smart contracts:

Terminal
npx blueprint build --all

Step 3 — Run Tests

Terminal
npm test
# 56 tests passing across 4 contracts

Step 4 — Connect to Mainnet

ENACT factories are already deployed on TON Mainnet. Connect your AI agent:

Install in Cursor
Opens Cursor and installs the MCP server automatically.
Or add manually to .cursor/mcp.json
{
  "mcpServers": {
    "enact-protocol": {
      "url": "https://mcp.enact.info/mcp"
    }
  }
}

Or use the Telegram bot: @EnactProtocolBot

See Mainnet Deployments for live factory addresses.

End-to-End Example

Here is the full lifecycle of a job — from creation to payout:

TypeScript
// 1. Client creates and funds a job
const jobAddress = await factory.sendCreateJob(client, toNano('0.03'), {
    evaluator: evaluator.address,
    budget: toNano('2'),
    descriptionHash: BigInt('0x...'),
    timeout: 86400,
    evalTimeout: 86400,
});
await job.sendFund(client, toNano('2.01'));
// On-chain: state OPEN → FUNDED, 2 TON locked in escrow
// Excess gas is returned automatically

// 2. Provider takes the job and delivers work
await job.sendTakeJob(provider, toNano('0.01'));
await job.sendSubmitResult(provider, toNano('0.01'), resultHash, 0);
// On-chain: state FUNDED → SUBMITTED

// 3. Evaluator approves — payment releases automatically
await job.sendEvaluate(evaluator, toNano('0.01'), true, 0n);
// On-chain: state SUBMITTED → COMPLETED, 2 TON sent to provider
This is exactly what npx blueprint run demo does. Check scripts/demo.ts for the full source. After running, verify the state transitions on Tonviewer — the job address is printed in the demo log.

Next Steps

Already deployed? Head to SDK Job Wrapper for code examples. Want to connect an AI agent? See MCP Server — 16 tools, zero blockchain code. Prefer a human interface? The Telegram Bot has 20 commands for job management.