Skip to content

dotbitHQ/das-lock

Repository files navigation

DAS LOCK

A dispatch contract and some dynamic libraries.

Overview

This project is a Rust and C hybrid project that targets the riscv64-unknown-linux-gnu platform. It uses Rust for the contract entry (dispatch) and C for dynamic libraries (ckb_sign, tron_sign, etc). The Makefile handles the build process, enabling development through both native and Docker environments. The project also depends on the Nervos Network CKB blockchain protocol and several cryptography libraries.

Dependencies

Features

  • Build for multiple net types (default is testnet2)
  • Optimize and strip binaries
  • Debug and Release build types
  • Control build flags via environment variables
  • Docker environment for isolated building
  • Compile contracts and dynamic libraries with security features

Build Instructions

  1. Clone the repository:
    git clone https://github.com/dotbitHQ/das-lock
  2. Initialize environment and submodules:
    make init-build-env
  3. Pull the Docker image:
    make pull-docker-image
  4. Build all contracts and libraries:
    make debug-all-via-docker # or make all-via-docker
  5. Copy the generated binaries to the other directory:
    cp -r build/debugs/* /path/to/other/directory

Configuration

The Makefile supports the following environment variables:

  • NET_TYPE: The type of blockchain network, default is testnet2.
    make debug-all-via-docker NET_TYPE=mainnet
  • CFLAGS: Flags for the C compiler.

License

License

Releases

No releases published

Packages

No packages published