@layerzerolabs/layerzero-v2-ton 3.0.112-aptos.0 → 3.0.112

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.
Files changed (114) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/build/AllStorages.compiled.json +1 -1
  3. package/build/BaseContract.test.compiled.json +1 -1
  4. package/build/Channel.permissions.test.compiled.json +1 -1
  5. package/build/ChannelBurn.test.compiled.json +1 -1
  6. package/build/ChannelBurnDefaultConfig.test.compiled.json +1 -1
  7. package/build/ChannelCommitPacket.test.compiled.json +1 -1
  8. package/build/ChannelConfig.test.compiled.json +1 -1
  9. package/build/ChannelInitialize.test.compiled.json +1 -1
  10. package/build/ChannelMsglibIntegration.test.compiled.json +1 -1
  11. package/build/ChannelMsglibSendCallback.test.compiled.json +1 -1
  12. package/build/ChannelNilify.test.compiled.json +1 -1
  13. package/build/ChannelNilifyDefaultConfig.test.compiled.json +1 -1
  14. package/build/ChannelReceive.test.compiled.json +1 -1
  15. package/build/ChannelReceiveCallback.test.compiled.json +1 -1
  16. package/build/ChannelReceiveView.test.compiled.json +1 -1
  17. package/build/ChannelSend.test.compiled.json +1 -1
  18. package/build/ChannelSerde.test.compiled.json +1 -1
  19. package/build/Classlib.test.compiled.json +1 -1
  20. package/build/Connection.compiled.json +1 -1
  21. package/build/Controller.assertions.test.compiled.json +1 -1
  22. package/build/Controller.permissions.test.compiled.json +1 -1
  23. package/build/Controller.test.compiled.json +1 -1
  24. package/build/Counter.compiled.json +1 -1
  25. package/build/Counter.permissions.test.compiled.json +1 -1
  26. package/build/Counter.setters.test.compiled.json +1 -1
  27. package/build/Counter.test.compiled.json +1 -1
  28. package/build/Dvn.compiled.json +1 -1
  29. package/build/Dvn.test.compiled.json +1 -1
  30. package/build/DvnFeeLibSerde.test.compiled.json +1 -1
  31. package/build/DvnPermissions.test.compiled.json +1 -1
  32. package/build/DvnSerde.test.compiled.json +1 -1
  33. package/build/Endpoint.permissions.test.compiled.json +1 -1
  34. package/build/Endpoint.test.compiled.json +1 -1
  35. package/build/EndpointSerde.test.compiled.json +1 -1
  36. package/build/EndpointSetEpConfigDefaults.test.compiled.json +1 -1
  37. package/build/Executor.compiled.json +1 -1
  38. package/build/Executor.test.compiled.json +1 -1
  39. package/build/ExecutorFeeLibSerde.test.compiled.json +1 -1
  40. package/build/ExecutorPermissions.test.compiled.json +1 -1
  41. package/build/ExecutorSerde.test.compiled.json +1 -1
  42. package/build/LzClasses.test.compiled.json +1 -1
  43. package/build/LzClassesSerde.test.compiled.json +1 -1
  44. package/build/LzUtil.test.compiled.json +1 -1
  45. package/build/MsgData.test.compiled.json +1 -1
  46. package/build/MsgDataSerde.test.compiled.json +1 -1
  47. package/build/MsglibPacketCodec.test.compiled.json +1 -1
  48. package/build/PipelinedOutOfOrderSerde.test.compiled.json +1 -1
  49. package/build/PriceFeedCache.compiled.json +1 -1
  50. package/build/PriceFeedCache.test.compiled.json +1 -1
  51. package/build/PriceFeedCache.test.permissions.compiled.json +1 -1
  52. package/build/PriceFeedCacheSerde.test.compiled.json +1 -1
  53. package/build/PriceFeedFeeLibArbitrum.test.compiled.json +1 -1
  54. package/build/PriceFeedFeeLibDefault.test.compiled.json +1 -1
  55. package/build/PriceFeedFeeLibOptimism.test.compiled.json +1 -1
  56. package/build/PriceFeedFeeLibSerde.test.compiled.json +1 -1
  57. package/build/Proxy.compiled.json +1 -1
  58. package/build/Proxy.permissions.test.compiled.json +1 -1
  59. package/build/Proxy.test.compiled.json +1 -1
  60. package/build/Router.compiled.json +1 -0
  61. package/build/SmlConnection.permissions.test.compiled.json +1 -1
  62. package/build/SmlConnection.test.compiled.json +1 -1
  63. package/build/SmlManager.compiled.json +1 -1
  64. package/build/SmlManager.permissions.test.compiled.json +1 -1
  65. package/build/SmlManager.test.compiled.json +1 -1
  66. package/build/TxnContext.test.compiled.json +1 -1
  67. package/build/Uln.compiled.json +1 -1
  68. package/build/Uln.test.compiled.json +1 -1
  69. package/build/UlnConnection.compiled.json +1 -1
  70. package/build/UlnConnection.test.compiled.json +1 -1
  71. package/build/UlnConnectionPermissions.test.compiled.json +1 -1
  72. package/build/UlnConnectionSerde.test.compiled.json +1 -1
  73. package/build/UlnManagement.test.compiled.json +1 -1
  74. package/build/UlnManager.compiled.json +1 -1
  75. package/build/UlnManager.test.compiled.json +1 -1
  76. package/build/UlnManagerPermissions.test.compiled.json +1 -1
  77. package/build/UlnManagerUtil.test.compiled.json +1 -1
  78. package/build/UlnMsgDataSerde.test.compiled.json +1 -1
  79. package/build/UlnPermissions.test.compiled.json +1 -1
  80. package/build/UlnReceiveConfig.test.compiled.json +1 -1
  81. package/build/UlnSend.test.compiled.json +1 -1
  82. package/build/UlnSendConfig.test.compiled.json +1 -1
  83. package/build/UlnSendWithArbDvnFeeLib.test.compiled.json +1 -1
  84. package/build/UlnSendWithArbExecFeeLib.test.compiled.json +1 -1
  85. package/build/UlnSendWithDefaultDvnFeeLib.test.compiled.json +1 -1
  86. package/build/UlnSendWithDefaultExecFeeLib.test.compiled.json +1 -1
  87. package/build/UlnSendWithOpDvnFeeLib.test.compiled.json +1 -1
  88. package/build/UlnSendWithOpExecFeeLib.test.compiled.json +1 -1
  89. package/build/UlnSendWorkerFactory.test.compiled.json +1 -1
  90. package/build/UlnSerde.test.compiled.json +1 -1
  91. package/build/UlnUtil.test.compiled.json +1 -1
  92. package/build/WorkerCore.test.compiled.json +1 -1
  93. package/build/WorkerCoreMsgDataSerde.test.compiled.json +1 -1
  94. package/build/WorkerCoreSerde.test.compiled.json +1 -1
  95. package/build/badFeeLib1.test.compiled.json +1 -1
  96. package/build/badFeeLib10.test.compiled.json +1 -1
  97. package/build/badFeeLib11.test.compiled.json +1 -1
  98. package/build/badFeeLib12.test.compiled.json +1 -1
  99. package/build/badFeeLib2.test.compiled.json +1 -1
  100. package/build/badFeeLib3.test.compiled.json +1 -1
  101. package/build/badFeeLib4.test.compiled.json +1 -1
  102. package/build/badFeeLib5.test.compiled.json +1 -1
  103. package/build/badFeeLib6.test.compiled.json +1 -1
  104. package/build/badFeeLib7.test.compiled.json +1 -1
  105. package/build/badFeeLib8.test.compiled.json +1 -1
  106. package/build/badFeeLib9.test.compiled.json +1 -1
  107. package/package.json +1 -1
  108. package/src/funC++/actions/RawDispatch.fc +1 -1
  109. package/src/funC++/utils-ext.fc +58 -0
  110. package/src/funC++/utils.fc +1 -15
  111. package/src/protocol/msglibs/BytesDecoder.fc +6 -2
  112. package/src/protocol/msglibs/BytesEncoder.fc +8 -0
  113. package/src/protocol/msglibs/ultralightnode/msgdata/UlnReceiveConfig.fc +2 -1
  114. package/src/protocol/msglibs/ultralightnode/uln/handler.fc +4 -2
