@layerzerolabs/layerzero-v2-ton 3.0.12-ton.0 → 3.0.13-ton.0

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 (92) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/build/AllStorages.boc +0 -0
  3. package/build/AllStorages.compiled.json +1 -1
  4. package/build/AllStorages.fif +13 -1
  5. package/build/BaseContract.test.fif +16 -9
  6. package/build/Channel.boc +0 -0
  7. package/build/Channel.compiled.json +1 -1
  8. package/build/Channel.fif +132 -24
  9. package/build/Channel.permissions.test.boc +0 -0
  10. package/build/Channel.permissions.test.compiled.json +1 -1
  11. package/build/Channel.permissions.test.fif +124 -92
  12. package/build/ChannelBurn.test.boc +0 -0
  13. package/build/ChannelBurn.test.compiled.json +1 -1
  14. package/build/ChannelBurn.test.fif +124 -92
  15. package/build/ChannelCommitPacket.test.boc +0 -0
  16. package/build/ChannelCommitPacket.test.compiled.json +1 -1
  17. package/build/ChannelCommitPacket.test.fif +140 -120
  18. package/build/ChannelConfig.test.boc +0 -0
  19. package/build/ChannelConfig.test.compiled.json +1 -1
  20. package/build/ChannelConfig.test.fif +124 -92
  21. package/build/ChannelInitialize.test.boc +0 -0
  22. package/build/ChannelInitialize.test.compiled.json +1 -1
  23. package/build/ChannelInitialize.test.fif +124 -92
  24. package/build/ChannelMsglibIntegration.test.boc +0 -0
  25. package/build/ChannelMsglibIntegration.test.compiled.json +1 -1
  26. package/build/ChannelMsglibIntegration.test.fif +129 -96
  27. package/build/ChannelMsglibSendCallback.test.boc +0 -0
  28. package/build/ChannelMsglibSendCallback.test.compiled.json +1 -1
  29. package/build/ChannelMsglibSendCallback.test.fif +124 -92
  30. package/build/ChannelNilify.test.boc +0 -0
  31. package/build/ChannelNilify.test.compiled.json +1 -1
  32. package/build/ChannelNilify.test.fif +126 -96
  33. package/build/ChannelReceive.test.boc +0 -0
  34. package/build/ChannelReceive.test.compiled.json +1 -1
  35. package/build/ChannelReceive.test.fif +140 -100
  36. package/build/ChannelReceiveCallback.test.boc +0 -0
  37. package/build/ChannelReceiveCallback.test.compiled.json +1 -1
  38. package/build/ChannelReceiveCallback.test.fif +124 -92
  39. package/build/ChannelReceiveView.test.boc +0 -0
  40. package/build/ChannelReceiveView.test.compiled.json +1 -1
  41. package/build/ChannelReceiveView.test.fif +124 -92
  42. package/build/ChannelSend.test.boc +0 -0
  43. package/build/ChannelSend.test.compiled.json +1 -1
  44. package/build/ChannelSend.test.fif +124 -92
  45. package/build/Connection.boc +0 -0
  46. package/build/Connection.compiled.json +1 -1
  47. package/build/Connection.fif +84 -1
  48. package/build/Connection.test.fif +16 -9
  49. package/build/Controller.assertions.test.fif +16 -9
  50. package/build/Controller.boc +0 -0
  51. package/build/Controller.compiled.json +1 -1
  52. package/build/Controller.fif +84 -1
  53. package/build/Controller.permissions.test.fif +16 -9
  54. package/build/Controller.test.fif +16 -9
  55. package/build/Counter.boc +0 -0
  56. package/build/Counter.compiled.json +1 -1
  57. package/build/Counter.fif +16 -9
  58. package/build/Counter.permissions.test.fif +16 -9
  59. package/build/Counter.setters.test.fif +16 -9
  60. package/build/Counter.test.fif +16 -9
  61. package/build/Dvn.test.fif +16 -9
  62. package/build/Endpoint.boc +0 -0
  63. package/build/Endpoint.compiled.json +1 -1
  64. package/build/Endpoint.fif +84 -1
  65. package/build/Endpoint.permissions.test.fif +16 -9
  66. package/build/Endpoint.test.fif +16 -9
  67. package/build/EndpointSetEpConfigDefaults.test.fif +16 -9
  68. package/build/Executor.test.fif +16 -9
  69. package/build/SmlConnection.boc +0 -0
  70. package/build/SmlConnection.compiled.json +1 -1
  71. package/build/SmlConnection.fif +84 -1
  72. package/build/SmlConnection.permissions.test.fif +16 -9
  73. package/build/SmlConnection.test.fif +16 -9
  74. package/build/SmlManager.boc +0 -0
  75. package/build/SmlManager.compiled.json +1 -1
  76. package/build/SmlManager.fif +84 -1
  77. package/build/SmlManager.permissions.test.fif +16 -9
  78. package/build/SmlManager.test.fif +16 -9
  79. package/build/Uln.boc +0 -0
  80. package/build/Uln.compiled.json +1 -1
  81. package/build/Uln.fif +84 -1
  82. package/build/Uln.test.fif +16 -9
  83. package/build/UlnManager.boc +0 -0
  84. package/build/UlnManager.compiled.json +1 -1
  85. package/build/UlnManager.fif +84 -1
  86. package/build/UlnManager.test.fif +16 -9
  87. package/build/UlnSend.test.fif +16 -9
  88. package/build/WorkerCore.test.fif +16 -9
  89. package/package.json +6 -1
  90. package/src/classes/msgdata/ChannelNonceInfo.fc +3 -3
  91. package/src/classes/msgdata/LzReceivePrepare.fc +18 -0
  92. package/src/funC++/actions/dispatch.fc +10 -6
