当前位置: 首页 > >

°²×°Solidity

发布时间:

°²×°Solidity
»ùÓÚä¯ÀÀÆ÷µÄSolidity

Èç¹ûÄãÖ»ÊÇÏë³¢ÊÔÒ»¸öʹÓÃSolidityµÄСºÏÔ¼£¬Äã²»ÐèÒª°²×°Èκζ«Î÷£¬Ö»Òª·ÃÎÊ »ùÓÚä¯ÀÀÆ÷µÄSolidity¡£


Èç¹ûÄãÏëÀëÏßʹÓã¬Äã¿ÉÒÔ±£´æÒ³Ãæµ½±¾µØ£¬»òÕß´Ó http://github.com/chriseth/browser-solidity ¿Ë¡һ¸ö¡£


NPM / node.js

Õâ¿ÉÄÜ°²×°Solidityµ½±¾µØ×îÇá±ã×îʡʵķ½·¨¡£


ÔÚ»ùÓÚä¯ÀÀÆ÷µÄSolidityÉÏ£¬EmscriptenÌṩÁËÒ»¸ö¿ç*̨JavaScript¿â£¬°ÑC++Ô´Âë±àÒëΪJavaScript£¬Í¬Ê±Ò²ÌṩNPM°²×°°ü¡£


È¥°²×°Ëü¾Í¿ÉÒÔ¼òµ¥Ê¹Óᣣ¬


npm install solc

ÈçºÎʹÓÃnodejs°üµÄÏêϸÐÅÏ¢¿ÉÒÔÔÚ´úÂë¿âÖÐÕÒµ½.


¶þ½øÖÆ°²×°°ü
Ethereum.

°üÀ¨Mix IDEµÄ¶þ½øÖÆSolidity°²×°°üÔÚEthereumÍøÕ¾C++ bundleÖÐÏÂÔØ¡£


´ÓÔ´Âë¹¹½¨

ÔÚMacOS X¡¢UbuntuºÍÆäËüÀàUnixϵͳÖбàÒë°²×°Solidity·Ç³£ÏàËÆ¡£Õâ¸öÖ¸ÄÏ¿ªÊ¼½²½âÈçºÎÔÚÿ¸ö*̨Ï°²×°Ïà¹ØµÄÒÀÀµÈí¼þ£¬È»ºó¹¹½¨Solidity¡£


MacOS X

ϵͳÐèÇó:


OS X Yosemite (10.10.5)

Homebrew

Xcode


°²×°Homebrew£º


brew update
brew install boost --c++11 # ÕâÐèÒªµÈ´ýÒ»¶Îʱ¼ä
brew install cmake cryptopp miniupnpc leveldb gmp libmicrohttpd libjson-rpc-cpp
# ½ö½ö°²×°Mix IDEºÍAlethzero
brew install xz d-bus
brew install llvm --HEAD --with-clang
brew install qt5 --with-d-bus # Èç¹û³¤Ê±¼äµÄµÈ´ýÈÃÄã·¢·è£¬ÄÇôÌí¼Ó--verboseÊä³öÐÅÏ¢»áÈÃÄã¸Ð¾õ¸üºÃ¡£

Ubuntu ϵͳ

ÏÂÃæÊÇÔÚ×îаæUbuntuϵͳÉϱàÒë°²×°SolidityµÄÖ¸ÄÏ¡£×î¼ÑµÄÖ§³Ö*̨ÊÇ2014Äê11Ô·¢²¼µÄ64λUbuntu 14.04£¬ÖÁÉÙÐèÒª2GBÄÚ´æ¡£ÎÒÃÇËùÓеIJâÊÔ¶¼ÊÇ»ùÓÚ´Ë°æ±¾£¬µ±È»ÎÒÃÇÒ²»¶Ó­ÆäËü°æ±¾µÄ²âÊÔ¹±Ï×Õß¡£


°²×°ÒÀÀµÈí¼þ£º

ÔÚÄã´ÓÔ´Âë±àÒë֮ǰ£¬ÄãÐèҪ׼±¸Ò»Ð©¹¤¾ßºÍÒÀÀµÈí¼þ¡£


Ê×ÏÈ£¬Éý¼¶ÄãµÄ´úÂë¿â¡£UbuntuÖ÷´úÂë¿â²»ÌṩËùÓеİü£¬ÄãÐèÒª´ÓEthereum PPAºÍLLVM»ñÈ¡¡£


×¢Òâ


Ubuntu 14.04µÄÓû§ÐèҪʹÓãºsudo apt-add-repository ppa:george-edison55/cmake-3.x»ñÈ¡×îа汾µÄcmake¡£


ÏÖÔÚ¼ÓÈëÆäËüµÄ°ü£º


