diff --git a/cell/src/test/java/org/ton/java/cell/TestBocDeserealization.java b/cell/src/test/java/org/ton/java/cell/TestBocDeserealization.java index 6970d3cf..b5111e4e 100644 --- a/cell/src/test/java/org/ton/java/cell/TestBocDeserealization.java +++ b/cell/src/test/java/org/ton/java/cell/TestBocDeserealization.java @@ -71,10 +71,149 @@ public void testBocIssue74() { public void testBocIssue3() { Cell cell = CellBuilder.beginCell().fromBoc("b5ee9c72e2020152000100002a490000002400cc00ea0180026202fe033003520361037a03940404047404c0056805a8069a06b4075c079c0806087608c30a160a3a0a5e0b0a0b2a0b4a0b6a0b880ba60bc20bde0bfa0c160c320cd80d5c0d800da00dec0e380e580e780e980eb60ed60ef60f160f360f560f76102010a8110e119011ae11cc11ea120612aa132a13761442148f14ae154415621580159e15bc15da15f81616163416521670168e16ac16ca16d816e616f417021710171e172c173a1748175617641772178017cc17da17e817f6180418121820182e187a1888189618a418b218c018ce18dc18ea18f8190619521976199a19e71a921ab21ad21b1f1b6b1b8a1ba81bf51c411c5e1c7a1cc71d131d2e1d4a1d971de31dfe1e4b1e661f0c1f591fdc2029207b20c721122132217f21cb21ea220a22572276229422e12300234d236c238c23d923f82445249124b024fd251c25c62613269a26e7274c279927e5286628b328d0291d293a298729a429f12a3d2a582afc2b492bc82c152c612cad2ccc2cda2d272d442d912dae2dfb2e182e652e822ecf2eec2f392f562fa32fc0300d302a3077309430e130fe314b316831b531d2321f323c325a3308335533a1343634443491349e34eb34f835453552356035ad35f936063653366036ad36ba370737143722376f377c37c937d6382338d838e6399a3a4e3a5c3aa93ab63ac43ad23b1f3b2c3b793b863bd33be03c2d3c3a3c873c943ce13cee3d3b3d483d953da43df13e683f1c3f693f763f843fd1401d402a40774084409240df412b41384185419241df41ec41fa42ae43624416442244284476449e44f244ff4542454c463046484656466546744684472847d0487848844890491649d64a5c4a6e4b124bd34bdc4c624c7e4d2f4dd04ddc4de84e6e4f2e4fb44fc65086510c511e51c3523152f052f7537d538e54325493041011ef55aaffffff11000100020003000401a09bc7a9870000000004010173ed450000000100ffffffff0000000000000000634e93ea00001d3677b8338000001d3677b83384955d862e00058edb0173ed410173bfbec400000003000000000000002e00050211b8e48dfb4a0eebb004000600070a8a040a13051bcbbbdeccd56f979164b7da81b8e49732e7215334e2b8ce57c41888d03190bd932f59e8bcca9b92cd1032c316407ca6099409a8aedf4146f39e95ffec016e016e000b000c14892736daee89910b52d7041a889bf97c864cfc84eeafba291a1b5b2e931cc1b5e800084a33f6fd0be55a2d75c3eae367b5ba338705f0319041b70e23a5c9b65374cf2739898e58f78b372f9292751451def1be4dc7cf494ef17470574d85c253ef77746b8ea127c00123012401250126009800001d3677a8f1440173ed443de180887d5f5a84d44bd19c87cbb664b0561d5eb81da88c5782b0e36e9a07e4d7fd7d801561f54bffc0cb5c4ec4e855deeeeb6fdf26d4c99a086ffafb93580a022581fa7454b05a2ea2ac0fd3a2a5d348d295400800080008001d43b9aca00250775d8011954fc400080201200009000a0015be000003bcb355ab466ad00015bfffffffbcbd0efda563d0245b9023afe2ffffff1100ffffffff00000000000000000173ed4400000001634e93e700001d3677a8f1440173ed4160000d000e000f0010245b9023afe2ffffff1100ffffffff00000000000000000173ed4500000001634e93ea00001d3677b833840173ed416000110012001300142848010124871f46ee0eb1ae00a27d5c29f6cdbcc378c1f4f1380805ff2297c9ed9fcf2200013213a09776db739953220712f110cafb8c5d8dc0fab70e9391a4894fc7cc8706b210f3282d0d6691f0235fdd6b31911b4bd49619c99ab3dbcb80305cea71d75d2eb0016d00128207e9d152c168ba8ab00018009122330000000000000000ffffffffffffffff81fa7454b05a2ea2a8280091001634558d88cb7e0929c9a44ffc1cf3c5a230c0db9b7ba3f7e489ee00f8289579a5c967d13c5fdbab5e261b0b55885aa0a63abbc4487521903d912f3e35c296ad0eb23d001b0010cc26aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaac23305e8350c57b37e003f008e004000410111000000000000000050001532139abefb5447ac011734d52324dd76a05aff0775b45c928601222624dbc2141bf2fa4c3e38ec56db5fc900c7c628d963f6fd5f016fdbf141f3f5ae91c3314e7b7f016d00128207e9d152e9a4694ab00072009122330000000000000000ffffffffffffffff81fa7454ba691a52a828009100162455cc26aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaac23305e83a13cd8b7e0128008e00170041006bb0400000000000000000b9f6a280000e9b3bd478a1ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc028480101de5adf45c03a745fc9d3a418d9e2ba096db9c1aaa77bc0898b6d9ebb611d2b40000532bfe179ee8495cd144a2f6d30950db2d48088fac5f9a778519dc0114219bf54cead2e7212dcdf398af721e9e425782d575b6c4026b7ec52ea1d3fe9dbb2bbe2aecf001a0010000100f59f3900058edb600003a6cef51e28880000e99c6da994200b9dfdf25ea78c41c94e4584ff2623b917b789f5d0e6a859861410542cb94e76fdc6efde77dc19b6aa8de0d4ad05651468c38cb9f64e1f8cf1351de6d5a7d98d56d6ded0be00bb00bc23130103f4e8a960b45d4558001900740091231301022a87a0b197c88778001a001b0091331367865aed64db08164a3138d816a8cacbb8b8fa46bc1fd1023ef5bd4e8fb6299ddc6201a0bfe76f22f36ca8ad0c54aa645c5739752b0a53bac3e57e9dda18febd0027000f01015ec2a32762fd21d800270028009122130100cbc4fd8a34cb65a8001c007822130100596b57d9c1932d880079001d221301003f0bad3989c46848001e007c221100e0b187aea6583a68007d001f221100e0a7528c0ef9512800200080220f00c141a6498c4d0800810021220f00c02225548664a800220084220f00c0221de12e910800850023220f4030085e7768002a00870024220f00c02170f2272c280025008a219dbceaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa818042d76318e19f365e6f7e0780eb2bc9f0c382940ef38b61bb6257ad617eb36fe8c9f56964f2800003a6cef51e28700262277cff55555555555555555555555555555555555555555555555555555555555555554085ac1288e0000000000000074d9dea3c5118042d76318e195d0008c008d2313010068a1a14c598fee380029002a009122130100f62101db096d33a80092002b28480101357b3e386bb95837e17d8fc7dd37f292efdc3301f6e109d8b33eb8a02afbb95d002228480101df3229c929cdae91378fd16242bda5a97246c54da4e9700d7427829825ee7b5d001922130100dd08f96dc461bcc8002c009522130100a6df074312541a08002d002e22130100902873121142a0c80098002f221100f6b6943101117948003900ae2213010090175c7b3161aee8009a0030221301008fb45fdc97d252080031009d221301008f689e5fb80803e80032009f221301008f677b3e09283ac800a00033221301008f677a70024cc70800a20034221301008f6779cbfeb8f188003500a521a1bcd99999999999999999999999999999999999999999999999999999999999982011ecef393af6d61933fe8eada66c79771a5de359b379b70bfe4414022dee90877585c9818f39dda000003a6cef51e2850036227bcff33333333333333333333333333333333333333333333333333333333333333334081ac1664bc000000000000074d9dea3c50e011ecef393af6d6196d000a700372355ec039e4242ff8cc69bf4260c44ddc7b820f838fa85ad1828d2b83ace409d6c02a3b89a505ac592d94a7c4d00a900aa00382179a0634dfa13634f7a130000800006226ee3dc107c1c7d42d68c14695c1d67204eb60151dc4d282d62c96ca53e26c0100ee542c8b882e30ec339334e5ca000ac221100f6a2a63eab3d4e48003a00b0221100ea5905b0b329bd88003b00b2221100ea58fcd0996ec14800b3003c220f00c035987df0cb08003d00b6219bbd62f8f7bea30f8ab5e9f16c3fb8642b118f56ed1bdc49600dbe5220c8b1af9e040c474f803d1a0544cba813425adf3253dd3727a789c9e418b5e788a4cab5df805caee92b00000e9b3bd478a1c0003e236fcff34517c7bdf5187c55af4f8b61fdc321588c7ab768dee24b006df29106458d7cf21881f48000000000000074d9dea3c5110311d3e017f000b800b900ba28480101db29f7a5808e1a673feb2258d777f3005642991b8025b1f92bcd7c498a8bd8ed000222bf000100f59f3900058edb600003a6cef335e0880000e99c6da994200b9dfdf25ea78c41c94e4584ff2623b917b789f5d0e6a859861410542cb94e76fdc6efde77dc19b6aa8de0d4ad05651468c38cb9f64e1f8cf1351de6d5a7d98d56d6ded0be0042004328480101b20e36a3b36a4cdee601106c642e90718b0a58daf200753dbb3189f956b494b600012213c3c000074d9de66bc12000bd004432014645ed4db913f636932b4bebb489b51112e1a415136d57d6c6735ffc4bd556606e33f960111aa97c043f6040c47d1298da52d6a46a0378304ba87f61f3dee9db0010000c20005100522211480000e9b3bccd782400bf00452211200003a6cef335e09000c100462211200003a6cef335e09000c3004722116200003a6cef335e0900c500482211200003a6cef335e09000c700492211200003a6cef335e09000c9004a2211200003a6cef335e09000cb004b2211000003a6cef335e09000cd004c2211400000e9b3bccd782400cf004d2211000003a6cef335e09000d1004e2211400000e9b3bccd782400d3004f2211400000e9b3bccd782400d500502211d000003a6cef335e0900d900da220120005300f822012000dd006722012000540055220120005600fc220120010f005f220120005700fe2201200058010022012000590102220120005a0104220120005b0106220120005c0108220120005d010a220120005e010c28480101f25a1e1d7f11115186543ff6eb95e3d9b98f71d2c959af6b0dad6b63cd1e6d6900012201200060011222012001130061220120011500622201200063011822012001190064220120011b0065220120011d006628480101a96f5d75bc79b8d1640e680704965baaa2245e4b3a5ad8e980ef5a3568409418000222012000df006822012000e10069220120006a00e422012000e5006b22012000e7006c22012000e9006d22012000eb006e220120006f00ee220120007000f0220120007100f2284801016f2780ba9d3cdce8eee34a23d893d90800da0ac1be8a973c513909136b7f636b000223130103f4e8a974d234a558007300740091231301022a87a0c5b59fe77800750076009128480101827773c365eccfd6cb46a3f783a09f1aba77ce1a0a4d62048569e9b845e955f8016b3313e844a4da57b7cf2b0b52b004cc5886c966478e37012ee2d9b473bf083e1e3072beee68024dd8cc7dffdfde9e114e4818dc10824b446d661453963fa117c1fcbf0027000f01015ec2a33b80d481d8008f0090009122130100cbc4fd8a34cb65a80077007822130100596b57d9c1932d880079007a28480101cf20bddca78403c3e40e2ab1b3eeb526c425b5efb531e6c5bd3d52019c25125c002628480101ff7081e66c7f0d6e868021316b0189b9e67b61284c176cd74f78fa6baa18a025001a221301003f0bad3989c46848007b007c221100e0b187aea6583a68007d007e284801011d818de56750d053b2a227f0da85ba37fb1869d0c774629d04e2668e1204c0a3001b28480101174c3878604468b08b7b76f5349c41201ae28b81ca1d94794ab11a692e4668250018221100e0a7528c0ef95128007f0080220f00c141a6498c4d080081008228480101e00721ae4b2be2ed708fa68e6b7bec2759a107504812069b3b8aa9acea346c66001528480101747c06e45f53ca1dc7d23f39db07d12f2e67fa595a36fa41d26683ab42d1a3040014220f00c02225548664a800830084220f00c0221de12e91080085008628480101eb38ef90c590bedb3ce31140d2d4176d43db6b7aab35df685afc4ccf2a383209000b2848010179a2e20b8a926ab2fe83108ff00f2fbced9958047008e5cb5fdf8c798aab63850010220f4030085e7768002a0087008828480101a248b81f22333cc28f6b6744e4298aefcd9b6f2dc5d7c99e1da1b28c37f3aa0c0007220f00c02170f2272c280089008a219dbceaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa818042d76318e1805a8c67376726b2dcf563d47e9c2ed6fa8fd993942535d6c8ed758902593e99400003a6cef706707008b284801010143b3d2dd671b2559543155e003f847022e510b3a57afabbca05d4069c327ef000d2277cff55555555555555555555555555555555555555555555555555555555555555554085ac1288e0000000000000074d9dee0ce118042d76318e195d0008c008d2848010164a43970f2007a1da6d6fc81773cc095d1cc270e81359e471f3b03469abeb7b5000c214900000027cbb9d1062954439a83a91f27835fb9d2e3e798910356650c3c493c946234646840008e28480101374e198a900e08edc634a5f2ad73e388b0a3019d24269fae8046024e437476b1001028480101903aa268fecbed38822a8972ba42eadb53c0972f11b8486f1534210245db4898002322130100f62101ef274493a80092009328480101a5a7d24057d8643b2527709d986cda3846adcb3eddc32d28ec21f69e17dbaaef0001284801012bd772e408a34578028922281a3e5b5384970a6a6dd741b1cfa3b80a3e5ec57d002322130100dd08f981e2391cc80094009522130100a6df0757302b7a080096009728480101b90ed7fc04a4971294b12a078ec8189e8fdba184de6e23043922a774ae403ee2002422130100902873262f1a00c800980099221100f6b694310111794800ad00ae28480101eda54e0b0237690499c3e159ab800469fdbcb3c162d42181c2c298acd4e98f3100152213010090175c8f4f390ee8009a009b28480101cc6ead611f9fa7c0598d8f88d658fe0b91f5f9c9635c872154234c16c722970c0014221301008fb45ff0b5a9b208009c009d221301008f689e73d5df63e8009e009f28480101c7c146bea2ced23475861d11146c0560a46c3d243563fda0e32bf8c34229d2670013221301008f677b5226ff9ac800a000a128480101ef1aa8b2068cf6a8eadef8197235a5d5976865a32a3ad1fe80db069ddb8cc2fe001128480101c2ef35325f62d0b4cc17d1f5d083894100c3c478504d70b6eb8d3cf26e604ff40011221301008f677a842024270800a200a3284801018a51fe69422dbf7e028fb1dcac5a62064eefeb4c080793e78a24ef22334b307c0010221301008f6779e01c90518800a400a521a1bcd99999999999999999999999999999999999999999999999999999999999982011ecef3bbeb1c21823653419f6ebabf10f7978dae7e33a12d3bbe9815917a62eb4fe902f2a96e88600003a6cef70670500a62848010150725eee52e86432f846698a08ac153a67bc9ad9c160130af907c3bef05f29480007227bcff33333333333333333333333333333333333333333333333333333333333333334081ac1664bc000000000000074d9dee0ce0e011ecef3bbeb1c2196d000a700a8284801016217f872c99fafcb870f2c11a362f59339be95095f70d00b9cff2f6dcd69d3dd000e2355ec039e4242ff8cc69bf4260c44ddc7b820f838fa85ad1828d2b83ace409d6c02a3b89a505ac592d94a7c4d00a900aa00ab28480101ff06225996392d9e78d92fef981828f3459892841111b2d352901236d506cb65000b28480101336df3bd068890e3f26c1a8f5e77c4bf7cc3c81fc88006ab614b6db43647262600072179a0634dfa13634f7a130000800006226ee3dc107c1c7d42d68c14695c1d67204eb60151dc4d282d62c96ca53e26c0100ee542c8b882e30ec389aaabdca000ac28480101b8ad45439ed0f9f1ffb12362a0c0a6f522734feed11dda077d5f6067f1305170000b221100f6a2a63eab3d4e4800af00b028480101e2a96bbff9be849635722263833d77a90f0a832b410f8b73bca56041fd7e21970016221100ea5905b0b329bd8800b100b22848010130dd0d5ef5796dc4c101fbf5b4b083599e509d0f738b07a8dbfad6b5ae53aecb0012221100ea58fcd0996ec14800b300b42848010130219e3c8c788af6da8a296da6f3e9925c909eed9821a0ae1911c38f56f7b37e000b28480101e2bc337ece7f3af5171f3265f44c612fc2fcba87f4b4563dc7fdc3285dd6a44d0008220f00c035987df0cb0800b500b6219bbd62f8f7bea30f8ab5e9f16c3fb8642b118f56ed1bdc49600dbe5220c8b1af9e040c474f804c5ac6247ef1e5d11d080c3d8b21135b54598a72e11fbc6ebe1fa0c4b2a7df0a00000e9b3bdc19c1c000b72848010118dd0a8040c21a2cfb6c0acf4ad636dc67ef3ab0a3e102f1b43ad500c55728d00007236fcff34517c7bdf5187c55af4f8b61fdc321588c7ab768dee24b006df29106458d7cf21881f48000000000000074d9dee0ce110311d3e017f000b800b900ba284801017269fb9feb45d719ebdbc3b0816b987bab06f43378dc84dc84d55727905482140002004811fd096c000000000000000000000000000000000000000000000000000000000000000028480101986c49971b96062e1fba4410e27249c8d73b0a9380f7ffd44640167e68b215e800032213c3c000074d9dea3c512000bd00be22012000db00dc28480101258d602eaa21d621634dcf86692aeae308ff3cf888f3edafc6a5b21848d732f900182211480000e9b3bd478a2400bf00c0284801014b01ebcf5425735461aa8b83bae89e70fa21e95d2ee85e57b05dad26c1d6d53000162211200003a6cef51e289000c100c22848010165b0a85a0fdea0c76a2a98445623ea62427099a6318624794dea416f1bdc6f5c00152211200003a6cef51e289000c300c428480101b5b64686c719580155341cb7347af0405dec7158c283ad30833b07325bdc48a5001422116200003a6cef51e28900c500c628480101fde4f74a9866e3de066d6d27e3b1fe107053ecce8b54d8b05ebf4a3b0789c26b00112211200003a6cef51e289000c700c828480101f7a4391731a8136b142d214311bd2f8c162938f27185d22de576a045a13b1e1600102211200003a6cef51e289000c900ca2848010187c846be2bc06a266ae017ae9a13c66cf156125edd95b8bd4f6cfe3c903e3b35000f2211200003a6cef51e289000cb00cc2848010122da148fcc6a6a317ae3c41ee888034019cbfa89e57f306b85601dd2045d6daa000e2211000003a6cef51e289000cd00ce2848010191c44865f6767ab41750fbf5117df2d8be3110925c7993aa2e03780673c31f32000d2211400000e9b3bd478a2400cf00d0284801016d16afa0d70d41df6abe49636527c0b566bd3b722b731eba03433d7efbcb3908000b2211000003a6cef51e289000d100d228480101d744ca7d3ce6fe4538b3fa6a138971ca129c227d8a6736a9cd1d33c2f1fd06cc000a2211400000e9b3bd478a2400d300d42848010175d211346d824c33aff56800c12e0b320854590aadfd85e3f909502cdb6ec3c100082211400000e9b3bd478a2400d500d628480101322f03bbddf42b900d602199315f5d4befa1a9282a2a6c845f3db6ccd2b6bfc000062211cc00003a6cef51e28900d700d82211000003a6cef335e09000d900da00a9d0000074d9dea3c51000003a6cef51e28802e7da887bc30110fabeb509a897a3390f976cc960ac3abd703b5118af0561c6dd340fc9affafb002ac3ea97ff8196b89d89d0abbdddd6dfbe4da9933410dff5f726b01528480101523e62a3a95932c2a65f2314a8a818f82f48644967cc31dcfda9954109d8b55100012848010177c2748c31a7f78c56862aa9d06df60981de7aaa59e67d4d0360a2903384fe1500013201032a5ac73da06a6b989d158bec539003d36dc087d663eda6337be5667c284f16310ee22bacedde5f1c215edbbbdf7a1c20c98ec248b7893266ebfceeb41817bd000f000c2000f700f822012000dd00de284801019deed5e9cd5995ad6c97a06276c939029a1d05a6de03b6c724a4b5567e9adb7a000e22012000df00e0284801016bc4ad2e5c909f6f452be243edc65694f7e6db5f2fc615f69756954a60a563a2000c22012000e100e2284801016925c827cdb72656785a860c0ed1b94c1ff9f0614b9e2ed1b0aa1ee8fbb395aa000c22012000e300e422012000e500e62848010197d9c97586b5cf9a93f5077cf1e13c91f7a4d5b240601e4d08030ab62cd17707000b28480101f613c63e75ce90bdb3aadf01297ba9a958588392473ea542ef8654f281d2854f000922012000e700e828480101d83f99b6b2deca33e45337ea0fa4788a5590c2a9f88654c24c1e4b5282ec7787000822012000e900ea28480101497deb7f82cc061521c9f6bf58ddd3043ecb1dbaea13352ecb73bb53236a9dd8000622012000eb00ec28480101e86bec3c2e5a0c5b9bad30e9b0efd5c74409fece4efd571f8fe02eccbbd0af1a000422012000ed00ee22012000ef00f02848010178a2f12e152f91343bff8aeda8ca7bab1039578fb6b03832c150f22786d0500c000422012000f100f228480101b26a0cc496805853f303d8a00ae9fc7f7b20dc7cab6d1d1c21f5b86469874a84000202012000f300f428480101a31f27b17ffa79bcaf0e47f55dffa054f825e019e447026255e7e1a8d7488701000200b1bcd91dbefdb40075ad92878e330bb79115bcfc28f3c5b9833df391ce8138514a3199fcd1800000000000006500000002b0d782ed8000003f2a3414d8b199f72d0000000000000040800000038a0ed0708000002d14497b814002014800f500f600afbc6827bcf8957c10b8a5694ecd7f0dd41e6a2cd906c77e5340983b618fb6fb0800000000000000000000000000000000000000000000000000000000c695ef7e000000000000007200000006efab3f64000000450742496300afbc66e5f2524ea28a3bde37c9b8f9e929de2e8e0ae9b0b84a7deeee8d71d424e8c69d27d400000000000000e2000000093197d6c2000000a8632502f4c69d1ba4000000000000008a000000116e3e81da0000006af0f2148122012000f900fa28480101912d60694234d59e4645f5d2ebd90e081979a3f6eaf4124bec3980e4547a5094000e22012000fb00fc220120010f011022012000fd00fe28480101348a81067d100edaf90feeb18db50c3c315a07c6c0944b52368c30e76a6f40df000b22012000ff0100284801018540d2166efad6f7a81289ddf3983d3ed177993dce47ccb150f2fcc287428d53000a220120010101022848010110b3b5e79df7c963efb443120853eb1bf9377e78020993bf79d5aaa9b02d1a6a000822012001030104284801016f610eec3a1e4dc9bdacbda0e586e7a8f6b4734b6599ecc0f8c5d0e9666d0ed3000822012001050106284801019100c451439a1cfdcf444d77bc78d03f19ca5e71b1f8fdae5e9e0ccf3e8214a000072201200107010828480101e0140ab9f7e276e1143af00713243e470dfc2c93c02b124622926fd33551a71b00062201200109010a284801014ef684da255649795b7830d1100f419d8f8a0eeb9ed6ed3610ba20b5d815deed0003220120010b010c2848010155cdb8f72801ef11ba562172ed2626c88208eddcf4a0c8f6d5447a785d02b790000202037820010d010e28480101b6eb72df89b91190ab85640f1ef9817bf00e49c5c11e8fd173b5b382ca4a104700010073dde8c69d27d40000000002e7da88000004baec525bbe000096f6a2fa0e38c69d27d4000000001598a6b2000004da46f3846200009e49d38f1eeb00afbbdc4b61f8041625a15bee3b094ff72034e12e69e8d71521ac6748fe6359832319afc8c8000000000000066800000033ffaa8b0000000419c4a9d68319afccd800000000000003d00000002e72705fc80000026a49c0209c284801018dfe3c99df194f8fec2b5b64b5ef08296b853794a29497c7c425ca62a44695e6000c2201200111011222012001130114284801010c275d6749b7c9102256e4abafdecda16a1697f20d26cd0e711bd9d58ef4a2f2000a28480101c169f7745c95d5f3f6b4e550c15978aaf563631f3a9e6ddaaa361ed4042e4f05000922012001150116284801017a3b4493fefcfd2275fa2f6ab01a8db5d70a443fb48dfb00e152545adfb97cbb0007220120011701182201200119011a28480101b13de2fa76c60764833d05264a2e1081609e2dfa9a04bf8d6c5e1162ac7d47cb000728480101027742b12159d2d1310044b4a94e1eea928905b045871a52b552b4b4841288400006220120011b011c28480101df4611dc79f46dc700809e0c3140796be5ca9572c3f3fab70ddbe6a5460bf4900003220120011d011e28480101d52b65c44fcc1a90bbbf8cc01e8ab9c7b6c51f95c2735d6de72a669c1135a8360003020162011f01200201200121012200b0bc885a77c249fb95f38bb13224853b7944942c4b10b84f1b99aa32892aabd4f46335f78a00000000000000bc00000003fb0146f100000074c1cd03f56335e64b0000000000000058000000040ca9eccb000000387d19d10000afbc60807ffe2b018ea1eb65ddc523f7772fc1e1f16e73ee8905b4b66c12275ca800000000000000000000000000000000000000000000000000000000c67fd5260000000000000096000000081b2d1d7000000064c8dda77100afbc799607d471065ad26b0a721946ed764b15a01cf341e11989f08863962a362800000000000000000000000000000000000000000000000000000000c69d27d4000000000000003e00000002165b2b1c0000002c0b7cc7ad0103802001270001021101918f8df47d89a592d9a8e2220276e210d49d789c174ab2b303917d71c6655837000782012f0317cca5687735940043b9aca00401280129012a0247a00f076afb8843d0d2618df1779691876f9ffd59f9b30f47df60f49496744dec67200610012e013b0103d040012b003fb000000000400000000000000021dcd650010ee6b280087735940043b9aca004010150012d01db500e3a26680b9f6a280000e9b3bd478a000000e9b3bd478a0d73fd8f873243316a5b55a0395be4d1c584d71a7c52116b6379a3e93f9649360375de02eb9865b5786e167c4411e5c415cf6064be75fe04b0f81f0c4b84c7260880002c7d7c00000000000000000b9f6a0b1a749f2a012c001343b9aca0021dcd650020020161012e013b0106460600013f020340400130013102037604013201330297bf955555555555555555555555555555555555555555555555555555555555555502aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaad00000074d9dee0ce0c1014c014e0397beb33333333333333333333333333333333333333333333333333333333333333029999999999999999999999999999999999999999999999999999999999999999cf8000074d9dee0ce00400134013501360397be8517c7bdf5187c55af4f8b61fdc321588c7ab768dee24b006df29106458d7cf029a28be3defa8c3e2ad7a7c5b0fee190ac463d5bb46f71258036f9488322c6be7cf8000074d9dee0ce004001410142014301035040013701034040013b0082722f7566ede0ba3a333ac2ca4e9820a0eb28fa3c675e8c5b7378fbba7d487af6b6d8b330226ee7a4226c9a4e28167203a4dec229d3f51655422b56dd7122352fda03af7333333333333333333333333333333333333333333333333333333333333333300001d3677b8338199ff4756d3363cbb8d2ef1acd9bcdb85ff220a0116f74843bac2e4c0c79ceed000001d3677a8f142634e93ea0001408014d013801390082722f7566ede0ba3a333ac2ca4e9820a0eb28fa3c675e8c5b7378fbba7d487af6b69e73e012c2b93293818802ecda692b6a70c7bc140c3d6ba22159dd15949099300205203024013a015100a0431b9004c4b4000000000000000000960000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003af7333333333333333333333333333333333333333333333333333333333333333300001d3677b8338232a2e0d714f1820922c85912266b270b551f97fd88c9ce96b02fbe0b94fedd3300001d3677b83381634e93ea0001408013c013d013e0101a0013f0082729e73e012c2b93293818802ecda692b6a70c7bc140c3d6ba22159dd1594909930d8b330226ee7a4226c9a4e28167203a4dec229d3f51655422b56dd7122352fda020f0409283baec018110140015100ab69fe00000000000000000000000000000000000000000000000000000000000000013fccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccd283baec000000003a6cef706700c69d27d440009e42614c107ac0000000000000000064000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000103504001440103504001470082723145f857768776495406acbcd9f6451e43b82a7cf2b787bdfcd66f54e8f61eb2f5fc1aa51cd06879f30dac067b3d17d0571b7c8ef15db6c57ce3e90f63e7d80803af734517c7bdf5187c55af4f8b61fdc321588c7ab768dee24b006df29106458d7cf00001d3677b833817a340a8997502684b5be64a7ba6e4f4f1393c8316bcf1149956bbf00b95dd25600001d3677a8f143634e93ea0001408014d014501460082723145f857768776495406acbcd9f6451e43b82a7cf2b787bdfcd66f54e8f61eb20d9c166ab6df5f0d47d18e86fc45c1e5f42681c1184337189ef2e4aa3f2552c10205203034014a014b03af734517c7bdf5187c55af4f8b61fdc321588c7ab768dee24b006df29106458d7cf00001d3677b83383a4dbec8658831b756fd060883f7d013972d9838f66cebcd2e28d66f2b2d6d46900001d3677b83381634e93ea0001408014d014801490082720d9c166ab6df5f0d47d18e86fc45c1e5f42681c1184337189ef2e4aa3f2552c1f5fc1aa51cd06879f30dac067b3d17d0571b7c8ef15db6c57ce3e90f63e7d8080205303034014a014b00a042665004c4b400000000000000000030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000069600000009600000004000600000000000519ae84f17b8f8b22026a975ff55f1ab19fde4a768744d2178dfa63bb533e107a409026bc03af7555555555555555555555555555555555555555555555555555555555555555500001d3677b83383f9b2f37bf03c07595e4f861c14a0779c5b0ddb12bd6b0bf59b7f464fab4b279400001d3677a8f143634e93ea0001408014d014e014f0001200082720ac47779e474df79ac188caf2308fa7fccf511a8be789a6502f15ca63fba64408669008ce4710e1108a5eee86c282b1d13feaf7634e0c592943ae844ddd4ca0c02053030240150015100a041297004c4b40000000000000000002e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005bc00000000000000000000000012d452da449e50b8cf7dd27861f146122afe1b546bb8b70fc8216f0c614139f8e04d7cef969").endCell(); log.info("CellType {}", cell.getCellType()); -// log.info(cell.print()); + log.info(cell.print()); log.info(Utils.bytesToHex(cell.toBoc(true))); } + /** + * deserialize cell of code of wallet v4r2 + */ + @Test + public void testBocIssue4() { + String cellExpected = "x{FF00F4A413F4BCF2C80B}\n" + + " x{2_}\n" + + " x{4}\n" + + " x{D001D0D3032171B0925F04E022D749C120925F04E002D31F218210706C7567BD22821064737472BDB0925F05E003FA403020FA4401C8CA07CBFFC9D0ED44D0810140D721F404305C810108F40A6FA131B3925F07E005D33FC8258210706C7567BA923830E30D03821064737472BA925F06E30D}\n" + + " x{01FA00F40430F8276F2230500AA121BEF2E0508210F06C75677080185004CB0526CF1658FA0219F400CB6917CB1F5260CB3F20C98040FB0006}\n" + + " x{5004810108F45930ED44D0810140D720C801CF16F400C9ED540172B08E208210E47374727080185005CB055003CF1623FA0213CB6ACB1FCB3FC98040FB00925F03E2}\n" + + " x{2_}\n" + + " x{2_}\n" + + " x{5}\n" + + " x{B29DFB513420405035C87D010C00B23281F2FFF274006040423D029BE84C6_}\n" + + " x{2_}\n" + + " x{ADCE76A26840206B90EB85FFC_}\n" + + " x{AF1DF6A26840106B90EB858FC_}\n" + + " x{B8C97ED44D0D70B1F}\n" + + " x{BD242B6F6A2684080A06B90FA0218470D4080847A4937D29910CE6903E9FF9837812801B7810148987159F3184_}\n" + + " x{F28308D71820D31FD31FD31F02F823BBF264ED44D0D31FD31FD3FFF404D15143BAF2A15151BAF2A205F901541064F910F2A3F80024A4C8CB1F5240CB1F5230CBFF5210F400C9ED54F80F01D30721C0009F6C519320D74A96D307D402FB00E830E021C001E30021C002E30001C0039130E30D03A4C8CB1F12CB1FCBFF}\n" + + " x{D207FA00D4D422F90005C8CA0715CBFFC9D077748018C8CB05CB0222CF165005FA0214CB6B12CCCCC973FB00C84014810108F451F2A702}\n" + + " x{810108D718FA00D33FC8542047810108F451F2A782106E6F746570748018C8CB05CB025006CF165004FA0214CB6A12CB1FCB3FC973FB0002}\n" + + " x{810108D718FA00D33F305224810108F459F2A782106473747270748018C8CB05CB025005CF165003FA0213CB6ACB1F12CB3FC973FB00}\n" + + " x{F400C9ED54}\n"; + + String bocHexExpected = "B5EE9C72410214010002CE000114FF00F4A413F4BCF2C80B010201200203020148040504F8F28308D71820D31FD31FD31F02F823BBF264ED44D0D31FD31FD3FFF404D15143BAF2A15151BAF2A205F901541064F910F2A3F80024A4C8CB1F5240CB1F5230CBFF5210F400C9ED54F80F01D30721C0009F6C519320D74A96D307D402FB00E830E021C001E30021C002E30001C0039130E30D03A4C8CB1F12CB1FCBFF1011121302E6D001D0D3032171B0925F04E022D749C120925F04E002D31F218210706C7567BD22821064737472BDB0925F05E003FA403020FA4401C8CA07CBFFC9D0ED44D0810140D721F404305C810108F40A6FA131B3925F07E005D33FC8258210706C7567BA923830E30D03821064737472BA925F06E30D06070201200809007201FA00F40430F8276F2230500AA121BEF2E0508210F06C75677080185004CB0526CF1658FA0219F400CB6917CB1F5260CB3F20C98040FB000600845004810108F45930ED44D0810140D720C801CF16F400C9ED540172B08E208210E47374727080185005CB055003CF1623FA0213CB6ACB1FCB3FC98040FB00925F03E20201200A0B0059BD242B6F6A2684080A06B90FA0218470D4080847A4937D29910CE6903E9FF9837812801B7810148987159F31840201580C0D0011B8C97ED44D0D70B1F8003DB29DFB513420405035C87D010C00B23281F2FFF274006040423D029BE84C600201200E0F0019ADCE76A26840206B90EB85FFC00019AF1DF6A26840106B90EB858FC0006ED207FA00D4D422F90005C8CA0715CBFFC9D077748018C8CB05CB0222CF165005FA0214CB6B12CCCCC973FB00C84014810108F451F2A7020070810108D718FA00D33FC8542047810108F451F2A782106E6F746570748018C8CB05CB025006CF165004FA0214CB6A12CB1FCB3FC973FB0002006C810108D718FA00D33F305224810108F459F2A782106473747270748018C8CB05CB025005CF165003FA0213CB6ACB1F12CB3FC973FB00000AF400C9ED54D4552129"; + Cell cell = CellBuilder.beginCell().fromBoc(bocHexExpected).endCell(); + log.info("CellType {}", cell.getCellType()); + log.info(cell.print()); + log.info(Utils.bytesToHex(cell.toBoc(true, false, false, false, false))); + + assertThat(cell.print()).isEqualTo(cellExpected); + assertThat(Utils.bytesToHex(cell.toBoc(true)).toUpperCase()).isEqualTo(bocHexExpected); + } + + /** + * basic cell + */ + @Test + public void testCellBackAndForth1() { + String cellExpected = "x{40000001400000036_}\n"; + String bocHexExpected = "B5EE9C7241010101000B0000114000000140000003603C39FDA2"; + Cell cell = CellBuilder.beginCell().fromBoc(bocHexExpected).endCell(); + + log.info("CellType {}", cell.getCellType()); + log.info(cell.print()); + log.info(Utils.bytesToHex(cell.toBoc(true))); + + assertThat(cell.print()).isEqualTo(cellExpected); + assertThat(Utils.bytesToHex(cell.toBoc(true)).toUpperCase()).isEqualTo(bocHexExpected); + } + + /** + * cell with one ref + */ + @Test + public void testCellBackAndForth2() { + String cellExpected = "x{40000001400000034_}\n" + + " x{40000001400000036_}\n"; + String bocHexExpected = "B5EE9C7241010201001700011140000001400000034001001140000001400000036010CB5ED2"; + Cell cell = CellBuilder.beginCell().fromBoc(bocHexExpected).endCell(); + + log.info("CellType {}", cell.getCellType()); + log.info(cell.print()); + log.info(Utils.bytesToHex(cell.toBoc(true))); + + assertThat(cell.print()).isEqualTo(cellExpected); + assertThat(Utils.bytesToHex(cell.toBoc(true)).toUpperCase()).isEqualTo(bocHexExpected); + } + + /** + * cell with one ref that has another ref + */ + @Test + public void testCellBackAndForth3() { + String cellExpected = "x{40000001400000034_}\n" + + " x{40000001400000034_}\n" + + " x{40000001400000036_}\n"; + String bocHexExpected = "B5EE9C72410103010023000111400000014000000340010111400000014000000340020011400000014000000360CD2FA77E"; + Cell cell = CellBuilder.beginCell().fromBoc(bocHexExpected).endCell(); + + log.info("CellType {}", cell.getCellType()); + log.info(cell.print()); + log.info(Utils.bytesToHex(cell.toBoc(true))); + + assertThat(cell.print()).isEqualTo(cellExpected); + assertThat(Utils.bytesToHex(cell.toBoc(true)).toUpperCase()).isEqualTo(bocHexExpected); + } + + + /* + * complex cell with four refs: + * =: cell1 + * cell1 ."cell 1: " B dup Bx. cr + *

+ * =: cell2 + * cell2 ."cell 2: " B dup Bx. cr + *

+ * =: cell3 + * cell3 ."cell 3: " B dup Bx. cr + *

+ * =: cell4 + * cell4 ."cell 4: " B dup Bx. cr + *

+ * =: cell5 + * cell5 ."cell 5: " B dup Bx. cr + */ + @Test + public void testCellBackAndForth4() { + String cellExpected = "x{40000001400000034_}\n" + + " x{40000001400000036_}\n" + + " x{40000001400000034_}\n" + + " x{40000001400000036_}\n" + + " x{40000001400000034_}\n" + + " x{40000001400000034_}\n" + + " x{40000001400000036_}\n" + + " x{40000001400000034_}\n" + + " x{40000001400000034_}\n" + + " x{40000001400000036_}\n" + + " x{40000001400000034_}\n" + + " x{40000001400000034_}\n" + + " x{40000001400000036_}\n"; + String bocHexExpected = "B5EE9C7241010501003F00041140000001400000034004030201021140000001400000034003020111400000014000000340030111400000014000000340040011400000014000000360785A1C4B"; + Cell cell = CellBuilder.beginCell().fromBoc(bocHexExpected).endCell(); + + log.info("CellType {}", cell.getCellType()); + log.info(cell.print()); + log.info(Utils.bytesToHex(cell.toBoc(true))); + + assertThat(cell.print()).isEqualTo(cellExpected); + assertThat(Utils.bytesToHex(cell.toBoc(true)).toUpperCase()).isEqualTo(bocHexExpected); + } + private static final String BOC_FIFT_HEX_LARGE2 = "b5ee9c7241023201000498000114ff00f4a413f4bcf2c80b010201200302000cf2308048f2f00201480e0402012008050201200706001db9c34f00a5f03802032028307f00580011bbbd182108325e4c380201200d090201200b0a003bb6e53da89a1f401a803a1a7ffe00203e00203a861a1e0026209a8608a810020120310c002bb2fe7c02840917c120c1fd039be864fe800c380c1c200017bb9a5ed44d0d430d0d3ff3080202cb120f0201ce1110005b3e105bc90c0c40b53d01347b5134350c3434ffcc201254452ebcbd087ec120841ca368e840b2333d00104c3c01a000513e105bc90c0c40bd01347b5134350c3434ffcc20125444eebcbd20840764eab600723d00104c3c01a002012023130201201c140201201915020120181601f73e105bc90c80fd01347c02b434c03e8034c7f4c7fd010c2012c97cbd2012d4e4ae7cbd2012d4e4ee7cbd20134920840ee6b2802814032ec6fcbd3e097e0554c1e8483e0454c2e0083d039be864f4c7cc248c083880a94b20083d039be865900720083d05a74c083232c7f274100720083d05b882a9013232c01400e0170038fa02cb1fcb1f17f400c9f00b82101a69387e02c8cb1ff4004130f00600793e105bc90c0c40b53d01347b5134350c3434ffcc201254c52ebcbd08b434ffcc201200aebcbd3c028c54943c02e0843218aeaf40b2333d00104c3c01a00201201b1a00e33e105bc90c0c40b4fff4c7fe803d01347c02887434ffcc20125446eebcbd08e0080a60c1fc014c6011c07cbc94ca3c020a7232ffd50825a0083d10c1291508e43c0240bc02e0840d2212a4497232ffd49032c7d4883d00095110d4a17c01e0841c04df21c0f232ffc4b2c7fd00104c3c01a000ed3e105bc90c0c40b4fff4c7fe803d01347c0288e0080a60c1fc016011c07cbd2011d4c6eebcbd14cc3c0214d2bc020af232ffd5082e20083d10c06951543c0241291509243c025004fc02e084260abfffc97232ffd49032c7d4883d00095110d4a17c01e0840c19b443c0f232ffc4b2c7fd00104c3c01a0020120201d0201201f1e001f3214017e8084fd003d003333327b552000193b51343e803d013d0135350c200201202221003b20128870403cbc8830802672007e8080a0c1fd10e5cc0060c1fd16cc38a0001d0060c1fd039be864fe800c380c1c200201202b2402012028250201202726003d1c20043232c141bc0105b3c594013e808532dab2c7c4b2cff3c4f25c7ec020003d1c20043232c1417c010573c5893e808532da84b2c7f2cff3c4f260103ec0200201202a290023104cfd039be8482540b5c04c00780c5c0ca0001d1c081cb232c072c032c1f2fff274200201202d2c00215fa4001fa46804602c00012f2f4d3ff3080201202f2e001134c1c06a80b5c6006001ed20120871c03cbc807434c0c05c6c2497c0f83c00cc4074c7dc208061a808f00023858cc074c7e01200a0841b5a5b9d2e84bcbd2082c63cd865d6f4cffe801400f880fe0048840d10015bc13e186084100d28f014842ea4cc3c033820842296cbb9d4842ea4cc3c03782082c63cd854842ea4cc3c03f8203000588210982535785210ba9330f00ee08210b766741a5210ba9330f011e0821025d53dfdba92f010e0308048f2f00011b323bc02840d17c12004896818"; private static final String BOC_FIFT_BASE64_LARGE = "te6ccgECMgEABJgAART/APSkE/S88sgLAQIBIAIDAgFIBAUADPIwgEjy8AICywYHAgEgKCkCASAICQIBziYnAgEgCgsCASAXGAIBIAwNAgEgERICASAODwAhX6QAH6RoBGAsAAEvL00/8wgB7SASCHHAPLyAdDTAwFxsJJfA+DwAzEB0x9wggGGoCPAAI4WMwHTH4BIAoIQbWludLoS8vSCCxjzYZdb0z/6AFAD4gP4ASIQNEAFbwT4YYIQQDSjwFIQupMw8AzgghCKWy7nUhC6kzDwDeCCCxjzYVIQupMw8A/ggEAARNMHAaoC1xgBgAFiCEJglNXhSELqTMPAO4IIQt2Z0GlIQupMw8BHgghAl1T39upLwEOAwgEjy8AIBIBMUAgEgFRYAHRwIHLIywHLAMsHy//J0IAAjEEz9A5voSCVAtcBMAHgMXAygAD0cIAQyMsFBfAEFc8WJPoCFMtqEssfyz/PE8mAQPsAgAD0cIAQyMsFBvAEFs8WUAT6AhTLassfEss/zxPJcfsAgAgEgGRoCASAfIAIBIBscAgEgHR4AHQBgwf0Dm+hk/oAMOAwcIAA7IBKIcEA8vIgwgCZyAH6AgKDB/RDlzABgwf0WzDigABk7UTQ+gD0BPQE1NQwgAB8yFAF+gIT9AD0AMzMye1UgAgEgISICASAjJADtPhBbyQwMQLT/9Mf+gD0BNHwCiOAICmDB/AFgEcB8vSAR1MbuvL0UzDwCFNK8AgryMv/VCC4gCD0QwGlRVDwCQSkVCSQ8AlAE/ALghCYKv//JcjL/1JAyx9SIPQAJURDUoXwB4IQMGbRDwPIy/8Syx/0AEEw8AaAA4z4QW8kMDEC0//TH/oA9ATR8Aoh0NP/MIBJURu68vQjgCApgwfwBTGARwHy8lMo8AgpyMv/VCCWgCD0QwSkVCOQ8AkC8AuCEDSISpElyMv/UkDLH1Ig9AAlRENShfAHghBwE3yHA8jL/xLLH/QAQTDwBoAB5PhBbyQwMQLU9ATR7UTQ1DDQ0/8wgElTFLry9CLQ0/8wgEgCuvL08AoxUlDwC4IQyGK6vQLIzPQAQTDwBoAH3PhBbyQyA/QE0fAK0NMA+gDTH9Mf9AQwgEsl8vSAS1OSufL0gEtTk7ny9IBNJIIQO5rKAKBQDLsb8vT4JfgVUwehIPgRUwuAIPQOb6GT0x8wkjAg4gKlLIAg9A5voZZAHIAg9BadMCDIyx/J0EAcgCD0FuIKpATIywBQA4CUAOPoCyx/LHxf0AMnwC4IQGmk4fgLIyx/0AEEw8AYAUT4QW8kMDEC9ATR7UTQ1DDQ0/8wgElRE7ry9IIQHZOq2AHI9ABBMPAGgAFs+EFvJDAxAtT0BNHtRNDUMNDT/zCASVEUuvL0IfsEghByjaOhAsjM9ABBMPAGgAgEgKisCASAwMQAXu5pe1E0NQw0NP/MIAgEgLC0CASAuLwA7tuU9qJofQBqAOhp//gAgPgAgOoYaHgAmIJqGCKgQABGzI7wChA0XwSAAK7L+fAKECRfBIMH9A5voZP6ADDgMHCAAEbu9GCEIMl5MOAAducNPAKXwOAIDICgwfwBY"; private static final String BOC_FIFT_LARGE_HASH = "2f013a05f1522b9288e0412c524186f089ea30e87afc9a51395eed0019f2cf8f"; diff --git a/smartcontract/src/main/java/org/ton/java/smartcontract/types/WalletCodes.java b/smartcontract/src/main/java/org/ton/java/smartcontract/types/WalletCodes.java index 9c44a2ca..5bb36acc 100644 --- a/smartcontract/src/main/java/org/ton/java/smartcontract/types/WalletCodes.java +++ b/smartcontract/src/main/java/org/ton/java/smartcontract/types/WalletCodes.java @@ -9,32 +9,20 @@ public enum WalletCodes { V3R1("B5EE9C724101010100620000C0FF0020DD2082014C97BA9730ED44D0D70B1FE0A4F2608308D71820D31FD31FD31FF82313BBF263ED44D0D31FD31FD3FFD15132BAF2A15144BAF2A204F901541055F910F2A3F8009320D74A96D307D402FB00E8D101A4C8CB1FCB1FCBFFC9ED543FBE6EE0"), V3R2("B5EE9C724101010100710000DEFF0020DD2082014C97BA218201339CBAB19F71B0ED44D0D31FD31F31D70BFFE304E0A4F2608308D71820D31FD31FD31FF82313BBF263ED44D0D31FD31FD3FFD15132BAF2A15144BAF2A204F901541055F910F2A3F8009320D74A96D307D402FB00E8D101A4C8CB1FCB1FCBFFC9ED5410BD6DAD"), V4R2("B5EE9C72410214010002D4000114FF00F4A413F4BCF2C80B010201200203020148040504F8F28308D71820D31FD31FD31F02F823BBF264ED44D0D31FD31FD3FFF404D15143BAF2A15151BAF2A205F901541064F910F2A3F80024A4C8CB1F5240CB1F5230CBFF5210F400C9ED54F80F01D30721C0009F6C519320D74A96D307D402FB00E830E021C001E30021C002E30001C0039130E30D03A4C8CB1F12CB1FCBFF1011121302E6D001D0D3032171B0925F04E022D749C120925F04E002D31F218210706C7567BD22821064737472BDB0925F05E003FA403020FA4401C8CA07CBFFC9D0ED44D0810140D721F404305C810108F40A6FA131B3925F07E005D33FC8258210706C7567BA923830E30D03821064737472BA925F06E30D06070201200809007801FA00F40430F8276F2230500AA121BEF2E0508210706C7567831EB17080185004CB0526CF1658FA0219F400CB6917CB1F5260CB3F20C98040FB0006008A5004810108F45930ED44D0810140D720C801CF16F400C9ED540172B08E23821064737472831EB17080185005CB055003CF1623FA0213CB6ACB1FCB3FC98040FB00925F03E20201200A0B0059BD242B6F6A2684080A06B90FA0218470D4080847A4937D29910CE6903E9FF9837812801B7810148987159F31840201580C0D0011B8C97ED44D0D70B1F8003DB29DFB513420405035C87D010C00B23281F2FFF274006040423D029BE84C600201200E0F0019ADCE76A26840206B90EB85FFC00019AF1DF6A26840106B90EB858FC0006ED207FA00D4D422F90005C8CA0715CBFFC9D077748018C8CB05CB0222CF165005FA0214CB6B12CCCCC973FB00C84014810108F451F2A7020070810108D718FA00D33FC8542047810108F451F2A782106E6F746570748018C8CB05CB025006CF165004FA0214CB6A12CB1FCB3FC973FB0002006C810108D718FA00D33F305224810108F459F2A782106473747270748018C8CB05CB025005CF165003FA0213CB6ACB1F12CB3FC973FB00000AF400C9ED54696225E5"), - lockup("B5EE9C7241021E01000261000114FF00F4A413F4BCF2C80B010201200203020148040501F2F28308D71820D31FD31FD31F802403F823BB13F2F2F003802251A9BA1AF2F4802351B7BA1BF2F4801F0BF9015410C5F9101AF2F4F8005057F823F0065098F823F0062071289320D74A8E8BD30731D4511BDB3C12B001E8309229A0DF72FB02069320D74A96D307D402FB00E8D103A4476814154330F004ED541D0202CD0607020120131402012008090201200F100201200A0B002D5ED44D0D31FD31FD3FFD3FFF404FA00F404FA00F404D1803F7007434C0C05C6C2497C0F83E900C0871C02497C0F80074C7C87040A497C1383C00D46D3C00608420BABE7114AC2F6C2497C338200A208420BABE7106EE86BCBD20084AE0840EE6B2802FBCBD01E0C235C62008087E4055040DBE4404BCBD34C7E00A60840DCEAA7D04EE84BCBD34C034C7CC0078C3C412040DD78CA00C0D0E00130875D27D2A1BE95B0C60000C1039480AF00500161037410AF0050810575056001010244300F004ED540201201112004548E1E228020F4966FA520933023BB9131E2209835FA00D113A14013926C21E2B3E6308003502323287C5F287C572FFC4F2FFFD00007E80BD00007E80BD00326000431448A814C4E0083D039BE865BE803444E800A44C38B21400FE809004E0083D10C06002012015160015BDE9F780188242F847800C02012017180201481B1C002DB5187E006D88868A82609E00C6207E00C63F04EDE20B30020158191A0017ADCE76A268699F98EB85FFC00017AC78F6A268698F98EB858FC00011B325FB513435C2C7E00017B1D1BE08E0804230FB50F620002801D0D3030178B0925B7FE0FA4031FA403001F001A80EDAA4"), - dnsCollection("B5EE9C7241021D010002C7000114FF00F4A413F4BCF2C80B0102016202030202CC040502012017180201200607020120131402012008090201200D0E016D420C70094840FF2F0DE01D0D3030171B0925F03E0FA403001D31FED44D0D4D4303122C000E30210245F048210370FEC51BADC840FF2F080A0201200B0C00D032F82320821062E44069BCF2E0C701F00420D74920C218F2E0C8208103F0BBF2E0C92078A908C000F2E0CA21F005F2E0CB58F00714BEF2E0CC22F9018050F833206EB38E10D0F4043052108307F40E6FA131F2D0CD9130E2C85004CF16C9C85003CF1612CCC9F00C000D1C3232C072742000331C27C074C1C07000082CE500A98200B784B98C4830003CB432600201200F100201201112004F3223880875D244B5C61673C58875D2883000082CE6C070007CB83280B50C3400A44C78B98C727420007F1C0875D2638D572E882CE38B8C00B4C1C8700B48F0802C0929BE14902E6C08B08BC8F04EAC2C48B09800F05EC4EC04AC6CC82CE500A98200B784F7B99B04AEA00093083001258C2040FA201938083001658C20407D200CB8083001A58C204064200A38083001E58C20404B2007B8083002258C204032200538083002650C20191EB83002A4E00C9D781E9C600069006AC0BC018060840EE6B2802A0060840EE6B2802A00A08418B9101A68608209E3402A410830856456F81B04A5A9D6A0192A41392002015815160039D2CF8053810F805BBC00C646582AC678B387D0165B5E66664C0207D804002D007232FFFE0A33C5B25C083232C044FD003D0032C03260001B3E401D3232C084B281F2FFF27420020120191A0201201B1C0007B8B5D318001FBA7A3ED44D0D4D43031F00A7001F00B8001BB905BED44D0D4D430307FF002128009DBA30C3020D74978A908C000F2E04620D70A07C00021D749C0085210B0935B786DE0209501D3073101DE21F0035122D71830F9018200BA93C8CB0F01820167A3ED43D8CF16C90191789170E212A0018F83DF327"), - dnsItem("B5EE9C7241022801000698000114FF00F4A413F4BCF2C80B0102016202030202CC04050201201E1F02012006070201481819020120080902015816170201200A0B000D470C8CB01C9D0801F73E09DBC400B434C0C05C6C2497C1383E903E900C7E800C5C75C87E800C7E800C3C0289ECE39397C15B088D148CB1C17CB865407E90350C1B5C3232C1FD00327E08E08418B9101A68608209E3402A4108308324CC200337A0404B20403C162A20032A41287E08C0683C00911DFC02440D7E08FC02F814D671C1462C200C00113E910C1C2EBCB8536003F88E34109B5F0BFA40307020F8256D8040708010C8CB055007CF165005FA0215CB6A12CB1FCB3F226EB39458CF17019132E201C901FB00E029C70091709509D31F50AAE221F008F82321BC24C0008E9E343A3A3B8E1636363737375135C705F2E196102510241023F823F00BE30EE0310DD33F256EB31FB0926C21E30D0D0E0F00FE302680698064A98452B0BEF2E19782103B9ACA0052A0A15270BC993682103B9ACA0019A193390805E220C2008E328210557CEA20F82510396D71708010C8CB055007CF165005FA0215CB6A12CB1FCB3F226EB39458CF17019132E201C901FB00923036E2803C23F823A1A120C2009313A0029130E24474F0091024F823F00B00D2343653CDA182103B9ACA005210A15270BC993682103B9ACA0016A1923005E220C2008E378210370FEC516D72295134544743708010C8CB055007CF165005FA0215CB6A12CB1FCB3F226EB39458CF17019132E201C901FB001CA10B9130E26D5477655477632EF00B0204C882105FCC3D145220BA8E9531373B5372C705F2E191109A104910384706401504E082101A0B9D515220BA8E195B32353537375135C705F2E19A03D4304015045033F823F00BE02182104EB1F0F9BAE3023B20821044BEAE41BAE302382782104ED14B65BA1310111200885B363638385147C705F2E19B04D3FF20D74AC20007D0D30701C000F2E19CF404300798D43040168307F417983050058307F45B30E270C8CB07F400C910354014F823F00B01FE30363A246EF2E19D8050F833D0F4043052408307F40E6FA1F2E19FD30721C00022C001B1F2E1A021C0008E9124109B1068517A10571046105C43144CDD9630103A395F07E201C0018E32708210370FEC51586D8100A0708010C8CB055007CF165005FA0215CB6A12CB1FCB3F226EB39458CF17019132E201C901FB00915BE21301FE8E7A37F8235006A1810258BC066E16B0F2E19E23D0D749F823F0075290BEF2E1975178A182103B9ACA00A120C2008E32102782104ED14B6558076D72708010C8CB055007CF165005FA0215CB6A12CB1FCB3F226EB39458CF17019132E201C901FB0093303535E2F82381012CA0F0024477F0091045103412F823F00BE05F041501F03502FA4021F001FA40D20031FA0082103B9ACA001DA121945314A0A1DE22D70B01C300209205A19135E220C2FFF2E192218E3E821005138D91C8500BCF16500DCF1671244B145448C0708010C8CB055007CF165005FA0215CB6A12CB1FCB3F226EB39458CF17019132E201C901FB00106994102C395BE20114008A8E3528F0018210D53276DB103946096D71708010C8CB055007CF165005FA0215CB6A12CB1FCB3F226EB39458CF17019132E201C901FB0093383430E21045103412F823F00B009A32353582102FCB26A2BA8E3A7082108B77173504C8CBFF5005CF161443308040708010C8CB055007CF165005FA0215CB6A12CB1FCB3F226EB39458CF17019132E201C901FB00E05F04840FF2F00093083001258C2040FA201938083001658C20407D200CB8083001A58C204064200A38083001E58C20404B2007B8083002258C204032200538083002650C20191EB83002A4E00C9D781E9C600069006AC0BC018060840EE6B2802A0060840EE6B2802A00A08418B9101A68608209E3402A410830856456F81B04A5A9D6A0192A4139200201201A1B0201201C1D0021081BA50C1B5C0838343E903E8034CFCC200017321400F3C5807E80B2CFF26000513B513434FFFE900835D2708027DFC07E9035353D0134CFCC0415C415B80C1C1B5B5B5B490415C415A0002B01B232FFD40173C59400F3C5B3333D0032CFF27B5520020120202102012024250013BBB39F00A175F07F008802027422230010A874F00A10475F07000CA959F00A6C71000DB8FCFF00A5F03802012026270013B64A5E014204EBE0FA1000C7B461843AE9240F152118001E5C08DE014206EBE0FA1A60E038001E5C339E8086007AE140F8001E5C33B84111C466105E033E04883DCB11FB64DDC4964AD1BA06B879240DC23572F37CC5CAAAB143A2FFFBC4180012660F003C003060FE81EDF4260F00306EB1583C"), - jettonMinter("B5EE9C7241020B010001ED000114FF00F4A413F4BCF2C80B0102016202030202CC040502037A60090A03EFD9910E38048ADF068698180B8D848ADF07D201800E98FE99FF6A2687D007D206A6A18400AA9385D47181A9AA8AAE382F9702480FD207D006A18106840306B90FD001812881A28217804502A906428027D012C678B666664F6AA7041083DEECBEF29385D71811A92E001F1811802600271812F82C207F97840607080093DFC142201B82A1009AA0A01E428027D012C678B00E78B666491646580897A007A00658064907C80383A6465816503E5FFE4E83BC00C646582AC678B28027D0109E5B589666664B8FD80400FE3603FA00FA40F82854120870542013541403C85004FA0258CF1601CF16CCC922C8CB0112F400F400CB00C9F9007074C8CB02CA07CBFFC9D05008C705F2E04A12A1035024C85004FA0258CF16CCCCC9ED5401FA403020D70B01C3008E1F8210D53276DB708010C8CB055003CF1622FA0212CB6ACB1FCB3FC98042FB00915BE200303515C705F2E049FA403059C85004FA0258CF16CCCCC9ED54002E5143C705F2E049D43001C85004FA0258CF16CCCCC9ED54007DADBCF6A2687D007D206A6A183618FC1400B82A1009AA0A01E428027D012C678B00E78B666491646580897A007A00658064FC80383A6465816503E5FFE4E840001FAF16F6A2687D007D206A6A183FAA904051007F09"), - jettonWallet("B5EE9C7241021201000328000114FF00F4A413F4BCF2C80B0102016202030202CC0405001BA0F605DA89A1F401F481F481A8610201D40607020148080900BB0831C02497C138007434C0C05C6C2544D7C0FC02F83E903E900C7E800C5C75C87E800C7E800C00B4C7E08403E29FA954882EA54C4D167C0238208405E3514654882EA58C511100FC02780D60841657C1EF2EA4D67C02B817C12103FCBC2000113E910C1C2EBCB853600201200A0B020120101101F500F4CFFE803E90087C007B51343E803E903E90350C144DA8548AB1C17CB8B04A30BFFCB8B0950D109C150804D50500F214013E809633C58073C5B33248B232C044BD003D0032C032483E401C1D3232C0B281F2FFF274013E903D010C7E801DE0063232C1540233C59C3E8085F2DAC4F3208405E351467232C7C6600C03F73B51343E803E903E90350C0234CFFE80145468017E903E9014D6F1C1551CDB5C150804D50500F214013E809633C58073C5B33248B232C044BD003D0032C0327E401C1D3232C0B281F2FFF274140371C1472C7CB8B0C2BE80146A2860822625A020822625A004AD822860822625A028062849F8C3C975C2C070C008E00D0E0F009ACB3F5007FA0222CF165006CF1625FA025003CF16C95005CC2391729171E25008A813A08208989680AA008208989680A0A014BCF2E2C504C98040FB001023C85004FA0258CF1601CF16CCC9ED5400705279A018A182107362D09CC8CB1F5230CB3F58FA025007CF165007CF16C9718018C8CB0524CF165006FA0215CB6A14CCC971FB0010241023000E10491038375F040076C200B08E218210D53276DB708010C8CB055008CF165004FA0216CB6A12CB1F12CB3FC972FB0093356C21E203C85004FA0258CF1601CF16CCC9ED5400DB3B51343E803E903E90350C01F4CFFE803E900C145468549271C17CB8B049F0BFFCB8B0A0822625A02A8005A805AF3CB8B0E0841EF765F7B232C7C572CFD400FE8088B3C58073C5B25C60063232C14933C59C3E80B2DAB33260103EC01004F214013E809633C58073C5B3327B55200083200835C87B51343E803E903E90350C0134C7E08405E3514654882EA0841EF765F784EE84AC7CB8B174CFCC7E800C04E81408F214013E809633C58073C5B3327B55205ECCF23D"), jettonMinterStableCoin("B5EE9C72010218010005BB000114FF00F4A413F4BCF2C80B0102016202030202CB0405020120141502F3D0CB434C0C05C6C238ECC200835C874C7C0608405E351466EA44C38601035C87E800C3B51343E803E903E90353534541168504D3214017E809400F3C58073C5B333327B55383E903E900C7E800C7D007E800C7E80004C5C3E0E80B4C7C04074CFC044BB51343E803E903E9035353449A084190ADF41EEB8C089A0607001DA23864658380E78B64814183FA0BC0019635355161C705F2E04904FA4021FA4430C000F2E14DFA00D4D120D0D31F018210178D4519BAF2E0488040D721FA00FA4031FA4031FA0020D70B009AD74BC00101C001B0F2B19130E254431B0803FA82107BDD97DEBA8EE7363805FA00FA40F82854120A70546004131503C8CB0358FA0201CF1601CF16C921C8CB0113F40012F400CB00C9F9007074C8CB02CA07CBFFC9D05008C705F2E04A12A14414506603C85005FA025003CF1601CF16CCCCC9ED54FA40D120D70B01C000B3915BE30DE02682102C76B973BAE30235250A0B0C018E2191729171E2F839206E938124279120E2216E94318128739101E25023A813A0738103A370F83CA00270F83612A00170F836A07381040982100966018070F837A0BCF2B025597F0900EC82103B9ACA0070FB02F828450470546004131503C8CB0358FA0201CF1601CF16C921C8CB0113F40012F400CB00C920F9007074C8CB02CA07CBFFC9D0C8801801CB0501CF1658FA02029858775003CB6BCCCC9730017158CB6ACCE2C98011FB005005A04314C85005FA025003CF1601CF16CCCCC9ED540044C8801001CB0501CF1670FA027001CB6A8210D53276DB01CB1F0101CB3FC98042FB0001FC145F04323401FA40D2000101D195C821CF16C9916DE2C8801001CB055004CF1670FA027001CB6A8210D173540001CB1F500401CB3F23FA4430C0008E35F828440470546004131503C8CB0358FA0201CF1601CF16C921C8CB0113F40012F400CB00C9F9007074C8CB02CA07CBFFC9D012CF1697316C127001CB01E2F400C90D04F882106501F354BA8E223134365145C705F2E04902FA40D1103402C85005FA025003CF1601CF16CCCCC9ED54E0258210FB88E119BA8E2132343603D15131C705F2E0498B025512C85005FA025003CF1601CF16CCCCC9ED54E034248210235CAF52BAE30237238210CB862902BAE302365B2082102508D66ABAE3026C310E0F101100088050FB0002EC3031325033C705F2E049FA40FA00D4D120D0D31F01018040D7212182100F8A7EA5BA8E4D36208210595F07BCBA8E2C3004FA0031FA4031F401D120F839206E943081169FDE718102F270F8380170F836A0811A7770F836A0BCF2B08E138210EED236D3BA9504D30331D19434F2C048E2E2E30D50037012130044335142C705F2E049C85003CF16C9134440C85005FA025003CF1601CF16CCCCC9ED54001E3002C705F2E049D4D4D101ED54FB0400188210D372158CBADC840FF2F000CE31FA0031FA4031FA4031F401FA0020D70B009AD74BC00101C001B0F2B19130E25442162191729171E2F839206E938124279120E2216E94318128739101E25023A813A0738103A370F83CA00270F83612A00170F836A07381040982100966018070F837A0BCF2B000C082103B9ACA0070FB02F828450470546004131503C8CB0358FA0201CF1601CF16C921C8CB0113F40012F400CB00C920F9007074C8CB02CA07CBFFC9D0C8801801CB0501CF1658FA02029858775003CB6BCCCC9730017158CB6ACCE2C98011FB000025BD9ADF6A2687D007D207D206A6A6888122F82402027116170085ADBCF6A2687D007D207D206A6A688A2F827C1400B82A3002098A81E46581AC7D0100E78B00E78B6490E4658089FA00097A00658064FC80383A6465816503E5FFE4E84000CFAF16F6A2687D007D207D206A6A68BF99E836C1783872EBDB514D9C97C283B7F0AE5179029E2B6119C39462719E4F46ED8F7413E62C780A417877407E978F01A40711411B1ACB773A96BDD93FA83BB5CA8435013C8C4B3AC91F4589B4780A38646583FA0064A18040"), jettonWalletStableCoin("B5EE9C7201020F010003D1000114FF00F4A413F4BCF2C80B01020162020302F8D001D0D3030171B08E48135F038020D721ED44D0D303FA00FA40FA40D104D31F01840F218210178D4519BA0282107BDD97DEBA12B1F2F48040D721FA003012A0401303C8CB0358FA0201CF1601CF16C9ED54E0FA40FA4031FA0031F401FA0031FA00013170F83A02D31F012082100F8A7EA5BA8E85303459DB3CE03304050201200D0E01F203D33F0101FA00FA4021FA4430C000F2E14DED44D0D303FA00FA40FA40D15309C7052471B0C00021B1F2AD522BC705500AB1F2E0495115A120C2FFF2AFF82A54259070546004131503C8CB0358FA0201CF1601CF16C921C8CB0113F40012F400CB00C920F9007074C8CB02CA07CBFFC9D004FA40F401FA00200602D0228210178D4519BA8E84325ADB3CE034218210595F07BCBA8E843101DB3CE032208210EED236D3BA8E2F30018040D721D303D1ED44D0D303FA00FA40FA40D1335142C705F2E04A403303C8CB0358FA0201CF1601CF16C9ED54E06C218210D372158CBADC840FF2F00809019820D70B009AD74BC00101C001B0F2B19130E2C88210178D451901CB1F500A01CB3F5008FA0223CF1601CF1626FA025007CF16C9C8801801CB055004CF1670FA024063775003CB6BCCCCC945370700B42191729171E2F839206E938124279120E2216E94318128739101E25023A813A0738103A370F83CA00270F83612A00170F836A07381040982100966018070F837A0BCF2B0048050FB005803C8CB0358FA0201CF1601CF16C9ED5403F4ED44D0D303FA00FA40FA40D12372B0C002F26D07D33F0101FA005141A004FA40FA4053BAC705F82A5464E070546004131503C8CB0358FA0201CF1601CF16C921C8CB0113F40012F400CB00C9F9007074C8CB02CA07CBFFC9D0500CC7051BB1F2E04A09FA0021925F04E30D26D70B01C000B393306C33E30D55020A0B0C01F2ED44D0D303FA00FA40FA40D106D33F0101FA00FA40F401D15141A15288C705F2E04926C2FFF2AFC882107BDD97DE01CB1F5801CB3F01FA0221CF1658CF16C9C8801801CB0526CF1670FA02017158CB6ACCC903F839206E943081169FDE718102F270F8380170F836A0811A7770F836A0BCF2B0028050FB00030C0060C882107362D09C01CB1F2501CB3F5004FA0258CF1658CF16C9C8801001CB0524CF1658FA02017158CB6ACCC98011FB00007A5054A1F82FA07381040982100966018070F837B60972FB02C8801001CB055005CF1670FA027001CB6A8210D53276DB01CB1F5801CB3FC9810082FB0059002003C8CB0358FA0201CF1601CF16C9ED540027BFD8176A2686981FD007D207D206899FC15209840021BC508F6A2686981FD007D207D2068AF81C"), - nftItem("B5EE9C7241020D010001D0000114FF00F4A413F4BCF2C80B0102016202030202CE04050009A11F9FE00502012006070201200B0C02D70C8871C02497C0F83434C0C05C6C2497C0F83E903E900C7E800C5C75C87E800C7E800C3C00812CE3850C1B088D148CB1C17CB865407E90350C0408FC00F801B4C7F4CFE08417F30F45148C2EA3A1CC840DD78C9004F80C0D0D0D4D60840BF2C9A884AEB8C097C12103FCBC20080900113E910C1C2EBCB8536001F65135C705F2E191FA4021F001FA40D20031FA00820AFAF0801BA121945315A0A1DE22D70B01C300209206A19136E220C2FFF2E192218E3E821005138D91C85009CF16500BCF16712449145446A0708010C8CB055007CF165005FA0215CB6A12CB1FCB3F226EB39458CF17019132E201C901FB00104794102A375BE20A00727082108B77173505C8CBFF5004CF1610248040708010C8CB055007CF165005FA0215CB6A12CB1FCB3F226EB39458CF17019132E201C901FB000082028E3526F0018210D53276DB103744006D71708010C8CB055007CF165005FA0215CB6A12CB1FCB3F226EB39458CF17019132E201C901FB0093303234E25502F003003B3B513434CFFE900835D27080269FC07E90350C04090408F80C1C165B5B60001D00F232CFD633C58073C5B3327B5520BF75041B"), - nftCollection("B5EE9C724102140100021F000114FF00F4A413F4BCF2C80B0102016202030202CD04050201200E0F04E7D10638048ADF000E8698180B8D848ADF07D201800E98FE99FF6A2687D20699FEA6A6A184108349E9CA829405D47141BAF8280E8410854658056B84008646582A802E78B127D010A65B509E58FE59F80E78B64C0207D80701B28B9E382F970C892E000F18112E001718112E001F181181981E0024060708090201200A0B00603502D33F5313BBF2E1925313BA01FA00D43028103459F0068E1201A44343C85005CF1613CB3FCCCCCCC9ED54925F05E200A6357003D4308E378040F4966FA5208E2906A4208100FABE93F2C18FDE81019321A05325BBF2F402FA00D43022544B30F00623BA9302A402DE04926C21E2B3E6303250444313C85005CF1613CB3FCCCCCCC9ED54002C323401FA40304144C85005CF1613CB3FCCCCCCC9ED54003C8E15D4D43010344130C85005CF1613CB3FCCCCCCC9ED54E05F04840FF2F00201200C0D003D45AF0047021F005778018C8CB0558CF165004FA0213CB6B12CCCCC971FB008002D007232CFFE0A33C5B25C083232C044FD003D0032C03260001B3E401D3232C084B281F2FFF2742002012010110025BC82DF6A2687D20699FEA6A6A182DE86A182C40043B8B5D31ED44D0FA40D33FD4D4D43010245F04D0D431D430D071C8CB0701CF16CCC980201201213002FB5DAFDA89A1F481A67FA9A9A860D883A1A61FA61FF480610002DB4F47DA89A1F481A67FA9A9A86028BE09E008E003E00B01A500C6E"), - payments("B5EE9C72410230010007FB000114FF00F4A413F4BCF2C80B0102012002030201480405000AF26C21F0190202CB06070201202E2F020120080902012016170201200A0B0201200C0D0009D3610F80CC001D6B5007434C7FE8034C7CC1BC0FE19E0201580E0F0201201011002D3E11DBC4BE11DBC43232C7FE11DBC47E80B2C7F2407320008B083E1B7B51343480007E187E80007E18BE80007E18F4FFC07E1934FFC07E1974DFC07E19BC01887080A7F4C7C07E1A34C7C07E1A7D01007E1AB7807080E535007E1AF7BE1B2002012012130201201415008D3E13723E11BE117E113E10540132803E10BE80BE10FE8084F2FFC4B2FFF2DFFC02887080A7FE12BE127E121400F2C7C4B2C7FD0037807080E53E12C073253E1333C5B8B27B5520004D1C3C02FE106CFCB8193E803E800C3E1096283E18BE10C0683E18FE10BE10E8006EFCB819BC032000CF1D3C02FE106CFCB819348020C235C6083E4040E4BE1124BE117890CC3E443CB81974C7C060841A5B9A5D2EBCB81A3E118074DFD66EBCB81CBE803E800C3E1094882FBE10D4882FAC3CB819807E18BE18FE12F43E800C3E10BE10E80068006E7CB8199FFE187C0320004120843777222E9C20043232C15401B3C594013E808532DA84B2C7F2DFF2407EC02002012018190201D42B2C0201201A1B0201201E1F0201201C1D00E5473F00BD401D001D401D021F90102D31F01821043436D74BAF2E068F84601D37F59BAF2E072F844544355F910F8454330F910B0F2E065D33FD33F30F84822B9F84922B9B0F2E06C21F86820F869F84A6E915B8E19F84AD0D33FFA003171D721D33F305033BC02BCB1936DF86ADEE2F800F00C8006F3E12F43E800C7E903E900C3E09DBC41CBE10D62F24CC20C1B7BE10FE11963C03FE10BE11A04020BC03DC3E185C3E189C3E18DB7E1ABC032000B51D3C02F5007400750074087E4040B4C7C0608410DB1BDCEEBCB81A3E118074DFD66EBCB81CBE111510D57E443E1150CC3E442C3CB8197E80007E18BE80007E18F4CFF4CFCC3E1208AE7E1248AE6C3CB81B007E1A3E1A7E003C042001C1573F00BF84A6EF2E06AD2008308D71820F9012392F84492F845E24130F910F2E065D31F018210556E436CBAF2E068F84601D37F59BAF2E072D401D08308D71820F901F8444130F910F2E06501D430D08308D71820F901F8454130F910F2E06501820020120222301FED31F01821043685374BAF2E068F84601D37F59BAF2E072D33FFA00F404552003D200019AD401D0D33FFA00F40430937F206DE2303205D31F01821043685374BAF2E068F84601D37F59BAF2E072D33FFA00F404552003D200019AD401D0D33FFA00F40430937F206DE23032F8485280BEF8495250BEB0524BBE1AB0527ABE19210064B05215BE14B05248BE17B0F2E06970F82305C8CB3F5004FA0215F40015CB3F5004FA0212F400CB1F12CA00CA00C9F86AF00C01C31CFC02FE129BACFCB81AF48020C235C6083E4048E4BE1124BE1178904C3E443CB81974C7C0608410DA19D46EBCB81A3E118074DFD66EBCB81CB5007420C235C6083E407E11104C3E443CB81940750C3420C235C6083E407E11504C3E443CB81940602403F71CFC02FE129BACFCB81AF48020C235C6083E4048E4BE1124BE1178904C3E443CB81974C7C0608410DB10DBAEBCB81A3E118074DFD66EBCB81CBD010C3E12B434CFFE803D0134CFFE803D0134C7FE11DBC4148828083E08EE7CB81BBE11DBC4A83E08EF3CB81C34800C151D5A64D6D4C8F7A2B98E82A49B08B8C3816028292A01FCD31F01821043685374BAF2E068F84601D37F59BAF2E072D33FFA00F404552003D200019AD401D0D33FFA00F40430937F206DE2303205D31F01821043685374BAF2E068F84601D37F59BAF2E072D33FFA00F404552003D200019AD401D0D33FFA00F40430937F206DE230325339BE5381BEB0F8495250BEB0F8485290BEB02502FE5237BE16B05262BEB0F2E06927C20097F84918BEF2E0699137E222C20097F84813BEF2E0699132E2F84AD0D33FFA00F404D33FFA00F404D31FF8476F105220A0F823BCF2E06FD200D20030B3F2E073209C3537373A5274BC5263BC12B18E11323939395250BC5299BC18B14650134440E25319BAB3F2E06D9130E30D7F05C82627002496F8476F1114A098F8476F1117A00603E203003ECB3F5004FA0215F40012CB3F5004FA0213F400CB1F12CA00CA00C9F86AF00C00620A8020F4966FA5208E213050038020F4666FA1208E1001FA00ED1E15DA119450C3A00B9133E2923430E202926C21E2B31B000C3535075063140038C8CB3F5004FA0212F400CB3F5003FA0213F400CB1FCA00C9F86AF00C00D51D3C02FE129BACFCB81AFE12B434CFFE803D010C74CFFE803D010C74C7CC3E11DBC4283E11DBC4A83E08EE7CB81C7E003E10886808E87E18BE10D400E816287E18FE10F04026BE10BE10E83E189C3E18F7BE10B04026BE10FE10A83E18DC3E18F780693E1A293E1A7C042001F53B7EF4C7C8608419F1F4A06EA4CC7C037808608403818830AEA54C7C03B6CC780C882084155DD61FAEA54C3C0476CC780820841E6849BBEEA54C3C04B6CC7808208407C546B3EEA54C3C0576CC780820840223AA8CAEA54C3C05B6CC7808208419BDBC1A6EA54C3C05F6CC780C60840950CAA46EA53C0636CC78202D0008840FF2F00075BC7FE3A7805FC25E87D007D207D20184100D0CAF6A1EC7C217C21B7817C227C22B7817C237C23FC247C24B7817C2524C3B7818823881B22A021984008DBD0CABA7805FC20C8B870FC253748B8F07C256840206B90FD0018C020EB90FD0018B8EB90E98F987C23B7882908507C11DE491839707C23B788507C23B789507C11DE48B9F03A4331C4966"), - highload("B5EE9C724101090100E5000114FF00F4A413F4BCF2C80B010201200203020148040501EAF28308D71820D31FD33FF823AA1F5320B9F263ED44D0D31FD33FD3FFF404D153608040F40E6FA131F2605173BAF2A207F901541087F910F2A302F404D1F8007F8E16218010F4786FA5209802D307D43001FB009132E201B3E65B8325A1C840348040F4438AE63101C8CB1F13CB3FCBFFF400C9ED54080004D03002012006070017BD9CE76A26869AF98EB85FFC0041BE5F976A268698F98E99FE9FF98FA0268A91040207A0737D098C92DBFC95DD1F140034208040F4966FA56C122094305303B9DE2093333601926C21E2B39F9E545A"), highloadV3("B5EE9C7241021001000228000114FF00F4A413F4BCF2C80B01020120020D02014803040078D020D74BC00101C060B0915BE101D0D3030171B0915BE0FA4030F828C705B39130E0D31F018210AE42E5A4BA9D8040D721D74CF82A01ED55FB04E030020120050A02027306070011ADCE76A2686B85FFC00201200809001AABB6ED44D0810122D721D70B3F0018AA3BED44D08307D721D70B1F0201200B0C001BB9A6EED44D0810162D721D70B15800E5B8BF2EDA2EDFB21AB09028409B0ED44D0810120D721F404F404D33FD315D1058E1BF82325A15210B99F326DF82305AA0015A112B992306DDE923033E2923033E25230800DF40F6FA19ED021D721D70A00955F037FDB31E09130E259800DF40F6FA19CD001D721D70A00937FDB31E0915BE270801F6F2D48308D718D121F900ED44D0D3FFD31FF404F404D33FD315D1F82321A15220B98E12336DF82324AA00A112B9926D32DE58F82301DE541675F910F2A106D0D31FD4D307D30CD309D33FD315D15168BAF2A2515ABAF2A6F8232AA15250BCF2A304F823BBF2A35304800DF40F6FA199D024D721D70A00F2649130E20E01FE5309800DF40F6FA18E13D05004D718D20001F264C858CF16CF8301CF168E1030C824CF40CF8384095005A1A514CF40E2F800C94039800DF41704C8CBFF13CB1FF40012F40012CB3F12CB15C9ED54F80F21D0D30001F265D3020171B0925F03E0FA4001D70B01C000F2A5FA4031FA0031F401FA0031FA00318060D721D300010F0020F265D2000193D431D19130E272B1FB00B585BF03"), - multisig("B5EE9C7241022B01000418000114FF00F4A413F4BCF2C80B010201200203020148040504DAF220C7008E8330DB3CE08308D71820F90101D307DB3C22C00013A1537178F40E6FA1F29FDB3C541ABAF910F2A006F40420F90101D31F5118BAF2AAD33F705301F00A01C20801830ABCB1F26853158040F40E6FA120980EA420C20AF2670EDFF823AA1F5340B9F2615423A3534E202321220202CC06070201200C0D02012008090201660A0B0003D1840223F2980BC7A0737D0986D9E52ED9E013C7A21C2125002D00A908B5D244A824C8B5D2A5C0B5007404FC02BA1B04A0004F085BA44C78081BA44C3800740835D2B0C026B500BC02F21633C5B332781C75C8F20073C5BD0032600201200E0F02012014150115BBED96D5034705520DB3C82A020148101102012012130173B11D7420C235C6083E404074C1E08075313B50F614C81E3D039BE87CA7F5C2FFD78C7E443CA82B807D01085BA4D6DC4CB83E405636CF0069006027003DAEDA80E800E800FA02017A0211FC8080FC80DD794FF805E47A0000E78B64C00017AE19573FC100D56676A1EC40020120161702012018190151B7255B678626466A4610081E81CDF431C24D845A4000331A61E62E005AE0261C0B6FEE1C0B77746E10230189B5599B6786ABE06FEDB1C6CA2270081E8F8DF4A411C4A05A400031C38410021AE424BAE064F6451613990039E2CA840090081E886052261C52261C52265C4036625CCD8A30230201201A1B0017B506B5CE104035599DA87B100201201C1D020399381E1F0111AC1A6D9E2F81B60940230015ADF94100CC9576A1EC1840010DA936CF0557C160230015ADDFDC20806AB33B50F6200220DB3C02F265F8005043714313DB3CED54232A000AD3FFD3073004A0DB3C2FAE5320B0F26212B102A425B3531CB9B0258100E1AA23A028BCB0F269820186A0F8010597021110023E3E308E8D11101FDB3C40D778F44310BD05E254165B5473E7561053DCDB3C54710A547ABC242528260020ED44D0D31FD307D307D33FF404F404D1005E018E1A30D20001F2A3D307D3075003D70120F90105F90115BAF2A45003E06C2121D74AAA0222D749BAF2AB70542013000C01C8CBFFCB0704D6DB3CED54F80F70256E5389BEB198106E102D50C75F078F1B30542403504DDB3C5055A046501049103A4B0953B9DB3C5054167FE2F800078325A18E2C268040F4966FA52094305303B9DE208E1638393908D2000197D3073016F007059130E27F080705926C31E2B3E630062A2728290060708E2903D08308D718D307F40430531678F40E6FA1F2A5D70BFF544544F910F2A6AE5220B15203BD14A1236EE66C2232007E5230BE8E205F03F8009322D74A9802D307D402FB0002E83270C8CA0040148040F44302F0078E1771C8CB0014CB0712CB0758CF0158CF1640138040F44301E201208E8A104510344300DB3CED54925F06E22A001CC8CB1FCB07CB07CB3FF400F400C9B99895F4"), - master("FF0020DD2082014C97BA9730ED44D0D70B1FE0A4F260810200D71820D70B1FED44D0D31FD3FFD15112BAF2A122F901541044F910F2A2F80001D31F31D307D4D101FB00A4C8CB1FCBFFC9ED54"), //partial code - config("FF00F4A413F4BCF2C80B"); //partial code private final String value; diff --git a/smartcontract/src/test/java/org/ton/java/smartcontract/TestTonSdkTestCasesSmartContracts.java b/smartcontract/src/test/java/org/ton/java/smartcontract/TestTonSdkTestCasesSmartContracts.java new file mode 100644 index 00000000..cdb5c5ae --- /dev/null +++ b/smartcontract/src/test/java/org/ton/java/smartcontract/TestTonSdkTestCasesSmartContracts.java @@ -0,0 +1,550 @@ +package org.ton.java.smartcontract; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.ToNumberPolicy; +import com.iwebpp.crypto.TweetNaclFast; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.io.IOUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; +import org.ton.java.address.Address; +import org.ton.java.cell.CellBuilder; +import org.ton.java.smartcontract.types.WalletCodes; +import org.ton.java.smartcontract.types.WalletV3Config; +import org.ton.java.smartcontract.types.WalletV4R2Config; +import org.ton.java.smartcontract.wallet.v3.WalletV3R2; +import org.ton.java.smartcontract.wallet.v4.WalletV4R2; +import org.ton.java.tlb.types.Message; +import org.ton.java.utils.Utils; + +import java.io.IOException; +import java.math.BigDecimal; +import java.net.URL; +import java.nio.charset.Charset; + +import static org.assertj.core.api.Assertions.assertThat; + +@Slf4j +@RunWith(JUnit4.class) +public class TestTonSdkTestCasesSmartContracts { + public static final String numbersTestFileUrl = "https://raw.githubusercontent.com/neodix42/ton-sdk-test-cases/main/smartcontracts.json"; + Gson gson = new GsonBuilder().setObjectToNumberStrategy(ToNumberPolicy.LONG_OR_DOUBLE).create(); + String fileContentWithUseCases = IOUtils.toString(new URL(numbersTestFileUrl), Charset.defaultCharset()); + TonSdkTestCases tonSdkTestCases = gson.fromJson(fileContentWithUseCases, TonSdkTestCases.class); + + public TestTonSdkTestCasesSmartContracts() throws IOException { + } + + @Test + public void testSmartContracts1() { + + String testId = "smartcontracts-1"; + TonSdkTestCases.TestCase testCase = tonSdkTestCases.getTestCases().get(testId); + + String description = testCase.getDescription(); + + log.info("testId: {}", testId); + log.info("description: {}", description); + + String bocAsHex = testCase.getExpectedOutput().get("bocAsHexWithCrc").toString(); + + assertThat(WalletCodes.V3R2.getValue()).isEqualTo(bocAsHex); + assertThat(WalletV3R2.builder().build().createCodeCell().toHex().toUpperCase()).isEqualTo(bocAsHex); + } + + @Test + public void testSmartContracts2() { + + String testId = "smartcontracts-2"; + TonSdkTestCases.TestCase testCase = tonSdkTestCases.getTestCases().get(testId); + + String description = testCase.getDescription(); + + log.info("testId: {}", testId); + log.info("description: {}", description); + + String privateKey = testCase.getInput().get("privateKey").toString(); + Long workchain = (Long) testCase.getInput().get("workchain"); + Long walletId = (Long) testCase.getInput().get("walletId"); + + byte[] secretKey = Utils.hexToSignedBytes(privateKey); + TweetNaclFast.Signature.KeyPair keyPair = TweetNaclFast.Signature.keyPair_fromSeed(secretKey); + + WalletV3R2 contract = WalletV3R2.builder() + .wc(workchain) + .keyPair(keyPair) + .walletId(walletId) + .build(); + + String expectedRawAddress = (String) testCase.getExpectedOutput().get("rawAddress"); + String expectedBocAsHex = (String) testCase.getExpectedOutput().get("externalMessageBocAsHexWithCrc"); + + String rawAddress = contract.getAddress().toRaw(); + assertThat(rawAddress).isEqualTo(expectedRawAddress); + + Message msg = contract.prepareDeployMsg(); + assertThat(msg.toCell().toHex(true).toUpperCase()).isEqualTo(expectedBocAsHex); + } + + + @Test + public void testSmartContracts3() { + + String testId = "smartcontracts-3"; + TonSdkTestCases.TestCase testCase = tonSdkTestCases.getTestCases().get(testId); + + String description = testCase.getDescription(); + + log.info("testId: {}", testId); + log.info("description: {}", description); + + String privateKey = testCase.getInput().get("privateKey").toString(); + Long workchain = (Long) testCase.getInput().get("workchain"); + Long walletId = (Long) testCase.getInput().get("walletId"); + + byte[] secretKey = Utils.hexToSignedBytes(privateKey); + TweetNaclFast.Signature.KeyPair keyPair = TweetNaclFast.Signature.keyPair_fromSeed(secretKey); + + WalletV3R2 contract = WalletV3R2.builder() + .wc(workchain) + .keyPair(keyPair) + .walletId(walletId) + .build(); + + String expectedRawAddress = (String) testCase.getExpectedOutput().get("rawAddress"); + String expectedCodeAsHex = (String) testCase.getExpectedOutput().get("codeAsHex"); + String expectedDataAsHex = (String) testCase.getExpectedOutput().get("dataAsHex"); + String expectedExternalMessageAsHex = (String) testCase.getExpectedOutput().get("externalMessageAsHex"); + String expectedBocAsHex = (String) testCase.getExpectedOutput().get("externalMessageBocAsHexWithCrc"); + + String rawAddress = contract.getAddress().toRaw(); + assertThat(rawAddress).isEqualTo(expectedRawAddress); + + assertThat(contract.createCodeCell().bitStringToHex().toUpperCase()).isEqualTo(expectedCodeAsHex); + assertThat(contract.createDataCell().bitStringToHex().toUpperCase()).isEqualTo(expectedDataAsHex); + Message msg = contract.prepareDeployMsg(); + + assertThat(msg.toCell().bitStringToHex().toUpperCase()).isEqualTo(expectedExternalMessageAsHex); + assertThat(msg.toCell().toHex(true).toUpperCase()).isEqualTo(expectedBocAsHex); + } + + @Test + public void testSmartContracts4() { + + String testId = "smartcontracts-4"; + TonSdkTestCases.TestCase testCase = tonSdkTestCases.getTestCases().get(testId); + + String description = testCase.getDescription(); + + log.info("testId: {}", testId); + log.info("description: {}", description); + + String privateKey = testCase.getInput().get("privateKey").toString(); + Long workchain = (Long) testCase.getInput().get("workchain"); + String destinationAddress = testCase.getInput().get("destinationAddress").toString(); + Long walletId = (Long) testCase.getInput().get("walletId"); + Long seqno = (Long) testCase.getInput().get("seqNo"); + BigDecimal amountTonCoins = new BigDecimal(testCase.getInput().get("amountTonCoins").toString()); + Boolean bounceFlag = (Boolean) testCase.getInput().get("bounceFlag"); + Long validUntil = (Long) testCase.getInput().get("validUntil"); + Long sendMode = (Long) testCase.getInput().get("sendMode"); + + byte[] secretKey = Utils.hexToSignedBytes(privateKey); + TweetNaclFast.Signature.KeyPair keyPair = TweetNaclFast.Signature.keyPair_fromSeed(secretKey); + + WalletV3R2 contract = WalletV3R2.builder() + .wc(workchain) + .keyPair(keyPair) + .walletId(walletId) + .build(); + + String expectedBocAsHex = (String) testCase.getExpectedOutput().get("externalMessageBocAsHexWithCrc"); + + WalletV3Config config = WalletV3Config.builder() + .walletId(walletId) + .seqno(seqno) + .destination(Address.of(destinationAddress)) + .amount(Utils.toNano(amountTonCoins)) + .validUntil(validUntil) + .bounce(bounceFlag) + .mode(sendMode.intValue()) + .build(); + Message sendMsg = contract.prepareExternalMsg(config); + assertThat(sendMsg.toCell().toHex(true).toUpperCase()).isEqualTo(expectedBocAsHex); + } + + @Test + public void testSmartContracts5() { + + String testId = "smartcontracts-5"; + TonSdkTestCases.TestCase testCase = tonSdkTestCases.getTestCases().get(testId); + + String description = testCase.getDescription(); + + log.info("testId: {}", testId); + log.info("description: {}", description); + + String privateKey = testCase.getInput().get("privateKey").toString(); + Long workchain = (Long) testCase.getInput().get("workchain"); + String destinationAddress = testCase.getInput().get("destinationAddress").toString(); + Long walletId = (Long) testCase.getInput().get("walletId"); + Long seqno = (Long) testCase.getInput().get("seqNo"); + BigDecimal amountTonCoins = new BigDecimal(testCase.getInput().get("amountTonCoins").toString()); + Boolean bounceFlag = (Boolean) testCase.getInput().get("bounceFlag"); + Long validUntil = (Long) testCase.getInput().get("validUntil"); + Long sendMode = (Long) testCase.getInput().get("sendMode"); + + byte[] secretKey = Utils.hexToSignedBytes(privateKey); + TweetNaclFast.Signature.KeyPair keyPair = TweetNaclFast.Signature.keyPair_fromSeed(secretKey); + + WalletV3R2 contract = WalletV3R2.builder() + .wc(workchain) + .keyPair(keyPair) + .walletId(walletId) + .build(); + + String expectedBocAsHex = (String) testCase.getExpectedOutput().get("externalMessageBocAsHexWithCrc"); + + WalletV3Config config = WalletV3Config.builder() + .walletId(walletId) + .seqno(seqno) + .destination(Address.of(destinationAddress)) + .amount(Utils.toNano(amountTonCoins)) + .validUntil(validUntil) + .bounce(bounceFlag) + .mode(sendMode.intValue()) + .build(); + Message sendMsg = contract.prepareExternalMsg(config); + assertThat(sendMsg.toCell().toHex(true).toUpperCase()).isEqualTo(expectedBocAsHex); + } + + @Test + public void testSmartContracts6() { + + String testId = "smartcontracts-6"; + TonSdkTestCases.TestCase testCase = tonSdkTestCases.getTestCases().get(testId); + + String description = testCase.getDescription(); + + log.info("testId: {}", testId); + log.info("description: {}", description); + + String privateKey = testCase.getInput().get("privateKey").toString(); + Long workchain = (Long) testCase.getInput().get("workchain"); + String destinationAddress = testCase.getInput().get("destinationAddress").toString(); + Long walletId = (Long) testCase.getInput().get("walletId"); + Long seqno = (Long) testCase.getInput().get("seqNo"); + BigDecimal amountTonCoins = new BigDecimal(testCase.getInput().get("amountTonCoins").toString()); + Boolean bounceFlag = (Boolean) testCase.getInput().get("bounceFlag"); + Long validUntil = (Long) testCase.getInput().get("validUntil"); + Long sendMode = (Long) testCase.getInput().get("sendMode"); + String comment = testCase.getInput().get("comment").toString(); + + byte[] secretKey = Utils.hexToSignedBytes(privateKey); + TweetNaclFast.Signature.KeyPair keyPair = TweetNaclFast.Signature.keyPair_fromSeed(secretKey); + + WalletV3R2 contract = WalletV3R2.builder() + .wc(workchain) + .keyPair(keyPair) + .walletId(walletId) + .build(); + + String expectedBocAsHex = (String) testCase.getExpectedOutput().get("externalMessageBocAsHexWithCrc"); + + WalletV3Config config = WalletV3Config.builder() + .walletId(walletId) + .seqno(seqno) + .destination(Address.of(destinationAddress)) + .amount(Utils.toNano(amountTonCoins)) + .validUntil(validUntil) + .bounce(bounceFlag) + .mode(sendMode.intValue()) + .comment(comment) + .build(); + Message sendMsg = contract.prepareExternalMsg(config); + assertThat(sendMsg.toCell().toHex(true).toUpperCase()).isEqualTo(expectedBocAsHex); + } + + + @Test + public void testSmartContracts7() { + + String testId = "smartcontracts-7"; + TonSdkTestCases.TestCase testCase = tonSdkTestCases.getTestCases().get(testId); + + String description = testCase.getDescription(); + + log.info("testId: {}", testId); + log.info("description: {}", description); + + String bocAsHex = testCase.getExpectedOutput().get("bocAsHexWithCrc").toString(); + + assertThat(WalletCodes.V4R2.getValue()).isEqualTo(bocAsHex); +// assertThat(WalletV4R2.builder().build().createCodeCell().toHex().toUpperCase()).isEqualTo(bocAsHex); + } + + @Test + public void testSmartContracts8() { + + String testId = "smartcontracts-8"; + TonSdkTestCases.TestCase testCase = tonSdkTestCases.getTestCases().get(testId); + + String description = testCase.getDescription(); + + log.info("testId: {}", testId); + log.info("description: {}", description); + + String privateKey = testCase.getInput().get("privateKey").toString(); + Long workchain = (Long) testCase.getInput().get("workchain"); + Long walletId = (Long) testCase.getInput().get("walletId"); + + byte[] secretKey = Utils.hexToSignedBytes(privateKey); + TweetNaclFast.Signature.KeyPair keyPair = TweetNaclFast.Signature.keyPair_fromSeed(secretKey); + + WalletV4R2 contract = WalletV4R2.builder() + .wc(workchain) + .keyPair(keyPair) + .walletId(walletId) + .build(); + + String expectedRawAddress = (String) testCase.getExpectedOutput().get("rawAddress"); + String expectedBocAsHex = (String) testCase.getExpectedOutput().get("externalMessageBocAsHexWithCrc"); + + String rawAddress = contract.getAddress().toRaw(); + assertThat(rawAddress).isEqualTo(expectedRawAddress); + + Message msg = contract.prepareDeployMsg(); + + assertThat(msg.toCell().toHex(true).toUpperCase()).isEqualTo(expectedBocAsHex); + } + + + @Test + public void testSmartContracts9() { + + String testId = "smartcontracts-9"; + TonSdkTestCases.TestCase testCase = tonSdkTestCases.getTestCases().get(testId); + + String description = testCase.getDescription(); + + log.info("testId: {}", testId); + log.info("description: {}", description); + + String privateKey = testCase.getInput().get("privateKey").toString(); + Long workchain = (Long) testCase.getInput().get("workchain"); + Long walletId = (Long) testCase.getInput().get("walletId"); + + byte[] secretKey = Utils.hexToSignedBytes(privateKey); + TweetNaclFast.Signature.KeyPair keyPair = TweetNaclFast.Signature.keyPair_fromSeed(secretKey); + + WalletV4R2 contract = WalletV4R2.builder() + .wc(workchain) + .keyPair(keyPair) + .walletId(walletId) + .build(); + + String expectedRawAddress = (String) testCase.getExpectedOutput().get("rawAddress"); + String expectedCodeAsHex = (String) testCase.getExpectedOutput().get("codeAsHex"); + String expectedDataAsHex = (String) testCase.getExpectedOutput().get("dataAsHex"); + String expectedExternalMessageAsHex = (String) testCase.getExpectedOutput().get("externalMessageAsHex"); + String expectedBocAsHex = (String) testCase.getExpectedOutput().get("externalMessageBocAsHexWithCrc"); + + String rawAddress = contract.getAddress().toRaw(); + assertThat(rawAddress).isEqualTo(expectedRawAddress); + + log.info(contract.createCodeCell().print()); + + assertThat(contract.createCodeCell().bitStringToHex().toUpperCase()).isEqualTo(expectedCodeAsHex); + assertThat(contract.createDataCell().bitStringToHex().toUpperCase()).isEqualTo(expectedDataAsHex); + Message msg = contract.prepareDeployMsg(); + + assertThat(msg.toCell().bitStringToHex().toUpperCase()).isEqualTo(expectedExternalMessageAsHex); + assertThat(msg.toCell().toHex(true).toUpperCase()).isEqualTo(expectedBocAsHex); + } + + @Test + public void testSmartContracts10() { + + String testId = "smartcontracts-10"; + TonSdkTestCases.TestCase testCase = tonSdkTestCases.getTestCases().get(testId); + + String description = testCase.getDescription(); + + log.info("testId: {}", testId); + log.info("description: {}", description); + + String privateKey = testCase.getInput().get("privateKey").toString(); + Long workchain = (Long) testCase.getInput().get("workchain"); + String destinationAddress = testCase.getInput().get("destinationAddress").toString(); + Long walletId = (Long) testCase.getInput().get("walletId"); + Long seqno = (Long) testCase.getInput().get("seqNo"); + BigDecimal amountTonCoins = new BigDecimal(testCase.getInput().get("amountTonCoins").toString()); + Boolean bounceFlag = (Boolean) testCase.getInput().get("bounceFlag"); + Long validUntil = (Long) testCase.getInput().get("validUntil"); + Long sendMode = (Long) testCase.getInput().get("sendMode"); + + byte[] secretKey = Utils.hexToSignedBytes(privateKey); + TweetNaclFast.Signature.KeyPair keyPair = TweetNaclFast.Signature.keyPair_fromSeed(secretKey); + + WalletV4R2 contract = WalletV4R2.builder() + .wc(workchain) + .keyPair(keyPair) + .walletId(walletId) + .build(); + + String expectedBocAsHex = (String) testCase.getExpectedOutput().get("externalMessageBocAsHexWithCrc"); + + WalletV4R2Config config = WalletV4R2Config.builder() + .walletId(walletId) + .seqno(seqno) + .destination(Address.of(destinationAddress)) + .amount(Utils.toNano(amountTonCoins)) + .validUntil(validUntil) + .bounce(bounceFlag) + .mode(sendMode.intValue()) + .build(); + Message sendMsg = contract.prepareExternalMsg(config); + assertThat(sendMsg.toCell().toHex(true).toUpperCase()).isEqualTo(expectedBocAsHex); + } + + @Test + public void testSmartContracts11() { + + String testId = "smartcontracts-11"; + TonSdkTestCases.TestCase testCase = tonSdkTestCases.getTestCases().get(testId); + + String description = testCase.getDescription(); + + log.info("testId: {}", testId); + log.info("description: {}", description); + + String privateKey = testCase.getInput().get("privateKey").toString(); + Long workchain = (Long) testCase.getInput().get("workchain"); + String destinationAddress = testCase.getInput().get("destinationAddress").toString(); + Long walletId = (Long) testCase.getInput().get("walletId"); + Long seqno = (Long) testCase.getInput().get("seqNo"); + BigDecimal amountTonCoins = new BigDecimal(testCase.getInput().get("amountTonCoins").toString()); + Boolean bounceFlag = (Boolean) testCase.getInput().get("bounceFlag"); + Long validUntil = (Long) testCase.getInput().get("validUntil"); + Long sendMode = (Long) testCase.getInput().get("sendMode"); + + byte[] secretKey = Utils.hexToSignedBytes(privateKey); + TweetNaclFast.Signature.KeyPair keyPair = TweetNaclFast.Signature.keyPair_fromSeed(secretKey); + + WalletV4R2 contract = WalletV4R2.builder() + .wc(workchain) + .keyPair(keyPair) + .walletId(walletId) + .build(); + + String expectedBocAsHex = (String) testCase.getExpectedOutput().get("externalMessageBocAsHexWithCrc"); + + WalletV4R2Config config = WalletV4R2Config.builder() + .walletId(walletId) + .seqno(seqno) + .destination(Address.of(destinationAddress)) + .amount(Utils.toNano(amountTonCoins)) + .validUntil(validUntil) + .bounce(bounceFlag) + .mode(sendMode.intValue()) + .build(); + Message sendMsg = contract.prepareExternalMsg(config); + assertThat(sendMsg.toCell().toHex(true).toUpperCase()).isEqualTo(expectedBocAsHex); + } + + @Test + public void testSmartContracts12() { + + String testId = "smartcontracts-12"; + TonSdkTestCases.TestCase testCase = tonSdkTestCases.getTestCases().get(testId); + + String description = testCase.getDescription(); + + log.info("testId: {}", testId); + log.info("description: {}", description); + + String privateKey = testCase.getInput().get("privateKey").toString(); + Long workchain = (Long) testCase.getInput().get("workchain"); + String destinationAddress = testCase.getInput().get("destinationAddress").toString(); + Long walletId = (Long) testCase.getInput().get("walletId"); + Long seqno = (Long) testCase.getInput().get("seqNo"); + BigDecimal amountTonCoins = new BigDecimal(testCase.getInput().get("amountTonCoins").toString()); + Boolean bounceFlag = (Boolean) testCase.getInput().get("bounceFlag"); + Long validUntil = (Long) testCase.getInput().get("validUntil"); + Long sendMode = (Long) testCase.getInput().get("sendMode"); + String comment = testCase.getInput().get("comment").toString(); + + byte[] secretKey = Utils.hexToSignedBytes(privateKey); + TweetNaclFast.Signature.KeyPair keyPair = TweetNaclFast.Signature.keyPair_fromSeed(secretKey); + + WalletV4R2 contract = WalletV4R2.builder() + .wc(workchain) + .keyPair(keyPair) + .walletId(walletId) + .build(); + + String expectedBocAsHex = (String) testCase.getExpectedOutput().get("externalMessageBocAsHexWithCrc"); + + WalletV4R2Config config = WalletV4R2Config.builder() + .walletId(walletId) + .seqno(seqno) + .destination(Address.of(destinationAddress)) + .amount(Utils.toNano(amountTonCoins)) + .validUntil(validUntil) + .bounce(bounceFlag) + .mode(sendMode.intValue()) + .comment(comment) + .build(); + Message sendMsg = contract.prepareExternalMsg(config); + assertThat(sendMsg.toCell().toHex(true).toUpperCase()).isEqualTo(expectedBocAsHex); + } + + @Test + public void testSmartContracts13() { + + String testId = "smartcontracts-13"; + TonSdkTestCases.TestCase testCase = tonSdkTestCases.getTestCases().get(testId); + + String description = testCase.getDescription(); + + log.info("testId: {}", testId); + log.info("description: {}", description); + + String privateKey = testCase.getInput().get("privateKey").toString(); + Long workchain = (Long) testCase.getInput().get("workchain"); + String destinationAddress = testCase.getInput().get("destinationAddress").toString(); + Long walletId = (Long) testCase.getInput().get("walletId"); + Long seqno = (Long) testCase.getInput().get("seqNo"); + BigDecimal amountTonCoins = new BigDecimal(testCase.getInput().get("amountTonCoins").toString()); + Boolean bounceFlag = (Boolean) testCase.getInput().get("bounceFlag"); + Long validUntil = (Long) testCase.getInput().get("validUntil"); + Long sendMode = (Long) testCase.getInput().get("sendMode"); + String body = testCase.getInput().get("body").toString(); + + byte[] secretKey = Utils.hexToSignedBytes(privateKey); + TweetNaclFast.Signature.KeyPair keyPair = TweetNaclFast.Signature.keyPair_fromSeed(secretKey); + + WalletV4R2 contract = WalletV4R2.builder() + .wc(workchain) + .keyPair(keyPair) + .walletId(walletId) + .build(); + + String expectedBocAsHex = (String) testCase.getExpectedOutput().get("externalMessageBocAsHexWithCrc"); + + WalletV4R2Config config = WalletV4R2Config.builder() + .walletId(walletId) + .seqno(seqno) + .destination(Address.of(destinationAddress)) + .amount(Utils.toNano(amountTonCoins)) + .validUntil(validUntil) + .bounce(bounceFlag) + .mode(sendMode.intValue()) + .body(CellBuilder.beginCell().storeUint(8, 32).endCell()) + .build(); + Message sendMsg = contract.prepareExternalMsg(config); + assertThat(sendMsg.toCell().toHex(true).toUpperCase()).isEqualTo(expectedBocAsHex); + } +} diff --git a/smartcontract/src/test/java/org/ton/java/smartcontract/TonSdkTestCases.java b/smartcontract/src/test/java/org/ton/java/smartcontract/TonSdkTestCases.java new file mode 100644 index 00000000..8586d61b --- /dev/null +++ b/smartcontract/src/test/java/org/ton/java/smartcontract/TonSdkTestCases.java @@ -0,0 +1,33 @@ +package org.ton.java.smartcontract; + +import lombok.Builder; +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +import java.io.Serializable; +import java.util.Map; + +@Builder +@Getter +@Setter +@ToString +public class TonSdkTestCases implements Serializable { + private Map testCases; + + @Setter + @Getter + public static class TestCase { + + private String description; + private Map input; + private Map expectedOutput; + + @Override + public String toString() { + return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE); + } + } +} \ No newline at end of file