@layerzerolabs/ton-sdk-tools 3.0.100 → 3.0.102
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 +12 -0
- package/dist/index.cjs +49 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +49 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @layerzerolabs/ton-sdk-tools
|
|
2
2
|
|
|
3
|
+
## 3.0.102
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- e8ffadd: remaining deployments for katana-testnet
|
|
8
|
+
|
|
9
|
+
## 3.0.101
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- efcbaf2: endpoints: katana testnet, mainnet, botanix mainnet
|
|
14
|
+
|
|
3
15
|
## 3.0.100
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/index.cjs
CHANGED
|
@@ -5,7 +5,6 @@ var path = require('path');
|
|
|
5
5
|
var core = require('@ton/core');
|
|
6
6
|
var crc32 = require('crc-32');
|
|
7
7
|
var ethers = require('ethers');
|
|
8
|
-
var Event = require('@ton/sandbox/dist/event/Event');
|
|
9
8
|
var testUtils = require('@ton/test-utils');
|
|
10
9
|
var sha256Js = require('@aws-crypto/sha256-js');
|
|
11
10
|
var crypto = require('@ton/crypto');
|
|
@@ -5578,6 +5577,54 @@ var Order = class _Order {
|
|
|
5578
5577
|
};
|
|
5579
5578
|
}
|
|
5580
5579
|
};
|
|
5580
|
+
|
|
5581
|
+
// src/externalWrappers/event-utils.ts
|
|
5582
|
+
var extractors = [extractAccountCreated, extractMessageSent, extractAccountDestroyed];
|
|
5583
|
+
function extractEvents2(tx) {
|
|
5584
|
+
return extractors.map((f) => f(tx)).flat();
|
|
5585
|
+
}
|
|
5586
|
+
function doesAccountExist(state) {
|
|
5587
|
+
return !(state === "uninitialized" || state === "non-existing");
|
|
5588
|
+
}
|
|
5589
|
+
function extractAccountCreated(tx) {
|
|
5590
|
+
if (!doesAccountExist(tx.oldStatus) && doesAccountExist(tx.endStatus))
|
|
5591
|
+
return [
|
|
5592
|
+
{
|
|
5593
|
+
type: "account_created",
|
|
5594
|
+
account: tx.inMessage.info.dest
|
|
5595
|
+
}
|
|
5596
|
+
];
|
|
5597
|
+
return [];
|
|
5598
|
+
}
|
|
5599
|
+
function extractAccountDestroyed(tx) {
|
|
5600
|
+
if (doesAccountExist(tx.oldStatus) && !doesAccountExist(tx.endStatus))
|
|
5601
|
+
return [
|
|
5602
|
+
{
|
|
5603
|
+
type: "account_destroyed",
|
|
5604
|
+
account: tx.inMessage.info.dest
|
|
5605
|
+
}
|
|
5606
|
+
];
|
|
5607
|
+
return [];
|
|
5608
|
+
}
|
|
5609
|
+
function extractMessageSent(tx) {
|
|
5610
|
+
return tx.outMessages.values().flatMap((m) => {
|
|
5611
|
+
if (m.info.type !== "internal") {
|
|
5612
|
+
return [];
|
|
5613
|
+
}
|
|
5614
|
+
return [
|
|
5615
|
+
{
|
|
5616
|
+
type: "message_sent",
|
|
5617
|
+
from: m.info.src,
|
|
5618
|
+
to: m.info.dest,
|
|
5619
|
+
value: m.info.value.coins,
|
|
5620
|
+
body: m.body,
|
|
5621
|
+
bounced: m.info.bounced
|
|
5622
|
+
}
|
|
5623
|
+
];
|
|
5624
|
+
});
|
|
5625
|
+
}
|
|
5626
|
+
|
|
5627
|
+
// src/externalWrappers/multisig-utils.ts
|
|
5581
5628
|
var differentAddress = (oldAddr) => {
|
|
5582
5629
|
let newAddr;
|
|
5583
5630
|
do {
|
|
@@ -5642,7 +5689,7 @@ var Txiterator = class {
|
|
|
5642
5689
|
const res = await smc.receiveMessage(inMsg, { now: this.blockchain.now });
|
|
5643
5690
|
const bcRes = {
|
|
5644
5691
|
...res,
|
|
5645
|
-
events:
|
|
5692
|
+
events: extractEvents2(res),
|
|
5646
5693
|
parent: curMsg.parent,
|
|
5647
5694
|
children: [],
|
|
5648
5695
|
externals: []
|