Skip to content

Commit

Permalink
feat: align with 0.29.2
Browse files Browse the repository at this point in the history
Signed-off-by: grapebaba <281165273@qq.com>
  • Loading branch information
GrapeBaBa committed Apr 12, 2023
1 parent 07d54f1 commit 698938a
Show file tree
Hide file tree
Showing 70 changed files with 7,592 additions and 3,624 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ site
_site
bin
.vscode
*.DS_Store
*.DS_Store
src/integrationTest/sui.keystore
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ upcoming TestNet launch.

## Using

The latest 0.4.1 version tested with sui devnet-0.24.0 version.
The latest 0.4.2 version tested with sui devnet-0.24.0 version.

### Maven

Expand All @@ -27,15 +27,15 @@ The latest 0.4.1 version tested with sui devnet-0.24.0 version.
<dependency>
<groupId>me.grapebaba</groupId>
<artifactId>sui4j</artifactId>
<version>0.4.1</version>
<version>0.4.2</version>
</dependency>
```

### Gradle

```groovy
// https://mvnrepository.com/artifact/me.grapebaba/sui4j
implementation 'me.grapebaba:sui4j:0.4.1'
implementation 'me.grapebaba:sui4j:0.4.2'
```

## Building Locally
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ plugins {


group 'me.grapebaba'
version '0.4.1'
version '0.4.2'

repositories {
mavenCentral()
Expand Down
4 changes: 2 additions & 2 deletions docs/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
<dependency>
<groupId>me.grapebaba</groupId>
<artifactId>sui4j</artifactId>
<version>0.4.1</version>
<version>0.4.2</version>
</dependency>
```

### Gradle

```groovy
// https://mvnrepository.com/artifact/me.grapebaba/sui4j
implementation 'me.grapebaba:sui4j:0.4.1'
implementation 'me.grapebaba:sui4j:0.4.2'
```

## Use Sui4j
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ void batchTransaction() throws ExecutionException, InterruptedException {
void moveCall() throws ExecutionException, InterruptedException {
final TypeTag.StructType structType = new TypeTag.StructType();
StructTag structTag = new StructTag();
structTag.setAddress("0x2");
structTag.setAddress("0x0000000000000000000000000000000000000002");
structTag.setModule("sui");
structTag.setName("SUI");
structType.setStructTag(structTag);
Expand Down Expand Up @@ -388,41 +388,41 @@ void moveCall() throws ExecutionException, InterruptedException {
System.out.println(future1.get());
}

/**
* Publish.
*
* @throws ExecutionException the execution exception
* @throws InterruptedException the interrupted exception
*/
@Test
@DisplayName("Test publish.")
void publish() throws ExecutionException, InterruptedException {
CompletableFuture<TransactionBytes> res =
transactionBuilder.publish(
"0xea79464d86786b7a7a63e3f13f798f29f5e65947",
Lists.newArrayList(
"oRzrCwYAAAAKAQAIAggMAxQuBEICBUQrB2+IAQj3ASgKnwIKDKkCkwEN"
+ "vAMEAAABAQECAQMABAgAAwYCAAENBAAABQABAAAHAgEAAAgDAQAACQQFAAAK"
+ "BgEAAAsEBwABDgIIAAMPCQUAAhALAQEICAoCBggAAwABBwgBAQcIAAEGCAAB"
+ "BQMHCAADBwgBAQMBCAIBBggBAQgAAQkAB2NvdW50ZXIGb2JqZWN0CHRyYW5z"
+ "ZmVyCnR4X2NvbnRleHQHQ291bnRlcgxhc3NlcnRfdmFsdWUJVHhDb250ZXh0"
+ "BmNyZWF0ZQlpbmNyZW1lbnQFb3duZXIJc2V0X3ZhbHVlBXZhbHVlAmlkA1VJ"
+ "RANuZXcGc2VuZGVyDHNoYXJlX29iamVjdAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+ "AAAAAAAAAAAAAAAAAAAAAAAAAAIAAgMMCAIJBQsDAAEEAAEJCwAQABQLASED"
+ "CAYAAAAAAAAAACcCAQEEAAEJCgARBgsALhEHBgAAAAAAAAAAEgA4AAICAQQA"
+ "AQkKABAAFAYBAAAAAAAAABYLAA8AFQIDAQAAAQQLABABFAIEAQQAAREKABAB"
+ "FAsCLhEHIQMMCwABBgAAAAAAAAAAJwsBCwAPABUCBQEAAAEECwAQABQCAAIAAQA="),
"0x05f71eb5dc69224ef8e3a4c13917c799190237d9",
100L);
CompletableFuture<Object> future = new CompletableFuture<>();
res.whenComplete(
(transactionResponse, throwable) -> {
if (throwable != null) {
future.complete(throwable);
} else {
future.complete(transactionResponse);
}
});
System.out.println(future.get());
}
// /**
// * Publish.
// *
// * @throws ExecutionException the execution exception
// * @throws InterruptedException the interrupted exception
// */
// @Test
// @DisplayName("Test publish.")
// void publish() throws ExecutionException, InterruptedException {
// CompletableFuture<TransactionBytes> res =
// transactionBuilder.publish(
// "0xea79464d86786b7a7a63e3f13f798f29f5e65947",
// Lists.newArrayList(
// "oRzrCwYAAAAKAQAIAggMAxQuBEICBUQrB2+IAQj3ASgKnwIKDKkCkwEN"
// + "vAMEAAABAQECAQMABAgAAwYCAAENBAAABQABAAAHAgEAAAgDAQAACQQFAAAK"
// + "BgEAAAsEBwABDgIIAAMPCQUAAhALAQEICAoCBggAAwABBwgBAQcIAAEGCAAB"
// + "BQMHCAADBwgBAQMBCAIBBggBAQgAAQkAB2NvdW50ZXIGb2JqZWN0CHRyYW5z"
// + "ZmVyCnR4X2NvbnRleHQHQ291bnRlcgxhc3NlcnRfdmFsdWUJVHhDb250ZXh0"
// + "BmNyZWF0ZQlpbmNyZW1lbnQFb3duZXIJc2V0X3ZhbHVlBXZhbHVlAmlkA1VJ"
// + "RANuZXcGc2VuZGVyDHNoYXJlX29iamVjdAAAAAAAAAAAAAAAAAAAAAAAAAAA"
// + "AAAAAAAAAAAAAAAAAAAAAAAAAAIAAgMMCAIJBQsDAAEEAAEJCwAQABQLASED"
// + "CAYAAAAAAAAAACcCAQEEAAEJCgARBgsALhEHBgAAAAAAAAAAEgA4AAICAQQA"
// + "AQkKABAAFAYBAAAAAAAAABYLAA8AFQIDAQAAAQQLABABFAIEAQQAAREKABAB"
// + "FAsCLhEHIQMMCwABBgAAAAAAAAAAJwsBCwAPABUCBQEAAAEECwAQABQCAAIAAQA="),
// "0x05f71eb5dc69224ef8e3a4c13917c799190237d9",
// 100L);
// CompletableFuture<Object> future = new CompletableFuture<>();
// res.whenComplete(
// (transactionResponse, throwable) -> {
// if (throwable != null) {
// future.complete(throwable);
// } else {
// future.complete(transactionResponse);
// }
// });
// System.out.println(future.get());
// }
}
Loading

0 comments on commit 698938a

Please sign in to comment.