r001 / diamond-exchange

Exchange to handle diamonds for CDiamondcoin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CDiamondcoin Diamond Exchange Smart Contract

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.

Prerequisities

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!!

Use custom version of solidity compiler

dapp --use solc:0.5.11 build

Building smart contracts

The build command invokes solc to compile all code in src and lib to out.

dapp build

Installing smart contracts

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.

Deploying smart contracts

TBD.

Authors

License

This project is licensed under the GPL v3 License - see the LICENSE for details.

About

Exchange to handle diamonds for CDiamondcoin

License:GNU General Public License v3.0


Languages

Language:Solidity 98.4%Language:Shell 1.6%