@layerzerolabs/layerzero-v2-ton 3.0.34 → 3.0.35

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 (109) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/build/ActionsSerde.test.compiled.json +1 -1
  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 -1
  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 -1
  35. package/build/DvnPermissions.test.compiled.json +1 -1
  36. package/build/DvnSerde.test.compiled.json +1 -1
  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 -1
  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 -1
  46. package/build/ExecutorPermissions.test.compiled.json +1 -1
  47. package/build/ExecutorSerde.test.compiled.json +1 -1
  48. package/build/LzClasses.test.compiled.json +1 -1
  49. package/build/LzClassesSerde.test.compiled.json +1 -1
  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 -1
  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 -1
  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 -1
  60. package/build/PriceFeedFeeLibSerde.test.compiled.json +1 -1
  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 -1
  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 -1
  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 -1
  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 -1
  93. package/build/WorkerCoreSerde.test.compiled.json +1 -1
  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/msgdata/MsglibSendCallback.fc +11 -11
  108. package/src/classes/msgdata/OptionsV2.fc +1 -1
  109. package/src/funC++/classlib.fc +92 -0
@@ -772,4 +772,96 @@ cell cl::nestedDict256::delete(cell $self, int fieldName, int key) impure inline
772
772
  return (s.preload_first_ref(), true);
773
773
  }
774
774
  return (null(), false);
775
+ }
776
+
777
+ ;; ========================= Storage View Functions =========================
778
+
779
+ ;; -- Level 0: returns storage.fieldName
780
+ int getStorageFieldL0<uint>(int fieldName) impure method_id {
781
+ cell $storage = getContractStorage();
782
+ int fieldType = typeofField($storage, fieldName);
783
+ int typeWidth = _getTypeWidth(fieldType);
784
+ return cl::get<uint>($storage, fieldName, typeWidth);
785
+ }
786
+
787
+ cell getStorageFieldL0<cellRef>(int fieldName) impure method_id {
788
+ return cl::get<cellRef>(
789
+ getContractStorage(),
790
+ fieldName
791
+ );
792
+ }
793
+
794
+ cell getStorageFieldL0<objRef>(int fieldName) impure method_id {
795
+ return cl::get<objRef>(
796
+ getContractStorage(),
797
+ fieldName
798
+ );
799
+ }
800
+
801
+ ;; -- Level 1: returns storage.fieldName.nestedFieldName
802
+ int getStorageFieldL1<uint>(int fieldName, int nestedFieldName) impure method_id {
803
+ cell field = getStorageFieldL0<cellRef>(fieldName);
804
+ int nestedFieldType = typeofField(field, nestedFieldName);
805
+ int nestedFieldWidth = _getTypeWidth(nestedFieldType);
806
+ return cl::get<uint>(field, nestedFieldName, nestedFieldWidth);
807
+ }
808
+
809
+ cell getStorageFieldL1<cellRef>(int fieldName, int nestedFieldName) impure method_id {
810
+ return cl::get<cellRef>(
811
+ getStorageFieldL0<cellRef>(fieldName),
812
+ nestedFieldName
813
+ );
814
+ }
815
+
816
+ cell getStorageFieldL1<objRef>(int fieldName, int nestedFieldName) impure method_id {
817
+ return cl::get<objRef>(
818
+ getStorageFieldL0<objRef>(fieldName),
819
+ nestedFieldName
820
+ );
821
+ }
822
+
823
+ ;; returns storage.fieldName[key]
824
+ cell getStorageFieldL1<dict256::cellRef>(int fieldName, int key) impure method_id {
825
+ (cell field, int exists) = cl::dict256::get<cellRef>(
826
+ getStorageFieldL0<cellRef>(fieldName),
827
+ key
828
+ );
829
+ if (exists) {
830
+ return field;
831
+ }
832
+ return cl::nullObject();
833
+ }
834
+
835
+ int getStorageFieldL1<dict256::uint256>(int fieldName, int key) impure method_id {
836
+ (int field, int exists) = cl::dict256::get<uint256>(
837
+ getStorageFieldL0<cellRef>(fieldName),
838
+ key
839
+ );
840
+ if (exists) {
841
+ return field;
842
+ }
843
+ return -1;
844
+ }
845
+
846
+ ;; Level 2: returns storage.fieldName[outerKey][innerKey]
847
+ cell getStorageFieldL2<dict256::cellRef>(int fieldName, int outerKey, int innerKey) impure method_id {
848
+ (cell field, int exists) = cl::dict256::get<cellRef>(
849
+ getStorageFieldL1<dict256::cellRef>(fieldName, outerKey),
850
+ innerKey
851
+ );
852
+ if (exists) {
853
+ return field;
854
+ }
855
+ return cl::nullObject();
856
+ }
857
+
858
+ int getStorageFieldL2<dict256::uint256>(int fieldName, int outerKey, int innerKey) impure method_id {
859
+ (int field, int exists) = cl::dict256::get<uint256>(
860
+ getStorageFieldL1<dict256::cellRef>(fieldName, outerKey),
861
+ innerKey
862
+ );
863
+ if (exists) {
864
+ return field;
865
+ }
866
+ return -1;
775
867
  }