CodeChain is a programmable open source blockchain technology optimal for developing and customizing multi-asset management systems.
Download CodeChain code
git clone git@github.com:CodeChain-io/codechain.git
cd codechain
Build in release mode
cargo build --release
This will produce an executable in the ./target/release
directory.
To run CodeChain, just run
./target/release/codechain -c solo
You can create a block by sending a parcel through JSON-RPC or JavaScript SDK.
Make sure you run rustfmt
before creating a PR to the repo. You need to install the nightly-2018-12-06 version of rustfmt
.
rustup toolchain install nightly-2018-12-06
rustup component add rustfmt-preview --toolchain nightly-2018-12-06
To run rustfmt
,
cargo +nightly-2018-12-06 fmt
You should run clippy
also. This is a lint tool for rust. It suggests more efficient/readable code.
You can see the clippy document for more information.
You need to install the nightly-2018-12-06 version of clippy
.
rustup toolchain install nightly-2018-12-06
rustup component add clippy-preview --toolchain nightly-2018-12-06
cargo +nightly-2018-12-06 clippy --all
Developers are strongly encouraged to write unit tests for new code, and to submit new unit tests for old code. Unit tests can be compiled and run with: cargo test --all
. For more details, please reference Unit Tests.
Under docs
folder, run following command.
make html
User manual will be generated at docs/_build/html
.
CodeChain is licensed under the AGPL License - see the LICENSE file for details