sudo apt-get -y update
sudo apt-get -y install language-pack-en-base
sudo dpkg-reconfigure locales
sudo apt-get -y install software-properties-common
sudo add-apt-repository -y ppa:ethereum/ethereum
sudo add-apt-repository -y ppa:ethereum/ethereum-dev
sudo apt-get -y update
sudo apt-get -y upgrade

¶ÔÓÚUbbuntu 15.04£¨Vivid Vervet£©»òÕ߸üÀ*æ±¾£¬Ê¹ÓÃÏÂÃæµÄÃüÁî»ñÈ¡¿ª·¢Ïà¹ØµÄ°ü£º


sudo apt-get -y install build-essential git cmake libboost-all-dev libgmp-dev libleveldb-dev libminiupnpc-dev libreadline-dev libncurses5-dev libcurl4-openssl-dev libcryptopp-dev libjson-rpc-cpp-dev libmicrohttpd-dev libjsoncpp-dev libedit-dev libz-dev

¶ÔÓÚUbbuntu 15.10£¨Wily Werewolf£©»òÕ߸üа汾£¬Ê¹ÓÃÏÂÃæµÄÃüÁî»ñÈ¡¿ª·¢Ïà¹ØµÄ°ü£º


sudo apt-get -y install build-essential git cmake libboost-all-dev libgmp-dev libleveldb-dev libminiupnpc-dev libreadline-dev libncurses5-dev libcurl4-openssl-dev libcryptopp-dev libjsonrpccpp-dev libmicrohttpd-dev libjsoncpp-dev libedit-dev libz-dev

²»Í¬°æ±¾Ê¹Óò»Í¬»ñÈ¡ÃüÁîµÄÔ­ÒòÊÇ£¬libjsonrpccpp-devÒѾ­ÔÚ×îаæµÄUbuntuµÄͨÓôúÂë²Ö¿âÖС£


±àÒë

Èç¹ûÄãÖ»×¼±¸°²×°solidity£¬ºöÂÔĩβAlethzeroºÍMixµÄ´íÎó¡£


git clone --recursive https://github.com/ethereum/webthree-umbrella.git
cd webthree-umbrella
./webthree-helpers/scripts/ethupdate.sh --no-push --simple-pull --project solidity
# ¸üÐÂSolidity¿â
./webthree-helpers/scripts/ethbuild.sh --no-git --project solidity --all --cores 4 -DEVMJIT=0
# ±àÒëSolidity¼°ÆäËü
# ÔÚOS Xϵͳ¼ÓÉÏDEVMJIT½«²»ÄܱàÒ룬ÔÚLinuxϵͳÉÏÔòûÎÊÌâ

Èç¹ûÄãÑ¡Ôñ°²×°AlethzeroºÍMix£º


git clone --recursive https://github.com/ethereum/webthree-umbrella.git
cd webthree-umbrella && mkdir -p build && cd build
cmake ..

Èç¹ûÄãÏë°ïÖúSolidityµÄ¿ª·¢£¬ÄãÐèÒª·ÖÖ§£¨fork£©Solidity²¢Ìí¼Óµ½ÄãµÄ˽ÈËÔ¶¶Ë·ÖÖ§£º


cd webthree-umbrella/solidity
git remote add personal git@github.com:username/solidity.git

×¢Òâwebthree-umbrellaʹÓõÄ×ÓÄ£¿é,ËùÒÔsolidityÊÇÆä×Ô¼ºµÄgit´úÂë¿â£¬µ«ÊÇËûµÄÉèÖò»ÊDZ£´æÔÚ .git/config, ¶øÊÇÔÚwebthree-umbrella/.git/modules/solidity/config.



Èç¹ûÄãÏ£Íû¸ßЧµÄѧ*ÒÔÌ«·»DApp¿ª·¢£¬¿ÉÒÔ·ÃÎÊ»ãÖÇÍøÌṩµÄ×îÈÈÃÅÔÚÏß»¥¶¯½Ì³Ì£º


ÊʺÏÇø¿éÁ´ÐÂÊÖµÄÒÔÌ«·»DAppʵսÈëÃŽ̳ÌÇø¿éÁ´+IPFS+Node.js+MongoDB+ExpressÈ¥ÖÐÐÄ»¯ÒÔÌ«·»µçÉÌÓ¦Óÿª·¢ÊµÕ½

ÆäËû¸ü¶àÄÚÈÝÒ²¿ÉÒÔ·ÃÎÊÕâ¸öÒÔÌ«·»²©¿Í¡£


ת×Ô£º
https://github.com/twq0076262/solidity-zh/blob/master/installing-solidity.md



友情链接: