-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 55397ff
Showing
63 changed files
with
5,160 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2017 Omar Metwally | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,132 @@ | ||
Simbel - Ethereum Operating System | ||
====================================================== | ||
[Github repository](https://github.com/simbel/simbel) | ||
|
||
[Project website](https://simbel.github.io/simbel/) | ||
------------------------------------------------------ | ||
|
||
![Simbel gif](https://s3-us-west-1.amazonaws.com/simbel/home.png) | ||
|
||
## What is Simbel? | ||
--- | ||
Simbel is an Ethereum operating system for knowledge creation and sharing | ||
|
||
* Transfer value and information across Ethereum networks | ||
|
||
* Abstract creation of GUI interfaces for Ethereum contracts | ||
|
||
* Sysadmin for Ethereum networks | ||
|
||
* Interface with the Interplanetary File System ([IPFS](https://github.com/ipfs/ipfs)) to minimize on-chain storage | ||
|
||
|
||
## Mission Statement | ||
|
||
### Our goal is to build open economies for information exchange within and among organizations. | ||
|
||
## Universal Consensus Time | ||
Simbel sets network time by blockchain consensus. | ||
|
||
|
||
## Manifesto | ||
The Manifesto contract allows participants to create a manifesto through a transparent voting process. Anyone can submit and vote on proposals. To interface with your own custom voting contracts (on any Ethereum network), simply replace the default Manifesto.sol address with your contract's address. | ||
|
||
|
||
![Manifesto Contract](https://s3-us-west-1.amazonaws.com/simbel/manifesto5.png) | ||
|
||
## Why Simbel? | ||
Simbel combines the benefits of private Ethereum networks with the benefits of the Ethereum main network. Simbel allows Ethereum applications to run cheaply and securely on private Ethereum networks while enabling their integration with the main Ethereum network. The result is greatly reduced development and operational costs associated with private Ethereum networks, combined with the ability to transfer value and information among the main Ethereum network and private Ethereum networks. | ||
|
||
# Quickstart | ||
Simbel, the Simbel Installer, and the Simbel Network Utility currently support Ubuntu MATE (Raspberry Pi), Ubuntu 16.04, and Mac OS X. | ||
|
||
Downlod or clone this repository to your machine, and navigate to that directory. Run these commands carefully and in order: | ||
|
||
1. Permissions | ||
|
||
Allow execution of installation and network deployment scripts. | ||
Allow execution of the Go Ethereum client (binary optimized for ARM architecture). | ||
``` | ||
chmod +x *.sh geth | ||
``` | ||
|
||
2. Installation | ||
|
||
Run installation script. | ||
``` | ||
./install.sh | ||
``` | ||
This will install the necessary dependencies your machine needs to run Simbel. The installation process can take a long time depending on what's already installed on your machine. The installer will explicitly ask for permission to install each dependency via yes/no prompts. You will be prompted to enter your system password before performing actions that require superuser privileges. | ||
|
||
3. Start Simbel | ||
|
||
Use the Simbel Networking Utility to create and manage Ethereum accounts and start the Simbel Command Line Interface (CLI). | ||
``` | ||
./snu.sh | ||
``` | ||
|
||
To start *Twin Peaks*, Simbel's Graphical User Interface, run: | ||
``` | ||
python3 gui.py | ||
``` | ||
|
||
## Directory structure | ||
The directory structure is important because Simbel and the Simbel Networking Utility look for certain files in certain directories. Your application will look something like this: | ||
``` | ||
/your_working_directory | ||
README.md | ||
install.sh | ||
dnu.sh | ||
deploy.sh | ||
log_nodeInfo.sh | ||
load_mainnet.sh | ||
load_blackswan.sh | ||
/simbel | ||
crypto.py | ||
genesis.json | ||
bcinterface.py | ||
fsinterface.py | ||
ipfs.py | ||
main.py | ||
nodeInfo.ds | ||
/source | ||
/data | ||
static-nodes.json | ||
/share | ||
/swap | ||
``` | ||
Save Ethereum contracts in the *source* directory with the .sol extension. | ||
|
||
|
||
## NFO Coin | ||
NFO Coin is the utility token that powers Simbel, enabling the exchange of information and value across Ethereum networks. NFO Coin is based on the ERC20 standard. The NFO ABI and contract are located in the source directory and can be directly inspected at address 0x3100047369b54c34042B9DC138C02A0567D90A7a on the Ethereum main network. | ||
|
||
### totalSupply: 10,000,000 | ||
### tokenName: NFO Coin | ||
### tokenSymbol: NFO | ||
|
||
There are 10,000,000 NFO Coin in circulation, which can be exchanged for Ether at a rate of 1,000 NFO Coin per 1 Ether. | ||
|
||
NFO Coin and Ether can be exchanged using the Simbel client, which can be launched by running | ||
``` | ||
python3 gui.py | ||
``` | ||
|
||
## Contribute | ||
Please take a look at our [contribution documentation](https://github.com/simbel/simbel/blob/master/docs/CONTRIBUTING.md) for information on how to report bugs, suggest enhancements, and contribute code. If you or your organization use Simbel to do something that would otherwise be impossible using traditional system, please share your experience! | ||
|
||
## Code of conduct | ||
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. Read the full [Contributor Covenant](https://github.com/simbel/simbel/blob/master/docs/CODE_OF_CONDUCT.md). | ||
|
||
## Prerequisites | ||
This project builds on work by the [Ethereum](https://www.ethereum.org), [web3.py](https://github.com/pipermerriam/web3.py), [IPFS](https://github.com/ipfs/ipfs) and [py-ipfs](https://github.com/ipfs/py-ipfs-api) communities. | ||
|
||
The Simbel Installer, which currently supports Ubuntu 16.04 and Mac OS, installs all dependencies (including the Go Ethereum client). | ||
|
||
## License | ||
[MIT License](https://github.com/simbel/simbel/blob/master/LICENSE) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
theme: jekyll-theme-cayman |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
#!/bin/bash | ||
# DDASH Network Utility | ||
# Author: Omar N. Metwally, MD | ||
# [email protected] | ||
# https://github.com/osmode/simbel | ||
# USAGE: ./manager.sh your_contract_name (without .sol extension) | ||
# | ||
pwd=$(pwd) | ||
# compile contract | ||
if [ ! $1 ]; then | ||
read -p "Please specify a contract name without the .sol extension (or leave blank for blackswan): " contract_name | ||
if [ -z "$contract_name" ]; then | ||
contract_name="blackswan" | ||
fi | ||
else | ||
contract_name=$1 | ||
fi | ||
|
||
read -p "Please enter the amount of gas for deployment (or leave blank for default): " gas | ||
if [ -z "$gas" ]; then | ||
gas=2000000 | ||
fi | ||
|
||
echo "$contract_name" | ||
echo Deleting old ABIs and data... | ||
|
||
echo Compiling $PWD/simbel/source/"$contract_name".sol | ||
echo Removing old files named "$contract_name".js... | ||
if [ -f $PWD/simbel/source/$contract_name.js ]; then | ||
rm $PWD/simbel/source/$contract_name.js | ||
fi | ||
|
||
# compilation on Ubuntu uses solc compiler | ||
# compilation on Mac OS X uses solcjs | ||
os="$(uname -s)" | ||
if [ "$os" = 'Darwin' ]; then | ||
echo Compiling "$contract_name".sol using solcjs... | ||
solcjs --bin --abi -o $PWD/simbel/source $PWD/simbel/source/"$contract_name".sol | ||
|
||
sleep 2 | ||
|
||
# need to convert all *abi and *bin files to lowercase to prevent errors | ||
for file in $PWD/simbel/source/*.abi; do mv $file $PWD/simbel/source/"$(basename $file | tr '[:upper:]' '[:lower:]')"; done | ||
for file in $PWD/simbel/source/*.bin; do mv $file $PWD/simbel/source/"$(basename $file | tr '[:upper:]' '[:lower:]')"; done | ||
|
||
# convert ABI and BIN files to short names | ||
for file in $PWD/simbel/source/*$contract_name.abi; | ||
do mv "$file" $PWD/simbel/source/$contract_name.abi; | ||
done | ||
for file in $PWD/simbel/source/*$contract_name.bin | ||
do mv "$file" $PWD/simbel/source/$contract_name.bin; | ||
done | ||
|
||
fi | ||
|
||
if [ "$os" = 'Linux' ]; then | ||
solc --bin --abi -o $PWD/simbel/source $PWD/simbel/source/"$contract_name".sol | ||
fi | ||
|
||
output_file=$PWD/simbel/source/"$contract_name".js | ||
data_dir=$PWD/simbel/data | ||
|
||
contract_abi=$(<$PWD/simbel/source/"$contract_name".abi) | ||
data=$(<$PWD/simbel/source/"$contract_name".bin) | ||
|
||
# if ABI and BIN files exist (compilation was successful), propmt | ||
# for contract constructor arguments | ||
if [[ -f $PWD/simbel/source/"$contract_name".abi ]] && [[ -f $PWD/simbel/source/"$contract_name".bin ]]; then | ||
read -p "Enter contract constructor arguments separated by commas (optional): " constructor_args | ||
fi | ||
|
||
# clean up junk name files | ||
rm $PWD/simbel/source/_users_* | ||
|
||
echo "" | ||
echo contract_abi: "$contract_abi" | ||
echo "" | ||
echo data: "$data" | ||
echo "" | ||
echo var contract_abi=web3.eth.contract\("$contract_abi"\)\; >> "$output_file" | ||
echo "" >> "$output_file" | ||
|
||
if [ -z "$constructor_args" ]; then | ||
echo var contract_obj = contract_abi.new\( >> "$output_file" | ||
else | ||
echo var contract_obj = contract_abi.new\( "$constructor_args", >> "$output_file" | ||
fi | ||
|
||
echo { >> "$output_file" | ||
echo from: web3.eth.accounts[0], >> "$output_file" | ||
echo data: \'0x"$data"\', >> "$output_file" | ||
echo gas: \'"$gas"\' >> "$output_file" | ||
echo }, function \(e, contract\) { >> "$output_file" | ||
echo console.log\(e, contract\)\; >> "$output_file" | ||
echo if \(typeof contract.address !== \'undefined\'\) { >> "$output_file" | ||
echo console.log\(\'Contract mined! address: \' + contract.address + \' transactionHash: \' + contract.transactionHash\)\; >> "$output_file" | ||
echo } >> "$output_file" | ||
echo }\) >> "$output_file" | ||
|
||
if [ ! -f "$output_file" ]; then | ||
echo Failed to create contract deployment script in "$output_file" | ||
exit 1 | ||
fi | ||
|
||
# deploy contract | ||
#echo Deploying contract "$output_file" | ||
#read -sp "Please enter your Ethereum account password: " pass | ||
#geth --exec "personal.unlockAccount(eth.accounts[0],\"$pass\");loadScript('/root/simbel/source/$contract_name.js')" --datadir=/root/simbel/data console | ||
|
||
#geth --datadir=$PWD/simbel/data --mine --minerthreads=1 console | ||
|
||
|
||
$SHELL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Contributor Covenant Code of Conduct | ||
|
||
## Our Pledge | ||
|
||
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. | ||
|
||
## Our Standards | ||
|
||
Examples of behavior that contributes to creating a positive environment include: | ||
|
||
* Using welcoming and inclusive language | ||
* Being respectful of differing viewpoints and experiences | ||
* Gracefully accepting constructive criticism | ||
* Focusing on what is best for the community | ||
* Showing empathy towards other community members | ||
|
||
Examples of unacceptable behavior by participants include: | ||
|
||
* The use of sexualized language or imagery and unwelcome sexual attention or advances | ||
* Trolling, insulting/derogatory comments, and personal or political attacks | ||
* Public or private harassment | ||
* Publishing others' private information, such as a physical or electronic address, without explicit permission | ||
* Other conduct which could reasonably be considered inappropriate in a professional setting | ||
|
||
## Our Responsibilities | ||
|
||
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. | ||
|
||
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. | ||
|
||
## Scope | ||
|
||
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. | ||
|
||
## Enforcement | ||
|
||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [email protected]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. | ||
|
||
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. | ||
|
||
## Attribution | ||
|
||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] | ||
|
||
[homepage]: http://contributor-covenant.org | ||
[version]: http://contributor-covenant.org/version/1/4/ |
Oops, something went wrong.