@bgd-labs/toolbox 0.0.28 → 0.0.29
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/dist/index.d.mts +8 -3
- package/dist/index.d.ts +8 -3
- package/dist/index.js +39 -13
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +39 -13
- package/dist/index.mjs.map +1 -1
- package/dist/node.js +39 -13
- package/dist/node.js.map +1 -1
- package/dist/node.mjs +39 -13
- package/dist/node.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -33088,6 +33088,7 @@ function enhanceLogs(client, logs) {
|
|
|
33088
33088
|
}
|
|
33089
33089
|
return log;
|
|
33090
33090
|
}
|
|
33091
|
+
return log;
|
|
33091
33092
|
})
|
|
33092
33093
|
);
|
|
33093
33094
|
}
|
|
@@ -33491,18 +33492,26 @@ async function enhanceStateDiff(client, diff) {
|
|
|
33491
33492
|
}
|
|
33492
33493
|
if (isChangeOfType(change, "_streams")) {
|
|
33493
33494
|
await formatBeforeAndAfter(change, async (data) => {
|
|
33494
|
-
if (data.tokenAddress
|
|
33495
|
+
if (data.tokenAddress) {
|
|
33495
33496
|
const assetInfo = await findAsset(client, data.tokenAddress);
|
|
33496
|
-
|
|
33497
|
-
|
|
33498
|
-
|
|
33499
|
-
|
|
33500
|
-
|
|
33501
|
-
|
|
33502
|
-
|
|
33503
|
-
|
|
33504
|
-
|
|
33505
|
-
|
|
33497
|
+
if (data.ratePerSecond)
|
|
33498
|
+
data.ratePerSecond = prettifyNumber({
|
|
33499
|
+
decimals: assetInfo.decimals,
|
|
33500
|
+
value: data.ratePerSecond,
|
|
33501
|
+
showDecimals: true
|
|
33502
|
+
});
|
|
33503
|
+
if (data.remainingBalance)
|
|
33504
|
+
data.remainingBalance = prettifyNumber({
|
|
33505
|
+
showDecimals: true,
|
|
33506
|
+
decimals: assetInfo.decimals,
|
|
33507
|
+
value: data.remainingBalance
|
|
33508
|
+
});
|
|
33509
|
+
if (data.deposit)
|
|
33510
|
+
data.deposit = prettifyNumber({
|
|
33511
|
+
showDecimals: true,
|
|
33512
|
+
decimals: assetInfo.decimals,
|
|
33513
|
+
value: data.deposit
|
|
33514
|
+
});
|
|
33506
33515
|
}
|
|
33507
33516
|
return data;
|
|
33508
33517
|
});
|
|
@@ -33512,15 +33521,31 @@ async function enhanceStateDiff(client, diff) {
|
|
|
33512
33521
|
return addAssetPrice(client, data);
|
|
33513
33522
|
});
|
|
33514
33523
|
}
|
|
33515
|
-
if (
|
|
33524
|
+
if (change.type === "mapping (address => uint256)" || isChangeOfType(change, "totalSupply")) {
|
|
33516
33525
|
await formatBeforeAndAfter(change, async (data) => {
|
|
33517
33526
|
const asset = await findAsset(client, key);
|
|
33518
|
-
if (asset)
|
|
33527
|
+
if (asset) {
|
|
33519
33528
|
return prettifyNumber({
|
|
33520
33529
|
decimals: asset.decimals,
|
|
33521
33530
|
value: data,
|
|
33522
33531
|
showDecimals: true
|
|
33523
33532
|
});
|
|
33533
|
+
}
|
|
33534
|
+
return data;
|
|
33535
|
+
});
|
|
33536
|
+
}
|
|
33537
|
+
if (isChangeOfType(change, "_allowances") || isChangeOfType(change, "allowed")) {
|
|
33538
|
+
await formatBeforeAndAfter(change, async (data) => {
|
|
33539
|
+
const asset = await findAsset(client, key);
|
|
33540
|
+
if (asset && typeof data === "object") {
|
|
33541
|
+
Object.keys(data).forEach((key2) => {
|
|
33542
|
+
data[key2] = prettifyNumber({
|
|
33543
|
+
decimals: asset.decimals,
|
|
33544
|
+
value: data[key2],
|
|
33545
|
+
showDecimals: true
|
|
33546
|
+
});
|
|
33547
|
+
});
|
|
33548
|
+
}
|
|
33524
33549
|
return data;
|
|
33525
33550
|
});
|
|
33526
33551
|
}
|
|
@@ -33657,6 +33682,7 @@ ${payload.actions.map(
|
|
|
33657
33682
|
report += "\n";
|
|
33658
33683
|
}
|
|
33659
33684
|
if (logs.length) {
|
|
33685
|
+
console.log(logs);
|
|
33660
33686
|
report += "### Events emitted from the proposal\n\n";
|
|
33661
33687
|
report += "| Address | Event Name | Arguments |\n";
|
|
33662
33688
|
report += "|---------|------------|-----------|\n";
|