@@ -108,8 +108,12 @@ cell BytesDecoder::compactRemainder(slice data) impure inline {
108
108
  ;; (amount, receiver)
109
109
  (int, int) BytesDecoder::decode<NativeDropOption>(cell option) impure inline {
110
110
  slice parsingOption = option.begin_parse();
111
- int optionBytes = parsingOption.slice_bits() * 8;
112
- throw_unless(BytesDecoder::ERROR::invalidOptionSize, optionBytes == (32 + 16));
111
+ int optionBits = parsingOption.slice_bits();
112
+ throw_unless(
113
+ BytesDecoder::ERROR::invalidOptionSize,
114
+ ;; 128 + 256 = 384
115
+ (optionBits == 384)
116
+ );
113
117
  return (
114
118
  parsingOption~load_uint128(), ;; amount
115
119
  parsingOption~load_uint256() ;; receiver
@@ -84,6 +84,14 @@ tuple BytesEncoder::feed(tuple self, slice data) impure inline {
84
84
  }
85
85
  }
86
86
 
87
+ ;; Make sure there are no empty cells left at the end of the list
88
+ ;; "self" will never be empty in the ULN usage because we pass on
89
+ ;; other things to it through "BytesEncoder::build<PacketV1>"
90
+ (_, builder last) = self.tpop();
91
+ if (last.builder_bits() == 0) {
92
+ self~tpop();
93
+ }
94
+
87
95
  return self;
88
96
  }
89
97
 
@@ -1,4 +1,5 @@
1
1
  #include "../../../../funC++/classlib.fc";
2
+ #include "../../../../funC++/utils-ext.fc";
2
3
 
3
4
  #include "../../../../funC++/dataStructures/AddressList.fc";
4
5
 
@@ -82,7 +83,7 @@ cell UlnReceiveConfig::New(
82
83
  ;; Important assumption: the gas consumption of the endpoint will not increase past
83
84
  ;; 1 million gas per handler in any future update of the TVM.
84
85
  int UlnReceiveConfig::MaxCommitPacketValueAssertion() impure method_id {
85
- (_, _, _, _, int gasLimit, _, _, _, _) = parseGasLimitsPrices(BASECHAIN);
86
+ (_, _, _, _, int gasLimit, _, _, _, _) = parseGasLimitsPrices_v2(BASECHAIN);
86
87
  gasLimit = max(gasLimit, 1000000);
87
88
 
88
89
  return (
@@ -375,12 +375,14 @@ cell _quoteWorkers(tuple args) impure inline method_id(23432) {
375
375
  ;;; ================PERMISSION FUNCTIONS=====================
376
376
 
377
377
  () _checkPermissions(int op, cell $md) impure inline {
378
- if (op == Uln::OP::ULN_SEND) {
378
+ if (
379
+ (op == Uln::OP::ULN_SEND)
380
+ | (op == Uln::OP::ULN_QUOTE)
381
+ ) {
379
382
  return assertConnection($md);
380
383
  } elseif (
381
384
  (op == Uln::OP::ULN_VERIFY)
382
385
  | (op == Uln::OP::ULN_COMMIT_PACKET)
383
- | (op == Uln::OP::ULN_QUOTE)
384
386
  ) {
385
387
  return ();
386
388
  } elseif (