geth init genesis.json --datadir "%cd%\chain"
geth --identity "ethnode" --rpc --rpccorsdomain "*" --datadir "%cd%\chain" --port "30303" --rpcapi "db,eth,net,web3" --networkid 666666 console
identity
# 区块链标识
rpc
# rpc启动通信
rpccorsdomain
# rpc跨源请求
datadir
# 区块链数据位置
port
# 监听端口
rpcapi
# 允许接口
networkid
# 区块链ID
console
# 命令行模式
miner.start(1)
# 开启一个线程挖矿,多线程会很卡
miner.stop()
# 关闭挖矿命令
<dependency>
<groupId>org.web3j</groupId>
<artifactId>core</artifactId>
<version>2.2.2</version>
</dependency>
=> 修改src/main/resources/config.properties里的相关数据
--com.redhat.helloworld.util
----Consts.java 常量类
--com.redhat.helloworld.test
----ClientVersionTest.java 客户端版本
----GenerateWalletTest.java 生成钱包
----TransferEthTest.java 转账
----TransactionGetTest.java Web3j原生调用HelloWorld合约的get方法
----TransactionSetTest.java Web3j原生调用HelloWorld合约的set方法
----FilterTest.java 过滤器
--com.redhat.helloworld.contract
----HelloWorldInterface.java HelloWorld合约接口
----HelloWorldContract.java HelloWorld合约实现 继承Web3j提供的Contract类
----HelloWorldMain.java HelloWorld合约测试