ton-community / contract-verifier-backend

MIT License
24 stars 7 forks source link

contract-verifier-backend

A backend used for compiling FunC code and returning a signed message containing a proof of verification to be forwarded to the Sources Registry contract. The signed message is later stored on a source item contract as a proof that the source code compiles to a specific code cell hash.

Related repositories

This repo is a part of the following:

  1. contract-verifier-contracts - Sources registry contracts which stores an on-chain proof per code cell hash.
  2. contract-verifier-backend (this repo) - Backend for compiling FunC and returning a signature over a message containing the resulting code cell hash.
  3. contract-verifier-sdk - A UI component to fetch and display sources from Ton blockchain and IPFS, including code highlighting.
  4. contract-verifier - A UI app to interact with the backend, contracts and publish an on-chain proof.

Configurations

The backend supports compiling in func in all versions stated in the config file

Preqrequisites

Binaries + fiftlib

Binaries can be acquired (precompiled) from ton-binaries repo or from the official ton repo.

Fiftlib can also be acquired from the same repo.

Heroku

To deploy on heroku, you can use the func compilation buildpack.

Locally

  resources/
    binaries/
      0.2.0/fift
      0.2.0/func
      0.2.0/fiftlib (directory)
      0.3.0/fift
      0.3.0/func
      0.3.0/fiftlib (directory)

Environment variables

Running

License

MIT