ClearDAO FAQ
  • Getting Started
    • How it Works
    • Product
    • Roadmap
    • Team
    • ClearDAO Token
    • ClearDAO Token Bridge
    • Contact
  • Development Resources
    • SDK
      • ClearDAO Developer Guide
      • Deploy Contracts
        • Options and Notes
          • Quick Start
          • Configure Contract
          • Contract Upgrade
          • Contract Address
        • TRS
      • Configure Contract Parameters
      • Interact With Contracts
        • Options
        • Notes
        • TRS
        • CDS
          • README
          • CDS Buyer
          • Challenger
          • Liquidity Provider
          • Ticket
          • Ticket Market
          • Ticket Sale
          • Seller
      • Contract Reference
        • Oracle
        • Index Contract
        • Option Contract
        • Market Maker Contract
        • Note Contract
      • APIs
        • CDS
          • Config
          • Ticket
          • Ticket Sale
          • Transaction
          • CDS Market
          • Issue CDS
          • CDS Category
          • Ticket Market
        • Options and Notes
          • Configure
          • Price
          • User
          • Index
          • Option Parameter Configuration
          • Faucet
          • Market Maker
        • TRS
        • CLEARIndex
    • Barrier Options
    • NFT Marketplace
    • ClearIndex
  • Governance
    • CLH Staking Module
Powered by GitBook
On this page
  • Deploy option contract
  • Deploy environment
  • Private Key and network
  1. Development Resources
  2. SDK
  3. Deploy Contracts
  4. Options and Notes

Quick Start

PreviousOptions and NotesNextConfigure Contract

Last updated 1 year ago

Deploy option contract

  • Clone the clear contract repository.

  • Install system dependencies.

  • Customize the deployment script to meet your desired contract design.

  • Get the URL of the Ethereum node.

  • Deploy the script on the testnet.

  • Run the deployment script to deploy to the mainnet.

Deploy environment

Tools

Before starting the following steps, you need to install git 、 node (v10.*.* and later). To compile the source code, you need to install truffle

	npm install -g truffle

Project source code

Run the following command to clone the source code of the project to the local

	git clone https://github.com/DerivStudio/contracts

After entering the newly cloned project, run the following command to install the environment dependencies

npm install --save

Private Key and network

By creating a private key through metamask or other methods, you can use any network that supports the solidity language to deploy your contract. If you use the token price to make an index, you need to make sure that the network you chose has an available oracle. The networks currently deployed by ClearDAO include ETH, BSC and Abitrum (kovan, rinkeby and ropsten test networks), or private chains. After selecting the network, choose a reliable node. You can use geth to synchronize node or use a node similar to infura.

repo