Skip to content

Commit

Permalink
0.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
andreypfau committed Feb 13, 2025
1 parent f9a189c commit 4adb414
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 18 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,28 @@

### Core components

* `org.ton.kotlin:ton-kotlin-tvm:0.4.1` - TVM Primitives (Cells, BOC, etc.)
* `org.ton.kotlin:ton-kotlin-crypto:0.4.1` - Crypto primitives for TON (ED25519, SHA, etc.)
* `org.ton.kotlin:ton-kotlin-adnl:0.4.1` - ADNL (Abstract Datagram Network Layer) TON Network implementation
* `org.ton.kotlin:ton-kotlin-tvm:0.4.2` - TVM Primitives (Cells, BOC, etc.)
* `org.ton.kotlin:ton-kotlin-crypto:0.4.2` - Crypto primitives for TON (ED25519, SHA, etc.)
* `org.ton.kotlin:ton-kotlin-adnl:0.4.2` - ADNL (Abstract Datagram Network Layer) TON Network implementation

### API Interfaces

* `org.ton.kotlin:ton-kotlin-contract:0.4.1` - Smart-contracts API interface
* `org.ton.kotlin:ton-kotlin-liteclient:0.4.1` - Lite-client API implementation
* `org.ton.kotlin:ton-kotlin-contract:0.4.2` - Smart-contracts API interface
* `org.ton.kotlin:ton-kotlin-liteclient:0.4.2` - Lite-client API implementation

### TL-B (TL-Binary)

* `org.ton.kotlin:ton-kotlin-tlb:0.4.1` - TON TL-B (TL-Binary) serialization/deserialization
* `org.ton.kotlin:ton-kotlin-block-tlb:0.4.1` - Pre-generated TL-B schemas for TON Blockchain
* `org.ton.kotlin:ton-kotlin-hashmap-tlb:0.4.1` - Pre-generated TL-B schemas for TON Hashmap (also known as Dictionary)
* `org.ton.kotlin:ton-kotlin-tlb:0.4.2` - TON TL-B (TL-Binary) serialization/deserialization
* `org.ton.kotlin:ton-kotlin-block-tlb:0.4.2` - Pre-generated TL-B schemas for TON Blockchain
* `org.ton.kotlin:ton-kotlin-hashmap-tlb:0.4.2` - Pre-generated TL-B schemas for TON Hashmap (also known as Dictionary)

## Documentation

https://github.com/andreypfau/ton-kotlin/wiki/TON-Kotlin-documentation

<!-- Badges -->

[maven-central]: https://central.sonatype.com/artifact/org.ton/ton-kotlin-tvm/0.4.1
[maven-central]: https://central.sonatype.com/artifact/org.ton/ton-kotlin-tvm/0.4.2

[license]: LICENSE

Expand Down
14 changes: 7 additions & 7 deletions block-tlb/src/ExtraCurrencyCollection.kt
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ public class ExtraCurrencyCollection : Dictionary<Int, VarUInt248> {
map, DictionaryKeyCodec.INT32, VarUInt248, context
)

public constructor(cell: Cell?, context: CellContext = CellContext.EMPTY) : super(
cell, DictionaryKeyCodec.INT32, VarUInt248, context
public constructor(cell: Cell?) : super(
cell, DictionaryKeyCodec.INT32, VarUInt248
)

public constructor(rawDictionary: RawDictionary, context: CellContext = CellContext.EMPTY) : super(
rawDictionary, DictionaryKeyCodec.INT32, VarUInt248, context
public constructor(rawDictionary: RawDictionary) : super(
rawDictionary, DictionaryKeyCodec.INT32, VarUInt248
)

public constructor(dictionary: Dictionary<Int, VarUInt248>, context: CellContext = CellContext.EMPTY) : super(
dictionary.dict.root, DictionaryKeyCodec.INT32, VarUInt248, context
public constructor(dictionary: Dictionary<Int, VarUInt248>) : super(
dictionary.dict.root, DictionaryKeyCodec.INT32, VarUInt248
)

override fun equals(other: Any?): Boolean {
Expand Down Expand Up @@ -65,6 +65,6 @@ private object ExtraCurrencyCollectionTlbConstructor : TlbConstructor<ExtraCurre
context: CellContext
): ExtraCurrencyCollection {
val cell = slice.loadNullableRef()
return ExtraCurrencyCollection(cell, context)
return ExtraCurrencyCollection(cell)
}
}
3 changes: 2 additions & 1 deletion liteclient/src/CheckProofUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import org.ton.lite.client.internal.BlockHeaderResult
import org.ton.lite.client.internal.FullAccountState
import org.ton.lite.client.internal.TransactionId
import org.ton.tlb.CellRef
import org.ton.tlb.NullableTlbCodec

internal object CheckProofUtils {
fun checkBlockHeaderProof(
Expand Down Expand Up @@ -41,7 +42,7 @@ internal object CheckProofUtils {
address: MsgAddressInt,
root: Cell
): FullAccountState {
val account = CellRef(root, Account)
val account = CellRef(root, NullableTlbCodec(Account))

val qRoots = BagOfCells(proof).roots.toList()
check(qRoots.size == 2) {
Expand Down
8 changes: 7 additions & 1 deletion liteclient/src/LiteClient.kt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import org.ton.lite.client.internal.FullAccountState
import org.ton.lite.client.internal.TransactionId
import org.ton.lite.client.internal.TransactionInfo
import org.ton.tlb.CellRef
import org.ton.tlb.NullableTlbCodec
import org.ton.tlb.constructor.AnyTlbConstructor
import org.ton.tlb.storeTlb
import kotlin.coroutines.CoroutineContext
Expand Down Expand Up @@ -346,7 +347,12 @@ public class LiteClient(
throw IllegalStateException("Can't deserialize account state", e)
}
if (root.isEmpty()) {
return FullAccountState(rawAccountState.shardBlock, accountAddress, null, CellRef(null, Account))
return FullAccountState(
rawAccountState.shardBlock,
accountAddress,
null,
CellRef(null, NullableTlbCodec(Account))
)
}

check(rawAccountState.id == blockId || rawAccountState.id.seqno == 0) {
Expand Down

0 comments on commit 4adb414

Please sign in to comment.