@gearbox-protocol/deploy-tools 3.4.1-next.6 → 3.4.1-next.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 +133 -25
- package/package.json +5 -5
package/dist/index.mjs
CHANGED
|
@@ -6881,6 +6881,8 @@ var require_decimals = __commonJS({
|
|
|
6881
6881
|
AURA: 18,
|
|
6882
6882
|
WLD: 18,
|
|
6883
6883
|
OP: 18,
|
|
6884
|
+
osETH: 18,
|
|
6885
|
+
weETH: 18,
|
|
6884
6886
|
"3Crv": 18,
|
|
6885
6887
|
crvFRAX: 18,
|
|
6886
6888
|
OHMFRAXBP: 18,
|
|
@@ -6962,7 +6964,10 @@ var require_decimals = __commonJS({
|
|
|
6962
6964
|
BPT_rETH_ETH: 18,
|
|
6963
6965
|
BPT_ROAD: 18,
|
|
6964
6966
|
BPT_WSTETH_ETH: 18,
|
|
6967
|
+
ECLP_wstETH_WETH: 18,
|
|
6965
6968
|
B_rETH_STABLE: 18,
|
|
6969
|
+
weETH_rETH: 18,
|
|
6970
|
+
osETH_wETH_BPT: 18,
|
|
6966
6971
|
auraB_rETH_STABLE: 18,
|
|
6967
6972
|
auraB_rETH_STABLE_vault: 18,
|
|
6968
6973
|
auraBPT_rETH_ETH: 18,
|
|
@@ -7353,6 +7358,24 @@ var require_balancer = __commonJS({
|
|
|
7353
7358
|
underlying: ["rETH", "WETH"],
|
|
7354
7359
|
poolId: "0x1e19cf2d73a72ef1332c882f20534b6519be0276000200000000000000000112"
|
|
7355
7360
|
},
|
|
7361
|
+
weETH_rETH: {
|
|
7362
|
+
name: "Balancer weETH/rETH Stable pool",
|
|
7363
|
+
symbol: "weETH_rETH",
|
|
7364
|
+
type: {
|
|
7365
|
+
AllNetworks: tokenType_1.TokenType.BALANCER_LP_TOKEN
|
|
7366
|
+
},
|
|
7367
|
+
underlying: ["rETH", "weETH"],
|
|
7368
|
+
poolId: "0x05ff47afada98a98982113758878f9a8b9fdda0a000000000000000000000645"
|
|
7369
|
+
},
|
|
7370
|
+
osETH_wETH_BPT: {
|
|
7371
|
+
name: "Balancer osETH/WETH Stable pool",
|
|
7372
|
+
symbol: "osETH_wETH_BPT",
|
|
7373
|
+
type: {
|
|
7374
|
+
AllNetworks: tokenType_1.TokenType.BALANCER_LP_TOKEN
|
|
7375
|
+
},
|
|
7376
|
+
underlying: ["WETH", "osETH"],
|
|
7377
|
+
poolId: "0xdacf5fa19b1f720111609043ac67a9818262850c000000000000000000000635"
|
|
7378
|
+
},
|
|
7356
7379
|
BPT_rETH_ETH: {
|
|
7357
7380
|
name: "BeethovenX rETH-ETH Pool",
|
|
7358
7381
|
symbol: "BPT_rETH_ETH",
|
|
@@ -7379,6 +7402,15 @@ var require_balancer = __commonJS({
|
|
|
7379
7402
|
},
|
|
7380
7403
|
underlying: ["WETH", "OP", "USDC"],
|
|
7381
7404
|
poolId: "0x39965c9dab5448482cf7e002f583c812ceb53046000100000000000000000003"
|
|
7405
|
+
},
|
|
7406
|
+
ECLP_wstETH_WETH: {
|
|
7407
|
+
name: "BeethovenX ECLP wstETH-ETH Pool",
|
|
7408
|
+
symbol: "ECLP_wstETH_WETH",
|
|
7409
|
+
type: {
|
|
7410
|
+
AllNetworks: tokenType_1.TokenType.BALANCER_LP_TOKEN
|
|
7411
|
+
},
|
|
7412
|
+
underlying: ["wstETH", "WETH"],
|
|
7413
|
+
poolId: "0x7ca75bdea9dede97f8b13c6641b768650cb837820002000000000000000000d5"
|
|
7382
7414
|
}
|
|
7383
7415
|
};
|
|
7384
7416
|
var isBalancerLPToken = (t) => typeof t === "string" && !!exports2.balancerLpTokens[t];
|
|
@@ -105858,6 +105890,16 @@ var require_normal = __commonJS({
|
|
|
105858
105890
|
name: "Aura Token",
|
|
105859
105891
|
symbol: "AURA",
|
|
105860
105892
|
type: { AllNetworks: tokenType_1.TokenType.NORMAL_TOKEN }
|
|
105893
|
+
},
|
|
105894
|
+
osETH: {
|
|
105895
|
+
name: "Stakewise ETH",
|
|
105896
|
+
symbol: "osETH",
|
|
105897
|
+
type: { AllNetworks: tokenType_1.TokenType.NORMAL_TOKEN }
|
|
105898
|
+
},
|
|
105899
|
+
weETH: {
|
|
105900
|
+
name: "ether.fi ETH",
|
|
105901
|
+
symbol: "weETH",
|
|
105902
|
+
type: { AllNetworks: tokenType_1.TokenType.NORMAL_TOKEN }
|
|
105861
105903
|
}
|
|
105862
105904
|
};
|
|
105863
105905
|
var isNormalToken = (t) => typeof t === "string" && !!exports2.normalTokens[t];
|
|
@@ -106041,6 +106083,8 @@ var require_token = __commonJS({
|
|
|
106041
106083
|
AURA: "0xC0c293ce456fF0ED870ADd98a0828Dd4d2903DBF",
|
|
106042
106084
|
WLD: "0x163f8C2467924be0ae7B5347228CABF260318753",
|
|
106043
106085
|
OP: constants_1.NOT_DEPLOYED,
|
|
106086
|
+
osETH: "0xf1C9acDc66974dFB6dEcB12aA385b9cD01190E38",
|
|
106087
|
+
weETH: "0xCd5fE23C85820F7B72D0926FC9b05b43E359b7ee",
|
|
106044
106088
|
// CURVE LP TOKENS
|
|
106045
106089
|
"3Crv": "0x6c3F90f043a72FA612cbac8115EE7e52BDe6E490",
|
|
106046
106090
|
crvFRAX: "0x3175Df0976dFA876431C2E9eE6Bc45b65d3473CC",
|
|
@@ -106113,9 +106157,12 @@ var require_token = __commonJS({
|
|
|
106113
106157
|
OHM_wstETH: "0xd4f79CA0Ac83192693bce4699d0c10C66Aa6Cf0F",
|
|
106114
106158
|
USDC_DAI_USDT: "0x79c58f70905F734641735BC61e45c19dD9Ad60bC",
|
|
106115
106159
|
B_rETH_STABLE: "0x1E19CF2D73a72Ef1332C882F20534B6519Be0276",
|
|
106160
|
+
weETH_rETH: "0x05ff47AFADa98a98982113758878F9A8B9FddA0a",
|
|
106161
|
+
osETH_wETH_BPT: "0xDACf5Fa19b1f720111609043ac67A9818262850c",
|
|
106116
106162
|
BPT_rETH_ETH: constants_1.NOT_DEPLOYED,
|
|
106117
106163
|
BPT_WSTETH_ETH: constants_1.NOT_DEPLOYED,
|
|
106118
106164
|
BPT_ROAD: constants_1.NOT_DEPLOYED,
|
|
106165
|
+
ECLP_wstETH_WETH: constants_1.NOT_DEPLOYED,
|
|
106119
106166
|
// AURA
|
|
106120
106167
|
auraB_rETH_STABLE: "0x9497df26e5bD669Cb925eC68E730492b9300c482",
|
|
106121
106168
|
auraBPT_rETH_ETH: constants_1.NOT_DEPLOYED,
|
|
@@ -106203,6 +106250,8 @@ var require_token = __commonJS({
|
|
|
106203
106250
|
rETH: constants_1.NOT_DEPLOYED,
|
|
106204
106251
|
WLD: constants_1.NOT_DEPLOYED,
|
|
106205
106252
|
OP: constants_1.NOT_DEPLOYED,
|
|
106253
|
+
osETH: constants_1.NOT_DEPLOYED,
|
|
106254
|
+
weETH: constants_1.NOT_DEPLOYED,
|
|
106206
106255
|
// REDSTONE
|
|
106207
106256
|
SHIB: constants_1.NOT_DEPLOYED,
|
|
106208
106257
|
// YEARN TOKENS
|
|
@@ -106280,6 +106329,9 @@ var require_token = __commonJS({
|
|
|
106280
106329
|
BPT_rETH_ETH: constants_1.NOT_DEPLOYED,
|
|
106281
106330
|
BPT_WSTETH_ETH: constants_1.NOT_DEPLOYED,
|
|
106282
106331
|
BPT_ROAD: constants_1.NOT_DEPLOYED,
|
|
106332
|
+
ECLP_wstETH_WETH: constants_1.NOT_DEPLOYED,
|
|
106333
|
+
weETH_rETH: constants_1.NOT_DEPLOYED,
|
|
106334
|
+
osETH_wETH_BPT: constants_1.NOT_DEPLOYED,
|
|
106283
106335
|
// AURA
|
|
106284
106336
|
auraB_rETH_STABLE: constants_1.NOT_DEPLOYED,
|
|
106285
106337
|
auraBPT_rETH_ETH: constants_1.NOT_DEPLOYED,
|
|
@@ -106365,6 +106417,8 @@ var require_token = __commonJS({
|
|
|
106365
106417
|
RPL: "0xC81D1F0EB955B0c020E5d5b264E1FF72c14d1401",
|
|
106366
106418
|
APE: constants_1.NOT_DEPLOYED,
|
|
106367
106419
|
rETH: "0x9Bcef72be871e61ED4fBbc7630889beE758eb81D",
|
|
106420
|
+
osETH: constants_1.NOT_DEPLOYED,
|
|
106421
|
+
weETH: constants_1.NOT_DEPLOYED,
|
|
106368
106422
|
// REDSTONE
|
|
106369
106423
|
SHIB: constants_1.NOT_DEPLOYED,
|
|
106370
106424
|
// YEARN TOKENS
|
|
@@ -106439,9 +106493,12 @@ var require_token = __commonJS({
|
|
|
106439
106493
|
OHM_wstETH: constants_1.NOT_DEPLOYED,
|
|
106440
106494
|
USDC_DAI_USDT: constants_1.NOT_DEPLOYED,
|
|
106441
106495
|
B_rETH_STABLE: constants_1.NOT_DEPLOYED,
|
|
106496
|
+
weETH_rETH: constants_1.NOT_DEPLOYED,
|
|
106497
|
+
osETH_wETH_BPT: constants_1.NOT_DEPLOYED,
|
|
106442
106498
|
BPT_rETH_ETH: "0x4Fd63966879300caFafBB35D157dC5229278Ed23",
|
|
106443
106499
|
BPT_WSTETH_ETH: "0x7B50775383d3D6f0215A8F290f2C9e2eEBBEceb2",
|
|
106444
106500
|
BPT_ROAD: "0x39965c9dAb5448482Cf7e002F583c812Ceb53046",
|
|
106501
|
+
ECLP_wstETH_WETH: "0x7Ca75bdEa9dEde97F8B13C6641B768650CB83782",
|
|
106445
106502
|
// AURA
|
|
106446
106503
|
auraB_rETH_STABLE: constants_1.NOT_DEPLOYED,
|
|
106447
106504
|
auraBPT_rETH_ETH: "0x094C6846Fb2801b4753182ADFac336AAE8030A46",
|
|
@@ -107599,7 +107656,7 @@ var require_formatter2 = __commonJS({
|
|
|
107599
107656
|
"../../node_modules/@gearbox-protocol/sdk-gov/lib/utils/formatter.js"(exports2) {
|
|
107600
107657
|
"use strict";
|
|
107601
107658
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
107602
|
-
exports2.fmtContract = exports2.fmtTreasury = exports2.fmtBinaryMask = exports2.getTokenSymbolOrAddress = exports2.formatBn4dig = exports2.toHumanFormat = exports2.formatBN = exports2.percentFmt = exports2.toBigInt = void 0;
|
|
107659
|
+
exports2.numberWithCommas = exports2.fmtContract = exports2.fmtTreasury = exports2.fmtBinaryMask = exports2.getTokenSymbolOrAddress = exports2.formatBn4dig = exports2.toHumanFormat = exports2.formatBN = exports2.percentFmt = exports2.toBigInt = void 0;
|
|
107603
107660
|
var contracts_1 = require_contracts();
|
|
107604
107661
|
var utilsContracts_1 = require_utilsContracts();
|
|
107605
107662
|
var token_1 = require_token();
|
|
@@ -107690,6 +107747,10 @@ var require_formatter2 = __commonJS({
|
|
|
107690
107747
|
return contracts_1.contractsByAddress[address.toLocaleLowerCase()] ? `[${contracts_1.contractsByAddress[address.toLowerCase()]}]` : address;
|
|
107691
107748
|
}
|
|
107692
107749
|
exports2.fmtContract = fmtContract;
|
|
107750
|
+
function numberWithCommas(x) {
|
|
107751
|
+
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
107752
|
+
}
|
|
107753
|
+
exports2.numberWithCommas = numberWithCommas;
|
|
107693
107754
|
}
|
|
107694
107755
|
});
|
|
107695
107756
|
|
|
@@ -108295,7 +108356,7 @@ var require_chains = __commonJS({
|
|
|
108295
108356
|
"../../node_modules/@gearbox-protocol/sdk-gov/lib/core/chains.js"(exports2) {
|
|
108296
108357
|
"use strict";
|
|
108297
108358
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
108298
|
-
exports2.detectNetwork = exports2.isSupportedNetwork = exports2.getNetworkType = exports2.supportedChains = exports2.CHAINS = exports2.ARBITRUM_NETWORK = exports2.HARDHAT_NETWORK = exports2.
|
|
108359
|
+
exports2.detectNetwork = exports2.isSupportedNetwork = exports2.getNetworkType = exports2.supportedChains = exports2.CHAINS = exports2.ARBITRUM_NETWORK = exports2.HARDHAT_NETWORK = exports2.LOCAL_NETWORK = exports2.POLYGON_NETWORK = exports2.OPTIMISM_NETWORK = exports2.GOERLI_NETWORK = exports2.MAINNET_NETWORK = void 0;
|
|
108299
108360
|
var ethers_1 = require_lib220();
|
|
108300
108361
|
var token_1 = require_token();
|
|
108301
108362
|
exports2.MAINNET_NETWORK = 1;
|
|
@@ -108303,7 +108364,6 @@ var require_chains = __commonJS({
|
|
|
108303
108364
|
exports2.OPTIMISM_NETWORK = 10;
|
|
108304
108365
|
exports2.POLYGON_NETWORK = 137;
|
|
108305
108366
|
exports2.LOCAL_NETWORK = 1337;
|
|
108306
|
-
exports2.TENDERLY_NETWORK = 123456;
|
|
108307
108367
|
exports2.HARDHAT_NETWORK = 31337;
|
|
108308
108368
|
exports2.ARBITRUM_NETWORK = 42161;
|
|
108309
108369
|
exports2.CHAINS = {
|
|
@@ -108311,7 +108371,6 @@ var require_chains = __commonJS({
|
|
|
108311
108371
|
Arbitrum: exports2.ARBITRUM_NETWORK,
|
|
108312
108372
|
Local: exports2.LOCAL_NETWORK,
|
|
108313
108373
|
Hardhat: exports2.HARDHAT_NETWORK,
|
|
108314
|
-
Tenderly: exports2.TENDERLY_NETWORK,
|
|
108315
108374
|
Optimism: exports2.OPTIMISM_NETWORK,
|
|
108316
108375
|
Polygon: exports2.POLYGON_NETWORK
|
|
108317
108376
|
};
|
|
@@ -108320,7 +108379,6 @@ var require_chains = __commonJS({
|
|
|
108320
108379
|
[exports2.CHAINS.Mainnet]: "Mainnet",
|
|
108321
108380
|
[exports2.CHAINS.Arbitrum]: "Arbitrum",
|
|
108322
108381
|
[exports2.CHAINS.Local]: "Mainnet",
|
|
108323
|
-
[exports2.CHAINS.Tenderly]: "Mainnet",
|
|
108324
108382
|
[exports2.CHAINS.Optimism]: "Optimism"
|
|
108325
108383
|
// [CHAINS.Polygon]: "Polygon",
|
|
108326
108384
|
};
|
|
@@ -109114,11 +109172,7 @@ var require_priceFeeds = __commonJS({
|
|
|
109114
109172
|
SHIB: {
|
|
109115
109173
|
Mainnet: {
|
|
109116
109174
|
Main: {
|
|
109117
|
-
type: pricefeedType_1.PriceFeedType.
|
|
109118
|
-
dataServiceId: "redstone-primary-prod",
|
|
109119
|
-
dataId: "SHIB",
|
|
109120
|
-
stalenessPeriod: pricefeedType_1.FOUR_MINUTES,
|
|
109121
|
-
...exports2.REDSTONE_SIGNERS,
|
|
109175
|
+
type: pricefeedType_1.PriceFeedType.ZERO_ORACLE,
|
|
109122
109176
|
trusted: false
|
|
109123
109177
|
}
|
|
109124
109178
|
}
|
|
@@ -109182,6 +109236,30 @@ var require_priceFeeds = __commonJS({
|
|
|
109182
109236
|
}
|
|
109183
109237
|
}
|
|
109184
109238
|
},
|
|
109239
|
+
osETH: {
|
|
109240
|
+
Mainnet: {
|
|
109241
|
+
Main: {
|
|
109242
|
+
type: pricefeedType_1.PriceFeedType.REDSTONE_ORACLE,
|
|
109243
|
+
dataServiceId: "redstone-primary-prod",
|
|
109244
|
+
dataId: "osETH",
|
|
109245
|
+
stalenessPeriod: pricefeedType_1.FOUR_MINUTES,
|
|
109246
|
+
...exports2.REDSTONE_SIGNERS,
|
|
109247
|
+
trusted: false
|
|
109248
|
+
}
|
|
109249
|
+
}
|
|
109250
|
+
},
|
|
109251
|
+
weETH: {
|
|
109252
|
+
Mainnet: {
|
|
109253
|
+
Main: {
|
|
109254
|
+
type: pricefeedType_1.PriceFeedType.REDSTONE_ORACLE,
|
|
109255
|
+
dataServiceId: "redstone-primary-prod",
|
|
109256
|
+
dataId: "weETH",
|
|
109257
|
+
stalenessPeriod: pricefeedType_1.FOUR_MINUTES,
|
|
109258
|
+
...exports2.REDSTONE_SIGNERS,
|
|
109259
|
+
trusted: false
|
|
109260
|
+
}
|
|
109261
|
+
}
|
|
109262
|
+
},
|
|
109185
109263
|
AURA: {
|
|
109186
109264
|
Mainnet: {
|
|
109187
109265
|
Main: {
|
|
@@ -109816,6 +109894,24 @@ var require_priceFeeds = __commonJS({
|
|
|
109816
109894
|
}
|
|
109817
109895
|
}
|
|
109818
109896
|
},
|
|
109897
|
+
weETH_rETH: {
|
|
109898
|
+
AllNetworks: {
|
|
109899
|
+
Main: {
|
|
109900
|
+
type: pricefeedType_1.PriceFeedType.BALANCER_STABLE_LP_ORACLE,
|
|
109901
|
+
assets: ["weETH", "rETH"],
|
|
109902
|
+
trusted: false
|
|
109903
|
+
}
|
|
109904
|
+
}
|
|
109905
|
+
},
|
|
109906
|
+
osETH_wETH_BPT: {
|
|
109907
|
+
AllNetworks: {
|
|
109908
|
+
Main: {
|
|
109909
|
+
type: pricefeedType_1.PriceFeedType.BALANCER_STABLE_LP_ORACLE,
|
|
109910
|
+
assets: ["WETH", "osETH"],
|
|
109911
|
+
trusted: false
|
|
109912
|
+
}
|
|
109913
|
+
}
|
|
109914
|
+
},
|
|
109819
109915
|
BPT_rETH_ETH: {
|
|
109820
109916
|
AllNetworks: {
|
|
109821
109917
|
Main: {
|
|
@@ -109843,6 +109939,14 @@ var require_priceFeeds = __commonJS({
|
|
|
109843
109939
|
}
|
|
109844
109940
|
}
|
|
109845
109941
|
},
|
|
109942
|
+
ECLP_wstETH_WETH: {
|
|
109943
|
+
AllNetworks: {
|
|
109944
|
+
Main: {
|
|
109945
|
+
type: pricefeedType_1.PriceFeedType.ZERO_ORACLE,
|
|
109946
|
+
trusted: true
|
|
109947
|
+
}
|
|
109948
|
+
}
|
|
109949
|
+
},
|
|
109846
109950
|
// GEARBOX
|
|
109847
109951
|
dDAI: {
|
|
109848
109952
|
Mainnet: {
|
|
@@ -116631,19 +116735,20 @@ var require_tokenData = __commonJS({
|
|
|
116631
116735
|
"use strict";
|
|
116632
116736
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
116633
116737
|
exports2.getConnectors = exports2.connectors = void 0;
|
|
116738
|
+
var constants_1 = require_constants2();
|
|
116634
116739
|
var token_1 = require_token();
|
|
116635
116740
|
exports2.connectors = {
|
|
116636
|
-
Mainnet: ["WETH", "DAI", "USDC", "FRAX"],
|
|
116741
|
+
Mainnet: ["WETH", "DAI", "USDC", "FRAX", "rETH"],
|
|
116637
116742
|
Arbitrum: ["WETH", "DAI", "USDC", "USDT"],
|
|
116638
116743
|
Optimism: ["WETH", "USDC", "USDT"]
|
|
116639
116744
|
};
|
|
116640
116745
|
function getConnectors(networkType) {
|
|
116641
116746
|
return exports2.connectors[networkType].map((e) => {
|
|
116642
116747
|
const result = token_1.tokenDataByNetwork[networkType][e];
|
|
116643
|
-
if (!result) {
|
|
116748
|
+
if (!result || result === constants_1.NOT_DEPLOYED) {
|
|
116644
116749
|
throw new Error(`connector token ${e} not found`);
|
|
116645
116750
|
}
|
|
116646
|
-
return result;
|
|
116751
|
+
return result.toLowerCase();
|
|
116647
116752
|
});
|
|
116648
116753
|
}
|
|
116649
116754
|
exports2.getConnectors = getConnectors;
|
|
@@ -323262,7 +323367,7 @@ var Verifier = class {
|
|
|
323262
323367
|
}
|
|
323263
323368
|
if (match.status) {
|
|
323264
323369
|
const abiEncodedConstructorArguments = extractAbiEncodedConstructorArguments(creatorTxData, recompiledCreationBytecode) ?? "";
|
|
323265
|
-
if (abiEncodedConstructorArguments
|
|
323370
|
+
if (abiEncodedConstructorArguments !== meta2.encodedConstructorArgs) {
|
|
323266
323371
|
return {
|
|
323267
323372
|
...result,
|
|
323268
323373
|
error: `Encoded constructor arguments mismatch: meta ${meta2.encodedConstructorArgs} tx ${abiEncodedConstructorArguments}`
|
|
@@ -324582,7 +324687,6 @@ import path7 from "node:path";
|
|
|
324582
324687
|
import fs2 from "node:fs/promises";
|
|
324583
324688
|
import path5 from "node:path";
|
|
324584
324689
|
var DeployResult = class _DeployResult {
|
|
324585
|
-
meta = [];
|
|
324586
324690
|
governorBatches = [];
|
|
324587
324691
|
routerBatches = [];
|
|
324588
324692
|
#id;
|
|
@@ -324661,6 +324765,7 @@ var DeployResult = class _DeployResult {
|
|
|
324661
324765
|
const filePath = path5.join(fullDirPath, file);
|
|
324662
324766
|
if (file.includes(`${type}.json`)) {
|
|
324663
324767
|
const batch = JSON.parse(await fs2.readFile(filePath, "utf8"));
|
|
324768
|
+
batch.meta.name = file.replace(".json", "");
|
|
324664
324769
|
batches.push(batch);
|
|
324665
324770
|
}
|
|
324666
324771
|
}
|
|
@@ -324682,12 +324787,6 @@ var MetaRepo = class {
|
|
|
324682
324787
|
this.#dir = path6.resolve(opts.sandboxDir, "meta");
|
|
324683
324788
|
this.#network = opts.network;
|
|
324684
324789
|
}
|
|
324685
|
-
addAll(metas = []) {
|
|
324686
|
-
for (const m of metas) {
|
|
324687
|
-
this.#meta.set(m.contractAddress.toLowerCase(), m);
|
|
324688
|
-
}
|
|
324689
|
-
this.#logger.trace(`loaded ${metas.length} new metafiles`);
|
|
324690
|
-
}
|
|
324691
324790
|
getMeta(address) {
|
|
324692
324791
|
const m = this.#meta.get(address.toLowerCase());
|
|
324693
324792
|
if (!m) {
|
|
@@ -324706,13 +324805,22 @@ var MetaRepo = class {
|
|
|
324706
324805
|
sandboxDir: this.#dir
|
|
324707
324806
|
});
|
|
324708
324807
|
const metaRoot = path6.resolve(this.#dir, META_REPO, "deploy-state", this.#network.toLowerCase());
|
|
324808
|
+
await this.loadFromDir(metaRoot);
|
|
324809
|
+
}
|
|
324810
|
+
/**
|
|
324811
|
+
* Recursively loads all metafiles found in a dir
|
|
324812
|
+
*/
|
|
324813
|
+
async loadFromDir(metaRoot) {
|
|
324709
324814
|
this.#logger.debug(`Looking for metafiles in ${metaRoot}`);
|
|
324710
324815
|
const files = await readDirectory(metaRoot);
|
|
324711
324816
|
const before = this.#meta.size;
|
|
324712
324817
|
for (const f of files) {
|
|
324713
324818
|
const fname = path6.basename(f, `.json`);
|
|
324714
324819
|
if (isAddress2(fname)) {
|
|
324715
|
-
const meta2 = await readFile5(f).then(json_parse);
|
|
324820
|
+
const meta2 = await readFile5(path6.resolve(metaRoot, f)).then(json_parse);
|
|
324821
|
+
if (!meta2.encodedConstructorArgs.startsWith("0x")) {
|
|
324822
|
+
throw new Error(`expect encodedConstructorArgs for ${fname} to start with '0x'`);
|
|
324823
|
+
}
|
|
324716
324824
|
this.#meta.set(fname.toLowerCase(), meta2);
|
|
324717
324825
|
this.#logger.trace(`loaded meta for address ${fname}`);
|
|
324718
324826
|
}
|
|
@@ -325057,7 +325165,7 @@ var AbstractParser = class {
|
|
|
325057
325165
|
}
|
|
325058
325166
|
#parseConstructor(address, encodedArgs, constructorFragment, comment) {
|
|
325059
325167
|
this.logger.trace(`parsing ${comment} constructor of ${address}...`);
|
|
325060
|
-
const args = AbiCoder2.defaultAbiCoder().decode(constructorFragment.inputs, "0x"
|
|
325168
|
+
const args = AbiCoder2.defaultAbiCoder().decode(constructorFragment.inputs, encodedArgs.startsWith("0x") ? encodedArgs : `0x${encodedArgs}`);
|
|
325061
325169
|
const parameters = constructorFragment.inputs.map((input, i) => ({
|
|
325062
325170
|
name: input.name,
|
|
325063
325171
|
type: input.type,
|
|
@@ -327065,8 +327173,8 @@ var UpdateParser = class extends ProviderBase {
|
|
|
327065
327173
|
this.logger.trace(`loading deploy result from ${fullDir}`);
|
|
327066
327174
|
const result = await DeployResult.loadFromFiles(fullDir);
|
|
327067
327175
|
batches.push(...result.normalized());
|
|
327068
|
-
this.metaRepo.addAll(result.meta);
|
|
327069
327176
|
}
|
|
327177
|
+
await this.metaRepo.loadFromDir(dir);
|
|
327070
327178
|
if (!batches?.length) {
|
|
327071
327179
|
throw new Error(`no batch files found in ${dir}`);
|
|
327072
327180
|
}
|
|
@@ -328490,7 +328598,7 @@ function zeroLT() {
|
|
|
328490
328598
|
}
|
|
328491
328599
|
|
|
328492
328600
|
// package.json
|
|
328493
|
-
var version3 = "3.4.1-next.
|
|
328601
|
+
var version3 = "3.4.1-next.7";
|
|
328494
328602
|
|
|
328495
328603
|
// src/index.ts
|
|
328496
328604
|
var program2 = new Command();
|
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": "3.4.1-next.
|
|
4
|
+
"version": "3.4.1-next.8",
|
|
5
5
|
"homepage": "https://gearbox.fi",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"gearbox"
|
|
@@ -38,10 +38,10 @@
|
|
|
38
38
|
"@chialab/esbuild-plugin-commonjs": "^0.18.0",
|
|
39
39
|
"@ethereum-sourcify/bytecode-utils": "^1.2.1",
|
|
40
40
|
"@ethereum-sourcify/lib-sourcify": "^1.4.1",
|
|
41
|
-
"@gearbox-protocol/deploy-tools-node": "3.4.1-next.
|
|
42
|
-
"@gearbox-protocol/deploy-tools-shared": "3.4.1-next.
|
|
43
|
-
"@gearbox-protocol/deploy-tools-types": "3.4.1-next.
|
|
44
|
-
"@gearbox-protocol/sdk-gov": "^1.
|
|
41
|
+
"@gearbox-protocol/deploy-tools-node": "3.4.1-next.8",
|
|
42
|
+
"@gearbox-protocol/deploy-tools-shared": "3.4.1-next.8",
|
|
43
|
+
"@gearbox-protocol/deploy-tools-types": "3.4.1-next.8",
|
|
44
|
+
"@gearbox-protocol/sdk-gov": "^1.28.2",
|
|
45
45
|
"@types/lodash-es": "^4.17.12",
|
|
46
46
|
"@types/node": "^20.10.8",
|
|
47
47
|
"@types/react": "^18.2.47",
|