@layerzerolabs/lz-ton-sdk-v2 3.0.40 → 3.0.42

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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @layerzerolabs/lz-ton-sdk-v2
2
2
 
3
+ ## 3.0.42
4
+
5
+ ### Patch Changes
6
+
7
+ - 6dd4df1: deploy aptos mainnet
8
+
9
+ ## 3.0.41
10
+
11
+ ### Patch Changes
12
+
13
+ - 5243a57: add addressLookupTable parameter to quote function
14
+
3
15
  ## 3.0.40
4
16
 
5
17
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -11460,7 +11460,12 @@ var OPCODES = {
11460
11460
  Executor_OP_LZ_RECEIVE_ALERT: 3844476787n,
11461
11461
  PriceFeedCache_OP_UPDATE_PRICE: 3356097040n,
11462
11462
  PriceFeedCache_OP_UPDATE_NATIVE_PRICE: 2272264441n,
11463
+ PriceFeedCache_OP_UPDATE_OP_PRICES: 68094176n,
11464
+ PriceFeedCache_OP_UPDATE_OP_NATIVE_PRICES: 1736418267n,
11465
+ PriceFeedCache_OP_UPDATE_ARB_EXTENSION: 4188442884n,
11463
11466
  Proxy_OP_CALL_CONTRACT: 166741977n,
11467
+ Proxy_OP_EMIT_EVENT: 3445418055n,
11468
+ Proxy_OP_SEND_TON: 3496427869n,
11464
11469
  Proxy_OP_HANDLE_CALLBACK: 542230303n,
11465
11470
  Proxy_OP_TOGGLE_CALLBACK: 441875500n
11466
11471
  };
@@ -11748,6 +11753,10 @@ var EVENTS = {
11748
11753
  stringValue: "Worker::event::ADMINS_SET",
11749
11754
  intValue: 548840522271664353140921748684534232820842422473671553795412n
11750
11755
  },
