@layerzerolabs/layerzero-v2-ton 3.0.26 → 3.0.28

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 (202) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/build/ActionsSerde.test.compiled.json +1 -0
  3. package/build/AllStorages.compiled.json +1 -1
  4. package/build/AllStorages.test.compiled.json +1 -1
  5. package/build/BaseContract.test.compiled.json +1 -1
  6. package/build/Channel.compiled.json +1 -1
  7. package/build/Channel.permissions.test.compiled.json +1 -1
  8. package/build/ChannelBurn.test.compiled.json +1 -1
  9. package/build/ChannelCommitPacket.test.compiled.json +1 -1
  10. package/build/ChannelConfig.test.compiled.json +1 -1
  11. package/build/ChannelInitialize.test.compiled.json +1 -1
  12. package/build/ChannelMsglibIntegration.test.compiled.json +1 -1
  13. package/build/ChannelMsglibSendCallback.test.compiled.json +1 -1
  14. package/build/ChannelNilify.test.compiled.json +1 -1
  15. package/build/ChannelReceive.test.compiled.json +1 -1
  16. package/build/ChannelReceiveCallback.test.compiled.json +1 -1
  17. package/build/ChannelReceiveView.test.compiled.json +1 -1
  18. package/build/ChannelSend.test.compiled.json +1 -1
  19. package/build/ChannelSerde.test.compiled.json +1 -0
  20. package/build/Classlib.test.compiled.json +1 -1
  21. package/build/ComputeDataSizeGas.test.compiled.json +1 -1
  22. package/build/Connection.compiled.json +1 -1
  23. package/build/Controller.assertions.test.compiled.json +1 -1
  24. package/build/Controller.compiled.json +1 -1
  25. package/build/Controller.permissions.test.compiled.json +1 -1
  26. package/build/Controller.test.compiled.json +1 -1
  27. package/build/Counter.compiled.json +1 -1
  28. package/build/Counter.permissions.test.compiled.json +1 -1
  29. package/build/Counter.setters.test.compiled.json +1 -1
  30. package/build/Counter.test.compiled.json +1 -1
  31. package/build/Dvn.compiled.json +1 -1
  32. package/build/Dvn.test.compiled.json +1 -1
  33. package/build/DvnFeeLib.compiled.json +1 -1
  34. package/build/DvnFeeLibSerde.test.compiled.json +1 -0
  35. package/build/DvnPermissions.test.compiled.json +1 -1
  36. package/build/DvnSerde.test.compiled.json +1 -0
  37. package/build/Endpoint.compiled.json +1 -1
  38. package/build/Endpoint.permissions.test.compiled.json +1 -1
  39. package/build/Endpoint.test.compiled.json +1 -1
  40. package/build/EndpointSerde.test.compiled.json +1 -0
  41. package/build/EndpointSetEpConfigDefaults.test.compiled.json +1 -1
  42. package/build/Executor.compiled.json +1 -1
  43. package/build/Executor.test.compiled.json +1 -1
  44. package/build/ExecutorFeeLib.compiled.json +1 -1
  45. package/build/ExecutorFeeLibSerde.test.compiled.json +1 -0
  46. package/build/ExecutorPermissions.test.compiled.json +1 -1
  47. package/build/ExecutorSerde.test.compiled.json +1 -0
  48. package/build/LzClasses.test.compiled.json +1 -1
  49. package/build/LzClassesSerde.test.compiled.json +1 -0
  50. package/build/LzUtil.test.compiled.json +1 -1
  51. package/build/MsgData.test.compiled.json +1 -1
  52. package/build/MsgDataSerde.test.compiled.json +1 -0
  53. package/build/MsglibPacketCodec.test.compiled.json +1 -1
  54. package/build/PipelinedOutOfOrder.test.compiled.json +1 -1
  55. package/build/PipelinedOutOfOrderSerde.test.compiled.json +1 -0
  56. package/build/PriceFeedCache.compiled.json +1 -1
  57. package/build/PriceFeedCache.test.compiled.json +1 -1
  58. package/build/PriceFeedCache.test.permissions.compiled.json +1 -1
  59. package/build/PriceFeedCacheSerde.test.compiled.json +1 -0
  60. package/build/PriceFeedFeeLibSerde.test.compiled.json +1 -0
  61. package/build/Proxy.compiled.json +1 -1
  62. package/build/Proxy.permissions.test.compiled.json +1 -1
  63. package/build/Proxy.test.compiled.json +1 -1
  64. package/build/SmlConnection.compiled.json +1 -1
  65. package/build/SmlConnection.permissions.test.compiled.json +1 -1
  66. package/build/SmlConnection.test.compiled.json +1 -1
  67. package/build/SmlManager.compiled.json +1 -1
  68. package/build/SmlManager.permissions.test.compiled.json +1 -1
  69. package/build/SmlManager.test.compiled.json +1 -1
  70. package/build/Uln.compiled.json +1 -1
  71. package/build/Uln.test.compiled.json +1 -1
  72. package/build/UlnConnection.compiled.json +1 -1
  73. package/build/UlnConnection.test.compiled.json +1 -1
  74. package/build/UlnConnectionPermissions.test.compiled.json +1 -1
  75. package/build/UlnConnectionSerde.test.compiled.json +1 -0
  76. package/build/UlnManagement.test.compiled.json +1 -1
  77. package/build/UlnManager.compiled.json +1 -1
  78. package/build/UlnManager.test.compiled.json +1 -1
  79. package/build/UlnManagerPermissions.test.compiled.json +1 -1
  80. package/build/UlnManagerUtil.test.compiled.json +1 -1
  81. package/build/UlnMsgDataSerde.test.compiled.json +1 -0
  82. package/build/UlnPermissions.test.compiled.json +1 -1
  83. package/build/UlnReceiveConfig.test.compiled.json +1 -1
  84. package/build/UlnSend.test.compiled.json +1 -1
  85. package/build/UlnSendConfig.test.compiled.json +1 -1
  86. package/build/UlnSendWithDvnFeeLib.test.compiled.json +1 -1
  87. package/build/UlnSendWithExecFeeLib.test.compiled.json +1 -1
  88. package/build/UlnSendWorkerFactory.test.compiled.json +1 -1
  89. package/build/UlnSerde.test.compiled.json +1 -0
  90. package/build/UlnUtil.test.compiled.json +1 -1
  91. package/build/WorkerCore.test.compiled.json +1 -1
  92. package/build/WorkerCoreMsgDataSerde.test.compiled.json +1 -0
  93. package/build/WorkerCoreSerde.test.compiled.json +1 -0
  94. package/build/badFeeLib1.test.compiled.json +1 -1
  95. package/build/badFeeLib10.test.compiled.json +1 -1
  96. package/build/badFeeLib11.test.compiled.json +1 -1
  97. package/build/badFeeLib12.test.compiled.json +1 -1
  98. package/build/badFeeLib2.test.compiled.json +1 -1
  99. package/build/badFeeLib3.test.compiled.json +1 -1
  100. package/build/badFeeLib4.test.compiled.json +1 -1
  101. package/build/badFeeLib5.test.compiled.json +1 -1
  102. package/build/badFeeLib6.test.compiled.json +1 -1
  103. package/build/badFeeLib7.test.compiled.json +1 -1
  104. package/build/badFeeLib8.test.compiled.json +1 -1
  105. package/build/badFeeLib9.test.compiled.json +1 -1
  106. package/package.json +1 -1
  107. package/src/classes/lz/EpConfig.fc +90 -23
  108. package/src/classes/lz/MsglibInfo.fc +32 -5
  109. package/src/classes/lz/Packet.fc +109 -48
  110. package/src/classes/lz/Path.fc +55 -4
  111. package/src/classes/lz/ReceiveEpConfig.fc +36 -5
  112. package/src/classes/lz/SendEpConfig.fc +55 -5
  113. package/src/classes/msgdata/AddMsglib.fc +11 -0
  114. package/src/classes/msgdata/ChannelNonceInfo.fc +20 -0
  115. package/src/classes/msgdata/CoinsAmount.fc +8 -0
  116. package/src/classes/msgdata/Deploy.fc +19 -0
  117. package/src/classes/msgdata/ExtendedMd.fc +52 -1
  118. package/src/classes/msgdata/LzReceivePrepare.fc +21 -1
  119. package/src/classes/msgdata/LzReceiveStatus.fc +72 -1
  120. package/src/classes/msgdata/LzSend.fc +143 -24
  121. package/src/classes/msgdata/MdAddress.fc +42 -0
  122. package/src/classes/msgdata/MdEid.fc +8 -0
  123. package/src/classes/msgdata/MdObj.fc +32 -0
  124. package/src/classes/msgdata/MessagingReceipt.fc +34 -1
  125. package/src/classes/msgdata/MsglibSendCallback.fc +82 -0
  126. package/src/classes/msgdata/Nonce.fc +30 -0
  127. package/src/classes/msgdata/OptionsV1.fc +21 -1
  128. package/src/classes/msgdata/OptionsV2.fc +27 -0
  129. package/src/classes/msgdata/PacketId.fc +24 -0
  130. package/src/classes/msgdata/PacketSent.fc +35 -1
  131. package/src/classes/msgdata/SetAddress.fc +7 -0
  132. package/src/classes/msgdata/SetEpConfig.fc +17 -0
  133. package/src/funC++/actions/event.fc +17 -2
  134. package/src/funC++/actions/utils.fc +2 -2
  135. package/src/funC++/classlib.fc +33 -43
  136. package/src/funC++/constants.fc +28 -28
  137. package/src/funC++/dataStructures/PipelinedOutOfOrder.fc +75 -59
  138. package/src/funC++/stdlib.fc +26 -11
  139. package/src/funC++/testutils.fc +2 -2
  140. package/src/funC++/txnContext.fc +14 -14
  141. package/src/funC++/utils.fc +97 -1
  142. package/src/protocol/channel/handler.fc +247 -189
  143. package/src/protocol/channel/storage.fc +206 -1
  144. package/src/protocol/controller/handler.fc +35 -17
  145. package/src/protocol/controller/main.fc +1 -1
  146. package/src/protocol/core/abstract/protocolHandler.fc +11 -21
  147. package/src/protocol/core/baseStorage.fc +24 -0
  148. package/src/protocol/endpoint/handler.fc +99 -57
  149. package/src/protocol/endpoint/storage.fc +69 -5
  150. package/src/protocol/msglibs/BytesEncoder.fc +11 -10
  151. package/src/protocol/msglibs/interface.fc +6 -0
  152. package/src/protocol/msglibs/simpleMsglib/smlManager/handler.fc +1 -4
  153. package/src/protocol/msglibs/ultralightnode/feeLibInterface.fc +1 -0
  154. package/src/protocol/msglibs/ultralightnode/msgdata/Attestation.fc +7 -8
  155. package/src/protocol/msglibs/ultralightnode/msgdata/DvnFeesPaidEvent.fc +20 -0
  156. package/src/protocol/msglibs/ultralightnode/msgdata/ExecutorFeePaidEvent.fc +15 -0
  157. package/src/protocol/msglibs/ultralightnode/msgdata/InitUln.fc +1 -1
  158. package/src/protocol/msglibs/ultralightnode/msgdata/InitUlnConnection.fc +1 -1
  159. package/src/protocol/msglibs/ultralightnode/msgdata/SetAdminWorkerAddresses.fc +6 -0
  160. package/src/protocol/msglibs/ultralightnode/msgdata/UlnEvents.fc +20 -0
  161. package/src/protocol/msglibs/ultralightnode/msgdata/UlnReceiveConfig.fc +114 -28
  162. package/src/protocol/msglibs/ultralightnode/msgdata/UlnSend.fc +51 -1
  163. package/src/protocol/msglibs/ultralightnode/msgdata/UlnSendConfig.fc +1 -1
  164. package/src/protocol/msglibs/ultralightnode/msgdata/UlnVerification.fc +10 -0
  165. package/src/protocol/msglibs/ultralightnode/msgdata/UlnWorkerFeelibBytecode.fc +6 -0
  166. package/src/protocol/msglibs/ultralightnode/msgdata/UlnWorkerFeelibInfo.fc +51 -1
  167. package/src/protocol/msglibs/ultralightnode/msgdata/VerificationStatus.fc +15 -0
  168. package/src/protocol/msglibs/ultralightnode/uln/handler.fc +84 -107
  169. package/src/protocol/msglibs/ultralightnode/uln/storage.fc +77 -1
  170. package/src/protocol/msglibs/ultralightnode/ulnConnection/handler.fc +92 -66
  171. package/src/protocol/msglibs/ultralightnode/ulnConnection/storage.fc +113 -6
  172. package/src/protocol/msglibs/ultralightnode/ulnConnection/utils.fc +6 -91
  173. package/src/protocol/msglibs/ultralightnode/ulnManager/handler.fc +57 -33
  174. package/src/protocol/msglibs/ultralightnode/ulnManager/interface.fc +0 -6
  175. package/src/protocol/msglibs/ultralightnode/ulnManager/main.fc +2 -2
  176. package/src/protocol/msglibs/ultralightnode/workerFeeLibs/dvnFeeLib/handler.fc +13 -9
  177. package/src/protocol/msglibs/ultralightnode/workerFeeLibs/dvnFeeLib/storage.fc +23 -0
  178. package/src/protocol/msglibs/ultralightnode/workerFeeLibs/executorFeeLib/handler.fc +63 -27
  179. package/src/protocol/msglibs/ultralightnode/workerFeeLibs/executorFeeLib/storage.fc +19 -0
  180. package/src/protocol/msglibs/ultralightnode/workerFeeLibs/priceFeedFeeLib/storage.fc +55 -6
  181. package/src/workers/core/abstract/workerHandler.fc +20 -19
  182. package/src/workers/core/interface.fc +2 -1
  183. package/src/workers/core/workerCoreStorage.fc +16 -1
  184. package/src/workers/dvn/handler.fc +67 -26
  185. package/src/workers/dvn/storage.fc +15 -2
  186. package/src/workers/executor/handler.fc +18 -6
  187. package/src/workers/executor/interface.fc +1 -0
  188. package/src/workers/executor/storage.fc +8 -1
  189. package/src/workers/msgdata/DropEvent.fc +18 -0
  190. package/src/workers/msgdata/ExecuteParams.fc +66 -3
  191. package/src/workers/msgdata/NativeDrop.fc +4 -0
  192. package/src/workers/msgdata/SetDict.fc +6 -4
  193. package/src/workers/msgdata/SetQuorum.fc +4 -2
  194. package/src/workers/msgdata/SignedRequest.fc +8 -0
  195. package/src/workers/priceFeedCache/handler.fc +21 -27
  196. package/src/workers/priceFeedCache/storage.fc +16 -1
  197. package/src/workers/proxy/handler.fc +2 -1
  198. package/src/workers/proxy/storage.fc +1 -1
  199. package/tests/baseContractTest.fc +2 -6
  200. package/tests/testMain.fc +2 -2
  201. package/src/classes/msgdata/Amount.fc +0 -16
  202. package/src/funC++/actions/destroy.fc +0 -27
