-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #149 from cryptape/release/v0.25.0
Release/v0.25.0
- Loading branch information
Showing
7 changed files
with
115 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
tests/src/main/java/com/cryptape/cita/tests/GroupManagerExample.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package com.cryptape.cita.tests; | ||
|
||
|
||
import com.cryptape.cita.protocol.core.methods.response.Log; | ||
import com.cryptape.cita.protocol.system.CITASystemContract; | ||
|
||
import java.io.IOException; | ||
import java.util.Arrays; | ||
import java.util.List; | ||
|
||
/** | ||
* Group and Account Management | ||
* If you want to know more about the documentation, please click on the link below. | ||
* https://docs.citahub.com/zh-CN/cita/account-permission/account | ||
*/ | ||
public class GroupManagerExample extends SystemContractExample { | ||
public static void main(String[] args) throws IOException, InterruptedException { | ||
// query groups | ||
List<String> groupAddress = sysContract.queryGroups("0xfFFfFFFFFffFFfffFFFFfffffFffffFFfF020009"); | ||
System.out.println("groupAddress: " + groupAddress); | ||
|
||
// create a group | ||
String transcationHash = sysContract.newGroup("0xfFFfFFFFFffFFfffFFFFfffffFffffFFfF020009", | ||
"newGroup", | ||
Arrays.asList("e1c4021742730ded647590a1686d5c4bfcbae0b0", "45a50f45cb81c8aedeab917ea0cd3c9178ebdcae"), | ||
adminPriavteKey, | ||
version, | ||
chainId); | ||
System.out.println("transcationHash: " + transcationHash); | ||
// get receipt by hash | ||
Log log = CITASystemContract.getReceiptLog(service, transcationHash, 0); | ||
System.out.println("groupAddress: " + (log == null ? "null" : log.getAddress())); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters