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.
This repo is a part of the following:
- contract-verifier-contracts - Sources registry contracts which stores an on-chain proof per code cell hash.
- contract-verifier-backend (this repo) - Backend for compiling FunC and returning a signature over a message containing the resulting code cell hash.
- contract-verifier-sdk - A UI component to fetch and display sources from Ton blockchain and IPFS, including code highlighting.
- contract-verifier - A UI app to interact with the backend, contracts and publish an on-chain proof.
The backend supports compiling in func in all versions stated in the config file
Binaries can be acquired (precompiled) from ton-binaries repo or from the official ton repo.
Fiftlib can also be acquired from the same repo.
To deploy on heroku, you can use the func compilation buildpack.
- Ensure you have working binaries for func 0.2.0/0.3.0/0.4.0 + fiftlib in this format:
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)
INFURA_ID
andINFURA_SECRET
- The backend persists sources and compilation metadata to an infura IPFS node.PRIVATE_KEY
- To sign its message cell with a private key, which is verified by the verifier registry. Provide an ED25519 compatible private key.SOURCES_REGISTRY
- The address of the sources registry contract (default from .env)VERIFIER_ID
- Sources verifier id (default from .env)
npm install
npm run start
MIT