@tonappchain/sdk 0.7.2-alpha-4 → 0.7.2-alpha-5
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.js +42 -4
- package/dist/src/adapters/retryableContractOpener.d.ts +2 -1
- package/dist/src/adapters/retryableContractOpener.js +7 -0
- package/dist/src/errors/instances.d.ts +1 -0
- package/dist/src/errors/instances.js +3 -1
- package/dist/src/interfaces/ContractOpener.d.ts +2 -1
- package/dist/src/interfaces/ILiteSequencerClient.d.ts +6 -1
- package/dist/src/interfaces/IOperationTracker.d.ts +6 -1
- package/dist/src/interfaces/ISimulator.d.ts +0 -6
- package/dist/src/interfaces/ITxFinalizer.d.ts +1 -1
- package/dist/src/sdk/Configuration.d.ts +1 -0
- package/dist/src/sdk/Configuration.js +68 -0
- package/dist/src/sdk/Consts.d.ts +6 -48
- package/dist/src/sdk/Consts.js +8 -50
- package/dist/src/sdk/Fees.d.ts +75 -0
- package/dist/src/sdk/Fees.js +198 -0
- package/dist/src/sdk/LiteSequencerClient.d.ts +2 -1
- package/dist/src/sdk/LiteSequencerClient.js +11 -0
- package/dist/src/sdk/OperationTracker.d.ts +2 -1
- package/dist/src/sdk/OperationTracker.js +20 -0
- package/dist/src/sdk/Simulator.d.ts +0 -1
- package/dist/src/sdk/Simulator.js +28 -118
- package/dist/src/sdk/StartTracking.js +1 -1
- package/dist/src/sdk/TONTransactionManager.js +1 -1
- package/dist/src/sdk/TacSdk.d.ts +5 -0
- package/dist/src/sdk/TacSdk.js +8 -0
- package/dist/src/sdk/TxFinalizer.d.ts +1 -1
- package/dist/src/sdk/TxFinalizer.js +7 -6
- package/dist/src/sdk/Utils.js +3 -3
- package/dist/src/structs/InternalStruct.d.ts +11 -13
- package/dist/src/structs/Struct.d.ts +7 -0
- package/package.json +1 -1
|
@@ -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();
|
|
@@ -10,6 +10,7 @@ const ton_access_1 = require("@orbs-network/ton-access");
|
|
|
10
10
|
const ton_1 = require("@ton/ton");
|
|
11
11
|
const ton_lite_client_1 = require("@tonappchain/ton-lite-client");
|
|
12
12
|
const artifacts_1 = require("../../artifacts");
|
|
13
|
+
const Consts_1 = require("../sdk/Consts");
|
|
13
14
|
const Utils_1 = require("../sdk/Utils");
|
|
14
15
|
const Struct_1 = require("../structs/Struct");
|
|
15
16
|
async function getHttpEndpointWithRetry(network, maxRetries = 5, delay = 1000) {
|
|
@@ -45,14 +46,14 @@ async function getHttpV4EndpointWithRetry(network, maxRetries = 5, delay = 1000)
|
|
|
45
46
|
throw lastError || new Error('Failed to get HTTP V4 endpoint after retries');
|
|
46
47
|
}
|
|
47
48
|
async function findTransactionByHash(addr, targetHashB64, getTransactions, opts) {
|
|
48
|
-
const timeoutMs = opts?.timeoutMs ??
|
|
49
|
-
const retryDelayMs = opts?.retryDelayMs ??
|
|
49
|
+
const timeoutMs = opts?.timeoutMs ?? Consts_1.DEFAULT_FIND_TX_TIMEOUT_MS; // 60 seconds default
|
|
50
|
+
const retryDelayMs = opts?.retryDelayMs ?? Consts_1.DEFAULT_FIND_TX_RETRY_DELAY_MS; // 2 seconds between retries
|
|
50
51
|
const deadline = Date.now() + timeoutMs;
|
|
51
|
-
const limit = opts?.limit ??
|
|
52
|
+
const limit = opts?.limit ?? Consts_1.DEFAULT_FIND_TX_LIMIT;
|
|
52
53
|
while (Date.now() < deadline) {
|
|
53
54
|
const batch = await getTransactions(addr, {
|
|
54
55
|
limit,
|
|
55
|
-
archival: opts?.archival ??
|
|
56
|
+
archival: opts?.archival ?? Consts_1.DEFAULT_FIND_TX_ARCHIVAL,
|
|
56
57
|
});
|
|
57
58
|
// Check each transaction in the current batch
|
|
58
59
|
for (const tx of batch) {
|
|
@@ -179,6 +180,11 @@ async function liteClientOpener(options) {
|
|
|
179
180
|
},
|
|
180
181
|
};
|
|
181
182
|
},
|
|
183
|
+
getConfig: async () => {
|
|
184
|
+
const block = await client.getMasterchainInfo();
|
|
185
|
+
const { config } = await client.getConfig(block.last);
|
|
186
|
+
return config;
|
|
187
|
+
},
|
|
182
188
|
};
|
|
183
189
|
}
|
|
184
190
|
function sandboxOpener(blockchain) {
|
|
@@ -201,6 +207,9 @@ function sandboxOpener(blockchain) {
|
|
|
201
207
|
getAddressInformation: async () => {
|
|
202
208
|
throw new Error('Not implemented.');
|
|
203
209
|
},
|
|
210
|
+
getConfig: async () => {
|
|
211
|
+
return blockchain.config.beginParse().loadDictDirect(ton_1.Dictionary.Keys.Int(32), ton_1.Dictionary.Values.Cell());
|
|
212
|
+
},
|
|
204
213
|
};
|
|
205
214
|
}
|
|
206
215
|
async function orbsOpener(network) {
|
|
@@ -223,6 +232,17 @@ async function orbsOpener(network) {
|
|
|
223
232
|
},
|
|
224
233
|
};
|
|
225
234
|
},
|
|
235
|
+
getConfig: async () => {
|
|
236
|
+
const info = await client.getMasterchainInfo();
|
|
237
|
+
// TonClient class does not have methods to get config
|
|
238
|
+
const url = new URL('getConfigAll', endpoint);
|
|
239
|
+
url.searchParams.append('seqno', info.latestSeqno.toString());
|
|
240
|
+
const result = await fetch(url);
|
|
241
|
+
const body = await result.json();
|
|
242
|
+
return ton_1.Cell.fromBase64(body.result.config.bytes)
|
|
243
|
+
.beginParse()
|
|
244
|
+
.loadDictDirect(ton_1.Dictionary.Keys.Int(32), ton_1.Dictionary.Values.Cell());
|
|
245
|
+
},
|
|
226
246
|
};
|
|
227
247
|
}
|
|
228
248
|
async function orbsOpener4(network, timeout = 10000) {
|
|
@@ -263,6 +283,13 @@ async function orbsOpener4(network, timeout = 10000) {
|
|
|
263
283
|
},
|
|
264
284
|
};
|
|
265
285
|
},
|
|
286
|
+
getConfig: async () => {
|
|
287
|
+
const block = await client4.getLastBlock();
|
|
288
|
+
const { config } = await client4.getConfig(block.last.seqno);
|
|
289
|
+
return ton_1.Cell.fromBase64(config.cell)
|
|
290
|
+
.beginParse()
|
|
291
|
+
.loadDictDirect(ton_1.Dictionary.Keys.Int(32), ton_1.Dictionary.Values.Cell());
|
|
292
|
+
},
|
|
266
293
|
};
|
|
267
294
|
}
|
|
268
295
|
function tonClientOpener(client) {
|
|
@@ -283,5 +310,16 @@ function tonClientOpener(client) {
|
|
|
283
310
|
},
|
|
284
311
|
};
|
|
285
312
|
},
|
|
313
|
+
getConfig: async () => {
|
|
314
|
+
const info = await client.getMasterchainInfo();
|
|
315
|
+
// TonClient class does not have methods to get config
|
|
316
|
+
const url = new URL('getConfigAll', client.parameters.endpoint);
|
|
317
|
+
url.searchParams.append('seqno', info.latestSeqno.toString());
|
|
318
|
+
const result = await fetch(url);
|
|
319
|
+
const body = await result.json();
|
|
320
|
+
return ton_1.Cell.fromBase64(body.result.config.bytes)
|
|
321
|
+
.beginParse()
|
|
322
|
+
.loadDictDirect(ton_1.Dictionary.Keys.Int(32), ton_1.Dictionary.Values.Cell());
|
|
323
|
+
},
|
|
286
324
|
};
|
|
287
325
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SandboxContract } from '@ton/sandbox';
|
|
2
|
-
import { Address, Contract, OpenedContract, Transaction } from '@ton/ton';
|
|
2
|
+
import { Address, Cell, Contract, Dictionary, OpenedContract, Transaction } from '@ton/ton';
|
|
3
3
|
import { ContractOpener } from '../interfaces';
|
|
4
4
|
import { AddressInformation, GetTransactionsOptions } from '../structs/InternalStruct';
|
|
5
5
|
import { ContractState, Network } from '../structs/Struct';
|
|
@@ -19,6 +19,7 @@ export declare class RetryableContractOpener implements ContractOpener {
|
|
|
19
19
|
open<T extends Contract>(src: T): OpenedContract<T> | SandboxContract<T>;
|
|
20
20
|
getContractState(address: Address): Promise<ContractState>;
|
|
21
21
|
getAddressInformation(address: Address): Promise<AddressInformation>;
|
|
22
|
+
getConfig(): Promise<Dictionary<number, Cell>>;
|
|
22
23
|
closeConnections(): void;
|
|
23
24
|
private executeWithFallback;
|
|
24
25
|
private tryWithRetries;
|
|
@@ -47,6 +47,13 @@ class RetryableContractOpener {
|
|
|
47
47
|
}
|
|
48
48
|
throw result.lastError || (0, instances_1.allContractOpenerFailedError)('Failed to get address information');
|
|
49
49
|
}
|
|
50
|
+
async getConfig() {
|
|
51
|
+
const result = await this.executeWithFallback((config) => config.opener.getConfig());
|
|
52
|
+
if (result.success && result.data) {
|
|
53
|
+
return result.data;
|
|
54
|
+
}
|
|
55
|
+
throw result.lastError || (0, instances_1.allContractOpenerFailedError)('Failed to get blockchain config');
|
|
56
|
+
}
|
|
50
57
|
closeConnections() {
|
|
51
58
|
for (const config of this.openerConfigs) {
|
|
52
59
|
config.opener.closeConnections?.();
|
|
@@ -34,3 +34,4 @@ export declare const zeroRawAmountError: (assetAddress: string) => TokenError;
|
|
|
34
34
|
export declare const sendCrossChainTransactionFailedError: (msg: string) => WalletError;
|
|
35
35
|
export declare const convertCurrencyNegativeOrZeroValueError: FormatError;
|
|
36
36
|
export declare const unknownAssetOriginError: (origin: Origin) => TokenError;
|
|
37
|
+
export declare const gasPriceFetchError: (msg: string, inner?: unknown) => FetchError;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.unknownAssetOriginError = exports.convertCurrencyNegativeOrZeroValueError = exports.sendCrossChainTransactionFailedError = exports.zeroRawAmountError = exports.missingJettonDataError = exports.missingDecimals = exports.missingGasLimitError = exports.missingTvmExecutorFeeError = exports.missingFeeParamsError = exports.getTONFeeInfoFetchError = exports.simulationFetchError = exports.convertCurrencyFetchError = exports.indexRequiredError = exports.unknownTokenTypeError = exports.insufficientBalanceError = exports.allContractOpenerFailedError = exports.allEndpointsFailedError = exports.noValidGroupFoundError = exports.prepareMessageGroupError = exports.invalidAssetType = exports.emptyArrayError = exports.profilingFetchError = exports.invalidMethodNameError = exports.emptySettingError = exports.prefixError = exports.notMultiplyOf8Error = exports.unsupportedFormatError = exports.unsupportedKeyError = exports.unknownWalletError = exports.evmAddressError = exports.tvmAddressError = exports.statusFetchError = exports.operationFetchError = exports.emptyContractError = void 0;
|
|
3
|
+
exports.gasPriceFetchError = exports.unknownAssetOriginError = exports.convertCurrencyNegativeOrZeroValueError = exports.sendCrossChainTransactionFailedError = exports.zeroRawAmountError = exports.missingJettonDataError = exports.missingDecimals = exports.missingGasLimitError = exports.missingTvmExecutorFeeError = exports.missingFeeParamsError = exports.getTONFeeInfoFetchError = exports.simulationFetchError = exports.convertCurrencyFetchError = exports.indexRequiredError = exports.unknownTokenTypeError = exports.insufficientBalanceError = exports.allContractOpenerFailedError = exports.allEndpointsFailedError = exports.noValidGroupFoundError = exports.prepareMessageGroupError = exports.invalidAssetType = exports.emptyArrayError = exports.profilingFetchError = exports.invalidMethodNameError = exports.emptySettingError = exports.prefixError = exports.notMultiplyOf8Error = exports.unsupportedFormatError = exports.unsupportedKeyError = exports.unknownWalletError = exports.evmAddressError = exports.tvmAddressError = exports.statusFetchError = exports.operationFetchError = exports.emptyContractError = void 0;
|
|
4
4
|
const errors_1 = require("./errors");
|
|
5
5
|
exports.emptyContractError = new errors_1.ContractError('unexpected empty contract code of given jetton.', 100);
|
|
6
6
|
const operationFetchError = (msg, inner) => new errors_1.FetchError(`failed to fetch OperationId: ${msg}`, 101, inner);
|
|
@@ -58,3 +58,5 @@ exports.sendCrossChainTransactionFailedError = sendCrossChainTransactionFailedEr
|
|
|
58
58
|
exports.convertCurrencyNegativeOrZeroValueError = new errors_1.FormatError('Value cannot be negative or zero for currency conversion', 132);
|
|
59
59
|
const unknownAssetOriginError = (origin) => new errors_1.TokenError(`Unknown asset origin: ${origin}`, 133);
|
|
60
60
|
exports.unknownAssetOriginError = unknownAssetOriginError;
|
|
61
|
+
const gasPriceFetchError = (msg, inner) => new errors_1.FetchError(`failed to fetch gas price: ${msg}`, 134, inner);
|
|
62
|
+
exports.gasPriceFetchError = gasPriceFetchError;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SandboxContract } from '@ton/sandbox';
|
|
2
|
-
import type { Address, Contract, OpenedContract, Transaction } from '@ton/ton';
|
|
2
|
+
import type { Address, Cell, Contract, Dictionary, OpenedContract, Transaction } from '@ton/ton';
|
|
3
3
|
import { AddressInformation, GetTransactionsOptions } from '../structs/InternalStruct';
|
|
4
4
|
import { ContractState } from '../structs/Struct';
|
|
5
5
|
export interface ContractOpener {
|
|
@@ -22,4 +22,5 @@ export interface ContractOpener {
|
|
|
22
22
|
getTransactionByHash(address: Address, hash: string, opts?: GetTransactionsOptions): Promise<Transaction | null>;
|
|
23
23
|
getAdjacentTransactions(address: Address, hash: string, opts?: GetTransactionsOptions): Promise<Transaction[]>;
|
|
24
24
|
getAddressInformation(address: Address): Promise<AddressInformation>;
|
|
25
|
+
getConfig(): Promise<Dictionary<number, Cell>>;
|
|
25
26
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ConvertCurrencyParams, ConvertedCurrencyResult, ExecutionStagesByOperationId, GetTVMExecutorFeeParams, OperationIdsByShardsKey, OperationType, StatusInfosByOperationId, SuggestedTVMExecutorFee, TACSimulationParams, TACSimulationResult, TransactionLinker } from '../structs/Struct';
|
|
1
|
+
import { ConvertCurrencyParams, ConvertedCurrencyResult, ExecutionStagesByOperationId, GetTVMExecutorFeeParams, OperationIdsByShardsKey, OperationType, StatusInfosByOperationId, SuggestedTVMExecutorFee, TacGasPriceResponse, TACSimulationParams, TACSimulationResult, TransactionLinker } from '../structs/Struct';
|
|
2
2
|
export interface ILiteSequencerClient {
|
|
3
3
|
/** Retrieves the operation type by id. */
|
|
4
4
|
getOperationType(operationId: string): Promise<OperationType>;
|
|
@@ -40,4 +40,9 @@ export interface ILiteSequencerClient {
|
|
|
40
40
|
* @returns Promise resolving to detailed simulation result.
|
|
41
41
|
*/
|
|
42
42
|
simulateTACMessage(params: TACSimulationParams): Promise<TACSimulationResult>;
|
|
43
|
+
/**
|
|
44
|
+
* Gets TAC gas price.
|
|
45
|
+
* @returns Promise resolving to TAC gas price.
|
|
46
|
+
*/
|
|
47
|
+
getTACGasPrice(): Promise<TacGasPriceResponse>;
|
|
43
48
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ConvertCurrencyParams, ConvertedCurrencyResult, ExecutionStages, ExecutionStagesByOperationId, GetTVMExecutorFeeParams, OperationIdsByShardsKey, OperationType, SimplifiedStatuses, StatusInfo, StatusInfosByOperationId, SuggestedTVMExecutorFee, TACSimulationParams, TACSimulationResult, TransactionLinker, WaitOptions } from '../structs/Struct';
|
|
1
|
+
import { ConvertCurrencyParams, ConvertedCurrencyResult, ExecutionStages, ExecutionStagesByOperationId, GetTVMExecutorFeeParams, OperationIdsByShardsKey, OperationType, SimplifiedStatuses, StatusInfo, StatusInfosByOperationId, SuggestedTVMExecutorFee, TacGasPriceResponse, TACSimulationParams, TACSimulationResult, TransactionLinker, WaitOptions } from '../structs/Struct';
|
|
2
2
|
export interface IOperationTracker {
|
|
3
3
|
/**
|
|
4
4
|
* Returns the operation type for the given id, optionally waiting according to the provided policy.
|
|
@@ -78,4 +78,9 @@ export interface IOperationTracker {
|
|
|
78
78
|
* @returns Promise with suggested fee information.
|
|
79
79
|
*/
|
|
80
80
|
getTVMExecutorFee(params: GetTVMExecutorFeeParams, waitOptions?: WaitOptions<SuggestedTVMExecutorFee>): Promise<SuggestedTVMExecutorFee>;
|
|
81
|
+
/**
|
|
82
|
+
* Gets TAC gas price.
|
|
83
|
+
* @returns Promise resolving to TAC gas price.
|
|
84
|
+
*/
|
|
85
|
+
getTACGasPrice(): Promise<TacGasPriceResponse>;
|
|
81
86
|
}
|
|
@@ -16,12 +16,6 @@ export interface ISimulator {
|
|
|
16
16
|
* @returns Promise with fee estimation and execution info.
|
|
17
17
|
*/
|
|
18
18
|
getSimulationInfo(sender: SenderAbstraction, tx: CrosschainTx): Promise<ExecutionFeeEstimationResult>;
|
|
19
|
-
/**
|
|
20
|
-
* Estimates the total TON network fees required for a cross-chain transaction.
|
|
21
|
-
* @param assets Assets to be included in the transaction.
|
|
22
|
-
* @returns The total estimated fee in nanotons (1 TON = 10^9 nanotons) for processing all provided assets.
|
|
23
|
-
*/
|
|
24
|
-
estimateTONFees(assets: Asset[], params: GeneratePayloadParams): bigint;
|
|
25
19
|
/**
|
|
26
20
|
* Estimates the TON network fee required for a single asset.
|
|
27
21
|
* @param asset Asset to be included in the transaction.
|