Skip to content

bandprotocol/contracts

Repository files navigation

Band Smart Contracts

Decentralized Data Governance Protocol

Solidity Ethereum Apache-2.0

Band Protocol is a protocol for decentralized data governance. This repository contains the implementation of Band Protocol with Solidity. We use Truffle as the development environment for compiling and testing the smart contracts. See whitepaper for more information regarding the high-level ideas of Band Protocol.

Overview

Band Protocol consists of multiple smart contracts and libraries working together. The figure below summarizes interaction between different smart contracts. Note that clear arrows represent inheritance relationship, while filled arrows represent association (has-a) relationship. See comments at the top of the smart contracts' source codes for more details.

band-overview

Line Count

To facilitate those who wonder, we have written a simple line-counting script, which can be executed from the root folder.

$ ./scripts/linecount.sh  # as of commit 43a9167b
Band's smart contract LOC (excluding /mock folder) ...
Blanks (^\s*$): 246
Pragmas (^pragma.*$): 32
Imports (^import.*$): 75
Comments (^\s*///.*$): 130
Code: 1525

Contributing

We highly encourage participation from the community to help with Band Protocol development. If you are interested in developing with Band Protocol or have suggestion for protocol improvement, please drop as a line or send as a pull request.

Installation

Make sure you have Node.js and Yarn installed, then:

$ yarn install

To run unit tests, simply run the truffle test command:

$ yarn run truffle test --network test

The smart contracts can be deployed using truffle command:

$ yarn truffle deploy
$ yarn truffle exec scripts/exec/challenge.js --network development