@layerzerolabs/layerzero-v2-ton 3.0.59 → 3.0.60
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/AllStorages.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/ChannelBurnDefaultConfig.test.compiled.json +1 -0
- 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/ChannelNilifyDefaultConfig.test.compiled.json +1 -0
- 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/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.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/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/PriceFeedFeeLibArbitrum.test.compiled.json +1 -1
- package/build/PriceFeedFeeLibDefault.test.compiled.json +1 -1
- package/build/PriceFeedFeeLibOptimism.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.permissions.test.compiled.json +1 -1
- package/build/SmlConnection.test.compiled.json +1 -1
- package/build/SmlManager.permissions.test.compiled.json +1 -1
- package/build/SmlManager.test.compiled.json +1 -1
- package/build/TxnContext.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/UlnSendWithArbDvnFeeLib.test.compiled.json +1 -1
- package/build/UlnSendWithArbExecFeeLib.test.compiled.json +1 -1
- package/build/UlnSendWithDefaultDvnFeeLib.test.compiled.json +1 -1
- package/build/UlnSendWithDefaultExecFeeLib.test.compiled.json +1 -1
- package/build/UlnSendWithOpDvnFeeLib.test.compiled.json +1 -1
- package/build/UlnSendWithOpExecFeeLib.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/lz/Config.fc +1 -1
- package/src/classes/lz/EpConfig.fc +2 -2
- package/src/classes/lz/MsglibInfo.fc +1 -1
- package/src/classes/lz/Packet.fc +3 -3
- package/src/classes/lz/SendEpConfig.fc +1 -1
- package/src/classes/msgdata/AddMsglib.fc +1 -1
- package/src/classes/msgdata/Bool.fc +1 -1
- package/src/classes/msgdata/ChannelNonceInfo.fc +1 -1
- package/src/classes/msgdata/CoinsAmount.fc +1 -1
- package/src/classes/msgdata/CounterIncrement.fc +1 -1
- package/src/classes/msgdata/Deploy.fc +1 -1
- package/src/classes/msgdata/GetMsglibCallback.fc +1 -1
- package/src/classes/msgdata/InitEndpoint.fc +1 -1
- package/src/classes/msgdata/LzReceivePrepare.fc +1 -1
- package/src/classes/msgdata/LzReceiveStatus.fc +1 -1
- package/src/classes/msgdata/LzSend.fc +1 -1
- package/src/classes/msgdata/MdEid.fc +1 -1
- package/src/classes/msgdata/MdObj.fc +1 -1
- package/src/classes/msgdata/MessagingReceipt.fc +1 -1
- package/src/classes/msgdata/MsglibSendCallback.fc +3 -3
- package/src/classes/msgdata/Nonce.fc +1 -1
- package/src/classes/msgdata/OptionsExtended.fc +1 -1
- package/src/classes/msgdata/OptionsV1.fc +1 -1
- package/src/classes/msgdata/OptionsV2.fc +1 -1
- package/src/classes/msgdata/PacketId.fc +1 -1
- package/src/classes/msgdata/SetAddress.fc +1 -1
- package/src/classes/msgdata/SetEpConfig.fc +1 -1
- package/src/classes/msgdata/SetPeer.fc +1 -1
- package/src/funC++/actions/RawCall.fc +4 -4
- package/src/funC++/actions/call.fc +4 -4
- package/src/funC++/actions/deploy.fc +4 -4
- package/src/funC++/actions/event.fc +2 -2
- package/src/funC++/actions/payment.fc +4 -4
- package/src/funC++/actions/sendJettons.fc +6 -6
- package/src/funC++/actions/utils.fc +1 -1
- package/src/funC++/classlib.fc +30 -30
- package/src/funC++/dataStructures/AddressList.fc +1 -1
- package/src/funC++/dataStructures/DeterministicInsertionCircularQueue.fc +6 -6
- package/src/funC++/stringlib.fc +7 -7
- package/src/funC++/txnContext.fc +10 -10
- package/src/funC++/utils.fc +5 -5
- package/src/protocol/channel/handler.fc +3 -3
- package/src/protocol/channel/storage.fc +1 -1
- package/src/protocol/controller/handler.fc +2 -0
- package/src/protocol/controller/storage.fc +1 -1
- package/src/protocol/core/baseStorage.fc +1 -1
- package/src/protocol/endpoint/handler.fc +4 -4
- package/src/protocol/msglibs/BytesDecoder.fc +5 -5
- package/src/protocol/msglibs/BytesEncoder.fc +7 -7
- package/src/protocol/msglibs/ultralightnode/msgdata/Attestation.fc +1 -1
- package/src/protocol/msglibs/ultralightnode/msgdata/DvnFeesPaidEvent.fc +1 -1
- package/src/protocol/msglibs/ultralightnode/msgdata/ExecutorFeePaidEvent.fc +1 -1
- package/src/protocol/msglibs/ultralightnode/msgdata/InitUln.fc +1 -1
- package/src/protocol/msglibs/ultralightnode/msgdata/InitUlnConnection.fc +2 -2
- package/src/protocol/msglibs/ultralightnode/msgdata/InitUlnManager.fc +1 -1
- package/src/protocol/msglibs/ultralightnode/msgdata/RentRefill.fc +1 -1
- package/src/protocol/msglibs/ultralightnode/msgdata/SetAdminWorkerAddresses.fc +1 -1
- package/src/protocol/msglibs/ultralightnode/msgdata/TreasuryFeeBps.fc +1 -1
- package/src/protocol/msglibs/ultralightnode/msgdata/UlnEvents.fc +1 -1
- package/src/protocol/msglibs/ultralightnode/msgdata/UlnReceiveConfig.fc +1 -1
- package/src/protocol/msglibs/ultralightnode/msgdata/UlnSend.fc +1 -1
- package/src/protocol/msglibs/ultralightnode/msgdata/UlnVerification.fc +1 -1
- package/src/protocol/msglibs/ultralightnode/msgdata/UlnWorkerFeelibBytecode.fc +1 -1
- package/src/protocol/msglibs/ultralightnode/msgdata/UlnWorkerFeelibInfo.fc +1 -1
- package/src/protocol/msglibs/ultralightnode/msgdata/VerificationStatus.fc +1 -1
- package/src/protocol/msglibs/ultralightnode/uln/handler.fc +2 -3
- package/src/protocol/msglibs/ultralightnode/uln/storage.fc +1 -1
- package/src/protocol/msglibs/ultralightnode/ulnConnection/handler.fc +14 -5
- package/src/protocol/msglibs/ultralightnode/ulnConnection/storage.fc +1 -1
- package/src/protocol/msglibs/ultralightnode/ulnManager/storage.fc +1 -1
- package/src/protocol/msglibs/ultralightnode/workerFeeLibs/dvnFeeLib/handler.fc +1 -1
- package/src/protocol/msglibs/ultralightnode/workerFeeLibs/dvnFeeLib/storage.fc +1 -1
- package/src/protocol/msglibs/ultralightnode/workerFeeLibs/executorFeeLib/handler.fc +4 -6
- package/src/protocol/msglibs/ultralightnode/workerFeeLibs/executorFeeLib/storage.fc +1 -1
- package/src/protocol/msglibs/ultralightnode/workerFeeLibs/maliciousFeeLib/handler.fc +1 -1
- package/src/protocol/msglibs/ultralightnode/workerFeeLibs/priceFeedFeeLib/storage.fc +1 -1
- package/src/workers/core/abstract/workerHandler.fc +6 -5
- package/src/workers/core/workerCoreStorage.fc +1 -1
- package/src/workers/dvn/handler.fc +3 -3
- package/src/workers/dvn/storage.fc +1 -1
- package/src/workers/executor/handler.fc +16 -4
- package/src/workers/executor/interface.fc +2 -0
- package/src/workers/executor/main.fc +4 -0
- package/src/workers/executor/storage.fc +1 -1
- package/src/workers/msgdata/ClaimTon.fc +1 -1
- package/src/workers/msgdata/ExecuteParams.fc +7 -7
- package/src/workers/msgdata/NativeDrop.fc +1 -1
- package/src/workers/msgdata/SetDict.fc +1 -1
- package/src/workers/msgdata/SetQuorum.fc +1 -1
- package/src/workers/msgdata/SignedRequest.fc +1 -1
- package/src/workers/priceFeedCache/storage.fc +1 -1
- package/src/workers/proxy/handler.fc +2 -12
- package/src/workers/proxy/storage.fc +1 -1
- package/tests/baseContractTest.fc +10 -0
- package/src/classes/lz/Worker.fc +0 -32
|
@@ -6,7 +6,7 @@ const int md::CoinsAmount::NAME = "coinsAmt"u;
|
|
|
6
6
|
;; field names
|
|
7
7
|
const int md::CoinsAmount::amount = 0;
|
|
8
8
|
|
|
9
|
-
cell md::CoinsAmount::New(int amount) inline method_id {
|
|
9
|
+
cell md::CoinsAmount::New(int amount) impure inline method_id {
|
|
10
10
|
return cl::declare(
|
|
11
11
|
md::CoinsAmount::NAME,
|
|
12
12
|
unsafeTuple([
|
|
@@ -10,7 +10,7 @@ const int md::CounterIncrement::extraOptions = 2; ;; This is a reference to an '
|
|
|
10
10
|
const int md::CounterIncrement::nativeFee = 3;
|
|
11
11
|
const int md::CounterIncrement::zroFee = 4;
|
|
12
12
|
|
|
13
|
-
cell md::CounterIncrement::New(int dstEid, int incrementType, cell $extraOptions, int nativeFee, int zroFee) inline method_id {
|
|
13
|
+
cell md::CounterIncrement::New(int dstEid, int incrementType, cell $extraOptions, int nativeFee, int zroFee) impure inline method_id {
|
|
14
14
|
return cl::declare(
|
|
15
15
|
md::CounterIncrement::NAME,
|
|
16
16
|
unsafeTuple([
|
|
@@ -9,7 +9,7 @@ const int md::Deploy::dstEid = 1;
|
|
|
9
9
|
const int md::Deploy::dstOApp = 2;
|
|
10
10
|
const int md::Deploy::extraInfo = 3;
|
|
11
11
|
|
|
12
|
-
cell md::Deploy::New(int initialDeposit, int dstEid, int dstOApp) inline method_id {
|
|
12
|
+
cell md::Deploy::New(int initialDeposit, int dstEid, int dstOApp) impure inline method_id {
|
|
13
13
|
return cl::declare(
|
|
14
14
|
md::Deploy::NAME,
|
|
15
15
|
unsafeTuple([
|
|
@@ -7,7 +7,7 @@ const int md::getMsglibInfoCallback::NAME = "getMsgLbCb"u;
|
|
|
7
7
|
const int md::getMsglibInfoCallback::msglibAddress = 0;
|
|
8
8
|
const int md::getMsglibInfoCallback::connectionCode = 1;
|
|
9
9
|
|
|
10
|
-
cell md::getMsglibInfoCallback::New(int msglibAddress, cell connectionCode) inline method_id {
|
|
10
|
+
cell md::getMsglibInfoCallback::New(int msglibAddress, cell connectionCode) impure inline method_id {
|
|
11
11
|
return cl::declare(
|
|
12
12
|
md::getMsglibInfoCallback::NAME,
|
|
13
13
|
unsafeTuple([
|
|
@@ -6,7 +6,7 @@ const int md::InitEndpoint::NAME = "initEp"u;
|
|
|
6
6
|
;; field names
|
|
7
7
|
const int md::InitEndpoint::channelCode = 0;
|
|
8
8
|
|
|
9
|
-
cell md::InitEndpoint::New(cell channelCode) inline method_id {
|
|
9
|
+
cell md::InitEndpoint::New(cell channelCode) impure inline method_id {
|
|
10
10
|
return cl::declare(
|
|
11
11
|
md::InitEndpoint::NAME,
|
|
12
12
|
unsafeTuple([
|
|
@@ -7,7 +7,7 @@ const int md::LzReceivePrepare::NAME = "lzrecvprep"u;
|
|
|
7
7
|
const int md::LzReceivePrepare::nonce = 0;
|
|
8
8
|
const int md::LzReceivePrepare::nanotons = 1;
|
|
9
9
|
|
|
10
|
-
cell md::LzReceivePrepare::New(int nonce, int nanotons) method_id {
|
|
10
|
+
cell md::LzReceivePrepare::New(int nonce, int nanotons) impure method_id {
|
|
11
11
|
return cl::declare(
|
|
12
12
|
md::LzReceivePrepare::NAME,
|
|
13
13
|
unsafeTuple([
|
|
@@ -38,7 +38,7 @@ cell md::LzReceiveStatus::NewFull(
|
|
|
38
38
|
int sender,
|
|
39
39
|
cell $packet,
|
|
40
40
|
int executionStatus
|
|
41
|
-
) inline method_id {
|
|
41
|
+
) impure inline method_id {
|
|
42
42
|
lz::Packet::_assertValidLinkedList(extraData, lz::Packet::MAX_RECEIVE_MESSAGE_CELLS);
|
|
43
43
|
lz::Packet::_assertValidLinkedList(reason, lz::Packet::MAX_RECEIVE_MESSAGE_CELLS);
|
|
44
44
|
return cl::declare(
|
|
@@ -7,7 +7,7 @@ const int md::MdEid::NAME = "MdEid"u;
|
|
|
7
7
|
const int md::MdEid::md = 0;
|
|
8
8
|
const int md::MdEid::eid = 1;
|
|
9
9
|
|
|
10
|
-
cell md::MdEid::New(cell $md, int eid) inline method_id {
|
|
10
|
+
cell md::MdEid::New(cell $md, int eid) impure inline method_id {
|
|
11
11
|
return cl::declare(
|
|
12
12
|
md::MdEid::NAME,
|
|
13
13
|
unsafeTuple([
|
|
@@ -7,7 +7,7 @@ const int md::MdObj::NAME = "MdObj"u;
|
|
|
7
7
|
const int md::MdObj::md = 0;
|
|
8
8
|
const int md::MdObj::obj = 1;
|
|
9
9
|
|
|
10
|
-
cell md::MdObj::New(cell $md, cell $obj) inline method_id {
|
|
10
|
+
cell md::MdObj::New(cell $md, cell $obj) impure inline method_id {
|
|
11
11
|
return cl::declare(
|
|
12
12
|
md::MdObj::NAME,
|
|
13
13
|
unsafeTuple([
|
|
@@ -9,7 +9,7 @@ const int md::MessagingReceipt::nativeFeeActual = 1;
|
|
|
9
9
|
const int md::MessagingReceipt::zroFeeActual = 2;
|
|
10
10
|
const int md::MessagingReceipt::errorCode = 3;
|
|
11
11
|
|
|
12
|
-
cell md::MessagingReceipt::New(cell $lzSend, int nativeFee, int zroFee, int errorCode) inline method_id {
|
|
12
|
+
cell md::MessagingReceipt::New(cell $lzSend, int nativeFee, int zroFee, int errorCode) impure inline method_id {
|
|
13
13
|
return cl::declare(
|
|
14
14
|
md::MessagingReceipt::NAME,
|
|
15
15
|
unsafeTuple([
|
|
@@ -28,7 +28,7 @@ cell md::MsglibSendCallback::New(
|
|
|
28
28
|
int guidBytes,
|
|
29
29
|
cell $msglibSendEvents,
|
|
30
30
|
int errorCode
|
|
31
|
-
) inline method_id {
|
|
31
|
+
) impure inline method_id {
|
|
32
32
|
return cl::declare(
|
|
33
33
|
md::MsglibSendCallback::NAME,
|
|
34
34
|
unsafeTuple([
|
|
@@ -136,7 +136,7 @@ const int payees::_nativeAmountBits = 64;
|
|
|
136
136
|
const int payees::_payeeBits = payees::_addressBits + payees::_nativeAmountBits;
|
|
137
137
|
|
|
138
138
|
;; Serializes 3 payees (256-bit address => 64-bit TON coin amount) per cell.
|
|
139
|
-
cell serializePayees(tuple payeesInfo) inline {
|
|
139
|
+
cell serializePayees(tuple payeesInfo) impure inline {
|
|
140
140
|
int numPayees = payeesInfo.tlen();
|
|
141
141
|
if (numPayees == 0) {
|
|
142
142
|
return empty_cell();
|
|
@@ -164,7 +164,7 @@ cell serializePayees(tuple payeesInfo) inline {
|
|
|
164
164
|
}
|
|
165
165
|
|
|
166
166
|
;; deserializePayees will ignore any bits beyond 960
|
|
167
|
-
tuple deserializePayees(cell serializedPayees) inline {
|
|
167
|
+
tuple deserializePayees(cell serializedPayees) impure inline {
|
|
168
168
|
slice payeesSlice = serializedPayees.begin_parse();
|
|
169
169
|
if (payeesSlice.slice_empty?()) {
|
|
170
170
|
return empty_tuple();
|
|
@@ -8,7 +8,7 @@ const int md::OptionsExtended::eid = 0;
|
|
|
8
8
|
const int md::OptionsExtended::msgType = 1;
|
|
9
9
|
const int md::OptionsExtended::options = 2;
|
|
10
10
|
|
|
11
|
-
cell md::OptionsExtended::New(int eid, int msgType, cell $options) inline method_id {
|
|
11
|
+
cell md::OptionsExtended::New(int eid, int msgType, cell $options) impure inline method_id {
|
|
12
12
|
return cl::declare(
|
|
13
13
|
md::OptionsExtended::NAME,
|
|
14
14
|
unsafeTuple([
|
|
@@ -7,7 +7,7 @@ const int md::PacketId::NAME = "pktId"u;
|
|
|
7
7
|
const int md::PacketId::path = 0;
|
|
8
8
|
const int md::PacketId::nonce = 1;
|
|
9
9
|
|
|
10
|
-
cell md::PacketId::New(cell $path, int nonce) inline method_id {
|
|
10
|
+
cell md::PacketId::New(cell $path, int nonce) impure inline method_id {
|
|
11
11
|
return cl::declare(
|
|
12
12
|
md::PacketId::NAME,
|
|
13
13
|
unsafeTuple([
|
|
@@ -6,7 +6,7 @@ const int md::SetAddress::NAME = "setAddress"u;
|
|
|
6
6
|
;; field names
|
|
7
7
|
const int md::SetAddress::address = 0;
|
|
8
8
|
|
|
9
|
-
cell md::SetAddress::New(int address) inline method_id {
|
|
9
|
+
cell md::SetAddress::New(int address) impure inline method_id {
|
|
10
10
|
return cl::declare(
|
|
11
11
|
md::SetAddress::NAME,
|
|
12
12
|
unsafeTuple([
|
|
@@ -7,7 +7,7 @@ const int md::SetPeer::NAME = "setPeer"u;
|
|
|
7
7
|
const int md::SetPeer::eid = 0;
|
|
8
8
|
const int md::SetPeer::peer = 1;
|
|
9
9
|
|
|
10
|
-
cell md::SetPeer::New(int eid, int peer) inline method_id {
|
|
10
|
+
cell md::SetPeer::New(int eid, int peer) impure inline method_id {
|
|
11
11
|
return cl::declare(
|
|
12
12
|
md::SetPeer::NAME,
|
|
13
13
|
unsafeTuple([
|
|
@@ -9,12 +9,12 @@ const int action::rawCall::body = 2;
|
|
|
9
9
|
;; Call a method on the contract at address `to` with the given message data `md`
|
|
10
10
|
;; optionally provide value provisioned from this contract's balance
|
|
11
11
|
;; @terminal
|
|
12
|
-
tuple action::rawCall::create(int to, cell body) inline {
|
|
12
|
+
tuple action::rawCall::create(int to, cell body) impure inline {
|
|
13
13
|
return unsafeTuple([action::rawCall::NAME, to, body]);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
;; returns true if equals
|
|
17
|
-
int action::rawCall::equals(tuple self, tuple other) inline {
|
|
17
|
+
int action::rawCall::equals(tuple self, tuple other) impure inline {
|
|
18
18
|
return (
|
|
19
19
|
(self.int_at(0) == other.int_at(0)) ;; NAME
|
|
20
20
|
& (self.int_at(action::rawCall::to) == other.int_at(action::rawCall::to))
|
|
@@ -23,12 +23,12 @@ int action::rawCall::equals(tuple self, tuple other) inline {
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
;; overloaded when you want to pass 0 outflowNanos
|
|
26
|
-
tuple _newAction<rawCall>(int to, cell body) inline {
|
|
26
|
+
tuple _newAction<rawCall>(int to, cell body) impure inline {
|
|
27
27
|
return action::rawCall::create(to, body);
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
;; overloaded when you want to pass 0 outflowNanos
|
|
31
|
-
(tuple, ()) ~pushAction<rawCall>(tuple actions, int to, cell body) inline {
|
|
31
|
+
(tuple, ()) ~pushAction<rawCall>(tuple actions, int to, cell body) impure inline {
|
|
32
32
|
return (actions.tpush(_newAction<rawCall>(to, body)), ());
|
|
33
33
|
}
|
|
34
34
|
|
|
@@ -10,12 +10,12 @@ const int action::call::md = 3;
|
|
|
10
10
|
;; Call a method on the contract at address `to` with the given message data `md`
|
|
11
11
|
;; optionally provide value provisioned from this contract's balance
|
|
12
12
|
;; @terminal
|
|
13
|
-
tuple action::call::create(int to, int opcode, cell $md) inline {
|
|
13
|
+
tuple action::call::create(int to, int opcode, cell $md) impure inline {
|
|
14
14
|
return unsafeTuple([action::call::NAME, to, opcode, $md]);
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
;; returns true if equals
|
|
18
|
-
int action::call::equals(tuple self, tuple other) inline {
|
|
18
|
+
int action::call::equals(tuple self, tuple other) impure inline {
|
|
19
19
|
int equalMdField = compareObjectFields(self.cell_at(action::call::md), other.cell_at(action::call::md));
|
|
20
20
|
if (equalMdField != -1) {
|
|
21
21
|
~strdump("call: not equal md field at idx ");
|
|
@@ -30,12 +30,12 @@ int action::call::equals(tuple self, tuple other) inline {
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
;; overloaded when you want to pass 0 outflowNanos
|
|
33
|
-
tuple _newAction<call>(int to, int opcode, cell $body) inline {
|
|
33
|
+
tuple _newAction<call>(int to, int opcode, cell $body) impure inline {
|
|
34
34
|
return action::call::create(to, opcode, $body);
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
;; overloaded when you want to pass 0 outflowNanos
|
|
38
|
-
(tuple, ()) ~pushAction<call>(tuple actions, int to, int opcode, cell $body) inline {
|
|
38
|
+
(tuple, ()) ~pushAction<call>(tuple actions, int to, int opcode, cell $body) impure inline {
|
|
39
39
|
return (actions.tpush(_newAction<call>(to, opcode, $body)), ());
|
|
40
40
|
}
|
|
41
41
|
|
|
@@ -27,13 +27,13 @@ tuple action::deploy::create(
|
|
|
27
27
|
int opcode,
|
|
28
28
|
cell $md,
|
|
29
29
|
int outflowNanos
|
|
30
|
-
) inline {
|
|
30
|
+
) impure inline {
|
|
31
31
|
return unsafeTuple(
|
|
32
32
|
[action::deploy::NAME, code, $storage, donationNanos, opcode, $md, outflowNanos]
|
|
33
33
|
);
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
int action::deploy::equals(tuple self, tuple other) {
|
|
36
|
+
int action::deploy::equals(tuple self, tuple other) impure {
|
|
37
37
|
int equalDataField = compareObjectFields(
|
|
38
38
|
self.cell_at(action::deploy::storage),
|
|
39
39
|
other.cell_at(action::deploy::storage)
|
|
@@ -60,7 +60,7 @@ tuple _newAction<deployAndCall>(
|
|
|
60
60
|
int opcode,
|
|
61
61
|
cell $md,
|
|
62
62
|
int outflowNanos
|
|
63
|
-
) inline {
|
|
63
|
+
) impure inline {
|
|
64
64
|
return action::deploy::create(
|
|
65
65
|
code,
|
|
66
66
|
$storage,
|
|
@@ -79,7 +79,7 @@ tuple _newAction<deployAndCall>(
|
|
|
79
79
|
int opcode,
|
|
80
80
|
cell $md,
|
|
81
81
|
int outflowNanos
|
|
82
|
-
) inline {
|
|
82
|
+
) impure inline {
|
|
83
83
|
return (
|
|
84
84
|
actions
|
|
85
85
|
.tpush(_newAction<deployAndCall>(
|
|
@@ -41,7 +41,7 @@ cell action::event::build(int topic, cell $body, cell $initialStorage) impure in
|
|
|
41
41
|
.end_cell();
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
tuple action::event::create(int topic, cell $body, cell $initialStorage) inline {
|
|
44
|
+
tuple action::event::create(int topic, cell $body, cell $initialStorage) impure inline {
|
|
45
45
|
return unsafeTuple([
|
|
46
46
|
action::event::NAME,
|
|
47
47
|
action::event::build(topic, $body, $initialStorage)
|
|
@@ -49,7 +49,7 @@ tuple action::event::create(int topic, cell $body, cell $initialStorage) inline
|
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
;; returns true if equals
|
|
52
|
-
int action::event::equals(tuple self, tuple other) {
|
|
52
|
+
int action::event::equals(tuple self, tuple other) impure {
|
|
53
53
|
int equalEventObj = compareObjectFields(
|
|
54
54
|
self.cell_at(action::event::bodyIndex),
|
|
55
55
|
other.cell_at(action::event::bodyIndex)
|
|
@@ -10,12 +10,12 @@ const int action::payment::amount = 2;
|
|
|
10
10
|
const int action::payment::outflowNanos = 3;
|
|
11
11
|
|
|
12
12
|
;; @non-terminal
|
|
13
|
-
tuple action::payment::create(int toAddress, int amount, int outflowNanos) inline {
|
|
13
|
+
tuple action::payment::create(int toAddress, int amount, int outflowNanos) impure inline {
|
|
14
14
|
return unsafeTuple([action::payment::NAME, toAddress, amount, outflowNanos]);
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
;; returns true if equals
|
|
18
|
-
int action::payment::equals(tuple self, tuple other) {
|
|
18
|
+
int action::payment::equals(tuple self, tuple other) impure {
|
|
19
19
|
return (
|
|
20
20
|
(self.int_at(0) == other.int_at(0)) ;; NAME
|
|
21
21
|
& (self.int_at(action::payment::toAddress) == other.int_at(action::payment::toAddress))
|
|
@@ -24,11 +24,11 @@ int action::payment::equals(tuple self, tuple other) {
|
|
|
24
24
|
);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
tuple _newAction<payment>(int toAddress, int amount, int outflowNanos) inline {
|
|
27
|
+
tuple _newAction<payment>(int toAddress, int amount, int outflowNanos) impure inline {
|
|
28
28
|
return action::payment::create(toAddress, amount, outflowNanos);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
(tuple, ()) ~pushAction<payment>(tuple actions, int toAddress, int amount, int outflowNanos) inline {
|
|
31
|
+
(tuple, ()) ~pushAction<payment>(tuple actions, int toAddress, int amount, int outflowNanos) impure inline {
|
|
32
32
|
if (outflowNanos > 0) {
|
|
33
33
|
actions = actions
|
|
34
34
|
.tset(ACTIONS_OUTFLOW, actions.int_at(ACTIONS_OUTFLOW) + outflowNanos);
|
|
@@ -20,12 +20,12 @@ const int Jetton::OP::TRANSFER_NOTIFICATION = 0x7362d09c;
|
|
|
20
20
|
const int Jetton::OP::TRANSFER = 0xf8a7ea5;
|
|
21
21
|
|
|
22
22
|
;; @terminal
|
|
23
|
-
tuple action::sendJettons::create(int walletAddress, int toAddress, int amount, int responseAddress) inline {
|
|
23
|
+
tuple action::sendJettons::create(int walletAddress, int toAddress, int amount, int responseAddress) impure inline {
|
|
24
24
|
return unsafeTuple([action::sendJettons::NAME, walletAddress, toAddress, amount, responseAddress]);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
;; returns true if equals
|
|
28
|
-
int action::sendJettons::equals(tuple self, tuple other) {
|
|
28
|
+
int action::sendJettons::equals(tuple self, tuple other) impure {
|
|
29
29
|
return (
|
|
30
30
|
(self.int_at(0) == other.int_at(0)) ;; NAME
|
|
31
31
|
& (self.int_at(action::sendJettons::walletAddress) == other.int_at(action::sendJettons::walletAddress))
|
|
@@ -35,7 +35,7 @@ int action::sendJettons::equals(tuple self, tuple other) {
|
|
|
35
35
|
);
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
tuple _newAction<sendJettons>(int walletAddress, int toAddress, int amount, int responseAddress) inline {
|
|
38
|
+
tuple _newAction<sendJettons>(int walletAddress, int toAddress, int amount, int responseAddress) impure inline {
|
|
39
39
|
return action::sendJettons::create(walletAddress, toAddress, amount, responseAddress);
|
|
40
40
|
}
|
|
41
41
|
|
|
@@ -45,11 +45,11 @@ tuple _newAction<sendJettons>(int walletAddress, int toAddress, int amount, int
|
|
|
45
45
|
int toAddress,
|
|
46
46
|
int amount,
|
|
47
47
|
int responseAddress
|
|
48
|
-
) inline {
|
|
48
|
+
) impure inline {
|
|
49
49
|
return (actions.tpush(_newAction<sendJettons>(walletAddress, toAddress, amount, responseAddress)), ());
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
cell buildJettonMessageBody(int toAddress, int amount, int responseAddress) inline {
|
|
52
|
+
cell buildJettonMessageBody(int toAddress, int amount, int responseAddress) impure inline {
|
|
53
53
|
return beginTonMessage(Jetton::OP::TRANSFER) ;; opcode, query_id
|
|
54
54
|
.store_coins(amount) ;; jetton amount
|
|
55
55
|
.store_slice(hashpartToBasechainAddressStd(toAddress)) ;; to address address
|
|
@@ -60,7 +60,7 @@ cell buildJettonMessageBody(int toAddress, int amount, int responseAddress) inli
|
|
|
60
60
|
.end_cell();
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
int executeSendJettons(tuple dispatchAction) {
|
|
63
|
+
int executeSendJettons(tuple dispatchAction) impure {
|
|
64
64
|
sendTerminalAction(
|
|
65
65
|
dispatchAction.int_at(action::sendJettons::walletAddress),
|
|
66
66
|
buildJettonMessageBody(
|
|
@@ -37,7 +37,7 @@ tuple emptyActions() inline {
|
|
|
37
37
|
;; @info baseHandler::refund_addr is the last known "origin" of a message
|
|
38
38
|
;; flow, and is used to refund the sender if the handler does not
|
|
39
39
|
;; use all remaining value from the in_message
|
|
40
|
-
cell buildLayerzeroMessageBody(int donationNanos, int opcode, cell $md) inline {
|
|
40
|
+
cell buildLayerzeroMessageBody(int donationNanos, int opcode, cell $md) impure inline {
|
|
41
41
|
cell ret = beginTonMessage(opcode)
|
|
42
42
|
.store_coins(donationNanos)
|
|
43
43
|
.store_slice(getOriginStd())
|
package/src/funC++/classlib.fc
CHANGED
|
@@ -45,7 +45,7 @@ const int FIELD_VAL_IDX = 1;
|
|
|
45
45
|
|
|
46
46
|
;;; ====================== Class functions ======================
|
|
47
47
|
;; returns type width in bits
|
|
48
|
-
int _getTypeWidth(int clType) inline {
|
|
48
|
+
int _getTypeWidth(int clType) impure inline {
|
|
49
49
|
if (clType <= cl::t::uint256) {
|
|
50
50
|
return 1 << clType; ;; type names are set up so this is true
|
|
51
51
|
}
|
|
@@ -63,7 +63,7 @@ int cl::isNullObject(cell $obj) impure inline {
|
|
|
63
63
|
|
|
64
64
|
;; checks if a class lib object is flat, and contains no 'refs'
|
|
65
65
|
;; null is considered 'flat'
|
|
66
|
-
int cl::noRefFields(cell $obj) {
|
|
66
|
+
int cl::noRefFields(cell $obj) impure {
|
|
67
67
|
slice headerSlice = $obj.begin_parse();
|
|
68
68
|
int numRefs = headerSlice.slice_refs();
|
|
69
69
|
|
|
@@ -94,7 +94,7 @@ int cl::noRefFields(cell $obj) {
|
|
|
94
94
|
return true;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
int cl::equalObjTypeShallow(cell $a, cell $b) {
|
|
97
|
+
int cl::equalObjTypeShallow(cell $a, cell $b) impure {
|
|
98
98
|
slice aSlice = $a.begin_parse();
|
|
99
99
|
slice bSlice = $b.begin_parse();
|
|
100
100
|
int aRefs = aSlice.slice_refs();
|
|
@@ -120,7 +120,7 @@ int cl::equalObjTypeShallow(cell $a, cell $b) {
|
|
|
120
120
|
return true;
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
-
int cl::typeof(cell $obj) inline method_id {
|
|
123
|
+
int cl::typeof(cell $obj) impure inline method_id {
|
|
124
124
|
if (cl::isNullObject($obj)) {
|
|
125
125
|
return cl::NULL_CLASS_NAME;
|
|
126
126
|
}
|
|
@@ -255,7 +255,7 @@ cell cl::declare(int name, tuple fields) impure inline {
|
|
|
255
255
|
.end_cell();
|
|
256
256
|
}
|
|
257
257
|
|
|
258
|
-
cell cl::nullObject() inline method_id {
|
|
258
|
+
cell cl::nullObject() impure inline method_id {
|
|
259
259
|
return empty_cell();
|
|
260
260
|
}
|
|
261
261
|
|
|
@@ -303,7 +303,7 @@ s1 XCHG0 // STACK [ substring, width1 ]
|
|
|
303
303
|
PLDUX // STACK [ 10BitUnsignInt ] ( CC + 1 )
|
|
304
304
|
""";
|
|
305
305
|
|
|
306
|
-
forall X -> cell cl::set(cell $self, int fieldName, X val) inline method_id {
|
|
306
|
+
forall X -> cell cl::set(cell $self, int fieldName, X val) impure inline method_id {
|
|
307
307
|
slice headerSlice = $self.begin_parse();
|
|
308
308
|
int fieldInfoOffset = _BASIC_HEADER_WIDTH + (fieldName * _FIELD_INFO_WIDTH);
|
|
309
309
|
int fieldCellIndex = headerSlice.cl::getFieldCellIndex::asm(fieldInfoOffset);
|
|
@@ -360,7 +360,7 @@ const int _CELL_ID_WIDTH = 2; ;; the classlib backend supports up to 4 inner cel
|
|
|
360
360
|
const int _DATA_OFFSET_WIDTH = 10; ;; 1023 bits per cell = 2**10 - 1
|
|
361
361
|
|
|
362
362
|
|
|
363
|
-
int cl::get<uint>(cell $self, int fieldName, int width) inline method_id {
|
|
363
|
+
int cl::get<uint>(cell $self, int fieldName, int width) impure inline method_id {
|
|
364
364
|
slice headerSlice = $self.begin_parse();
|
|
365
365
|
|
|
366
366
|
int fieldInfoOffset = _BASIC_HEADER_WIDTH + (fieldName * _FIELD_INFO_WIDTH);
|
|
@@ -374,7 +374,7 @@ int cl::get<uint>(cell $self, int fieldName, int width) inline method_id {
|
|
|
374
374
|
}
|
|
375
375
|
}
|
|
376
376
|
|
|
377
|
-
cell cl::get<cellRef>(cell $self, int fieldName) inline method_id {
|
|
377
|
+
cell cl::get<cellRef>(cell $self, int fieldName) impure inline method_id {
|
|
378
378
|
slice headerSlice = $self.begin_parse();
|
|
379
379
|
int fieldInfoOffset = _BASIC_HEADER_WIDTH + (fieldName * _FIELD_INFO_WIDTH);
|
|
380
380
|
int fieldCellIndex = headerSlice.cl::getFieldCellIndex::asm(fieldInfoOffset);
|
|
@@ -391,54 +391,54 @@ cell cl::get<cellRef>(cell $self, int fieldName) inline method_id {
|
|
|
391
391
|
;
|
|
392
392
|
}
|
|
393
393
|
|
|
394
|
-
cell cl::get<objRef>(cell $self, int fieldName) inline method_id {
|
|
394
|
+
cell cl::get<objRef>(cell $self, int fieldName) impure inline method_id {
|
|
395
395
|
return cl::get<cellRef>($self, fieldName);
|
|
396
396
|
}
|
|
397
397
|
|
|
398
|
-
int cl::get<uint8>(cell $self, int fieldName) inline method_id {
|
|
398
|
+
int cl::get<uint8>(cell $self, int fieldName) impure inline method_id {
|
|
399
399
|
return $self.cl::get<uint>(fieldName, 8);
|
|
400
400
|
}
|
|
401
401
|
|
|
402
|
-
int cl::get<uint16>(cell $self, int fieldName) inline method_id {
|
|
402
|
+
int cl::get<uint16>(cell $self, int fieldName) impure inline method_id {
|
|
403
403
|
return $self.cl::get<uint>(fieldName, 16);
|
|
404
404
|
}
|
|
405
405
|
|
|
406
|
-
int cl::get<uint32>(cell $self, int fieldName) inline method_id {
|
|
406
|
+
int cl::get<uint32>(cell $self, int fieldName) impure inline method_id {
|
|
407
407
|
return $self.cl::get<uint>(fieldName, 32);
|
|
408
408
|
}
|
|
409
409
|
|
|
410
|
-
int cl::get<uint64>(cell $self, int fieldName) inline method_id {
|
|
410
|
+
int cl::get<uint64>(cell $self, int fieldName) impure inline method_id {
|
|
411
411
|
return $self.cl::get<uint>(fieldName, 64);
|
|
412
412
|
}
|
|
413
413
|
|
|
414
|
-
int cl::get<coins>(cell $self, int fieldName) inline method_id {
|
|
414
|
+
int cl::get<coins>(cell $self, int fieldName) impure inline method_id {
|
|
415
415
|
return $self.cl::get<uint>(fieldName, 128);
|
|
416
416
|
}
|
|
417
417
|
|
|
418
|
-
int cl::get<uint256>(cell $self, int fieldName) inline method_id {
|
|
418
|
+
int cl::get<uint256>(cell $self, int fieldName) impure inline method_id {
|
|
419
419
|
return $self.cl::get<uint>(fieldName, 256);
|
|
420
420
|
}
|
|
421
421
|
|
|
422
|
-
slice cl::get<std_address>(cell $self, int fieldName) inline method_id {
|
|
422
|
+
slice cl::get<std_address>(cell $self, int fieldName) impure inline method_id {
|
|
423
423
|
return hashpartToBasechainAddressStd(
|
|
424
424
|
$self.cl::get<uint>(fieldName, 256)
|
|
425
425
|
);
|
|
426
426
|
}
|
|
427
427
|
|
|
428
|
-
int cl::get<bool>(cell $self, int fieldName) inline method_id {
|
|
428
|
+
int cl::get<bool>(cell $self, int fieldName) impure inline method_id {
|
|
429
429
|
return $self.cl::get<uint>(fieldName, 1) != 0;
|
|
430
430
|
}
|
|
431
431
|
|
|
432
|
-
cell cl::get<dict256>(cell $self, int fieldName) inline method_id {
|
|
432
|
+
cell cl::get<dict256>(cell $self, int fieldName) impure inline method_id {
|
|
433
433
|
return $self.cl::get<cellRef>(fieldName);
|
|
434
434
|
}
|
|
435
435
|
|
|
436
|
-
int cl::get<address>(cell $self, int fieldName) inline method_id {
|
|
436
|
+
int cl::get<address>(cell $self, int fieldName) impure inline method_id {
|
|
437
437
|
return $self.cl::get<uint>(fieldName, 256);
|
|
438
438
|
}
|
|
439
439
|
|
|
440
440
|
;;; =============== DEBUG / CONVENIENCE FUNCTIONS =================
|
|
441
|
-
int typeofField(cell $self, int fieldName) inline {
|
|
441
|
+
int typeofField(cell $self, int fieldName) impure inline {
|
|
442
442
|
slice headerSlice = $self.begin_parse();
|
|
443
443
|
int fieldInfoOffset = _BASIC_HEADER_WIDTH + (fieldName * _FIELD_INFO_WIDTH);
|
|
444
444
|
return headerSlice
|
|
@@ -493,7 +493,7 @@ int objectsAreEqual(cell $lhs, cell $rhs) impure inline {
|
|
|
493
493
|
return compareObjectFields($lhs, $rhs) == -1;
|
|
494
494
|
}
|
|
495
495
|
|
|
496
|
-
slice _typeToStr(int fieldType) {
|
|
496
|
+
slice _typeToStr(int fieldType) impure {
|
|
497
497
|
if (fieldType == cl::t::uint8) { return "uint8"; }
|
|
498
498
|
elseif (fieldType == cl::t::uint16) { return "uint16"; }
|
|
499
499
|
elseif (fieldType == cl::t::uint32) { return "uint32"; }
|
|
@@ -586,28 +586,28 @@ tuple getContractStorageNestedField(int field, int nestedField) impure method_id
|
|
|
586
586
|
|
|
587
587
|
;;; ====================== Dictionary functions ======================
|
|
588
588
|
|
|
589
|
-
slice uint256ToSlice(int val) inline {
|
|
589
|
+
slice uint256ToSlice(int val) impure inline {
|
|
590
590
|
return begin_cell().store_uint256(val).as_slice();
|
|
591
591
|
}
|
|
592
592
|
|
|
593
|
-
int sliceToUint256(slice s) inline {
|
|
593
|
+
int sliceToUint256(slice s) impure inline {
|
|
594
594
|
return s.preload_uint(256);
|
|
595
595
|
}
|
|
596
596
|
|
|
597
597
|
;; override the insane behavior of TON to optimize out empty dictionaries
|
|
598
598
|
;; into a single bit
|
|
599
|
-
cell cl::dict256::New() inline {
|
|
599
|
+
cell cl::dict256::New() impure inline {
|
|
600
600
|
return empty_cell();
|
|
601
601
|
}
|
|
602
602
|
|
|
603
|
-
(slice, int) cl::dict256::get(cell dict, int key) inline method_id {
|
|
603
|
+
(slice, int) cl::dict256::get(cell dict, int key) impure inline method_id {
|
|
604
604
|
if (dict.cell_is_empty()) {
|
|
605
605
|
return (null(), false);
|
|
606
606
|
}
|
|
607
607
|
return dict.udict_get?(DICT256_KEYLEN, key);
|
|
608
608
|
}
|
|
609
609
|
|
|
610
|
-
(int, int) cl::dict256::get<uint256>(cell dict, int key) inline method_id {
|
|
610
|
+
(int, int) cl::dict256::get<uint256>(cell dict, int key) impure inline method_id {
|
|
611
611
|
(slice val, int exists) = cl::dict256::get(dict, key);
|
|
612
612
|
if (exists) {
|
|
613
613
|
return (sliceToUint256(val), true);
|
|
@@ -615,7 +615,7 @@ cell cl::dict256::New() inline {
|
|
|
615
615
|
return (0, false);
|
|
616
616
|
}
|
|
617
617
|
|
|
618
|
-
(cell, int) cl::dict256::get<cellRef>(cell dict, int key) inline method_id {
|
|
618
|
+
(cell, int) cl::dict256::get<cellRef>(cell dict, int key) impure inline method_id {
|
|
619
619
|
if (dict.cell_is_empty()) {
|
|
620
620
|
return (null(), false);
|
|
621
621
|
}
|
|
@@ -626,7 +626,7 @@ cell cl::dict256::New() inline {
|
|
|
626
626
|
return (ret, true);
|
|
627
627
|
}
|
|
628
628
|
|
|
629
|
-
cell cl::dict256::setRef(cell dict, int key, cell val) inline method_id {
|
|
629
|
+
cell cl::dict256::setRef(cell dict, int key, cell val) impure inline method_id {
|
|
630
630
|
if (dict.cell_is_empty()) {
|
|
631
631
|
return new_dict().udict_set_ref(
|
|
632
632
|
DICT256_KEYLEN,
|
|
@@ -637,7 +637,7 @@ cell cl::dict256::setRef(cell dict, int key, cell val) inline method_id {
|
|
|
637
637
|
return dict.udict_set_ref(DICT256_KEYLEN, key, val.cast_to_cell());
|
|
638
638
|
}
|
|
639
639
|
|
|
640
|
-
forall X -> cell cl::dict256::set(cell dict, int key, X val) inline {
|
|
640
|
+
forall X -> cell cl::dict256::set(cell dict, int key, X val) impure inline {
|
|
641
641
|
slice _val = val.is_slice() ? val.cast_to_slice() : uint256ToSlice(val.cast_to_int());
|
|
642
642
|
if (dict.cell_is_empty()) {
|
|
643
643
|
return new_dict().udict_set(DICT256_KEYLEN, key, _val);
|
|
@@ -645,7 +645,7 @@ forall X -> cell cl::dict256::set(cell dict, int key, X val) inline {
|
|
|
645
645
|
return dict.udict_set(DICT256_KEYLEN, key, _val);
|
|
646
646
|
}
|
|
647
647
|
|
|
648
|
-
cell cl::dict256::delete(cell dict, int key) {
|
|
648
|
+
cell cl::dict256::delete(cell dict, int key) impure {
|
|
649
649
|
if (dict.cell_is_empty()) {
|
|
650
650
|
return dict;
|
|
651
651
|
}
|
|
@@ -39,7 +39,7 @@ cell AddressList::serialize(tuple addressList) impure inline {
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
;; Check that the addresslist is a valid linked list of addresses with no extra refs or bytes
|
|
42
|
-
int AddressList::isValid(cell addressList, int maxCount) {
|
|
42
|
+
int AddressList::isValid(cell addressList, int maxCount) impure {
|
|
43
43
|
slice addressListSlice = addressList.begin_parse();
|
|
44
44
|
int count = 0;
|
|
45
45
|
while (addressListSlice.slice_empty?() == false) {
|