@tonappchain/sdk 0.7.2-payload-builder-0.2 → 0.7.2-payload-builder-0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/artifacts/testnet/ton/internal/build/CrossChainLayer.compiled.json +1 -1
- package/dist/artifacts/testnet/ton/internal/build/Executor.compiled.json +1 -1
- package/dist/artifacts/testnet/ton/internal/build/JettonMinter.compiled.json +1 -1
- package/dist/artifacts/testnet/ton/internal/build/JettonProxy.compiled.json +1 -1
- package/dist/artifacts/testnet/ton/internal/build/JettonWallet.compiled.json +1 -1
- package/dist/artifacts/testnet/ton/internal/build/NFTItem.compiled.json +1 -1
- package/dist/artifacts/testnet/ton/internal/build/NFTProxy.compiled.json +1 -1
- package/dist/artifacts/testnet/ton/internal/wrappers/CrossChainLayer.d.ts +13 -1
- package/dist/artifacts/testnet/ton/internal/wrappers/CrossChainLayer.js +45 -7
- package/dist/artifacts/testnet/ton/internal/wrappers/JettonMinter.d.ts +2 -2
- package/dist/artifacts/testnet/ton/internal/wrappers/JettonMinter.js +2 -2
- package/dist/src/adapters/contractOpener.d.ts +4 -0
- package/dist/src/adapters/contractOpener.js +165 -1
- package/dist/src/adapters/retryableContractOpener.d.ts +5 -1
- package/dist/src/adapters/retryableContractOpener.js +22 -4
- package/dist/src/index.d.ts +0 -1
- package/dist/src/index.js +1 -4
- package/dist/src/interfaces/ContractOpener.d.ts +5 -1
- package/dist/src/interfaces/ITxFinalizer.d.ts +5 -0
- package/dist/src/interfaces/ITxFinalizer.js +2 -0
- package/dist/src/interfaces/WalletInstanse.d.ts +4 -8
- package/dist/src/sdk/StartTracking.d.ts +4 -3
- package/dist/src/sdk/StartTracking.js +5 -7
- package/dist/src/sdk/TONTransactionManager.d.ts +3 -1
- package/dist/src/sdk/TONTransactionManager.js +16 -3
- package/dist/src/sdk/TacSdk.js +3 -1
- package/dist/src/sdk/TxFinalizer.d.ts +15 -4
- package/dist/src/sdk/TxFinalizer.js +102 -23
- package/dist/src/sdk/Utils.d.ts +6 -1
- package/dist/src/sdk/Utils.js +37 -0
- package/dist/src/sender/BatchSender.js +19 -0
- package/dist/src/sender/RawSender.js +34 -1
- package/dist/src/sender/SenderFactory.js +1 -1
- package/dist/src/sender/TonConnectSender.js +2 -0
- package/dist/src/structs/InternalStruct.d.ts +19 -1
- package/dist/src/structs/Struct.d.ts +13 -1
- package/dist/src/wrappers/HighloadWalletV3.d.ts +5 -3
- package/dist/src/wrappers/HighloadWalletV3.js +14 -3
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{ "hash": "
|
|
1
|
+
{ "hash": "efc72b938535bd03ad462f377afaaa007cd918e06474b420864fa637a994dc94", "hashBase64": "78crk4U1vQOtRi83evqqAHzZGOBkdLQghk+mN6mU3JQ=", "hex": "b5ee9c7241023d010012a7000114ff00f4a413f4bcf2c80b01020120023902014803250168d0eda2edfb20c700925f04e001d0d3030171b0925f04e0fa40fa4031fa0031f401fa0031fa00013170f83a02d31f0101d33f01120401b8ed44d0fa4001f861fa4001f862fa4001f863d401d0d3ff0131f864d401d0fa0001f86dfa0001f86cfa0030f86ed401f86fd430d0d32f01f86bd32f01f867d32f01f868d32f01f869d32f01f86ad30301f865f40430f8665365a1f8460504aef80701830cf94130f8075003a101a6648200a9fa5003a0128209e1338070f8370170f836a066b608a1a6645166a122821048e660b5bae3022282106c582059bae3002282100e50d313bae302303435248210cf6a5da4ba06070d1700c46c71811d6570f8365cbcf2e064f84e59a1a0f86ef846f845c8f84b01cb2ff84701cb2ff84801cb2ff84901cb2ff84a01cb2fcb03f400c9f84fc8f84dfa02f84cfa02f84efa02c9c8f84401cbffc9c8f841cf16f842cf16f843cf16ccccccccc9ed5402fe03d31ffa00f404fa4055302170547000246ec0008e156c3101d0d300fa00fa0023963403fa0030039130e29134e255027f266ec000f84df84c5007a816a05240b915b0927034de5320a022a027a02e81391b70f836a0a052c0be5240b0e30210365f06288014fb02c88210ae7df95b2502cb1fcb3f12cb1f22cf16c9702702080c02fc3339393a3b5266a05008a05008a026a08014fb02f84e5004a0f86ef846f845c8f84b01cb2ff84701cb2ff84801cb2ff84901cb2ff84a01cb2fcb03f400c9f84fc8f84dfa02f84cfa02f84efa02c9c8f84401cbffc9c8f841cf16f842cf16f843cf16ccccccccc9ed54216ec00092316de30d05c8cb1f2101cb3f5003cf16090a001a01c8f400f84dfa02f84cfa02c901fe5003fa0213f40001cf16c982106c582059017f830771800cc8cb03cb01cb0813cbff02957158cb61cc987058cb6101d0cf16e2c98010fb0021d70b01c000b38e3bc88210d53276db5802cb1fcb3fc970018010810082226eb32091719170e2c8500401cb055006cf165004fa02cb6a039358cc019130e201c901fb00915be20b0004db3100748010810082226eb32091719170e2c8500401cb055006cf165004fa02cb6a039358cc019130e201c901fb00f80fc000938100cc928064e2f2f00302da323501fa40d4d4f828f84f52300270705003c85003cf168b02cf16ca00ccc921c8cb0113f40012f400cb00c97001f90074c8cb0212ca07cbffc9d05006c705f2e04701d7393078d721d3ff0131f8468307f40e6fa131f2e0c920d0f404f401fa40fa003020c300935b3234e30d0e1002fe280441381523d70b01c0008e70aa008150bd70f836a0738103b582100966018070f837a0801c8127e08209e1338070f837a0a47020c88210d7b9c06e580802cb1fcb3f23cf165004fa0258cf1671fa0214cb00cb00c9712070c87001ca0014cc13cb0012cb07cb07c9c87001cbff58cf167f01ca0058fa02ccc9c8ccc9e30d310f002c218307f48e6fa56c1291a4923070e201d0028307f41604fc70207f8ff2238307f47c6fa5208fe302d430d0d3ff0130fa40d20001209301fa00927058e2d430d0d20001209301fa00927058e2d4f404069233348e9634029233228e8c03d307d3073001c001f2e0cee24003e2216e8e90c804d014cf162210355980108011db3ce30d5144a004a114a0039132e201b3e6306c125222a11112131401ee7021c000965b705300f8388ee921c0018e2d5b801c8127e08209e1338070f8378208278d00738103b55870f837a08153b370f836a08042815cb270f838a4a08eb421c0028e2d5b8018811c488209e1338070f8377581058e82100966018070f837a08141a070f836a08024814bfa70f838a4a0e30ee2e23500a28e4dc85801cb055005cf165003fa0254712323ed41ed43ed44ed45ed479f5bc85003cf17c913775003cb6bcccced67ed65ed64ed63ed61747fed11987601cb6bcc01cf17ed41edf101f2ffc901fb00db06005c3154233380108011226eb32091719170e2c8500401cb055006cf165004fa02cb6a039358cc019130e201c901fb0001b8c200f2e064f846f845c8f84b01cb2ff84701cb2ff84801cb2ff84901cb2ff84a01cb2fcb03f400c9f84fc8f84dfa02f84cfa02f84efa02c9c8f84401cbffc9c8f841cf16f842cf16f843cf16ccccccccc9ed5482100e50d31350047f150188830771800cc8cb03cb01cb0813cbff02957158cb61cc987058cb6101d0cf16e2c98010fb0014a101a1f84e5210bef2e0658010fb0201fa403020d70b01c000b3915be30d160078c88210d53276db580302cb1fcb3fc970018010810082226eb32091719170e2c8500401cb055006cf165004fa02cb6a039358cc019130e201c901fb0004fe8ffd3403d4f828f84f52300270705003c85003cf168b02cf16ca00ccc921c8cb0113f40012f400cb00c97001f90074c8cb0212ca07cbffc9d05005c705f2e047028014fb0202fa40308210cf6a5da4587f830771800cc8cb03cb01cb0813cbff02957158cb61cc987058cb6101d0cf16e2c98010fb0020d70b01c000b3e30f18193c1a0078c88210ae7df95b580302cb1fcb3fc970018010810082226eb32091719170e2c8500401cb055006cf165004fa02cb6a039358cc019130e201c901fb0000025b02f8e024821074cd76b2ba8e633233f84313c705f2e04801d3ff0131f8648014fb02f846f845c8f84b01cb2ff84701cb2ff84801cb2ff84901cb2ff84a01cb2fcb03f400c9f84fc8f84dfa02f84cfa02f84efa02c9c8f84401cbffc9c8f841cf16f842cf16f843cf16ccccccccc9ed54e0332382101f95f86cbae30231221b1c019a135f03f84ec300f2e0c8c88210f358b6d05802cb1fcb3ff84efa02c9f841f84e58801072226eb32091719170e2c8500401cb055006cf165004fa02cb6a039358cc019130e201c901fb0070f86e3c03f68210063199b7ba8e5c32f84112c705f2e046fa0030f86cf846f845c8f84b01cb2ff84701cb2ff84801cb2ff84901cb2ff84a01cb2fcb03f400c9f84fc8f84dfa02f84cfa02f84efa02c9c8f84401cbffc9c8f841cf16f842cf16f843cf16ccccccccc9ed54e02282103531465cbae3022282105cec6be0bae302221d1e1f00b832f84112c705f2e046fa0030f86df846f845c8f84b01cb2ff84701cb2ff84801cb2ff84901cb2ff84a01cb2fcb03f400c9f84fc8f84dfa02f84cfa02f84efa02c9c8f84401cbffc9c8f841cf16f842cf16f843cf16ccccccccc9ed5400b832f84112c705f2e046fa4030f863f846f845c8f84b01cb2ff84701cb2ff84801cb2ff84901cb2ff84a01cb2fcb03f400c9f84fc8f84dfa02f84cfa02f84efa02c9c8f84401cbffc9c8f841cf16f842cf16f843cf16ccccccccc9ed5402f48210581879bcba8e6532f84112c705f2e046fa4030f862f8428b02c705f2d050f846f845c8f84b01cb2ff84701cb2ff84801cb2ff84901cb2ff84a01cb2fcb03f400c9f84fc8f84dfa02f84cfa02f84efa02c9c8f84401cbffc9c8f841cf16f842cf16f843cf16ccccccccc9ed54e022821060094a1bbae30222202100b66c21f841c705f2e0468b02f862f846f845c8f84b01cb2ff84701cb2ff84801cb2ff84901cb2ff84a01cb2fcb03f400c9f84fc8f84dfa02f84cfa02f84efa02c9c8f84401cbffc9c8f841cf16f842cf16f843cf16ccccccccc9ed5403fc82106a4fbe34ba8e5f6c21f842c705f2e049f842f8618b02f862f846f845c8f84b01cb2ff84701cb2ff84801cb2ff84901cb2ff84a01cb2fcb03f400c9f84fc8f84dfa02f84cfa02f84efa02c9c8f84401cbffc9c8f841cf16f842cf16f843cf16ccccccccc9ed54e022821020faec53bae3022282107ee5a6d0bae30222222324002e32f84112c705f2e046d421fb0401d0ed1eed53d430ed54017c32f84112c705f2e046d430f86f6df86682107ee5a6d0c8c970830771800cc8cb03cb01cb0813cbff02957158cb61cc987058cb6101d0cf16e2c98010fb003c00e88210e97250b7ba8e5d32f84112c705f2e046d32f0131f86bf846f845c8f84b01cb2ff84701cb2ff84801cb2ff84901cb2ff84a01cb2fcb03f400c9f84fc8f84dfa02f84cfa02f84efa02c9c8f84401cbffc9c8f841cf16f842cf16f843cf16ccccccccc9ed54e05b8210d53276dbbadc840ff2f0020120262a020158272800efb444bda89a1f48003f0c3f48003f0c5f48003f0c7a803a1a7fe0263f0c9a803a1f40003f0dbf40003f0d9f40061f0dda803f0dfa861a1a65e03f0d7a65e03f0cfa65e03f0d1a65e03f0d3a65e03f0d5a60603f0cbe80861f0cdf083f085f087f08bf08df08ff091f093f097f095f09bf099f09df09ff089001b3b4817da89a1f48003f0c3f48003f0c5f48003f0c7a803a1a7fe0263f0c9a803a1f40003f0dbf40003f0d9f40061f0dda803f0dfa861a1a65e03f0d7a65e03f0cfa65e03f0d1a65e03f0d3a65e03f0d5a60603f0cbe80861f0cd02900707020f8468307f4866fa5908e1801d32f01315303bc946c2251109130e2f8468307f47c6fa5e810235f03f847f848f849f84af84bf845f8440201202b2d01fbb9685ed44d0fa4001f861fa4001f862fa4001f863d401d0d3ff0131f864d401d0fa0001f86dfa0001f86cfa0030f86ed401f86fd430d0d32f01f86bd32f01f867d32f01f868d32f01f869d32f01f86ad30301f865f40430f866f828f84f120270705003c85003cf168b02cf16ca00ccc921c8cb0113f40012f400cb00c982c0022207001f90074c8cb0212ca07cbffc9d0010201202e3701e1b40f5f00e4b0619f28261f00ea00743f00fda89a1f48003f0c3f48003f0c5f48003f0c7a803a1a7fe0263f0c9a803a1f40003f0dbf40003f0d9f40061f0dda803f0dfa861a1a65e03f0d7a65e03f0cfa65e03f0d1a65e03f0d3a65e03f0d5a60603f0cbe80861f0cc11a1e80860fea68702f03fca60681049658a0820812750070f8375348a0a606536aa0810496a070f838525aa0526ba01a70f83818a07181012070f838a0533470f838aa00a08200fe585003a070f83612a017a08208278d0080648200a9fa5870f837a0810c1c70f836a024c3008e8d70f828541343f83c1024435012926c41e28ae66c21f80758a17030333602fe23d70b01c0008e70aa008150bd70f836a0738103b582100966018070f837a0801c8127e08209e1338070f837a0a47020c88210d7b9c06e580802cb1fcb3f23cf165004fa0258cf1671fa0214cb00cb00c9712070c87001ca0014cc13cb0012cb07cb07c9c87001cbff58cf167f01ca0058fa02ccc9c8ccc9e30d238307f48e3132005c306c22707121c8c9c87f01ca005006fa0215cc14cb0013cb0712cb07c9c87001cbff58cf167001ca00ccc9c8ccc900266fa56c1291a4923070e201d040148307f4160201a251128307f47c6fa5208ec002d430d0d3ff0130fa4031d20001209301fa00927058e2d430d0d2000192fa00927001e2d431f404310394303113a08e8d3101d307d3073001c001f2e0cee2029132e201b3123401fc7021c000965b705300f8388ee921c0018e2d5b801c8127e08209e1338070f8378208278d00738103b55870f837a08153b370f836a08042815cb270f838a4a08eb421c0028e2d5b8018811c488209e1338070f8377581058e82100966018070f837a08141a070f836a08024814bfa70f838a4a0e30ee2e201a170b60913a03500f221c0048e395b8208278d008010811e505870f8378209da9c008019812af85870f837aa00a08170e470f836a08019812af870f83c79810f5a70f838a0a4a08e3801c0038e2e308208278d00800f811d585870f8378209da9c0080198126955870f837a081440e70f836a07281051470f838a4a093f2c0cee2e20006f836a001fbb662dda89a1f48003f0c3f48003f0c5f48003f0c7a803a1a7fe0263f0c9a803a1f40003f0dbf40003f0d9f40061f0dda803f0dfa861a1a65e03f0d7a65e03f0cfa65e03f0d1a65e03f0d3a65e03f0d5a60603f0cbe80861f0cdf051f09e2404e0e0a00790a0079e2d16059e2d940199924391960227e80025e801960193038001e7001f90074c8cb0212ca07cbffc9d001f6f220c7009130e0d31f0182104b19e42abd94840ff2f0de8308d71820f901ed44d0fa4001f861fa4001f862fa4001f863d401d0d3ff0131f864d401d0fa0001f86dfa0001f86cfa0030f86ed401f86fd430d0d32f01f86bd32f01f867d32f01f868d32f01f869d32f01f86ad30301f865f40430f86601d3ff01f8443a01fe5e21f910f2a0f84901d32f0131f869f823f849bef2e0cdf849f84abef2e0cbf800f848f867f823f868f848f84ba0f86af823f845f84ba8a1f8468307f4866fa5908e1c01d32f013122bb9bf84652108307f45b30f866def8468307f47c6fa5e85f03c8f84a01cb2fc9d0f84652308307f416f866c85801cbff0101cb2ff8493b018001cb2ff84701cb2ff84801cb2ff84a01cb2fc982104b19e42a017f830771800cc8cb03cb01cb0813cbff02957158cb61cc987058cb6101d0cf16e2c98010fb003c009cf846f845c8f84b01cb2ff84701cb2ff84801cb2ff84901cb2ff84a01cb2fcb03f400c9f84fc8f84dfa02f84cfa02f84efa02c9c8f84401cbffc9c8f841cf16f842cf16f843cf16ccccccccc9ed541f981837" }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{ "hash": "
|
|
1
|
+
{ "hash": "d814126967f6dfd2b19d98cb7fe56ce41eaaf47d27e69007058c83a0668511c1", "hashBase64": "2BQSaWf239KxnZjLf+Vs5B6q9H0n5pAHBYyDoGaFEcE=", "hex": "b5ee9c7241020e010002b6000114ff00f4a413f4bcf2c80b0102016202080290d03221c700925f03e0d0d30301ed44d0fa4001f861fa4001f862d20001f863d430f86471b08e843031db3ce0fa403001d31f0101d33f01120182103b6616c6bae3025f04840ff2f0030501ae8020d721d31f0101d33f01123282100e50d313baf2e096f84270f8638b02f862f844c8f841cf16f842cf16f84301ca00ccc9ed54f844c88210cf6a5da4580402cb1fcb3f12cc01cf16c97076fb02f8417058801081008204004c226eb32091719170e2c8500401cb055006cf165004fa02cb6a039358cc019130e201c901fb0002aef843f2d0c822f844d0f404f404fa40fa003010235f0301f901018307f40e6fa131f2e0cc01d4fa40fa403022db3cf807f844830cf9413025830cf94130f8075005a15323a60681049658a0820812750070f8370b54155b0d0601fe7181012070f838506570f838a70314a05970f83ca08200fe5858a070f836a08208278d0080648200a9fa5870f837a001a0bcb38e352572fb0224706d80108306226eb32091719170e2c8500401cb055006cf165004fa02cb6a039358cc019130e201c901fb00f80ff230def844c882100e50d313580602cb1fcb3f58cf16120700aacc12cc01cf16c9028010fb02f8417058038018810090226eb32091719170e2c8500401cb055006cf165004fa02cb6a039358cc019130e201c901fb007ff863f862f844c8f841cf16f842cf16f84301ca00ccc9ed54020148090a0067ba30bed44d0fa4001f861fa4001f862d20001f863d430f864f844d0f404f404fa40fa003010235f0301f901018307f40e6fa13180201200b0c0041b444bda89a1f48003f0c3f48003f0c5a40003f0c7a861f0c9f083f085f087f08900137b40adda89a1f48003f0c3f48003f0c5a40003f0c7a861f0c9b678ff00d003cd739f2e0c9d30701c003f2e0cad430f844f900018307f40e6fa131f2e0cbfea68f77" }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{ "hash": "
|
|
1
|
+
{ "hash": "bcd9666381b77df5b6bb38374e42b3525fc783f8f46faef3e6fc3e556633e58c", "hashBase64": "vNlmY4G3ffW2uzg3TkKzUl/Hg/j0b67z5vw+VWYz5Yw=", "hex": "b5ee9c72410218010004f1000114ff00f4a413f4bcf2c80b0102016202110202ca030f04f7d4831c02497c138007434c0c05c6c2497c1383e900c0074c7c04074cfc0449455284d20072049f82082784ce01c3e0dd4512d82052860053ec0bb51343e80007e187e90007e18be90007e18f5007e1935007e197e1988a0842b9f7e56eeb8c088a08435ee701baeb8c088a0841ef765f7aeb8c08cc8608416061e6f20405060b007432f842c705f2e0498020d721fa40fa00307054130224026df034f84101a0f861f845f844c8f841fa02f842cf16f843cf16ccccf846cf16c9ed54008c32f842c705f2e049fa40fa00fa40fa00f4045e2325473307f034f84101a0f861f40430206eb392f8649130e2f845f844c8f841fa02f842cf16f843cf16ccccf846cf16c9ed5403f86c12fa00fa40f828f84523595970037054201314c85003fa0201cf1601cf16c922c8cb0112f400f400cb00c9f90074c8cb0212ca07cbffc9d05004c705f2e04af84122a1f861f845f844c8f841fa02f842cf16f843cf16ccccf846cf16c9ed5402fa40f40401d0fa00f404f40430103434f8425230c70520e30f7023070809005cc848138210b0afa74d52830a1582106c582059500502cb1fcb3f12cb1f01fa02f40001cf165004cf1658fa02f4000028355b33c88210d53276db580502cb1fcb3f13f400012a928018928010e2049381009093810082e21314db3c0a00988e48c85801cb055004cf1658fa02547120ed41ed43ed44ed45ed479d5bc85003cf17c9127158cb6acced67ed65ed64ed63ed61737fed11977001cb6a01cf17ed41edf101f2ffc901fb00db0503f6ba8e3031f842c705f2e049fa4030f863f8438b02c705f2d050f845f844c8f841fa02f842cf16f843cf16ccccf846cf16c9ed54e021821060094a1bba8e276c21f842c705f2e0498b02f863f845f844c8f841fa02f842cf16f843cf16ccccf846cf16c9ed54e02182106a4fbe34bae30221821023f78ab7bae302320c0d0e00566c21f843c705f2e04bf843f8628b02f863f845f844c8f841fa02f842cf16f843cf16ccccf846cf16c9ed54004c31f842c705f2e049d430f864f845f844c8f841fa02f842cf16f843cf16ccccf846cf16c9ed54008882101754ab63ba8e35f8425210c705f2e049706d80188306226eb32091719170e2c8500401cb055006cf165004fa02cb6a039358cc019130e201c901fb00e030840ff2f001b7ad32208405e35146560180b2c7f2cfd400fe80be0a33c58073c5807e80bd003e0a3e114408dc150804c5321400fe808073c58073c5b248b232c044bd003d0032c0325c087e401d3232c084b281f2fff2741c1000e00620402436cf201000a28e4dc85801cb055005cf165003fa0254712323ed41ed43ed44ed45ed479f5bc85003cf17c913775003cb6bcccced67ed65ed64ed63ed61747fed11987601cb6bcc01cf17ed41edf101f2ffc901fb00db06020120121502037a2013140054aa25ed44d0fa0001f861fa4001f862fa4001f863d401f864d401f865f866f841f842f843f844f845f8460040a9f7ed44d0fa0001f861fa4001f862fa4001f863d401f864d401f865f866f8460202711617009fadbcf6a2687d0000fc30fd2000fc317d2000fc31ea00fc326a00fc32fc337c147c22acb801b82a10098a642801fd0100e78b00e78b6491646580897a007a00658064fc803a646581096503e5ffe4e840004faf16f6a2687d0000fc30fd2000fc317d2000fc31ea00fc326a00fc32fc337c20bffc217c227c22c06f4040f4" }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{ "hash": "
|
|
1
|
+
{ "hash": "d9f92ef725ccbbbe839bc0e76910e66adbeafb811648e5d46765a40af6e25ee4", "hashBase64": "2fku9yXMu76Dm8DnaRDmatvq+4EWSOXUZ2WkCvbiXuQ=", "hex": "b5ee9c7241020e010003a5000114ff00f4a413f4bcf2c80b01020162020d04f8d020c700925f04e001d0d3030171b0925f04e0fa40fa4031fa0031f401fa0031fa00013170f83a02d31f0101d33f0112ed44d0fa4001f861fa4001f862fa4030f8635165a18010811e508209e1338070f83766b608a15155a12182107362d09cbae302303333218210ae7df95bbae3022182107817b330bae30233200307080a018e3101fa0021c2008ebafa40f40401d0fa00f404f404301034342070547000246ec0008e156c3101d0d300fa00fa0023963403fa0030039130e29134e255023324104b03925f07e20402be04aa015003a001a001a001a081214370f836a081391b70f836a08115b470f836a08019812af870f83ca0812af870f836a0812ee070f836a08019812af882100966018070f837a080648200a9fa8209e1338070f837a015be226eb321b0e30f050600d630c85005cf1624cf1658fa02c9c804103782102906ab024813061582106c582059500502cb1fcb3f12cb1f01fa02f40001cf1613cc12ccc90176fb02f84170588010810082226eb32091719170e2c8500401cb055006cf165004fa02cb6a039358cc019130e201c901fb0000fc32333434443066706d7022c3009430206eb3de20c00091709171e270c882100f8a7ea5580a02cb1fcb3f5006fa025006cf165003cf1615cb005004fa02cb000191cc9131e27001c980108050226eb32091719170e2c8500401cb055006cf165004fa02cb6a039358cc019130e201c901fb00f80f938100c8928064e2f2f0013631f841c705f2e0468020d721d430d0fa40fa40fa0030211034706d09012e31f841c705f2e046fa40fa40fa00fa40fa00f4043010560900d27022c3009430206eb3de20c00091709171e270c882100f8a7ea5580a02cb1fcb3f5006fa025006cf165003cf1615cb005004fa02cb000191cc9131e27001c980108050226eb32091719170e2c8500401cb055006cf165004fa02cb6a039358cc019130e201c901fb0002e08210581879bcba8e2730f84212c705f2e047fa4030f863f8438b02c705f2d050c8f841cf16f842cf16f843cf16c9ed54e020821060094a1bba8e1c5bf842c705f2e0478b02f863c8f841cf16f842cf16f843cf16c9ed54e02082106a4fbe34bae302821020faec53bae3025b840ff2f00b0c00525bf843c705f2e048f8438b02c705f2d050f843f8628b02f863c8f841cf16f842cf16f843cf16c9ed54002cf84212c705f2e047d421fb0401d0ed1eed53d430ed540035a0844bda89a1f48003f0c3f48003f0c5f48061f0c7f083f085f087db520c60" }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{ "hash": "
|
|
1
|
+
{ "hash": "2626cfbe9db7a4f30ddfd0ea01797ac84fddc3502cb39c2a17b85a35fc119210", "hashBase64": "JibPvp23pPMN39DqAXl6yE/dw1Ass5wqF7haNfwRkhA=", "hex": "b5ee9c7241021501000525000114ff00f4a413f4bcf2c80b0102016202140202ca0313020120041204cdd0831c02497c138007434c0c05c6c2544d7c0fc0e383e903e900c7e800c7d007e800c7e80004c5c3e0e80b4c7c048208403e29fa96ea3a14c0d1676cf3808208405e351466ea3a14c0c96b6cf380d4920841657c1ef2ea3a10d1676cf3817c120840153e8d96ea05090e1101da03d33f0101fa00fa4021f0155bed44d0fa0001f861fa4001f862fa4030f863f84123a1f861f8425006c705f2e2c1f841c2fff2e2c2f843f82a7054201314c85003fa0201cf1601cf16c922c8cb0112f400f400cb00c97021f90074c8cb0212ca07cbffc9d005fa40f401fa00200601fc20d70b009bd74bc00101c001b0f2e2c49130e2c88210178d4519580702cb1fcb3f5004fa02f842cf1601cf1622fa025003cf1643152191729171e2f839206e938129ad9120e2216e9431812ca39101e25023a813a07381034f70f83ca00270f83612a00170f836a0738103b582100966018070f837a0bcf2b070401380180701308050db3cf841f842f843c85003fa0201cf1601cf16c9ed540800a28e4dc85801cb055005cf165003fa0254712323ed41ed43ed44ed45ed479f5bc85003cf17c913775003cb6bcccced67ed65ed64ed63ed61747fed11987601cb6bcc01cf17ed41edf101f2ffc901fb00db0603f2ed44d0fa0001f861fa4001f862fa4030f86303d33f0101fa00f84122a0f861fa40fa40f84327c705f843f82a25595970037054201314c85003fa0201cf1601cf16c922c8cb0112f400f400cb00c9f90074c8cb0212ca07cbffc9d05008c70517b1f2e2c305fa0021925f04e30d22d70b01c000b3925f04e30d0a0b0d0140c882107362d09c2602cb1fcb3f5004fa0258cf1658cf16f8425980188011db3c0c015c03a1f82fa0738103b582100966018070f837b60972fb0270c88210d53276db580402cb1fcb3f128010810082db3c0c00988e48c85801cb055004cf1658fa02547120ed41ed43ed44ed45ed479d5bc85003cf17c9127158cb6acced67ed65ed64ed63ed61737fed11977001cb6a01cf17ed41edf101f2ffc901fb00db050028f841f842f843c85003fa0201cf1601cf16c9ed5401f4ed44d0fa0001f861fa4001f862fa4030f86303d33f0101fa00fa40f40430206e2092316d9201d0e221917093fa0001e222916d9401f40459e20392316d9401f40430e2f84125a1f861f8425008c705f2e2c1f841c2fff2e2c2c821fa0212f40016f400c9c882107bdd97de580502cb1fcb3f58fa02f842cf16210f01e8d70b01c0009331f8429101e2cf16f400c94133f839206e938121cd9120e2216e9431812ca39101e203aa0112a00170f836a081287570f836a081391b70f836a08125b670f836a00170f836a080648200a9fa8209e1338070f837a0801c8127e08209e1338070f837a0bcf2b0f843705880188050100074226eb32091719170e2c8500401cb055006cf165004fa02cb6a039358cc019130e201c901fb00f841f842f843c85003fa0201cf1601cf16c9ed5400b08e51ed44d0fa0001f861fa4001f862fa4030f863738103b582100966018070f83770fb02f842706d8010810082226eb32091719170e2c8500401cb055006cf165004fa02cb6a039358cc019130e201c901fb00e0840ff2f00013a2fd2210e0007970a6c0009fae200835c87b51343e80007e187e90007e18be900c3e18f4c7c048208405e351466e8060841ef765f7aeac7cb8b1601035c87e800c3e1040683e187e107e10be10f21400fe808073c58073c5b27b55200039a0f605da89a1f40003f0c3f48003f0c5f48061f0c7f083f085f087f0550958ae7f" }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{ "hash": "
|
|
1
|
+
{ "hash": "3b204bbf7facf521e4a442f2f560ad6b9d38cda92eab1320d7cc1fac42815ec9", "hashBase64": "OyBLv3+s9SHkpELy9WCta504zakuqxMg18wfrEKBXsk=", "hex": "b5ee9c72410216010004a6000114ff00f4a413f4bcf2c80b0102016202150202ca0314020120041301bdd0cc8b1c02497c0f83434c0c05c6c238f16fb51343480007e1874ffc07e18b500743e90007e18fe90007e19be900c3e193d010c3e19600835c874c7c04c60841b1608166ebcb832dffe187c0e383e903e900c7e800c7d007e800c7e80004c60504a4ed44d0d20001f861d3ff01f862d401d0fa4001f863fa4001f866fa4030f864f40430f86503d31f0101d33f0112218210bd6ea770bae3022182105fcc3d14bae3022182102fcb26a2bae30221820bb390ceba06070a0b00e8313432f841b3f2e0c8f84301c705f2e048fa4001f864d401f8657ff861f0387581058e82100966018070f83772fb02c8821005138d91580302cb1fcb3f8b02cf1601cf16c9f84470588010810082226eb32091719170e2c8500401cb055006cf165004fa02cb6a039358cc019130e201c901fb0002c83110344013f841f2e0c9f84414c705f2e047fa4021f0155bfa40d2000130fa0022d70b01c000b35427272191729171e2f839206e9430812dcade02a812a07581058e82100966018070f837a00170f836a0bcf2b020923034e30d02923031e30df864f03808090084c8821005138d912502cb1fcb3ff844cf165006cf16c9544266801071226eb32091719170e2c8500401cb055006cf165004fa02cb6a039358cc019130e201c901fb00009e22f0155bc88210d53276db5802cb1fcb3fc97581058e82100966018070f83776fb0212700180108306226eb32091719170e2c8500401cb055006cf165004fa02cb6a039358cc019130e201c901fb000096345b32f841f2e0c9c882108b7717355802cb1fcb3ff84201cbfff843cf16c9700180108042226eb32091719170e2c8500401cb055006cf165004fa02cb6a039358cc019130e201c901fb00015e8e873110344013db3ce030316c228210ae7df95bba8e12f841b3f2e0c8f846c705f2e0467ff861f038e030840ff2f00c01a0f841f2e0c9f84414c705f2e047fa40f40401d0fa00f404f404301034342070547000246ec0008e156c3101d0d300fa00fa0023963403fa0030039130e29134e2550233f8465260c70525105b50a443300d04faf839206e9430812d20de5aa058a05003a001aa00a00170f836a081391b70f836a081121e70f836a080648200a9fa8209e1338070f837a07581058e82100966018070f837a0bcf2b0248e123034c88210d53276db580302cb1fcb3ff400e30d70f861f038218e107581058e82100966018070f83776fb02de7022e30f030e0f10110060c88210bcd19310f844102510464303081582106c582059500502cb1fcb3f12cb1f01fa02f40001cf16f844cf1613f400000480180004801001189381009093810082e213db3c1200988e48c85801cb055004cf1658fa02547120ed41ed43ed44ed45ed479d5bc85003cf17c9127158cb6acced67ed65ed64ed63ed61737fed11977001cb6a01cf17ed41edf101f2ffc901fb00db050013a2fd2210e0007970a6c00045ae3e11723e10f3c5be11b3c5be1133c5b2723e104072803e108072fff33d00327b5520007ba11f9fda89a1a40003f0c3a7fe03f0c5a803a1f48003f0c7f48003f0cdf48061f0c9e80861f0cbf08335f083f085f087f089f08bc1f083f085f0871604db387929ff" }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{ "hash": "
|
|
1
|
+
{ "hash": "10be820c5430a474d5c0cb66c22eb1fc992556acbeb5be47398ab2dec280fe6c", "hashBase64": "EL6CDFQwpHTVwMtmwi6x/JklVqy+tb5HOYqy3sKA/mw=", "hex": "b5ee9c7241020d01000381000114ff00f4a413f4bcf2c80b01020162020c04f6d020c700925f04e001d0d3030171b0925f04e0fa40fa4031fa0031f401fa0031fa00013170f83a02d31f0101d33f01125165a1800f811d588209e1338070f83766b608a15155a1ed44d0fa4001f861fa4001f862fa4030f863218210ae7df95bbae3022182107817b330bae30221821005138d91bae302306c33200304050900c05b6c22f84112c705f2e0468020d721fa40fa4030c882105fcc3d14580402cb1fcb3f22cf1658cf167001ca0070fa027001ca00c9700180108050226eb32091719170e2c8500401cb055006cf165004fa02cb6a039358cc019130e201c901fb0000c45b32f841c705f2e046fa40fa40fa0030c882105fcc3d14580602cb1fcb3f21cf1601cf167001ca005003fa027001ca00c90176fb0270018010810082226eb32091719170e2c8500401cb055006cf165004fa02cb6a039358cc019130e201c901fb0001783101fa40f40401d0fa00f404f404301034342070547000246ec0008e156c3101d0d300fa00fa0023963403fa0030039130e29134e255023324104a0306029e04aa015003a001a001a001a0811e0870f836a081391b70f836a081128170f836a0812dca70f836a0801981269582100966018070f837a080648200a9fa8209e1338070f837a014be226eb321b0e30f070800c430c8471382108b0929625120071582106c582059500502cb1fcb3f12cb1f01fa02f40001cf1601cf1601cf1612ccc90176fb02f84170588010810082226eb32091719170e2c8500401cb055006cf165004fa02cb6a039358cc019130e201c901fb0000b835355bc882105fcc3d14580502cb1fcb3f22cf1658cf167001ca0070fa027001ca00c912700180108050226eb32091719170e2c8500401cb055006cf165004fa02cb6a039358cc019130e201c901fb00f80f938100c8928064e2f2f002e08210581879bcba8e2730f84212c705f2e047fa4030f863f8438b02c705f2d050c8f841cf16f842cf16f843cf16c9ed54e020821060094a1bba8e1c5bf842c705f2e0478b02f863c8f841cf16f842cf16f843cf16c9ed54e02082106a4fbe34bae302821020faec53bae3025b840ff2f00a0b00525bf843c705f2e048f8438b02c705f2d050f843f8628b02f863c8f841cf16f842cf16f843cf16c9ed54002cf84212c705f2e047d421fb0401d0ed1eed53d430ed540035a0844bda89a1f48003f0c3f48003f0c5f48061f0c7f083f085f0871d6c5f98" }
|
|
@@ -5,6 +5,7 @@ export type CrossChainLayerConfig = {
|
|
|
5
5
|
adminAddress: string;
|
|
6
6
|
newAdminAddress?: string;
|
|
7
7
|
sequencerMultisigAddress: string;
|
|
8
|
+
groupPublicKey?: bigint;
|
|
8
9
|
maxRootsSize: number;
|
|
9
10
|
merkleRoots?: MerkleRoot[];
|
|
10
11
|
prevEpoch?: number;
|
|
@@ -25,6 +26,7 @@ export type EpochInfo = {
|
|
|
25
26
|
messageCollectEndTime: number;
|
|
26
27
|
nextVotingTime: number;
|
|
27
28
|
epochDelay: number;
|
|
29
|
+
groupPublicKey: bigint;
|
|
28
30
|
};
|
|
29
31
|
export type ExecutorData = {
|
|
30
32
|
address: Address;
|
|
@@ -57,6 +59,7 @@ export declare const CrossChainLayerOpCodes: {
|
|
|
57
59
|
newAdmin_confirmChangingAdminAddress: number;
|
|
58
60
|
sequencerMultisig_changeSequencerMultisigAddress: number;
|
|
59
61
|
sequencerMultisig_updateMerkleRoot: number;
|
|
62
|
+
sequencerMultisig_updateGroupPublicKey: number;
|
|
60
63
|
};
|
|
61
64
|
export declare const CrossChainLayerErrors: {
|
|
62
65
|
noErrors: number;
|
|
@@ -73,6 +76,9 @@ export declare const CrossChainLayerErrors: {
|
|
|
73
76
|
votingNotActive: number;
|
|
74
77
|
messageCollectEndTimeLow: number;
|
|
75
78
|
notEnoughProtocolFee: number;
|
|
79
|
+
messageCollectEndTimeHigh: number;
|
|
80
|
+
invalidSenderSignature: number;
|
|
81
|
+
unknownOp: number;
|
|
76
82
|
};
|
|
77
83
|
export declare function crossChainLayerConfigToCell(config: CrossChainLayerConfig): Cell;
|
|
78
84
|
export declare class CrossChainLayer implements Contract {
|
|
@@ -111,7 +117,12 @@ export declare class CrossChainLayer implements Contract {
|
|
|
111
117
|
payload: Cell;
|
|
112
118
|
responseAddress: Address;
|
|
113
119
|
}): Promise<void>;
|
|
114
|
-
|
|
120
|
+
sendUpdateGroupPublicKey(provider: ContractProvider, via: Sender, value: bigint, opts: {
|
|
121
|
+
queryId?: number;
|
|
122
|
+
groupPublicKey: bigint;
|
|
123
|
+
}): Promise<void>;
|
|
124
|
+
buildSignedUpdateMerkleRoot(secretKey: Buffer, merkleRoot: bigint, messageCollectEndTime: number): Cell;
|
|
125
|
+
sendUpdateMerkleRoot(provider: ContractProvider, secretKey: Buffer, opts: {
|
|
115
126
|
queryId?: number;
|
|
116
127
|
merkleRoot: bigint;
|
|
117
128
|
messageCollectEndTime: number;
|
|
@@ -161,4 +172,5 @@ export declare class CrossChainLayer implements Contract {
|
|
|
161
172
|
getCurrentEpochInfo(provider: ContractProvider): Promise<EpochInfo>;
|
|
162
173
|
getExecutorAddress(provider: ContractProvider, payload: Cell): Promise<Address>;
|
|
163
174
|
getExecutorData(provider: ContractProvider, payload: Cell): Promise<ExecutorData>;
|
|
175
|
+
getEvmMsgToTvmFees(provider: ContractProvider, payload: Cell, proofBits: bigint, proofCells: bigint, executorFeeAmount: bigint, executorFeeToken: Address): Promise<bigint>;
|
|
164
176
|
}
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.CrossChainLayer = exports.CrossChainLayerErrors = exports.CrossChainLayerOpCodes = exports.MsgType = void 0;
|
|
4
4
|
exports.crossChainLayerConfigToCell = crossChainLayerConfigToCell;
|
|
5
5
|
const core_1 = require("@ton/core");
|
|
6
|
+
const crypto_1 = require("@ton/crypto");
|
|
6
7
|
const Constants_1 = require("./Constants");
|
|
7
8
|
const GasUtils_1 = require("./utils/GasUtils");
|
|
8
9
|
const MerkleRoots_1 = require("./utils/MerkleRoots");
|
|
@@ -33,7 +34,8 @@ exports.CrossChainLayerOpCodes = {
|
|
|
33
34
|
admin_updateTacProtocolFee: 0x3531465c,
|
|
34
35
|
newAdmin_confirmChangingAdminAddress: 0x6a4fbe34,
|
|
35
36
|
sequencerMultisig_changeSequencerMultisigAddress: 0x5cec6be0,
|
|
36
|
-
sequencerMultisig_updateMerkleRoot:
|
|
37
|
+
sequencerMultisig_updateMerkleRoot: 0x4b19e42a,
|
|
38
|
+
sequencerMultisig_updateGroupPublicKey: 0x74cd76b2,
|
|
37
39
|
};
|
|
38
40
|
exports.CrossChainLayerErrors = {
|
|
39
41
|
noErrors: 0,
|
|
@@ -50,6 +52,9 @@ exports.CrossChainLayerErrors = {
|
|
|
50
52
|
votingNotActive: 202,
|
|
51
53
|
messageCollectEndTimeLow: 203,
|
|
52
54
|
notEnoughProtocolFee: 204,
|
|
55
|
+
messageCollectEndTimeHigh: 205,
|
|
56
|
+
invalidSenderSignature: 32,
|
|
57
|
+
unknownOp: 0xfffff,
|
|
53
58
|
};
|
|
54
59
|
function crossChainLayerConfigToCell(config) {
|
|
55
60
|
return (0, core_1.beginCell)()
|
|
@@ -57,6 +62,9 @@ function crossChainLayerConfigToCell(config) {
|
|
|
57
62
|
.storeAddress(config.newAdminAddress ? core_1.Address.parse(config.newAdminAddress) : null)
|
|
58
63
|
.storeAddress(core_1.Address.parse(config.sequencerMultisigAddress))
|
|
59
64
|
.storeRef((0, core_1.beginCell)()
|
|
65
|
+
.storeUint(config.groupPublicKey ? config.groupPublicKey : 0n, Constants_1.Params.bitsize.hash)
|
|
66
|
+
.endCell())
|
|
67
|
+
.storeRef((0, core_1.beginCell)()
|
|
60
68
|
.storeCoins(config.tacProtocolFee ? (0, core_1.toNano)(config.tacProtocolFee.toFixed(9)) : 0)
|
|
61
69
|
.storeCoins(config.tonProtocolFee ? (0, core_1.toNano)(config.tonProtocolFee.toFixed(9)) : 0)
|
|
62
70
|
.storeCoins(config.protocolFeeSupply ? (0, core_1.toNano)(config.protocolFeeSupply.toFixed(9)) : 0)
|
|
@@ -134,18 +142,34 @@ class CrossChainLayer {
|
|
|
134
142
|
.endCell(),
|
|
135
143
|
});
|
|
136
144
|
}
|
|
137
|
-
async
|
|
145
|
+
async sendUpdateGroupPublicKey(provider, via, value, opts) {
|
|
138
146
|
await provider.internal(via, {
|
|
139
147
|
value,
|
|
140
148
|
sendMode: core_1.SendMode.PAY_GAS_SEPARATELY,
|
|
141
149
|
body: (0, core_1.beginCell)()
|
|
142
|
-
.storeUint(exports.CrossChainLayerOpCodes.
|
|
150
|
+
.storeUint(exports.CrossChainLayerOpCodes.sequencerMultisig_updateGroupPublicKey, Constants_1.Params.bitsize.op)
|
|
143
151
|
.storeUint(opts.queryId || 0, Constants_1.Params.bitsize.queryId)
|
|
144
|
-
.storeUint(opts.
|
|
145
|
-
.storeUint(opts.messageCollectEndTime, Constants_1.Params.bitsize.time)
|
|
152
|
+
.storeUint(opts.groupPublicKey, Constants_1.Params.bitsize.hash)
|
|
146
153
|
.endCell(),
|
|
147
154
|
});
|
|
148
155
|
}
|
|
156
|
+
buildSignedUpdateMerkleRoot(secretKey, merkleRoot, messageCollectEndTime) {
|
|
157
|
+
let msg = (0, core_1.beginCell)()
|
|
158
|
+
.storeUint(merkleRoot, Constants_1.Params.bitsize.hash)
|
|
159
|
+
.storeUint(messageCollectEndTime, Constants_1.Params.bitsize.time)
|
|
160
|
+
.endCell();
|
|
161
|
+
let signature = (0, crypto_1.sign)(msg.hash(), secretKey);
|
|
162
|
+
msg = (0, core_1.beginCell)()
|
|
163
|
+
.storeUint(exports.CrossChainLayerOpCodes.sequencerMultisig_updateMerkleRoot, 32)
|
|
164
|
+
.storeBuffer(signature)
|
|
165
|
+
.storeSlice(msg.asSlice())
|
|
166
|
+
.endCell();
|
|
167
|
+
return msg;
|
|
168
|
+
}
|
|
169
|
+
async sendUpdateMerkleRoot(provider, secretKey, opts) {
|
|
170
|
+
const msg = this.buildSignedUpdateMerkleRoot(secretKey, opts.merkleRoot, opts.messageCollectEndTime);
|
|
171
|
+
await provider.external(msg);
|
|
172
|
+
}
|
|
149
173
|
async sendAddProtocolFee(provider, via, value, opts) {
|
|
150
174
|
await provider.internal(via, {
|
|
151
175
|
value,
|
|
@@ -280,10 +304,12 @@ class CrossChainLayer {
|
|
|
280
304
|
const tonProtocolFee = Number((0, core_1.fromNano)(result.stack.readNumber()));
|
|
281
305
|
const protocolFeeSupply = Number((0, core_1.fromNano)(result.stack.readNumber()));
|
|
282
306
|
const executorCode = result.stack.readCell();
|
|
307
|
+
const groupPublicKey = result.stack.readBigNumber();
|
|
283
308
|
return {
|
|
284
309
|
adminAddress,
|
|
285
310
|
newAdminAddress,
|
|
286
311
|
sequencerMultisigAddress,
|
|
312
|
+
groupPublicKey,
|
|
287
313
|
maxRootsSize,
|
|
288
314
|
merkleRoots: (0, MerkleRoots_1.cellToArray)(merkleRoots),
|
|
289
315
|
prevEpoch,
|
|
@@ -306,6 +332,7 @@ class CrossChainLayer {
|
|
|
306
332
|
const nextVotingTime = result.stack.readNumber();
|
|
307
333
|
const epochDelay = result.stack.readNumber();
|
|
308
334
|
const maxRootsSize = result.stack.readNumber();
|
|
335
|
+
const groupPublicKey = result.stack.readBigNumber();
|
|
309
336
|
return {
|
|
310
337
|
lastMerkleRoot,
|
|
311
338
|
prevEpoch,
|
|
@@ -314,6 +341,7 @@ class CrossChainLayer {
|
|
|
314
341
|
nextVotingTime,
|
|
315
342
|
epochDelay,
|
|
316
343
|
maxRootsSize,
|
|
344
|
+
groupPublicKey,
|
|
317
345
|
};
|
|
318
346
|
}
|
|
319
347
|
async getExecutorAddress(provider, payload) {
|
|
@@ -329,8 +357,18 @@ class CrossChainLayer {
|
|
|
329
357
|
stateInit,
|
|
330
358
|
};
|
|
331
359
|
}
|
|
360
|
+
async getEvmMsgToTvmFees(provider, payload, proofBits, proofCells, executorFeeAmount, executorFeeToken) {
|
|
361
|
+
const result = await provider.get('calculate_evm_msg_to_tvm_fees', [
|
|
362
|
+
{ type: 'cell', cell: payload },
|
|
363
|
+
{ type: 'int', value: proofBits },
|
|
364
|
+
{ type: 'int', value: proofCells },
|
|
365
|
+
{ type: 'int', value: executorFeeAmount },
|
|
366
|
+
{ type: 'slice', cell: (0, core_1.beginCell)().storeAddress(executorFeeToken).endCell() },
|
|
367
|
+
]);
|
|
368
|
+
return result.stack.readBigNumber();
|
|
369
|
+
}
|
|
332
370
|
}
|
|
333
371
|
exports.CrossChainLayer = CrossChainLayer;
|
|
334
372
|
CrossChainLayer.minStorageDuration = 365 * 24 * 3600; //1 year
|
|
335
|
-
CrossChainLayer.storageStats = new GasUtils_1.StorageStats(
|
|
336
|
-
CrossChainLayer.addFeeGasConsumption =
|
|
373
|
+
CrossChainLayer.storageStats = new GasUtils_1.StorageStats(36550n, 90n);
|
|
374
|
+
CrossChainLayer.addFeeGasConsumption = 7525n;
|
|
@@ -19,7 +19,7 @@ export declare const JettonMinterErrors: {
|
|
|
19
19
|
};
|
|
20
20
|
export type JettonMinterConfig = {
|
|
21
21
|
totalSupply: bigint;
|
|
22
|
-
adminAddress
|
|
22
|
+
adminAddress?: Address;
|
|
23
23
|
newAdminAddress?: Address;
|
|
24
24
|
content: Cell;
|
|
25
25
|
jettonWalletCode: Cell;
|
|
@@ -28,7 +28,7 @@ export type JettonMinterConfig = {
|
|
|
28
28
|
export type JettonMinterData = {
|
|
29
29
|
totalSupply: bigint;
|
|
30
30
|
mintable: boolean;
|
|
31
|
-
adminAddress
|
|
31
|
+
adminAddress?: Address;
|
|
32
32
|
content: Cell;
|
|
33
33
|
walletCode: Cell;
|
|
34
34
|
};
|
|
@@ -166,7 +166,7 @@ class JettonMinter {
|
|
|
166
166
|
const res = await provider.get('get_jetton_data', []);
|
|
167
167
|
const totalSupply = res.stack.readBigNumber();
|
|
168
168
|
const mintable = res.stack.readBoolean();
|
|
169
|
-
const adminAddress = res.stack.
|
|
169
|
+
const adminAddress = res.stack.readAddressOpt() ?? undefined;
|
|
170
170
|
const content = res.stack.readCell();
|
|
171
171
|
const walletCode = res.stack.readCell();
|
|
172
172
|
return {
|
|
@@ -184,7 +184,7 @@ class JettonMinter {
|
|
|
184
184
|
async getFullData(provider) {
|
|
185
185
|
const res = await provider.get('get_full_data', []);
|
|
186
186
|
const totalSupply = res.stack.readBigNumber();
|
|
187
|
-
const adminAddress = res.stack.
|
|
187
|
+
const adminAddress = res.stack.readAddressOpt() ?? undefined;
|
|
188
188
|
const newAdminAddress = res.stack.readAddressOpt() ?? undefined;
|
|
189
189
|
const content = res.stack.readCell();
|
|
190
190
|
const jettonWalletCode = res.stack.readCell();
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { Blockchain } from '@ton/sandbox';
|
|
2
|
+
import { Address, Transaction } from '@ton/ton';
|
|
2
3
|
import { ContractOpener } from '../interfaces';
|
|
4
|
+
import { GetTransactionsOptions } from '../structs/InternalStruct';
|
|
3
5
|
import { Network } from '../structs/Struct';
|
|
6
|
+
export declare function getAdjacentTransactionsHelper(addr: Address, hashB64: string, getTransactions: (addr: Address, opts: GetTransactionsOptions) => Promise<Transaction[]>, opts?: GetTransactionsOptions): Promise<Transaction[]>;
|
|
4
7
|
type LiteServer = {
|
|
5
8
|
ip: number;
|
|
6
9
|
port: number;
|
|
@@ -17,4 +20,5 @@ export declare function liteClientOpener(options: {
|
|
|
17
20
|
export declare function sandboxOpener(blockchain: Blockchain): ContractOpener;
|
|
18
21
|
export declare function orbsOpener(network: Network): Promise<ContractOpener>;
|
|
19
22
|
export declare function orbsOpener4(network: Network, timeout?: number): Promise<ContractOpener>;
|
|
23
|
+
export declare function tonClientOpener(endpoint: string): ContractOpener;
|
|
20
24
|
export {};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getAdjacentTransactionsHelper = getAdjacentTransactionsHelper;
|
|
3
4
|
exports.liteClientOpener = liteClientOpener;
|
|
4
5
|
exports.sandboxOpener = sandboxOpener;
|
|
5
6
|
exports.orbsOpener = orbsOpener;
|
|
6
7
|
exports.orbsOpener4 = orbsOpener4;
|
|
8
|
+
exports.tonClientOpener = tonClientOpener;
|
|
7
9
|
const ton_access_1 = require("@orbs-network/ton-access");
|
|
8
10
|
const ton_1 = require("@ton/ton");
|
|
9
11
|
const ton_lite_client_1 = require("@tonappchain/ton-lite-client");
|
|
@@ -42,6 +44,74 @@ async function getHttpV4EndpointWithRetry(network, maxRetries = 5, delay = 1000)
|
|
|
42
44
|
}
|
|
43
45
|
throw lastError || new Error('Failed to get HTTP V4 endpoint after retries');
|
|
44
46
|
}
|
|
47
|
+
async function findTransactionByHash(addr, targetHashB64, getTransactions, opts) {
|
|
48
|
+
const timeoutMs = opts?.timeoutMs ?? 60000; // 60 seconds default
|
|
49
|
+
const retryDelayMs = opts?.retryDelayMs ?? 2000; // 2 seconds between retries
|
|
50
|
+
const deadline = Date.now() + timeoutMs;
|
|
51
|
+
const limit = opts?.limit ?? 10;
|
|
52
|
+
while (Date.now() < deadline) {
|
|
53
|
+
const batch = await getTransactions(addr, {
|
|
54
|
+
limit,
|
|
55
|
+
archival: opts?.archival ?? true,
|
|
56
|
+
});
|
|
57
|
+
// Check each transaction in the current batch
|
|
58
|
+
for (const tx of batch) {
|
|
59
|
+
// 1. check tx itself
|
|
60
|
+
if (tx.hash().toString('base64') === targetHashB64) {
|
|
61
|
+
return tx;
|
|
62
|
+
}
|
|
63
|
+
// 2. check incoming message(external-in)
|
|
64
|
+
if (tx.inMessage && tx.inMessage.info.type === 'external-in') {
|
|
65
|
+
const hash = (0, Utils_1.getNormalizedExtMessageHash)(tx.inMessage);
|
|
66
|
+
if (hash === targetHashB64) {
|
|
67
|
+
return tx;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
// 3. check incoming message(internal)
|
|
71
|
+
if (tx.inMessage && tx.inMessage.info.type === 'internal') {
|
|
72
|
+
const messageCell = (0, ton_1.beginCell)().store((0, ton_1.storeMessage)(tx.inMessage)).endCell();
|
|
73
|
+
const hash = messageCell.hash();
|
|
74
|
+
if (hash.toString('base64') === targetHashB64) {
|
|
75
|
+
return tx;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
if (Date.now() < deadline) {
|
|
80
|
+
await (0, Utils_1.sleep)(retryDelayMs);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return null;
|
|
84
|
+
}
|
|
85
|
+
async function getAdjacentTransactionsHelper(addr, hashB64, getTransactions, opts) {
|
|
86
|
+
// 1. Find the root transaction
|
|
87
|
+
const rootTx = await findTransactionByHash(addr, hashB64, getTransactions, opts);
|
|
88
|
+
if (!rootTx)
|
|
89
|
+
return [];
|
|
90
|
+
const adjacent = [];
|
|
91
|
+
// 2. Follow every outgoing message
|
|
92
|
+
for (const msg of rootTx.outMessages.values()) {
|
|
93
|
+
const dst = msg.info.dest;
|
|
94
|
+
if (!dst || dst instanceof ton_1.ExternalAddress)
|
|
95
|
+
continue;
|
|
96
|
+
const msgHashB64 = (0, ton_1.beginCell)().store((0, ton_1.storeMessage)(msg)).endCell().hash().toString('base64');
|
|
97
|
+
const tx = await findTransactionByHash(dst, msgHashB64, getTransactions, opts);
|
|
98
|
+
if (tx)
|
|
99
|
+
adjacent.push(tx);
|
|
100
|
+
}
|
|
101
|
+
// 3. Optional: follow the incoming message (if it exists and is internal)
|
|
102
|
+
if (rootTx.inMessage?.info.type === 'internal') {
|
|
103
|
+
const src = rootTx.inMessage.info.src;
|
|
104
|
+
if (src instanceof ton_1.Address) {
|
|
105
|
+
// The incoming message belongs to the sender's out-message list,
|
|
106
|
+
// so we look for the same message hash on the sender side.
|
|
107
|
+
const msgHashB64 = (0, ton_1.beginCell)().store((0, ton_1.storeMessage)(rootTx.inMessage)).endCell().hash().toString('base64');
|
|
108
|
+
const tx = await findTransactionByHash(src, msgHashB64, getTransactions, opts);
|
|
109
|
+
if (tx)
|
|
110
|
+
adjacent.push(tx);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
return adjacent;
|
|
114
|
+
}
|
|
45
115
|
function intToIP(int) {
|
|
46
116
|
const part1 = int & 255;
|
|
47
117
|
const part2 = (int >> 8) & 255;
|
|
@@ -72,6 +142,14 @@ async function liteClientOpener(options) {
|
|
|
72
142
|
const closeConnections = () => {
|
|
73
143
|
engine.close();
|
|
74
144
|
};
|
|
145
|
+
const getTransactions = async (address, opts) => {
|
|
146
|
+
const txsBuffered = await client
|
|
147
|
+
.getAccountTransactions(address, opts.lt ?? '', opts.hash ? Buffer.from(opts.hash, 'base64') : Buffer.alloc(0), opts.limit)
|
|
148
|
+
.then((r) => r.transactions);
|
|
149
|
+
const cell = ton_1.Cell.fromBoc(txsBuffered);
|
|
150
|
+
const transactions = cell.map((c) => (0, ton_1.loadTransaction)(c.beginParse()));
|
|
151
|
+
return transactions;
|
|
152
|
+
};
|
|
75
153
|
return {
|
|
76
154
|
getContractState: async (addr) => {
|
|
77
155
|
const block = await client.getMasterchainInfo();
|
|
@@ -86,6 +164,21 @@ async function liteClientOpener(options) {
|
|
|
86
164
|
},
|
|
87
165
|
open: (contract) => client.open(contract),
|
|
88
166
|
closeConnections,
|
|
167
|
+
getTransactionByHash: async (addr, hash, opts) => {
|
|
168
|
+
const tx = await findTransactionByHash(addr, hash, getTransactions, opts);
|
|
169
|
+
return tx;
|
|
170
|
+
},
|
|
171
|
+
getAdjacentTransactions: async (addr, hash, opts) => getAdjacentTransactionsHelper(addr, hash, getTransactions, opts),
|
|
172
|
+
getAddressInformation: async (addr) => {
|
|
173
|
+
const block = await client.getMasterchainInfo();
|
|
174
|
+
const state = await client.getAccountState(addr, block.last);
|
|
175
|
+
return {
|
|
176
|
+
lastTransaction: {
|
|
177
|
+
lt: state.lastTx?.lt.toString() ?? '',
|
|
178
|
+
hash: Buffer.from(state.lastTx?.hash.toString(16) ?? '', 'hex').toString('base64'),
|
|
179
|
+
},
|
|
180
|
+
};
|
|
181
|
+
},
|
|
89
182
|
};
|
|
90
183
|
}
|
|
91
184
|
function sandboxOpener(blockchain) {
|
|
@@ -99,15 +192,47 @@ function sandboxOpener(blockchain) {
|
|
|
99
192
|
state: state.state.type === 'uninit' ? 'uninitialized' : state.state.type,
|
|
100
193
|
};
|
|
101
194
|
},
|
|
195
|
+
getTransactionByHash: () => {
|
|
196
|
+
throw new Error('Not implemented.');
|
|
197
|
+
},
|
|
198
|
+
getAdjacentTransactions() {
|
|
199
|
+
throw new Error('Not implemented.');
|
|
200
|
+
},
|
|
201
|
+
getAddressInformation: async () => {
|
|
202
|
+
throw new Error('Not implemented.');
|
|
203
|
+
},
|
|
102
204
|
};
|
|
103
205
|
}
|
|
104
206
|
async function orbsOpener(network) {
|
|
105
207
|
const endpoint = await getHttpEndpointWithRetry(network);
|
|
106
|
-
|
|
208
|
+
const client = new ton_1.TonClient({ endpoint });
|
|
209
|
+
return {
|
|
210
|
+
open: client.open,
|
|
211
|
+
getContractState: client.getContractState,
|
|
212
|
+
getTransactionByHash: async (addr, hash, opts) => {
|
|
213
|
+
const tx = await findTransactionByHash(addr, hash, client.getTransactions, opts);
|
|
214
|
+
return tx;
|
|
215
|
+
},
|
|
216
|
+
getAdjacentTransactions: async (addr, hash, opts) => getAdjacentTransactionsHelper(addr, hash, client.getTransactions, opts),
|
|
217
|
+
getAddressInformation: async (addr) => {
|
|
218
|
+
const state = await client.getContractState(addr);
|
|
219
|
+
return {
|
|
220
|
+
lastTransaction: {
|
|
221
|
+
lt: state.lastTransaction?.lt ?? '',
|
|
222
|
+
hash: state.lastTransaction?.hash ?? '',
|
|
223
|
+
},
|
|
224
|
+
};
|
|
225
|
+
},
|
|
226
|
+
};
|
|
107
227
|
}
|
|
108
228
|
async function orbsOpener4(network, timeout = 10000) {
|
|
109
229
|
const endpoint = await getHttpV4EndpointWithRetry(network);
|
|
110
230
|
const client4 = new ton_1.TonClient4({ endpoint, timeout });
|
|
231
|
+
const getTransactions = async (address, opts) => {
|
|
232
|
+
return client4
|
|
233
|
+
.getAccountTransactions(address, opts.lt ? BigInt(opts.lt) : 0n, opts.hash ? Buffer.from(opts.hash, 'base64') : Buffer.alloc(0))
|
|
234
|
+
.then((res) => res.map((t) => t.tx));
|
|
235
|
+
};
|
|
111
236
|
return {
|
|
112
237
|
open: (contract) => client4.open(contract),
|
|
113
238
|
getContractState: async (address) => {
|
|
@@ -122,5 +247,44 @@ async function orbsOpener4(network, timeout = 10000) {
|
|
|
122
247
|
state: state.account.state.type === 'uninit' ? 'uninitialized' : state.account.state.type,
|
|
123
248
|
};
|
|
124
249
|
},
|
|
250
|
+
getTransactionByHash: async (addr, hash, opts) => {
|
|
251
|
+
const tx = await findTransactionByHash(addr, hash, getTransactions, opts);
|
|
252
|
+
return tx;
|
|
253
|
+
},
|
|
254
|
+
getAdjacentTransactions: async (addr, hash, opts) => getAdjacentTransactionsHelper(addr, hash, getTransactions, opts),
|
|
255
|
+
getAddressInformation: async (addr) => {
|
|
256
|
+
const latestBlock = await client4.getLastBlock();
|
|
257
|
+
const latestBlockNumber = latestBlock.last.seqno;
|
|
258
|
+
const state = await client4.getAccount(latestBlockNumber, addr);
|
|
259
|
+
return {
|
|
260
|
+
lastTransaction: {
|
|
261
|
+
lt: state.account.last?.lt ?? '',
|
|
262
|
+
hash: state.account.last?.hash ?? '',
|
|
263
|
+
},
|
|
264
|
+
};
|
|
265
|
+
},
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
function tonClientOpener(endpoint) {
|
|
269
|
+
const client = new ton_1.TonClient({
|
|
270
|
+
endpoint,
|
|
271
|
+
});
|
|
272
|
+
return {
|
|
273
|
+
open: client.open.bind(client),
|
|
274
|
+
getContractState: client.getContractState.bind(client),
|
|
275
|
+
getTransactionByHash: async (addr, hash, opts) => {
|
|
276
|
+
const tx = await findTransactionByHash(addr, hash, client.getTransactions.bind(client), opts);
|
|
277
|
+
return tx;
|
|
278
|
+
},
|
|
279
|
+
getAdjacentTransactions: async (addr, hash, opts) => getAdjacentTransactionsHelper(addr, hash, client.getTransactions.bind(client), opts),
|
|
280
|
+
getAddressInformation: async (addr) => {
|
|
281
|
+
const state = await client.getContractState(addr);
|
|
282
|
+
return {
|
|
283
|
+
lastTransaction: {
|
|
284
|
+
lt: state.lastTransaction?.lt ?? '',
|
|
285
|
+
hash: state.lastTransaction?.hash ?? '',
|
|
286
|
+
},
|
|
287
|
+
};
|
|
288
|
+
},
|
|
125
289
|
};
|
|
126
290
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { SandboxContract } from '@ton/sandbox';
|
|
2
|
-
import { Address, Contract, OpenedContract } from '@ton/ton';
|
|
2
|
+
import { Address, Contract, OpenedContract, Transaction } from '@ton/ton';
|
|
3
3
|
import { ContractOpener } from '../interfaces';
|
|
4
|
+
import { AddressInformation, GetTransactionsOptions } from '../structs/InternalStruct';
|
|
4
5
|
import { ContractState, Network } from '../structs/Struct';
|
|
5
6
|
export interface OpenerConfig {
|
|
6
7
|
/** Underlying opener implementation to use for this slot. */
|
|
@@ -13,8 +14,11 @@ export interface OpenerConfig {
|
|
|
13
14
|
export declare class RetryableContractOpener implements ContractOpener {
|
|
14
15
|
private readonly openerConfigs;
|
|
15
16
|
constructor(openerConfigs: OpenerConfig[]);
|
|
17
|
+
getTransactionByHash(address: Address, hash: string, opts: GetTransactionsOptions): Promise<Transaction | null>;
|
|
18
|
+
getAdjacentTransactions(address: Address, hash: string): Promise<Transaction[]>;
|
|
16
19
|
open<T extends Contract>(src: T): OpenedContract<T> | SandboxContract<T>;
|
|
17
20
|
getContractState(address: Address): Promise<ContractState>;
|
|
21
|
+
getAddressInformation(address: Address): Promise<AddressInformation>;
|
|
18
22
|
closeConnections(): void;
|
|
19
23
|
private executeWithFallback;
|
|
20
24
|
private tryWithRetries;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.RetryableContractOpener = void 0;
|
|
4
4
|
exports.createDefaultRetryableOpener = createDefaultRetryableOpener;
|
|
5
|
-
const ton_1 = require("@ton/ton");
|
|
6
5
|
const instances_1 = require("../errors/instances");
|
|
7
6
|
const Struct_1 = require("../structs/Struct");
|
|
8
7
|
const contractOpener_1 = require("./contractOpener");
|
|
@@ -14,6 +13,20 @@ class RetryableContractOpener {
|
|
|
14
13
|
}
|
|
15
14
|
this.openerConfigs = openerConfigs;
|
|
16
15
|
}
|
|
16
|
+
async getTransactionByHash(address, hash, opts) {
|
|
17
|
+
const result = await this.executeWithFallback((config) => config.opener.getTransactionByHash(address, hash, opts));
|
|
18
|
+
if (result.success && result.data) {
|
|
19
|
+
return result.data;
|
|
20
|
+
}
|
|
21
|
+
throw result.lastError || (0, instances_1.allContractOpenerFailedError)('Failed to get transaction by hash');
|
|
22
|
+
}
|
|
23
|
+
async getAdjacentTransactions(address, hash) {
|
|
24
|
+
const result = await this.executeWithFallback((config) => config.opener.getAdjacentTransactions(address, hash));
|
|
25
|
+
if (result.success && result.data) {
|
|
26
|
+
return result.data;
|
|
27
|
+
}
|
|
28
|
+
throw result.lastError || (0, instances_1.allContractOpenerFailedError)('Failed to get account transactions');
|
|
29
|
+
}
|
|
17
30
|
open(src) {
|
|
18
31
|
const firstConfig = this.openerConfigs[0];
|
|
19
32
|
const contract = firstConfig.opener.open(src);
|
|
@@ -26,6 +39,13 @@ class RetryableContractOpener {
|
|
|
26
39
|
}
|
|
27
40
|
throw result.lastError || (0, instances_1.allContractOpenerFailedError)('Failed to get contract state');
|
|
28
41
|
}
|
|
42
|
+
async getAddressInformation(address) {
|
|
43
|
+
const result = await this.executeWithFallback((config) => config.opener.getAddressInformation(address));
|
|
44
|
+
if (result.success && result.data) {
|
|
45
|
+
return result.data;
|
|
46
|
+
}
|
|
47
|
+
throw result.lastError || (0, instances_1.allContractOpenerFailedError)('Failed to get address information');
|
|
48
|
+
}
|
|
29
49
|
closeConnections() {
|
|
30
50
|
for (const config of this.openerConfigs) {
|
|
31
51
|
config.opener.closeConnections?.();
|
|
@@ -87,9 +107,7 @@ class RetryableContractOpener {
|
|
|
87
107
|
exports.RetryableContractOpener = RetryableContractOpener;
|
|
88
108
|
async function createDefaultRetryableOpener(tonRpcEndpoint, networkType, maxRetries = 5, retryDelay = 1000) {
|
|
89
109
|
const openers = [];
|
|
90
|
-
const tonClient = new
|
|
91
|
-
endpoint: new URL('api/v2/jsonRPC', tonRpcEndpoint).toString(),
|
|
92
|
-
});
|
|
110
|
+
const tonClient = (0, contractOpener_1.tonClientOpener)(new URL('api/v2/jsonRPC', tonRpcEndpoint).toString());
|
|
93
111
|
openers.push({ opener: tonClient, retries: maxRetries, retryDelay });
|
|
94
112
|
if (networkType !== Struct_1.Network.DEV) {
|
|
95
113
|
try {
|