We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello! Got an case, when dict serialized wrong. Let's consider next test:
package org.ton.java; import org.junit.Test; import org.ton.java.address.Address; import org.ton.java.bitstring.BitString; import org.ton.java.cell.Cell; import org.ton.java.cell.CellBuilder; import org.ton.java.cell.CellSlice; import org.ton.java.cell.TonHashMap; import java.io.IOException; import java.math.BigInteger; import java.nio.file.Files; import java.nio.file.Path; public class DictTest { String a = Files.readString(Path.of("/path/to/raw-tx.txt")); public DictTest() throws IOException { } @Test public void test() { TonHashMap dct = CellSlice.beginParse( Cell.fromBocBase64(a) ).loadDict(267, x -> x.readAddress(), x -> CellSlice.beginParse(x).loadCoins()); Cell dictCell = CellBuilder.beginCell().storeDictInLine( dct.serialize( it -> { BitString x = new BitString(); x.writeAddress((Address) it); return x; }, it -> { return CellBuilder.beginCell() .storeCoins((BigInteger) it) .endCell(); }) ).endCell(); System.out.println(dictCell.print()); } }
This returns formatted cell, like js lib
File with raw cell data: raw-tx.txt File with formatted cell, returned by js lib: trusted.txt
Diff from trusted.txt and this output:
trusted.txt
mac@MacBook-Pro-Mac dct % diff trusted.txt custom.txt 2405c2405 < x{7F876_} --- > x{82076_} 4039c4039 < x{7F8EE_} --- > x{820EE_} 4299c4299 < x{C0B_} --- > x{7C0} 4513c4513 < x{E0F_} --- > x{7F7F}
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello!
Got an case, when dict serialized wrong.
Let's consider next test:
This returns formatted cell, like js lib
File with raw cell data: raw-tx.txt
File with formatted cell, returned by js lib: trusted.txt
Diff from
trusted.txt
and this output:The text was updated successfully, but these errors were encountered: