@layerzerolabs/layerzero-v2-ton 3.0.19-ton.0 → 3.0.19-ton.1
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/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/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/DvnPermissions.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/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/ExecutorPermissions.test.compiled.json +1 -1
- package/build/LzClasses.test.compiled.json +1 -1
- package/build/LzUtil.test.compiled.json +1 -1
- package/build/MsgData.test.compiled.json +1 -1
- package/build/MsglibPacketCodec.test.compiled.json +1 -1
- package/build/PipelinedOutOfOrder.test.compiled.json +1 -1
- package/build/PriceFeedCache.compiled.json +1 -1
- package/build/PriceFeedCache.permissions.test.compiled.json +1 -1
- package/build/PriceFeedCache.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/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/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/UlnUtil.test.compiled.json +1 -1
- package/build/WorkerCore.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 +5 -5
- package/src/classes/msgdata/LzReceiveStatus.fc +0 -1
- package/src/funC++/actions/call.fc +1 -0
- package/src/funC++/actions/deploy.fc +0 -1
- package/src/funC++/actions/destroy.fc +0 -1
- package/src/funC++/actions/dispatch.fc +0 -1
- package/src/funC++/actions/event.fc +0 -1
- package/src/funC++/actions/payment.fc +0 -1
- package/src/funC++/actions/sendJettons.fc +0 -1
- package/src/funC++/actions/utils.fc +0 -2
- package/src/funC++/baseInterface.fc +0 -2
- package/src/funC++/classlib.fc +0 -36
- package/src/funC++/contractMain.fc +2 -8
- package/src/funC++/dataStructures/DeterministicInsertionCircularQueue.fc +0 -1
- package/src/funC++/dataStructures/PipelinedOutOfOrder.fc +0 -1
- package/src/funC++/handlerCore.fc +2 -6
- package/src/funC++/stringlib.fc +0 -2
- package/src/funC++/testutils.fc +0 -1
- package/src/funC++/txnContext.fc +1 -1
- package/src/funC++/utils.fc +35 -0
- package/src/protocol/channel/callbackOpcodes.fc +10 -0
- package/src/protocol/channel/handler.fc +1032 -0
- package/src/protocol/channel/interface.fc +60 -0
- package/src/protocol/channel/main.fc +39 -0
- package/src/protocol/channel/storage.fc +55 -0
- package/src/protocol/controller/handler.fc +347 -0
- package/src/protocol/controller/interface.fc +25 -0
- package/src/protocol/controller/main.fc +29 -0
- package/src/protocol/controller/storage.fc +31 -0
- package/src/protocol/core/abstract/protocolHandler.fc +110 -0
- package/src/protocol/core/abstract/protocolMain.fc +30 -0
- package/src/protocol/core/baseStorage.fc +1 -2
- package/src/protocol/endpoint/handler.fc +426 -0
- package/src/protocol/endpoint/interface.fc +20 -0
- package/src/protocol/endpoint/main.fc +23 -0
- package/src/protocol/interfaces.fc +4 -0
- package/src/protocol/msglibs/BytesDecoder.fc +135 -0
- package/src/protocol/msglibs/BytesEncoder.fc +150 -0
- package/src/protocol/msglibs/interface.fc +16 -0
- package/src/protocol/msglibs/simpleMsglib/smlConnection/handler.fc +125 -0
- package/src/protocol/msglibs/simpleMsglib/smlConnection/interface.fc +3 -0
- package/src/protocol/msglibs/simpleMsglib/smlConnection/main.fc +19 -0
- package/src/protocol/msglibs/simpleMsglib/smlConnection/storage.fc +20 -0
- package/src/protocol/msglibs/simpleMsglib/smlManager/handler.fc +281 -0
- package/src/protocol/msglibs/simpleMsglib/smlManager/interface.fc +14 -0
- package/src/protocol/msglibs/simpleMsglib/smlManager/main.fc +24 -0
- package/src/protocol/msglibs/simpleMsglib/smlManager/storage.fc +38 -0
- package/src/protocol/msglibs/ultralightnode/callbackOpcodes.fc +1 -0
- package/src/protocol/msglibs/ultralightnode/feeLibInterface.fc +10 -0
- package/src/protocol/msglibs/ultralightnode/feeLibUtils.fc +51 -0
- package/src/protocol/msglibs/ultralightnode/msgdata/Attestation.fc +49 -0
- package/src/protocol/msglibs/ultralightnode/msgdata/DvnFeesPaidEvent.fc +26 -0
- package/src/protocol/msglibs/ultralightnode/msgdata/ExecutorFeePaidEvent.fc +23 -0
- package/src/protocol/msglibs/ultralightnode/msgdata/InitUln.fc +18 -0
- package/src/protocol/msglibs/ultralightnode/msgdata/InitUlnConnection.fc +62 -0
- package/src/protocol/msglibs/ultralightnode/msgdata/InitUlnManager.fc +18 -0
- package/src/protocol/msglibs/ultralightnode/msgdata/RentRefill.fc +18 -0
- package/src/protocol/msglibs/ultralightnode/msgdata/SetAdminWorkerAddresses.fc +18 -0
- package/src/protocol/msglibs/ultralightnode/msgdata/TreasuryFeeBps.fc +16 -0
- package/src/protocol/msglibs/ultralightnode/msgdata/UlnEvents.fc +26 -0
- package/src/protocol/msglibs/ultralightnode/msgdata/UlnReceiveConfig.fc +249 -0
- package/src/protocol/msglibs/ultralightnode/msgdata/UlnSend.fc +27 -0
- package/src/protocol/msglibs/ultralightnode/msgdata/UlnSendConfig.fc +170 -0
- package/src/protocol/msglibs/ultralightnode/msgdata/UlnVerification.fc +21 -0
- package/src/protocol/msglibs/ultralightnode/msgdata/UlnWorkerFeelibBytecode.fc +16 -0
- package/src/protocol/msglibs/ultralightnode/msgdata/UlnWorkerFeelibEvents.fc +58 -0
- package/src/protocol/msglibs/ultralightnode/msgdata/UlnWorkerFeelibInfo.fc +56 -0
- package/src/protocol/msglibs/ultralightnode/msgdata/VerificationStatus.fc +18 -0
- package/src/protocol/msglibs/ultralightnode/uln/handler.fc +803 -0
- package/src/protocol/msglibs/ultralightnode/uln/interface.fc +63 -0
- package/src/protocol/msglibs/ultralightnode/uln/main.fc +37 -0
- package/src/protocol/msglibs/ultralightnode/uln/storage.fc +43 -0
- package/src/protocol/msglibs/ultralightnode/ulnConnection/handler.fc +600 -0
- package/src/protocol/msglibs/ultralightnode/ulnConnection/interface.fc +36 -0
- package/src/protocol/msglibs/ultralightnode/ulnConnection/main.fc +32 -0
- package/src/protocol/msglibs/ultralightnode/ulnConnection/storage.fc +49 -0
- package/src/protocol/msglibs/ultralightnode/ulnConnection/utils.fc +141 -0
- package/src/protocol/msglibs/ultralightnode/ulnManager/handler.fc +495 -0
- package/src/protocol/msglibs/ultralightnode/ulnManager/interface.fc +59 -0
- package/src/protocol/msglibs/ultralightnode/ulnManager/main.fc +40 -0
- package/src/protocol/msglibs/ultralightnode/ulnManager/storage.fc +44 -0
- package/src/protocol/msglibs/ultralightnode/workerFeeLibs/common.fc +27 -0
- package/src/protocol/msglibs/ultralightnode/workerFeeLibs/dvnFeeLib/handler.fc +80 -0
- package/src/protocol/msglibs/ultralightnode/workerFeeLibs/dvnFeeLib/main.fc +4 -0
- package/src/protocol/msglibs/ultralightnode/workerFeeLibs/dvnFeeLib/storage.fc +26 -0
- package/src/protocol/msglibs/ultralightnode/workerFeeLibs/executorFeeLib/handler.fc +123 -0
- package/src/protocol/msglibs/ultralightnode/workerFeeLibs/executorFeeLib/main.fc +4 -0
- package/src/protocol/msglibs/ultralightnode/workerFeeLibs/executorFeeLib/storage.fc +29 -0
- package/src/protocol/msglibs/ultralightnode/workerFeeLibs/main.fc +3 -0
- package/src/protocol/msglibs/ultralightnode/workerFeeLibs/priceFeedFeeLib/main.fc +1 -0
- package/src/protocol/msglibs/ultralightnode/workerFeeLibs/priceFeedFeeLib/storage.fc +39 -0
- package/src/protocol/msglibs/ultralightnode/workerFeeLibs/ulnSendWorkerV1.fc +363 -0
- package/src/workers/core/abstract/workerHandler.fc +150 -0
- package/src/workers/core/interface.fc +25 -0
- package/src/workers/core/workerCoreStorage.fc +44 -0
- package/src/workers/dvn/handler.fc +332 -0
- package/src/workers/dvn/interface.fc +25 -0
- package/src/workers/dvn/main.fc +36 -0
- package/src/workers/dvn/storage.fc +27 -0
- package/src/workers/executor/handler.fc +110 -0
- package/src/workers/executor/interface.fc +19 -0
- package/src/workers/executor/main.fc +26 -0
- package/src/workers/executor/storage.fc +19 -0
- package/src/workers/msgdata/ExecuteParams.fc +29 -0
- package/src/workers/msgdata/NativeDrop.fc +16 -0
- package/src/workers/msgdata/ProxyMessage.fc +20 -0
- package/src/workers/msgdata/SetDict.fc +20 -0
- package/src/workers/msgdata/SetQuorum.fc +20 -0
- package/src/workers/msgdata/SignedRequest.fc +18 -0
- package/src/workers/priceFeedCache/handler.fc +114 -0
- package/src/workers/priceFeedCache/interface.fc +4 -0
- package/src/workers/priceFeedCache/main.fc +25 -0
- package/src/workers/priceFeedCache/storage.fc +21 -0
- package/src/workers/proxy/handler.fc +81 -0
- package/src/workers/proxy/interface.fc +11 -0
- package/src/workers/proxy/main.fc +17 -0
- package/src/workers/proxy/storage.fc +21 -0
- package/tests/testMain.fc +0 -1
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
#include "storage.fc";
|
|
2
|
+
|
|
3
|
+
;; only-owner (manager)
|
|
4
|
+
const int Uln::OP::SET_DEFAULT_ULN_RECEIVE_CONFIG = "Uln::OP::SET_DEFAULT_ULN_RECEIVE_CONFIG"c;
|
|
5
|
+
const int Uln::OP::SET_DEFAULT_ULN_SEND_CONFIG = "Uln::OP::SET_DEFAULT_ULN_SEND_CONFIG"c;
|
|
6
|
+
|
|
7
|
+
const int Uln::OP::SET_OAPP_ULN_RECEIVE_CONFIG = "Uln::OP::SET_OAPP_ULN_RECEIVE_CONFIG"c;
|
|
8
|
+
const int Uln::OP::SET_OAPP_ULN_SEND_CONFIG = "Uln::OP::SET_OAPP_ULN_SEND_CONFIG"c;
|
|
9
|
+
|
|
10
|
+
const int Uln::OP::UPDATE_WORKER_FEELIB = "Uln::OP::UPDATE_WORKER_FEELIB"c;
|
|
11
|
+
const int Uln::OP::REFILL_WORKER_RENT = "Uln::OP::REFILL_WORKER_RENT"c;
|
|
12
|
+
|
|
13
|
+
const int Uln::OP::SET_TREASURY_FEE_BPS = "Uln::OP::SET_TREASURY_FEE_BPS"c;
|
|
14
|
+
|
|
15
|
+
;; Remove a worker from this ULN
|
|
16
|
+
;; only the admin of the registered worker
|
|
17
|
+
const int Uln::OP::DEREGISTER_WORKER_FEELIB = "Uln::OP::DEREGISTER_WORKER_FEELIB"c;
|
|
18
|
+
|
|
19
|
+
const int Uln::OP::COLLECT_WORKER_RENT = "Uln::OP::COLLECT_WORKER_RENT"c;
|
|
20
|
+
const int Uln::OP::GC_ATTESTATIONS = "Uln::OP::GC_ATTESTATIONS"c;
|
|
21
|
+
|
|
22
|
+
;; Set a worker configuration
|
|
23
|
+
;; only-owner (manager)
|
|
24
|
+
const int Uln::OP::SET_WORKER_FEELIB_STORAGE = "Uln::OP::SET_WORKER_FEELIB_STORAGE"c;
|
|
25
|
+
|
|
26
|
+
const int Uln::OP::ULN_COMMIT_PACKET = "Uln::OP::ULN_COMMIT_PACKET"c;
|
|
27
|
+
const int Uln::OP::ULN_VERIFY = "Uln::OP::ULN_VERIFY"c;
|
|
28
|
+
|
|
29
|
+
const int Uln::OP::ULN_QUOTE = "Uln::OP::ULN_QUOTE"c;
|
|
30
|
+
const int Uln::OP::ULN_SEND = "Uln::OP::ULN_SEND"c;
|
|
31
|
+
|
|
32
|
+
const int Uln::OP::SET_WORKER_FEELIB_STORAGE_CALLBACK = "Uln::OP::SET_WORKER_FEELIB_STORAGE_CALLBACK"c;
|
|
33
|
+
|
|
34
|
+
const int Uln::CONST::ADMIN_WORKER_SLOTS = 200;
|
|
35
|
+
|
|
36
|
+
const int Uln::ERROR::notUlnConnection = 224;
|
|
37
|
+
const int Uln::ERROR::insufficientRent = 225;
|
|
38
|
+
const int Uln::ERROR::nonexistentWorker = 226;
|
|
39
|
+
const int Uln::ERROR::invalidTimestamp = 227;
|
|
40
|
+
const int Uln::ERROR::invalidWorkerStorage = 228;
|
|
41
|
+
const int Uln::ERROR::invalidTreasuryFeeBps = 229;
|
|
42
|
+
const int UlnWorker::state::active = 1;
|
|
43
|
+
|
|
44
|
+
;; this will overflow 256-bit number after 10^64 years
|
|
45
|
+
const int Uln::CONST::RENT_NANOS_PER_SECOND = 100 * 1000;
|
|
46
|
+
const int Uln::CONST::INITIAL_RENT_NANOS = 3600 * 24 * 30 * Uln::CONST::RENT_NANOS_PER_SECOND;
|
|
47
|
+
|
|
48
|
+
const int Uln::event::ULN_WORKER_REGISTERED = "Uln::event::ULN_WRKR_REGISTRD"u;
|
|
49
|
+
const int Uln::event::ULN_WORKER_SLOTS_FULL = "Uln::event::ULN_WRKR_SLOTS_FULL"u;
|
|
50
|
+
const int Uln::event::ULN_WORKER_DEREGISTERED = "Uln::event::ULN_WRKR_DEREGISTRD"u;
|
|
51
|
+
const int Uln::event::ULN_WORKER_EVICTED = "Uln::event::ULN_WORKER_EVICTED"u;
|
|
52
|
+
const int Uln::event::ULN_COLLECT_WORKER_RENT = "Uln::event::ULN_COLLECT_WRKR_RNT"u;
|
|
53
|
+
const int Uln::event::ULN_WORKER_STORAGE_SET = "Uln::event::ULN_WRKR_STRG_SET"u;
|
|
54
|
+
const int Uln::event::ULN_WORKER_RENT_REFILLED = "Uln::event::ULN_WRKR_RNT_REFILL"u;
|
|
55
|
+
|
|
56
|
+
const int Uln::event::ULN_DEFAULT_SEND_CONFIG_SET = "Uln::event::ULN_DFLT_SND_CFG_SET"u;
|
|
57
|
+
const int Uln::event::ULN_DEFAULT_RECEIVE_CONFIG_SET = "Uln::event::ULN_DFLT_REC_CFG_SET"u;
|
|
58
|
+
const int Uln::event::ULN_TREASURY_FEE_BPS_SET = "Uln::event::ULN_TRSR_FEE_BPS_SET"u;
|
|
59
|
+
|
|
60
|
+
;; This error code represents a byte flag in a return value, not an actual error.
|
|
61
|
+
const int Uln::ErrorCode::WORKER_QUOTE_FAILED = "Uln::ErrorCode::WORKER_QUOTE_FAILED"c & 0xff;
|
|
62
|
+
|
|
63
|
+
const int Uln::WorkerFeelibInfo::MaxCells = 12;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
#include "../../interface.fc"; ;; msglib interface
|
|
2
|
+
#include "../../../core/abstract/protocolMain.fc";
|
|
3
|
+
|
|
4
|
+
#include "handler.fc";
|
|
5
|
+
#include "interface.fc";
|
|
6
|
+
|
|
7
|
+
tuple _executeOpcode(int op, cell $md) impure {
|
|
8
|
+
if (op == Uln::OP::ULN_SEND) {
|
|
9
|
+
return ulnSend($md);
|
|
10
|
+
} elseif (op == Uln::OP::ULN_COMMIT_PACKET) {
|
|
11
|
+
return ulnCommitPacket($md);
|
|
12
|
+
} elseif (op == Uln::OP::ULN_VERIFY) {
|
|
13
|
+
return ulnVerify($md);
|
|
14
|
+
} elseif (op == Uln::OP::ULN_QUOTE) {
|
|
15
|
+
return ulnQuote($md);
|
|
16
|
+
} elseif (op == Uln::OP::UPDATE_WORKER_FEELIB) {
|
|
17
|
+
return updateWorkerFeelib($md);
|
|
18
|
+
} elseif (op == Uln::OP::DEREGISTER_WORKER_FEELIB) {
|
|
19
|
+
return deregisterWorkerFeelib($md);
|
|
20
|
+
} elseif (op == Uln::OP::SET_WORKER_FEELIB_STORAGE) {
|
|
21
|
+
return setWorkerFeelibStorage($md);
|
|
22
|
+
} elseif (op == Uln::OP::COLLECT_WORKER_RENT) {
|
|
23
|
+
return collectWorkerRent($md);
|
|
24
|
+
} elseif (op == Uln::OP::GC_ATTESTATIONS) {
|
|
25
|
+
return garbageCollectInvalidAttestations($md);
|
|
26
|
+
} elseif (op == Uln::OP::SET_DEFAULT_ULN_RECEIVE_CONFIG) {
|
|
27
|
+
return setDefaultUlnReceiveConfig($md);
|
|
28
|
+
} elseif (op == Uln::OP::SET_DEFAULT_ULN_SEND_CONFIG) {
|
|
29
|
+
return setDefaultUlnSendConfig($md);
|
|
30
|
+
} elseif (op == Uln::OP::SET_TREASURY_FEE_BPS) {
|
|
31
|
+
return setTreasuryFeeBps($md);
|
|
32
|
+
} elseif (op == Uln::OP::REFILL_WORKER_RENT) {
|
|
33
|
+
return refillWorkerRent($md);
|
|
34
|
+
}
|
|
35
|
+
throw(BaseInterface::ERROR::invalidOpcode);
|
|
36
|
+
return null();
|
|
37
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
#include "../msgdata/UlnReceiveConfig.fc";
|
|
2
|
+
#include "../msgdata/UlnSendConfig.fc";
|
|
3
|
+
#include "../../../core/baseStorage.fc";
|
|
4
|
+
|
|
5
|
+
const int Uln::MaxWorkerFeelibs = 1024;
|
|
6
|
+
|
|
7
|
+
const int Uln::NAME = "uln"u;
|
|
8
|
+
|
|
9
|
+
const int Uln::baseStorage = 0;
|
|
10
|
+
const int Uln::eid = 1;
|
|
11
|
+
const int Uln::dstEid = 2;
|
|
12
|
+
const int Uln::defaultUlnReceiveConfig = 3;
|
|
13
|
+
const int Uln::defaultUlnSendConfig = 4;
|
|
14
|
+
|
|
15
|
+
const int Uln::connectionCode = 5;
|
|
16
|
+
|
|
17
|
+
;; map of address -> object
|
|
18
|
+
const int Uln::workerFeelibInfos = 6;
|
|
19
|
+
|
|
20
|
+
const int Uln::treasuryFeeBps = 7;
|
|
21
|
+
const int Uln::remainingWorkerSlots = 8;
|
|
22
|
+
const int Uln::remainingAdminWorkerSlots = 9;
|
|
23
|
+
|
|
24
|
+
;; Note that the default receive and send config can be initialized in the constructor unlike
|
|
25
|
+
;; ulnConnection which must be done in initialize due to opt-in semantics
|
|
26
|
+
;; @owner ulnManager
|
|
27
|
+
cell Uln::New(int owner, int eid, int dstEid) method_id {
|
|
28
|
+
return cl::declare(
|
|
29
|
+
Uln::NAME,
|
|
30
|
+
unsafeTuple([
|
|
31
|
+
[cl::t::objRef, BaseStorage::New(owner)], ;; Uln::baseStorage
|
|
32
|
+
[cl::t::uint32, eid], ;; Uln::eid
|
|
33
|
+
[cl::t::uint32, dstEid], ;; Uln::dstEid
|
|
34
|
+
[cl::t::objRef, UlnReceiveConfig::NewWithDefaults()], ;; Uln::defaultUlnReceiveConfig
|
|
35
|
+
[cl::t::objRef, UlnSendConfig::NewWithDefaults()], ;; Uln::defaultUlnSendConfig
|
|
36
|
+
[cl::t::cellRef, empty_cell()], ;; Uln::connectionCode
|
|
37
|
+
[cl::t::dict256, cl::dict256::New()], ;; Uln::workerFeelibInfos
|
|
38
|
+
[cl::t::uint16, 0], ;; Uln::treasuryFeeBps
|
|
39
|
+
[cl::t::uint16, 0], ;; Uln::remainingWorkerSlots
|
|
40
|
+
[cl::t::uint16, 0] ;; Uln::remainingAdminWorkerSlots
|
|
41
|
+
])
|
|
42
|
+
);
|
|
43
|
+
}
|