@@ -2,6 +2,9 @@
2
2
 
3
3
  #include "../core/workerCoreStorage.fc";
4
4
 
5
+ #include "../../protocol/msglibs/ultralightnode/workerFeeLibs/priceFeedFeeLib/storage.fc";
6
+
7
+
5
8
  ;; required object name
6
9
  const int PriceFeedCache::NAME = "pfCache"u;
7
10
 
@@ -18,4 +21,16 @@ cell PriceFeedCache::New(cell admins, int version, cell $priceFeedFeeLib) method
18
21
  [cl::t::objRef, $priceFeedFeeLib] ;; PriceFeedCache::priceFeedFeeLibStorage
19
22
  ])
20
23
  );
21
- }
24
+ }
25
+
26
+ cell PriceFeedCache::getPriceFeedFeeLibStorage(cell $self) impure inline {
27
+ return $self.cellPreloadRefAt(1);
28
+ }
29
+
30
+ cell PriceFeedCache::setPriceFeedFeeLibStorage(cell $self, cell $priceFeedFeeLibStorage) impure inline {
31
+ slice selfSlice = $self.begin_parse();
32
+ return begin_cell()
33
+ .store_slice(selfSlice.scutfirst(_HEADER_WIDTH, 1)) ;; header + refs[0]
34
+ .store_ref($priceFeedFeeLibStorage) ;; new refs[1]
35
+ .end_cell();
36
+ }
@@ -57,7 +57,8 @@ tuple callback(cell $md) impure inline {
57
57
  getCaller(),
58
58
  $md,
59
59
  0,
60
- getOpcode()
60
+ getOpcode(),
61
+ NULLADDRESS
61
62
  )