11756
+ Worker_event_CLAIMED_TON: {
11757
+ stringValue: "Worker::event::CLAIMED_TON",
11758
+ intValue: 140503173701546074404075967663240763604591069363126264866819918n
11759
+ },
11751
11760
  Dvn_event_INVALID_SIGNATURE: {
11752
11761
  stringValue: "Dvn::event::INVALID_SIGNATURE",
11753
11762
  intValue: 1845748568727425907806402299282562526609276329313036843994008809460293n
@@ -11943,12 +11952,12 @@ var nameMap = {
11943
11952
  ulnMgr: "UlnManager",
11944
11953
  UlnDvnFl: "DvnFeelib",
11945
11954
  UlnExecutr: "ExecutorFeelib",
11955
+ ArbFeeExt: "ArbitrumPriceFeedExtension",
11946
11956
  PFFeelib: "PriceFeedFeelib",
11947
11957
  wrkCorStor: "WorkerCoreStorage",
11948
11958
  dvn: "Dvn",
11949
11959
  executor: "Executor",
11950
11960
  claimTon: "MdClaimTon",
11951
- DropEvent: "MdDropEvent",
11952
11961
  execParams: "MdExecuteParams",
11953
11962
  NativeDrop: "MdNativeDrop",
11954
11963
  setDct: "MdSetDict",
@@ -12029,12 +12038,12 @@ var keyMap = {
12029
12038
  ulnMgr: "UlnManager",
12030
12039
  UlnDvnFl: "DvnFeelib",
12031
12040
  UlnExecutr: "ExecutorFeelib",
12041
+ ArbFeeExt: "ArbitrumPriceFeedExtension",
12032
12042
  PFFeelib: "PriceFeedFeelib",
12033
12043
  wrkCorStor: "WorkerCoreStorage",
12034
12044
  dvn: "Dvn",
12035
12045
  executor: "Executor",
12036
12046
  claimTon: "md::ClaimTon",
12037
- DropEvent: "md::DropEvent",
12038
12047
  execParams: "md::ExecuteParams",
12039
12048
  NativeDrop: "md::NativeDrop",
12040
12049
  setDct: "md::SetDict",
@@ -12768,7 +12777,7 @@ var TonContractWrapper = class _TonContractWrapper extends BaseWrapper {
12768
12777
  async getNewDvnFeelib(provider, args) {
12769
12778
  const getResult = await provider.get("DvnFeelib::New", [
12770
12779
  { type: "int", value: args.quorum },
12771
- { type: "int", value: args.gas },
12780
+ { type: "int", value: args.remoteGas },
12772
12781
  { type: "int", value: args.multiplierBps },
12773
12782
  { type: "int", value: args.floorMarginUSD }
12774
12783
  ]);
@@ -12784,12 +12793,21 @@ var TonContractWrapper = class _TonContractWrapper extends BaseWrapper {
12784
12793
  ]);
12785
12794
  return getResult.stack.readCell();
12786
12795
  }
12796
+ async getNewArbitrumPriceFeedExtension(provider, args) {
12797
+ const getResult = await provider.get("ArbitrumPriceFeedExtension::New", [
12798
+ { type: "int", value: args.gasPerL2Tx },
12799
+ { type: "int", value: args.gasPerL1CallDataByte }
12800
+ ]);
12801
+ return getResult.stack.readCell();
12802
+ }
12787
12803
  async getNewPriceFeedFeelib(provider, args) {
12788
12804
  const getResult = await provider.get("PriceFeedFeelib::New", [
12789
12805
  { type: "int", value: args.priceRatio },
12790
- { type: "int", value: args.gasPriceInUnit },
12806
+ { type: "int", value: args.gasPriceInRemoteUnit },
12791
12807
  { type: "int", value: args.gasPerByte },
12792
- { type: "int", value: args.nativePriceUsd }
12808
+ { type: "int", value: args.nativePriceUsd },
12809
+ { type: "cell", cell: args.arbitrumExtension },
12810
+ { type: "cell", cell: args.optimismExtension }
12793
12811
  ]);
12794
12812
  return getResult.stack.readCell();
12795
12813
  }
@@ -12825,13 +12843,6 @@ var TonContractWrapper = class _TonContractWrapper extends BaseWrapper {
12825
12843
  ]);
12826
12844
  return getResult.stack.readCell();
12827
12845
  }
12828
- async getNewMdDropEvent(provider, args) {
12829
- const getResult = await provider.get("md::DropEvent::New", [
12830
- { type: "int", value: args.nativeAmount },
12831
- { type: "int", value: args.receiver }
12832
- ]);
12833
- return getResult.stack.readCell();
12834
- }
12835
12846
  async getNewMdExecuteParams(provider, args) {
12836
12847
  const getResult = await provider.get("md::ExecuteParams::New", [
12837
12848
  { type: "int", value: args.target },
@@ -12843,7 +12854,11 @@ var TonContractWrapper = class _TonContractWrapper extends BaseWrapper {
12843
12854
  return getResult.stack.readCell();
12844
12855
  }
12845
12856
  async getNewMdNativeDrop(provider, args) {
12846
- const getResult = await provider.get("md::NativeDrop::New", [{ type: "cell", cell: args.payees }]);
12857
+ const getResult = await provider.get("md::NativeDrop::New", [
12858
+ { type: "cell", cell: args.payees },
12859
+ { type: "cell", cell: args.packetId },
12860
+ { type: "int", value: args.msglib }
12861
+ ]);
12847
12862
  return getResult.stack.readCell();
12848
12863
  }
12849
12864
  async getNewMdSetDict(provider, args) {
@@ -12875,7 +12890,8 @@ var TonContractWrapper = class _TonContractWrapper extends BaseWrapper {
12875
12890
  const getResult = await provider.get("PriceFeedCache::New", [
12876
12891
  { type: "cell", cell: args.admins },
12877
12892
  { type: "int", value: args.version },
12878
- { type: "cell", cell: args.priceFeedFeeLib }
12893
+ { type: "cell", cell: args.priceFeedFeeLib },
12894
+ { type: "int", value: args.dstEid }
12879
12895
  ]);
12880
12896
  return getResult.stack.readCell();
12881
12897
  }
@@ -16493,12 +16509,12 @@ var TonObjectUnwrapper = class {
16493
16509
  }
16494
16510
  static async getDvnFeelibToTS(wrapper, cell) {
16495
16511
  const quorum = await wrapper.getClInt("cl::get<uint64>", cell, 0n);
16496
- const gas = await wrapper.getClInt("cl::get<uint64>", cell, 1n);
16512
+ const remoteGas = await wrapper.getClInt("cl::get<uint64>", cell, 1n);
16497
16513
  const multiplierBps = await wrapper.getClInt("cl::get<uint16>", cell, 2n);
16498
16514
  const floorMarginUSD = await wrapper.getClInt("cl::get<coins>", cell, 3n);
16499
16515
  return {
16500
16516
  quorum,
16501
- gas,
16517
+ remoteGas,
16502
16518
  multiplierBps,
16503
16519
  floorMarginUSD
16504
16520
  };
@@ -16517,16 +16533,28 @@ var TonObjectUnwrapper = class {
16517
16533
  lzComposeBaseGas
16518
16534
  };
16519
16535
  }
16536
+ static async getArbitrumPriceFeedExtensionToTS(wrapper, cell) {
16537
+ const gasPerL2Tx = await wrapper.getClInt("cl::get<uint64>", cell, 0n);
16538
+ const gasPerL1CallDataByte = await wrapper.getClInt("cl::get<uint32>", cell, 1n);
16539
+ return {
16540
+ gasPerL2Tx,
16541
+ gasPerL1CallDataByte
16542
+ };
16543
+ }
16520
16544
  static async getPriceFeedFeelibToTS(wrapper, cell) {
16521
16545
  const priceRatio = await wrapper.getClInt("cl::get<coins>", cell, 0n);
16522
- const gasPriceInUnit = await wrapper.getClInt("cl::get<uint64>", cell, 1n);
16546
+ const gasPriceInRemoteUnit = await wrapper.getClInt("cl::get<uint64>", cell, 1n);
16523
16547
  const gasPerByte = await wrapper.getClInt("cl::get<uint32>", cell, 2n);
16524
16548
  const nativePriceUsd = await wrapper.getClInt("cl::get<coins>", cell, 3n);
16549
+ const arbitrumExtension = await wrapper.getClCell(cell, 4n);
16550
+ const optimismExtension = await wrapper.getClCell(cell, 5n);
16525
16551
  return {
16526
16552
  priceRatio,
16527
- gasPriceInUnit,
16553
+ gasPriceInRemoteUnit,
16528
16554
  gasPerByte,
16529
- nativePriceUsd
16555
+ nativePriceUsd,
16556
+ arbitrumExtension,
16557
+ optimismExtension
16530
16558
  };
16531
16559
  }
16532
16560
  static async getWorkerCoreStorageToTS(wrapper, cell) {
@@ -16571,14 +16599,6 @@ var TonObjectUnwrapper = class {
16571
16599
  target
16572
16600
  };
16573
16601
  }
16574
- static async getMdDropEventToTS(wrapper, cell) {
16575
- const nativeAmount = await wrapper.getClInt("cl::get<coins>", cell, 0n);
16576
- const receiver = await wrapper.getClInt("cl::get<address>", cell, 1n);
16577
- return {
16578
- nativeAmount,
16579
- receiver
16580
- };
16581
- }
16582
16602
  static async getMdExecuteParamsToTS(wrapper, cell) {
16583
16603
  const target = await wrapper.getClInt("cl::get<address>", cell, 0n);
16584
16604
  const callData = await wrapper.getClCell(cell, 1n);
@@ -16595,8 +16615,12 @@ var TonObjectUnwrapper = class {
16595
16615
  }
16596
16616
  static async getMdNativeDropToTS(wrapper, cell) {
16597
16617
  const payees = await wrapper.getClCell(cell, 0n);
16618
+ const packetId = await wrapper.getClCell(cell, 1n);
16619
+ const msglib = await wrapper.getClInt("cl::get<address>", cell, 2n);
16598
16620
  return {
16599
- payees
16621
+ payees,
16622
+ packetId,
16623
+ msglib
16600
16624
  };
16601
16625
  }
16602
16626
  static async getMdSetDictToTS(wrapper, cell) {
@@ -16634,9 +16658,11 @@ var TonObjectUnwrapper = class {
16634
16658
  static async getPriceFeedCacheToTS(wrapper, cell) {
16635
16659
  const workerCoreStorage = await wrapper.getClCell(cell, 0n);
16636
16660
  const priceFeedFeeLibStorage = await wrapper.getClCell(cell, 1n);
16661
+ const dstEid = await wrapper.getClInt("cl::get<uint32>", cell, 2n);
16637
16662
  return {
16638
16663
  workerCoreStorage,
16639
- priceFeedFeeLibStorage
16664
+ priceFeedFeeLibStorage,
16665
+ dstEid
16640
16666
  };
16641
16667
  }
16642
16668
  static async getProxyToTS(wrapper, cell) {
@@ -16720,12 +16746,12 @@ var deconstructorMap = {
16720
16746
  ulnMgr: TonObjectUnwrapper.getUlnManagerToTS,
16721
16747
  UlnDvnFl: TonObjectUnwrapper.getDvnFeelibToTS,
16722
16748
  UlnExecutr: TonObjectUnwrapper.getExecutorFeelibToTS,
16749
+ ArbFeeExt: TonObjectUnwrapper.getArbitrumPriceFeedExtensionToTS,
16723
16750
  PFFeelib: TonObjectUnwrapper.getPriceFeedFeelibToTS,
16724
16751
  wrkCorStor: TonObjectUnwrapper.getWorkerCoreStorageToTS,
16725
16752
  dvn: TonObjectUnwrapper.getDvnToTS,
16726
16753
  executor: TonObjectUnwrapper.getExecutorToTS,
16727
16754
  claimTon: TonObjectUnwrapper.getMdClaimTonToTS,
16728
- DropEvent: TonObjectUnwrapper.getMdDropEventToTS,
16729
16755
  execParams: TonObjectUnwrapper.getMdExecuteParamsToTS,
16730
16756
  NativeDrop: TonObjectUnwrapper.getMdNativeDropToTS,
16731
16757
  setDct: TonObjectUnwrapper.getMdSetDictToTS,