@layerzerolabs/ton-sdk-tools 3.0.85 → 3.0.87

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/ton-sdk-tools
2
2
 
3
+ ## 3.0.87
4
+
5
+ ### Patch Changes
6
+
7
+ - e92c65d: Update initia.js version
8
+
9
+ ## 3.0.86
10
+
11
+ ### Patch Changes
12
+
13
+ - a372bd0: Fix import bugs in generated test codes and add feature for testing malicious DVNs in ton-sdk-tools.
14
+
3
15
  ## 3.0.85
4
16
 
5
17
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -1135,7 +1135,8 @@ function saveViewFunctions(viewFunctions, directory, filename) {
1135
1135
  const generated = [
1136
1136
  file_signature_header,
1137
1137
  `import { Address, Cell, Tuple, TupleItem, beginCell } from '@ton/core'`,
1138
- `import { ExtendedContract, TonContractWrapper } from '../wrappers'`,
1138
+ `import { TonContractWrapper } from '../wrappers'`,
1139
+ `import { ExtendedContract } from '@layerzerolabs/ton-sdk-tools'`,
1139
1140
  ""
1140
1141
  ];
1141
1142
  for (const [contractName, functions] of Object.entries(viewFunctions)) {
@@ -3154,11 +3155,12 @@ import ExecutorArtifact from '@layerzerolabs/layerzero-v2-ton/build/Executor.com
3154
3155
  import ExecutorFeelibArtifact from '@layerzerolabs/layerzero-v2-ton/build/ExecutorFeeLib.compiled.json'
3155
3156
  import PriceFeedCacheArtifact from '@layerzerolabs/layerzero-v2-ton/build/PriceFeedCache.compiled.json'
3156
3157
  import PriceFeedFeeLibDefaultArtifact from '@layerzerolabs/layerzero-v2-ton/build/PriceFeedFeeLibDefault.compiled.json'
3158
+ import MaliciousFeeLibArtifact from '@layerzerolabs/layerzero-v2-ton/build/MaliciousFeeLib.compiled.json'
3157
3159
  import ProxyArtifact from '@layerzerolabs/layerzero-v2-ton/build/Proxy.compiled.json'
3158
3160
  import UlnArtifact from '@layerzerolabs/layerzero-v2-ton/build/Uln.compiled.json'
3159
3161
  import UlnConnectionArtifact from '@layerzerolabs/layerzero-v2-ton/build/UlnConnection.compiled.json'
3160
3162
  import UlnManagerArtifact from '@layerzerolabs/layerzero-v2-ton/build/UlnManager.compiled.json'
3161
- import { ExtendedContract, Profile, addressToBigInt, cellFromArtifact, sendInternalMessageAndExpect, sendMessageViaMultisigAndExpect, } from '@layerzerolabs/ton-sdk-tools'
3163
+ import { BlueprintArtfiact, ExtendedContract, Profile, addressToBigInt, cellFromArtifact, sendInternalMessageAndExpect, sendMessageViaMultisigAndExpect, } from '@layerzerolabs/ton-sdk-tools'
3162
3164
 
3163
3165
  import {
3164
3166
  OAppFixture,
@@ -3398,19 +3400,26 @@ export async function addDvnWorkers(
3398
3400
  receiveDvnFixtures: DvnFixture[],
3399
3401
  dstEid: bigint,
3400
3402
  priceFeedCacheAddress: Address,
3401
- eventHandler: LzEventHandler
3403
+ eventHandler: LzEventHandler,
3404
+ addMaliciousWorker = false
3402
3405
  ): Promise<void> {
3403
3406
  requireDefined(sendDvnFixtures)
3404
3407
  requireDefined(receiveDvnFixtures)
3405
3408
  const msglib = uln.get(dstEid)
3406
3409
  requireDefined(msglib)
3410
+ let feelibArtifact: BlueprintArtfiact
3411
+ if (addMaliciousWorker) {
3412
+ feelibArtifact = MaliciousFeeLibArtifact
3413
+ } else {
3414
+ feelibArtifact = DvnFeelibArtifact
3415
+ }
3407
3416
  for (const dvnFixture of [...sendDvnFixtures, ...receiveDvnFixtures]) {
3408
3417
  const dvnWorkerCallMd = await allStorages.getNewMdExecuteParams({
3409
3418
  target: addressToBigInt(msglibManager.address),
3410
3419
  forwardingAddress: 0n,
3411
3420
  callData: await allStorages.getNewUlnWorkerFeelibInfo({
3412
3421
  workerAddress: addressToBigInt(dvnFixture.dvn.address),
3413
- workerFeelibBytecode: cellFromArtifact(DvnFeelibArtifact),
3422
+ workerFeelibBytecode: cellFromArtifact(feelibArtifact),
3414
3423
  workerFeelibStorage: await allStorages.getNewDvnFeelib({
3415
3424
  quorum: BigInt(0),
3416
3425
  remoteGas: BigInt(0),
@@ -3983,6 +3992,18 @@ export async function deployConfigAndRegisterUln(
3983
3992
  )
3984
3993
  await eventHandler.addCurrentEventsToAllEvents(internalMsgResults, srcFixture.msglibManager)
3985
3994
 
3995
+ // ===================================registerUlnWorkerInfo - maliciousFeeLib=======================================
3996
+
3997
+ internalMsgResults = await registerUlnWorkerInfo(
3998
+ blockchain,
3999
+ multiSigners,
4000
+ srcFixture,
4001
+ await allStorages.getNewMdUlnWorkerFeelibBytecode({
4002
+ bytecode: cellFromArtifact(MaliciousFeeLibArtifact),
4003
+ })
4004
+ )
4005
+ await eventHandler.addCurrentEventsToAllEvents(internalMsgResults, srcFixture.msglibManager)
4006
+
3986
4007
  // ============================registerUlnWorkerInfo - executorFeeLib=======================================
3987
4008
 
3988
4009
  internalMsgResults = await registerUlnWorkerInfo(