Skip to content

Commit

Permalink
Merge pull request #46 from FISCO-BCOS/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
fisco-dev authored Jun 22, 2018
2 parents fe9ba70 + 7c1470a commit d99d421
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 44 deletions.
7 changes: 2 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# web3sdk使用指南

## (一)介绍
Expand Down Expand Up @@ -301,15 +300,14 @@ ok.trans(num, new TransactionSucCallback() {
```
./web3sdk InitSystemContract
./web3sdk SystemProxy
./web3sdk AuthorityFilter
./web3sdk NodeAction all|registerNode|cancelNode
./web3sdk CAAction add|remove|all
./web3sdk ConfigAction get|set
./web3sdk ConsensusControl deploy|turnoff|list
```

InitSystemContract用来部署一套系统合约(用来做链的初始化和测试,生产环境请谨慎操作)。部署完成后需要将系统合约地址替换到各个节点的config.json和web3sdk工具的applicationContext.xml配置中,并重启节点。
SystemProxy|AuthorityFilter|......等其他工具applicationContext.xml配置中系统合约的地址。
SystemProxy......等其他工具applicationContext.xml配置中系统合约的地址。
系统合约接口代码参照:org.bcos.contract.tools.InitSystemContract,org.bcos.contract.tools.SystemContractTools

### 3.web3j API说明
Expand Down Expand Up @@ -402,5 +400,4 @@ org.bcos.contract.tools.AuthorityManagerTools
2、节点listen ip是否正确,最好直接监听0.0.0.0。<br />
3、检查channelPort是否能telnet通,需要能telnet通。如果不通检查网络策略,检查服务是否启动。<br />
4、服务端和客户端ca.crt是否一致,需要一致。<br />
5、[FISCO-BCOS中client.keystore 的生成方法](https://github.com/FISCO-BCOS/web3sdk/issues/20)

5、[FISCO-BCOS中client.keystore 的生成方法](https://github.com/FISCO-BCOS/web3sdk/issues/20)
32 changes: 0 additions & 32 deletions src/main/java/org/bcos/contract/tools/AuthorityFilterTools.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,6 @@ public static void main(String[] args) throws Exception {
case "SystemProxy":
SystemProxyTools.processSystemProxy(systemProxy, web3, credentials, gasPrice, gasLimit);
break;
case "AuthorityFilter":
AuthorityFilter authorityFilter = AuthorityFilter.load(getAction(systemProxy, "AuthorityFilter"), web3,
credentials, gasPrice, gasLimit);
AuthorityFilterTools.processAuthorityFilter(authorityFilter, args);
break;
case "NodeAction":
NodeAction nodeAction = NodeAction.load(getAction(systemProxy, "NodeAction"), web3, credentials,
gasPrice, gasLimit);
Expand Down
3 changes: 1 addition & 2 deletions tools/bin/web3sdk
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ LANG=zh_CN.UTF-8
echo "SystemContract Command reference is as follows"
echo "Usage:./web3sdk InitSystemContract"
echo "Usage:./web3sdk SystemProxy"
echo "Usage:./web3sdk AuthorityFilter"
echo "Usage:./web3sdk NodeAction all|registerNode|cancelNode"
echo "Usage:./web3sdk CAAction all|add|remove"
echo "Usage:./web3sdk ConfigAction get|set"
Expand Down Expand Up @@ -236,7 +235,7 @@ eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $WEB3J_OPTS
if [ $1 == "InitSystemContract" ] ; then
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.bcos.contract.tools.InitSystemContract "$@"

elif [ $1 == "SystemProxy" -o $1 == "AuthorityFilter" -o $1 == "NodeAction" -o $1 == "CAAction" -o $1 == "ConfigAction" -o $1 == "ConsensusControl" -o $1 == "CNSAction" ] ; then
elif [ $1 == "SystemProxy" -o $1 == "NodeAction" -o $1 == "CAAction" -o $1 == "ConfigAction" -o $1 == "ConsensusControl" -o $1 == "CNSAction" ] ; then
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.bcos.contract.tools.SystemContractTools "$@"

elif [ $1 == "eth_accounts" -o $1 == "web3_clientVersion" -o $1 == "eth_blockNumber" -o $1 == "eth_pbftView" -o $1 == "eth_getCode" -o $1 == "eth_getBlockTransactionCountByHash" -o $1 == "eth_getTransactionCount" -o $1 == "eth_getBlockTransactionCountByNumber" -o $1 == "eth_sendRawTransaction" -o $1 == "eth_getBlockByHash" -o $1 == "eth_getBlockByNumber" -o $1 == "eth_getTransactionByBlockNumberAndIndex" -o $1 == "eth_getTransactionByBlockHashAndIndex" -o $1 == "eth_getTransactionReceipt" ] ; then
Expand Down

0 comments on commit d99d421

Please sign in to comment.