以太坊众筹系统
众筹系统是基于以太坊solidity书写智能合约,并用基于web3j 开发web应用。 项目地址:https://github.com/niyuelin1990/CrowdFunding
项目环境
IntelliJ IDEA 2017
Apache Tomcat 8
Geth 1.7.3
准备工作
learn 搭建 geth 私有环境
启动私有链
##初始化geth genesis.json在工程目录
./geth init ./genesis.json --datadir "./chain"
##启动私有链,rpcaddr开启远程ip
./geth --datadir "./chain" --rpc --rpcaddr 10.100.7.47 --rpcapi personal,db,eth,net,web3 --networkid 66
##新增账号
web3.personal.newAccount("123456")
##挖矿
miner.start(1)
miner.stop()
##转账
acc0 = web3.eth.accounts[0]
web3.personal.unlockAccount(acc0,"123456")
web3.eth.sendTransaction({from:acc0,to:acc1,value:web3.toWei(3,"ether")})
web3.eth.getBalance(acc)
项目运行
1.生成合约代码 在https://ethereum.github.io/browser-