欢迎学习Populus框架!Populus几乎拥有以太坊区块链开发所需的一切。
Populus有以下系统依赖关系:
- solidity编译器:智能合约是以solidity语言编写的,然后编译到以太坊虚拟机(EVM)的二进制代码中。
- Geth:官方go语言的以太坊协议的实现。Geth客户端运行区块链节点,让我们与区块链进行交互,并可以在开发过程中运行并部署到测试区块链。
此外,杨树需要一些其他的系统依赖性,才能安装PyEthereum库。
Debian, Ubuntu, Mint
sudo apt-get install libssl-dev
Fedora, CentOS, RedHat
sudo yum install openssl-devel
OSX
brew install pkg-config libffi autoconf automake libtool openssl
安装Populus
Populus可以通过pip来进行安装:
$ pip install populus
如果你在Ubuntu上安装,python3(推荐)上运行的话 :
$ pip3 install populus
重要的提示:
Ubuntu下使用Ubuntu’s pip:
$sudo apt-get install python-pip
或者python 3:
$sudo apt-get install python3-pip
你可能需要安装populus用sudo权限:
$ sudo -H pip install populus
从源代码安装可以通过以下命令从项目的根目录完成。
$ python setup.py install
验证安装:
$ populus
Usage: populus [OPTIONS] COMMAND [ARGS]...
Populus
Options:
-p, --project PATH Specify a populus project directory
-l, --logging TEXT Specify the logging level. Allowed values are
DEBUG/INFO or their numeric equivalents 10/20
-h, --help Show this message and exit.
Commands:
chain Manage and run ethereum blockchains.
compile Compile project contracts, storing their...
config Manage and run ethereum blockchains.
deploy Deploys the specified contracts to a chain.
init Generate project layout with an example...
没问题的话,就可以开始第一个项目了。