Skip to content

Commit

Permalink
Merge pull request #373 from ywy2090/release-1.2.0
Browse files Browse the repository at this point in the history
Release 1.2.0
  • Loading branch information
ywy2090 authored Sep 30, 2020
2 parents bb7a694 + d8f5fb4 commit f5f9e48
Show file tree
Hide file tree
Showing 42 changed files with 3,064 additions and 844 deletions.
27 changes: 6 additions & 21 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,39 +6,24 @@ branches:
matrix:
fast_finish: true
include:
- language: python
python: 3.6
dist: xenial
before_cache:
cache:
before_install:
script: |
bash .ci/ci_check_commit.sh
- language: java
jdk: openjdk8
os: linux
dist: xenial
sudo: required

- language: java
jdk: openjdk9
os: linux
dist: xenial
sudo: required

- language: java
jdk: openjdk10
os: linux
dist: xenial
sudo: required

- language: java
jdk: openjdk11
os: linux
dist: xenial
sudo: required

# - language: java
# jdk: oraclejdk14
# os: linux
# dist: xenial
# sudo: required

# - language: java
# jdk: openjdk11
# os: osx
Expand Down
17 changes: 17 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
### v1.2.0

(2020-09-30)

* 新增
1. 添加简单私钥管理工具命令:`newAccount` `switchAccount` `listAccount` `loadAccount`
2. 添加`listAbi`命令查看合约接口以及Event列表
3. 添加`registerCNS`命令,将合约信息注册CNS
4. 支持非交互式命令行

* 更新
1. `call`命令支持合约地址,接口补全
1. 升级web3sdk版本为2.6.2, 支持JDK14
2. `sol2java.sh`支持绝对路径与相对路径,支持合约文件路径以及合约目录路径,支持设置生成`Java`文件目录
3. 修改`get_gm_account.sh`,生成的国密私钥放入`accounts`目录,并且添加`_gm`标记
4. `call` `deploy` `deployByCNS`支持相对路径与绝对路径的方式

### v1.1.1

(2020-09-07)
Expand Down
9 changes: 5 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ googleJavaFormat {
options style: 'AOSP'
}

check.dependsOn.remove(test)
check.dependsOn.remove(verifyGoogleJavaFormat)
//check.dependsOn.remove(test)
//check.dependsOn.remove(verifyGoogleJavaFormat)

// In this section you declare the dependencies for your production and test code
dependencies {
Expand All @@ -32,7 +32,7 @@ dependencies {
// compile group: 'org.fisco-bcos', name: 'solcJ', version: '0.5.2.1'
compile group: 'org.fisco-bcos', name: 'solcJ', version: '0.4.25.1'

compile group: 'org.fisco-bcos', name: 'web3sdk', version: '2.6.1'
compile group: 'org.fisco-bcos', name: 'web3sdk', version: '2.6.2'

compile group: 'commons-codec', name:'commons-codec', version:'1.10'
compile group: 'org.slf4j', name:'slf4j-log4j12', version:'1.7.30'
Expand Down Expand Up @@ -94,7 +94,7 @@ jar {
}
copy {
from file('tools/start.sh')
from file('tools/replace_solc_jar.sh')
from file('tools/console.sh')
from file('tools/get_account.sh')
from file('tools/get_gm_account.sh')
from file('tools/sol2java.sh')
Expand All @@ -106,5 +106,6 @@ jar {
}
new File('dist/contracts/console').mkdirs()
new File('dist/contracts/sdk').mkdirs()
new File('dist/accounts').mkdirs()
}
}
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion release_note.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.1.1
v1.2.0
34 changes: 31 additions & 3 deletions src/main/java/console/ConsoleClient.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package console;

import console.account.AccountInterface;
import console.common.ConsoleExceptionUtils;
import console.common.ConsoleUtils;
import console.common.HelpInfo;
Expand Down Expand Up @@ -31,6 +32,7 @@ public class ConsoleClient {
private static PrecompiledFace precompiledFace;
private static PermissionFace permissionFace;
private static ContractFace contractFace;
private static AccountInterface accountInterface;

public static int INPUT_FLAG = 0;

Expand All @@ -47,7 +49,12 @@ public static void main(String[] args) {
precompiledFace = consoleInitializer.getPrecompiledFace();
permissionFace = consoleInitializer.getPermissionFace();
contractFace = consoleInitializer.getContractFace();
lineReader = JlineUtils.getLineReader();
accountInterface = consoleInitializer.getAccountInterface();

lineReader =
JlineUtils.getLineReader(
contractFace.getDeployContractManager(),
contractFace.getAccountManager());
sc = new Scanner(System.in);
KeyMap<Binding> keymap = lineReader.getKeyMaps().get(LineReader.MAIN);
keymap.bind(new Reference("beginning-of-line"), "\033[1~");
Expand Down Expand Up @@ -108,6 +115,12 @@ public static void main(String[] args) {
case "getDeployLog":
contractFace.getDeployLog(params);
break;
case "listDeployContractAddress":
contractFace.listDeployContractAddress(params);
break;
case "listAbi":
contractFace.listAbi(params);
break;
case "call":
contractFace.call(params);
break;
Expand All @@ -120,6 +133,9 @@ public static void main(String[] args) {
case "queryCNS":
contractFace.queryCNS(params);
break;
case "registerCNS":
contractFace.registerCNS(params);
break;
case "switch":
case "s":
consoleInitializer.switchGroupID(params);
Expand Down Expand Up @@ -349,6 +365,18 @@ public static void main(String[] args) {
case "getAccountStatus":
permissionFace.getAccountStatus(params);
break;
case "newAccount":
accountInterface.newAccount(params);
break;
case "loadAccount":
accountInterface.loadAccount(params);
break;
case "listAccount":
accountInterface.listAccount(params);
break;
case "switchAccount":
accountInterface.switchAccount(params);
break;
default:
System.out.println(
"Undefined command: \"" + params[0] + "\". Try \"help\".\n");
Expand All @@ -367,7 +395,7 @@ public static void main(String[] args) {
System.out.println("The contract address is incorrect.");
System.out.println();
} else {
ConsoleExceptionUtils.pringMessageDecodeingException(e);
ConsoleExceptionUtils.printMessageDecodingException(e);
}
} catch (IOException e) {
if (e.getMessage().startsWith("activeConnections")) {
Expand All @@ -392,7 +420,7 @@ public static void main(String[] args) {
consoleInitializer.close();
} catch (RuntimeException e) {
if (e.getCause() instanceof MessageDecodingException) {
ConsoleExceptionUtils.pringMessageDecodeingException(
ConsoleExceptionUtils.printMessageDecodingException(
new MessageDecodingException(e.getMessage()));
} else {
System.out.println(e.getMessage());
Expand Down
Loading

0 comments on commit f5f9e48

Please sign in to comment.