Clique Docs
  • What Is Clique
    • TEE Network
    • Compute Coordination Network
  • Build with Clique
    • Clique Application Structure
    • Clique CLI
      • Installation
      • Develop Task
      • Build Task
      • Test Task
      • Deploy Task
    • Clique Client SDK
    • Smart Contract SDK
      • Smart Contract Integration
      • Clique Official Tasks
  • References
    • Clique Manifest
    • Clique Query
    • Verification
  • Sample Task Tutorials
    • Data Attestation
    • Social Verification
      • Github
      • Twitter
    • Making Arbitrary TLS Calls (TLS Oracle)
    • Custom Executor
  • Toolchain
    • Clique Pipelines SDK
    • Clique Attestation SDK
      • Attestation Protocols
      • Reading Attestations On-chain
      • Reading Attestations Off-Chain
      • What are Attestors ?
        • Data Sources
    • Clique Browser Extension
  • FAQ
  • Glossaries
  • Socials
Powered by GitBook
On this page
  • Initialize from Template
  • How to Use
  • Project Structure
  • Develop Task
  1. Build with Clique
  2. Clique CLI

Develop Task

PreviousInstallationNextBuild Task

Last updated 8 months ago

Initialize from Template

To initialize a repository, use the following command:

$ clique init --template evm

This command will utilize the to create a new project, including contract code and a corresbonding Clique Task Manifest file. Here, "evm" specifies the use of the EVM template. During the subsequent build task phase, the contract code will be compiled to generate EVM bytecode, which will then be populated into the Manifest file (note that the bytecode format is different based on the VM you specify -- we plan to support WASM, RISC V, etc in the future).

How to Use

Before initialization, it is essential to establish an empty directory to serve as your workspace.

$ mkdir workspace
$ cd workspace
$ clique init --template evm

Project Structure

After initialization, the project structure is as follows:

/workspace
-- contracts
   -- Main.sol
-- manifest.toml
-- foundry.toml
  • /contracts/Main.sol is the primary Solidity smart contract source file. This file contains the core smart contract logic and functionalities within the project.

  • manifest.toml is a clique task metadata written in TOML, including I/O schemas, proof types, and optional code or task sections depending on the task type. For more detailed information, please refer to Clique Manifest

  • foundry.toml is a configuration file specific to the toolkit. You can use Foundry to compile and test your contracts. Foundry will also be required for the subsequent build phase to compile the contracts.

If you haven't set up the Foundry environment yet, run the following command in your terminal, then follow the onscreen instructions:

curl -L https://foundry.paradigm.xyz | bash

Develop Task

Upon completion of template initialization, you can modify the contract and manifest.toml.

It is important to note that the contract entry point is fixed and must be Main.sol. Users can import other contracts into Main.sol.

After modifying the contracts, users should update manifest.toml with new name, input and output sections according to the changes made to the contracts. The code section should be left empty, as it will be automatically populated by the CLI during build stage.

EVM template
Foundry