62
63
  );
63
64
  }
@@ -18,4 +18,4 @@ cell Proxy::New(cell admins, int version) method_id {
18
18
  [cl::t::bool, false] ;; Proxy::callbackEnabled
19
19
  ])
20
20
  );
21
- }
21
+ }
@@ -7,7 +7,6 @@
7
7
  #include "../src/funC++/actions/sendJettons.fc";
8
8
  #include "../src/funC++/actions/call.fc";
9
9
  #include "../src/funC++/actions/deploy.fc";
10
- #include "../src/funC++/actions/destroy.fc";
11
10
  #include "../src/funC++/actions/dispatch.fc";
12
11
  #include "../src/funC++/actions/payment.fc";
13
12
 
@@ -80,10 +79,7 @@ cell baseTest::prepare(tuple args) impure {
80
79
  int actionType = actualAction.int_at(0);
81
80
  int equal = false;
82
81
 
83
- if (actionType == action::destroy::NAME) {
84
- terminalIndices = terminalIndices.tpush(index);
85
- equal = action::destroy::equals(actualAction, expectedAction);
86
- } elseif (actionType == action::deploy::NAME) {
82
+ if (actionType == action::deploy::NAME) {
87
83
  terminalIndices = terminalIndices.tpush(index);
88
84
  equal = action::deploy::equals(actualAction, expectedAction);
89
85
  } elseif (actionType == action::call::NAME) {
@@ -135,7 +131,7 @@ cell baseTest::prepare(tuple args) impure {
135
131
  } elseif (txnContext.at(index).is_cell()) {
136
132
  mismatch = (txnContext.cell_at(index).cell_hash() != expectedTxnContext.cell_at(index).cell_hash());
137
133
  } elseif (txnContext.at(index).is_slice()) {
138
- mismatch = (~ txnContext.slice_at(index).equal_slices(expectedTxnContext.slice_at(index)));
134
+ mismatch = (~ txnContext.slice_at(index).equal_slice_bits(expectedTxnContext.slice_at(index)));
139
135
  } else {
140
136
  mismatch = (~ txnContext.cell_at(index).cl::hash() == expectedTxnContext.cell_at(index).cl::hash());
141
137
  }
package/tests/testMain.fc CHANGED
@@ -121,7 +121,7 @@ tuple _get_c7() impure asm "c7 PUSH";
121
121
  }
122
122
  }
123
123
 
124
- (int, slice) test::shouldBeTrue(int condition) {
124
+ (int, slice) test::shouldBeTrue(int condition) impure {
125
125
  ifnot (condition) {
126
126
  return (TEST_FAILED, "test::shouldBeTrue");
127
127
  } else {
@@ -129,6 +129,6 @@ tuple _get_c7() impure asm "c7 PUSH";
129
129
  }
130
130
  }
131
131
 
132
- (int, slice) test::shouldBeFalse(int condition) {
132
+ (int, slice) test::shouldBeFalse(int condition) impure {
133
133
  return test::shouldBeTrue(condition == false);
134
134
  }
@@ -1,16 +0,0 @@
1
- #include "../../funC++/classlib.fc";
2
-
3
- ;; required storage name
4
- const int md::Amount::NAME = "Amount"u;
5
-
6
- ;; field names
7
- const int md::Amount::amount = 0;
8
-
9
- cell md::Amount::New(int amount) inline method_id {
10
- return cl::declare(
11
- md::Amount::NAME,
12
- unsafeTuple([
13
- [cl::t::coins, amount] ;; md::Amount::amount
14
- ])
15
- );
16
- }
@@ -1,27 +0,0 @@
1
- #include "utils.fc";
2
-
3
- const int action::destroy::NAME = "destroy"u;
4
-
5
- const int action::destroy::to = 1;
6
- const int action::destroy::opcode = 2;
7
- const int action::destroy::md = 3;
8
-
9
- ;; @terminal
10
- tuple action::destroy::create(int to, int opcode, cell $md) inline {
11
- return unsafeTuple([action::destroy::NAME, to, opcode, $md]);
12
- }
13
-
14
- ;; returns true if equals
15
- int action::destroy::equals(tuple self, tuple other) {
16
- int equalMdField = compareObjectFields(
17
- self.cell_at(action::destroy::md),
18
- other.cell_at(action::destroy::md)
19
- );
20
-
21
- return (
22
- (self.int_at(0) == other.int_at(0)) ;; NAME
23
- & (self.int_at(action::destroy::to) == other.int_at(action::destroy::to))
24
- & (self.int_at(action::destroy::opcode) == other.int_at(action::destroy::opcode))
25
- & (equalMdField == -1)
26
- );
27
- }