This repository contains smart contracts for Edgeless project.
- Crowdsale contract
- Token contract
- Populus based test suite
Populus is a tool for the Ethereum blockchain and smart contract management. The project uses Populus internally. Populus is a Python based suite for
- Running arbitrary Ethereum chains (mainnet, testnet, private testnet)
- Running test suites against Solidity smart contracts
Instructions are written in OSX and Linux in mind.
Experience needed
- Basic command line usage
- Basic Github usage
Packages needed
Get Solidity compiler. For OSX:
# Install solcjs using npm (JavaScript port of solc)
sudo npm install -g solc@0.4.8
# Symlink solcjs as solc, so that Populus finds it as default solc command
sudo ln -f -s `which solcjs` /usr/local/bin/solc
Clone this repository from Github.
Python 3.x required. See installing Python.
python3.5 --version
Python 3.5.2
Create virtualenv for Python package management in the project root folder (same as where setup.py
is):
python3.5 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
Install dependencies:
sudo add-apt-repository ppa:fkrull/deadsnakes
sudo apt-get update
sudo apt-get install -y python3.5 python3.5-dev
sudo apt install -y git build-essential python3-setuptools libssl-dev
sudo apt-get install software-properties-common
sudo add-apt-repository -y ppa:ethereum/ethereum
sudo apt-get update
sudo apt-get install -y ethereum solc
Then:
git clone # ...
cd Smart-Contracts
python3.5 -m venv --without-pip venv
source venv/bin/activate
curl https://bootstrap.pypa.io/get-pip.py | python
pip install -r requirements.txt
pip install -e .
Running tests:
py.test tests
Run a specific test:
py.test tests -k test_get_price_tiers
Compile contracts:
populus compile
Deploy:
python testnet_deploy.py
Create a local chain:
populus chain run local
Compile contracts:
populus compile
Deploy:
python private_testnet_deploy.py
Run private testnet: