@gearbox-protocol/deploy-tools 5.18.7 → 5.18.8
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.mjs +81 -83
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -379100,27 +379100,56 @@ var AbstractLPPriceFeedContract = class _AbstractLPPriceFeedContract extends Abs
|
|
|
379100
379100
|
lpToken;
|
|
379101
379101
|
lowerBound;
|
|
379102
379102
|
upperBound;
|
|
379103
|
+
// v3.0 optionals
|
|
379104
|
+
exchangeRate;
|
|
379105
|
+
aggregatePrice;
|
|
379106
|
+
scale;
|
|
379103
379107
|
constructor(sdk, args) {
|
|
379104
379108
|
super(sdk, { ...args, decimals: 8 });
|
|
379105
379109
|
this.hasLowerBoundCap = true;
|
|
379106
|
-
|
|
379107
|
-
|
|
379108
|
-
|
|
379109
|
-
|
|
379110
|
-
|
|
379111
|
-
|
|
379112
|
-
|
|
379113
|
-
|
|
379114
|
-
|
|
379115
|
-
|
|
379116
|
-
|
|
379117
|
-
]
|
|
379118
|
-
|
|
379119
|
-
|
|
379120
|
-
|
|
379121
|
-
|
|
379122
|
-
|
|
379123
|
-
|
|
379110
|
+
if (args.baseParams.version === 310n) {
|
|
379111
|
+
const decoder = decodeAbiParameters(
|
|
379112
|
+
[
|
|
379113
|
+
{ type: "address", name: "lpToken" },
|
|
379114
|
+
{ type: "address", name: "lpContract" },
|
|
379115
|
+
{ type: "uint256", name: "lowerBound" },
|
|
379116
|
+
{ type: "uint256", name: "upperBound" }
|
|
379117
|
+
],
|
|
379118
|
+
hexToBytes(args.baseParams.serializedParams)
|
|
379119
|
+
);
|
|
379120
|
+
this.lpToken = decoder[0];
|
|
379121
|
+
this.lpContract = decoder[1];
|
|
379122
|
+
this.lowerBound = decoder[2];
|
|
379123
|
+
this.upperBound = decoder[3];
|
|
379124
|
+
} else {
|
|
379125
|
+
const decoder = decodeAbiParameters(
|
|
379126
|
+
[
|
|
379127
|
+
{ type: "address", name: "lpToken" },
|
|
379128
|
+
{ type: "address", name: "lpContract" },
|
|
379129
|
+
{ type: "uint256", name: "lowerBound" },
|
|
379130
|
+
{ type: "uint256", name: "upperBound" },
|
|
379131
|
+
{
|
|
379132
|
+
type: "tuple",
|
|
379133
|
+
name: "price",
|
|
379134
|
+
components: [
|
|
379135
|
+
{ type: "uint256", name: "exchangeRate" },
|
|
379136
|
+
{ type: "int256", name: "aggregatePrice" },
|
|
379137
|
+
{ type: "uint256", name: "scale" },
|
|
379138
|
+
{ type: "bool", name: "exchangeRateSuccess" },
|
|
379139
|
+
{ type: "bool", name: "aggregatePriceSuccess" }
|
|
379140
|
+
]
|
|
379141
|
+
}
|
|
379142
|
+
],
|
|
379143
|
+
hexToBytes(args.baseParams.serializedParams)
|
|
379144
|
+
);
|
|
379145
|
+
this.lpToken = decoder[0];
|
|
379146
|
+
this.lpContract = decoder[1];
|
|
379147
|
+
this.lowerBound = decoder[2];
|
|
379148
|
+
this.upperBound = decoder[3];
|
|
379149
|
+
this.exchangeRate = decoder[4].exchangeRate;
|
|
379150
|
+
this.aggregatePrice = decoder[4].aggregatePrice;
|
|
379151
|
+
this.scale = decoder[4].scale;
|
|
379152
|
+
}
|
|
379124
379153
|
}
|
|
379125
379154
|
async getLowerBound() {
|
|
379126
379155
|
const value = await this.getValue();
|
|
@@ -379139,7 +379168,11 @@ var AbstractLPPriceFeedContract = class _AbstractLPPriceFeedContract extends Abs
|
|
|
379139
379168
|
lpContract: this.lpContract,
|
|
379140
379169
|
lpToken: this.lpToken,
|
|
379141
379170
|
lowerBound: this.lowerBound,
|
|
379142
|
-
upperBound: this.upperBound
|
|
379171
|
+
upperBound: this.upperBound,
|
|
379172
|
+
// v3.0 optionals
|
|
379173
|
+
exchangeRate: this.exchangeRate?.toString(),
|
|
379174
|
+
aggregatePrice: this.aggregatePrice?.toString(),
|
|
379175
|
+
scale: this.scale?.toString()
|
|
379143
379176
|
};
|
|
379144
379177
|
}
|
|
379145
379178
|
};
|
|
@@ -379467,6 +379500,8 @@ var RedstonePriceFeedContract = class extends AbstractPriceFeedContract {
|
|
|
379467
379500
|
dataId;
|
|
379468
379501
|
signers;
|
|
379469
379502
|
signersThreshold;
|
|
379503
|
+
lastPrice;
|
|
379504
|
+
lastPayloadTimestamp;
|
|
379470
379505
|
constructor(sdk, args) {
|
|
379471
379506
|
super(sdk, {
|
|
379472
379507
|
...args,
|
|
@@ -379476,87 +379511,48 @@ var RedstonePriceFeedContract = class extends AbstractPriceFeedContract {
|
|
|
379476
379511
|
if (args.baseParams.version === 310n) {
|
|
379477
379512
|
const decoder = decodeAbiParameters(
|
|
379478
379513
|
[
|
|
379479
|
-
{ type: "address" },
|
|
379480
|
-
|
|
379481
|
-
{ type: "
|
|
379482
|
-
|
|
379483
|
-
{ type: "
|
|
379484
|
-
|
|
379485
|
-
{ type: "
|
|
379486
|
-
// [3]: pf.signerAddress0(),
|
|
379487
|
-
{ type: "address" },
|
|
379488
|
-
// [4]: pf.signerAddress1(),
|
|
379489
|
-
{ type: "address" },
|
|
379490
|
-
// [5]: pf.signerAddress2(),
|
|
379491
|
-
{ type: "address" },
|
|
379492
|
-
// [6]: pf.signerAddress3(),
|
|
379493
|
-
{ type: "address" },
|
|
379494
|
-
// [7]: pf.signerAddress4(),
|
|
379495
|
-
{ type: "address" },
|
|
379496
|
-
// [8]: pf.signerAddress5()
|
|
379497
|
-
{ type: "address" },
|
|
379498
|
-
// [9]: pf.signerAddress6(),
|
|
379499
|
-
{ type: "address" },
|
|
379500
|
-
// [10]: pf.signerAddress7(),
|
|
379501
|
-
{ type: "address" },
|
|
379502
|
-
// [11]: pf.signerAddress8(),
|
|
379503
|
-
{ type: "address" },
|
|
379504
|
-
// [12]: pf.signerAddress9(),
|
|
379505
|
-
{ type: "uint8" },
|
|
379506
|
-
// [13]: pf.getUniqueSignersThreshold()
|
|
379507
|
-
{ type: "uint128" },
|
|
379508
|
-
// [14]: pf.lastPrice(),
|
|
379509
|
-
{ type: "uint40" }
|
|
379510
|
-
// [15]: pf.lastPayloadTimestamp()
|
|
379514
|
+
{ type: "address", name: "token" },
|
|
379515
|
+
{ type: "bytes32", name: "dataFeedId" },
|
|
379516
|
+
{ type: "string", name: "dataServiceId" },
|
|
379517
|
+
{ type: "address[10]", name: "signers" },
|
|
379518
|
+
{ type: "uint8", name: "signersThreshold" },
|
|
379519
|
+
{ type: "uint128", name: "lastPrice" },
|
|
379520
|
+
{ type: "uint40", name: "lastPayloadTimestamp" }
|
|
379511
379521
|
],
|
|
379512
379522
|
args.baseParams.serializedParams
|
|
379513
379523
|
);
|
|
379514
379524
|
this.token = decoder[0];
|
|
379515
379525
|
this.dataId = bytesToString(toBytes(decoder[1])).replaceAll("\0", "");
|
|
379516
|
-
this.signers = decoder.slice(3, 13);
|
|
379517
|
-
this.signersThreshold = Number(decoder[13]);
|
|
379518
379526
|
this.dataServiceId = decoder[2];
|
|
379527
|
+
this.signers = [...decoder[3]];
|
|
379528
|
+
this.signersThreshold = Number(decoder[4]);
|
|
379529
|
+
this.lastPrice = decoder[5];
|
|
379530
|
+
this.lastPayloadTimestamp = Number(decoder[6]);
|
|
379519
379531
|
} else {
|
|
379520
379532
|
const decoder = decodeAbiParameters(
|
|
379521
379533
|
[
|
|
379522
379534
|
{ type: "address" },
|
|
379523
|
-
//
|
|
379535
|
+
// pf.token(),
|
|
379524
379536
|
{ type: "bytes32" },
|
|
379525
|
-
//
|
|
379526
|
-
{ type: "address" },
|
|
379527
|
-
//
|
|
379528
|
-
{ type: "address" },
|
|
379529
|
-
// [3]: pf.signerAddress1(),
|
|
379530
|
-
{ type: "address" },
|
|
379531
|
-
// [4]: pf.signerAddress2(),
|
|
379532
|
-
{ type: "address" },
|
|
379533
|
-
// [5]: pf.signerAddress3(),
|
|
379534
|
-
{ type: "address" },
|
|
379535
|
-
// [6]: pf.signerAddress4(),
|
|
379536
|
-
{ type: "address" },
|
|
379537
|
-
// [7]: pf.signerAddress5()
|
|
379538
|
-
{ type: "address" },
|
|
379539
|
-
// [8]: pf.signerAddress6(),
|
|
379540
|
-
{ type: "address" },
|
|
379541
|
-
// [9]: pf.signerAddress7(),
|
|
379542
|
-
{ type: "address" },
|
|
379543
|
-
// [10]: pf.signerAddress8(),
|
|
379544
|
-
{ type: "address" },
|
|
379545
|
-
// [11]: pf.signerAddress9(),
|
|
379537
|
+
// pf.dataFeedId(),
|
|
379538
|
+
{ type: "address[10]" },
|
|
379539
|
+
// signers,
|
|
379546
379540
|
{ type: "uint8" },
|
|
379547
|
-
//
|
|
379541
|
+
// pf.getUniqueSignersThreshold(),
|
|
379548
379542
|
{ type: "uint128" },
|
|
379549
|
-
//
|
|
379543
|
+
// pf.lastPrice(),
|
|
379550
379544
|
{ type: "uint40" }
|
|
379551
|
-
//
|
|
379545
|
+
// pf.lastPayloadTimestamp()
|
|
379552
379546
|
],
|
|
379553
379547
|
args.baseParams.serializedParams
|
|
379554
379548
|
);
|
|
379555
379549
|
this.token = decoder[0];
|
|
379556
379550
|
this.dataId = bytesToString(toBytes(decoder[1])).replaceAll("\0", "");
|
|
379557
|
-
this.signers = decoder
|
|
379558
|
-
this.signersThreshold = Number(decoder[
|
|
379551
|
+
this.signers = [...decoder[2]];
|
|
379552
|
+
this.signersThreshold = Number(decoder[3]);
|
|
379559
379553
|
this.dataServiceId = ["GMX", "BAL"].includes(this.dataId) ? "redstone-arbitrum-prod" : "redstone-primary-prod";
|
|
379554
|
+
this.lastPrice = decoder[4];
|
|
379555
|
+
this.lastPayloadTimestamp = Number(decoder[5]);
|
|
379560
379556
|
}
|
|
379561
379557
|
}
|
|
379562
379558
|
stateHuman(raw = true) {
|
|
@@ -379566,7 +379562,9 @@ var RedstonePriceFeedContract = class extends AbstractPriceFeedContract {
|
|
|
379566
379562
|
dataId: this.dataId,
|
|
379567
379563
|
signers: this.signers,
|
|
379568
379564
|
signersThreshold: this.signersThreshold,
|
|
379569
|
-
skipCheck: true
|
|
379565
|
+
skipCheck: true,
|
|
379566
|
+
lastPrice: this.lastPrice.toString(),
|
|
379567
|
+
lastPayloadTimestamp: this.lastPayloadTimestamp.toString()
|
|
379570
379568
|
};
|
|
379571
379569
|
}
|
|
379572
379570
|
};
|
|
@@ -417536,7 +417534,7 @@ function getRenderer(opts) {
|
|
|
417536
417534
|
var package_default = {
|
|
417537
417535
|
name: "@gearbox-protocol/deploy-tools",
|
|
417538
417536
|
description: "Gearbox deploy tools",
|
|
417539
|
-
version: "5.18.
|
|
417537
|
+
version: "5.18.8",
|
|
417540
417538
|
homepage: "https://gearbox.fi",
|
|
417541
417539
|
keywords: [
|
|
417542
417540
|
"gearbox"
|
|
@@ -417579,7 +417577,7 @@ var package_default = {
|
|
|
417579
417577
|
"@gearbox-protocol/deploy-tools-node": "0.0.0",
|
|
417580
417578
|
"@gearbox-protocol/deploy-tools-shared": "0.0.0",
|
|
417581
417579
|
"@gearbox-protocol/deploy-tools-types": "0.0.0",
|
|
417582
|
-
"@gearbox-protocol/sdk": "3.0.0-vfour.
|
|
417580
|
+
"@gearbox-protocol/sdk": "3.0.0-vfour.302",
|
|
417583
417581
|
"@gearbox-protocol/sdk-gov": "^2.36.6",
|
|
417584
417582
|
"@types/lodash-es": "^4.17.12",
|
|
417585
417583
|
"@types/node": "^22.13.10",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gearbox-protocol/deploy-tools",
|
|
3
3
|
"description": "Gearbox deploy tools",
|
|
4
|
-
"version": "5.18.
|
|
4
|
+
"version": "5.18.8",
|
|
5
5
|
"homepage": "https://gearbox.fi",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"gearbox"
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@gearbox-protocol/deploy-tools-node": "0.0.0",
|
|
45
45
|
"@gearbox-protocol/deploy-tools-shared": "0.0.0",
|
|
46
46
|
"@gearbox-protocol/deploy-tools-types": "0.0.0",
|
|
47
|
-
"@gearbox-protocol/sdk": "3.0.0-vfour.
|
|
47
|
+
"@gearbox-protocol/sdk": "3.0.0-vfour.302",
|
|
48
48
|
"@gearbox-protocol/sdk-gov": "^2.36.6",
|
|
49
49
|
"@types/lodash-es": "^4.17.12",
|
|
50
50
|
"@types/node": "^22.13.10",
|