The onchain execution engine is the first concrete runtime for Agreements Protocol. It is implemented in CNSLabs/agreements-protocol-evm, including Solidity contracts and the lower-levelDocumentation Index
Fetch the complete documentation index at: https://docs.shodai.network/llms.txt
Use this file to discover all available pages before exploring further.
@cns-labs/agreements-protocol-evm SDK.
The engine interprets agreement definitions produced from the agreement data standard and gives them a verifiable onchain execution surface.
The current onchain implementation runs on Linea Sepolia and Linea Mainnet.
Execution model
Each deployed agreement definition becomes an isolated onchain execution instance. TheAgreementFactory deploys AgreementEngine instances, and each instance stores the agreement-specific inputs, verifiers, transitions, initialization values, and optional actions.
Agreements are deployed through an AgreementFactory. Each deployed agreement has an associated engine that tracks its state, validates submitted inputs, and applies the authored transition rules.
The agreement’s deployed behavior is derived from the agreement definition and associated deployment data. Once deployed, the core agreement definition is fixed, which makes the agreement reliable as a shared operational source of truth.
For signing details, typed data, and current factory addresses, see the EIP-712 Signing Reference.
What the engine enforces
The engine enforces the agreement lifecycle:- A participant submits an input.
- The engine validates and verifies the submitted payload.
- The engine checks whether the input is allowed from the current state.
- The engine updates state when the transition is valid.
- Optional actions run as part of the configured transition.
- The result is emitted through onchain state and events.
Agreement instances and execution history
A deployed agreement instance produces a sequence of events, state transitions, submitted inputs, and final outcomes. That history becomes the shared source of truth for the agreement. Participants do not need to reconcile independent application databases to understand what happened. They can read the agreement instance, inspect input history, and verify the state that follows from accepted inputs.Direct engine usage
Use the direct onchain path when your integration already works with wallets, RPC clients, and contract-level execution. The onchain repository contains:| Area | Purpose |
|---|---|
contracts/ | Solidity contracts, tests, deployment scripts, and deployment artifacts. |
sdk/ | TypeScript SDK package for AgreementFactory, AgreementEngine, ABIs, deployments, and payload helpers. Published as @cns-labs/agreements-protocol-evm. |
agreements/ | Sample agreement artifacts used for execution-engine tests and examples. |