@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.
- package/CHANGELOG.md +6 -0
- package/build/ActionsSerde.test.compiled.json +1 -1
- package/build/AllStorages.compiled.json +1 -1
- package/build/AllStorages.test.compiled.json +1 -1
- package/build/BaseContract.test.compiled.json +1 -1
- package/build/Channel.compiled.json +1 -1
- package/build/Channel.permissions.test.compiled.json +1 -1
- package/build/ChannelBurn.test.compiled.json +1 -1
- package/build/ChannelCommitPacket.test.compiled.json +1 -1
- package/build/ChannelConfig.test.compiled.json +1 -1
- package/build/ChannelInitialize.test.compiled.json +1 -1
- package/build/ChannelMsglibIntegration.test.compiled.json +1 -1
- package/build/ChannelMsglibSendCallback.test.compiled.json +1 -1
- package/build/ChannelNilify.test.compiled.json +1 -1
- package/build/ChannelReceive.test.compiled.json +1 -1
- package/build/ChannelReceiveCallback.test.compiled.json +1 -1
- package/build/ChannelReceiveView.test.compiled.json +1 -1
- package/build/ChannelSend.test.compiled.json +1 -1
- package/build/ChannelSerde.test.compiled.json +1 -1
- package/build/Classlib.test.compiled.json +1 -1
- package/build/ComputeDataSizeGas.test.compiled.json +1 -1
- package/build/Connection.compiled.json +1 -1
- package/build/Controller.assertions.test.compiled.json +1 -1
- package/build/Controller.compiled.json +1 -1
- package/build/Controller.permissions.test.compiled.json +1 -1
- package/build/Controller.test.compiled.json +1 -1
- package/build/Counter.compiled.json +1 -1
- package/build/Counter.permissions.test.compiled.json +1 -1
- package/build/Counter.setters.test.compiled.json +1 -1
- package/build/Counter.test.compiled.json +1 -1
- package/build/Dvn.compiled.json +1 -1
- package/build/Dvn.test.compiled.json +1 -1
- package/build/DvnFeeLib.compiled.json +1 -1
- package/build/DvnFeeLibSerde.test.compiled.json +1 -1
- package/build/DvnPermissions.test.compiled.json +1 -1
- package/build/DvnSerde.test.compiled.json +1 -1
- package/build/Endpoint.compiled.json +1 -1
- package/build/Endpoint.permissions.test.compiled.json +1 -1
- package/build/Endpoint.test.compiled.json +1 -1
- package/build/EndpointSerde.test.compiled.json +1 -1
- package/build/EndpointSetEpConfigDefaults.test.compiled.json +1 -1
- package/build/Executor.compiled.json +1 -1
- package/build/Executor.test.compiled.json +1 -1
- package/build/ExecutorFeeLib.compiled.json +1 -1
- package/build/ExecutorFeeLibSerde.test.compiled.json +1 -1
- package/build/ExecutorPermissions.test.compiled.json +1 -1
- package/build/ExecutorSerde.test.compiled.json +1 -1
- package/build/LzClasses.test.compiled.json +1 -1
- package/build/LzClassesSerde.test.compiled.json +1 -1
- package/build/LzUtil.test.compiled.json +1 -1
- package/build/MsgData.test.compiled.json +1 -1
- package/build/MsgDataSerde.test.compiled.json +1 -1
- package/build/MsglibPacketCodec.test.compiled.json +1 -1
- package/build/PipelinedOutOfOrder.test.compiled.json +1 -1
- package/build/PipelinedOutOfOrderSerde.test.compiled.json +1 -1
- package/build/PriceFeedCache.compiled.json +1 -1
- package/build/PriceFeedCache.test.compiled.json +1 -1
- package/build/PriceFeedCache.test.permissions.compiled.json +1 -1
- package/build/PriceFeedCacheSerde.test.compiled.json +1 -1
- package/build/PriceFeedFeeLibSerde.test.compiled.json +1 -1
- package/build/Proxy.compiled.json +1 -1
- package/build/Proxy.permissions.test.compiled.json +1 -1
- package/build/Proxy.test.compiled.json +1 -1
- package/build/SmlConnection.compiled.json +1 -1
- package/build/SmlConnection.permissions.test.compiled.json +1 -1
- package/build/SmlConnection.test.compiled.json +1 -1
- package/build/SmlManager.compiled.json +1 -1
- package/build/SmlManager.permissions.test.compiled.json +1 -1
- package/build/SmlManager.test.compiled.json +1 -1
- package/build/Uln.compiled.json +1 -1
- package/build/Uln.test.compiled.json +1 -1
- package/build/UlnConnection.compiled.json +1 -1
- package/build/UlnConnection.test.compiled.json +1 -1
- package/build/UlnConnectionPermissions.test.compiled.json +1 -1
- package/build/UlnConnectionSerde.test.compiled.json +1 -1
- package/build/UlnManagement.test.compiled.json +1 -1
- package/build/UlnManager.compiled.json +1 -1
- package/build/UlnManager.test.compiled.json +1 -1
- package/build/UlnManagerPermissions.test.compiled.json +1 -1
- package/build/UlnManagerUtil.test.compiled.json +1 -1
- package/build/UlnMsgDataSerde.test.compiled.json +1 -1
- package/build/UlnPermissions.test.compiled.json +1 -1
- package/build/UlnReceiveConfig.test.compiled.json +1 -1
- package/build/UlnSend.test.compiled.json +1 -1
- package/build/UlnSendConfig.test.compiled.json +1 -1
- package/build/UlnSendWithDvnFeeLib.test.compiled.json +1 -1
- package/build/UlnSendWithExecFeeLib.test.compiled.json +1 -1
- package/build/UlnSendWorkerFactory.test.compiled.json +1 -1
- package/build/UlnSerde.test.compiled.json +1 -1
- package/build/UlnUtil.test.compiled.json +1 -1
- package/build/WorkerCore.test.compiled.json +1 -1
- package/build/WorkerCoreMsgDataSerde.test.compiled.json +1 -1
- package/build/WorkerCoreSerde.test.compiled.json +1 -1
- package/build/badFeeLib1.test.compiled.json +1 -1
- package/build/badFeeLib10.test.compiled.json +1 -1
- package/build/badFeeLib11.test.compiled.json +1 -1
- package/build/badFeeLib12.test.compiled.json +1 -1
- package/build/badFeeLib2.test.compiled.json +1 -1
- package/build/badFeeLib3.test.compiled.json +1 -1
- package/build/badFeeLib4.test.compiled.json +1 -1
- package/build/badFeeLib5.test.compiled.json +1 -1
- package/build/badFeeLib6.test.compiled.json +1 -1
- package/build/badFeeLib7.test.compiled.json +1 -1
- package/build/badFeeLib8.test.compiled.json +1 -1
- package/build/badFeeLib9.test.compiled.json +1 -1
- package/package.json +1 -1
- package/src/classes/msgdata/MsglibSendCallback.fc +11 -11
- package/src/classes/msgdata/OptionsV2.fc +1 -1
- package/src/funC++/classlib.fc +92 -0
package/src/funC++/classlib.fc
CHANGED
|
@@ -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
|
}
|