Skip to content

Commit

Permalink
fix event decode bug (#916)
Browse files Browse the repository at this point in the history
* fix event decode bug

* update console docs
  • Loading branch information
ywy2090 committed Aug 26, 2020
1 parent 3e44458 commit 2a4f070
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
9 changes: 9 additions & 0 deletions docs/manual/console.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,15 @@ curl -#LO https://github.com/FISCO-BCOS/console/releases/download/v1.1.0/downloa
|-- replace_solc_jar.sh # 编译jar包替换脚本
```

**注意:默认下载控制台的版本内置`0.4.25`版本的`solidity`编译器,用户需要编译`0.5`或者`0.6`版本的合约时,可以通过下列命令获取内置对应编译器版本的控制台**
```bash
# 0.5
curl -#LO https://github.com/FISCO-BCOS/console/releases/download/v1.1.0/download_console.sh && bash download_console.sh -v 0.5

# 0.6
curl -#LO https://github.com/FISCO-BCOS/console/releases/download/v1.1.0/download_console.sh && bash download_console.sh -v 0.6
```

### 配置控制台
- 区块链节点和证书的配置:
- 将节点sdk目录下的`ca.crt``sdk.crt``sdk.key`文件拷贝到`conf`目录下。
Expand Down
3 changes: 1 addition & 2 deletions docs/sdk/java_sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ repositories {
maven { url "https://dl.bintray.com/ethereum/maven/" }
}
```
**注:** 如果下载Web3SDK的依赖`solcJ-all-0.4.25.jar`速度过慢,可以[参考这里](../manual/console.html#jar)进行下载。
## 配置SDK
Expand Down Expand Up @@ -743,7 +742,7 @@ InputAndOutputResult[
```java
// transactionReceipt为调用do_event接口的交易回执
String jsonResult = txDecodeSampleDecoder.decodeEventReturnJson(transactionReceipt.getLogs());
String mapResult = txDecodeSampleDecoder.decodeEventReturnJson(transactionReceipt.getLogs());
Map<String, List<List<ResultEntity>>> mapResult = txDecodeSampleDecoder.decodeEventReturnObject(transactionReceipt.getLogs());

System.out.println("json => \n" + jsonResult);
System.out.println("map => \n" + mapResult);
Expand Down
1 change: 1 addition & 0 deletions en/docs/manual/console.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ The console provides the account generation script get_account.sh (for the scrip


The console startup methods are as follows:

```
./start.sh
./start.sh groupID
Expand Down
2 changes: 1 addition & 1 deletion en/docs/sdk/java_sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ Call ``` function do_event(uint256 _u,int256 _i,bool _b,address _addr,bytes32 _b
```java
// transactionReceipt is the transaction receipt of calling do_event API
String jsonResult = txDecodeSampleDecoder.decodeEventReturnJson(transactionReceipt.getLogs());
String mapResult = txDecodeSampleDecoder.decodeEventReturnJson(transactionReceipt.getLogs());
Map<String, List<List<EventResultEntity>>> mapResult = txDecodeSampleDecoder.decodeEventReturnObject(transactionReceipt.getLogs());
System.out.println("json => \n" + jsonResult);
System.out.println("map => \n" + mapResult);
Expand Down

0 comments on commit 2a4f070

Please sign in to comment.