Releases: ton-blockchain/ton4j
2.0.1
- add static method calculateWalletId() to WalletV5
(TON does not have built-in protection against replaying messages from testnet to mainnet. The wallet contract addresses this by encoding the network ID into the subwallet_id. Therefore, wallets on different networks MUST have different addresses) - fix de/serialization of config params 10, 11, 17, 18, 44, 45, 71, 72, 73 and 79
2.0.0
Breaking changes
-
big documentation update: now AI friendly, completely reworked main README.md with the more examples for each topic
-
added .codex and AGENTS.md
-
introduced new class TonProvider (module provider). All
ton4jwallet and smart contract classes acceptTonProviderinterface, e.g.:
TonCenter as a TON client provider
TonCenter tonCenterClient = TonCenter.builder().apiKey("").mainnet().build();
WalletV3R1 contract = WalletV3R1.builder().keyPair("keyPair").tonProvider(tonCenterClient).walletId(42).build();AdnlLiteClient as a TON client provider
AdnlLiteClient adnlLiteClient = AdnlLiteClient.builder().mainnet().build();
WalletV3R1 contract = WalletV3R1.builder().keyPair("keyPair").tonProvider(adnlLiteClient).walletId(42).build();Tonlib as a TON client provider
Tonlib tonlib =
Tonlib.builder()
.testnet(true)
.pathToTonlibSharedLib(Utils.getTonlibGithubUrl())
.ignoreCache(false)
.build();
WalletV3R1 contract = WalletV3R1.builder().tonProvider(tonlib).walletId(42).build();-
breaking change:
RawTransaction sendWithConfirmation
reworked to:
Transaction sendWithConfirmation -
breaking change:
SendResponse class moved to module import org.ton.ton4j.provider. -
improve fift, func and tolk runners output handling
-
added convinience methods to Utils class,
toUsdt,formatUsdtetc -
GenerateWalletmade available for public usage -
added
randomV4R2into GenerateWallet -
added
recipientsfield intoWalletV5 -
implemented missing NFT methods for AdnlLiteClient
1.3.5
-
align TonCenter V2 to version 2.2.1
-
update tx/tvm emulator default configs - enabled TVM 12
-
add getVersion to tx/tvm emulators, add initialBalance field to all contracts, required only in dev mode (with testnet and emulators)
-
add helper methods to interface TransactionDescription:
Boolean isAborted();
Boolean isDestroyed();
Boolean isSuccess();
Long getExitCode();
Long getComputeExitCode()
Long getActionResultCode() -
add MyLocalTonJettonFaucet and quick method deploy() to deploy it on MyLocalTon;
-
update MyLocalTonFaucet, remove limits, update addresses - now in sync with MyLocalTon (desktop and docker);
-
add true flag to show contract's code when compiling using SmartContractCompiler;
-
extend MessagePrintInfo and TransactionPrintInfo to use labels instead of addresses;
-
add help methods to GetMethodResult: getIntByIndex, getCellByIndex, getTupleByIndex, getListByIndex, getSliceByIndex and getAddressByIndex;
-
also added getAddressByIndex to RunMethodResult;
-
added debugEnabled into TxEmulator and TvmEmulator builders;
-
now TxEmulator on start disables global output: emulator_set_verbosity_level(0);
-
removed InternalMessageInfo.getTotalFees(), use getFwdFee();
1.3.4
- Align with TVM12 update. Rename ihrFee to extraFlags in Message.InternalMessageInfo.
- Introduce new TL-B type NewBounceBody. Add getBounceBody() into Message class;
- Update version, adjust SmartContractCompiler to Tolk v1+;
- Refactor maven dependencies, align logback-core version, remove timer-ninja dependency;
1.3.3
ton4j migrated to official TON mono repo!
Starting 1.3.3 ton4j is hosted in ton-blockchain/ton4j repository.
Update your Maven or Jitpack dependencies
<dependency>
<groupId>org.ton.ton4j</groupId>
<artifactId>smartcontract</artifactId>
<version>1.3.3</version>
</dependency>
- Update logback-classic 1.5.20
1.3.2
What's Changed
- Upgrade Apache Commons Lang version to fix vulnerability by @IAGrig in #133 - Thanks @IAGrig for the contribution!
- Upgrade logback-core 1.5.18 -> 1.5.19
- Added jacoco-maven-plugin to track code coverage
- Improved code coverage
New Contributors
Full Changelog: 1.3.1...1.3.2
1.3.1
- TonCenter Indexer v3 wrapper;
- Add updated JettonWalletV2 and JettonMinterV2 contracts; Add example of user jetton wallet address calculation offline;
- Fix issue #125, where wrongly set FLAG_USER_FRIENDLY and FLAG_URL_SAFE flgas.
Full Changelog: v1.2.1...1.3.1
v1.2.1
- introduce a new Exporter module that allows to access a TON RockDB database hosted locally;
- add various RocksDB readers, like CellDbReader, GlobalIndexReader, StateDbReader and ArchiveIndexReader;
- add simple command line tool TonExporterApp.jar to extract data (like blocks in TL-B or BoC format, last block, latest or by seqno account balance/shard) from TON db.
- in Exporter module add some TL-B types that use lazy-loading cell mechanism, where during cell deserialization each cell's reference is loaded from the CellDB by its hash;
- in Exporter module in ShardAccountsLazy added lookup method, that looks for a key in (HashmapAugE 256 ShardAccount DepthBalanceInfo) = ShardAccounts dict without loading the whole HashMap;
- add endCellNoRecalculation() to CellBuilder, that is used to end the cell without calculating hashes;
- improve readability of OutMsgQueueInfo de/serialization;
- fix AccountBlock and LibDescr deserialization;
- fix MsgEnvelope, McStateExtraInfo, BlockCreateStats, ShardAccountBlocks, OldMcBlocksInfo de/serialization;
v1.1.1
v1.1.0
- added TonCenterV2 REST client;
- added support and code examples of TonCenter client with all wallet types:
WalletV5 contract =
WalletV5.builder()
.tonCenterClient(tonCenterClient)
- AdnlLiteClient can now be used in multpile threads;
- Breaking changes! in order to generalize response from various providers (tonlib, ADNL lite-client and TonCenter client)
was:
ExtMessageInfo extMessageInfo = wallet.send(...
became:
SendResponse sendResponse = faucet.send(... - fixed ShardHashes deserialization, add getStateInit() and getBalance() to Account tlb class;
- added getReturnedStake(), getElectionId(), getElectionParticipants() to AdnlLiteClient, add getShards() to AllShardsInfo TL-B;
- fixed ShardDescr TL-B de/serialization;
- fixed BinTree deserialization;
- make AccountStateActive serializable, improve getParticipants() in AdnlLiteClient;


