diff --git a/blockchain/pom.xml b/blockchain/pom.xml
index cf3a5cdd..bbcf2069 100644
--- a/blockchain/pom.xml
+++ b/blockchain/pom.xml
@@ -53,11 +53,6 @@
emulator
${project.parent.version}
-
- io.github.neodix42
- liteclient
- ${project.parent.version}
-
io.github.neodix42
utils
diff --git a/blockchain/src/main/java/org/ton/java/Network.java b/blockchain/src/main/java/org/ton/java/Network.java
deleted file mode 100644
index e02fe365..00000000
--- a/blockchain/src/main/java/org/ton/java/Network.java
+++ /dev/null
@@ -1,8 +0,0 @@
-package org.ton.java;
-
-public enum Network {
- MAINNET,
- TESTNET,
- EMULATOR,
- MY_LOCAL_TON;
-}
diff --git a/blockchain/src/main/java/org/ton/java/Blockchain.java b/blockchain/src/main/java/org/ton/java/blockchain/Blockchain.java
similarity index 89%
rename from blockchain/src/main/java/org/ton/java/Blockchain.java
rename to blockchain/src/main/java/org/ton/java/blockchain/Blockchain.java
index c0bc9055..1b514ccb 100644
--- a/blockchain/src/main/java/org/ton/java/Blockchain.java
+++ b/blockchain/src/main/java/org/ton/java/blockchain/Blockchain.java
@@ -1,10 +1,15 @@
-package org.ton.java;
+package org.ton.java.blockchain;
import com.iwebpp.crypto.TweetNaclFast;
import lombok.Builder;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.ton.java.address.Address;
+import org.ton.java.blockchain.print.MessagePrintInfo;
+import org.ton.java.blockchain.print.TransactionPrintInfo;
+import org.ton.java.blockchain.types.GetterResult;
+import org.ton.java.blockchain.types.Network;
+import org.ton.java.blockchain.types.SendExternalResult;
import org.ton.java.cell.Cell;
import org.ton.java.cell.CellBuilder;
import org.ton.java.cell.CellSlice;
@@ -16,9 +21,6 @@
import org.ton.java.emulator.tx.TxVerbosityLevel;
import org.ton.java.fift.FiftRunner;
import org.ton.java.func.FuncRunner;
-import org.ton.java.liteclient.LiteClient;
-import org.ton.java.liteclient.LiteClientParser;
-import org.ton.java.liteclient.api.ResultLastBlock;
import org.ton.java.smartcontract.SmartContractCompiler;
import org.ton.java.smartcontract.faucet.TestnetFaucet;
import org.ton.java.smartcontract.types.WalletV3Config;
@@ -33,7 +35,6 @@
import org.ton.java.utils.Utils;
import java.math.BigInteger;
-import java.util.List;
import static java.util.Objects.isNull;
import static java.util.Objects.nonNull;
@@ -46,7 +47,6 @@ public class Blockchain {
private FiftRunner fiftRunner;
private TolkRunner tolkRunner;
private Tonlib tonlib;
- private LiteClient liteClient;
private Network network;
VerbosityLevel tonlibVerbosityLevel;
TxEmulatorConfig txEmulatorConfig;
@@ -105,8 +105,6 @@ public Blockchain build() {
initializeTonlib();
- initializeLiteClient();
-
initializeSmartContractCompiler();
if (super.network != Network.EMULATOR) {
@@ -277,7 +275,6 @@ private void printBlockchainInfo() {
+ "Emulator not used\n"
+ "Tonlib location: {}\n"
+ "Tonlib global config: {}\n"
- + "Lite-client location: {}\n"
+ "Func location: {}\n"
+ "Tolk location: {}\n"
+ "Fift location: {}, FIFTPATH={}\n"
@@ -285,7 +282,6 @@ private void printBlockchainInfo() {
super.network,
super.tonlib.pathToTonlibSharedLib,
super.tonlib.pathToGlobalConfig,
- super.liteClient.getLiteClientPath(),
super.funcRunner.getFuncPath(),
super.tolkRunner.getTolkPath(),
super.fiftRunner.getFiftPath(),
@@ -298,31 +294,6 @@ private void printBlockchainInfo() {
}
}
- private void initializeLiteClient() {
- if (super.network != Network.EMULATOR) {
- if (isNull(super.liteClient)) {
- if (StringUtils.isNotEmpty(super.customGlobalConfigPath)) {
- super.liteClient =
- LiteClient.builder()
- .pathToGlobalConfig(super.customGlobalConfigPath)
- .printInfo(false)
- .build();
- } else if (super.network == Network.MAINNET) {
- super.liteClient = LiteClient.builder().testnet(false).printInfo(true).build();
- } else if (super.network == Network.TESTNET) {
- super.liteClient = LiteClient.builder().testnet(true).printInfo(true).build();
- } else { // MyLocalTon
- super.liteClient =
- LiteClient.builder()
- .pathToGlobalConfig(
- super.myLocalTonInstallationPath + "/genesis/db/my-ton-global.config.json")
- .printInfo(false)
- .build();
- }
- }
- }
- }
-
private void initializeTonlib() {
if (super.network != Network.EMULATOR) {
if (isNull(super.tonlib)) {
@@ -432,16 +403,13 @@ public SendExternalResult sendExternal(Message message) {
* @return SendExternalResult
*/
public SendExternalResult sendExternal(Message message, int pauseInSeconds) {
-
try {
-
Address address = getAddr();
String bounceableAddress =
(network == Network.TESTNET) ? address.toBounceableTestnet() : address.toBounceable();
if (network != Network.EMULATOR) {
String initialBalance = Utils.formatNanoValue(tonlib.getAccountBalance(address));
-// log.info("initialBalance {}", initialBalance);
log.info(
"Sending external message (cell-hash: {}) to bounceable address {} on {}...",
message.toCell().getShortHash(),
@@ -492,13 +460,13 @@ public SendExternalResult sendExternal(Message message, int pauseInSeconds) {
.printEmulatorInfo(false)
.build();
- emulateTransactionResult
- .getTransaction()
- .printTransactionInfo(true, true, initialBalance);
+ Transaction transaction = emulateTransactionResult.getTransaction();
+
+ TransactionPrintInfo.printTransactionInfo(transaction, true, true, initialBalance);
log.info(
"final balance {}",
Utils.formatNanoValue(emulateTransactionResult.getNewShardAccount().getBalance()));
- emulateTransactionResult.getTransaction().printAllMessages(true, true);
+ TransactionPrintInfo.printAllMessages(transaction, true, true);
} else {
log.error(
"Cannot emulate transaction. Error: "
@@ -926,94 +894,31 @@ public void waitForTx(String initialBalance, int pauseInSeconds) {
// log.info("total txs: {}", rawTransactions.getTransactions().size());
if (printTxBlockData) {
- Transaction.printTxHeader("");
+ TransactionPrintInfo.printTxHeader("");
for (RawTransaction tx : rawTransactions.getTransactions()) {
Transaction transaction = Transaction.deserialize(CellSlice.beginParse(CellBuilder.beginCell().fromBocBase64(tx.getData()).endCell()));
BlockIdExt block = tonlib.lookupBlock(0, address.wc, address.getShardAsLong(), 0, transaction.getNow());
- transaction.printTransactionInfo(false, false, initialBalance, block.getShortBlockSeqno());
+ TransactionPrintInfo.printTransactionInfo(transaction, false, false, initialBalance, block.getShortBlockSeqno());
}
- Transaction.printTxFooter();
+ TransactionPrintInfo.printTxFooter();
} else {
- Transaction.printTxHeaderWithoutBlock("");
+ TransactionPrintInfo.printTxHeaderWithoutBlock("");
for (RawTransaction tx : rawTransactions.getTransactions()) {
Transaction transaction = Transaction.deserialize(CellSlice.beginParse(CellBuilder.beginCell().fromBocBase64(tx.getData()).endCell()));
- transaction.printTransactionInfo(false, false, initialBalance);
+ TransactionPrintInfo.printTransactionInfo(transaction, false, false, initialBalance);
}
- Transaction.printTxFooterWithoutBlock();
+ TransactionPrintInfo.printTxFooterWithoutBlock();
}
MessagePrintInfo.printMessageInfoHeader();
for (RawTransaction txa : rawTransactions.getTransactions()) {
Transaction transactiona = Transaction.deserialize(CellSlice.beginParse(CellBuilder.beginCell().fromBocBase64(txa.getData()).endCell()));
- transactiona.printAllMessages(false);
+ TransactionPrintInfo.printAllMessages(transactiona, false);
}
MessagePrintInfo.printMessageInfoFooter();
}
}
}
-
- public void showTxLiteClient(String address) {
- ResultLastBlock resultLastBlock = LiteClientParser.parseLast(liteClient.executeLast());
- // log.info("resultLastBlock {}", resultLastBlock);
-
- for (int i = 0; i < 8; i++) {
-
- try {
- ResultLastBlock blockId = resultLastBlock;
-
- if (i != 0) {
- resultLastBlock.setSeqno(resultLastBlock.getSeqno().add(BigInteger.ONE));
- blockId =
- LiteClientParser.parseBySeqno(
- liteClient.executeBySeqno(
- resultLastBlock.getWc(),
- resultLastBlock.getShard(),
- resultLastBlock.getSeqno()));
- }
-
- log.info("resultLastBlock {}", blockId);
-
- List result =
- liteClient.getAccountTransactionsFromBlockAndAllShards(blockId, address);
-
- if (!result.isEmpty()) {
- org.ton.java.liteclient.api.block.Transaction.printTxHeader("");
- for (org.ton.java.liteclient.api.block.Transaction tx : result) {
- tx.printTransactionFees();
- }
- org.ton.java.liteclient.api.block.Transaction.printTxFooter();
-
- org.ton.java.liteclient.api.block.MessageFees.printMessageFeesHeader();
- for (org.ton.java.liteclient.api.block.Transaction tx : result) {
- tx.printAllMessages(false);
- }
- org.ton.java.liteclient.api.block.MessageFees.printMessageFeesFooter();
- // break;
- }
- } catch (Exception e) {
- // asdf
- }
- }
- }
-
- public void showTxLiteClient() {
-
- List result =
- liteClient.getAllTransactionsFromLatestBlockAndAllShards();
-
- org.ton.java.liteclient.api.block.Transaction.printTxHeader("");
- for (org.ton.java.liteclient.api.block.Transaction tx : result) {
- tx.printTransactionFees();
- }
- org.ton.java.liteclient.api.block.Transaction.printTxFooter();
-
- org.ton.java.liteclient.api.block.MessageFees.printMessageFeesHeader();
- for (org.ton.java.liteclient.api.block.Transaction tx : result) {
- tx.printAllMessages(false);
- }
- org.ton.java.liteclient.api.block.MessageFees.printMessageFeesFooter();
- }
-
}
diff --git a/blockchain/src/main/java/org/ton/java/blockchain/print/BlockPrintInfo.java b/blockchain/src/main/java/org/ton/java/blockchain/print/BlockPrintInfo.java
new file mode 100644
index 00000000..415aa28a
--- /dev/null
+++ b/blockchain/src/main/java/org/ton/java/blockchain/print/BlockPrintInfo.java
@@ -0,0 +1,52 @@
+package org.ton.java.blockchain.print;
+
+import lombok.Builder;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.ton.java.tlb.types.Block;
+import org.ton.java.tlb.types.Transaction;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@Builder
+@Data
+@Slf4j
+public class BlockPrintInfo {
+
+ public static void printAllTransactions(Block block) {
+ List txs = block.getAllTransactions();
+ if (txs.isEmpty()) {
+ log.info("No transactions");
+ return;
+ }
+ TransactionPrintInfo.printTxHeaderWithoutBlock("");
+ for (Transaction tx : txs) {
+ TransactionPrintInfo.printTransactionInfo(tx);
+ }
+ TransactionPrintInfo.printTxFooterWithoutBlock();
+ }
+
+ public static List getAllMessages(Block block) {
+ List txs = block.getAllTransactions();
+ List msgFees = new ArrayList<>();
+ for (Transaction tx : txs) {
+ msgFees.addAll(TransactionPrintInfo.getAllMessagePrintInfo(tx));
+ }
+
+ return msgFees;
+ }
+
+ public static void printAllMessages(Block block) {
+ List msgFees = getAllMessages(block);
+ if (msgFees.isEmpty()) {
+ log.info("No messages");
+ return;
+ }
+ MessagePrintInfo.printMessageInfoHeader();
+ for (MessagePrintInfo msgFee : msgFees) {
+ msgFee.printMessageInfo();
+ }
+ MessagePrintInfo.printMessageInfoFooter();
+ }
+}
diff --git a/cell/src/main/java/org/ton/java/tlb/types/MessagePrintInfo.java b/blockchain/src/main/java/org/ton/java/blockchain/print/MessagePrintInfo.java
similarity index 98%
rename from cell/src/main/java/org/ton/java/tlb/types/MessagePrintInfo.java
rename to blockchain/src/main/java/org/ton/java/blockchain/print/MessagePrintInfo.java
index ee7cf246..446f4380 100644
--- a/cell/src/main/java/org/ton/java/tlb/types/MessagePrintInfo.java
+++ b/blockchain/src/main/java/org/ton/java/blockchain/print/MessagePrintInfo.java
@@ -1,4 +1,4 @@
-package org.ton.java.tlb.types;
+package org.ton.java.blockchain.print;
import lombok.Builder;
import lombok.Data;
diff --git a/blockchain/src/main/java/org/ton/java/blockchain/print/TransactionPrintInfo.java b/blockchain/src/main/java/org/ton/java/blockchain/print/TransactionPrintInfo.java
new file mode 100644
index 00000000..163d4be5
--- /dev/null
+++ b/blockchain/src/main/java/org/ton/java/blockchain/print/TransactionPrintInfo.java
@@ -0,0 +1,673 @@
+package org.ton.java.blockchain.print;
+
+import lombok.Builder;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.ton.java.cell.Cell;
+import org.ton.java.cell.CellSlice;
+import org.ton.java.tlb.types.*;
+import org.ton.java.utils.Utils;
+
+import java.math.BigInteger;
+import java.util.ArrayList;
+import java.util.List;
+
+import static java.util.Objects.isNull;
+import static java.util.Objects.nonNull;
+
+@Builder
+@Data
+@Slf4j
+public class TransactionPrintInfo {
+ String hash; // in_msg.hash
+ long now;
+ String op;
+ String type;
+ BigInteger valueIn;
+ BigInteger valueOut;
+
+ BigInteger totalFees;
+ BigInteger storageFeesCollected;
+ BigInteger storageDueFees;
+ String storageStatus;
+ String computeSuccess;
+ BigInteger computeGasFees;
+ BigInteger computeGasUsed;
+ long computeVmSteps;
+ BigInteger computeExitCode;
+ String actionSuccess;
+ BigInteger actionTotalFwdFees;
+ BigInteger actionTotalActionFees;
+ long actionTotalActions;
+ long actionResultCode;
+ BigInteger inForwardFee;
+ BigInteger outForwardFee;
+ long exitCode;
+ long actionCode;
+ long outMsgs;
+ BigInteger lt;
+ String account;
+ BigInteger balance;
+ Transaction tx;
+
+ private static String txHeaderInfoWithBlockTop = "| | Storage Phase | Compute Phase | Action Phase | |";
+ private static String txHeaderInfoWithBlock = "| txHash | timestamp | lt | op | type | valueIn | valueOut | totalFees | fees | dueFees | success | gasFees | vmSteps | exitCode | success | fordwardFees | actionFees | actions | exitCode | account | block |";
+
+ private static String txHeaderInfoWithoutBlockTop = "| | Storage Phase | Compute Phase | Action Phase | | ";
+ private static String txHeaderInfoWithoutBlock = "| txHash | timestamp | lt | op | type | valueIn | valueOut | totalFees | fees | dueFees | success | gasFees | vmSteps | exitCode | success | fordwardFees | actionFees | actions | exitCode | account |";
+
+
+ public static TransactionPrintInfo getTransactionPrintInfo(Transaction tx) {
+
+ BigInteger totalFees = tx.getTotalFees().getCoins();
+
+ StoragePhase storagePhase = getStoragePhase(tx.getDescription());
+ ComputePhaseVM computePhase = getComputePhaseVm(tx.getDescription());
+ ActionPhase actionPhase = getActionPhase(tx.getDescription());
+
+ BigInteger storageFeesCollected = nonNull(storagePhase) ? storagePhase.getStorageFeesCollected() : null;
+ BigInteger storageDueFees = nonNull(storagePhase) ? storagePhase.getStorageFeesDue() : null;
+ String storageStatus = nonNull(storagePhase) ? storagePhase.getStatusChange().getType() : "N/A";
+
+ BigInteger computeGasFees = nonNull(computePhase) ? computePhase.getGasFees() : null;
+ long computeVmSteps = nonNull(computePhase) ? computePhase.getDetails().getVMSteps() : 0;
+ String computeSuccess = nonNull(computePhase) ? computePhase.isSuccess() ? "yes" : "no" :
+ nonNull(getComputePhaseSkipReason(tx.getDescription())) ? "skipped" : "N/A";
+
+ BigInteger actionTotalFwdFees = nonNull(actionPhase) ? actionPhase.getTotalFwdFees() : null;
+ BigInteger actionTotalActionFees = nonNull(actionPhase) ? actionPhase.getTotalActionFees() : null;
+ String actionSuccess = nonNull(actionPhase) ? actionPhase.isSuccess() ? "yes" : "no" : "N/A";
+ long actionResultCode = nonNull(actionPhase) ? actionPhase.getResultCode() : 0;
+
+ BigInteger inForwardFees = BigInteger.ZERO;
+ BigInteger valueIn = BigInteger.ZERO;
+ BigInteger valueOut = BigInteger.ZERO;
+ BigInteger op = null;
+ long exitCode = getExitCode(tx.getDescription());
+ long actionCode = getActionCode(tx.getDescription());
+ long totalActions = getTotalActions(tx.getDescription());
+ long now = tx.getNow();
+ BigInteger lt = tx.getLt();
+ long outMsgs = tx.getOutMsgCount();
+ String hash = "not available";
+
+ if (nonNull(tx.getInOut())) {
+ Message inMsg = tx.getInOut().getIn();
+ if (nonNull(inMsg)) {
+ Cell body = inMsg.getBody();
+ hash = "todome";
+
+ if (nonNull(body) && body.getBits().getUsedBits() >= 32) {
+ op = CellSlice.beginParse(body).preloadInt(32);
+ } else {
+ op = BigInteger.ONE.negate();
+ }
+
+ if (inMsg.getInfo() instanceof InternalMessageInfo) {
+ valueIn = ((InternalMessageInfo) inMsg.getInfo()).getValue().getCoins();
+ inForwardFees = ((InternalMessageInfo) inMsg.getInfo()).getFwdFee();
+ }
+ }
+
+ for (Message outMsg : tx.getInOut().getOutMessages()) {
+ if (outMsg.getInfo() instanceof InternalMessageInfo) {
+ InternalMessageInfo intMsgInfo = (InternalMessageInfo) outMsg.getInfo();
+ valueOut = valueOut.add(intMsgInfo.getValue().getCoins());
+ }
+ }
+ }
+
+ return TransactionPrintInfo.builder()
+ .hash(hash)
+ .now(now)
+ .op(
+ (isNull(op))
+ ? "N/A"
+ : (op.compareTo(BigInteger.ONE.negate()) != 0) ? op.toString(16) : "no body")
+ .type(
+ nonNull(tx.getDescription())
+ ? tx.getDescription().getClass().getSimpleName().substring(22)
+ : "")
+ .valueIn(valueIn)
+ .valueOut(valueOut)
+ .totalFees(totalFees)
+ .storageFeesCollected(storageFeesCollected)
+ .storageDueFees(storageDueFees)
+ .storageStatus(storageStatus)
+ .computeSuccess(computeSuccess)
+ .computeGasFees(computeGasFees)
+ .computeVmSteps(computeVmSteps)
+ .actionSuccess(actionSuccess)
+ .actionTotalFwdFees(actionTotalFwdFees)
+ .actionTotalActionFees(actionTotalActionFees)
+ .actionTotalActions(totalActions)
+ .actionResultCode(actionResultCode)
+ .inForwardFee(inForwardFees)
+ .exitCode(exitCode)
+ .actionCode(actionCode)
+ .lt(lt)
+ .account(nonNull(tx.getAccountAddr()) ? tx.getAccountAddrShort() : "")
+ .build();
+ }
+
+ private static StoragePhase getStoragePhase(TransactionDescription txDesc) {
+ if (txDesc instanceof TransactionDescriptionOrdinary) {
+ return ((TransactionDescriptionOrdinary) txDesc).getStoragePhase();
+ } else if (txDesc instanceof TransactionDescriptionStorage) {
+ return ((TransactionDescriptionStorage) txDesc).getStoragePhase();
+ } else if (txDesc instanceof TransactionDescriptionSplitPrepare) {
+ return ((TransactionDescriptionSplitPrepare) txDesc).getStoragePhase();
+ } else if (txDesc instanceof TransactionDescriptionTickTock) {
+ return ((TransactionDescriptionTickTock) txDesc).getStoragePhase();
+ } else if (txDesc instanceof TransactionDescriptionMergeInstall) {
+ return ((TransactionDescriptionMergeInstall) txDesc).getStoragePhase();
+ } else if (txDesc instanceof TransactionDescriptionMergePrepare) {
+ return ((TransactionDescriptionMergePrepare) txDesc).getStoragePhase();
+ }
+ return null;
+ }
+
+
+ private static ComputePhaseVM getComputePhaseVm(TransactionDescription txDesc) {
+ if (txDesc instanceof TransactionDescriptionOrdinary) {
+ ComputePhase computePhase = ((TransactionDescriptionOrdinary) txDesc).getComputePhase();
+ if (computePhase instanceof ComputePhaseVM) {
+ return ((ComputePhaseVM) computePhase);
+ }
+
+ } else if (txDesc instanceof TransactionDescriptionSplitPrepare) {
+ ComputePhase computePhase = ((TransactionDescriptionSplitPrepare) txDesc).getComputePhase();
+ if (computePhase instanceof ComputePhaseVM) {
+ return ((ComputePhaseVM) computePhase);
+ }
+ } else if (txDesc instanceof TransactionDescriptionTickTock) {
+ ComputePhase computePhase = ((TransactionDescriptionTickTock) txDesc).getComputePhase();
+ if (computePhase instanceof ComputePhaseVM) {
+ return ((ComputePhaseVM) computePhase);
+ }
+ } else if (txDesc instanceof TransactionDescriptionMergeInstall) {
+ ComputePhase computePhase = ((TransactionDescriptionMergeInstall) txDesc).getComputePhase();
+ if (computePhase instanceof ComputePhaseVM) {
+ return ((ComputePhaseVM) computePhase);
+ }
+ }
+ return null;
+ }
+
+ private static ComputeSkipReason getComputePhaseSkipReason(TransactionDescription txDesc) {
+ if (txDesc instanceof TransactionDescriptionOrdinary) {
+ ComputePhase computePhase = ((TransactionDescriptionOrdinary) txDesc).getComputePhase();
+ if (computePhase instanceof ComputeSkipReason) {
+ return ((ComputeSkipReason) computePhase);
+ }
+
+ } else if (txDesc instanceof TransactionDescriptionSplitPrepare) {
+ ComputePhase computePhase = ((TransactionDescriptionSplitPrepare) txDesc).getComputePhase();
+ if (computePhase instanceof ComputeSkipReason) {
+ return ((ComputeSkipReason) computePhase);
+ }
+ } else if (txDesc instanceof TransactionDescriptionTickTock) {
+ ComputePhase computePhase = ((TransactionDescriptionTickTock) txDesc).getComputePhase();
+ if (computePhase instanceof ComputeSkipReason) {
+ return ((ComputeSkipReason) computePhase);
+ }
+ } else if (txDesc instanceof TransactionDescriptionMergeInstall) {
+ ComputePhase computePhase = ((TransactionDescriptionMergeInstall) txDesc).getComputePhase();
+ if (computePhase instanceof ComputeSkipReason) {
+ return ((ComputeSkipReason) computePhase);
+ }
+ }
+ return null;
+ }
+
+ private static ActionPhase getActionPhase(TransactionDescription txDesc) {
+ if (txDesc instanceof TransactionDescriptionOrdinary) {
+ return ((TransactionDescriptionOrdinary) txDesc).getActionPhase();
+ } else if (txDesc instanceof TransactionDescriptionSplitPrepare) {
+ return ((TransactionDescriptionSplitPrepare) txDesc).getActionPhase();
+ } else if (txDesc instanceof TransactionDescriptionTickTock) {
+ return ((TransactionDescriptionTickTock) txDesc).getActionPhase();
+ } else if (txDesc instanceof TransactionDescriptionMergeInstall) {
+ return ((TransactionDescriptionMergeInstall) txDesc).getActionPhase();
+ }
+ return null;
+ }
+
+ private static long getTotalActions(TransactionDescription txDesc) {
+ if (txDesc instanceof TransactionDescriptionOrdinary) {
+ ActionPhase actionPhase = ((TransactionDescriptionOrdinary) txDesc).getActionPhase();
+ return isNull(actionPhase) ? 0 : actionPhase.getTotalActions();
+ } else if (txDesc instanceof TransactionDescriptionSplitPrepare) {
+ ActionPhase actionPhase = ((TransactionDescriptionSplitPrepare) txDesc).getActionPhase();
+ return isNull(actionPhase) ? 0 : actionPhase.getTotalActions();
+ } else if (txDesc instanceof TransactionDescriptionTickTock) {
+ ActionPhase actionPhase = ((TransactionDescriptionTickTock) txDesc).getActionPhase();
+ return isNull(actionPhase) ? 0 : actionPhase.getTotalActions();
+ } else if (txDesc instanceof TransactionDescriptionMergeInstall) {
+ ActionPhase actionPhase = ((TransactionDescriptionMergeInstall) txDesc).getActionPhase();
+ return isNull(actionPhase) ? 0 : actionPhase.getTotalActions();
+ } else {
+ return -1;
+ }
+ }
+
+ private static long getActionCode(TransactionDescription txDesc) {
+ if (txDesc instanceof TransactionDescriptionOrdinary) {
+ ActionPhase actionPhase = ((TransactionDescriptionOrdinary) txDesc).getActionPhase();
+ return isNull(actionPhase) ? 0 : actionPhase.getResultCode();
+ } else if (txDesc instanceof TransactionDescriptionSplitPrepare) {
+ ActionPhase actionPhase = ((TransactionDescriptionSplitPrepare) txDesc).getActionPhase();
+ return isNull(actionPhase) ? 0 : actionPhase.getResultCode();
+ } else if (txDesc instanceof TransactionDescriptionTickTock) {
+ ActionPhase actionPhase = ((TransactionDescriptionTickTock) txDesc).getActionPhase();
+ return isNull(actionPhase) ? 0 : actionPhase.getResultCode();
+ } else if (txDesc instanceof TransactionDescriptionMergeInstall) {
+ ActionPhase actionPhase = ((TransactionDescriptionMergeInstall) txDesc).getActionPhase();
+ return isNull(actionPhase) ? 0 : actionPhase.getResultCode();
+ } else {
+ return -1;
+ }
+ }
+
+ private static long getExitCode(TransactionDescription txDesc) {
+ if (txDesc instanceof TransactionDescriptionOrdinary) {
+ ComputePhase computePhase = ((TransactionDescriptionOrdinary) txDesc).getComputePhase();
+ if (computePhase instanceof ComputePhaseVM) {
+ return ((ComputePhaseVM) computePhase).getDetails().getExitCode();
+ }
+ } else if (txDesc instanceof TransactionDescriptionSplitPrepare) {
+ ComputePhase computePhase = ((TransactionDescriptionSplitPrepare) txDesc).getComputePhase();
+ if (computePhase instanceof ComputePhaseVM) {
+ return ((ComputePhaseVM) computePhase).getDetails().getExitCode();
+ }
+ } else if (txDesc instanceof TransactionDescriptionTickTock) {
+ ComputePhase computePhase = ((TransactionDescriptionTickTock) txDesc).getComputePhase();
+ if (computePhase instanceof ComputePhaseVM) {
+ return ((ComputePhaseVM) computePhase).getDetails().getExitCode();
+ }
+ } else if (txDesc instanceof TransactionDescriptionMergeInstall) {
+ ComputePhase computePhase = ((TransactionDescriptionMergeInstall) txDesc).getComputePhase();
+ if (computePhase instanceof ComputePhaseVM) {
+ return ((ComputePhaseVM) computePhase).getDetails().getExitCode();
+ }
+ } else {
+ return -1;
+ }
+ return -1;
+ }
+
+
+ /**
+ * Print txs data without header, footer, balance and block.
+ */
+
+ public static void printTransactionInfo(Transaction transaction) {
+ printTransactionInfo(transaction, false, false);
+ }
+
+ /**
+ * Print txs data without header, footer and balance, with block only.
+ *
+ * @param block String
+ */
+ public void printTransactionInfo(Transaction transaction, String block) {
+ printTransactionInfo(transaction, false, false, "", block);
+ }
+
+ /**
+ * Print txs data.
+ *
+ * @param withHeader boolean
+ * @param withFooter boolean
+ * @param balance String
+ * @param block String
+ */
+ public static void printTransactionInfo(Transaction transaction, boolean withHeader, boolean withFooter, String balance, String block) {
+ TransactionPrintInfo txFees = getTransactionPrintInfo(transaction);
+
+ if (withHeader) {
+ if (StringUtils.isNotEmpty(balance)) {
+ printTxHeader(" (initial balance " + balance + ")");
+ } else {
+ printTxHeader("");
+ }
+ }
+ printTxData(txFees, block);
+
+ if (withFooter) {
+ printTxFooter();
+ }
+ }
+
+ public static void printTransactionInfo(Transaction transaction, boolean withHeader, boolean withFooter, String balance) {
+ TransactionPrintInfo txFees = getTransactionPrintInfo(transaction);
+
+ if (withHeader) {
+ printTxHeaderWithoutBlock(" (initial balance " + balance + ")");
+ }
+ printTxData(txFees);
+
+ if (withFooter) {
+ printTxFooterWithoutBlock();
+ }
+ }
+
+ public static void printTransactionInfo(Transaction transaction, boolean withHeader, boolean withFooter) {
+ TransactionPrintInfo txFees = getTransactionPrintInfo(transaction);
+
+ if (withHeader) {
+ printTxHeaderWithoutBlock("");
+ }
+ printTxData(txFees);
+
+ if (withFooter) {
+ printTxFooterWithoutBlock();
+ }
+ }
+
+ private static BigInteger getOperationFromBody(Cell body) {
+ if (nonNull(body) && body.getBits().getUsedBits() >= 32) {
+ return CellSlice.beginParse(body).preloadInt(32);
+ } else {
+ return BigInteger.ONE.negate();
+ }
+ }
+
+ private static String getCommentFromBody(Cell body) {
+ try {
+ if (nonNull(body) && body.getBits().getUsedBits() >= 32) {
+ String comment = CellSlice.beginParse(body).skipBits(32).loadSnakeString();
+ if ((StringUtils.contains(comment, '\0')) || (StringUtils.contains(comment, '\1'))
+ || (StringUtils.contains(comment, '\2')) || (StringUtils.contains(comment, '\3'))
+ || (StringUtils.contains(comment, '\uFFFD'))) {
+ return "";
+ } else {
+ if (comment.length() > 26) {
+ return comment.substring(0, 26);
+ } else {
+ return comment;
+ }
+ }
+ } else {
+ return "";
+ }
+ } catch (Exception e) {
+ return "error";
+ }
+ }
+
+ public static List getAllMessagePrintInfo(Transaction tx) {
+ List messagePrintInfo = new ArrayList<>();
+
+ BigInteger op;
+ String comment;
+
+ if (nonNull(tx.getInOut())) {
+
+ Message inMsg = tx.getInOut().getIn();
+ if (nonNull(inMsg)) {
+ Cell body = inMsg.getBody();
+
+ op = getOperationFromBody(body);
+ comment = getCommentFromBody(body);
+
+ if (inMsg.getInfo() instanceof InternalMessageInfo) {
+ InternalMessageInfo msgInfo = ((InternalMessageInfo) inMsg.getInfo());
+ MessagePrintInfo msgPrintInfo =
+ MessagePrintInfo.builder()
+ .direction("in")
+ .type(formatMsgType(inMsg.getInfo().getClass().getSimpleName()))
+ .op(
+ (isNull(op))
+ ? "N/A"
+ : (op.compareTo(BigInteger.ONE.negate()) != 0)
+ ? op.toString(16)
+ : "no body")
+ .value(msgInfo.getValue().getCoins())
+ .fwdFee(msgInfo.getFwdFee())
+ .ihrFee(msgInfo.getIHRFee())
+ .createdLt(msgInfo.getCreatedLt())
+ .createdAt(BigInteger.valueOf(msgInfo.getCreatedAt()))
+ .src(msgInfo.getSrcAddr().toAddress().toRaw())
+ .dst(msgInfo.getDstAddr().toAddress().toRaw())
+ .comment(comment)
+ .build();
+ messagePrintInfo.add(msgPrintInfo);
+ }
+ if (inMsg.getInfo() instanceof ExternalMessageOutInfo) {
+ ExternalMessageOutInfo msgInfo = ((ExternalMessageOutInfo) inMsg.getInfo());
+ MessagePrintInfo msgPrintInfo =
+ MessagePrintInfo.builder()
+ .direction("in")
+ .type(formatMsgType(inMsg.getInfo().getClass().getSimpleName()))
+ .op(
+ (isNull(op))
+ ? "N/A"
+ : (op.compareTo(BigInteger.ONE.negate()) != 0)
+ ? op.toString(16)
+ : "no body")
+ .createdLt(msgInfo.getCreatedLt())
+ .createdAt(BigInteger.valueOf(msgInfo.getCreatedAt()))
+ .src(msgInfo.getSrcAddr().toAddress().toRaw())
+ .dst(msgInfo.getDstAddr().toString())
+ .comment(comment)
+ .build();
+ messagePrintInfo.add(msgPrintInfo);
+ }
+ if (inMsg.getInfo() instanceof ExternalMessageInInfo) {
+ ExternalMessageInInfo msgInfo = ((ExternalMessageInInfo) inMsg.getInfo());
+ MessagePrintInfo msgPrintInfo =
+ MessagePrintInfo.builder()
+ .direction("in")
+ .type(formatMsgType(inMsg.getInfo().getClass().getSimpleName()))
+ .op(
+ (isNull(op))
+ ? "N/A"
+ : (op.compareTo(BigInteger.ONE.negate()) != 0)
+ ? op.toString(16)
+ : "no body")
+ .importFee(msgInfo.getImportFee())
+ .src(msgInfo.getSrcAddr().toString())
+ .dst(msgInfo.getDstAddr().toString())
+ .comment(comment)
+ .build();
+ messagePrintInfo.add(msgPrintInfo);
+ }
+ }
+
+ for (Message outMsg : tx.getInOut().getOutMessages()) {
+
+ Cell body = outMsg.getBody();
+
+ op = getOperationFromBody(body);
+ comment = getCommentFromBody(body);
+
+ if (outMsg.getInfo() instanceof InternalMessageInfo) {
+ InternalMessageInfo intMsgInfo = (InternalMessageInfo) outMsg.getInfo();
+
+ MessagePrintInfo msgPrintInfo =
+ MessagePrintInfo.builder()
+ .direction("out")
+ .type(formatMsgType(outMsg.getInfo().getClass().getSimpleName()))
+ .op(
+ (isNull(op))
+ ? "N/A"
+ : (op.compareTo(BigInteger.ONE.negate()) != 0)
+ ? op.toString(16)
+ : "no body")
+ .value(intMsgInfo.getValue().getCoins())
+ .fwdFee(intMsgInfo.getFwdFee())
+ .ihrFee(intMsgInfo.getIHRFee())
+ .createdLt(intMsgInfo.getCreatedLt())
+ .createdAt(BigInteger.valueOf(intMsgInfo.getCreatedAt()))
+ .src(intMsgInfo.getSrcAddr().toAddress().toRaw())
+ .dst(intMsgInfo.getDstAddr().toAddress().toRaw())
+ .comment(comment)
+ .build();
+ messagePrintInfo.add(msgPrintInfo);
+ }
+ if (outMsg.getInfo() instanceof ExternalMessageOutInfo) {
+ ExternalMessageOutInfo outMsgInfo = (ExternalMessageOutInfo) outMsg.getInfo();
+
+ MessagePrintInfo msgPrintInfo =
+ MessagePrintInfo.builder()
+ .direction("out")
+ .type(formatMsgType(outMsg.getInfo().getClass().getSimpleName()))
+ .op(
+ (isNull(op))
+ ? "N/A"
+ : (op.compareTo(BigInteger.ONE.negate()) != 0)
+ ? op.toString(16)
+ : "no body")
+ .createdLt(outMsgInfo.getCreatedLt())
+ .createdAt(BigInteger.valueOf(outMsgInfo.getCreatedAt()))
+ .src(outMsgInfo.getSrcAddr().toAddress().toRaw())
+ .dst(outMsgInfo.getDstAddr().toString())
+ .comment(comment)
+ .build();
+ messagePrintInfo.add(msgPrintInfo);
+ }
+ if (outMsg.getInfo() instanceof ExternalMessageInInfo) {
+ ExternalMessageInInfo outMsgInfo = (ExternalMessageInInfo) outMsg.getInfo();
+
+ MessagePrintInfo msgPrintInfo =
+ MessagePrintInfo.builder()
+ .direction("out")
+ .type(formatMsgType(outMsg.getInfo().getClass().getSimpleName()))
+ .op(
+ (isNull(op))
+ ? "N/A"
+ : (op.compareTo(BigInteger.ONE.negate()) != 0)
+ ? op.toString(16)
+ : "no body")
+ .importFee(outMsgInfo.getImportFee())
+ .src(outMsgInfo.getSrcAddr().toString())
+ .dst(outMsgInfo.getDstAddr().toString())
+ .comment(comment)
+ .build();
+ messagePrintInfo.add(msgPrintInfo);
+ }
+ }
+ }
+ return messagePrintInfo;
+ }
+
+ public static void printAllMessages(Transaction transaction, boolean withHeader) {
+ printAllMessages(transaction, withHeader, false);
+ }
+
+ public static void printAllMessages(Transaction transaction, boolean withHeader, boolean withFooter) {
+ List msgsPrintInfo = getAllMessagePrintInfo(transaction);
+ if (msgsPrintInfo.isEmpty()) {
+ log.info("No messages");
+ return;
+ }
+
+ if (withHeader) {
+ MessagePrintInfo.printMessageInfoHeader();
+ }
+
+ for (MessagePrintInfo msgPrintInfo : msgsPrintInfo) {
+ msgPrintInfo.printMessageInfo();
+ }
+ if (withFooter) {
+ MessagePrintInfo.printMessageInfoFooter();
+ }
+ }
+
+ public static void printTxHeader(String balance) {
+ log.info("");
+ log.info("Transactions" + balance);
+
+ log.info(StringUtils.repeat("-", txHeaderInfoWithBlock.length()));
+ log.info(txHeaderInfoWithBlockTop);
+ log.info(txHeaderInfoWithBlock);
+ log.info(StringUtils.repeat("-", txHeaderInfoWithBlock.length()));
+ }
+
+ public static void printTxHeaderWithoutBlock(String balance) {
+ log.info("");
+ log.info("Transactions" + balance);
+
+ log.info(StringUtils.repeat("-", txHeaderInfoWithoutBlock.length()));
+ log.info(txHeaderInfoWithoutBlockTop);
+ log.info(txHeaderInfoWithoutBlock);
+ log.info(StringUtils.repeat("-", txHeaderInfoWithoutBlock.length()));
+ }
+
+ public static void printTxFooter() {
+ log.info(StringUtils.repeat("-", txHeaderInfoWithBlock.length()));
+ }
+
+ public static void printTxFooterWithoutBlock() {
+ log.info(StringUtils.repeat("-", txHeaderInfoWithoutBlock.length()));
+ }
+
+ public static void printTxData(TransactionPrintInfo txPrintInfo) {
+ String str =
+ String.format(
+ "| %-8s| %-10s| %-15s| %-10s| %-13s| %-15s| %-15s| %-13s| %-13s| %-14s| %-8s| %-14s| %-8s| %-9s| %-8s| %-13s| %-13s| %-8s| %-9s| %-14s|",
+ txPrintInfo.getHash().substring(0, 6),
+ Utils.toUTCTimeOnly(txPrintInfo.getNow()),
+ txPrintInfo.getLt(),
+ txPrintInfo.getOp(),
+ txPrintInfo.getType(),
+ Utils.formatNanoValueZero(txPrintInfo.getValueIn()),
+ Utils.formatNanoValueZero(txPrintInfo.getValueOut()),
+ Utils.formatNanoValueZero(txPrintInfo.getTotalFees()),
+ Utils.formatNanoValueZero(txPrintInfo.getStorageFeesCollected()),
+ Utils.formatNanoValueZero(txPrintInfo.getStorageDueFees()),
+// txPrintInfo.getStorageStatus(),
+ txPrintInfo.getComputeSuccess(),
+ Utils.formatNanoValueZero(txPrintInfo.getComputeGasFees()),
+ txPrintInfo.getComputeVmSteps(),
+ Utils.formatNanoValueZero(txPrintInfo.getComputeExitCode()),
+ txPrintInfo.getActionSuccess(),
+ Utils.formatNanoValueZero(txPrintInfo.getActionTotalFwdFees()),
+ Utils.formatNanoValueZero(txPrintInfo.getActionTotalActionFees()),
+ txPrintInfo.getActionTotalActions(),
+ txPrintInfo.getActionResultCode(),
+ txPrintInfo.getAccount());
+ log.info(str);
+ }
+
+ public static void printTxData(TransactionPrintInfo txPrintInfo, String block) {
+ String str =
+ String.format(
+ "| %-8s| %-10s| %-15s| %-10s| %-13s| %-15s| %-15s| %-13s| %-13s| %-14s| %-8s| %-14s| %-8s| %-9s| %-8s| %-13s| %-13s| %-8s| %-9s| %-14s| %-32s|",
+ txPrintInfo.getHash().substring(0, 5),
+ Utils.toUTCTimeOnly(txPrintInfo.getNow()),
+ txPrintInfo.getLt(),
+ txPrintInfo.getOp(),
+ txPrintInfo.getType(),
+ Utils.formatNanoValueZero(txPrintInfo.getValueIn()),
+ Utils.formatNanoValueZero(txPrintInfo.getValueOut()),
+ Utils.formatNanoValueZero(txPrintInfo.getTotalFees()),
+ Utils.formatNanoValueZero(txPrintInfo.getStorageFeesCollected()),
+ Utils.formatNanoValueZero(txPrintInfo.getStorageDueFees()),
+// txPrintInfo.getStorageStatus(),
+ txPrintInfo.getComputeSuccess(),
+ Utils.formatNanoValueZero(txPrintInfo.getComputeGasFees()),
+ txPrintInfo.getComputeVmSteps(),
+ Utils.formatNanoValueZero(txPrintInfo.getComputeExitCode()),
+ txPrintInfo.getActionSuccess(),
+ Utils.formatNanoValueZero(txPrintInfo.getActionTotalFwdFees()),
+ Utils.formatNanoValueZero(txPrintInfo.getActionTotalActionFees()),
+ txPrintInfo.getActionTotalActions(),
+ txPrintInfo.getActionResultCode(),
+ txPrintInfo.getAccount(),
+ StringUtils.isEmpty(block) ? "N/A" : block);
+ log.info(str);
+ }
+
+ private static String formatMsgType(String fullMsgType) {
+ if (fullMsgType.equals("InternalMessageInfo")) {
+ return "internal-in";
+ } else if (fullMsgType.equals("ExternalMessageOutInfo")) {
+ return "external-out";
+ } else {
+ return "external-in";
+ }
+ }
+}
diff --git a/blockchain/src/main/java/org/ton/java/GetterResult.java b/blockchain/src/main/java/org/ton/java/blockchain/types/GetterResult.java
similarity index 64%
rename from blockchain/src/main/java/org/ton/java/GetterResult.java
rename to blockchain/src/main/java/org/ton/java/blockchain/types/GetterResult.java
index 077779c2..ba454e79 100644
--- a/blockchain/src/main/java/org/ton/java/GetterResult.java
+++ b/blockchain/src/main/java/org/ton/java/blockchain/types/GetterResult.java
@@ -1,4 +1,4 @@
-package org.ton.java;
+package org.ton.java.blockchain.types;
import lombok.Builder;
import lombok.Data;
@@ -8,6 +8,6 @@
@Builder
@Data
public class GetterResult {
- GetMethodResult emulatorResult;
- RunResult tonlibResult;
+ GetMethodResult emulatorResult;
+ RunResult tonlibResult;
}
diff --git a/blockchain/src/main/java/org/ton/java/blockchain/types/Network.java b/blockchain/src/main/java/org/ton/java/blockchain/types/Network.java
new file mode 100644
index 00000000..120ea5de
--- /dev/null
+++ b/blockchain/src/main/java/org/ton/java/blockchain/types/Network.java
@@ -0,0 +1,8 @@
+package org.ton.java.blockchain.types;
+
+public enum Network {
+ MAINNET,
+ TESTNET,
+ EMULATOR,
+ MY_LOCAL_TON;
+}
diff --git a/blockchain/src/main/java/org/ton/java/SendExternalResult.java b/blockchain/src/main/java/org/ton/java/blockchain/types/SendExternalResult.java
similarity index 63%
rename from blockchain/src/main/java/org/ton/java/SendExternalResult.java
rename to blockchain/src/main/java/org/ton/java/blockchain/types/SendExternalResult.java
index 8615dbc3..e8910100 100644
--- a/blockchain/src/main/java/org/ton/java/SendExternalResult.java
+++ b/blockchain/src/main/java/org/ton/java/blockchain/types/SendExternalResult.java
@@ -1,4 +1,4 @@
-package org.ton.java;
+package org.ton.java.blockchain.types;
import lombok.Builder;
import lombok.Data;
@@ -8,6 +8,6 @@
@Builder
@Data
public class SendExternalResult {
- EmulateTransactionResult emulatorResult;
- ExtMessageInfo tonlibResult;
+ EmulateTransactionResult emulatorResult;
+ ExtMessageInfo tonlibResult;
}
diff --git a/blockchain/src/test/java/org/ton/java/BlockchainTest.java b/blockchain/src/test/java/org/ton/java/BlockchainTest.java
index 0acd2938..da63ca3d 100644
--- a/blockchain/src/test/java/org/ton/java/BlockchainTest.java
+++ b/blockchain/src/test/java/org/ton/java/BlockchainTest.java
@@ -6,14 +6,20 @@
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import org.ton.java.address.Address;
+import org.ton.java.blockchain.Blockchain;
+import org.ton.java.blockchain.print.BlockPrintInfo;
+import org.ton.java.blockchain.types.GetterResult;
+import org.ton.java.blockchain.types.Network;
import org.ton.java.cell.Cell;
import org.ton.java.cell.CellBuilder;
+import org.ton.java.cell.CellSlice;
import org.ton.java.emulator.tvm.TvmVerbosityLevel;
import org.ton.java.emulator.tx.TxVerbosityLevel;
import org.ton.java.smartcontract.faucet.TestnetFaucet;
import org.ton.java.smartcontract.types.WalletV3Config;
import org.ton.java.smartcontract.wallet.v3.WalletV3R2;
import org.ton.java.smartcontract.wallet.v5.WalletV5;
+import org.ton.java.tlb.types.Block;
import org.ton.java.tlb.types.Message;
import org.ton.java.utils.Utils;
@@ -528,4 +534,24 @@ public void testSendMessagesChainCustomContractOnEmulatorFunc() {
currentSeqno = blockchain.runGetSeqNo();
System.out.printf("returned seqno %s\n", currentSeqno);
}
+
+ @Test
+ public void testShouldDeserializeBlock3() {
+ Cell c =
+ CellBuilder.beginCell()
+ .fromBoc(
+ "b5ee9c72e102c101001e7900001c00c200dc01b2024802e4031803340388039803ea0440045204a804ba0512056205ca063206480662069c06e80704072007c607e2088808f409960a180a920ade0b580ba60c200c3a0cde0d200d820d9e0e0e0e880f020f4f101610c610d011481200121e123c12e2130013a6141414b6153a15d71623166f16e81735178017cd1846189318ea190e198819d51a251a711a821a8e1aa01aee1b3c1b4e1b9c1bea1c441c901ca41cf21d461d501d5d1d691dbc1e0a1e171e261e391e861ed21edc1ee91ef81f021fae1fb8205820a8214a2154215e21e4229e2324233223d4248e2495251b252825ca268b2694271b273e274627a828482852285c28e2299d29a42a2a2a422ae02aea2af42b7a2b842b8e2c492c502cd62ce42cee2cf82d002d082d102dc12e512f012fbb2fc230483060311f31be3279328033063314331e332833303338334033f13481353135d336393643366636703762376a3774377e378b3845384c38d238ea399b3a3c3a9d3aa93b633b6a3bf03c0a3cb53cbf3cd83cf2041011ef55aaffffff110102030401a09bc7a987000000000001000000010000000000ffffffff000000000000000065a57c5f00000000000f424000000000000f424cf530ba43000000000000000100000000c400000004000000000000002e050211b8e48dfb465ec8780406071a8af25bc2df9aae9c490d507c11f4d756cb8dc51a86d9efa94e3dae27283ba149ce0009045052419cde96601f375f5ff37f0c0958d99d696a6b31a075787a22769006e057724ab9590a228d7373ef8d28544bea428d454ad789b07c24ceb3fc7a07c32c5900140014111204894a33f6fd789a0f4a1d0352df0638d90269bafa60236a1c793ec9cf4236b6bac9cf6e20a0d9576093fecf8a711917790021c5ceae28344e301649c28a1cdd9dab8c4e62f1c008090a0b00980000000000000000000000005052419cde96601f375f5ff37f0c0958d99d696a6b31a075787a22769006e0575ab4d36de07ce24d78ddc0c37a776ebea7728d08bc5d720cf7ab662a4ffb23e0012d84563886eda33f200422b1c437989ce3804081b6b0b008be01150232a9f88011954fc40018be11097e7962208ebbff6bf2885d99ad2bbab54de961312de7847b8fa3b400a6f8c31d00089b2dcef020490109a06dac2c020c110716d4b19170a07e8775c50a0af5461c5b87fcc5878ff7d437f310933958a9d808000d9996e512621307f2514b5db2c0d8cab0bd8cbd51e3e6c7304b65a1b7c0222dcfa33339c5a7ea640007cca56004a9aaab02091036d616010d0e12090c349ad122ad99ef25e8b7753cd0015b5dbedec46ca98e6b567455a9ef0408f90008101efe9201525302091017d784010f10120bf43cb4609d2e5902366b629cd8c02278e730f5a4e5a40b1ac7b303de9c7dc5e700074405f5e10040595a120341a1ee8154366921e3340d1007d7ed026f32a2d60dd4d48af490b856ce5581c0000750405e5f245b9023afe2ffffff1100ffffffff0000000000000000000000000000000065a57c180000000000000000ffffffff6013141516245b9023afe2ffffff1100ffffffff0000000000000000000000010000000065a57c5f00000000000f424c00000001602425262700110000000000000000102113821158e21bb68cfc80101721330000000000000000000000000000000084563886eda33f2000282c284801019fffb8e8af80f298cefbc832633b545151ef8eb59eb427e724054e1cab56efbf000f221340422b1c4376d19f9002181922130108ac710d90c501c0081a1b219fbf955555555555555555555555555555555555555555555555555555555555555502812a05f200000000000000000000000000000000000000000000000000000000000000000000000000000000002023221460108ac710d4643854001c1d219fbf66666666666666666666666666666666666666666666666666666666666666660502540be4000000000000000000000000000000000000000000000000000000000000000000000000000000000040212165df40845638869f68160000000000000000000000000000000000000000000000000000000000000000000000000000000000041e219bbe8f64c6afbff3dd10d8ba6707790ac9670d540f37a9448b0337baa6a5a92acac021dcd65000000000000000000000000000000000000000000000000000000000000000000000000000000000021f2377cff0000000000000000000000000000000000000000000000000000000000000000212819f400000000000000000000000021158e21a7da0580013c03a3b3c236fcff04f64c6afbff3dd10d8ba6707790ac9670d540f37a9448b0337baa6a5a92acac21881f4800000000000000000000000010ee6b28017f03e2040004811ef55aa00000000000000000000000000000000000000000000000000000000000000002271cff33333333333333333333333333333333333333333333333333333333333333332cc9ba500000000000000000000000001409502f90016d042220049000000000000000000000000000000000000000000000000000000000000000000000000012271cff555555555555555555555555555555555555555555555555555555555555555533a973dc0000000000000000000000001409502f90015d046470211800000000007a124d028293213f67853e1526776d1b23d485fb81f769071332488bcf051b56df075d6bd5b592a1ade8ffd445f48e56ad87fb9c35eaae2697c251894e22a4bf2929bf7b675646300130007821158e21bcc4e71c03032be22390000000000000000000000000000000184563886f3139c7009cc4b4028be2c2455cc26aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaac22b1c4379fc3f1806a9482dbe0213e2000000000000f424982a2b006bb0400000000000000000000000800000000007a1234909ba9b6b469399f9e52775ebeb6c4de942610ad6cc27bdac50ef7fd984a6dbc00173a7e00000000000000020847cbb01de39c3308edf1091131c7dedb780ca3e34d85bdc1a6ab4df16d79e800000000003d092400000000003d092605b0173a7ffffffffffffffffd64515aa043f53a3f60eaf663295c8a035537a617a3cc21f5e94859356c021f6400000000003d092c00000000003d092e058284801018036bd5aa65bd160ccc4f204a44731afdb62bab1ab21c9496af2fc1b4d226ccd000302bf0001f530ba430000000060000000000000000800000000000000000000000282920ce6f4b300f9bafaff9bf8604ac6cceb4b53598d03abc3d113b4803702bad5a69b6f03e7126bc6ee061bd3bb75f53b946845e2eb9067bd5b31527fd91f00be2e2f00abd040000000000000002000000000000000000000000a0a48339bd2cc03e6ebebfe6fe1812b1b33ad2d4d66340eaf0f444ed200dc0aeb569a6dbc0f9c49af1bb8186f4eedd7d4ee51a1178bae419ef56cc549ff647c1002012030310073dfe8cb4af8be0000000000000002000000020000000000000002000000000000000000000000000000000000000000000000000000000000000100b3bfecabb049ff67c5388c8bbc8010e2e757141a27180b24e1450e6eced5c6273178a32d2be2f800000000000000080000000800000000000000080000000000000000000000000000000000000000000000000000000000000004231340422b1c437989ce38063334be23130108ac710d9ba5bc60183536be219fbf955555555555555555555555555555555555555555555555555555555555555502812a05f200393159c085ce242a1fe7dc6f3b4ef0cfbf54eef7ad3f40de588995b86f9c2f46400000000003d0922045231460108ac710d4479c1c013738be219fbf66666666666666666666666666666666666666666666666666666666666666660502b95fd5003794d7a89bf0b1b83d2e445fab3781b81d7584baecb59bebf56b2e2f1fb798f3800000000007a12140412265df40845638869fc774100fb887249507b17fc5674e8ad1ae8058eddc490c24e8c0138896214d64c0a4637800000000007a121cbe39219bbe8f64c6afbff3dd10d8ba6707790ac9670d540f37a9448b0337baa6a5a92acac0213ab668031a93e8c798b2cb3e2acc80b1abde06ed7b06270a03fe422373e797c88470ea8c00000000003d09223d2477cff000000000000000000000000000000000000000000000000000000000000000021881c9400000000000000000003d09121158e21a7f1dd04033c0be3a3b3c0098ff0020dd2082014c97ba9730ed44d0d70b1fe0a4f260810200d71820d70b1fed44d0d31fd3ffd15112baf2a122f901541044f910f2a2f80001d31f31d307d4d101fb00a4c8cb1fcbffc9ed5400480000000045f1e3dc29d6bf453889c449069a2458b2d56701fc3661d498162f743e5ba621284801012d8973441aaae38b20c3fda9274f0a97de1447af2ecd7e424267fcca9901866b0003236fcff04f64c6afbff3dd10d8ba6707790ac9670d540f37a9448b0337baa6a5a92acac21881f4800000000000000000003d093109d5b34017f03e3f402848010145910e27fe37d8dcf1fac777ebb3bda38ae1ea8389f81bfb1bc0079f3f67ef5b0002004811ef55ac000000000000000000000000000000000000000000000000000000000000000028480101986c49971b96062e1fba4410e27249c8d73b0a9380f7ffd44640167e68b215e800032271cff33333333333333333333333333333333333333333333333333333333333333332ce9bcbc00000000000000000003d090d40ae57f54016d0424328480101febfd56fa7c2a5010aea13c738df0c2155d6670e8b055dd312d2372f38f7701b000e015188caa7e20000000000000000000000000000000000000000000000000000000000000000000000000144001f65a5823b65a57fe3609184e72a0000102271cff555555555555555555555555555555555555555555555555555555555555555533a973dc00000000000000000003d0925409502f90015d046472848010160d01ddc9d54e89cf8040b78fab3258c9327109018e4078f7f5c7ff0ba401aa2000c21490000000013311def76051bbabfb248bd9a90d300716f598ffe8f8b65c8fddd8501b0e8c6404828480101aa559cb80ee5ce3f4b1e6107ec3ea424c2b89946804aad09f246e96353cc15c5000e02090d96e778104a4b020300104c4d02090d96e778104e4f0246bfad8011dbd0ddd5549e65b1288c858e77dc3e0a5ba9eae0d756ca2e8b5731753e0030b8b90246bf919848778310ed687087000647581469374dff5e9f0fb1cf744809c5016e12fb0030577502094365b9de0450510246bfa9346e9464c7f146a6be4225b1c98e29a59561fbb67319922eda6acc69f6b9130030617f0245bf2ac017c203ca0d9d008bf543c1364eebf27183668cf1e8b1e0e98af56b2dc1dc00c2b0b10251bf084dd4db5a349ccfcf293baf5f5b626f4a130856b6613ded62877bfecc2536dcd96e7780cd96e77a5d950244bfaeffebddf2ee4f04633ee2bbba628ae4e08b6e0043d11727286b0df248a2e177009389020b6501efe9201054550343beccc243bc18876b43843800323ac0a349ba6ffaf4f87d8e7ba2404e280b7097d814578956024bbec8a2b54087ea747ec1d5ecc652b91406aa6f4c2f479843ebd290b26ad8043eca03dfd2400c589b02016157750106460600940106460600a6024bbf0847cbb01de39c3308edf1091131c7dedb780ca3e34d85bdc1a6ab4df16d79e9017d7840065b9b0343bf084dd4db5a349ccfcf293baf5f5b626f4a130856b6613ded62877bfecc2536dc0a5d755c0106460600a4020766cb73bd5d95010c46060365b9de990343bf24d1ba51931fc51a9af90896c72638a6965587eed9cc6648bb69ab31a7dae44c0a6189600243bf17c9d39d78e8498a560800ddfb11dc48be1bc0edc2fbf90844eceb5ab464961002a59b020161617f01064606009202070ccb72896364020101656602a4bffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff79996e5117ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbe8000000000001e848a665b944757702010167680297bf955555555555555555555555555555555555555555555555555555555555555502aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaad0000000000003d0920170721203c3c94d7ae89f0cd6db6fe18c55144a27722be36ffd9c9fffd3a729dc3c93d176000960107a7b0397bf66666666666666666666666666666666666666666666666666666666666666660533333333333333333333333333333333333333333333333333333333333333339f000000000007a12008696a6b010350406c01034040b1008272b594683d1b0f1242a1ace8917e2a0c0ee1f0307ce39646065f5038d58ca23ff7d855aea1ede2adcff55d3d37fcf59c03bd19c39f843a14faef85cad3980cf69203af7333333333333333333333333333333333333333333333333333333333333333300000000000f42410000000000000000000000000000000000000000000000000000000000000000000000000000000065a57c5f0001408716d6e008272b594683d1b0f1242a1ace8917e2a0c0ee1f0307ce39646065f5038d58ca23ff79304b9982993165dc7b4b2ccfc64c61bf6455afe7e4fe1233d5f827261360d8e02052030246fb7009e439e2e625a000000000000000000750000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003af7555555555555555555555555555555555555555555555555555555555555555500000000000f42480000000000000000000000000000000000000000000000000000000000000000000000000000000065a57c5f0001408717273000120008272ae405edf07a33e732225cf9180254cdfea049b9a29cd37e66747b23925b587dedaabd972671678ffefceb6d77eea0619da90081beed6cceee9180f03acf71a9c020530302474b7009e41106e625a0000000000000000002e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003b57ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffef00000000000f42450000000000000000000000000000000000000000000000000000000000000000000000000000000065a57c5f0003e665b94487677780201e0947900827290aec8965afabb16ebc3cb9b408ebae71b618d78788bc80d09843593cac98da490aec8965afabb16ebc3cb9b408ebae71b618d78788bc80d09843593cac98da4001f040901efe92001c0332dca2365b9de400101df990358df40500000000000000000000000000000000000000000000000000000000000000009f000000000007a12007c7d7e0395be8f64c6afbff3dd10d8ba6707790ac9670d540f37a9448b0337baa6a5a92acac02827b26357dff9ee886c5d3383bc8564b386aa079bd4a245819bdd5352d4956564f000000000003d090184858601035040b9010350407f0082725828aa96d32f676df2049228847cc42b15b0a52d9ffa3bc66b36fcedeff20af9606c97d0dc8b63016a6afd67b2fe52cd0e02a3dcdf71f331cf1e8006ca8e51a303af7000000000000000000000000000000000000000000000000000000000000000000000000000f42439440e0c397a3b2ee3cbd81ea78021862f892a5a9e779d1fecd55236d6571eb5200000000000f424165a57c5f00014088081820101a092008272310a1de222ce584cb4e86613b11d31616e9eaa4ff9ee499f19b104cf71eb504f606c97d0dc8b63016a6afd67b2fe52cd0e02a3dcdf71f331cf1e8006ca8e51a3020f0409017d7840181183b7009a27c89c400000000000000000030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002010187880103d8209b008272f1f67337526ee9890e137d5255f3150400e63d15dfe04b26653d275f2d0a6b04d4d2e789fd57af824d33228887af40bcfb492aebe39ec74d665726b6471454ab01036410890103f0209503af704f64c6afbff3dd10d8ba6707790ac9670d540f37a9448b0337baa6a5a92acac00000000000f42410000000000000000000000000000000000000000000000000000000000000000000000000000000065a57c5f00074088a8b8c0101608d008272f1f67337526ee9890e137d5255f3150400e63d15dfe04b26653d275f2d0a6b04bf8229e6e684701825a6f8e1fb0f8155aba759d58b82e73b8405092874e23fa80205203024a7a80201db8e8f020120909101014894010120920101209300ab29fe09ec98d5f7fe7ba21b174ce0ef21592ce1aa81e6f528916066f754d4b52559593fc0000000000000000000000000000000000000000000000000000000000000001017d784000000000000001e8484cb4af8be40008be7f827b26357dff9ee886c5d3383bc8564b386aa079bd4a245819bdd5352d495656240e8cae6e880eb79a200000000000f424365a57c5f00012195b1b1bcb081ddbdc9b1908600ab29fe09ec98d5f7fe7ba21b174ce0ef21592ce1aa81e6f528916066f754d4b52559593ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbd01efe92000000000000001e8488cb4af8be4003af704f64c6afbff3dd10d8ba6707790ac9670d540f37a9448b0337baa6a5a92acac00000000000f4247d59d160ea9c63d10edae2c76ada993f982915bc75f7bcc0fb81280820d15523200000000000f424165a57c5f00014089697980101a099008272bf8229e6e684701825a6f8e1fb0f8155aba759d58b82e73b8405092874e23fa816617de1e9f3a79e4c7d8a3a51ac0c8b54b6bbcd4f824c9f800aa2f36fee2672020f0c0901c9c38018119ab700b959ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdf3fc13d931abeffcf744362e99c1de42b259c35503cdea5122c0cdeea9a96a4ab2b101c9c380006cb73bc00000000001e848ccb4af8be7fffffffc0009c402468bb800000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003af704f64c6afbff3dd10d8ba6707790ac9670d540f37a9448b0337baa6a5a92acac00000000000f424873b47eb527e2e6b9a73405d88f31477703ef31e5c4f2b8a2be754d66be0d60ff00000000000f424765a57c5f00074089c9d9e0101609f00827216617de1e9f3a79e4c7d8a3a51ac0c8b54b6bbcd4f824c9f800aa2f36fee2672d4d2e789fd57af824d33228887af40bcfb492aebe39ec74d665726b6471454ab0205303024a7a80201dba0a1020120a2a3010148a6010120a4010120a500ab29fe09ec98d5f7fe7ba21b174ce0ef21592ce1aa81e6f528916066f754d4b52559593fc0000000000000000000000000000000000000000000000000000000000000001017d784000000000000001e8492cb4af8be40008be7f827b26357dff9ee886c5d3383bc8564b386aa079bd4a245819bdd5352d495656240e8cae6e880eb79a200000000000f424a65a57c5f00012195b1b1bcb081ddbdc9b1908600ab29fe09ec98d5f7fe7ba21b174ce0ef21592ce1aa81e6f528916066f754d4b52559593ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbd01efe92000000000000001e8496cb4af8be40009e42664e625a00000000000000000030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000061c000000000000600000000000719ae84f17b8f8b22026a975ff55f1ab19fde4a768744d2178dfa63bb533e107a40d03c040103d040ac001fb0000000004000000000000000000004020170aeaf01eb50000000000000000800000000000000000000000000000005a2f25be03d373e41b62e16fb0d999a97235b40ea71f1522a5fa982a817ea60fd265bcbc973e584eb1eab6b3ea65309a0a32cec006e1bee4f781214122612c4d000000000040000000000000007fffffff800000004cb4af986000000c9ad00030020020161b0b1020161b8b90106460600b503af7333333333333333333333333333333333333333333333333333333333333333300000000000f4242cac3c5723cb68f5f7dba257e7f812140298ea360bdbf630cd33c8da2b098829200000000000f424165a57c5f0001408b2b3b40101a0b50082729304b9982993165dc7b4b2ccfc64c61bf6455afe7e4fe1233d5f827261360d8ed855aea1ede2adcff55d3d37fcf59c03bd19c39f843a14faef85cad3980cf692020f04091954fc401811b6b700ab69fe00000000000000000000000000000000000000000000000000000000000000013fccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccd1954fc4000000000000001e8480cb4af8be40009e41778c0a604000000000000000003e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005bc00000000000000000000000012d452da449e50b8cf7dd27861f146122afe1b546bb8b70fc8216f0c614139f8e040106460600bd03af7000000000000000000000000000000000000000000000000000000000000000000000000000f42410000000000000000000000000000000000000000000000000000000000000000000000000000000065a57c5f0001408babbbc0101a0bd0082725828aa96d32f676df2049228847cc42b15b0a52d9ffa3bc66b36fcedeff20af9310a1de222ce584cb4e86613b11d31616e9eaa4ff9ee499f19b104cf71eb504f0113040829a40cd41efffe02be01a369fe00000000000000000000000000000000000000000000000000000000000000013fc000000000000000000000000000000000000000000000000000000000000000020000000000001e8480cb4af8be40be020120bfc00015be000003bcb3670dc155500015bfffffffbcbd1a94a2001051df4184")
+ .endCell();
+ log.info("CellType {}", c.getCellType());
+ Block block = Block.deserialize(CellSlice.beginParse(c));
+ log.info(
+ "inMsg {}, outMsg {}, account blocks {}, block {}",
+ block.getExtra().getInMsgDesc().getCount(),
+ block.getExtra().getOutMsgDesc().getCount(),
+ block.getExtra().getShardAccountBlocks().elements.size(),
+ block);
+
+ BlockPrintInfo.printAllTransactions(block);
+ BlockPrintInfo.printAllMessages(block);
+ }
}
diff --git a/cell/src/main/java/org/ton/java/tlb/types/Block.java b/cell/src/main/java/org/ton/java/tlb/types/Block.java
index 3476802c..0c140c85 100644
--- a/cell/src/main/java/org/ton/java/tlb/types/Block.java
+++ b/cell/src/main/java/org/ton/java/tlb/types/Block.java
@@ -102,40 +102,4 @@ public List getAllTransactions() {
}
return result;
}
-
- public void printAllTransactions() {
- List txs = getAllTransactions();
- if (txs.isEmpty()) {
- log.info("No transactions");
- return;
- }
- Transaction.printTxHeader("");
- for (Transaction tx : txs) {
- tx.printTransactionInfo();
- }
- Transaction.printTxFooter();
- }
-
- public List getAllMessageFees() {
- List txs = getAllTransactions();
- List msgFees = new ArrayList<>();
- for (Transaction tx : txs) {
- msgFees.addAll(tx.getAllMessagePrintInfo());
- }
-
- return msgFees;
- }
-
- public void printAllMessages() {
- List msgFees = getAllMessageFees();
- if (msgFees.isEmpty()) {
- log.info("No messages");
- return;
- }
- MessagePrintInfo.printMessageInfoHeader();
- for (MessagePrintInfo msgFee : msgFees) {
- msgFee.printMessageInfo();
- }
- MessagePrintInfo.printMessageInfoFooter();
- }
}
diff --git a/cell/src/main/java/org/ton/java/tlb/types/Transaction.java b/cell/src/main/java/org/ton/java/tlb/types/Transaction.java
index 5884d7cb..f7a2561e 100644
--- a/cell/src/main/java/org/ton/java/tlb/types/Transaction.java
+++ b/cell/src/main/java/org/ton/java/tlb/types/Transaction.java
@@ -8,13 +8,9 @@
import org.ton.java.cell.CellBuilder;
import org.ton.java.cell.CellSlice;
import org.ton.java.cell.TonHashMapE;
-import org.ton.java.utils.Utils;
import java.math.BigInteger;
-import java.util.ArrayList;
-import java.util.List;
-import static java.util.Objects.isNull;
import static java.util.Objects.nonNull;
/**
@@ -62,13 +58,7 @@ private String getMagic() {
return Long.toBinaryString(magic);
}
- private static String txHeaderInfoWithBlockTop = "| | Storage Phase | Compute Phase | Action Phase | |";
- private static String txHeaderInfoWithBlock = "| txHash | timestamp | lt | op | type | valueIn | valueOut | totalFees | fees | dueFees | success | gasFees | vmSteps | exitCode | success | fordwardFees | actionFees | actions | exitCode | account | block |";
-
- private static String txHeaderInfoWithoutBlockTop = "| | Storage Phase | Compute Phase | Action Phase | | ";
- private static String txHeaderInfoWithoutBlock = "| txHash | timestamp | lt | op | type | valueIn | valueOut | totalFees | fees | dueFees | success | gasFees | vmSteps | exitCode | success | fordwardFees | actionFees | actions | exitCode | account |";
-
- private String getAccountAddrShort() {
+ public String getAccountAddrShort() {
if (nonNull(accountAddr)) {
String str64 = StringUtils.leftPad(accountAddr.toString(16), 64, "0");
return str64.substring(0, 5)
@@ -178,619 +168,4 @@ public static AccountStates deserializeAccountState(byte state) {
}
return null;
}
-
- public TransactionPrintInfo getTransactionPrintInfo() {
- Transaction tx = this;
-
- BigInteger totalFees = tx.getTotalFees().getCoins();
-
- StoragePhase storagePhase = tx.getStoragePhase(tx.getDescription());
- ComputePhaseVM computePhase = tx.getComputePhaseVm(tx.getDescription());
- ActionPhase actionPhase = tx.getActionPhase(tx.getDescription());
-
- BigInteger storageFeesCollected = nonNull(storagePhase) ? storagePhase.getStorageFeesCollected() : null;
- BigInteger storageDueFees = nonNull(storagePhase) ? storagePhase.getStorageFeesDue() : null;
- String storageStatus = nonNull(storagePhase) ? storagePhase.getStatusChange().getType() : "N/A";
-
- BigInteger computeGasFees = nonNull(computePhase) ? computePhase.getGasFees() : null;
- long computeVmSteps = nonNull(computePhase) ? computePhase.getDetails().getVMSteps() : 0;
- String computeSuccess = nonNull(computePhase) ? computePhase.isSuccess() ? "yes" : "no" :
- nonNull(tx.getComputePhaseSkipReason(tx.getDescription())) ? "skipped" : "N/A";
-
- BigInteger actionTotalFwdFees = nonNull(actionPhase) ? actionPhase.getTotalFwdFees() : null;
- BigInteger actionTotalActionFees = nonNull(actionPhase) ? actionPhase.getTotalActionFees() : null;
- String actionSuccess = nonNull(actionPhase) ? actionPhase.isSuccess() ? "yes" : "no" : "N/A";
- long actionResultCode = nonNull(actionPhase) ? actionPhase.getResultCode() : 0;
-
- BigInteger inForwardFees = BigInteger.ZERO;
- BigInteger valueIn = BigInteger.ZERO;
- BigInteger valueOut = BigInteger.ZERO;
- BigInteger op = null;
- long exitCode = getExitCode(tx.getDescription());
- long actionCode = getActionCode(tx.getDescription());
- long totalActions = getTotalActions(tx.getDescription());
- long now = tx.getNow();
- BigInteger lt = tx.getLt();
- long outMsgs = tx.getOutMsgCount();
- String hash = "not available";
-
- if (nonNull(tx.getInOut())) {
- Message inMsg = tx.getInOut().getIn();
- if (nonNull(inMsg)) {
- Cell body = inMsg.getBody();
- hash = "todome";
-
- if (nonNull(body) && body.getBits().getUsedBits() >= 32) {
- op = CellSlice.beginParse(body).preloadInt(32);
- } else {
- op = BigInteger.ONE.negate();
- }
-
- if (inMsg.getInfo() instanceof InternalMessageInfo) {
- valueIn = ((InternalMessageInfo) inMsg.getInfo()).getValue().getCoins();
- inForwardFees = ((InternalMessageInfo) inMsg.getInfo()).getFwdFee();
- }
- }
-
- for (Message outMsg : tx.getInOut().getOutMessages()) {
- if (outMsg.getInfo() instanceof InternalMessageInfo) {
- InternalMessageInfo intMsgInfo = (InternalMessageInfo) outMsg.getInfo();
- valueOut = valueOut.add(intMsgInfo.getValue().getCoins());
- }
- }
- }
-
- return TransactionPrintInfo.builder()
- .hash(hash)
- .now(now)
- .op(
- (isNull(op))
- ? "N/A"
- : (op.compareTo(BigInteger.ONE.negate()) != 0) ? op.toString(16) : "no body")
- .type(
- nonNull(tx.getDescription())
- ? tx.getDescription().getClass().getSimpleName().substring(22)
- : "")
- .valueIn(valueIn)
- .valueOut(valueOut)
- .totalFees(totalFees)
- .storageFeesCollected(storageFeesCollected)
- .storageDueFees(storageDueFees)
- .storageStatus(storageStatus)
- .computeSuccess(computeSuccess)
- .computeGasFees(computeGasFees)
- .computeVmSteps(computeVmSteps)
- .actionSuccess(actionSuccess)
- .actionTotalFwdFees(actionTotalFwdFees)
- .actionTotalActionFees(actionTotalActionFees)
- .actionTotalActions(totalActions)
- .actionResultCode(actionResultCode)
- .inForwardFee(inForwardFees)
- .exitCode(exitCode)
- .actionCode(actionCode)
- .lt(lt)
- .account(nonNull(tx.getAccountAddr()) ? tx.getAccountAddrShort() : "")
- .build();
- }
-
- private StoragePhase getStoragePhase(TransactionDescription txDesc) {
- if (txDesc instanceof TransactionDescriptionOrdinary) {
- return ((TransactionDescriptionOrdinary) txDesc).getStoragePhase();
- } else if (txDesc instanceof TransactionDescriptionStorage) {
- return ((TransactionDescriptionStorage) txDesc).getStoragePhase();
- } else if (txDesc instanceof TransactionDescriptionSplitPrepare) {
- return ((TransactionDescriptionSplitPrepare) txDesc).getStoragePhase();
- } else if (txDesc instanceof TransactionDescriptionTickTock) {
- return ((TransactionDescriptionTickTock) txDesc).getStoragePhase();
- } else if (txDesc instanceof TransactionDescriptionMergeInstall) {
- return ((TransactionDescriptionMergeInstall) txDesc).getStoragePhase();
- } else if (txDesc instanceof TransactionDescriptionMergePrepare) {
- return ((TransactionDescriptionMergePrepare) txDesc).getStoragePhase();
- }
- return null;
- }
-
-
- private ComputePhaseVM getComputePhaseVm(TransactionDescription txDesc) {
- if (txDesc instanceof TransactionDescriptionOrdinary) {
- ComputePhase computePhase = ((TransactionDescriptionOrdinary) txDesc).getComputePhase();
- if (computePhase instanceof ComputePhaseVM) {
- return ((ComputePhaseVM) computePhase);
- }
-
- } else if (txDesc instanceof TransactionDescriptionSplitPrepare) {
- ComputePhase computePhase = ((TransactionDescriptionSplitPrepare) txDesc).getComputePhase();
- if (computePhase instanceof ComputePhaseVM) {
- return ((ComputePhaseVM) computePhase);
- }
- } else if (txDesc instanceof TransactionDescriptionTickTock) {
- ComputePhase computePhase = ((TransactionDescriptionTickTock) txDesc).getComputePhase();
- if (computePhase instanceof ComputePhaseVM) {
- return ((ComputePhaseVM) computePhase);
- }
- } else if (txDesc instanceof TransactionDescriptionMergeInstall) {
- ComputePhase computePhase = ((TransactionDescriptionMergeInstall) txDesc).getComputePhase();
- if (computePhase instanceof ComputePhaseVM) {
- return ((ComputePhaseVM) computePhase);
- }
- }
- return null;
- }
-
- private ComputeSkipReason getComputePhaseSkipReason(TransactionDescription txDesc) {
- if (txDesc instanceof TransactionDescriptionOrdinary) {
- ComputePhase computePhase = ((TransactionDescriptionOrdinary) txDesc).getComputePhase();
- if (computePhase instanceof ComputeSkipReason) {
- return ((ComputeSkipReason) computePhase);
- }
-
- } else if (txDesc instanceof TransactionDescriptionSplitPrepare) {
- ComputePhase computePhase = ((TransactionDescriptionSplitPrepare) txDesc).getComputePhase();
- if (computePhase instanceof ComputeSkipReason) {
- return ((ComputeSkipReason) computePhase);
- }
- } else if (txDesc instanceof TransactionDescriptionTickTock) {
- ComputePhase computePhase = ((TransactionDescriptionTickTock) txDesc).getComputePhase();
- if (computePhase instanceof ComputeSkipReason) {
- return ((ComputeSkipReason) computePhase);
- }
- } else if (txDesc instanceof TransactionDescriptionMergeInstall) {
- ComputePhase computePhase = ((TransactionDescriptionMergeInstall) txDesc).getComputePhase();
- if (computePhase instanceof ComputeSkipReason) {
- return ((ComputeSkipReason) computePhase);
- }
- }
- return null;
- }
-
- private ActionPhase getActionPhase(TransactionDescription txDesc) {
- if (txDesc instanceof TransactionDescriptionOrdinary) {
- return ((TransactionDescriptionOrdinary) txDesc).getActionPhase();
- } else if (txDesc instanceof TransactionDescriptionSplitPrepare) {
- return ((TransactionDescriptionSplitPrepare) txDesc).getActionPhase();
- } else if (txDesc instanceof TransactionDescriptionTickTock) {
- return ((TransactionDescriptionTickTock) txDesc).getActionPhase();
- } else if (txDesc instanceof TransactionDescriptionMergeInstall) {
- return ((TransactionDescriptionMergeInstall) txDesc).getActionPhase();
- }
- return null;
- }
-
- private long getTotalActions(TransactionDescription txDesc) {
- if (txDesc instanceof TransactionDescriptionOrdinary) {
- ActionPhase actionPhase = ((TransactionDescriptionOrdinary) txDesc).getActionPhase();
- return isNull(actionPhase) ? 0 : actionPhase.getTotalActions();
- } else if (txDesc instanceof TransactionDescriptionSplitPrepare) {
- ActionPhase actionPhase = ((TransactionDescriptionSplitPrepare) txDesc).getActionPhase();
- return isNull(actionPhase) ? 0 : actionPhase.getTotalActions();
- } else if (txDesc instanceof TransactionDescriptionTickTock) {
- ActionPhase actionPhase = ((TransactionDescriptionTickTock) txDesc).getActionPhase();
- return isNull(actionPhase) ? 0 : actionPhase.getTotalActions();
- } else if (txDesc instanceof TransactionDescriptionMergeInstall) {
- ActionPhase actionPhase = ((TransactionDescriptionMergeInstall) txDesc).getActionPhase();
- return isNull(actionPhase) ? 0 : actionPhase.getTotalActions();
- } else {
- return -1;
- }
- }
-
- private long getActionCode(TransactionDescription txDesc) {
- if (txDesc instanceof TransactionDescriptionOrdinary) {
- ActionPhase actionPhase = ((TransactionDescriptionOrdinary) txDesc).getActionPhase();
- return isNull(actionPhase) ? 0 : actionPhase.getResultCode();
- } else if (txDesc instanceof TransactionDescriptionSplitPrepare) {
- ActionPhase actionPhase = ((TransactionDescriptionSplitPrepare) txDesc).getActionPhase();
- return isNull(actionPhase) ? 0 : actionPhase.getResultCode();
- } else if (txDesc instanceof TransactionDescriptionTickTock) {
- ActionPhase actionPhase = ((TransactionDescriptionTickTock) txDesc).getActionPhase();
- return isNull(actionPhase) ? 0 : actionPhase.getResultCode();
- } else if (txDesc instanceof TransactionDescriptionMergeInstall) {
- ActionPhase actionPhase = ((TransactionDescriptionMergeInstall) txDesc).getActionPhase();
- return isNull(actionPhase) ? 0 : actionPhase.getResultCode();
- } else {
- return -1;
- }
- }
-
- private long getExitCode(TransactionDescription txDesc) {
- if (txDesc instanceof TransactionDescriptionOrdinary) {
- ComputePhase computePhase = ((TransactionDescriptionOrdinary) txDesc).getComputePhase();
- if (computePhase instanceof ComputePhaseVM) {
- return ((ComputePhaseVM) computePhase).getDetails().getExitCode();
- }
- } else if (txDesc instanceof TransactionDescriptionSplitPrepare) {
- ComputePhase computePhase = ((TransactionDescriptionSplitPrepare) txDesc).getComputePhase();
- if (computePhase instanceof ComputePhaseVM) {
- return ((ComputePhaseVM) computePhase).getDetails().getExitCode();
- }
- } else if (txDesc instanceof TransactionDescriptionTickTock) {
- ComputePhase computePhase = ((TransactionDescriptionTickTock) txDesc).getComputePhase();
- if (computePhase instanceof ComputePhaseVM) {
- return ((ComputePhaseVM) computePhase).getDetails().getExitCode();
- }
- } else if (txDesc instanceof TransactionDescriptionMergeInstall) {
- ComputePhase computePhase = ((TransactionDescriptionMergeInstall) txDesc).getComputePhase();
- if (computePhase instanceof ComputePhaseVM) {
- return ((ComputePhaseVM) computePhase).getDetails().getExitCode();
- }
- } else {
- return -1;
- }
- return -1;
- }
-
-
- /**
- * Print txs data without header, footer, balance and block.
- */
-
- public void printTransactionInfo() {
- printTransactionInfo(false, false);
- }
-
- /**
- * Print txs data without header, footer and balance, with block only.
- *
- * @param block String
- */
- public void printTransactionInfo(String block) {
- printTransactionInfo(false, false, "", block);
- }
-
- /**
- * Print txs data.
- *
- * @param withHeader boolean
- * @param withFooter boolean
- * @param balance String
- * @param block String
- */
- public void printTransactionInfo(boolean withHeader, boolean withFooter, String balance, String block) {
- TransactionPrintInfo txFees = getTransactionPrintInfo();
-
- if (withHeader) {
- if (StringUtils.isNotEmpty(balance)) {
- printTxHeader(" (initial balance " + balance + ")");
- } else {
- printTxHeader("");
- }
- }
- printTxData(txFees, block);
-
- if (withFooter) {
- printTxFooter();
- }
- }
-
- public void printTransactionInfo(boolean withHeader, boolean withFooter, String balance) {
- TransactionPrintInfo txFees = getTransactionPrintInfo();
-
- if (withHeader) {
- printTxHeaderWithoutBlock(" (initial balance " + balance + ")");
- }
- printTxData(txFees);
-
- if (withFooter) {
- printTxFooterWithoutBlock();
- }
- }
-
- public void printTransactionInfo(boolean withHeader, boolean withFooter) {
- TransactionPrintInfo txFees = getTransactionPrintInfo();
-
- if (withHeader) {
- printTxHeaderWithoutBlock("");
- }
- printTxData(txFees);
-
- if (withFooter) {
- printTxFooterWithoutBlock();
- }
- }
-
- private BigInteger getOperationFromBody(Cell body) {
- if (nonNull(body) && body.getBits().getUsedBits() >= 32) {
- return CellSlice.beginParse(body).preloadInt(32);
- } else {
- return BigInteger.ONE.negate();
- }
- }
-
- private String getCommentFromBody(Cell body) {
- try {
- if (nonNull(body) && body.getBits().getUsedBits() >= 32) {
- String comment = CellSlice.beginParse(body).skipBits(32).loadSnakeString();
- if ((StringUtils.contains(comment, '\0')) || (StringUtils.contains(comment, '\1'))
- || (StringUtils.contains(comment, '\2')) || (StringUtils.contains(comment, '\3'))
- || (StringUtils.contains(comment, '\uFFFD'))) {
- return "";
- } else {
- if (comment.length() > 26) {
- return comment.substring(0, 26);
- } else {
- return comment;
- }
- }
- } else {
- return "";
- }
- } catch (Exception e) {
- return "error";
- }
- }
-
- public List getAllMessagePrintInfo() {
- List messagePrintInfo = new ArrayList<>();
- Transaction tx = this;
-
- BigInteger op;
- String comment;
-
- if (nonNull(tx.getInOut())) {
-
- Message inMsg = tx.getInOut().getIn();
- if (nonNull(inMsg)) {
- Cell body = inMsg.getBody();
-
- op = getOperationFromBody(body);
- comment = getCommentFromBody(body);
-
- if (inMsg.getInfo() instanceof InternalMessageInfo) {
- InternalMessageInfo msgInfo = ((InternalMessageInfo) inMsg.getInfo());
- MessagePrintInfo msgPrintInfo =
- MessagePrintInfo.builder()
- .direction("in")
- .type(formatMsgType(inMsg.getInfo().getClass().getSimpleName()))
- .op(
- (isNull(op))
- ? "N/A"
- : (op.compareTo(BigInteger.ONE.negate()) != 0)
- ? op.toString(16)
- : "no body")
- .value(msgInfo.getValue().getCoins())
- .fwdFee(msgInfo.getFwdFee())
- .ihrFee(msgInfo.getIHRFee())
- .createdLt(msgInfo.getCreatedLt())
- .createdAt(BigInteger.valueOf(msgInfo.getCreatedAt()))
- .src(msgInfo.getSrcAddr().toAddress().toRaw())
- .dst(msgInfo.getDstAddr().toAddress().toRaw())
- .comment(comment)
- .build();
- messagePrintInfo.add(msgPrintInfo);
- }
- if (inMsg.getInfo() instanceof ExternalMessageOutInfo) {
- ExternalMessageOutInfo msgInfo = ((ExternalMessageOutInfo) inMsg.getInfo());
- MessagePrintInfo msgPrintInfo =
- MessagePrintInfo.builder()
- .direction("in")
- .type(formatMsgType(inMsg.getInfo().getClass().getSimpleName()))
- .op(
- (isNull(op))
- ? "N/A"
- : (op.compareTo(BigInteger.ONE.negate()) != 0)
- ? op.toString(16)
- : "no body")
- .createdLt(msgInfo.getCreatedLt())
- .createdAt(BigInteger.valueOf(msgInfo.getCreatedAt()))
- .src(msgInfo.getSrcAddr().toAddress().toRaw())
- .dst(msgInfo.getDstAddr().toString())
- .comment(comment)
- .build();
- messagePrintInfo.add(msgPrintInfo);
- }
- if (inMsg.getInfo() instanceof ExternalMessageInInfo) {
- ExternalMessageInInfo msgInfo = ((ExternalMessageInInfo) inMsg.getInfo());
- MessagePrintInfo msgPrintInfo =
- MessagePrintInfo.builder()
- .direction("in")
- .type(formatMsgType(inMsg.getInfo().getClass().getSimpleName()))
- .op(
- (isNull(op))
- ? "N/A"
- : (op.compareTo(BigInteger.ONE.negate()) != 0)
- ? op.toString(16)
- : "no body")
- .importFee(msgInfo.getImportFee())
- .src(msgInfo.getSrcAddr().toString())
- .dst(msgInfo.getDstAddr().toString())
- .comment(comment)
- .build();
- messagePrintInfo.add(msgPrintInfo);
- }
- }
-
- for (Message outMsg : tx.getInOut().getOutMessages()) {
-
- Cell body = outMsg.getBody();
-
- op = getOperationFromBody(body);
- comment = getCommentFromBody(body);
-
- if (outMsg.getInfo() instanceof InternalMessageInfo) {
- InternalMessageInfo intMsgInfo = (InternalMessageInfo) outMsg.getInfo();
-
- MessagePrintInfo msgPrintInfo =
- MessagePrintInfo.builder()
- .direction("out")
- .type(formatMsgType(outMsg.getInfo().getClass().getSimpleName()))
- .op(
- (isNull(op))
- ? "N/A"
- : (op.compareTo(BigInteger.ONE.negate()) != 0)
- ? op.toString(16)
- : "no body")
- .value(intMsgInfo.getValue().getCoins())
- .fwdFee(intMsgInfo.getFwdFee())
- .ihrFee(intMsgInfo.getIHRFee())
- .createdLt(intMsgInfo.getCreatedLt())
- .createdAt(BigInteger.valueOf(intMsgInfo.getCreatedAt()))
- .src(intMsgInfo.getSrcAddr().toAddress().toRaw())
- .dst(intMsgInfo.getDstAddr().toAddress().toRaw())
- .comment(comment)
- .build();
- messagePrintInfo.add(msgPrintInfo);
- }
- if (outMsg.getInfo() instanceof ExternalMessageOutInfo) {
- ExternalMessageOutInfo outMsgInfo = (ExternalMessageOutInfo) outMsg.getInfo();
-
- MessagePrintInfo msgPrintInfo =
- MessagePrintInfo.builder()
- .direction("out")
- .type(formatMsgType(outMsg.getInfo().getClass().getSimpleName()))
- .op(
- (isNull(op))
- ? "N/A"
- : (op.compareTo(BigInteger.ONE.negate()) != 0)
- ? op.toString(16)
- : "no body")
- .createdLt(outMsgInfo.getCreatedLt())
- .createdAt(BigInteger.valueOf(outMsgInfo.getCreatedAt()))
- .src(outMsgInfo.getSrcAddr().toAddress().toRaw())
- .dst(outMsgInfo.getDstAddr().toString())
- .comment(comment)
- .build();
- messagePrintInfo.add(msgPrintInfo);
- }
- if (outMsg.getInfo() instanceof ExternalMessageInInfo) {
- ExternalMessageInInfo outMsgInfo = (ExternalMessageInInfo) outMsg.getInfo();
-
- MessagePrintInfo msgPrintInfo =
- MessagePrintInfo.builder()
- .direction("out")
- .type(formatMsgType(outMsg.getInfo().getClass().getSimpleName()))
- .op(
- (isNull(op))
- ? "N/A"
- : (op.compareTo(BigInteger.ONE.negate()) != 0)
- ? op.toString(16)
- : "no body")
- .importFee(outMsgInfo.getImportFee())
- .src(outMsgInfo.getSrcAddr().toString())
- .dst(outMsgInfo.getDstAddr().toString())
- .comment(comment)
- .build();
- messagePrintInfo.add(msgPrintInfo);
- }
- }
- }
- return messagePrintInfo;
- }
-
- public void printAllMessages(boolean withHeader) {
- printAllMessages(withHeader, false);
- }
-
- public void printAllMessages(boolean withHeader, boolean withFooter) {
- List msgsPrintInfo = getAllMessagePrintInfo();
- if (msgsPrintInfo.isEmpty()) {
- log.info("No messages");
- return;
- }
-
- if (withHeader) {
- MessagePrintInfo.printMessageInfoHeader();
- }
-
- for (MessagePrintInfo msgPrintInfo : msgsPrintInfo) {
- msgPrintInfo.printMessageInfo();
- }
- if (withFooter) {
- MessagePrintInfo.printMessageInfoFooter();
- }
- }
-
- public static void printTxHeader(String balance) {
- log.info("");
- log.info("Transactions" + balance);
-
- log.info(StringUtils.repeat("-", txHeaderInfoWithBlock.length()));
- log.info(txHeaderInfoWithBlockTop);
- log.info(txHeaderInfoWithBlock);
- log.info(StringUtils.repeat("-", txHeaderInfoWithBlock.length()));
- }
-
- public static void printTxHeaderWithoutBlock(String balance) {
- log.info("");
- log.info("Transactions" + balance);
-
- log.info(StringUtils.repeat("-", txHeaderInfoWithoutBlock.length()));
- log.info(txHeaderInfoWithoutBlockTop);
- log.info(txHeaderInfoWithoutBlock);
- log.info(StringUtils.repeat("-", txHeaderInfoWithoutBlock.length()));
- }
-
- public static void printTxFooter() {
- log.info(StringUtils.repeat("-", txHeaderInfoWithBlock.length()));
- }
-
- public static void printTxFooterWithoutBlock() {
- log.info(StringUtils.repeat("-", txHeaderInfoWithoutBlock.length()));
- }
-
- public static void printTxData(TransactionPrintInfo txPrintInfo) {
- String str =
- String.format(
- "| %-8s| %-10s| %-15s| %-10s| %-13s| %-15s| %-15s| %-13s| %-13s| %-14s| %-8s| %-14s| %-8s| %-9s| %-8s| %-13s| %-13s| %-8s| %-9s| %-14s|",
- txPrintInfo.getHash().substring(0, 6),
- Utils.toUTCTimeOnly(txPrintInfo.getNow()),
- txPrintInfo.getLt(),
- txPrintInfo.getOp(),
- txPrintInfo.getType(),
- Utils.formatNanoValueZero(txPrintInfo.getValueIn()),
- Utils.formatNanoValueZero(txPrintInfo.getValueOut()),
- Utils.formatNanoValueZero(txPrintInfo.getTotalFees()),
- Utils.formatNanoValueZero(txPrintInfo.getStorageFeesCollected()),
- Utils.formatNanoValueZero(txPrintInfo.getStorageDueFees()),
-// txPrintInfo.getStorageStatus(),
- txPrintInfo.getComputeSuccess(),
- Utils.formatNanoValueZero(txPrintInfo.getComputeGasFees()),
- txPrintInfo.getComputeVmSteps(),
- Utils.formatNanoValueZero(txPrintInfo.getComputeExitCode()),
- txPrintInfo.getActionSuccess(),
- Utils.formatNanoValueZero(txPrintInfo.getActionTotalFwdFees()),
- Utils.formatNanoValueZero(txPrintInfo.getActionTotalActionFees()),
- txPrintInfo.getActionTotalActions(),
- txPrintInfo.getActionResultCode(),
- txPrintInfo.getAccount());
- log.info(str);
- }
-
- public static void printTxData(TransactionPrintInfo txPrintInfo, String block) {
- String str =
- String.format(
- "| %-8s| %-10s| %-15s| %-10s| %-13s| %-15s| %-15s| %-13s| %-13s| %-14s| %-8s| %-14s| %-8s| %-9s| %-8s| %-13s| %-13s| %-8s| %-9s| %-14s| %-32s|",
- txPrintInfo.getHash().substring(0, 5),
- Utils.toUTCTimeOnly(txPrintInfo.getNow()),
- txPrintInfo.getLt(),
- txPrintInfo.getOp(),
- txPrintInfo.getType(),
- Utils.formatNanoValueZero(txPrintInfo.getValueIn()),
- Utils.formatNanoValueZero(txPrintInfo.getValueOut()),
- Utils.formatNanoValueZero(txPrintInfo.getTotalFees()),
- Utils.formatNanoValueZero(txPrintInfo.getStorageFeesCollected()),
- Utils.formatNanoValueZero(txPrintInfo.getStorageDueFees()),
-// txPrintInfo.getStorageStatus(),
- txPrintInfo.getComputeSuccess(),
- Utils.formatNanoValueZero(txPrintInfo.getComputeGasFees()),
- txPrintInfo.getComputeVmSteps(),
- Utils.formatNanoValueZero(txPrintInfo.getComputeExitCode()),
- txPrintInfo.getActionSuccess(),
- Utils.formatNanoValueZero(txPrintInfo.getActionTotalFwdFees()),
- Utils.formatNanoValueZero(txPrintInfo.getActionTotalActionFees()),
- txPrintInfo.getActionTotalActions(),
- txPrintInfo.getActionResultCode(),
- txPrintInfo.getAccount(),
- StringUtils.isEmpty(block) ? "N/A" : block);
- log.info(str);
- }
-
- private String formatMsgType(String fullMsgType) {
- if (fullMsgType.equals("InternalMessageInfo")) {
- return "internal-in";
- } else if (fullMsgType.equals("ExternalMessageOutInfo")) {
- return "external-out";
- } else {
- return "external-in";
- }
- }
}
diff --git a/cell/src/main/java/org/ton/java/tlb/types/TransactionPrintInfo.java b/cell/src/main/java/org/ton/java/tlb/types/TransactionPrintInfo.java
deleted file mode 100644
index df6ac934..00000000
--- a/cell/src/main/java/org/ton/java/tlb/types/TransactionPrintInfo.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package org.ton.java.tlb.types;
-
-import lombok.Builder;
-import lombok.Data;
-
-import java.math.BigInteger;
-
-@Builder
-@Data
-public class TransactionPrintInfo {
- String hash; // in_msg.hash
- long now;
- String op;
- String type;
- BigInteger valueIn;
- BigInteger valueOut;
-
- BigInteger totalFees;
- BigInteger storageFeesCollected;
- BigInteger storageDueFees;
- String storageStatus;
- String computeSuccess;
- BigInteger computeGasFees;
- BigInteger computeGasUsed;
- long computeVmSteps;
- BigInteger computeExitCode;
- String actionSuccess;
- BigInteger actionTotalFwdFees;
- BigInteger actionTotalActionFees;
- long actionTotalActions;
- long actionResultCode;
- BigInteger inForwardFee;
- BigInteger outForwardFee;
- long exitCode;
- long actionCode;
- long outMsgs;
- BigInteger lt;
- String account;
- BigInteger balance;
- Transaction tx;
-}
diff --git a/cell/src/test/java/org/ton/java/tlb/TestTlbBlockReader.java b/cell/src/test/java/org/ton/java/tlb/TestTlbBlockReader.java
index bf4da0e1..b91ee40e 100644
--- a/cell/src/test/java/org/ton/java/tlb/TestTlbBlockReader.java
+++ b/cell/src/test/java/org/ton/java/tlb/TestTlbBlockReader.java
@@ -1,9 +1,5 @@
package org.ton.java.tlb;
-import static org.assertj.core.api.Assertions.assertThat;
-
-import java.math.BigInteger;
-import java.util.List;
import lombok.extern.slf4j.Slf4j;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -13,154 +9,147 @@
import org.ton.java.cell.CellSlice;
import org.ton.java.tlb.types.*;
+import java.math.BigInteger;
+import java.util.List;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
@Slf4j
@RunWith(JUnit4.class)
public class TestTlbBlockReader {
- @Test
- public void testShouldDeserializeBlockInfo() {
- Cell c =
- CellBuilder.beginCell()
- .fromBoc(
- "b5ee9c724101020100a10001a09bc7a987000000000001000000010000000000ffffffff000000000000000065a57c5f00000000000f424000000000000f424cf530ba43000000000000000100000000c400000004000000000000002e0100980000000000000000000000005052419cde96601f375f5ff37f0c0958d99d696a6b31a075787a22769006e0575ab4d36de07ce24d78ddc0c37a776ebea7728d08bc5d720cf7ab662a4ffb23e02d1bf94f")
- .endCell();
- log.info("CellType {}", c.getCellType());
- BlockInfo blockInfo = BlockInfo.deserialize(CellSlice.beginParse(c));
- log.info("blockInfo {}", blockInfo);
- assertThat(blockInfo.getEndLt()).isEqualTo(1000012);
- assertThat(blockInfo.getGenValidatorListHashShort()).isEqualTo(4113611331L);
- assertThat(blockInfo.getPrevRef().getPrev1().getFileHash())
- .isEqualTo("5ab4d36de07ce24d78ddc0c37a776ebea7728d08bc5d720cf7ab662a4ffb23e0");
- }
-
- @Test
- public void testShouldDeserializeValueFlow() {
- Cell c =
- CellBuilder.beginCell()
- .fromBoc(
- "b5ee9c72410106010054000211b8e48dfb4a0eebb0040105022581fa7454b05a2ea2ac0fd3a2a5d348d2954008020202012004030015bfffffffbcbd0efda563d00015be000003bcb355ab466ad0001d43b9aca00250775d8011954fc40008b63e6951")
- .endCell();
- log.info("CellType {}", c.getCellType());
- ValueFlow valueFlow = ValueFlow.deserialize(CellSlice.beginParse(c));
- log.info("valueFlow {}", valueFlow);
- assertThat(valueFlow.getFeesCollected().getCoins()).isEqualTo(2700000000L);
- assertThat(valueFlow.getRecovered().getCoins()).isEqualTo(2700000000L);
- assertThat(valueFlow.getFeesImported().getCoins()).isEqualTo(1000000000L);
- assertThat(valueFlow.getFromPrevBlk().getCoins())
- .isEqualTo(new BigInteger("2280867924805872170"));
- }
-
- @Test
- public void testShouldDeserializeStateUpdate() {
- Cell c =
- CellBuilder.beginCell()
- .fromBoc(
- "b5ee9c7241024301000be900028a045052419cde96601f375f5ff37f0c0958d99d696a6b31a075787a22769006e057724ab9590a228d7373ef8d28544bea428d454ad789b07c24ceb3fc7a07c32c59001400140301245b9023afe2ffffff1100ffffffff0000000000000000000000010000000065a57c5f00000000000f424c0000000160160224112213821158e21bcc4e71c0300626245b9023afe2ffffff1100ffffffff0000000000000000000000000000000065a57c180000000000000000ffffffff600529041521330000000000000000000000000000000084563886eda33f200028250011000000000000000010231340422b1c437989ce3806090726219fbf955555555555555555555555555555555555555555555555555555555555555502812a05f200393159c085ce242a1fe7dc6f3b4ef0cfbf54eef7ad3f40de588995b86f9c2f46400000000003d09220082271cff555555555555555555555555555555555555555555555555555555555555555533a973dc00000000000000000003d0925409502f90015d02f2d23130108ac710d9ba5bc60180e0a26219fbf66666666666666666666666666666666666666666666666666666666666666660502b95fd5003794d7a89bf0b1b83d2e445fab3781b81d7584baecb59bebf56b2e2f1fb798f3800000000007a121400b2271cff33333333333333333333333333333333333333333333333333333333333333332ce9bcbc00000000000000000003d090d40ae57f54016d0410c015188caa7e2000000000000000000000000000000000000000000000000000000000000000000000000010d001f65a5823b65a57fe3609184e72a000010231460108ac710d4479c1c010f21262265df40845638869fc774100fb887249507b17fc5674e8ad1ae8058eddc490c24e8c0138896214d64c0a4637800000000007a121c26102477cff000000000000000000000000000000000000000000000000000000000000000021881c9400000000000000000003d09121158e21a7f1dd04033c0263c3b3a2455cc26aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaac22b1c4379fc3f1806122e1c260103d0401301eb50000000000000000800000000000000000000000000000005a2f25be03d373e41b62e16fb0d999a97235b40ea71f1522a5fa982a817ea60fd265bcbc973e584eb1eab6b3ea65309a0a32cec006e1bee4f781214122612c4d000000000040000000000000007fffffff800000004cb4af986000000c91400030020284801019fffb8e8af80f298cefbc832633b545151ef8eb59eb427e724054e1cab56efbf000f0211800000000007a124d01817006bb0400000000000000000000000800000000007a1234909ba9b6b469399f9e52775ebeb6c4de942610ad6cc27bdac50ef7fd984a6dbc00213e2000000000000f424983d190173a7ffffffffffffffffd64515aa043f53a3f60eaf663295c8a035537a617a3cc21f5e94859356c021f6400000000003d092c00000000003d092e01a01064606001b00ab29fe09ec98d5f7fe7ba21b174ce0ef21592ce1aa81e6f528916066f754d4b52559593ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbd01efe92000000000000001e8496cb4af8be4002bf0001f530ba430000000060000000000000000800000000000000000000000282920ce6f4b300f9bafaff9bf8604ac6cceb4b53598d03abc3d113b4803702bad5a69b6f03e7126bc6ee061bd3bb75f53b946845e2eb9067bd5b31527fd91f00be201d0201201f1e00b3bfecabb049ff67c5388c8bbc8010e2e757141a27180b24e1450e6eced5c6273178a32d2be2f8000000000000000800000008000000000000000800000000000000000000000000000000000000000000000000000000000000040073dfe8cb4af8be0000000000000002000000020000000000000002000000000000000000000000000000000000000000000000000000000000000100abd040000000000000002000000000000000000000000a0a48339bd2cc03e6ebebfe6fe1812b1b33ad2d4d66340eaf0f444ed200dc0aeb569a6dbc0f9c49af1bb8186f4eedd7d4ee51a1178bae419ef56cc549ff647c10219bbe8f64c6afbff3dd10d8ba6707790ac9670d540f37a9448b0337baa6a5a92acac0213ab668031a93e8c798b2cb3e2acc80b1abde06ed7b06270a03fe422373e797c88470ea8c00000000003d092222236fcff04f64c6afbff3dd10d8ba6707790ac9670d540f37a9448b0337baa6a5a92acac21881f4800000000000000000003d093109d5b34017f0372342004811ef55ac000000000000000000000000000000000000000000000000000000000000000022390000000000000000000000000000000184563886f3139c7009cc4b40282625284801018036bd5aa65bd160ccc4f204a44731afdb62bab1ab21c9496af2fc1b4d226ccd000302012028270015bfffffffbcbd1a94a200100015be000003bcb3670dc155502113821158e21bb68cfc80102a221340422b1c4376d19f9002302b219fbf955555555555555555555555555555555555555555555555555555555555555502812a05f20000000000000000000000000000000000000000000000000000000000000000000000000000000000202c2271cff555555555555555555555555555555555555555555555555555555555555555533a973dc0000000000000000000000001409502f90015d02f2d21490000000013311def76051bbabfb248bd9a90d300716f598ffe8f8b65c8fddd8501b0e8c6402e28480101aa559cb80ee5ce3f4b1e6107ec3ea424c2b89946804aad09f246e96353cc15c5000e2848010160d01ddc9d54e89cf8040b78fab3258c9327109018e4078f7f5c7ff0ba401aa2000c22130108ac710d90c501c0083331219fbf66666666666666666666666666666666666666666666666666666666666666660502540be4000000000000000000000000000000000000000000000000000000000000000000000000000000000040322271cff33333333333333333333333333333333333333333333333333333333333333332cc9ba500000000000000000000000001409502f90016d04140221460108ac710d4643854003834219bbe8f64c6afbff3dd10d8ba6707790ac9670d540f37a9448b0337baa6a5a92acac021dcd650000000000000000000000000000000000000000000000000000000000000000000000000000000000235236fcff04f64c6afbff3dd10d8ba6707790ac9670d540f37a9448b0337baa6a5a92acac21881f4800000000000000000000000010ee6b28017f0373642004811ef55aa00000000000000000000000000000000000000000000000000000000000000002848010145910e27fe37d8dcf1fac777ebb3bda38ae1ea8389f81bfb1bc0079f3f67ef5b00022165df40845638869f6816000000000000000000000000000000000000000000000000000000000000000000000000000000000004392377cff0000000000000000000000000000000000000000000000000000000000000000212819f400000000000000000000000021158e21a7da0580013c03c3b3a284801012d8973441aaae38b20c3fda9274f0a97de1447af2ecd7e424267fcca9901866b000300480000000045f1e3dc29d6bf453889c449069a2458b2d56701fc3661d498162f743e5ba6210098ff0020dd2082014c97ba9730ed44d0d70b1fe0a4f260810200d71820d70b1fed44d0d31fd3ffd15112baf2a122f901541044f910f2a2f80001d31f31d307d4d101fb00a4c8cb1fcbffc9ed540173a7e00000000000000020847cbb01de39c3308edf1091131c7dedb780ca3e34d85bdc1a6ab4df16d79e800000000003d092400000000003d092603e01064606003f00ab29fe09ec98d5f7fe7ba21b174ce0ef21592ce1aa81e6f528916066f754d4b52559593fc0000000000000000000000000000000000000000000000000000000000000001017d784000000000000001e8492cb4af8be4000490000000000000000000000000000000000000000000000000000000000000000000000000128480101febfd56fa7c2a5010aea13c738df0c2155d6670e8b055dd312d2372f38f7701b000e28480101986c49971b96062e1fba4410e27249c8d73b0a9380f7ffd44640167e68b215e80003c9f67164")
- .endCell();
- log.info("CellType {}", c.getCellType());
- MerkleUpdate merkleUpdate = MerkleUpdate.deserialize(CellSlice.beginParse(c));
- log.info("stateUpdate {}", merkleUpdate);
- }
-
- @Test
- public void testLoadBlockMaster() {
- Cell c =
- CellBuilder.beginCell()
- .fromBoc(
- "b5ee9c72e2020152000100002a490000002400cc00ea0180026202fe033003520361037a03940404047404c0056805a8069a06b4075c079c0806087608c30a160a3a0a5e0b0a0b2a0b4a0b6a0b880ba60bc20bde0bfa0c160c320cd80d5c0d800da00dec0e380e580e780e980eb60ed60ef60f160f360f560f76102010a8110e119011ae11cc11ea120612aa132a13761442148f14ae154415621580159e15bc15da15f81616163416521670168e16ac16ca16d816e616f417021710171e172c173a1748175617641772178017cc17da17e817f6180418121820182e187a1888189618a418b218c018ce18dc18ea18f8190619521976199a19e71a921ab21ad21b1f1b6b1b8a1ba81bf51c411c5e1c7a1cc71d131d2e1d4a1d971de31dfe1e4b1e661f0c1f591fdc2029207b20c721122132217f21cb21ea220a22572276229422e12300234d236c238c23d923f82445249124b024fd251c25c62613269a26e7274c279927e5286628b328d0291d293a298729a429f12a3d2a582afc2b492bc82c152c612cad2ccc2cda2d272d442d912dae2dfb2e182e652e822ecf2eec2f392f562fa32fc0300d302a3077309430e130fe314b316831b531d2321f323c325a3308335533a1343634443491349e34eb34f835453552356035ad35f936063653366036ad36ba370737143722376f377c37c937d6382338d838e6399a3a4e3a5c3aa93ab63ac43ad23b1f3b2c3b793b863bd33be03c2d3c3a3c873c943ce13cee3d3b3d483d953da43df13e683f1c3f693f763f843fd1401d402a40774084409240df412b41384185419241df41ec41fa42ae43624416442244284476449e44f244ff4542454c463046484656466546744684472847d0487848844890491649d64a5c4a6e4b124bd34bdc4c624c7e4d2f4dd04ddc4de84e6e4f2e4fb44fc65086510c511e51c3523152f052f7537d538e54325493041011ef55aaffffff11000100020003000401a09bc7a9870000000004010173ed450000000100ffffffff0000000000000000634e93ea00001d3677b8338000001d3677b83384955d862e00058edb0173ed410173bfbec400000003000000000000002e00050211b8e48dfb4a0eebb004000600070a8a040a13051bcbbbdeccd56f979164b7da81b8e49732e7215334e2b8ce57c41888d03190bd932f59e8bcca9b92cd1032c316407ca6099409a8aedf4146f39e95ffec016e016e000b000c14892736daee89910b52d7041a889bf97c864cfc84eeafba291a1b5b2e931cc1b5e800084a33f6fd0be55a2d75c3eae367b5ba338705f0319041b70e23a5c9b65374cf2739898e58f78b372f9292751451def1be4dc7cf494ef17470574d85c253ef77746b8ea127c00123012401250126009800001d3677a8f1440173ed443de180887d5f5a84d44bd19c87cbb664b0561d5eb81da88c5782b0e36e9a07e4d7fd7d801561f54bffc0cb5c4ec4e855deeeeb6fdf26d4c99a086ffafb93580a022581fa7454b05a2ea2ac0fd3a2a5d348d295400800080008001d43b9aca00250775d8011954fc400080201200009000a0015be000003bcb355ab466ad00015bfffffffbcbd0efda563d0245b9023afe2ffffff1100ffffffff00000000000000000173ed4400000001634e93e700001d3677a8f1440173ed4160000d000e000f0010245b9023afe2ffffff1100ffffffff00000000000000000173ed4500000001634e93ea00001d3677b833840173ed416000110012001300142848010124871f46ee0eb1ae00a27d5c29f6cdbcc378c1f4f1380805ff2297c9ed9fcf2200013213a09776db739953220712f110cafb8c5d8dc0fab70e9391a4894fc7cc8706b210f3282d0d6691f0235fdd6b31911b4bd49619c99ab3dbcb80305cea71d75d2eb0016d00128207e9d152c168ba8ab00018009122330000000000000000ffffffffffffffff81fa7454b05a2ea2a8280091001634558d88cb7e0929c9a44ffc1cf3c5a230c0db9b7ba3f7e489ee00f8289579a5c967d13c5fdbab5e261b0b55885aa0a63abbc4487521903d912f3e35c296ad0eb23d001b0010cc26aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaac23305e8350c57b37e003f008e004000410111000000000000000050001532139abefb5447ac011734d52324dd76a05aff0775b45c928601222624dbc2141bf2fa4c3e38ec56db5fc900c7c628d963f6fd5f016fdbf141f3f5ae91c3314e7b7f016d00128207e9d152e9a4694ab00072009122330000000000000000ffffffffffffffff81fa7454ba691a52a828009100162455cc26aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaac23305e83a13cd8b7e0128008e00170041006bb0400000000000000000b9f6a280000e9b3bd478a1ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc028480101de5adf45c03a745fc9d3a418d9e2ba096db9c1aaa77bc0898b6d9ebb611d2b40000532bfe179ee8495cd144a2f6d30950db2d48088fac5f9a778519dc0114219bf54cead2e7212dcdf398af721e9e425782d575b6c4026b7ec52ea1d3fe9dbb2bbe2aecf001a0010000100f59f3900058edb600003a6cef51e28880000e99c6da994200b9dfdf25ea78c41c94e4584ff2623b917b789f5d0e6a859861410542cb94e76fdc6efde77dc19b6aa8de0d4ad05651468c38cb9f64e1f8cf1351de6d5a7d98d56d6ded0be00bb00bc23130103f4e8a960b45d4558001900740091231301022a87a0b197c88778001a001b0091331367865aed64db08164a3138d816a8cacbb8b8fa46bc1fd1023ef5bd4e8fb6299ddc6201a0bfe76f22f36ca8ad0c54aa645c5739752b0a53bac3e57e9dda18febd0027000f01015ec2a32762fd21d800270028009122130100cbc4fd8a34cb65a8001c007822130100596b57d9c1932d880079001d221301003f0bad3989c46848001e007c221100e0b187aea6583a68007d001f221100e0a7528c0ef9512800200080220f00c141a6498c4d0800810021220f00c02225548664a800220084220f00c0221de12e910800850023220f4030085e7768002a00870024220f00c02170f2272c280025008a219dbceaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa818042d76318e19f365e6f7e0780eb2bc9f0c382940ef38b61bb6257ad617eb36fe8c9f56964f2800003a6cef51e28700262277cff55555555555555555555555555555555555555555555555555555555555555554085ac1288e0000000000000074d9dea3c5118042d76318e195d0008c008d2313010068a1a14c598fee380029002a009122130100f62101db096d33a80092002b28480101357b3e386bb95837e17d8fc7dd37f292efdc3301f6e109d8b33eb8a02afbb95d002228480101df3229c929cdae91378fd16242bda5a97246c54da4e9700d7427829825ee7b5d001922130100dd08f96dc461bcc8002c009522130100a6df074312541a08002d002e22130100902873121142a0c80098002f221100f6b6943101117948003900ae2213010090175c7b3161aee8009a0030221301008fb45fdc97d252080031009d221301008f689e5fb80803e80032009f221301008f677b3e09283ac800a00033221301008f677a70024cc70800a20034221301008f6779cbfeb8f188003500a521a1bcd99999999999999999999999999999999999999999999999999999999999982011ecef393af6d61933fe8eada66c79771a5de359b379b70bfe4414022dee90877585c9818f39dda000003a6cef51e2850036227bcff33333333333333333333333333333333333333333333333333333333333333334081ac1664bc000000000000074d9dea3c50e011ecef393af6d6196d000a700372355ec039e4242ff8cc69bf4260c44ddc7b820f838fa85ad1828d2b83ace409d6c02a3b89a505ac592d94a7c4d00a900aa00382179a0634dfa13634f7a130000800006226ee3dc107c1c7d42d68c14695c1d67204eb60151dc4d282d62c96ca53e26c0100ee542c8b882e30ec339334e5ca000ac221100f6a2a63eab3d4e48003a00b0221100ea5905b0b329bd88003b00b2221100ea58fcd0996ec14800b3003c220f00c035987df0cb08003d00b6219bbd62f8f7bea30f8ab5e9f16c3fb8642b118f56ed1bdc49600dbe5220c8b1af9e040c474f803d1a0544cba813425adf3253dd3727a789c9e418b5e788a4cab5df805caee92b00000e9b3bd478a1c0003e236fcff34517c7bdf5187c55af4f8b61fdc321588c7ab768dee24b006df29106458d7cf21881f48000000000000074d9dea3c5110311d3e017f000b800b900ba28480101db29f7a5808e1a673feb2258d777f3005642991b8025b1f92bcd7c498a8bd8ed000222bf000100f59f3900058edb600003a6cef335e0880000e99c6da994200b9dfdf25ea78c41c94e4584ff2623b917b789f5d0e6a859861410542cb94e76fdc6efde77dc19b6aa8de0d4ad05651468c38cb9f64e1f8cf1351de6d5a7d98d56d6ded0be0042004328480101b20e36a3b36a4cdee601106c642e90718b0a58daf200753dbb3189f956b494b600012213c3c000074d9de66bc12000bd004432014645ed4db913f636932b4bebb489b51112e1a415136d57d6c6735ffc4bd556606e33f960111aa97c043f6040c47d1298da52d6a46a0378304ba87f61f3dee9db0010000c20005100522211480000e9b3bccd782400bf00452211200003a6cef335e09000c100462211200003a6cef335e09000c3004722116200003a6cef335e0900c500482211200003a6cef335e09000c700492211200003a6cef335e09000c9004a2211200003a6cef335e09000cb004b2211000003a6cef335e09000cd004c2211400000e9b3bccd782400cf004d2211000003a6cef335e09000d1004e2211400000e9b3bccd782400d3004f2211400000e9b3bccd782400d500502211d000003a6cef335e0900d900da220120005300f822012000dd006722012000540055220120005600fc220120010f005f220120005700fe2201200058010022012000590102220120005a0104220120005b0106220120005c0108220120005d010a220120005e010c28480101f25a1e1d7f11115186543ff6eb95e3d9b98f71d2c959af6b0dad6b63cd1e6d6900012201200060011222012001130061220120011500622201200063011822012001190064220120011b0065220120011d006628480101a96f5d75bc79b8d1640e680704965baaa2245e4b3a5ad8e980ef5a3568409418000222012000df006822012000e10069220120006a00e422012000e5006b22012000e7006c22012000e9006d22012000eb006e220120006f00ee220120007000f0220120007100f2284801016f2780ba9d3cdce8eee34a23d893d90800da0ac1be8a973c513909136b7f636b000223130103f4e8a974d234a558007300740091231301022a87a0c5b59fe77800750076009128480101827773c365eccfd6cb46a3f783a09f1aba77ce1a0a4d62048569e9b845e955f8016b3313e844a4da57b7cf2b0b52b004cc5886c966478e37012ee2d9b473bf083e1e3072beee68024dd8cc7dffdfde9e114e4818dc10824b446d661453963fa117c1fcbf0027000f01015ec2a33b80d481d8008f0090009122130100cbc4fd8a34cb65a80077007822130100596b57d9c1932d880079007a28480101cf20bddca78403c3e40e2ab1b3eeb526c425b5efb531e6c5bd3d52019c25125c002628480101ff7081e66c7f0d6e868021316b0189b9e67b61284c176cd74f78fa6baa18a025001a221301003f0bad3989c46848007b007c221100e0b187aea6583a68007d007e284801011d818de56750d053b2a227f0da85ba37fb1869d0c774629d04e2668e1204c0a3001b28480101174c3878604468b08b7b76f5349c41201ae28b81ca1d94794ab11a692e4668250018221100e0a7528c0ef95128007f0080220f00c141a6498c4d080081008228480101e00721ae4b2be2ed708fa68e6b7bec2759a107504812069b3b8aa9acea346c66001528480101747c06e45f53ca1dc7d23f39db07d12f2e67fa595a36fa41d26683ab42d1a3040014220f00c02225548664a800830084220f00c0221de12e91080085008628480101eb38ef90c590bedb3ce31140d2d4176d43db6b7aab35df685afc4ccf2a383209000b2848010179a2e20b8a926ab2fe83108ff00f2fbced9958047008e5cb5fdf8c798aab63850010220f4030085e7768002a0087008828480101a248b81f22333cc28f6b6744e4298aefcd9b6f2dc5d7c99e1da1b28c37f3aa0c0007220f00c02170f2272c280089008a219dbceaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa818042d76318e1805a8c67376726b2dcf563d47e9c2ed6fa8fd993942535d6c8ed758902593e99400003a6cef706707008b284801010143b3d2dd671b2559543155e003f847022e510b3a57afabbca05d4069c327ef000d2277cff55555555555555555555555555555555555555555555555555555555555555554085ac1288e0000000000000074d9dee0ce118042d76318e195d0008c008d2848010164a43970f2007a1da6d6fc81773cc095d1cc270e81359e471f3b03469abeb7b5000c214900000027cbb9d1062954439a83a91f27835fb9d2e3e798910356650c3c493c946234646840008e28480101374e198a900e08edc634a5f2ad73e388b0a3019d24269fae8046024e437476b1001028480101903aa268fecbed38822a8972ba42eadb53c0972f11b8486f1534210245db4898002322130100f62101ef274493a80092009328480101a5a7d24057d8643b2527709d986cda3846adcb3eddc32d28ec21f69e17dbaaef0001284801012bd772e408a34578028922281a3e5b5384970a6a6dd741b1cfa3b80a3e5ec57d002322130100dd08f981e2391cc80094009522130100a6df0757302b7a080096009728480101b90ed7fc04a4971294b12a078ec8189e8fdba184de6e23043922a774ae403ee2002422130100902873262f1a00c800980099221100f6b694310111794800ad00ae28480101eda54e0b0237690499c3e159ab800469fdbcb3c162d42181c2c298acd4e98f3100152213010090175c8f4f390ee8009a009b28480101cc6ead611f9fa7c0598d8f88d658fe0b91f5f9c9635c872154234c16c722970c0014221301008fb45ff0b5a9b208009c009d221301008f689e73d5df63e8009e009f28480101c7c146bea2ced23475861d11146c0560a46c3d243563fda0e32bf8c34229d2670013221301008f677b5226ff9ac800a000a128480101ef1aa8b2068cf6a8eadef8197235a5d5976865a32a3ad1fe80db069ddb8cc2fe001128480101c2ef35325f62d0b4cc17d1f5d083894100c3c478504d70b6eb8d3cf26e604ff40011221301008f677a842024270800a200a3284801018a51fe69422dbf7e028fb1dcac5a62064eefeb4c080793e78a24ef22334b307c0010221301008f6779e01c90518800a400a521a1bcd99999999999999999999999999999999999999999999999999999999999982011ecef3bbeb1c21823653419f6ebabf10f7978dae7e33a12d3bbe9815917a62eb4fe902f2a96e88600003a6cef70670500a62848010150725eee52e86432f846698a08ac153a67bc9ad9c160130af907c3bef05f29480007227bcff33333333333333333333333333333333333333333333333333333333333333334081ac1664bc000000000000074d9dee0ce0e011ecef3bbeb1c2196d000a700a8284801016217f872c99fafcb870f2c11a362f59339be95095f70d00b9cff2f6dcd69d3dd000e2355ec039e4242ff8cc69bf4260c44ddc7b820f838fa85ad1828d2b83ace409d6c02a3b89a505ac592d94a7c4d00a900aa00ab28480101ff06225996392d9e78d92fef981828f3459892841111b2d352901236d506cb65000b28480101336df3bd068890e3f26c1a8f5e77c4bf7cc3c81fc88006ab614b6db43647262600072179a0634dfa13634f7a130000800006226ee3dc107c1c7d42d68c14695c1d67204eb60151dc4d282d62c96ca53e26c0100ee542c8b882e30ec389aaabdca000ac28480101b8ad45439ed0f9f1ffb12362a0c0a6f522734feed11dda077d5f6067f1305170000b221100f6a2a63eab3d4e4800af00b028480101e2a96bbff9be849635722263833d77a90f0a832b410f8b73bca56041fd7e21970016221100ea5905b0b329bd8800b100b22848010130dd0d5ef5796dc4c101fbf5b4b083599e509d0f738b07a8dbfad6b5ae53aecb0012221100ea58fcd0996ec14800b300b42848010130219e3c8c788af6da8a296da6f3e9925c909eed9821a0ae1911c38f56f7b37e000b28480101e2bc337ece7f3af5171f3265f44c612fc2fcba87f4b4563dc7fdc3285dd6a44d0008220f00c035987df0cb0800b500b6219bbd62f8f7bea30f8ab5e9f16c3fb8642b118f56ed1bdc49600dbe5220c8b1af9e040c474f804c5ac6247ef1e5d11d080c3d8b21135b54598a72e11fbc6ebe1fa0c4b2a7df0a00000e9b3bdc19c1c000b72848010118dd0a8040c21a2cfb6c0acf4ad636dc67ef3ab0a3e102f1b43ad500c55728d00007236fcff34517c7bdf5187c55af4f8b61fdc321588c7ab768dee24b006df29106458d7cf21881f48000000000000074d9dee0ce110311d3e017f000b800b900ba284801017269fb9feb45d719ebdbc3b0816b987bab06f43378dc84dc84d55727905482140002004811fd096c000000000000000000000000000000000000000000000000000000000000000028480101986c49971b96062e1fba4410e27249c8d73b0a9380f7ffd44640167e68b215e800032213c3c000074d9dea3c512000bd00be22012000db00dc28480101258d602eaa21d621634dcf86692aeae308ff3cf888f3edafc6a5b21848d732f900182211480000e9b3bd478a2400bf00c0284801014b01ebcf5425735461aa8b83bae89e70fa21e95d2ee85e57b05dad26c1d6d53000162211200003a6cef51e289000c100c22848010165b0a85a0fdea0c76a2a98445623ea62427099a6318624794dea416f1bdc6f5c00152211200003a6cef51e289000c300c428480101b5b64686c719580155341cb7347af0405dec7158c283ad30833b07325bdc48a5001422116200003a6cef51e28900c500c628480101fde4f74a9866e3de066d6d27e3b1fe107053ecce8b54d8b05ebf4a3b0789c26b00112211200003a6cef51e289000c700c828480101f7a4391731a8136b142d214311bd2f8c162938f27185d22de576a045a13b1e1600102211200003a6cef51e289000c900ca2848010187c846be2bc06a266ae017ae9a13c66cf156125edd95b8bd4f6cfe3c903e3b35000f2211200003a6cef51e289000cb00cc2848010122da148fcc6a6a317ae3c41ee888034019cbfa89e57f306b85601dd2045d6daa000e2211000003a6cef51e289000cd00ce2848010191c44865f6767ab41750fbf5117df2d8be3110925c7993aa2e03780673c31f32000d2211400000e9b3bd478a2400cf00d0284801016d16afa0d70d41df6abe49636527c0b566bd3b722b731eba03433d7efbcb3908000b2211000003a6cef51e289000d100d228480101d744ca7d3ce6fe4538b3fa6a138971ca129c227d8a6736a9cd1d33c2f1fd06cc000a2211400000e9b3bd478a2400d300d42848010175d211346d824c33aff56800c12e0b320854590aadfd85e3f909502cdb6ec3c100082211400000e9b3bd478a2400d500d628480101322f03bbddf42b900d602199315f5d4befa1a9282a2a6c845f3db6ccd2b6bfc000062211cc00003a6cef51e28900d700d82211000003a6cef335e09000d900da00a9d0000074d9dea3c51000003a6cef51e28802e7da887bc30110fabeb509a897a3390f976cc960ac3abd703b5118af0561c6dd340fc9affafb002ac3ea97ff8196b89d89d0abbdddd6dfbe4da9933410dff5f726b01528480101523e62a3a95932c2a65f2314a8a818f82f48644967cc31dcfda9954109d8b55100012848010177c2748c31a7f78c56862aa9d06df60981de7aaa59e67d4d0360a2903384fe1500013201032a5ac73da06a6b989d158bec539003d36dc087d663eda6337be5667c284f16310ee22bacedde5f1c215edbbbdf7a1c20c98ec248b7893266ebfceeb41817bd000f000c2000f700f822012000dd00de284801019deed5e9cd5995ad6c97a06276c939029a1d05a6de03b6c724a4b5567e9adb7a000e22012000df00e0284801016bc4ad2e5c909f6f452be243edc65694f7e6db5f2fc615f69756954a60a563a2000c22012000e100e2284801016925c827cdb72656785a860c0ed1b94c1ff9f0614b9e2ed1b0aa1ee8fbb395aa000c22012000e300e422012000e500e62848010197d9c97586b5cf9a93f5077cf1e13c91f7a4d5b240601e4d08030ab62cd17707000b28480101f613c63e75ce90bdb3aadf01297ba9a958588392473ea542ef8654f281d2854f000922012000e700e828480101d83f99b6b2deca33e45337ea0fa4788a5590c2a9f88654c24c1e4b5282ec7787000822012000e900ea28480101497deb7f82cc061521c9f6bf58ddd3043ecb1dbaea13352ecb73bb53236a9dd8000622012000eb00ec28480101e86bec3c2e5a0c5b9bad30e9b0efd5c74409fece4efd571f8fe02eccbbd0af1a000422012000ed00ee22012000ef00f02848010178a2f12e152f91343bff8aeda8ca7bab1039578fb6b03832c150f22786d0500c000422012000f100f228480101b26a0cc496805853f303d8a00ae9fc7f7b20dc7cab6d1d1c21f5b86469874a84000202012000f300f428480101a31f27b17ffa79bcaf0e47f55dffa054f825e019e447026255e7e1a8d7488701000200b1bcd91dbefdb40075ad92878e330bb79115bcfc28f3c5b9833df391ce8138514a3199fcd1800000000000006500000002b0d782ed8000003f2a3414d8b199f72d0000000000000040800000038a0ed0708000002d14497b814002014800f500f600afbc6827bcf8957c10b8a5694ecd7f0dd41e6a2cd906c77e5340983b618fb6fb0800000000000000000000000000000000000000000000000000000000c695ef7e000000000000007200000006efab3f64000000450742496300afbc66e5f2524ea28a3bde37c9b8f9e929de2e8e0ae9b0b84a7deeee8d71d424e8c69d27d400000000000000e2000000093197d6c2000000a8632502f4c69d1ba4000000000000008a000000116e3e81da0000006af0f2148122012000f900fa28480101912d60694234d59e4645f5d2ebd90e081979a3f6eaf4124bec3980e4547a5094000e22012000fb00fc220120010f011022012000fd00fe28480101348a81067d100edaf90feeb18db50c3c315a07c6c0944b52368c30e76a6f40df000b22012000ff0100284801018540d2166efad6f7a81289ddf3983d3ed177993dce47ccb150f2fcc287428d53000a220120010101022848010110b3b5e79df7c963efb443120853eb1bf9377e78020993bf79d5aaa9b02d1a6a000822012001030104284801016f610eec3a1e4dc9bdacbda0e586e7a8f6b4734b6599ecc0f8c5d0e9666d0ed3000822012001050106284801019100c451439a1cfdcf444d77bc78d03f19ca5e71b1f8fdae5e9e0ccf3e8214a000072201200107010828480101e0140ab9f7e276e1143af00713243e470dfc2c93c02b124622926fd33551a71b00062201200109010a284801014ef684da255649795b7830d1100f419d8f8a0eeb9ed6ed3610ba20b5d815deed0003220120010b010c2848010155cdb8f72801ef11ba562172ed2626c88208eddcf4a0c8f6d5447a785d02b790000202037820010d010e28480101b6eb72df89b91190ab85640f1ef9817bf00e49c5c11e8fd173b5b382ca4a104700010073dde8c69d27d40000000002e7da88000004baec525bbe000096f6a2fa0e38c69d27d4000000001598a6b2000004da46f3846200009e49d38f1eeb00afbbdc4b61f8041625a15bee3b094ff72034e12e69e8d71521ac6748fe6359832319afc8c8000000000000066800000033ffaa8b0000000419c4a9d68319afccd800000000000003d00000002e72705fc80000026a49c0209c284801018dfe3c99df194f8fec2b5b64b5ef08296b853794a29497c7c425ca62a44695e6000c2201200111011222012001130114284801010c275d6749b7c9102256e4abafdecda16a1697f20d26cd0e711bd9d58ef4a2f2000a28480101c169f7745c95d5f3f6b4e550c15978aaf563631f3a9e6ddaaa361ed4042e4f05000922012001150116284801017a3b4493fefcfd2275fa2f6ab01a8db5d70a443fb48dfb00e152545adfb97cbb0007220120011701182201200119011a28480101b13de2fa76c60764833d05264a2e1081609e2dfa9a04bf8d6c5e1162ac7d47cb000728480101027742b12159d2d1310044b4a94e1eea928905b045871a52b552b4b4841288400006220120011b011c28480101df4611dc79f46dc700809e0c3140796be5ca9572c3f3fab70ddbe6a5460bf4900003220120011d011e28480101d52b65c44fcc1a90bbbf8cc01e8ab9c7b6c51f95c2735d6de72a669c1135a8360003020162011f01200201200121012200b0bc885a77c249fb95f38bb13224853b7944942c4b10b84f1b99aa32892aabd4f46335f78a00000000000000bc00000003fb0146f100000074c1cd03f56335e64b0000000000000058000000040ca9eccb000000387d19d10000afbc60807ffe2b018ea1eb65ddc523f7772fc1e1f16e73ee8905b4b66c12275ca800000000000000000000000000000000000000000000000000000000c67fd5260000000000000096000000081b2d1d7000000064c8dda77100afbc799607d471065ad26b0a721946ed764b15a01cf341e11989f08863962a362800000000000000000000000000000000000000000000000000000000c69d27d4000000000000003e00000002165b2b1c0000002c0b7cc7ad0103802001270001021101918f8df47d89a592d9a8e2220276e210d49d789c174ab2b303917d71c6655837000782012f0317cca5687735940043b9aca00401280129012a0247a00f076afb8843d0d2618df1779691876f9ffd59f9b30f47df60f49496744dec67200610012e013b0103d040012b003fb000000000400000000000000021dcd650010ee6b280087735940043b9aca004010150012d01db500e3a26680b9f6a280000e9b3bd478a000000e9b3bd478a0d73fd8f873243316a5b55a0395be4d1c584d71a7c52116b6379a3e93f9649360375de02eb9865b5786e167c4411e5c415cf6064be75fe04b0f81f0c4b84c7260880002c7d7c00000000000000000b9f6a0b1a749f2a012c001343b9aca0021dcd650020020161012e013b0106460600013f020340400130013102037604013201330297bf955555555555555555555555555555555555555555555555555555555555555502aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaad00000074d9dee0ce0c1014c014e0397beb33333333333333333333333333333333333333333333333333333333333333029999999999999999999999999999999999999999999999999999999999999999cf8000074d9dee0ce00400134013501360397be8517c7bdf5187c55af4f8b61fdc321588c7ab768dee24b006df29106458d7cf029a28be3defa8c3e2ad7a7c5b0fee190ac463d5bb46f71258036f9488322c6be7cf8000074d9dee0ce004001410142014301035040013701034040013b0082722f7566ede0ba3a333ac2ca4e9820a0eb28fa3c675e8c5b7378fbba7d487af6b6d8b330226ee7a4226c9a4e28167203a4dec229d3f51655422b56dd7122352fda03af7333333333333333333333333333333333333333333333333333333333333333300001d3677b8338199ff4756d3363cbb8d2ef1acd9bcdb85ff220a0116f74843bac2e4c0c79ceed000001d3677a8f142634e93ea0001408014d013801390082722f7566ede0ba3a333ac2ca4e9820a0eb28fa3c675e8c5b7378fbba7d487af6b69e73e012c2b93293818802ecda692b6a70c7bc140c3d6ba22159dd15949099300205203024013a015100a0431b9004c4b4000000000000000000960000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003af7333333333333333333333333333333333333333333333333333333333333333300001d3677b8338232a2e0d714f1820922c85912266b270b551f97fd88c9ce96b02fbe0b94fedd3300001d3677b83381634e93ea0001408013c013d013e0101a0013f0082729e73e012c2b93293818802ecda692b6a70c7bc140c3d6ba22159dd1594909930d8b330226ee7a4226c9a4e28167203a4dec229d3f51655422b56dd7122352fda020f0409283baec018110140015100ab69fe00000000000000000000000000000000000000000000000000000000000000013fccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccd283baec000000003a6cef706700c69d27d440009e42614c107ac0000000000000000064000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000103504001440103504001470082723145f857768776495406acbcd9f6451e43b82a7cf2b787bdfcd66f54e8f61eb2f5fc1aa51cd06879f30dac067b3d17d0571b7c8ef15db6c57ce3e90f63e7d80803af734517c7bdf5187c55af4f8b61fdc321588c7ab768dee24b006df29106458d7cf00001d3677b833817a340a8997502684b5be64a7ba6e4f4f1393c8316bcf1149956bbf00b95dd25600001d3677a8f143634e93ea0001408014d014501460082723145f857768776495406acbcd9f6451e43b82a7cf2b787bdfcd66f54e8f61eb20d9c166ab6df5f0d47d18e86fc45c1e5f42681c1184337189ef2e4aa3f2552c10205203034014a014b03af734517c7bdf5187c55af4f8b61fdc321588c7ab768dee24b006df29106458d7cf00001d3677b83383a4dbec8658831b756fd060883f7d013972d9838f66cebcd2e28d66f2b2d6d46900001d3677b83381634e93ea0001408014d014801490082720d9c166ab6df5f0d47d18e86fc45c1e5f42681c1184337189ef2e4aa3f2552c1f5fc1aa51cd06879f30dac067b3d17d0571b7c8ef15db6c57ce3e90f63e7d8080205303034014a014b00a042665004c4b400000000000000000030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000069600000009600000004000600000000000519ae84f17b8f8b22026a975ff55f1ab19fde4a768744d2178dfa63bb533e107a409026bc03af7555555555555555555555555555555555555555555555555555555555555555500001d3677b83383f9b2f37bf03c07595e4f861c14a0779c5b0ddb12bd6b0bf59b7f464fab4b279400001d3677a8f143634e93ea0001408014d014e014f0001200082720ac47779e474df79ac188caf2308fa7fccf511a8be789a6502f15ca63fba64408669008ce4710e1108a5eee86c282b1d13feaf7634e0c592943ae844ddd4ca0c02053030240150015100a041297004c4b40000000000000000002e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005bc00000000000000000000000012d452da449e50b8cf7dd27861f146122afe1b546bb8b70fc8216f0c614139f8e04d7cef969")
- .endCell();
- log.info("CellType {}", c.getCellType());
- Block block = Block.deserialize(CellSlice.beginParse(c));
- log.info("block {}", block);
- assertThat(block).isNotNull();
-
- List txs = block.getAllTransactions();
- log.info("txs {}", txs);
- block.printAllTransactions();
- block.printAllMessages();
- }
-
- @Test
- public void testLoadBlockMaster2() {
- Cell c =
- CellBuilder.beginCell()
- .fromBoc(
- "b5ee9c7241023201000498000114ff00f4a413f4bcf2c80b010201200302000cf2308048f2f00201480e0402012008050201200706001db9c34f00a5f03802032028307f00580011bbbd182108325e4c380201200d090201200b0a003bb6e53da89a1f401a803a1a7ffe00203e00203a861a1e0026209a8608a810020120310c002bb2fe7c02840917c120c1fd039be864fe800c380c1c200017bb9a5ed44d0d430d0d3ff3080202cb120f0201ce1110005b3e105bc90c0c40b53d01347b5134350c3434ffcc201254452ebcbd087ec120841ca368e840b2333d00104c3c01a000513e105bc90c0c40bd01347b5134350c3434ffcc20125444eebcbd20840764eab600723d00104c3c01a002012023130201201c140201201915020120181601f73e105bc90c80fd01347c02b434c03e8034c7f4c7fd010c2012c97cbd2012d4e4ae7cbd2012d4e4ee7cbd20134920840ee6b2802814032ec6fcbd3e097e0554c1e8483e0454c2e0083d039be864f4c7cc248c083880a94b20083d039be865900720083d05a74c083232c7f274100720083d05b882a9013232c01400e0170038fa02cb1fcb1f17f400c9f00b82101a69387e02c8cb1ff4004130f00600793e105bc90c0c40b53d01347b5134350c3434ffcc201254c52ebcbd08b434ffcc201200aebcbd3c028c54943c02e0843218aeaf40b2333d00104c3c01a00201201b1a00e33e105bc90c0c40b4fff4c7fe803d01347c02887434ffcc20125446eebcbd08e0080a60c1fc014c6011c07cbc94ca3c020a7232ffd50825a0083d10c1291508e43c0240bc02e0840d2212a4497232ffd49032c7d4883d00095110d4a17c01e0841c04df21c0f232ffc4b2c7fd00104c3c01a000ed3e105bc90c0c40b4fff4c7fe803d01347c0288e0080a60c1fc016011c07cbd2011d4c6eebcbd14cc3c0214d2bc020af232ffd5082e20083d10c06951543c0241291509243c025004fc02e084260abfffc97232ffd49032c7d4883d00095110d4a17c01e0840c19b443c0f232ffc4b2c7fd00104c3c01a0020120201d0201201f1e001f3214017e8084fd003d003333327b552000193b51343e803d013d0135350c200201202221003b20128870403cbc8830802672007e8080a0c1fd10e5cc0060c1fd16cc38a0001d0060c1fd039be864fe800c380c1c200201202b2402012028250201202726003d1c20043232c141bc0105b3c594013e808532dab2c7c4b2cff3c4f25c7ec020003d1c20043232c1417c010573c5893e808532da84b2c7f2cff3c4f260103ec0200201202a290023104cfd039be8482540b5c04c00780c5c0ca0001d1c081cb232c072c032c1f2fff274200201202d2c00215fa4001fa46804602c00012f2f4d3ff3080201202f2e001134c1c06a80b5c6006001ed20120871c03cbc807434c0c05c6c2497c0f83c00cc4074c7dc208061a808f00023858cc074c7e01200a0841b5a5b9d2e84bcbd2082c63cd865d6f4cffe801400f880fe0048840d10015bc13e186084100d28f014842ea4cc3c033820842296cbb9d4842ea4cc3c03782082c63cd854842ea4cc3c03f8203000588210982535785210ba9330f00ee08210b766741a5210ba9330f011e0821025d53dfdba92f010e0308048f2f00011b323bc02840d17c12004896818")
- .endCell();
- log.info("CellType {}", c.getCellType());
- }
-
- @Test
- public void testLoadBlockNotMaster() {
- Cell c =
- CellBuilder.beginCell()
- .fromBoc(
- "b5ee9c72e1021c0100040b00001c00c400de0170020402a0033c036a037c0387039e03b6041c048204ce04ea0536055405a005ec060406200700077007bc080908100817041011ef55aaffffff110102030402a09bc7a98700000000840101c745200000000100000000000000000000000000634e94ec00001d367caaae4000001d367caaae419bbc68ac00058fb00173ed920173bfbec400000003000000000000002e05060211b8e48dfb43b9aca00407080a8a04250ec78adc9d082383679c3289edc662b628be0e34e51a8f7c412e98d24c8a5fb59960f376a6ad4dce93f406ce904add5a2aea140c99b877d02f67f1cd1e5f51021902190c0d03894a33f6fdb1c342502d7261843b4a3bfdbfb766c45705b7c4410af03c358431620ff05a79b1be0d76ede085c08726e04bad3c5779d949364eb56540f06c2c49b98d514111401a1b1b009800001d367c9b6c040173ed92b57df82537164b18661e22f620e1a7a15826a73d7402eef9433d55c030232370a7caa150ac8f2f4c74cb5c77e6671edb6f8accd65c683faf6e48a88720b2c72d009800001d367c9b6c0101c7451f78d2820caf6a5f100a444450ddab2f7754bbce7c6027dce5349269227866124a33b3efd318a7ec75c8f26844fd4dce5f581927f670a0087d7fec56658b487d720225826b977bb75290e16c135cbbddba94870b40080909000d0010ee6b2800080201200a0b0013be000003bc91627aea900013bfffffffbc8b96fc9c50235b9023afe2ffffff110000000000000000000000000001c7451f00000001634e94e900001d367c9b6c010173ed91200e0f10235b9023afe2ffffff110000000000000000000000000001c7452000000001634e94ec00001d367caaae410173ed9220141516284801017e49cb3c190a5033a93c907c6631d4459cf4bf71f57f041dd14270fb919423dc000122138209ae5deedd4a4385b011192848010125e39d851243cee82c062dd588cfa4587461b7869f68023bad26988d33bf8a24000223130104d72ef76ea521c2d81213192848010105a0d0f5cf8e9d2d98f032e935e8de2208463332de6c74af0b9d5cfc2bc2802102162848010157c418ac5021e527850e982354ed5a21fd7a0b0ac719e443fcd3c80f496dc4db003401110000000000000000501722138209ae5deedd4a4385b0181921d90000000000000000ffffffffffffffff826b977bb75290e16bb5f5e54ddd448c900001d367c9b6c040173ed92b57df82537164b18661e22f620e1a7a15826a73d7402eef9433d55c030232370a7caa150ac8f2f4c74cb5c77e6671edb6f8accd65c683faf6e48a88720b2c72d819006bb0400000000000000000b9f6c900000e9b3e4db601ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0284801012aa19c773967de4112363f58e8331a68fb2b3fcb1d55daf352b93c497a019ce4021728480101b3e9649d10ccb379368e81a3a7e8e49c8eb53f6acc69b0ba2ffa80082f70ee39000100030020000102b1e6b8f1")
- .endCell();
- log.info("CellType {}", c.getCellType());
- Block block = Block.deserialize(CellSlice.beginParse(c));
- log.info("block {}", block);
- assertThat(block).isNotNull();
-
- List txs = block.getAllTransactions();
- log.info("txs {}", txs);
- block.printAllTransactions();
- block.printAllMessages();
- }
-
- @Test // does not work in pytoniq-core
- public void testShouldDeserializeBlock() {
- Cell c =
- CellBuilder.beginCell()
- .fromBoc(
- "b5ee9c724102c101001d2500041011ef55aaffffff110103200601a09bc7a987000000000001000000010000000000ffffffff000000000000000065a57c5f00000000000f424000000000000f424cf530ba43000000000000000100000000c400000004000000000000002e0200980000000000000000000000005052419cde96601f375f5ff37f0c0958d99d696a6b31a075787a22769006e0575ab4d36de07ce24d78ddc0c37a776ebea7728d08bc5d720cf7ab662a4ffb23e00211b8e48dfb465ec87804050401150232a9f88011954fc40018ae012d84563886eda33f200422b1c437989ce3804081b6b0b008ae04894a33f6fd789a0f4a1d0352df0638d90269bafa60236a1c793ec9cf4236b6bac9cf6e20a0d9576093fecf8a711917790021c5ceae28344e301649c28a1cdd9dab8c4e62f1c0570d0c070307cca56004540b080201700a0902016169a9020161ba77001fb000000000400000000000000000000401079996e5121a0109a06dac2c020e02091036d61601150f02091017d784011210020350401e110243bf17c9d39d78e8498a560800ddfb11dc48be1bc0edc2fbf90844eceb5ab4649610028e85020b4405f5e1004014130343bf084dd4db5a349ccfcf293baf5f5b626f4a130856b6613ded62877bfecc2536dc0a5e621c024bbf0847cbb01de39c3308edf1091131c7dedb780ca3e34d85bdc1a6ab4df16d79e9017d784006bd850209101efe92011d16020b6501efe920101817024bbec8a2b54087ea747ec1d5ecc652b91406aa6f4c2f479843ebd290b26ad8043eca03dfd2400c28850343beccc243bc18876b43843800323ac0a349ba6ffaf4f87d8e7ba2404e280b7097d814679919020161676202070ccb72896d1b02a4bffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff79996e5117ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbe8000000000001e848a665b9446264020766cb73bd5e920244bfaeffebddf2ee4f04633ee2bbba628ae4e08b6e0043d11727286b0df248a2e17700b7990343bf24d1ba51931fc51a9af90896c72638a6965587eed9cc6648bb69ab31a7dae44c0a5b991f0201615ba10a8a045052419cde96601f375f5ff37f0c0958d99d696a6b31a075787a22769006e057724ab9590a228d7373ef8d28544bea428d454ad789b07c24ceb3fc7a07c32c59001400142921245b9023afe2ffffff1100ffffffff0000000000000000000000010000000065a57c5f00000000000f424c00000001602423224d22390000000000000000000000000000000184563886f3139c7009cc4b4028ae352213821158e21bcc4e71c0303aae0211800000000007a124d02625006bb0400000000000000000000000800000000007a1234909ba9b6b469399f9e52775ebeb6c4de942610ad6cc27bdac50ef7fd984a6dbc00213e2000000000000f42498bc270173a7ffffffffffffffffd64515aa043f53a3f60eaf663295c8a035537a617a3cc21f5e94859356c021f6400000000003d092c00000000003d092e02801064606008b245b9023afe2ffffff1100ffffffff0000000000000000000000000000000065a57c180000000000000000ffffffff60342c2b2a284801019fffb8e8af80f298cefbc832633b545151ef8eb59eb427e724054e1cab56efbf000f21330000000000000000000000000000000084563886eda33f200028352113821158e21bb68cfc80102d221340422b1c4376d19f90022f2e219fbf955555555555555555555555555555555555555555555555555555555555555502812a05f20000000000000000000000000000000000000000000000000000000000000000000000000000000000204a22130108ac710d90c501c0083130219fbf66666666666666666666666666666666666666666666666666666666666666660502540be400000000000000000000000000000000000000000000000000000000000000000000000000000000004036221460108ac710d4643854003332219bbe8f64c6afbff3dd10d8ba6707790ac9670d540f37a9448b0337baa6a5a92acac021dcd6500000000000000000000000000000000000000000000000000000000000000000000000000000000002382165df40845638869f68160000000000000000000000000000000000000000000000000000000000000000000000000000000000046a0011000000000000000010284801018036bd5aa65bd160ccc4f204a44731afdb62bab1ab21c9496af2fc1b4d226ccd00032271cff33333333333333333333333333333333333333333333333333333333333333332cc9ba500000000000000000000000001409502f90016d0c037004900000000000000000000000000000000000000000000000000000000000000000000000001236fcff04f64c6afbff3dd10d8ba6707790ac9670d540f37a9448b0337baa6a5a92acac21881f4800000000000000000000000010ee6b28017f0473945004811ef55aa0000000000000000000000000000000000000000000000000000000000000000231340422b1c437989ce38063d3bae219fbf955555555555555555555555555555555555555555555555555555555555555502812a05f200393159c085ce242a1fe7dc6f3b4ef0cfbf54eef7ad3f40de588995b86f9c2f46400000000003d092203c2271cff555555555555555555555555555555555555555555555555555555555555555533a973dc00000000000000000003d0925409502f90015d04c4b23130108ac710d9ba5bc6018423eae219fbf66666666666666666666666666666666666666666666666666666666666666660502b95fd5003794d7a89bf0b1b83d2e445fab3781b81d7584baecb59bebf56b2e2f1fb798f3800000000007a121403f2271cff33333333333333333333333333333333333333333333333333333333333333332ce9bcbc00000000000000000003d090d40ae57f54016d0c040015188caa7e20000000000000000000000000000000000000000000000000000000000000000000000000141001f65a5823b65a57fe3609184e72a000010231460108ac710d4479c1c014843ae219bbe8f64c6afbff3dd10d8ba6707790ac9670d540f37a9448b0337baa6a5a92acac0213ab668031a93e8c798b2cb3e2acc80b1abde06ed7b06270a03fe422373e797c88470ea8c00000000003d092244236fcff04f64c6afbff3dd10d8ba6707790ac9670d540f37a9448b0337baa6a5a92acac21881f4800000000000000000003d093109d5b34017f047464528480101986c49971b96062e1fba4410e27249c8d73b0a9380f7ffd44640167e68b215e80003004811ef55ac00000000000000000000000000000000000000000000000000000000000000002848010145910e27fe37d8dcf1fac777ebb3bda38ae1ea8389f81bfb1bc0079f3f67ef5b00022265df40845638869fc774100fb887249507b17fc5674e8ad1ae8058eddc490c24e8c0138896214d64c0a4637800000000007a121cae492477cff000000000000000000000000000000000000000000000000000000000000000021881c9400000000000000000003d09121158e21a7f1dd04033c0ae6c6ba72271cff555555555555555555555555555555555555555555555555555555555555555533a973dc0000000000000000000000001409502f90015d04c4b21490000000013311def76051bbabfb248bd9a90d300716f598ffe8f8b65c8fddd8501b0e8c640532848010160d01ddc9d54e89cf8040b78fab3258c9327109018e4078f7f5c7ff0ba401aa2000c2455cc26aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaac22b1c4379fc3f180654534eae02bf0001f530ba430000000060000000000000000800000000000000000000000282920ce6f4b300f9bafaff9bf8604ac6cceb4b53598d03abc3d113b4803702bad5a69b6f03e7126bc6ee061bd3bb75f53b946845e2eb9067bd5b31527fd91f00be524f020120515000b3bfecabb049ff67c5388c8bbc8010e2e757141a27180b24e1450e6eced5c6273178a32d2be2f8000000000000000800000008000000000000000800000000000000000000000000000000000000000000000000000000000000040073dfe8cb4af8be0000000000000002000000020000000000000002000000000000000000000000000000000000000000000000000000000000000100abd040000000000000002000000000000000000000000a0a48339bd2cc03e6ebebfe6fe1812b1b33ad2d4d66340eaf0f444ed200dc0aeb569a6dbc0f9c49af1bb8186f4eedd7d4ee51a1178bae419ef56cc549ff647c1028480101aa559cb80ee5ce3f4b1e6107ec3ea424c2b89946804aad09f246e96353cc15c5000e0103d0405501eb50000000000000000800000000000000000000000000000005a2f25be03d373e41b62e16fb0d999a97235b40ea71f1522a5fa982a817ea60fd265bcbc973e584eb1eab6b3ea65309a0a32cec006e1bee4f781214122612c4d000000000040000000000000007fffffff800000004cb4af986000000c9560003002001099b2dcef0205802090d96e77810605902090d96e778105c5a0246bfa9346e9464c7f146a6be4225b1c98e29a59561fbb67319922eda6acc69f6b91300305ba10106460600b902094365b9de045f5d0251bf084dd4db5a349ccfcf293baf5f5b626f4a130856b6613ded62877bfecc2536dcd96e7780cd96e77a5e92010c46060365b9de970245bf2ac017c203ca0d9d008bf543c1364eebf27183668cf1e8b1e0e98af56b2dc1dc00c2ba770203001068610246bf919848778310ed687087000647581469374dff5e9f0fb1cf744809c5016e12fb0030676203b57ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffef00000000000f42450000000000000000000000000000000000000000000000000000000000000000000000000000000065a57c5f0003e665b9448656463001f040901efe92001c0332dca2365b9de4000827290aec8965afabb16ebc3cb9b408ebae71b618d78788bc80d09843593cac98da490aec8965afabb16ebc3cb9b408ebae71b618d78788bc80d09843593cac98da40201e0b4660101df970106460600b40246bfad8011dbd0ddd5549e65b1288c858e77dc3e0a5ba9eae0d756ca2e8b5731753e003069a90106460600ad2377cff0000000000000000000000000000000000000000000000000000000000000000212819f400000000000000000000000021158e21a7da0580013c06c6ba700480000000045f1e3dc29d6bf453889c449069a2458b2d56701fc3661d498162f743e5ba6210098ff0020dd2082014c97ba9730ed44d0d70b1fe0a4f260810200d71820d70b1fed44d0d31fd3ffd15112baf2a122f901541044f910f2a2f80001d31f31d307d4d101fb00a4c8cb1fcbffc9ed54020101736e0297bf955555555555555555555555555555555555555555555555555555555555555502aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaad0000000000003d092016f7203af7555555555555555555555555555555555555555555555555555555555555555500000000000f42480000000000000000000000000000000000000000000000000000000000000000000000000000000065a57c5f0001408817270020530302471a3009e41106e625a0000000000000000002e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008272ae405edf07a33e732225cf9180254cdfea049b9a29cd37e66747b23925b587dedaabd972671678ffefceb6d77eea0619da90081beed6cceee9180f03acf71a9c02010182740397bf66666666666666666666666666666666666666666666666666666666666666660533333333333333333333333333333333333333333333333333333333333333339f000000000007a120087c7675008272b594683d1b0f1242a1ace8917e2a0c0ee1f0307ce39646065f5038d58ca23ff7d855aea1ede2adcff55d3d37fcf59c03bd19c39f843a14faef85cad3980cf692010340407703af7333333333333333333333333333333333333333333333333333333333333333300000000000f4242cac3c5723cb68f5f7dba257e7f812140298ea360bdbf630cd33c8da2b098829200000000000f424165a57c5f00014087b7a78020f04091954fc40181179a3009e41778c0a604000000000000000003e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000082729304b9982993165dc7b4b2ccfc64c61bf6455afe7e4fe1233d5f827261360d8ed855aea1ede2adcff55d3d37fcf59c03bd19c39f843a14faef85cad3980cf6920101a0bb010350407d03af7333333333333333333333333333333333333333333333333333333333333333300000000000f42410000000000000000000000000000000000000000000000000000000000000000000000000000000065a57c5f000140881807e02052030247fa3009e439e2e625a0000000000000000007500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008272b594683d1b0f1242a1ace8917e2a0c0ee1f0307ce39646065f5038d58ca23ff79304b9982993165dc7b4b2ccfc64c61bf6455afe7e4fe1233d5f827261360d8e000120020360109e830395be8f64c6afbff3dd10d8ba6707790ac9670d540f37a9448b0337baa6a5a92acac02827b26357dff9ee886c5d3383bc8564b386aa079bd4a245819bdd5352d4956564f000000000003d09019084bf0103d8208503af704f64c6afbff3dd10d8ba6707790ac9670d540f37a9448b0337baa6a5a92acac00000000000f424873b47eb527e2e6b9a73405d88f31477703ef31e5c4f2b8a2be754d66be0d60ff00000000000f424765a57c5f000740888878602053030249c9b00827216617de1e9f3a79e4c7d8a3a51ac0c8b54b6bbcd4f824c9f800aa2f36fee2672d4d2e789fd57af824d33228887af40bcfb492aebe39ec74d665726b6471454ab010160890201db8c8a0101488b00ab29fe09ec98d5f7fe7ba21b174ce0ef21592ce1aa81e6f528916066f754d4b52559593ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbd01efe92000000000000001e8496cb4af8be400201208f8d0101208e008be7f827b26357dff9ee886c5d3383bc8564b386aa079bd4a245819bdd5352d495656240e8cae6e880eb79a200000000000f424a65a57c5f00012195b1b1bcb081ddbdc9b19086010120be02010198910103f0209203af704f64c6afbff3dd10d8ba6707790ac9670d540f37a9448b0337baa6a5a92acac00000000000f4247d59d160ea9c63d10edae2c76ada993f982915bc75f7bcc0fb81280820d15523200000000000f424165a57c5f0001408969593020f0c0901c9c380181194a3009c402468bb8000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008272bf8229e6e684701825a6f8e1fb0f8155aba759d58b82e73b8405092874e23fa816617de1e9f3a79e4c7d8a3a51ac0c8b54b6bbcd4f824c9f800aa2f36fee26720101a09700b959ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdf3fc13d931abeffcf744362e99c1de42b259c35503cdea5122c0cdeea9a96a4ab2b101c9c380006cb73bc00000000001e848ccb4af8be7fffffffc0010364109903af704f64c6afbff3dd10d8ba6707790ac9670d540f37a9448b0337baa6a5a92acac00000000000f42410000000000000000000000000000000000000000000000000000000000000000000000000000000065a57c5f0007408b19d9a02052030249c9b0061c000000000000600000000000719ae84f17b8f8b22026a975ff55f1ab19fde4a768744d2178dfa63bb533e107a40d03c04009e42664e625a0000000000000000003000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008272f1f67337526ee9890e137d5255f3150400e63d15dfe04b26653d275f2d0a6b04bf8229e6e684701825a6f8e1fb0f8155aba759d58b82e73b8405092874e23fa80358df40500000000000000000000000000000000000000000000000000000000000000009f000000000007a1200a8a09f0082725828aa96d32f676df2049228847cc42b15b0a52d9ffa3bc66b36fcedeff20af9606c97d0dc8b63016a6afd67b2fe52cd0e02a3dcdf71f331cf1e8006ca8e51a301035040a103af7000000000000000000000000000000000000000000000000000000000000000000000000000f42439440e0c397a3b2ee3cbd81ea78021862f892a5a9e779d1fecd55236d6571eb5200000000000f424165a57c5f0001408a6a5a2020f0409017d78401811a4a3005bc00000000000000000000000012d452da449e50b8cf7dd27861f146122afe1b546bb8b70fc8216f0c614139f8e04009a27c89c4000000000000000000300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008272310a1de222ce584cb4e86613b11d31616e9eaa4ff9ee499f19b104cf71eb504f606c97d0dc8b63016a6afd67b2fe52cd0e02a3dcdf71f331cf1e8006ca8e51a30101a0b9284801012d8973441aaae38b20c3fda9274f0a97de1447af2ecd7e424267fcca9901866b000301035040a903af7000000000000000000000000000000000000000000000000000000000000000000000000000f42410000000000000000000000000000000000000000000000000000000000000000000000000000000065a57c5f0001408acabaa0113040829a40cd41efffe02ae0082725828aa96d32f676df2049228847cc42b15b0a52d9ffa3bc66b36fcedeff20af9310a1de222ce584cb4e86613b11d31616e9eaa4ff9ee499f19b104cf71eb504f0101a0ad01a369fe00000000000000000000000000000000000000000000000000000000000000013fc000000000000000000000000000000000000000000000000000000000000000020000000000001e8480cb4af8be40ae020120b0af0015bfffffffbcbd1a94a200100015be000003bcb3670dc15550010160b20201dbb5b3010148b400ab29fe09ec98d5f7fe7ba21b174ce0ef21592ce1aa81e6f528916066f754d4b52559593ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbd01efe92000000000000001e8488cb4af8be40020120b8b6010120b7008be7f827b26357dff9ee886c5d3383bc8564b386aa079bd4a245819bdd5352d495656240e8cae6e880eb79a200000000000f424365a57c5f00012195b1b1bcb081ddbdc9b19086010120b900ab29fe09ec98d5f7fe7ba21b174ce0ef21592ce1aa81e6f528916066f754d4b52559593fc0000000000000000000000000000000000000000000000000000000000000001017d784000000000000001e8484cb4af8be400106460600bb00ab69fe00000000000000000000000000000000000000000000000000000000000000013fccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccd1954fc4000000000000001e8480cb4af8be400173a7e00000000000000020847cbb01de39c3308edf1091131c7dedb780ca3e34d85bdc1a6ab4df16d79e800000000003d092400000000003d09260bd0106460600be00ab29fe09ec98d5f7fe7ba21b174ce0ef21592ce1aa81e6f528916066f754d4b52559593fc0000000000000000000000000000000000000000000000000000000000000001017d784000000000000001e8492cb4af8be40008272f1f67337526ee9890e137d5255f3150400e63d15dfe04b26653d275f2d0a6b04d4d2e789fd57af824d33228887af40bcfb492aebe39ec74d665726b6471454ab28480101febfd56fa7c2a5010aea13c738df0c2155d6670e8b055dd312d2372f38f7701b000ec568a57c")
- .endCell();
- log.info("CellType {}", c.getCellType());
- Block block = Block.deserialize(CellSlice.beginParse(c));
- log.info("block {}", block);
- List txs = block.getAllTransactions();
- log.info("txs {}", txs);
- block.printAllTransactions();
- block.printAllMessages();
- }
-
- @Test
- public void testShouldDeserializeBlock2() {
- Cell c =
- CellBuilder.beginCell()
- .fromBoc(
- "b5ee9c72e10211010002b800001c00c400de0170020402a0033c0346035803a4040a0422042a04f20562056a0571041011ef55aaffffff110102030402a09bc7a98700000000800100000001000000000000000000000000000000000065a57c6500000000004c4b4000000000004c4b41f530ba43000000000000000400000000c400000004000000000000002e05060211b8e48dfb43b9aca00407080a8a04b45e4b7c07a6e7c836c5c2df61b33352e46b681d4e3e2a454bf5305502fd4c1fddf467caa9989b5c1f035b5c4e7c5ac8c31d8c2528f8d773b7ae3bf2ecdc2ffe00010002090a03894a33f6fdc1982ce574b6b30d1b8a1574d1fcdb9056434fbcdced45d451545011e0b48651d9576093fecf8a711917790021c5ceae28344e301649c28a1cdd9dab8c4e62f1400f1010009800000000003d0908000000045121fb8e9ad96a839c8b148b7598e70577e0b31449f83731347af3f97e632fc87bb5caea234b002a390f4ab673c842f3466dedcdf838a2a51bf49a0af3d78fab0098000000000000000000000000b45e4b7c07a6e7c836c5c2df61b33352e46b681d4e3e2a454bf5305502fd4c1fa4cb79792e7cb09d63d56d67d4ca613414659d800dc37dc9ef02428244c2589a0005000008000d0010ee6b28000828480101b45e4b7c07a6e7c836c5c2df61b33352e46b681d4e3e2a454bf5305502fd4c1f0001035b9023afe2ffffff1100000000000000000000000000000000010000000065a57c6500000000004c4b4100000004200b0c0d01110000000000000000500e0003001000c300000000000000000000000000000001021dcd6500100000000003d0908000000045121fb8e9ad96a839c8b148b7598e70577e0b31449f83731347af3f97e632fc87bb5caea234b002a390f4ab673c842f3466dedcdf838a2a51bf49a0af3d78fab8006bb040000000000000000000000200000000001e8483ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc000030020000102a62c29b8")
- .endCell();
- log.info("CellType {}", c.getCellType());
- Block block = Block.deserialize(CellSlice.beginParse(c));
- log.info(
- "inMsg {}, outMsg {}, account blocks {}, block {}",
- block.getExtra().getInMsgDesc().getCount(),
- block.getExtra().getOutMsgDesc().getCount(),
- block.getExtra().getShardAccountBlocks().elements.size(),
- block);
-
- block.printAllTransactions();
- block.printAllMessages();
- }
-
- @Test
- public void testShouldDeserializeBlock3() {
- Cell c =
- CellBuilder.beginCell()
- .fromBoc(
- "b5ee9c72e102c101001e7900001c00c200dc01b2024802e4031803340388039803ea0440045204a804ba0512056205ca063206480662069c06e80704072007c607e2088808f409960a180a920ade0b580ba60c200c3a0cde0d200d820d9e0e0e0e880f020f4f101610c610d011481200121e123c12e2130013a6141414b6153a15d71623166f16e81735178017cd1846189318ea190e198819d51a251a711a821a8e1aa01aee1b3c1b4e1b9c1bea1c441c901ca41cf21d461d501d5d1d691dbc1e0a1e171e261e391e861ed21edc1ee91ef81f021fae1fb8205820a8214a2154215e21e4229e2324233223d4248e2495251b252825ca268b2694271b273e274627a828482852285c28e2299d29a42a2a2a422ae02aea2af42b7a2b842b8e2c492c502cd62ce42cee2cf82d002d082d102dc12e512f012fbb2fc230483060311f31be3279328033063314331e332833303338334033f13481353135d336393643366636703762376a3774377e378b3845384c38d238ea399b3a3c3a9d3aa93b633b6a3bf03c0a3cb53cbf3cd83cf2041011ef55aaffffff110102030401a09bc7a987000000000001000000010000000000ffffffff000000000000000065a57c5f00000000000f424000000000000f424cf530ba43000000000000000100000000c400000004000000000000002e050211b8e48dfb465ec8780406071a8af25bc2df9aae9c490d507c11f4d756cb8dc51a86d9efa94e3dae27283ba149ce0009045052419cde96601f375f5ff37f0c0958d99d696a6b31a075787a22769006e057724ab9590a228d7373ef8d28544bea428d454ad789b07c24ceb3fc7a07c32c5900140014111204894a33f6fd789a0f4a1d0352df0638d90269bafa60236a1c793ec9cf4236b6bac9cf6e20a0d9576093fecf8a711917790021c5ceae28344e301649c28a1cdd9dab8c4e62f1c008090a0b00980000000000000000000000005052419cde96601f375f5ff37f0c0958d99d696a6b31a075787a22769006e0575ab4d36de07ce24d78ddc0c37a776ebea7728d08bc5d720cf7ab662a4ffb23e0012d84563886eda33f200422b1c437989ce3804081b6b0b008be01150232a9f88011954fc40018be11097e7962208ebbff6bf2885d99ad2bbab54de961312de7847b8fa3b400a6f8c31d00089b2dcef020490109a06dac2c020c110716d4b19170a07e8775c50a0af5461c5b87fcc5878ff7d437f310933958a9d808000d9996e512621307f2514b5db2c0d8cab0bd8cbd51e3e6c7304b65a1b7c0222dcfa33339c5a7ea640007cca56004a9aaab02091036d616010d0e12090c349ad122ad99ef25e8b7753cd0015b5dbedec46ca98e6b567455a9ef0408f90008101efe9201525302091017d784010f10120bf43cb4609d2e5902366b629cd8c02278e730f5a4e5a40b1ac7b303de9c7dc5e700074405f5e10040595a120341a1ee8154366921e3340d1007d7ed026f32a2d60dd4d48af490b856ce5581c0000750405e5f245b9023afe2ffffff1100ffffffff0000000000000000000000000000000065a57c180000000000000000ffffffff6013141516245b9023afe2ffffff1100ffffffff0000000000000000000000010000000065a57c5f00000000000f424c00000001602425262700110000000000000000102113821158e21bb68cfc80101721330000000000000000000000000000000084563886eda33f2000282c284801019fffb8e8af80f298cefbc832633b545151ef8eb59eb427e724054e1cab56efbf000f221340422b1c4376d19f9002181922130108ac710d90c501c0081a1b219fbf955555555555555555555555555555555555555555555555555555555555555502812a05f200000000000000000000000000000000000000000000000000000000000000000000000000000000002023221460108ac710d4643854001c1d219fbf66666666666666666666666666666666666666666666666666666666666666660502540be4000000000000000000000000000000000000000000000000000000000000000000000000000000000040212165df40845638869f68160000000000000000000000000000000000000000000000000000000000000000000000000000000000041e219bbe8f64c6afbff3dd10d8ba6707790ac9670d540f37a9448b0337baa6a5a92acac021dcd65000000000000000000000000000000000000000000000000000000000000000000000000000000000021f2377cff0000000000000000000000000000000000000000000000000000000000000000212819f400000000000000000000000021158e21a7da0580013c03a3b3c236fcff04f64c6afbff3dd10d8ba6707790ac9670d540f37a9448b0337baa6a5a92acac21881f4800000000000000000000000010ee6b28017f03e2040004811ef55aa00000000000000000000000000000000000000000000000000000000000000002271cff33333333333333333333333333333333333333333333333333333333333333332cc9ba500000000000000000000000001409502f90016d042220049000000000000000000000000000000000000000000000000000000000000000000000000012271cff555555555555555555555555555555555555555555555555555555555555555533a973dc0000000000000000000000001409502f90015d046470211800000000007a124d028293213f67853e1526776d1b23d485fb81f769071332488bcf051b56df075d6bd5b592a1ade8ffd445f48e56ad87fb9c35eaae2697c251894e22a4bf2929bf7b675646300130007821158e21bcc4e71c03032be22390000000000000000000000000000000184563886f3139c7009cc4b4028be2c2455cc26aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaac22b1c4379fc3f1806a9482dbe0213e2000000000000f424982a2b006bb0400000000000000000000000800000000007a1234909ba9b6b469399f9e52775ebeb6c4de942610ad6cc27bdac50ef7fd984a6dbc00173a7e00000000000000020847cbb01de39c3308edf1091131c7dedb780ca3e34d85bdc1a6ab4df16d79e800000000003d092400000000003d092605b0173a7ffffffffffffffffd64515aa043f53a3f60eaf663295c8a035537a617a3cc21f5e94859356c021f6400000000003d092c00000000003d092e058284801018036bd5aa65bd160ccc4f204a44731afdb62bab1ab21c9496af2fc1b4d226ccd000302bf0001f530ba430000000060000000000000000800000000000000000000000282920ce6f4b300f9bafaff9bf8604ac6cceb4b53598d03abc3d113b4803702bad5a69b6f03e7126bc6ee061bd3bb75f53b946845e2eb9067bd5b31527fd91f00be2e2f00abd040000000000000002000000000000000000000000a0a48339bd2cc03e6ebebfe6fe1812b1b33ad2d4d66340eaf0f444ed200dc0aeb569a6dbc0f9c49af1bb8186f4eedd7d4ee51a1178bae419ef56cc549ff647c1002012030310073dfe8cb4af8be0000000000000002000000020000000000000002000000000000000000000000000000000000000000000000000000000000000100b3bfecabb049ff67c5388c8bbc8010e2e757141a27180b24e1450e6eced5c6273178a32d2be2f800000000000000080000000800000000000000080000000000000000000000000000000000000000000000000000000000000004231340422b1c437989ce38063334be23130108ac710d9ba5bc60183536be219fbf955555555555555555555555555555555555555555555555555555555555555502812a05f200393159c085ce242a1fe7dc6f3b4ef0cfbf54eef7ad3f40de588995b86f9c2f46400000000003d0922045231460108ac710d4479c1c013738be219fbf66666666666666666666666666666666666666666666666666666666666666660502b95fd5003794d7a89bf0b1b83d2e445fab3781b81d7584baecb59bebf56b2e2f1fb798f3800000000007a12140412265df40845638869fc774100fb887249507b17fc5674e8ad1ae8058eddc490c24e8c0138896214d64c0a4637800000000007a121cbe39219bbe8f64c6afbff3dd10d8ba6707790ac9670d540f37a9448b0337baa6a5a92acac0213ab668031a93e8c798b2cb3e2acc80b1abde06ed7b06270a03fe422373e797c88470ea8c00000000003d09223d2477cff000000000000000000000000000000000000000000000000000000000000000021881c9400000000000000000003d09121158e21a7f1dd04033c0be3a3b3c0098ff0020dd2082014c97ba9730ed44d0d70b1fe0a4f260810200d71820d70b1fed44d0d31fd3ffd15112baf2a122f901541044f910f2a2f80001d31f31d307d4d101fb00a4c8cb1fcbffc9ed5400480000000045f1e3dc29d6bf453889c449069a2458b2d56701fc3661d498162f743e5ba621284801012d8973441aaae38b20c3fda9274f0a97de1447af2ecd7e424267fcca9901866b0003236fcff04f64c6afbff3dd10d8ba6707790ac9670d540f37a9448b0337baa6a5a92acac21881f4800000000000000000003d093109d5b34017f03e3f402848010145910e27fe37d8dcf1fac777ebb3bda38ae1ea8389f81bfb1bc0079f3f67ef5b0002004811ef55ac000000000000000000000000000000000000000000000000000000000000000028480101986c49971b96062e1fba4410e27249c8d73b0a9380f7ffd44640167e68b215e800032271cff33333333333333333333333333333333333333333333333333333333333333332ce9bcbc00000000000000000003d090d40ae57f54016d0424328480101febfd56fa7c2a5010aea13c738df0c2155d6670e8b055dd312d2372f38f7701b000e015188caa7e20000000000000000000000000000000000000000000000000000000000000000000000000144001f65a5823b65a57fe3609184e72a0000102271cff555555555555555555555555555555555555555555555555555555555555555533a973dc00000000000000000003d0925409502f90015d046472848010160d01ddc9d54e89cf8040b78fab3258c9327109018e4078f7f5c7ff0ba401aa2000c21490000000013311def76051bbabfb248bd9a90d300716f598ffe8f8b65c8fddd8501b0e8c6404828480101aa559cb80ee5ce3f4b1e6107ec3ea424c2b89946804aad09f246e96353cc15c5000e02090d96e778104a4b020300104c4d02090d96e778104e4f0246bfad8011dbd0ddd5549e65b1288c858e77dc3e0a5ba9eae0d756ca2e8b5731753e0030b8b90246bf919848778310ed687087000647581469374dff5e9f0fb1cf744809c5016e12fb0030577502094365b9de0450510246bfa9346e9464c7f146a6be4225b1c98e29a59561fbb67319922eda6acc69f6b9130030617f0245bf2ac017c203ca0d9d008bf543c1364eebf27183668cf1e8b1e0e98af56b2dc1dc00c2b0b10251bf084dd4db5a349ccfcf293baf5f5b626f4a130856b6613ded62877bfecc2536dcd96e7780cd96e77a5d950244bfaeffebddf2ee4f04633ee2bbba628ae4e08b6e0043d11727286b0df248a2e177009389020b6501efe9201054550343beccc243bc18876b43843800323ac0a349ba6ffaf4f87d8e7ba2404e280b7097d814578956024bbec8a2b54087ea747ec1d5ecc652b91406aa6f4c2f479843ebd290b26ad8043eca03dfd2400c589b02016157750106460600940106460600a6024bbf0847cbb01de39c3308edf1091131c7dedb780ca3e34d85bdc1a6ab4df16d79e9017d7840065b9b0343bf084dd4db5a349ccfcf293baf5f5b626f4a130856b6613ded62877bfecc2536dc0a5d755c0106460600a4020766cb73bd5d95010c46060365b9de990343bf24d1ba51931fc51a9af90896c72638a6965587eed9cc6648bb69ab31a7dae44c0a6189600243bf17c9d39d78e8498a560800ddfb11dc48be1bc0edc2fbf90844eceb5ab464961002a59b020161617f01064606009202070ccb72896364020101656602a4bffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff79996e5117ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbe8000000000001e848a665b944757702010167680297bf955555555555555555555555555555555555555555555555555555555555555502aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaad0000000000003d0920170721203c3c94d7ae89f0cd6db6fe18c55144a27722be36ffd9c9fffd3a729dc3c93d176000960107a7b0397bf66666666666666666666666666666666666666666666666666666666666666660533333333333333333333333333333333333333333333333333333333333333339f000000000007a12008696a6b010350406c01034040b1008272b594683d1b0f1242a1ace8917e2a0c0ee1f0307ce39646065f5038d58ca23ff7d855aea1ede2adcff55d3d37fcf59c03bd19c39f843a14faef85cad3980cf69203af7333333333333333333333333333333333333333333333333333333333333333300000000000f42410000000000000000000000000000000000000000000000000000000000000000000000000000000065a57c5f0001408716d6e008272b594683d1b0f1242a1ace8917e2a0c0ee1f0307ce39646065f5038d58ca23ff79304b9982993165dc7b4b2ccfc64c61bf6455afe7e4fe1233d5f827261360d8e02052030246fb7009e439e2e625a000000000000000000750000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003af7555555555555555555555555555555555555555555555555555555555555555500000000000f42480000000000000000000000000000000000000000000000000000000000000000000000000000000065a57c5f0001408717273000120008272ae405edf07a33e732225cf9180254cdfea049b9a29cd37e66747b23925b587dedaabd972671678ffefceb6d77eea0619da90081beed6cceee9180f03acf71a9c020530302474b7009e41106e625a0000000000000000002e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003b57ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffef00000000000f42450000000000000000000000000000000000000000000000000000000000000000000000000000000065a57c5f0003e665b94487677780201e0947900827290aec8965afabb16ebc3cb9b408ebae71b618d78788bc80d09843593cac98da490aec8965afabb16ebc3cb9b408ebae71b618d78788bc80d09843593cac98da4001f040901efe92001c0332dca2365b9de400101df990358df40500000000000000000000000000000000000000000000000000000000000000009f000000000007a12007c7d7e0395be8f64c6afbff3dd10d8ba6707790ac9670d540f37a9448b0337baa6a5a92acac02827b26357dff9ee886c5d3383bc8564b386aa079bd4a245819bdd5352d4956564f000000000003d090184858601035040b9010350407f0082725828aa96d32f676df2049228847cc42b15b0a52d9ffa3bc66b36fcedeff20af9606c97d0dc8b63016a6afd67b2fe52cd0e02a3dcdf71f331cf1e8006ca8e51a303af7000000000000000000000000000000000000000000000000000000000000000000000000000f42439440e0c397a3b2ee3cbd81ea78021862f892a5a9e779d1fecd55236d6571eb5200000000000f424165a57c5f00014088081820101a092008272310a1de222ce584cb4e86613b11d31616e9eaa4ff9ee499f19b104cf71eb504f606c97d0dc8b63016a6afd67b2fe52cd0e02a3dcdf71f331cf1e8006ca8e51a3020f0409017d7840181183b7009a27c89c400000000000000000030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002010187880103d8209b008272f1f67337526ee9890e137d5255f3150400e63d15dfe04b26653d275f2d0a6b04d4d2e789fd57af824d33228887af40bcfb492aebe39ec74d665726b6471454ab01036410890103f0209503af704f64c6afbff3dd10d8ba6707790ac9670d540f37a9448b0337baa6a5a92acac00000000000f42410000000000000000000000000000000000000000000000000000000000000000000000000000000065a57c5f00074088a8b8c0101608d008272f1f67337526ee9890e137d5255f3150400e63d15dfe04b26653d275f2d0a6b04bf8229e6e684701825a6f8e1fb0f8155aba759d58b82e73b8405092874e23fa80205203024a7a80201db8e8f020120909101014894010120920101209300ab29fe09ec98d5f7fe7ba21b174ce0ef21592ce1aa81e6f528916066f754d4b52559593fc0000000000000000000000000000000000000000000000000000000000000001017d784000000000000001e8484cb4af8be40008be7f827b26357dff9ee886c5d3383bc8564b386aa079bd4a245819bdd5352d495656240e8cae6e880eb79a200000000000f424365a57c5f00012195b1b1bcb081ddbdc9b1908600ab29fe09ec98d5f7fe7ba21b174ce0ef21592ce1aa81e6f528916066f754d4b52559593ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbd01efe92000000000000001e8488cb4af8be4003af704f64c6afbff3dd10d8ba6707790ac9670d540f37a9448b0337baa6a5a92acac00000000000f4247d59d160ea9c63d10edae2c76ada993f982915bc75f7bcc0fb81280820d15523200000000000f424165a57c5f00014089697980101a099008272bf8229e6e684701825a6f8e1fb0f8155aba759d58b82e73b8405092874e23fa816617de1e9f3a79e4c7d8a3a51ac0c8b54b6bbcd4f824c9f800aa2f36fee2672020f0c0901c9c38018119ab700b959ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdf3fc13d931abeffcf744362e99c1de42b259c35503cdea5122c0cdeea9a96a4ab2b101c9c380006cb73bc00000000001e848ccb4af8be7fffffffc0009c402468bb800000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003af704f64c6afbff3dd10d8ba6707790ac9670d540f37a9448b0337baa6a5a92acac00000000000f424873b47eb527e2e6b9a73405d88f31477703ef31e5c4f2b8a2be754d66be0d60ff00000000000f424765a57c5f00074089c9d9e0101609f00827216617de1e9f3a79e4c7d8a3a51ac0c8b54b6bbcd4f824c9f800aa2f36fee2672d4d2e789fd57af824d33228887af40bcfb492aebe39ec74d665726b6471454ab0205303024a7a80201dba0a1020120a2a3010148a6010120a4010120a500ab29fe09ec98d5f7fe7ba21b174ce0ef21592ce1aa81e6f528916066f754d4b52559593fc0000000000000000000000000000000000000000000000000000000000000001017d784000000000000001e8492cb4af8be40008be7f827b26357dff9ee886c5d3383bc8564b386aa079bd4a245819bdd5352d495656240e8cae6e880eb79a200000000000f424a65a57c5f00012195b1b1bcb081ddbdc9b1908600ab29fe09ec98d5f7fe7ba21b174ce0ef21592ce1aa81e6f528916066f754d4b52559593ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbd01efe92000000000000001e8496cb4af8be40009e42664e625a00000000000000000030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000061c000000000000600000000000719ae84f17b8f8b22026a975ff55f1ab19fde4a768744d2178dfa63bb533e107a40d03c040103d040ac001fb0000000004000000000000000000004020170aeaf01eb50000000000000000800000000000000000000000000000005a2f25be03d373e41b62e16fb0d999a97235b40ea71f1522a5fa982a817ea60fd265bcbc973e584eb1eab6b3ea65309a0a32cec006e1bee4f781214122612c4d000000000040000000000000007fffffff800000004cb4af986000000c9ad00030020020161b0b1020161b8b90106460600b503af7333333333333333333333333333333333333333333333333333333333333333300000000000f4242cac3c5723cb68f5f7dba257e7f812140298ea360bdbf630cd33c8da2b098829200000000000f424165a57c5f0001408b2b3b40101a0b50082729304b9982993165dc7b4b2ccfc64c61bf6455afe7e4fe1233d5f827261360d8ed855aea1ede2adcff55d3d37fcf59c03bd19c39f843a14faef85cad3980cf692020f04091954fc401811b6b700ab69fe00000000000000000000000000000000000000000000000000000000000000013fccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccd1954fc4000000000000001e8480cb4af8be40009e41778c0a604000000000000000003e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005bc00000000000000000000000012d452da449e50b8cf7dd27861f146122afe1b546bb8b70fc8216f0c614139f8e040106460600bd03af7000000000000000000000000000000000000000000000000000000000000000000000000000f42410000000000000000000000000000000000000000000000000000000000000000000000000000000065a57c5f0001408babbbc0101a0bd0082725828aa96d32f676df2049228847cc42b15b0a52d9ffa3bc66b36fcedeff20af9310a1de222ce584cb4e86613b11d31616e9eaa4ff9ee499f19b104cf71eb504f0113040829a40cd41efffe02be01a369fe00000000000000000000000000000000000000000000000000000000000000013fc000000000000000000000000000000000000000000000000000000000000000020000000000001e8480cb4af8be40be020120bfc00015be000003bcb3670dc155500015bfffffffbcbd1a94a2001051df4184")
- .endCell();
- log.info("CellType {}", c.getCellType());
- Block block = Block.deserialize(CellSlice.beginParse(c));
- log.info(
- "inMsg {}, outMsg {}, account blocks {}, block {}",
- block.getExtra().getInMsgDesc().getCount(),
- block.getExtra().getOutMsgDesc().getCount(),
- block.getExtra().getShardAccountBlocks().elements.size(),
- block);
-
- block.printAllTransactions();
- block.printAllMessages();
- }
+ @Test
+ public void testShouldDeserializeBlockInfo() {
+ Cell c =
+ CellBuilder.beginCell()
+ .fromBoc(
+ "b5ee9c724101020100a10001a09bc7a987000000000001000000010000000000ffffffff000000000000000065a57c5f00000000000f424000000000000f424cf530ba43000000000000000100000000c400000004000000000000002e0100980000000000000000000000005052419cde96601f375f5ff37f0c0958d99d696a6b31a075787a22769006e0575ab4d36de07ce24d78ddc0c37a776ebea7728d08bc5d720cf7ab662a4ffb23e02d1bf94f")
+ .endCell();
+ log.info("CellType {}", c.getCellType());
+ BlockInfo blockInfo = BlockInfo.deserialize(CellSlice.beginParse(c));
+ log.info("blockInfo {}", blockInfo);
+ assertThat(blockInfo.getEndLt()).isEqualTo(1000012);
+ assertThat(blockInfo.getGenValidatorListHashShort()).isEqualTo(4113611331L);
+ assertThat(blockInfo.getPrevRef().getPrev1().getFileHash())
+ .isEqualTo("5ab4d36de07ce24d78ddc0c37a776ebea7728d08bc5d720cf7ab662a4ffb23e0");
+ }
+
+ @Test
+ public void testShouldDeserializeValueFlow() {
+ Cell c =
+ CellBuilder.beginCell()
+ .fromBoc(
+ "b5ee9c72410106010054000211b8e48dfb4a0eebb0040105022581fa7454b05a2ea2ac0fd3a2a5d348d2954008020202012004030015bfffffffbcbd0efda563d00015be000003bcb355ab466ad0001d43b9aca00250775d8011954fc40008b63e6951")
+ .endCell();
+ log.info("CellType {}", c.getCellType());
+ ValueFlow valueFlow = ValueFlow.deserialize(CellSlice.beginParse(c));
+ log.info("valueFlow {}", valueFlow);
+ assertThat(valueFlow.getFeesCollected().getCoins()).isEqualTo(2700000000L);
+ assertThat(valueFlow.getRecovered().getCoins()).isEqualTo(2700000000L);
+ assertThat(valueFlow.getFeesImported().getCoins()).isEqualTo(1000000000L);
+ assertThat(valueFlow.getFromPrevBlk().getCoins())
+ .isEqualTo(new BigInteger("2280867924805872170"));
+ }
+
+ @Test
+ public void testShouldDeserializeStateUpdate() {
+ Cell c =
+ CellBuilder.beginCell()
+ .fromBoc(
+ "b5ee9c7241024301000be900028a045052419cde96601f375f5ff37f0c0958d99d696a6b31a075787a22769006e057724ab9590a228d7373ef8d28544bea428d454ad789b07c24ceb3fc7a07c32c59001400140301245b9023afe2ffffff1100ffffffff0000000000000000000000010000000065a57c5f00000000000f424c0000000160160224112213821158e21bcc4e71c0300626245b9023afe2ffffff1100ffffffff0000000000000000000000000000000065a57c180000000000000000ffffffff600529041521330000000000000000000000000000000084563886eda33f200028250011000000000000000010231340422b1c437989ce3806090726219fbf955555555555555555555555555555555555555555555555555555555555555502812a05f200393159c085ce242a1fe7dc6f3b4ef0cfbf54eef7ad3f40de588995b86f9c2f46400000000003d09220082271cff555555555555555555555555555555555555555555555555555555555555555533a973dc00000000000000000003d0925409502f90015d02f2d23130108ac710d9ba5bc60180e0a26219fbf66666666666666666666666666666666666666666666666666666666666666660502b95fd5003794d7a89bf0b1b83d2e445fab3781b81d7584baecb59bebf56b2e2f1fb798f3800000000007a121400b2271cff33333333333333333333333333333333333333333333333333333333333333332ce9bcbc00000000000000000003d090d40ae57f54016d0410c015188caa7e2000000000000000000000000000000000000000000000000000000000000000000000000010d001f65a5823b65a57fe3609184e72a000010231460108ac710d4479c1c010f21262265df40845638869fc774100fb887249507b17fc5674e8ad1ae8058eddc490c24e8c0138896214d64c0a4637800000000007a121c26102477cff000000000000000000000000000000000000000000000000000000000000000021881c9400000000000000000003d09121158e21a7f1dd04033c0263c3b3a2455cc26aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaac22b1c4379fc3f1806122e1c260103d0401301eb50000000000000000800000000000000000000000000000005a2f25be03d373e41b62e16fb0d999a97235b40ea71f1522a5fa982a817ea60fd265bcbc973e584eb1eab6b3ea65309a0a32cec006e1bee4f781214122612c4d000000000040000000000000007fffffff800000004cb4af986000000c91400030020284801019fffb8e8af80f298cefbc832633b545151ef8eb59eb427e724054e1cab56efbf000f0211800000000007a124d01817006bb0400000000000000000000000800000000007a1234909ba9b6b469399f9e52775ebeb6c4de942610ad6cc27bdac50ef7fd984a6dbc00213e2000000000000f424983d190173a7ffffffffffffffffd64515aa043f53a3f60eaf663295c8a035537a617a3cc21f5e94859356c021f6400000000003d092c00000000003d092e01a01064606001b00ab29fe09ec98d5f7fe7ba21b174ce0ef21592ce1aa81e6f528916066f754d4b52559593ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbd01efe92000000000000001e8496cb4af8be4002bf0001f530ba430000000060000000000000000800000000000000000000000282920ce6f4b300f9bafaff9bf8604ac6cceb4b53598d03abc3d113b4803702bad5a69b6f03e7126bc6ee061bd3bb75f53b946845e2eb9067bd5b31527fd91f00be201d0201201f1e00b3bfecabb049ff67c5388c8bbc8010e2e757141a27180b24e1450e6eced5c6273178a32d2be2f8000000000000000800000008000000000000000800000000000000000000000000000000000000000000000000000000000000040073dfe8cb4af8be0000000000000002000000020000000000000002000000000000000000000000000000000000000000000000000000000000000100abd040000000000000002000000000000000000000000a0a48339bd2cc03e6ebebfe6fe1812b1b33ad2d4d66340eaf0f444ed200dc0aeb569a6dbc0f9c49af1bb8186f4eedd7d4ee51a1178bae419ef56cc549ff647c10219bbe8f64c6afbff3dd10d8ba6707790ac9670d540f37a9448b0337baa6a5a92acac0213ab668031a93e8c798b2cb3e2acc80b1abde06ed7b06270a03fe422373e797c88470ea8c00000000003d092222236fcff04f64c6afbff3dd10d8ba6707790ac9670d540f37a9448b0337baa6a5a92acac21881f4800000000000000000003d093109d5b34017f0372342004811ef55ac000000000000000000000000000000000000000000000000000000000000000022390000000000000000000000000000000184563886f3139c7009cc4b40282625284801018036bd5aa65bd160ccc4f204a44731afdb62bab1ab21c9496af2fc1b4d226ccd000302012028270015bfffffffbcbd1a94a200100015be000003bcb3670dc155502113821158e21bb68cfc80102a221340422b1c4376d19f9002302b219fbf955555555555555555555555555555555555555555555555555555555555555502812a05f20000000000000000000000000000000000000000000000000000000000000000000000000000000000202c2271cff555555555555555555555555555555555555555555555555555555555555555533a973dc0000000000000000000000001409502f90015d02f2d21490000000013311def76051bbabfb248bd9a90d300716f598ffe8f8b65c8fddd8501b0e8c6402e28480101aa559cb80ee5ce3f4b1e6107ec3ea424c2b89946804aad09f246e96353cc15c5000e2848010160d01ddc9d54e89cf8040b78fab3258c9327109018e4078f7f5c7ff0ba401aa2000c22130108ac710d90c501c0083331219fbf66666666666666666666666666666666666666666666666666666666666666660502540be4000000000000000000000000000000000000000000000000000000000000000000000000000000000040322271cff33333333333333333333333333333333333333333333333333333333333333332cc9ba500000000000000000000000001409502f90016d04140221460108ac710d4643854003834219bbe8f64c6afbff3dd10d8ba6707790ac9670d540f37a9448b0337baa6a5a92acac021dcd650000000000000000000000000000000000000000000000000000000000000000000000000000000000235236fcff04f64c6afbff3dd10d8ba6707790ac9670d540f37a9448b0337baa6a5a92acac21881f4800000000000000000000000010ee6b28017f0373642004811ef55aa00000000000000000000000000000000000000000000000000000000000000002848010145910e27fe37d8dcf1fac777ebb3bda38ae1ea8389f81bfb1bc0079f3f67ef5b00022165df40845638869f6816000000000000000000000000000000000000000000000000000000000000000000000000000000000004392377cff0000000000000000000000000000000000000000000000000000000000000000212819f400000000000000000000000021158e21a7da0580013c03c3b3a284801012d8973441aaae38b20c3fda9274f0a97de1447af2ecd7e424267fcca9901866b000300480000000045f1e3dc29d6bf453889c449069a2458b2d56701fc3661d498162f743e5ba6210098ff0020dd2082014c97ba9730ed44d0d70b1fe0a4f260810200d71820d70b1fed44d0d31fd3ffd15112baf2a122f901541044f910f2a2f80001d31f31d307d4d101fb00a4c8cb1fcbffc9ed540173a7e00000000000000020847cbb01de39c3308edf1091131c7dedb780ca3e34d85bdc1a6ab4df16d79e800000000003d092400000000003d092603e01064606003f00ab29fe09ec98d5f7fe7ba21b174ce0ef21592ce1aa81e6f528916066f754d4b52559593fc0000000000000000000000000000000000000000000000000000000000000001017d784000000000000001e8492cb4af8be4000490000000000000000000000000000000000000000000000000000000000000000000000000128480101febfd56fa7c2a5010aea13c738df0c2155d6670e8b055dd312d2372f38f7701b000e28480101986c49971b96062e1fba4410e27249c8d73b0a9380f7ffd44640167e68b215e80003c9f67164")
+ .endCell();
+ log.info("CellType {}", c.getCellType());
+ MerkleUpdate merkleUpdate = MerkleUpdate.deserialize(CellSlice.beginParse(c));
+ log.info("stateUpdate {}", merkleUpdate);
+ }
+
+ @Test
+ public void testLoadBlockMaster() {
+ Cell c =
+ CellBuilder.beginCell()
+ .fromBoc(
+ "b5ee9c72e2020152000100002a490000002400cc00ea0180026202fe033003520361037a03940404047404c0056805a8069a06b4075c079c0806087608c30a160a3a0a5e0b0a0b2a0b4a0b6a0b880ba60bc20bde0bfa0c160c320cd80d5c0d800da00dec0e380e580e780e980eb60ed60ef60f160f360f560f76102010a8110e119011ae11cc11ea120612aa132a13761442148f14ae154415621580159e15bc15da15f81616163416521670168e16ac16ca16d816e616f417021710171e172c173a1748175617641772178017cc17da17e817f6180418121820182e187a1888189618a418b218c018ce18dc18ea18f8190619521976199a19e71a921ab21ad21b1f1b6b1b8a1ba81bf51c411c5e1c7a1cc71d131d2e1d4a1d971de31dfe1e4b1e661f0c1f591fdc2029207b20c721122132217f21cb21ea220a22572276229422e12300234d236c238c23d923f82445249124b024fd251c25c62613269a26e7274c279927e5286628b328d0291d293a298729a429f12a3d2a582afc2b492bc82c152c612cad2ccc2cda2d272d442d912dae2dfb2e182e652e822ecf2eec2f392f562fa32fc0300d302a3077309430e130fe314b316831b531d2321f323c325a3308335533a1343634443491349e34eb34f835453552356035ad35f936063653366036ad36ba370737143722376f377c37c937d6382338d838e6399a3a4e3a5c3aa93ab63ac43ad23b1f3b2c3b793b863bd33be03c2d3c3a3c873c943ce13cee3d3b3d483d953da43df13e683f1c3f693f763f843fd1401d402a40774084409240df412b41384185419241df41ec41fa42ae43624416442244284476449e44f244ff4542454c463046484656466546744684472847d0487848844890491649d64a5c4a6e4b124bd34bdc4c624c7e4d2f4dd04ddc4de84e6e4f2e4fb44fc65086510c511e51c3523152f052f7537d538e54325493041011ef55aaffffff11000100020003000401a09bc7a9870000000004010173ed450000000100ffffffff0000000000000000634e93ea00001d3677b8338000001d3677b83384955d862e00058edb0173ed410173bfbec400000003000000000000002e00050211b8e48dfb4a0eebb004000600070a8a040a13051bcbbbdeccd56f979164b7da81b8e49732e7215334e2b8ce57c41888d03190bd932f59e8bcca9b92cd1032c316407ca6099409a8aedf4146f39e95ffec016e016e000b000c14892736daee89910b52d7041a889bf97c864cfc84eeafba291a1b5b2e931cc1b5e800084a33f6fd0be55a2d75c3eae367b5ba338705f0319041b70e23a5c9b65374cf2739898e58f78b372f9292751451def1be4dc7cf494ef17470574d85c253ef77746b8ea127c00123012401250126009800001d3677a8f1440173ed443de180887d5f5a84d44bd19c87cbb664b0561d5eb81da88c5782b0e36e9a07e4d7fd7d801561f54bffc0cb5c4ec4e855deeeeb6fdf26d4c99a086ffafb93580a022581fa7454b05a2ea2ac0fd3a2a5d348d295400800080008001d43b9aca00250775d8011954fc400080201200009000a0015be000003bcb355ab466ad00015bfffffffbcbd0efda563d0245b9023afe2ffffff1100ffffffff00000000000000000173ed4400000001634e93e700001d3677a8f1440173ed4160000d000e000f0010245b9023afe2ffffff1100ffffffff00000000000000000173ed4500000001634e93ea00001d3677b833840173ed416000110012001300142848010124871f46ee0eb1ae00a27d5c29f6cdbcc378c1f4f1380805ff2297c9ed9fcf2200013213a09776db739953220712f110cafb8c5d8dc0fab70e9391a4894fc7cc8706b210f3282d0d6691f0235fdd6b31911b4bd49619c99ab3dbcb80305cea71d75d2eb0016d00128207e9d152c168ba8ab00018009122330000000000000000ffffffffffffffff81fa7454b05a2ea2a8280091001634558d88cb7e0929c9a44ffc1cf3c5a230c0db9b7ba3f7e489ee00f8289579a5c967d13c5fdbab5e261b0b55885aa0a63abbc4487521903d912f3e35c296ad0eb23d001b0010cc26aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaac23305e8350c57b37e003f008e004000410111000000000000000050001532139abefb5447ac011734d52324dd76a05aff0775b45c928601222624dbc2141bf2fa4c3e38ec56db5fc900c7c628d963f6fd5f016fdbf141f3f5ae91c3314e7b7f016d00128207e9d152e9a4694ab00072009122330000000000000000ffffffffffffffff81fa7454ba691a52a828009100162455cc26aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaac23305e83a13cd8b7e0128008e00170041006bb0400000000000000000b9f6a280000e9b3bd478a1ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc028480101de5adf45c03a745fc9d3a418d9e2ba096db9c1aaa77bc0898b6d9ebb611d2b40000532bfe179ee8495cd144a2f6d30950db2d48088fac5f9a778519dc0114219bf54cead2e7212dcdf398af721e9e425782d575b6c4026b7ec52ea1d3fe9dbb2bbe2aecf001a0010000100f59f3900058edb600003a6cef51e28880000e99c6da994200b9dfdf25ea78c41c94e4584ff2623b917b789f5d0e6a859861410542cb94e76fdc6efde77dc19b6aa8de0d4ad05651468c38cb9f64e1f8cf1351de6d5a7d98d56d6ded0be00bb00bc23130103f4e8a960b45d4558001900740091231301022a87a0b197c88778001a001b0091331367865aed64db08164a3138d816a8cacbb8b8fa46bc1fd1023ef5bd4e8fb6299ddc6201a0bfe76f22f36ca8ad0c54aa645c5739752b0a53bac3e57e9dda18febd0027000f01015ec2a32762fd21d800270028009122130100cbc4fd8a34cb65a8001c007822130100596b57d9c1932d880079001d221301003f0bad3989c46848001e007c221100e0b187aea6583a68007d001f221100e0a7528c0ef9512800200080220f00c141a6498c4d0800810021220f00c02225548664a800220084220f00c0221de12e910800850023220f4030085e7768002a00870024220f00c02170f2272c280025008a219dbceaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa818042d76318e19f365e6f7e0780eb2bc9f0c382940ef38b61bb6257ad617eb36fe8c9f56964f2800003a6cef51e28700262277cff55555555555555555555555555555555555555555555555555555555555555554085ac1288e0000000000000074d9dea3c5118042d76318e195d0008c008d2313010068a1a14c598fee380029002a009122130100f62101db096d33a80092002b28480101357b3e386bb95837e17d8fc7dd37f292efdc3301f6e109d8b33eb8a02afbb95d002228480101df3229c929cdae91378fd16242bda5a97246c54da4e9700d7427829825ee7b5d001922130100dd08f96dc461bcc8002c009522130100a6df074312541a08002d002e22130100902873121142a0c80098002f221100f6b6943101117948003900ae2213010090175c7b3161aee8009a0030221301008fb45fdc97d252080031009d221301008f689e5fb80803e80032009f221301008f677b3e09283ac800a00033221301008f677a70024cc70800a20034221301008f6779cbfeb8f188003500a521a1bcd99999999999999999999999999999999999999999999999999999999999982011ecef393af6d61933fe8eada66c79771a5de359b379b70bfe4414022dee90877585c9818f39dda000003a6cef51e2850036227bcff33333333333333333333333333333333333333333333333333333333333333334081ac1664bc000000000000074d9dea3c50e011ecef393af6d6196d000a700372355ec039e4242ff8cc69bf4260c44ddc7b820f838fa85ad1828d2b83ace409d6c02a3b89a505ac592d94a7c4d00a900aa00382179a0634dfa13634f7a130000800006226ee3dc107c1c7d42d68c14695c1d67204eb60151dc4d282d62c96ca53e26c0100ee542c8b882e30ec339334e5ca000ac221100f6a2a63eab3d4e48003a00b0221100ea5905b0b329bd88003b00b2221100ea58fcd0996ec14800b3003c220f00c035987df0cb08003d00b6219bbd62f8f7bea30f8ab5e9f16c3fb8642b118f56ed1bdc49600dbe5220c8b1af9e040c474f803d1a0544cba813425adf3253dd3727a789c9e418b5e788a4cab5df805caee92b00000e9b3bd478a1c0003e236fcff34517c7bdf5187c55af4f8b61fdc321588c7ab768dee24b006df29106458d7cf21881f48000000000000074d9dea3c5110311d3e017f000b800b900ba28480101db29f7a5808e1a673feb2258d777f3005642991b8025b1f92bcd7c498a8bd8ed000222bf000100f59f3900058edb600003a6cef335e0880000e99c6da994200b9dfdf25ea78c41c94e4584ff2623b917b789f5d0e6a859861410542cb94e76fdc6efde77dc19b6aa8de0d4ad05651468c38cb9f64e1f8cf1351de6d5a7d98d56d6ded0be0042004328480101b20e36a3b36a4cdee601106c642e90718b0a58daf200753dbb3189f956b494b600012213c3c000074d9de66bc12000bd004432014645ed4db913f636932b4bebb489b51112e1a415136d57d6c6735ffc4bd556606e33f960111aa97c043f6040c47d1298da52d6a46a0378304ba87f61f3dee9db0010000c20005100522211480000e9b3bccd782400bf00452211200003a6cef335e09000c100462211200003a6cef335e09000c3004722116200003a6cef335e0900c500482211200003a6cef335e09000c700492211200003a6cef335e09000c9004a2211200003a6cef335e09000cb004b2211000003a6cef335e09000cd004c2211400000e9b3bccd782400cf004d2211000003a6cef335e09000d1004e2211400000e9b3bccd782400d3004f2211400000e9b3bccd782400d500502211d000003a6cef335e0900d900da220120005300f822012000dd006722012000540055220120005600fc220120010f005f220120005700fe2201200058010022012000590102220120005a0104220120005b0106220120005c0108220120005d010a220120005e010c28480101f25a1e1d7f11115186543ff6eb95e3d9b98f71d2c959af6b0dad6b63cd1e6d6900012201200060011222012001130061220120011500622201200063011822012001190064220120011b0065220120011d006628480101a96f5d75bc79b8d1640e680704965baaa2245e4b3a5ad8e980ef5a3568409418000222012000df006822012000e10069220120006a00e422012000e5006b22012000e7006c22012000e9006d22012000eb006e220120006f00ee220120007000f0220120007100f2284801016f2780ba9d3cdce8eee34a23d893d90800da0ac1be8a973c513909136b7f636b000223130103f4e8a974d234a558007300740091231301022a87a0c5b59fe77800750076009128480101827773c365eccfd6cb46a3f783a09f1aba77ce1a0a4d62048569e9b845e955f8016b3313e844a4da57b7cf2b0b52b004cc5886c966478e37012ee2d9b473bf083e1e3072beee68024dd8cc7dffdfde9e114e4818dc10824b446d661453963fa117c1fcbf0027000f01015ec2a33b80d481d8008f0090009122130100cbc4fd8a34cb65a80077007822130100596b57d9c1932d880079007a28480101cf20bddca78403c3e40e2ab1b3eeb526c425b5efb531e6c5bd3d52019c25125c002628480101ff7081e66c7f0d6e868021316b0189b9e67b61284c176cd74f78fa6baa18a025001a221301003f0bad3989c46848007b007c221100e0b187aea6583a68007d007e284801011d818de56750d053b2a227f0da85ba37fb1869d0c774629d04e2668e1204c0a3001b28480101174c3878604468b08b7b76f5349c41201ae28b81ca1d94794ab11a692e4668250018221100e0a7528c0ef95128007f0080220f00c141a6498c4d080081008228480101e00721ae4b2be2ed708fa68e6b7bec2759a107504812069b3b8aa9acea346c66001528480101747c06e45f53ca1dc7d23f39db07d12f2e67fa595a36fa41d26683ab42d1a3040014220f00c02225548664a800830084220f00c0221de12e91080085008628480101eb38ef90c590bedb3ce31140d2d4176d43db6b7aab35df685afc4ccf2a383209000b2848010179a2e20b8a926ab2fe83108ff00f2fbced9958047008e5cb5fdf8c798aab63850010220f4030085e7768002a0087008828480101a248b81f22333cc28f6b6744e4298aefcd9b6f2dc5d7c99e1da1b28c37f3aa0c0007220f00c02170f2272c280089008a219dbceaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa818042d76318e1805a8c67376726b2dcf563d47e9c2ed6fa8fd993942535d6c8ed758902593e99400003a6cef706707008b284801010143b3d2dd671b2559543155e003f847022e510b3a57afabbca05d4069c327ef000d2277cff55555555555555555555555555555555555555555555555555555555555555554085ac1288e0000000000000074d9dee0ce118042d76318e195d0008c008d2848010164a43970f2007a1da6d6fc81773cc095d1cc270e81359e471f3b03469abeb7b5000c214900000027cbb9d1062954439a83a91f27835fb9d2e3e798910356650c3c493c946234646840008e28480101374e198a900e08edc634a5f2ad73e388b0a3019d24269fae8046024e437476b1001028480101903aa268fecbed38822a8972ba42eadb53c0972f11b8486f1534210245db4898002322130100f62101ef274493a80092009328480101a5a7d24057d8643b2527709d986cda3846adcb3eddc32d28ec21f69e17dbaaef0001284801012bd772e408a34578028922281a3e5b5384970a6a6dd741b1cfa3b80a3e5ec57d002322130100dd08f981e2391cc80094009522130100a6df0757302b7a080096009728480101b90ed7fc04a4971294b12a078ec8189e8fdba184de6e23043922a774ae403ee2002422130100902873262f1a00c800980099221100f6b694310111794800ad00ae28480101eda54e0b0237690499c3e159ab800469fdbcb3c162d42181c2c298acd4e98f3100152213010090175c8f4f390ee8009a009b28480101cc6ead611f9fa7c0598d8f88d658fe0b91f5f9c9635c872154234c16c722970c0014221301008fb45ff0b5a9b208009c009d221301008f689e73d5df63e8009e009f28480101c7c146bea2ced23475861d11146c0560a46c3d243563fda0e32bf8c34229d2670013221301008f677b5226ff9ac800a000a128480101ef1aa8b2068cf6a8eadef8197235a5d5976865a32a3ad1fe80db069ddb8cc2fe001128480101c2ef35325f62d0b4cc17d1f5d083894100c3c478504d70b6eb8d3cf26e604ff40011221301008f677a842024270800a200a3284801018a51fe69422dbf7e028fb1dcac5a62064eefeb4c080793e78a24ef22334b307c0010221301008f6779e01c90518800a400a521a1bcd99999999999999999999999999999999999999999999999999999999999982011ecef3bbeb1c21823653419f6ebabf10f7978dae7e33a12d3bbe9815917a62eb4fe902f2a96e88600003a6cef70670500a62848010150725eee52e86432f846698a08ac153a67bc9ad9c160130af907c3bef05f29480007227bcff33333333333333333333333333333333333333333333333333333333333333334081ac1664bc000000000000074d9dee0ce0e011ecef3bbeb1c2196d000a700a8284801016217f872c99fafcb870f2c11a362f59339be95095f70d00b9cff2f6dcd69d3dd000e2355ec039e4242ff8cc69bf4260c44ddc7b820f838fa85ad1828d2b83ace409d6c02a3b89a505ac592d94a7c4d00a900aa00ab28480101ff06225996392d9e78d92fef981828f3459892841111b2d352901236d506cb65000b28480101336df3bd068890e3f26c1a8f5e77c4bf7cc3c81fc88006ab614b6db43647262600072179a0634dfa13634f7a130000800006226ee3dc107c1c7d42d68c14695c1d67204eb60151dc4d282d62c96ca53e26c0100ee542c8b882e30ec389aaabdca000ac28480101b8ad45439ed0f9f1ffb12362a0c0a6f522734feed11dda077d5f6067f1305170000b221100f6a2a63eab3d4e4800af00b028480101e2a96bbff9be849635722263833d77a90f0a832b410f8b73bca56041fd7e21970016221100ea5905b0b329bd8800b100b22848010130dd0d5ef5796dc4c101fbf5b4b083599e509d0f738b07a8dbfad6b5ae53aecb0012221100ea58fcd0996ec14800b300b42848010130219e3c8c788af6da8a296da6f3e9925c909eed9821a0ae1911c38f56f7b37e000b28480101e2bc337ece7f3af5171f3265f44c612fc2fcba87f4b4563dc7fdc3285dd6a44d0008220f00c035987df0cb0800b500b6219bbd62f8f7bea30f8ab5e9f16c3fb8642b118f56ed1bdc49600dbe5220c8b1af9e040c474f804c5ac6247ef1e5d11d080c3d8b21135b54598a72e11fbc6ebe1fa0c4b2a7df0a00000e9b3bdc19c1c000b72848010118dd0a8040c21a2cfb6c0acf4ad636dc67ef3ab0a3e102f1b43ad500c55728d00007236fcff34517c7bdf5187c55af4f8b61fdc321588c7ab768dee24b006df29106458d7cf21881f48000000000000074d9dee0ce110311d3e017f000b800b900ba284801017269fb9feb45d719ebdbc3b0816b987bab06f43378dc84dc84d55727905482140002004811fd096c000000000000000000000000000000000000000000000000000000000000000028480101986c49971b96062e1fba4410e27249c8d73b0a9380f7ffd44640167e68b215e800032213c3c000074d9dea3c512000bd00be22012000db00dc28480101258d602eaa21d621634dcf86692aeae308ff3cf888f3edafc6a5b21848d732f900182211480000e9b3bd478a2400bf00c0284801014b01ebcf5425735461aa8b83bae89e70fa21e95d2ee85e57b05dad26c1d6d53000162211200003a6cef51e289000c100c22848010165b0a85a0fdea0c76a2a98445623ea62427099a6318624794dea416f1bdc6f5c00152211200003a6cef51e289000c300c428480101b5b64686c719580155341cb7347af0405dec7158c283ad30833b07325bdc48a5001422116200003a6cef51e28900c500c628480101fde4f74a9866e3de066d6d27e3b1fe107053ecce8b54d8b05ebf4a3b0789c26b00112211200003a6cef51e289000c700c828480101f7a4391731a8136b142d214311bd2f8c162938f27185d22de576a045a13b1e1600102211200003a6cef51e289000c900ca2848010187c846be2bc06a266ae017ae9a13c66cf156125edd95b8bd4f6cfe3c903e3b35000f2211200003a6cef51e289000cb00cc2848010122da148fcc6a6a317ae3c41ee888034019cbfa89e57f306b85601dd2045d6daa000e2211000003a6cef51e289000cd00ce2848010191c44865f6767ab41750fbf5117df2d8be3110925c7993aa2e03780673c31f32000d2211400000e9b3bd478a2400cf00d0284801016d16afa0d70d41df6abe49636527c0b566bd3b722b731eba03433d7efbcb3908000b2211000003a6cef51e289000d100d228480101d744ca7d3ce6fe4538b3fa6a138971ca129c227d8a6736a9cd1d33c2f1fd06cc000a2211400000e9b3bd478a2400d300d42848010175d211346d824c33aff56800c12e0b320854590aadfd85e3f909502cdb6ec3c100082211400000e9b3bd478a2400d500d628480101322f03bbddf42b900d602199315f5d4befa1a9282a2a6c845f3db6ccd2b6bfc000062211cc00003a6cef51e28900d700d82211000003a6cef335e09000d900da00a9d0000074d9dea3c51000003a6cef51e28802e7da887bc30110fabeb509a897a3390f976cc960ac3abd703b5118af0561c6dd340fc9affafb002ac3ea97ff8196b89d89d0abbdddd6dfbe4da9933410dff5f726b01528480101523e62a3a95932c2a65f2314a8a818f82f48644967cc31dcfda9954109d8b55100012848010177c2748c31a7f78c56862aa9d06df60981de7aaa59e67d4d0360a2903384fe1500013201032a5ac73da06a6b989d158bec539003d36dc087d663eda6337be5667c284f16310ee22bacedde5f1c215edbbbdf7a1c20c98ec248b7893266ebfceeb41817bd000f000c2000f700f822012000dd00de284801019deed5e9cd5995ad6c97a06276c939029a1d05a6de03b6c724a4b5567e9adb7a000e22012000df00e0284801016bc4ad2e5c909f6f452be243edc65694f7e6db5f2fc615f69756954a60a563a2000c22012000e100e2284801016925c827cdb72656785a860c0ed1b94c1ff9f0614b9e2ed1b0aa1ee8fbb395aa000c22012000e300e422012000e500e62848010197d9c97586b5cf9a93f5077cf1e13c91f7a4d5b240601e4d08030ab62cd17707000b28480101f613c63e75ce90bdb3aadf01297ba9a958588392473ea542ef8654f281d2854f000922012000e700e828480101d83f99b6b2deca33e45337ea0fa4788a5590c2a9f88654c24c1e4b5282ec7787000822012000e900ea28480101497deb7f82cc061521c9f6bf58ddd3043ecb1dbaea13352ecb73bb53236a9dd8000622012000eb00ec28480101e86bec3c2e5a0c5b9bad30e9b0efd5c74409fece4efd571f8fe02eccbbd0af1a000422012000ed00ee22012000ef00f02848010178a2f12e152f91343bff8aeda8ca7bab1039578fb6b03832c150f22786d0500c000422012000f100f228480101b26a0cc496805853f303d8a00ae9fc7f7b20dc7cab6d1d1c21f5b86469874a84000202012000f300f428480101a31f27b17ffa79bcaf0e47f55dffa054f825e019e447026255e7e1a8d7488701000200b1bcd91dbefdb40075ad92878e330bb79115bcfc28f3c5b9833df391ce8138514a3199fcd1800000000000006500000002b0d782ed8000003f2a3414d8b199f72d0000000000000040800000038a0ed0708000002d14497b814002014800f500f600afbc6827bcf8957c10b8a5694ecd7f0dd41e6a2cd906c77e5340983b618fb6fb0800000000000000000000000000000000000000000000000000000000c695ef7e000000000000007200000006efab3f64000000450742496300afbc66e5f2524ea28a3bde37c9b8f9e929de2e8e0ae9b0b84a7deeee8d71d424e8c69d27d400000000000000e2000000093197d6c2000000a8632502f4c69d1ba4000000000000008a000000116e3e81da0000006af0f2148122012000f900fa28480101912d60694234d59e4645f5d2ebd90e081979a3f6eaf4124bec3980e4547a5094000e22012000fb00fc220120010f011022012000fd00fe28480101348a81067d100edaf90feeb18db50c3c315a07c6c0944b52368c30e76a6f40df000b22012000ff0100284801018540d2166efad6f7a81289ddf3983d3ed177993dce47ccb150f2fcc287428d53000a220120010101022848010110b3b5e79df7c963efb443120853eb1bf9377e78020993bf79d5aaa9b02d1a6a000822012001030104284801016f610eec3a1e4dc9bdacbda0e586e7a8f6b4734b6599ecc0f8c5d0e9666d0ed3000822012001050106284801019100c451439a1cfdcf444d77bc78d03f19ca5e71b1f8fdae5e9e0ccf3e8214a000072201200107010828480101e0140ab9f7e276e1143af00713243e470dfc2c93c02b124622926fd33551a71b00062201200109010a284801014ef684da255649795b7830d1100f419d8f8a0eeb9ed6ed3610ba20b5d815deed0003220120010b010c2848010155cdb8f72801ef11ba562172ed2626c88208eddcf4a0c8f6d5447a785d02b790000202037820010d010e28480101b6eb72df89b91190ab85640f1ef9817bf00e49c5c11e8fd173b5b382ca4a104700010073dde8c69d27d40000000002e7da88000004baec525bbe000096f6a2fa0e38c69d27d4000000001598a6b2000004da46f3846200009e49d38f1eeb00afbbdc4b61f8041625a15bee3b094ff72034e12e69e8d71521ac6748fe6359832319afc8c8000000000000066800000033ffaa8b0000000419c4a9d68319afccd800000000000003d00000002e72705fc80000026a49c0209c284801018dfe3c99df194f8fec2b5b64b5ef08296b853794a29497c7c425ca62a44695e6000c2201200111011222012001130114284801010c275d6749b7c9102256e4abafdecda16a1697f20d26cd0e711bd9d58ef4a2f2000a28480101c169f7745c95d5f3f6b4e550c15978aaf563631f3a9e6ddaaa361ed4042e4f05000922012001150116284801017a3b4493fefcfd2275fa2f6ab01a8db5d70a443fb48dfb00e152545adfb97cbb0007220120011701182201200119011a28480101b13de2fa76c60764833d05264a2e1081609e2dfa9a04bf8d6c5e1162ac7d47cb000728480101027742b12159d2d1310044b4a94e1eea928905b045871a52b552b4b4841288400006220120011b011c28480101df4611dc79f46dc700809e0c3140796be5ca9572c3f3fab70ddbe6a5460bf4900003220120011d011e28480101d52b65c44fcc1a90bbbf8cc01e8ab9c7b6c51f95c2735d6de72a669c1135a8360003020162011f01200201200121012200b0bc885a77c249fb95f38bb13224853b7944942c4b10b84f1b99aa32892aabd4f46335f78a00000000000000bc00000003fb0146f100000074c1cd03f56335e64b0000000000000058000000040ca9eccb000000387d19d10000afbc60807ffe2b018ea1eb65ddc523f7772fc1e1f16e73ee8905b4b66c12275ca800000000000000000000000000000000000000000000000000000000c67fd5260000000000000096000000081b2d1d7000000064c8dda77100afbc799607d471065ad26b0a721946ed764b15a01cf341e11989f08863962a362800000000000000000000000000000000000000000000000000000000c69d27d4000000000000003e00000002165b2b1c0000002c0b7cc7ad0103802001270001021101918f8df47d89a592d9a8e2220276e210d49d789c174ab2b303917d71c6655837000782012f0317cca5687735940043b9aca00401280129012a0247a00f076afb8843d0d2618df1779691876f9ffd59f9b30f47df60f49496744dec67200610012e013b0103d040012b003fb000000000400000000000000021dcd650010ee6b280087735940043b9aca004010150012d01db500e3a26680b9f6a280000e9b3bd478a000000e9b3bd478a0d73fd8f873243316a5b55a0395be4d1c584d71a7c52116b6379a3e93f9649360375de02eb9865b5786e167c4411e5c415cf6064be75fe04b0f81f0c4b84c7260880002c7d7c00000000000000000b9f6a0b1a749f2a012c001343b9aca0021dcd650020020161012e013b0106460600013f020340400130013102037604013201330297bf955555555555555555555555555555555555555555555555555555555555555502aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaad00000074d9dee0ce0c1014c014e0397beb33333333333333333333333333333333333333333333333333333333333333029999999999999999999999999999999999999999999999999999999999999999cf8000074d9dee0ce00400134013501360397be8517c7bdf5187c55af4f8b61fdc321588c7ab768dee24b006df29106458d7cf029a28be3defa8c3e2ad7a7c5b0fee190ac463d5bb46f71258036f9488322c6be7cf8000074d9dee0ce004001410142014301035040013701034040013b0082722f7566ede0ba3a333ac2ca4e9820a0eb28fa3c675e8c5b7378fbba7d487af6b6d8b330226ee7a4226c9a4e28167203a4dec229d3f51655422b56dd7122352fda03af7333333333333333333333333333333333333333333333333333333333333333300001d3677b8338199ff4756d3363cbb8d2ef1acd9bcdb85ff220a0116f74843bac2e4c0c79ceed000001d3677a8f142634e93ea0001408014d013801390082722f7566ede0ba3a333ac2ca4e9820a0eb28fa3c675e8c5b7378fbba7d487af6b69e73e012c2b93293818802ecda692b6a70c7bc140c3d6ba22159dd15949099300205203024013a015100a0431b9004c4b4000000000000000000960000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003af7333333333333333333333333333333333333333333333333333333333333333300001d3677b8338232a2e0d714f1820922c85912266b270b551f97fd88c9ce96b02fbe0b94fedd3300001d3677b83381634e93ea0001408013c013d013e0101a0013f0082729e73e012c2b93293818802ecda692b6a70c7bc140c3d6ba22159dd1594909930d8b330226ee7a4226c9a4e28167203a4dec229d3f51655422b56dd7122352fda020f0409283baec018110140015100ab69fe00000000000000000000000000000000000000000000000000000000000000013fccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccd283baec000000003a6cef706700c69d27d440009e42614c107ac0000000000000000064000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000103504001440103504001470082723145f857768776495406acbcd9f6451e43b82a7cf2b787bdfcd66f54e8f61eb2f5fc1aa51cd06879f30dac067b3d17d0571b7c8ef15db6c57ce3e90f63e7d80803af734517c7bdf5187c55af4f8b61fdc321588c7ab768dee24b006df29106458d7cf00001d3677b833817a340a8997502684b5be64a7ba6e4f4f1393c8316bcf1149956bbf00b95dd25600001d3677a8f143634e93ea0001408014d014501460082723145f857768776495406acbcd9f6451e43b82a7cf2b787bdfcd66f54e8f61eb20d9c166ab6df5f0d47d18e86fc45c1e5f42681c1184337189ef2e4aa3f2552c10205203034014a014b03af734517c7bdf5187c55af4f8b61fdc321588c7ab768dee24b006df29106458d7cf00001d3677b83383a4dbec8658831b756fd060883f7d013972d9838f66cebcd2e28d66f2b2d6d46900001d3677b83381634e93ea0001408014d014801490082720d9c166ab6df5f0d47d18e86fc45c1e5f42681c1184337189ef2e4aa3f2552c1f5fc1aa51cd06879f30dac067b3d17d0571b7c8ef15db6c57ce3e90f63e7d8080205303034014a014b00a042665004c4b400000000000000000030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000069600000009600000004000600000000000519ae84f17b8f8b22026a975ff55f1ab19fde4a768744d2178dfa63bb533e107a409026bc03af7555555555555555555555555555555555555555555555555555555555555555500001d3677b83383f9b2f37bf03c07595e4f861c14a0779c5b0ddb12bd6b0bf59b7f464fab4b279400001d3677a8f143634e93ea0001408014d014e014f0001200082720ac47779e474df79ac188caf2308fa7fccf511a8be789a6502f15ca63fba64408669008ce4710e1108a5eee86c282b1d13feaf7634e0c592943ae844ddd4ca0c02053030240150015100a041297004c4b40000000000000000002e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005bc00000000000000000000000012d452da449e50b8cf7dd27861f146122afe1b546bb8b70fc8216f0c614139f8e04d7cef969")
+ .endCell();
+ log.info("CellType {}", c.getCellType());
+ Block block = Block.deserialize(CellSlice.beginParse(c));
+ log.info("block {}", block);
+ assertThat(block).isNotNull();
+
+ List txs = block.getAllTransactions();
+ log.info("txs {}", txs);
+ }
+
+ @Test
+ public void testLoadBlockMaster2() {
+ Cell c =
+ CellBuilder.beginCell()
+ .fromBoc(
+ "b5ee9c7241023201000498000114ff00f4a413f4bcf2c80b010201200302000cf2308048f2f00201480e0402012008050201200706001db9c34f00a5f03802032028307f00580011bbbd182108325e4c380201200d090201200b0a003bb6e53da89a1f401a803a1a7ffe00203e00203a861a1e0026209a8608a810020120310c002bb2fe7c02840917c120c1fd039be864fe800c380c1c200017bb9a5ed44d0d430d0d3ff3080202cb120f0201ce1110005b3e105bc90c0c40b53d01347b5134350c3434ffcc201254452ebcbd087ec120841ca368e840b2333d00104c3c01a000513e105bc90c0c40bd01347b5134350c3434ffcc20125444eebcbd20840764eab600723d00104c3c01a002012023130201201c140201201915020120181601f73e105bc90c80fd01347c02b434c03e8034c7f4c7fd010c2012c97cbd2012d4e4ae7cbd2012d4e4ee7cbd20134920840ee6b2802814032ec6fcbd3e097e0554c1e8483e0454c2e0083d039be864f4c7cc248c083880a94b20083d039be865900720083d05a74c083232c7f274100720083d05b882a9013232c01400e0170038fa02cb1fcb1f17f400c9f00b82101a69387e02c8cb1ff4004130f00600793e105bc90c0c40b53d01347b5134350c3434ffcc201254c52ebcbd08b434ffcc201200aebcbd3c028c54943c02e0843218aeaf40b2333d00104c3c01a00201201b1a00e33e105bc90c0c40b4fff4c7fe803d01347c02887434ffcc20125446eebcbd08e0080a60c1fc014c6011c07cbc94ca3c020a7232ffd50825a0083d10c1291508e43c0240bc02e0840d2212a4497232ffd49032c7d4883d00095110d4a17c01e0841c04df21c0f232ffc4b2c7fd00104c3c01a000ed3e105bc90c0c40b4fff4c7fe803d01347c0288e0080a60c1fc016011c07cbd2011d4c6eebcbd14cc3c0214d2bc020af232ffd5082e20083d10c06951543c0241291509243c025004fc02e084260abfffc97232ffd49032c7d4883d00095110d4a17c01e0840c19b443c0f232ffc4b2c7fd00104c3c01a0020120201d0201201f1e001f3214017e8084fd003d003333327b552000193b51343e803d013d0135350c200201202221003b20128870403cbc8830802672007e8080a0c1fd10e5cc0060c1fd16cc38a0001d0060c1fd039be864fe800c380c1c200201202b2402012028250201202726003d1c20043232c141bc0105b3c594013e808532dab2c7c4b2cff3c4f25c7ec020003d1c20043232c1417c010573c5893e808532da84b2c7f2cff3c4f260103ec0200201202a290023104cfd039be8482540b5c04c00780c5c0ca0001d1c081cb232c072c032c1f2fff274200201202d2c00215fa4001fa46804602c00012f2f4d3ff3080201202f2e001134c1c06a80b5c6006001ed20120871c03cbc807434c0c05c6c2497c0f83c00cc4074c7dc208061a808f00023858cc074c7e01200a0841b5a5b9d2e84bcbd2082c63cd865d6f4cffe801400f880fe0048840d10015bc13e186084100d28f014842ea4cc3c033820842296cbb9d4842ea4cc3c03782082c63cd854842ea4cc3c03f8203000588210982535785210ba9330f00ee08210b766741a5210ba9330f011e0821025d53dfdba92f010e0308048f2f00011b323bc02840d17c12004896818")
+ .endCell();
+ log.info("CellType {}", c.getCellType());
+ }
+
+ @Test
+ public void testLoadBlockNotMaster() {
+ Cell c =
+ CellBuilder.beginCell()
+ .fromBoc(
+ "b5ee9c72e1021c0100040b00001c00c400de0170020402a0033c036a037c0387039e03b6041c048204ce04ea0536055405a005ec060406200700077007bc080908100817041011ef55aaffffff110102030402a09bc7a98700000000840101c745200000000100000000000000000000000000634e94ec00001d367caaae4000001d367caaae419bbc68ac00058fb00173ed920173bfbec400000003000000000000002e05060211b8e48dfb43b9aca00407080a8a04250ec78adc9d082383679c3289edc662b628be0e34e51a8f7c412e98d24c8a5fb59960f376a6ad4dce93f406ce904add5a2aea140c99b877d02f67f1cd1e5f51021902190c0d03894a33f6fdb1c342502d7261843b4a3bfdbfb766c45705b7c4410af03c358431620ff05a79b1be0d76ede085c08726e04bad3c5779d949364eb56540f06c2c49b98d514111401a1b1b009800001d367c9b6c040173ed92b57df82537164b18661e22f620e1a7a15826a73d7402eef9433d55c030232370a7caa150ac8f2f4c74cb5c77e6671edb6f8accd65c683faf6e48a88720b2c72d009800001d367c9b6c0101c7451f78d2820caf6a5f100a444450ddab2f7754bbce7c6027dce5349269227866124a33b3efd318a7ec75c8f26844fd4dce5f581927f670a0087d7fec56658b487d720225826b977bb75290e16c135cbbddba94870b40080909000d0010ee6b2800080201200a0b0013be000003bc91627aea900013bfffffffbc8b96fc9c50235b9023afe2ffffff110000000000000000000000000001c7451f00000001634e94e900001d367c9b6c010173ed91200e0f10235b9023afe2ffffff110000000000000000000000000001c7452000000001634e94ec00001d367caaae410173ed9220141516284801017e49cb3c190a5033a93c907c6631d4459cf4bf71f57f041dd14270fb919423dc000122138209ae5deedd4a4385b011192848010125e39d851243cee82c062dd588cfa4587461b7869f68023bad26988d33bf8a24000223130104d72ef76ea521c2d81213192848010105a0d0f5cf8e9d2d98f032e935e8de2208463332de6c74af0b9d5cfc2bc2802102162848010157c418ac5021e527850e982354ed5a21fd7a0b0ac719e443fcd3c80f496dc4db003401110000000000000000501722138209ae5deedd4a4385b0181921d90000000000000000ffffffffffffffff826b977bb75290e16bb5f5e54ddd448c900001d367c9b6c040173ed92b57df82537164b18661e22f620e1a7a15826a73d7402eef9433d55c030232370a7caa150ac8f2f4c74cb5c77e6671edb6f8accd65c683faf6e48a88720b2c72d819006bb0400000000000000000b9f6c900000e9b3e4db601ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0284801012aa19c773967de4112363f58e8331a68fb2b3fcb1d55daf352b93c497a019ce4021728480101b3e9649d10ccb379368e81a3a7e8e49c8eb53f6acc69b0ba2ffa80082f70ee39000100030020000102b1e6b8f1")
+ .endCell();
+ log.info("CellType {}", c.getCellType());
+ Block block = Block.deserialize(CellSlice.beginParse(c));
+ log.info("block {}", block);
+ assertThat(block).isNotNull();
+
+ List txs = block.getAllTransactions();
+ log.info("txs {}", txs);
+ }
+
+ @Test // does not work in pytoniq-core
+ public void testShouldDeserializeBlock() {
+ Cell c =
+ CellBuilder.beginCell()
+ .fromBoc(
+ "b5ee9c724102c101001d2500041011ef55aaffffff110103200601a09bc7a987000000000001000000010000000000ffffffff000000000000000065a57c5f00000000000f424000000000000f424cf530ba43000000000000000100000000c400000004000000000000002e0200980000000000000000000000005052419cde96601f375f5ff37f0c0958d99d696a6b31a075787a22769006e0575ab4d36de07ce24d78ddc0c37a776ebea7728d08bc5d720cf7ab662a4ffb23e00211b8e48dfb465ec87804050401150232a9f88011954fc40018ae012d84563886eda33f200422b1c437989ce3804081b6b0b008ae04894a33f6fd789a0f4a1d0352df0638d90269bafa60236a1c793ec9cf4236b6bac9cf6e20a0d9576093fecf8a711917790021c5ceae28344e301649c28a1cdd9dab8c4e62f1c0570d0c070307cca56004540b080201700a0902016169a9020161ba77001fb000000000400000000000000000000401079996e5121a0109a06dac2c020e02091036d61601150f02091017d784011210020350401e110243bf17c9d39d78e8498a560800ddfb11dc48be1bc0edc2fbf90844eceb5ab4649610028e85020b4405f5e1004014130343bf084dd4db5a349ccfcf293baf5f5b626f4a130856b6613ded62877bfecc2536dc0a5e621c024bbf0847cbb01de39c3308edf1091131c7dedb780ca3e34d85bdc1a6ab4df16d79e9017d784006bd850209101efe92011d16020b6501efe920101817024bbec8a2b54087ea747ec1d5ecc652b91406aa6f4c2f479843ebd290b26ad8043eca03dfd2400c28850343beccc243bc18876b43843800323ac0a349ba6ffaf4f87d8e7ba2404e280b7097d814679919020161676202070ccb72896d1b02a4bffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff79996e5117ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbe8000000000001e848a665b9446264020766cb73bd5e920244bfaeffebddf2ee4f04633ee2bbba628ae4e08b6e0043d11727286b0df248a2e17700b7990343bf24d1ba51931fc51a9af90896c72638a6965587eed9cc6648bb69ab31a7dae44c0a5b991f0201615ba10a8a045052419cde96601f375f5ff37f0c0958d99d696a6b31a075787a22769006e057724ab9590a228d7373ef8d28544bea428d454ad789b07c24ceb3fc7a07c32c59001400142921245b9023afe2ffffff1100ffffffff0000000000000000000000010000000065a57c5f00000000000f424c00000001602423224d22390000000000000000000000000000000184563886f3139c7009cc4b4028ae352213821158e21bcc4e71c0303aae0211800000000007a124d02625006bb0400000000000000000000000800000000007a1234909ba9b6b469399f9e52775ebeb6c4de942610ad6cc27bdac50ef7fd984a6dbc00213e2000000000000f42498bc270173a7ffffffffffffffffd64515aa043f53a3f60eaf663295c8a035537a617a3cc21f5e94859356c021f6400000000003d092c00000000003d092e02801064606008b245b9023afe2ffffff1100ffffffff0000000000000000000000000000000065a57c180000000000000000ffffffff60342c2b2a284801019fffb8e8af80f298cefbc832633b545151ef8eb59eb427e724054e1cab56efbf000f21330000000000000000000000000000000084563886eda33f200028352113821158e21bb68cfc80102d221340422b1c4376d19f90022f2e219fbf955555555555555555555555555555555555555555555555555555555555555502812a05f20000000000000000000000000000000000000000000000000000000000000000000000000000000000204a22130108ac710d90c501c0083130219fbf66666666666666666666666666666666666666666666666666666666666666660502540be400000000000000000000000000000000000000000000000000000000000000000000000000000000004036221460108ac710d4643854003332219bbe8f64c6afbff3dd10d8ba6707790ac9670d540f37a9448b0337baa6a5a92acac021dcd6500000000000000000000000000000000000000000000000000000000000000000000000000000000002382165df40845638869f68160000000000000000000000000000000000000000000000000000000000000000000000000000000000046a0011000000000000000010284801018036bd5aa65bd160ccc4f204a44731afdb62bab1ab21c9496af2fc1b4d226ccd00032271cff33333333333333333333333333333333333333333333333333333333333333332cc9ba500000000000000000000000001409502f90016d0c037004900000000000000000000000000000000000000000000000000000000000000000000000001236fcff04f64c6afbff3dd10d8ba6707790ac9670d540f37a9448b0337baa6a5a92acac21881f4800000000000000000000000010ee6b28017f0473945004811ef55aa0000000000000000000000000000000000000000000000000000000000000000231340422b1c437989ce38063d3bae219fbf955555555555555555555555555555555555555555555555555555555555555502812a05f200393159c085ce242a1fe7dc6f3b4ef0cfbf54eef7ad3f40de588995b86f9c2f46400000000003d092203c2271cff555555555555555555555555555555555555555555555555555555555555555533a973dc00000000000000000003d0925409502f90015d04c4b23130108ac710d9ba5bc6018423eae219fbf66666666666666666666666666666666666666666666666666666666666666660502b95fd5003794d7a89bf0b1b83d2e445fab3781b81d7584baecb59bebf56b2e2f1fb798f3800000000007a121403f2271cff33333333333333333333333333333333333333333333333333333333333333332ce9bcbc00000000000000000003d090d40ae57f54016d0c040015188caa7e20000000000000000000000000000000000000000000000000000000000000000000000000141001f65a5823b65a57fe3609184e72a000010231460108ac710d4479c1c014843ae219bbe8f64c6afbff3dd10d8ba6707790ac9670d540f37a9448b0337baa6a5a92acac0213ab668031a93e8c798b2cb3e2acc80b1abde06ed7b06270a03fe422373e797c88470ea8c00000000003d092244236fcff04f64c6afbff3dd10d8ba6707790ac9670d540f37a9448b0337baa6a5a92acac21881f4800000000000000000003d093109d5b34017f047464528480101986c49971b96062e1fba4410e27249c8d73b0a9380f7ffd44640167e68b215e80003004811ef55ac00000000000000000000000000000000000000000000000000000000000000002848010145910e27fe37d8dcf1fac777ebb3bda38ae1ea8389f81bfb1bc0079f3f67ef5b00022265df40845638869fc774100fb887249507b17fc5674e8ad1ae8058eddc490c24e8c0138896214d64c0a4637800000000007a121cae492477cff000000000000000000000000000000000000000000000000000000000000000021881c9400000000000000000003d09121158e21a7f1dd04033c0ae6c6ba72271cff555555555555555555555555555555555555555555555555555555555555555533a973dc0000000000000000000000001409502f90015d04c4b21490000000013311def76051bbabfb248bd9a90d300716f598ffe8f8b65c8fddd8501b0e8c640532848010160d01ddc9d54e89cf8040b78fab3258c9327109018e4078f7f5c7ff0ba401aa2000c2455cc26aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaac22b1c4379fc3f180654534eae02bf0001f530ba430000000060000000000000000800000000000000000000000282920ce6f4b300f9bafaff9bf8604ac6cceb4b53598d03abc3d113b4803702bad5a69b6f03e7126bc6ee061bd3bb75f53b946845e2eb9067bd5b31527fd91f00be524f020120515000b3bfecabb049ff67c5388c8bbc8010e2e757141a27180b24e1450e6eced5c6273178a32d2be2f8000000000000000800000008000000000000000800000000000000000000000000000000000000000000000000000000000000040073dfe8cb4af8be0000000000000002000000020000000000000002000000000000000000000000000000000000000000000000000000000000000100abd040000000000000002000000000000000000000000a0a48339bd2cc03e6ebebfe6fe1812b1b33ad2d4d66340eaf0f444ed200dc0aeb569a6dbc0f9c49af1bb8186f4eedd7d4ee51a1178bae419ef56cc549ff647c1028480101aa559cb80ee5ce3f4b1e6107ec3ea424c2b89946804aad09f246e96353cc15c5000e0103d0405501eb50000000000000000800000000000000000000000000000005a2f25be03d373e41b62e16fb0d999a97235b40ea71f1522a5fa982a817ea60fd265bcbc973e584eb1eab6b3ea65309a0a32cec006e1bee4f781214122612c4d000000000040000000000000007fffffff800000004cb4af986000000c9560003002001099b2dcef0205802090d96e77810605902090d96e778105c5a0246bfa9346e9464c7f146a6be4225b1c98e29a59561fbb67319922eda6acc69f6b91300305ba10106460600b902094365b9de045f5d0251bf084dd4db5a349ccfcf293baf5f5b626f4a130856b6613ded62877bfecc2536dcd96e7780cd96e77a5e92010c46060365b9de970245bf2ac017c203ca0d9d008bf543c1364eebf27183668cf1e8b1e0e98af56b2dc1dc00c2ba770203001068610246bf919848778310ed687087000647581469374dff5e9f0fb1cf744809c5016e12fb0030676203b57ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffef00000000000f42450000000000000000000000000000000000000000000000000000000000000000000000000000000065a57c5f0003e665b9448656463001f040901efe92001c0332dca2365b9de4000827290aec8965afabb16ebc3cb9b408ebae71b618d78788bc80d09843593cac98da490aec8965afabb16ebc3cb9b408ebae71b618d78788bc80d09843593cac98da40201e0b4660101df970106460600b40246bfad8011dbd0ddd5549e65b1288c858e77dc3e0a5ba9eae0d756ca2e8b5731753e003069a90106460600ad2377cff0000000000000000000000000000000000000000000000000000000000000000212819f400000000000000000000000021158e21a7da0580013c06c6ba700480000000045f1e3dc29d6bf453889c449069a2458b2d56701fc3661d498162f743e5ba6210098ff0020dd2082014c97ba9730ed44d0d70b1fe0a4f260810200d71820d70b1fed44d0d31fd3ffd15112baf2a122f901541044f910f2a2f80001d31f31d307d4d101fb00a4c8cb1fcbffc9ed54020101736e0297bf955555555555555555555555555555555555555555555555555555555555555502aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaad0000000000003d092016f7203af7555555555555555555555555555555555555555555555555555555555555555500000000000f42480000000000000000000000000000000000000000000000000000000000000000000000000000000065a57c5f0001408817270020530302471a3009e41106e625a0000000000000000002e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008272ae405edf07a33e732225cf9180254cdfea049b9a29cd37e66747b23925b587dedaabd972671678ffefceb6d77eea0619da90081beed6cceee9180f03acf71a9c02010182740397bf66666666666666666666666666666666666666666666666666666666666666660533333333333333333333333333333333333333333333333333333333333333339f000000000007a120087c7675008272b594683d1b0f1242a1ace8917e2a0c0ee1f0307ce39646065f5038d58ca23ff7d855aea1ede2adcff55d3d37fcf59c03bd19c39f843a14faef85cad3980cf692010340407703af7333333333333333333333333333333333333333333333333333333333333333300000000000f4242cac3c5723cb68f5f7dba257e7f812140298ea360bdbf630cd33c8da2b098829200000000000f424165a57c5f00014087b7a78020f04091954fc40181179a3009e41778c0a604000000000000000003e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000082729304b9982993165dc7b4b2ccfc64c61bf6455afe7e4fe1233d5f827261360d8ed855aea1ede2adcff55d3d37fcf59c03bd19c39f843a14faef85cad3980cf6920101a0bb010350407d03af7333333333333333333333333333333333333333333333333333333333333333300000000000f42410000000000000000000000000000000000000000000000000000000000000000000000000000000065a57c5f000140881807e02052030247fa3009e439e2e625a0000000000000000007500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008272b594683d1b0f1242a1ace8917e2a0c0ee1f0307ce39646065f5038d58ca23ff79304b9982993165dc7b4b2ccfc64c61bf6455afe7e4fe1233d5f827261360d8e000120020360109e830395be8f64c6afbff3dd10d8ba6707790ac9670d540f37a9448b0337baa6a5a92acac02827b26357dff9ee886c5d3383bc8564b386aa079bd4a245819bdd5352d4956564f000000000003d09019084bf0103d8208503af704f64c6afbff3dd10d8ba6707790ac9670d540f37a9448b0337baa6a5a92acac00000000000f424873b47eb527e2e6b9a73405d88f31477703ef31e5c4f2b8a2be754d66be0d60ff00000000000f424765a57c5f000740888878602053030249c9b00827216617de1e9f3a79e4c7d8a3a51ac0c8b54b6bbcd4f824c9f800aa2f36fee2672d4d2e789fd57af824d33228887af40bcfb492aebe39ec74d665726b6471454ab010160890201db8c8a0101488b00ab29fe09ec98d5f7fe7ba21b174ce0ef21592ce1aa81e6f528916066f754d4b52559593ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbd01efe92000000000000001e8496cb4af8be400201208f8d0101208e008be7f827b26357dff9ee886c5d3383bc8564b386aa079bd4a245819bdd5352d495656240e8cae6e880eb79a200000000000f424a65a57c5f00012195b1b1bcb081ddbdc9b19086010120be02010198910103f0209203af704f64c6afbff3dd10d8ba6707790ac9670d540f37a9448b0337baa6a5a92acac00000000000f4247d59d160ea9c63d10edae2c76ada993f982915bc75f7bcc0fb81280820d15523200000000000f424165a57c5f0001408969593020f0c0901c9c380181194a3009c402468bb8000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008272bf8229e6e684701825a6f8e1fb0f8155aba759d58b82e73b8405092874e23fa816617de1e9f3a79e4c7d8a3a51ac0c8b54b6bbcd4f824c9f800aa2f36fee26720101a09700b959ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdf3fc13d931abeffcf744362e99c1de42b259c35503cdea5122c0cdeea9a96a4ab2b101c9c380006cb73bc00000000001e848ccb4af8be7fffffffc0010364109903af704f64c6afbff3dd10d8ba6707790ac9670d540f37a9448b0337baa6a5a92acac00000000000f42410000000000000000000000000000000000000000000000000000000000000000000000000000000065a57c5f0007408b19d9a02052030249c9b0061c000000000000600000000000719ae84f17b8f8b22026a975ff55f1ab19fde4a768744d2178dfa63bb533e107a40d03c04009e42664e625a0000000000000000003000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008272f1f67337526ee9890e137d5255f3150400e63d15dfe04b26653d275f2d0a6b04bf8229e6e684701825a6f8e1fb0f8155aba759d58b82e73b8405092874e23fa80358df40500000000000000000000000000000000000000000000000000000000000000009f000000000007a1200a8a09f0082725828aa96d32f676df2049228847cc42b15b0a52d9ffa3bc66b36fcedeff20af9606c97d0dc8b63016a6afd67b2fe52cd0e02a3dcdf71f331cf1e8006ca8e51a301035040a103af7000000000000000000000000000000000000000000000000000000000000000000000000000f42439440e0c397a3b2ee3cbd81ea78021862f892a5a9e779d1fecd55236d6571eb5200000000000f424165a57c5f0001408a6a5a2020f0409017d78401811a4a3005bc00000000000000000000000012d452da449e50b8cf7dd27861f146122afe1b546bb8b70fc8216f0c614139f8e04009a27c89c4000000000000000000300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008272310a1de222ce584cb4e86613b11d31616e9eaa4ff9ee499f19b104cf71eb504f606c97d0dc8b63016a6afd67b2fe52cd0e02a3dcdf71f331cf1e8006ca8e51a30101a0b9284801012d8973441aaae38b20c3fda9274f0a97de1447af2ecd7e424267fcca9901866b000301035040a903af7000000000000000000000000000000000000000000000000000000000000000000000000000f42410000000000000000000000000000000000000000000000000000000000000000000000000000000065a57c5f0001408acabaa0113040829a40cd41efffe02ae0082725828aa96d32f676df2049228847cc42b15b0a52d9ffa3bc66b36fcedeff20af9310a1de222ce584cb4e86613b11d31616e9eaa4ff9ee499f19b104cf71eb504f0101a0ad01a369fe00000000000000000000000000000000000000000000000000000000000000013fc000000000000000000000000000000000000000000000000000000000000000020000000000001e8480cb4af8be40ae020120b0af0015bfffffffbcbd1a94a200100015be000003bcb3670dc15550010160b20201dbb5b3010148b400ab29fe09ec98d5f7fe7ba21b174ce0ef21592ce1aa81e6f528916066f754d4b52559593ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbd01efe92000000000000001e8488cb4af8be40020120b8b6010120b7008be7f827b26357dff9ee886c5d3383bc8564b386aa079bd4a245819bdd5352d495656240e8cae6e880eb79a200000000000f424365a57c5f00012195b1b1bcb081ddbdc9b19086010120b900ab29fe09ec98d5f7fe7ba21b174ce0ef21592ce1aa81e6f528916066f754d4b52559593fc0000000000000000000000000000000000000000000000000000000000000001017d784000000000000001e8484cb4af8be400106460600bb00ab69fe00000000000000000000000000000000000000000000000000000000000000013fccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccd1954fc4000000000000001e8480cb4af8be400173a7e00000000000000020847cbb01de39c3308edf1091131c7dedb780ca3e34d85bdc1a6ab4df16d79e800000000003d092400000000003d09260bd0106460600be00ab29fe09ec98d5f7fe7ba21b174ce0ef21592ce1aa81e6f528916066f754d4b52559593fc0000000000000000000000000000000000000000000000000000000000000001017d784000000000000001e8492cb4af8be40008272f1f67337526ee9890e137d5255f3150400e63d15dfe04b26653d275f2d0a6b04d4d2e789fd57af824d33228887af40bcfb492aebe39ec74d665726b6471454ab28480101febfd56fa7c2a5010aea13c738df0c2155d6670e8b055dd312d2372f38f7701b000ec568a57c")
+ .endCell();
+ log.info("CellType {}", c.getCellType());
+ Block block = Block.deserialize(CellSlice.beginParse(c));
+ log.info("block {}", block);
+ List txs = block.getAllTransactions();
+ log.info("txs {}", txs);
+ }
+
+ @Test
+ public void testShouldDeserializeBlock2() {
+ Cell c =
+ CellBuilder.beginCell()
+ .fromBoc(
+ "b5ee9c72e10211010002b800001c00c400de0170020402a0033c0346035803a4040a0422042a04f20562056a0571041011ef55aaffffff110102030402a09bc7a98700000000800100000001000000000000000000000000000000000065a57c6500000000004c4b4000000000004c4b41f530ba43000000000000000400000000c400000004000000000000002e05060211b8e48dfb43b9aca00407080a8a04b45e4b7c07a6e7c836c5c2df61b33352e46b681d4e3e2a454bf5305502fd4c1fddf467caa9989b5c1f035b5c4e7c5ac8c31d8c2528f8d773b7ae3bf2ecdc2ffe00010002090a03894a33f6fdc1982ce574b6b30d1b8a1574d1fcdb9056434fbcdced45d451545011e0b48651d9576093fecf8a711917790021c5ceae28344e301649c28a1cdd9dab8c4e62f1400f1010009800000000003d0908000000045121fb8e9ad96a839c8b148b7598e70577e0b31449f83731347af3f97e632fc87bb5caea234b002a390f4ab673c842f3466dedcdf838a2a51bf49a0af3d78fab0098000000000000000000000000b45e4b7c07a6e7c836c5c2df61b33352e46b681d4e3e2a454bf5305502fd4c1fa4cb79792e7cb09d63d56d67d4ca613414659d800dc37dc9ef02428244c2589a0005000008000d0010ee6b28000828480101b45e4b7c07a6e7c836c5c2df61b33352e46b681d4e3e2a454bf5305502fd4c1f0001035b9023afe2ffffff1100000000000000000000000000000000010000000065a57c6500000000004c4b4100000004200b0c0d01110000000000000000500e0003001000c300000000000000000000000000000001021dcd6500100000000003d0908000000045121fb8e9ad96a839c8b148b7598e70577e0b31449f83731347af3f97e632fc87bb5caea234b002a390f4ab673c842f3466dedcdf838a2a51bf49a0af3d78fab8006bb040000000000000000000000200000000001e8483ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc000030020000102a62c29b8")
+ .endCell();
+ log.info("CellType {}", c.getCellType());
+ Block block = Block.deserialize(CellSlice.beginParse(c));
+ log.info(
+ "inMsg {}, outMsg {}, account blocks {}, block {}",
+ block.getExtra().getInMsgDesc().getCount(),
+ block.getExtra().getOutMsgDesc().getCount(),
+ block.getExtra().getShardAccountBlocks().elements.size(),
+ block);
+ }
+
+ @Test
+ public void testShouldDeserializeBlock3() {
+ Cell c =
+ CellBuilder.beginCell()
+ .fromBoc(
+ "b5ee9c72e102c101001e7900001c00c200dc01b2024802e4031803340388039803ea0440045204a804ba0512056205ca063206480662069c06e80704072007c607e2088808f409960a180a920ade0b580ba60c200c3a0cde0d200d820d9e0e0e0e880f020f4f101610c610d011481200121e123c12e2130013a6141414b6153a15d71623166f16e81735178017cd1846189318ea190e198819d51a251a711a821a8e1aa01aee1b3c1b4e1b9c1bea1c441c901ca41cf21d461d501d5d1d691dbc1e0a1e171e261e391e861ed21edc1ee91ef81f021fae1fb8205820a8214a2154215e21e4229e2324233223d4248e2495251b252825ca268b2694271b273e274627a828482852285c28e2299d29a42a2a2a422ae02aea2af42b7a2b842b8e2c492c502cd62ce42cee2cf82d002d082d102dc12e512f012fbb2fc230483060311f31be3279328033063314331e332833303338334033f13481353135d336393643366636703762376a3774377e378b3845384c38d238ea399b3a3c3a9d3aa93b633b6a3bf03c0a3cb53cbf3cd83cf2041011ef55aaffffff110102030401a09bc7a987000000000001000000010000000000ffffffff000000000000000065a57c5f00000000000f424000000000000f424cf530ba43000000000000000100000000c400000004000000000000002e050211b8e48dfb465ec8780406071a8af25bc2df9aae9c490d507c11f4d756cb8dc51a86d9efa94e3dae27283ba149ce0009045052419cde96601f375f5ff37f0c0958d99d696a6b31a075787a22769006e057724ab9590a228d7373ef8d28544bea428d454ad789b07c24ceb3fc7a07c32c5900140014111204894a33f6fd789a0f4a1d0352df0638d90269bafa60236a1c793ec9cf4236b6bac9cf6e20a0d9576093fecf8a711917790021c5ceae28344e301649c28a1cdd9dab8c4e62f1c008090a0b00980000000000000000000000005052419cde96601f375f5ff37f0c0958d99d696a6b31a075787a22769006e0575ab4d36de07ce24d78ddc0c37a776ebea7728d08bc5d720cf7ab662a4ffb23e0012d84563886eda33f200422b1c437989ce3804081b6b0b008be01150232a9f88011954fc40018be11097e7962208ebbff6bf2885d99ad2bbab54de961312de7847b8fa3b400a6f8c31d00089b2dcef020490109a06dac2c020c110716d4b19170a07e8775c50a0af5461c5b87fcc5878ff7d437f310933958a9d808000d9996e512621307f2514b5db2c0d8cab0bd8cbd51e3e6c7304b65a1b7c0222dcfa33339c5a7ea640007cca56004a9aaab02091036d616010d0e12090c349ad122ad99ef25e8b7753cd0015b5dbedec46ca98e6b567455a9ef0408f90008101efe9201525302091017d784010f10120bf43cb4609d2e5902366b629cd8c02278e730f5a4e5a40b1ac7b303de9c7dc5e700074405f5e10040595a120341a1ee8154366921e3340d1007d7ed026f32a2d60dd4d48af490b856ce5581c0000750405e5f245b9023afe2ffffff1100ffffffff0000000000000000000000000000000065a57c180000000000000000ffffffff6013141516245b9023afe2ffffff1100ffffffff0000000000000000000000010000000065a57c5f00000000000f424c00000001602425262700110000000000000000102113821158e21bb68cfc80101721330000000000000000000000000000000084563886eda33f2000282c284801019fffb8e8af80f298cefbc832633b545151ef8eb59eb427e724054e1cab56efbf000f221340422b1c4376d19f9002181922130108ac710d90c501c0081a1b219fbf955555555555555555555555555555555555555555555555555555555555555502812a05f200000000000000000000000000000000000000000000000000000000000000000000000000000000002023221460108ac710d4643854001c1d219fbf66666666666666666666666666666666666666666666666666666666666666660502540be4000000000000000000000000000000000000000000000000000000000000000000000000000000000040212165df40845638869f68160000000000000000000000000000000000000000000000000000000000000000000000000000000000041e219bbe8f64c6afbff3dd10d8ba6707790ac9670d540f37a9448b0337baa6a5a92acac021dcd65000000000000000000000000000000000000000000000000000000000000000000000000000000000021f2377cff0000000000000000000000000000000000000000000000000000000000000000212819f400000000000000000000000021158e21a7da0580013c03a3b3c236fcff04f64c6afbff3dd10d8ba6707790ac9670d540f37a9448b0337baa6a5a92acac21881f4800000000000000000000000010ee6b28017f03e2040004811ef55aa00000000000000000000000000000000000000000000000000000000000000002271cff33333333333333333333333333333333333333333333333333333333333333332cc9ba500000000000000000000000001409502f90016d042220049000000000000000000000000000000000000000000000000000000000000000000000000012271cff555555555555555555555555555555555555555555555555555555555555555533a973dc0000000000000000000000001409502f90015d046470211800000000007a124d028293213f67853e1526776d1b23d485fb81f769071332488bcf051b56df075d6bd5b592a1ade8ffd445f48e56ad87fb9c35eaae2697c251894e22a4bf2929bf7b675646300130007821158e21bcc4e71c03032be22390000000000000000000000000000000184563886f3139c7009cc4b4028be2c2455cc26aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaac22b1c4379fc3f1806a9482dbe0213e2000000000000f424982a2b006bb0400000000000000000000000800000000007a1234909ba9b6b469399f9e52775ebeb6c4de942610ad6cc27bdac50ef7fd984a6dbc00173a7e00000000000000020847cbb01de39c3308edf1091131c7dedb780ca3e34d85bdc1a6ab4df16d79e800000000003d092400000000003d092605b0173a7ffffffffffffffffd64515aa043f53a3f60eaf663295c8a035537a617a3cc21f5e94859356c021f6400000000003d092c00000000003d092e058284801018036bd5aa65bd160ccc4f204a44731afdb62bab1ab21c9496af2fc1b4d226ccd000302bf0001f530ba430000000060000000000000000800000000000000000000000282920ce6f4b300f9bafaff9bf8604ac6cceb4b53598d03abc3d113b4803702bad5a69b6f03e7126bc6ee061bd3bb75f53b946845e2eb9067bd5b31527fd91f00be2e2f00abd040000000000000002000000000000000000000000a0a48339bd2cc03e6ebebfe6fe1812b1b33ad2d4d66340eaf0f444ed200dc0aeb569a6dbc0f9c49af1bb8186f4eedd7d4ee51a1178bae419ef56cc549ff647c1002012030310073dfe8cb4af8be0000000000000002000000020000000000000002000000000000000000000000000000000000000000000000000000000000000100b3bfecabb049ff67c5388c8bbc8010e2e757141a27180b24e1450e6eced5c6273178a32d2be2f800000000000000080000000800000000000000080000000000000000000000000000000000000000000000000000000000000004231340422b1c437989ce38063334be23130108ac710d9ba5bc60183536be219fbf955555555555555555555555555555555555555555555555555555555555555502812a05f200393159c085ce242a1fe7dc6f3b4ef0cfbf54eef7ad3f40de588995b86f9c2f46400000000003d0922045231460108ac710d4479c1c013738be219fbf66666666666666666666666666666666666666666666666666666666666666660502b95fd5003794d7a89bf0b1b83d2e445fab3781b81d7584baecb59bebf56b2e2f1fb798f3800000000007a12140412265df40845638869fc774100fb887249507b17fc5674e8ad1ae8058eddc490c24e8c0138896214d64c0a4637800000000007a121cbe39219bbe8f64c6afbff3dd10d8ba6707790ac9670d540f37a9448b0337baa6a5a92acac0213ab668031a93e8c798b2cb3e2acc80b1abde06ed7b06270a03fe422373e797c88470ea8c00000000003d09223d2477cff000000000000000000000000000000000000000000000000000000000000000021881c9400000000000000000003d09121158e21a7f1dd04033c0be3a3b3c0098ff0020dd2082014c97ba9730ed44d0d70b1fe0a4f260810200d71820d70b1fed44d0d31fd3ffd15112baf2a122f901541044f910f2a2f80001d31f31d307d4d101fb00a4c8cb1fcbffc9ed5400480000000045f1e3dc29d6bf453889c449069a2458b2d56701fc3661d498162f743e5ba621284801012d8973441aaae38b20c3fda9274f0a97de1447af2ecd7e424267fcca9901866b0003236fcff04f64c6afbff3dd10d8ba6707790ac9670d540f37a9448b0337baa6a5a92acac21881f4800000000000000000003d093109d5b34017f03e3f402848010145910e27fe37d8dcf1fac777ebb3bda38ae1ea8389f81bfb1bc0079f3f67ef5b0002004811ef55ac000000000000000000000000000000000000000000000000000000000000000028480101986c49971b96062e1fba4410e27249c8d73b0a9380f7ffd44640167e68b215e800032271cff33333333333333333333333333333333333333333333333333333333333333332ce9bcbc00000000000000000003d090d40ae57f54016d0424328480101febfd56fa7c2a5010aea13c738df0c2155d6670e8b055dd312d2372f38f7701b000e015188caa7e20000000000000000000000000000000000000000000000000000000000000000000000000144001f65a5823b65a57fe3609184e72a0000102271cff555555555555555555555555555555555555555555555555555555555555555533a973dc00000000000000000003d0925409502f90015d046472848010160d01ddc9d54e89cf8040b78fab3258c9327109018e4078f7f5c7ff0ba401aa2000c21490000000013311def76051bbabfb248bd9a90d300716f598ffe8f8b65c8fddd8501b0e8c6404828480101aa559cb80ee5ce3f4b1e6107ec3ea424c2b89946804aad09f246e96353cc15c5000e02090d96e778104a4b020300104c4d02090d96e778104e4f0246bfad8011dbd0ddd5549e65b1288c858e77dc3e0a5ba9eae0d756ca2e8b5731753e0030b8b90246bf919848778310ed687087000647581469374dff5e9f0fb1cf744809c5016e12fb0030577502094365b9de0450510246bfa9346e9464c7f146a6be4225b1c98e29a59561fbb67319922eda6acc69f6b9130030617f0245bf2ac017c203ca0d9d008bf543c1364eebf27183668cf1e8b1e0e98af56b2dc1dc00c2b0b10251bf084dd4db5a349ccfcf293baf5f5b626f4a130856b6613ded62877bfecc2536dcd96e7780cd96e77a5d950244bfaeffebddf2ee4f04633ee2bbba628ae4e08b6e0043d11727286b0df248a2e177009389020b6501efe9201054550343beccc243bc18876b43843800323ac0a349ba6ffaf4f87d8e7ba2404e280b7097d814578956024bbec8a2b54087ea747ec1d5ecc652b91406aa6f4c2f479843ebd290b26ad8043eca03dfd2400c589b02016157750106460600940106460600a6024bbf0847cbb01de39c3308edf1091131c7dedb780ca3e34d85bdc1a6ab4df16d79e9017d7840065b9b0343bf084dd4db5a349ccfcf293baf5f5b626f4a130856b6613ded62877bfecc2536dc0a5d755c0106460600a4020766cb73bd5d95010c46060365b9de990343bf24d1ba51931fc51a9af90896c72638a6965587eed9cc6648bb69ab31a7dae44c0a6189600243bf17c9d39d78e8498a560800ddfb11dc48be1bc0edc2fbf90844eceb5ab464961002a59b020161617f01064606009202070ccb72896364020101656602a4bffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff79996e5117ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbe8000000000001e848a665b944757702010167680297bf955555555555555555555555555555555555555555555555555555555555555502aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaad0000000000003d0920170721203c3c94d7ae89f0cd6db6fe18c55144a27722be36ffd9c9fffd3a729dc3c93d176000960107a7b0397bf66666666666666666666666666666666666666666666666666666666666666660533333333333333333333333333333333333333333333333333333333333333339f000000000007a12008696a6b010350406c01034040b1008272b594683d1b0f1242a1ace8917e2a0c0ee1f0307ce39646065f5038d58ca23ff7d855aea1ede2adcff55d3d37fcf59c03bd19c39f843a14faef85cad3980cf69203af7333333333333333333333333333333333333333333333333333333333333333300000000000f42410000000000000000000000000000000000000000000000000000000000000000000000000000000065a57c5f0001408716d6e008272b594683d1b0f1242a1ace8917e2a0c0ee1f0307ce39646065f5038d58ca23ff79304b9982993165dc7b4b2ccfc64c61bf6455afe7e4fe1233d5f827261360d8e02052030246fb7009e439e2e625a000000000000000000750000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003af7555555555555555555555555555555555555555555555555555555555555555500000000000f42480000000000000000000000000000000000000000000000000000000000000000000000000000000065a57c5f0001408717273000120008272ae405edf07a33e732225cf9180254cdfea049b9a29cd37e66747b23925b587dedaabd972671678ffefceb6d77eea0619da90081beed6cceee9180f03acf71a9c020530302474b7009e41106e625a0000000000000000002e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003b57ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffef00000000000f42450000000000000000000000000000000000000000000000000000000000000000000000000000000065a57c5f0003e665b94487677780201e0947900827290aec8965afabb16ebc3cb9b408ebae71b618d78788bc80d09843593cac98da490aec8965afabb16ebc3cb9b408ebae71b618d78788bc80d09843593cac98da4001f040901efe92001c0332dca2365b9de400101df990358df40500000000000000000000000000000000000000000000000000000000000000009f000000000007a12007c7d7e0395be8f64c6afbff3dd10d8ba6707790ac9670d540f37a9448b0337baa6a5a92acac02827b26357dff9ee886c5d3383bc8564b386aa079bd4a245819bdd5352d4956564f000000000003d090184858601035040b9010350407f0082725828aa96d32f676df2049228847cc42b15b0a52d9ffa3bc66b36fcedeff20af9606c97d0dc8b63016a6afd67b2fe52cd0e02a3dcdf71f331cf1e8006ca8e51a303af7000000000000000000000000000000000000000000000000000000000000000000000000000f42439440e0c397a3b2ee3cbd81ea78021862f892a5a9e779d1fecd55236d6571eb5200000000000f424165a57c5f00014088081820101a092008272310a1de222ce584cb4e86613b11d31616e9eaa4ff9ee499f19b104cf71eb504f606c97d0dc8b63016a6afd67b2fe52cd0e02a3dcdf71f331cf1e8006ca8e51a3020f0409017d7840181183b7009a27c89c400000000000000000030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002010187880103d8209b008272f1f67337526ee9890e137d5255f3150400e63d15dfe04b26653d275f2d0a6b04d4d2e789fd57af824d33228887af40bcfb492aebe39ec74d665726b6471454ab01036410890103f0209503af704f64c6afbff3dd10d8ba6707790ac9670d540f37a9448b0337baa6a5a92acac00000000000f42410000000000000000000000000000000000000000000000000000000000000000000000000000000065a57c5f00074088a8b8c0101608d008272f1f67337526ee9890e137d5255f3150400e63d15dfe04b26653d275f2d0a6b04bf8229e6e684701825a6f8e1fb0f8155aba759d58b82e73b8405092874e23fa80205203024a7a80201db8e8f020120909101014894010120920101209300ab29fe09ec98d5f7fe7ba21b174ce0ef21592ce1aa81e6f528916066f754d4b52559593fc0000000000000000000000000000000000000000000000000000000000000001017d784000000000000001e8484cb4af8be40008be7f827b26357dff9ee886c5d3383bc8564b386aa079bd4a245819bdd5352d495656240e8cae6e880eb79a200000000000f424365a57c5f00012195b1b1bcb081ddbdc9b1908600ab29fe09ec98d5f7fe7ba21b174ce0ef21592ce1aa81e6f528916066f754d4b52559593ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbd01efe92000000000000001e8488cb4af8be4003af704f64c6afbff3dd10d8ba6707790ac9670d540f37a9448b0337baa6a5a92acac00000000000f4247d59d160ea9c63d10edae2c76ada993f982915bc75f7bcc0fb81280820d15523200000000000f424165a57c5f00014089697980101a099008272bf8229e6e684701825a6f8e1fb0f8155aba759d58b82e73b8405092874e23fa816617de1e9f3a79e4c7d8a3a51ac0c8b54b6bbcd4f824c9f800aa2f36fee2672020f0c0901c9c38018119ab700b959ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdf3fc13d931abeffcf744362e99c1de42b259c35503cdea5122c0cdeea9a96a4ab2b101c9c380006cb73bc00000000001e848ccb4af8be7fffffffc0009c402468bb800000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003af704f64c6afbff3dd10d8ba6707790ac9670d540f37a9448b0337baa6a5a92acac00000000000f424873b47eb527e2e6b9a73405d88f31477703ef31e5c4f2b8a2be754d66be0d60ff00000000000f424765a57c5f00074089c9d9e0101609f00827216617de1e9f3a79e4c7d8a3a51ac0c8b54b6bbcd4f824c9f800aa2f36fee2672d4d2e789fd57af824d33228887af40bcfb492aebe39ec74d665726b6471454ab0205303024a7a80201dba0a1020120a2a3010148a6010120a4010120a500ab29fe09ec98d5f7fe7ba21b174ce0ef21592ce1aa81e6f528916066f754d4b52559593fc0000000000000000000000000000000000000000000000000000000000000001017d784000000000000001e8492cb4af8be40008be7f827b26357dff9ee886c5d3383bc8564b386aa079bd4a245819bdd5352d495656240e8cae6e880eb79a200000000000f424a65a57c5f00012195b1b1bcb081ddbdc9b1908600ab29fe09ec98d5f7fe7ba21b174ce0ef21592ce1aa81e6f528916066f754d4b52559593ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbd01efe92000000000000001e8496cb4af8be40009e42664e625a00000000000000000030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000061c000000000000600000000000719ae84f17b8f8b22026a975ff55f1ab19fde4a768744d2178dfa63bb533e107a40d03c040103d040ac001fb0000000004000000000000000000004020170aeaf01eb50000000000000000800000000000000000000000000000005a2f25be03d373e41b62e16fb0d999a97235b40ea71f1522a5fa982a817ea60fd265bcbc973e584eb1eab6b3ea65309a0a32cec006e1bee4f781214122612c4d000000000040000000000000007fffffff800000004cb4af986000000c9ad00030020020161b0b1020161b8b90106460600b503af7333333333333333333333333333333333333333333333333333333333333333300000000000f4242cac3c5723cb68f5f7dba257e7f812140298ea360bdbf630cd33c8da2b098829200000000000f424165a57c5f0001408b2b3b40101a0b50082729304b9982993165dc7b4b2ccfc64c61bf6455afe7e4fe1233d5f827261360d8ed855aea1ede2adcff55d3d37fcf59c03bd19c39f843a14faef85cad3980cf692020f04091954fc401811b6b700ab69fe00000000000000000000000000000000000000000000000000000000000000013fccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccd1954fc4000000000000001e8480cb4af8be40009e41778c0a604000000000000000003e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005bc00000000000000000000000012d452da449e50b8cf7dd27861f146122afe1b546bb8b70fc8216f0c614139f8e040106460600bd03af7000000000000000000000000000000000000000000000000000000000000000000000000000f42410000000000000000000000000000000000000000000000000000000000000000000000000000000065a57c5f0001408babbbc0101a0bd0082725828aa96d32f676df2049228847cc42b15b0a52d9ffa3bc66b36fcedeff20af9310a1de222ce584cb4e86613b11d31616e9eaa4ff9ee499f19b104cf71eb504f0113040829a40cd41efffe02be01a369fe00000000000000000000000000000000000000000000000000000000000000013fc000000000000000000000000000000000000000000000000000000000000000020000000000001e8480cb4af8be40be020120bfc00015be000003bcb3670dc155500015bfffffffbcbd1a94a2001051df4184")
+ .endCell();
+ log.info("CellType {}", c.getCellType());
+ Block block = Block.deserialize(CellSlice.beginParse(c));
+ log.info(
+ "inMsg {}, outMsg {}, account blocks {}, block {}",
+ block.getExtra().getInMsgDesc().getCount(),
+ block.getExtra().getOutMsgDesc().getCount(),
+ block.getExtra().getShardAccountBlocks().elements.size(),
+ block);
+ }
}
diff --git a/cell/src/test/java/org/ton/java/tlb/TestTlbTransactionReader.java b/cell/src/test/java/org/ton/java/tlb/TestTlbTransactionReader.java
index 35b1b582..d3b5de3f 100644
--- a/cell/src/test/java/org/ton/java/tlb/TestTlbTransactionReader.java
+++ b/cell/src/test/java/org/ton/java/tlb/TestTlbTransactionReader.java
@@ -37,7 +37,6 @@ public void testLoadTransactionPrintWithBlock() {
CellSlice cs = CellSlice.beginParse(c);
Transaction transaction = Transaction.deserialize(cs);
log.info("transaction {}", transaction);
- transaction.printTransactionInfo(true, true, "", "(0,600000000000000,233232)");
}
@Test
@@ -47,6 +46,5 @@ public void testLoadTransactionPrintNoBlock() {
CellSlice cs = CellSlice.beginParse(c);
Transaction transaction = Transaction.deserialize(cs);
log.info("transaction {}", transaction);
- transaction.printTransactionInfo(true, true, "");
}
}
\ No newline at end of file
diff --git a/emulator/src/test/java/org/ton/java/emulator/TestTxEmulator.java b/emulator/src/test/java/org/ton/java/emulator/TestTxEmulator.java
index 59a0f043..93047404 100644
--- a/emulator/src/test/java/org/ton/java/emulator/TestTxEmulator.java
+++ b/emulator/src/test/java/org/ton/java/emulator/TestTxEmulator.java
@@ -203,8 +203,6 @@ public void testTxEmulatorEmulateTickTx() {
txEmulator.emulateTickTockTransaction(shardAccountBocBase64, false);
log.info("result {}", result);
assertThat(result.success).isTrue();
- result.getTransaction().printTransactionInfo(true, true);
- result.getTransaction().printAllMessages(true);
log.info("vm log {}", result.getVm_log());
}
@@ -224,8 +222,6 @@ public void testTxEmulatorEmulateTockTx() {
txEmulator.emulateTickTockTransaction(shardAccountBocBase64, true);
log.info("result {}", result);
assertThat(result.success).isTrue();
- result.getTransaction().printTransactionInfo(true, true);
- result.getTransaction().printAllMessages(true);
}
@Test
@@ -265,9 +261,6 @@ public void testTxEmulatorEmulateTxWithEmptyAccount() {
txEmulator.emulateTransaction(shardAccountBocBase64, internalMsgBocBase64);
log.info("result {}", result);
assertThat(result.isSuccess()).isTrue();
- result.getTransaction().printTransactionInfo(true, true);
-
- result.getTransaction().printAllMessages(true);
}
@Test
@@ -310,8 +303,6 @@ public void testTxEmulatorEmulateTxWithAccount() {
log.info("new shardAccount {}", result.getNewShardAccount());
log.info("new transaction {}", result.getTransaction());
log.info("new actions {}", result.getActions());
- result.getTransaction().printTransactionInfo(true, true);
- result.getTransaction().printAllMessages(true);
}
@Test
@@ -432,9 +423,6 @@ public void testTxEmulatorWalletV5ExternalMsg() {
// log.info("txDescOrd "+ txDescOrd);
assertThat(txDescOrd.isAborted()).isFalse();
- result.getTransaction().printTransactionInfo(true, true);
- result.getTransaction().printAllMessages(true);
-
// transfer one more time
walletV5Config =
WalletV5Config.builder()
@@ -478,9 +466,6 @@ public void testTxEmulatorWalletV5ExternalMsg() {
assertThat(newShardAccount.getAccount().getAccountStorage().getBalance().getCoins())
.isLessThan(Utils.toNano(3.2));
assertThat(newShardAccount.getBalance()).isLessThan(Utils.toNano(3.2)); // same as above
-
- result.getTransaction().printTransactionInfo(true, true);
- result.getTransaction().printAllMessages(true);
}
@Test
@@ -542,10 +527,6 @@ public void testTxEmulatorWalletV5ExternalMsgSimplified() {
EmulateTransactionResult result =
txEmulator.emulateTransaction(
codeCell, dataCell, Utils.toNano(2), extMsg.toCell().toBase64());
-
- // log.info("result sendExternalMessage[1]: "+ result);
- // log.info("txFees: "+ result.getTransaction().getTransactionFees());
- result.getTransaction().printTransactionInfo(true, true);
}
@Test
@@ -665,10 +646,6 @@ public void testTxEmulatorWalletV5InternalMsg() throws URISyntaxException {
log.info("txDescOrd {}", txDescOrd);
assertThat(txDescOrd.isAborted()).isFalse();
-
- result.getTransaction().printTransactionInfo(true, true);
- result.getTransaction().printAllMessages(true);
-
// second transfer using new shard account
walletV5Config =
@@ -717,9 +694,6 @@ public void testTxEmulatorWalletV5InternalMsg() throws URISyntaxException {
assertThat(newShardAccount.getAccount().getAccountStorage().getBalance().getCoins())
.isLessThan(Utils.toNano(3.2));
assertThat(newShardAccount.getBalance()).isLessThan(Utils.toNano(3.2)); // same as above
-
- result.getTransaction().printTransactionInfo(true, true);
- result.getTransaction().printAllMessages(true);
}
private static Cell getLibs() {
diff --git a/smartcontract/src/main/java/org/ton/java/smartcontract/SmartContractCompiler.java b/smartcontract/src/main/java/org/ton/java/smartcontract/SmartContractCompiler.java
index 81ad5080..a26e19a8 100644
--- a/smartcontract/src/main/java/org/ton/java/smartcontract/SmartContractCompiler.java
+++ b/smartcontract/src/main/java/org/ton/java/smartcontract/SmartContractCompiler.java
@@ -111,7 +111,7 @@ public String compile() {
}
if (outputFiftAsmFile.contains("cannot generate code")
- || outputFiftAsmFile.contains("error: undefined function")
+ || outputFiftAsmFile.contains(": error:")
|| outputFiftAsmFile.contains("Failed to discover")) {
throw new Error("Compile error: " + outputFiftAsmFile);
}