Skip to content

Repository files navigation

OpenVM Solidity SDK

Ask DeepWiki

This repository contains OpenVM verifier contracts generated from official release commits of the openvm repository, either by the cargo-openvm CLI tool or the OpenVM SDK. Most releases use the default VM configuration; some releases may include additional supported variants, such as the v2.0 deferral-enabled verifier. If you're using an advanced or custom VM configuration, you may need to generate and maintain your own verifier contracts separately.

The contracts are built on every minor release as OpenVM guarantees verifier backward compatibility across patch releases.

Installation

To install openvm-solidity-sdk as a dependency in your forge project, run the following:

forge install openvm-org/openvm-solidity-sdk

v2.0 Contract Variants

The v2.0 verifier contracts are published in two variants:

  • v2.0-base is the standard verifier generated for the default OpenVM v2.0 configuration.
  • v2.0-deferral is generated with deferral support enabled. Use this variant when your verifier must support verifying verify-stark guest programs.

The examples below use v2.0-base. If your application needs guest program verify-stark support, replace v2.0-base with v2.0-deferral in the import and deployment paths.

Usage

If you are using a deployed instance of the verifier contract, then you can import the interfaces in your contract directly.

import { IOpenVmHalo2Verifier } from "openvm-solidity-sdk/v2.0-base/interfaces/IOpenVmHalo2Verifier.sol";

contract MyContract {
    function myFunction() public view {
        // ... snip ...

        IOpenVmHalo2Verifier(verifierAddress)
            .verify(publicValues, proofData, appExeCommit, appVmCommit);

        // ... snip ...
    }
}

If you want to deploy your own instance of the verifier contract, you can use forge create:

forge create src/v2.0-base/OpenVmHalo2Verifier.sol:OpenVmHalo2Verifier --rpc-url $RPC --private-key $PRIVATE_KEY --broadcast

If you want to import the verifier contract into your own repository for testing purposes, note that it is locked to Solidity version 0.8.19. If your project uses a different version, the import may not compile. As a workaround, you can compile the contract separately and use vm.etch() to inject the raw bytecode into your tests.

Audits

Versions v1.7 and later of these contracts are recommended for production use. The code to generate these contracts from release commits of OpenVM was audited by Cantina in January 2026.

Security

See SECURITY.md.

About

Solidity SDK for OpenVM.

Resources

Security policy

Stars

7 stars

Watchers

4 watching

Forks

Releases

Packages

Used by

Contributors

Languages