Skip to content

Commit

Permalink
upgrade version to 0.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
neodix42 committed Sep 30, 2024
1 parent ddceb2f commit 770ac31
Show file tree
Hide file tree
Showing 28 changed files with 101 additions and 94 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ found [here](https://github.com/ton-blockchain/ton/actions).
<dependency>
<groupId>io.github.neodix42</groupId>
<artifactId>smartcontract</artifactId>
<version>0.6.0</version>
<version>0.7.0</version>
</dependency>
```

Expand All @@ -33,7 +33,7 @@ found [here](https://github.com/ton-blockchain/ton/actions).
<dependency>
<groupId>io.github.neodix42</groupId>
<artifactId>ton4j</artifactId>
<version>0.6.0</version>
<version>0.7.0</version>
</dependency>
```

Expand Down Expand Up @@ -73,7 +73,9 @@ You can use each submodule individually. Click the module below to get more deta
* ✅ HashMap, HashMapE, PfxHashMap, PfxHashMapE, HashMapAug, HashMapAugE serialization / deserialization

## Support ton4j development
If you want to speed up ton4j development and thus change its priority in my backlog, you are welcome to donate some toncoins:

If you want to speed up ton4j development and thus change its priority in my backlog, you are welcome to donate some
toncoins:

```UQBguBMWc_wUA8pJjC-A9JbTJFzb7lbFbbkiFYajA33-U9YU```

Expand Down
4 changes: 2 additions & 2 deletions address/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<dependency>
<groupId>io.github.neodix42</groupId>
<artifactId>address</artifactId>
<version>0.6.0</version>
<version>0.7.0</version>
</dependency>
```

Expand All @@ -17,7 +17,7 @@
<dependency>
<groupId>io.github.neodix42.ton4j</groupId>
<artifactId>address</artifactId>
<version>0.6.0</version>
<version>0.7.0</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion address/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.github.neodix42</groupId>
<artifactId>top</artifactId>
<version>0.6.0</version>
<version>0.7.0</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down
4 changes: 2 additions & 2 deletions bitstring/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<dependency>
<groupId>io.github.neodix42</groupId>
<artifactId>bitstring</artifactId>
<version>0.6.0</version>
<version>0.7.0</version>
</dependency>
```

Expand All @@ -16,7 +16,7 @@
<dependency>
<groupId>io.github.neodix42.ton4j</groupId>
<artifactId>bitstring</artifactId>
<version>0.6.0</version>
<version>0.7.0</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion bitstring/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.github.neodix42</groupId>
<artifactId>top</artifactId>
<version>0.6.0</version>
<version>0.7.0</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down
78 changes: 39 additions & 39 deletions cell/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<dependency>
<groupId>io.github.neodix42</groupId>
<artifactId>cell</artifactId>
<version>0.6.0</version>
<version>0.7.0</version>
</dependency>
```

Expand All @@ -16,52 +16,52 @@
<dependency>
<groupId>io.github.neodix42.ton4j</groupId>
<artifactId>cell</artifactId>
<version>0.6.0</version>
<version>0.7.0</version>
</dependency>
```

## Cell Serialization to BoC

```java
Cell c1 = CellBuilder.beginCell().storeUint((long) Math.pow(2, 25), 26).endCell();

Cell c2 = CellBuilder.beginCell()
.storeUint((long) Math.pow(2, 37), 38)
.storeRef(c1)
.endCell();

Cell c3 = CellBuilder.beginCell().storeUint((long) Math.pow(2, 41), 42).endCell();
Cell c4 = CellBuilder.beginCell().storeUint((long) Math.pow(2, 42), 44).endCell();
Cell c5 = CellBuilder.beginCell()
.storeAddress(Address.parseFriendlyAddress("0QAljlSWOKaYCuXTx2OCr9P08y40SC2vw3UeM1hYnI3gDY7I"))
.storeString("HELLO")
.storeRef(c2)
.endCell();

log.info("c1 {}", c1.bits);
log.info("c2 {}", c2.bits);
log.info("c2:\n{}", c2.print());
log.info("c3 {}", c3.bits);
log.info("c4 {}", c4.bits);
log.info("c5 {}", c5.bits);
log.info("c5:\n{}", c5.print());

byte[] serializedCell5 = c5.toBocNew();
Cell c1=CellBuilder.beginCell().storeUint((long)Math.pow(2,25),26).endCell();

Cell c2=CellBuilder.beginCell()
.storeUint((long)Math.pow(2,37),38)
.storeRef(c1)
.endCell();

Cell c3=CellBuilder.beginCell().storeUint((long)Math.pow(2,41),42).endCell();
Cell c4=CellBuilder.beginCell().storeUint((long)Math.pow(2,42),44).endCell();
Cell c5=CellBuilder.beginCell()
.storeAddress(Address.parseFriendlyAddress("0QAljlSWOKaYCuXTx2OCr9P08y40SC2vw3UeM1hYnI3gDY7I"))
.storeString("HELLO")
.storeRef(c2)
.endCell();

log.info("c1 {}",c1.bits);
log.info("c2 {}",c2.bits);
log.info("c2:\n{}",c2.print());
log.info("c3 {}",c3.bits);
log.info("c4 {}",c4.bits);
log.info("c5 {}",c5.bits);
log.info("c5:\n{}",c5.print());

byte[]serializedCell5=c5.toBocNew();

// output
c1 8000002_
c2 8000000002_
c2:
x{8000000002_}
x{8000002_}

c3 80000000002_
c4 40000000000
c5 8004B1CA92C714D3015CBA78EC7055FA7E9E65C68905B5F86EA3C66B0B1391BC01A908A98989F_
c5:
x{8004B1CA92C714D3015CBA78EC7055FA7E9E65C68905B5F86EA3C66B0B1391BC01A908A98989F_}
x{8000000002_}
x{8000002_}
c1 8000002_
c2 8000000002_
c2:
x{8000000002_}
x{8000002_}

c3 80000000002_
c4 40000000000
c5 8004B1CA92C714D3015CBA78EC7055FA7E9E65C68905B5F86EA3C66B0B1391BC01A908A98989F_
c5:
x{8004B1CA92C714D3015CBA78EC7055FA7E9E65C68905B5F86EA3C66B0B1391BC01A908A98989F_}
x{8000000002_}
x{8000002_}
```

## Cell Deserialization from BoC
Expand Down
2 changes: 1 addition & 1 deletion cell/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.github.neodix42</groupId>
<artifactId>top</artifactId>
<version>0.6.0</version>
<version>0.7.0</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down
4 changes: 2 additions & 2 deletions emulator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Java Emulator wrapper uses JNA to access methods in native emulator shared libra
<dependency>
<groupId>io.github.neodix42</groupId>
<artifactId>emulator</artifactId>
<version>0.6.0</version>
<version>0.7.0</version>
</dependency>
```

Expand All @@ -18,7 +18,7 @@ Java Emulator wrapper uses JNA to access methods in native emulator shared libra
<dependency>
<groupId>io.github.neodix42.ton4j</groupId>
<artifactId>emulator</artifactId>
<version>0.6.0</version>
<version>0.7.0</version>
</dependency>
```

Expand Down
10 changes: 5 additions & 5 deletions emulator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.github.neodix42</groupId>
<artifactId>top</artifactId>
<version>0.6.0</version>
<version>0.7.0</version>
</parent>

<artifactId>emulator</artifactId>
Expand Down Expand Up @@ -88,25 +88,25 @@
<dependency>
<groupId>io.github.neodix42</groupId>
<artifactId>tonlib</artifactId>
<version>0.6.0</version>
<version>0.7.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.github.neodix42</groupId>
<artifactId>liteclient</artifactId>
<version>0.6.0</version>
<version>0.7.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.github.neodix42</groupId>
<artifactId>smartcontract</artifactId>
<version>0.6.0</version>
<version>0.7.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.github.neodix42</groupId>
<artifactId>cell</artifactId>
<version>0.6.0</version>
<version>0.7.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
Expand Down
16 changes: 8 additions & 8 deletions fift/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Java Lite-client wrapper uses JNA to access methods in native lite-client binary
<dependency>
<groupId>io.github.neodix42</groupId>
<artifactId>fift</artifactId>
<version>0.6.0</version>
<version>0.7.0</version>
</dependency>
```

Expand All @@ -18,21 +18,21 @@ Java Lite-client wrapper uses JNA to access methods in native lite-client binary
<dependency>
<groupId>io.github.neodix42.ton4j</groupId>
<artifactId>fift</artifactId>
<version>0.6.0</version>
<version>0.7.0</version>
</dependency>
```

## Usage

```java
URL resource = TestFiftRunner.class.getResource("/test.fift");
File fiftFile = Paths.get(resource.toURI()).toFile();
String absolutePath = fiftFile.getAbsolutePath();
URL resource=TestFiftRunner.class.getResource("/test.fift");
File fiftFile=Paths.get(resource.toURI()).toFile();
String absolutePath=fiftFile.getAbsolutePath();

FiftRunner fiftRunner = FiftRunner.builder().build();
FiftRunner fiftRunner=FiftRunner.builder().build();

String result = fiftRunner.run(fiftFile.getParent(), "-s", absolutePath);
log.info("output: {}", result);
String result=fiftRunner.run(fiftFile.getParent(),"-s",absolutePath);
log.info("output: {}",result);
```

More examples in [TestFiftRunner](../fift/src/test/java/org/ton/java/fift/TestFiftRunner.java) class.
Expand Down
2 changes: 1 addition & 1 deletion fift/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.github.neodix42</groupId>
<artifactId>top</artifactId>
<version>0.6.0</version>
<version>0.7.0</version>
</parent>

<artifactId>fift</artifactId>
Expand Down
4 changes: 2 additions & 2 deletions func/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Java Lite-client wrapper uses JNA to access methods in native lite-client binary
<dependency>
<groupId>io.github.neodix42</groupId>
<artifactId>func</artifactId>
<version>0.6.0</version>
<version>0.7.0</version>
</dependency>
```

Expand All @@ -18,7 +18,7 @@ Java Lite-client wrapper uses JNA to access methods in native lite-client binary
<dependency>
<groupId>io.github.neodix42.ton4j</groupId>
<artifactId>func</artifactId>
<version>0.6.0</version>
<version>0.7.0</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion func/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.github.neodix42</groupId>
<artifactId>top</artifactId>
<version>0.6.0</version>
<version>0.7.0</version>
</parent>

<artifactId>func</artifactId>
Expand Down
4 changes: 2 additions & 2 deletions liteclient/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Java Lite-client wrapper uses JNA to access methods in native lite-client binary
<dependency>
<groupId>io.github.neodix42</groupId>
<artifactId>lite-client</artifactId>
<version>0.6.0</version>
<version>0.7.0</version>
</dependency>
```

Expand All @@ -18,7 +18,7 @@ Java Lite-client wrapper uses JNA to access methods in native lite-client binary
<dependency>
<groupId>io.github.neodix42.ton4j</groupId>
<artifactId>lite-client</artifactId>
<version>0.6.0</version>
<version>0.7.0</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion liteclient/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.github.neodix42</groupId>
<artifactId>top</artifactId>
<version>0.6.0</version>
<version>0.7.0</version>
</parent>

<artifactId>liteclient</artifactId>
Expand Down
4 changes: 2 additions & 2 deletions mnemonic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<dependency>
<groupId>io.github.neodix42</groupId>
<artifactId>mnemonic</artifactId>
<version>0.6.0</version>
<version>0.7.0</version>
</dependency>
```

Expand All @@ -16,7 +16,7 @@
<dependency>
<groupId>io.github.neodix42.ton4j</groupId>
<artifactId>mnemonic</artifactId>
<version>0.6.0</version>
<version>0.7.0</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion mnemonic/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>top</artifactId>
<groupId>io.github.neodix42</groupId>
<version>0.6.0</version>
<version>0.7.0</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<groupId>io.github.neodix42</groupId>
<artifactId>top</artifactId>
<packaging>pom</packaging>
<version>0.6.0</version>
<version>0.7.0</version>

<modules>
<module>bitstring</module>
Expand Down
Loading

0 comments on commit 770ac31

Please sign in to comment.