One of the main goal of Diamond Network Project is to create a diamond backed stable coin. In order to enable this an exchange is needed where users can buy and sell their diamonds on the chain while the physical diamonds are sored in safe and regularly audited sotres. This smart contract can handle both investment diamonds and the CDC stablecoin.
In order to compile smart contracts you need to install Dapphub's utilities. Namely: dapp, seth, solc, hevm, and ethsign.
Command | Description |
---|---|
bash <(curl https://nixos.org/nix/install) |
install nix package manager. |
. "$HOME/.nix-profile/etc/profile.d/nix.sh" |
load config for nix |
git clone --recursive https://github.com/dapphub/dapptools $HOME/.dapp/dapptools |
download dapp seth solc hevm ethsign utilities |
nix-env -f $HOME/.dapp/dapptools -iA dapp seth solc hevm ethsign |
install dapp seth solc hevm ethsign . This will install utilities for current user only!! |
dapp --use solc:0.5.11 build
The build
command invokes solc
to compile all code in src
and lib
to out
.
dapp build
As a result of installation .abi and .bin files will be created in cdc-token/out/
folder. These files can be installed later on mainnet.
Command | Description |
---|---|
git clone https://github.com/Cdiamondcoin/diamond-exchange.git |
Clone the smart contract code. |
cd diamond-exchange && git submodule update --init --recursive |
Update libraries to the latest version. |
dapp test |
Compile and test the smart contracts. |
TBD.
This project is licensed under the GPL v3 License - see the LICENSE for details.