@@ -6060,19 +6060,26 @@ PROGRAM{
6060
6060
  TPUSH
6061
6061
  }>
6062
6062
  executeDispatch PROC:<{
6063
- 24 PUSHINT
6064
- OVER
6065
- 4 INDEX
6066
- s2 PUSH
6067
- 1 INDEX
6068
6063
  0 PUSHINT
6069
- s4 PUSH
6064
+ OVER
6070
6065
  2 INDEX
6071
- s0 s5 XCHG
6066
+ s2 PUSH
6072
6067
  3 INDEX
6073
- s1 s5 s0 XCHG3
6074
6068
  buildLayerzeroMessageBody INLINECALLDICT
6075
- s1 s3 s0 XCHG3
6069
+ DUP
6070
+ 16 PUSHPOW2DEC
6071
+ CDATASIZE
6072
+ DROP
6073
+ 24 PUSHINT
6074
+ s4 PUSH
6075
+ 4 INDEX
6076
+ FALSE
6077
+ s0 s3 s4 XCHG3
6078
+ GETFORWARDFEE
6079
+ ADD
6080
+ s0 s3 XCHG
6081
+ 1 INDEX
6082
+ s3 s0 s3 XCHG3
6076
6083
  0 PUSHINT
6077
6084
  sendNonTerminalAction INLINECALLDICT
6078
6085
  TRUE
@@ -2499,19 +2499,26 @@ PROGRAM{
2499
2499
  TPUSH
2500
2500
  }>
2501
2501
  executeDispatch PROC:<{
2502
- 24 PUSHINT
2503
- OVER
2504
- 4 INDEX
2505
- s2 PUSH
2506
- 1 INDEX
2507
2502
  0 PUSHINT
2508
- s4 PUSH
2503
+ OVER
2509
2504
  2 INDEX
2510
- s0 s5 XCHG
2505
+ s2 PUSH
2511
2506
  3 INDEX
2512
- s1 s5 s0 XCHG3
2513
2507
  buildLayerzeroMessageBody INLINECALLDICT
2514
- s1 s3 s0 XCHG3
2508
+ DUP
2509
+ 16 PUSHPOW2DEC
2510
+ CDATASIZE
2511
+ DROP
2512
+ 24 PUSHINT
2513
+ s4 PUSH
2514
+ 4 INDEX
2515
+ FALSE
2516
+ s0 s3 s4 XCHG3
2517
+ GETFORWARDFEE
2518
+ ADD
2519
+ s0 s3 XCHG
2520
+ 1 INDEX
2521
+ s3 s0 s3 XCHG3
2515
2522
  0 PUSHINT
2516
2523
  sendNonTerminalAction INLINECALLDICT
2517
2524
  TRUE
package/package.json CHANGED
@@ -1,12 +1,17 @@
1
1
  {
2
2
  "name": "@layerzerolabs/layerzero-v2-ton",
3
- "version": "3.0.12-ton.0",
3
+ "version": "3.0.13-ton.0",
4
4
  "exports": {
5
5
  ".": {
6
6
  "types": "./dist/index.d.ts",
7
7
  "import": "./dist/index.mjs",
8
8
  "require": "./dist/index.cjs"
9
9
  },
10
+ "./build/*.json": {
11
+ "default": "./build/*.json",
12
+ "import": "./build/*.json",
13
+ "require": "./build/*.json"
14
+ },
10
15
  "./package.json": "./package.json"
11
16
  },
12
17
  "main": "./dist/index.cjs",
@@ -4,14 +4,14 @@
4
4
  const int md::ChannelNonceInfo::NAME = "cNonceInfo"u;
5
5
 
6
6
  ;; field names
7
- const int md::ChannelNonceInfo::firstUncommittedNonce = 0;
7
+ const int md::ChannelNonceInfo::nonce = 0;
8
8
  const int md::ChannelNonceInfo::firstUnexecutedNonce = 1;
9
9
 
10
- cell md::ChannelNonceInfo::New(int firstUncommittedNonce, int firstUnexecutedNonce) inline method_id {
10
+ cell md::ChannelNonceInfo::New(int nonce, int firstUnexecutedNonce) inline method_id {
11
11
  return cl::declare(
12
12
  md::ChannelNonceInfo::NAME,
13
13
  unsafeTuple([
14
- [cl::t::uint64, firstUncommittedNonce], ;; md::ChannelNonceInfo::firstUncommittedNonce
14
+ [cl::t::uint64, nonce], ;; md::ChannelNonceInfo::nonce
15
15
  [cl::t::uint64, firstUnexecutedNonce] ;; md::ChannelNonceInfo::firstUnexecutedNonce
16
16
  ])
17
17
  );
@@ -0,0 +1,18 @@
1
+ #include "../../funC++/classlib.fc";
2
+
3
+ ;; required storage name
4
+ const int md::LzReceivePrepare::NAME = "lzrecvprep"u;
5
+
6
+ ;; field names
7
+ const int md::LzReceivePrepare::nonce = 0;
8
+ const int md::LzReceivePrepare::nanotons = 1;
9
+
10
+ cell md::LzReceivePrepare::New(int nonce, int nanotons) method_id {
11
+ return cl::declare(
12
+ md::LzReceivePrepare::NAME,
13
+ unsafeTuple([
14
+ [cl::t::uint64, nonce], ;; md::LzReceivePrepare::nonce
15
+ [cl::t::coins, nanotons] ;; md::LzReceivePrepare::nanotons
16
+ ])
17
+ );
18
+ }
@@ -42,15 +42,19 @@ tuple _newAction<dispatch>(int to, int opcode, cell $body, int gasNanos) inline
42
42
  }
43
43
 
44
44
  int executeDispatch(tuple dispatchAction) {
45
+ cell body = buildLayerzeroMessageBody(
46
+ 0,
47
+ dispatchAction.int_at(action::call::opcode),
48
+ dispatchAction.cell_at(action::call::md)
49
+ );
50
+
51
+ (int cellsCount, int bitsCount, _) = body.compute_data_size(MAX_U16);
52
+
45
53
  sendNonTerminalAction(
46
54
  SEND_MSG_BOUNCEABLE,
47
- dispatchAction.int_at(action::dispatch::gasNanos),
55
+ dispatchAction.int_at(action::dispatch::gasNanos) + get_forward_fee(cellsCount, bitsCount, false),
48
56
  dispatchAction.int_at(action::call::to),
49
- buildLayerzeroMessageBody(
50
- 0,
51
- dispatchAction.int_at(action::call::opcode),
52
- dispatchAction.cell_at(action::call::md)
53
- ),
57
+ body,
54
58
  NORMAL
55
59
  );
56
60
  return true;