@gearbox-protocol/sdk 3.0.0-vfour.191 → 3.0.0-vfour.193
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/cjs/sdk/index.cjs +24 -15
- package/dist/cjs/sdk/index.d.ts +3 -2
- package/dist/esm/sdk/index.d.mts +3 -2
- package/dist/esm/sdk/index.mjs +24 -15
- package/package.json +1 -1
package/dist/cjs/sdk/index.cjs
CHANGED
|
@@ -57421,6 +57421,7 @@ var AdapterInterface = /* @__PURE__ */ ((AdapterInterface2) => {
|
|
|
57421
57421
|
AdapterInterface2[AdapterInterface2["DAI_USDS_EXCHANGE"] = 33] = "DAI_USDS_EXCHANGE";
|
|
57422
57422
|
AdapterInterface2[AdapterInterface2["STAKING_REWARDS"] = 34] = "STAKING_REWARDS";
|
|
57423
57423
|
AdapterInterface2[AdapterInterface2["EQUALIZER_ROUTER"] = 35] = "EQUALIZER_ROUTER";
|
|
57424
|
+
AdapterInterface2[AdapterInterface2["BALANCER_V3_ROUTER"] = 36] = "BALANCER_V3_ROUTER";
|
|
57424
57425
|
return AdapterInterface2;
|
|
57425
57426
|
})(AdapterInterface || {});
|
|
57426
57427
|
|
|
@@ -57956,6 +57957,15 @@ var balancerLpTokens = {
|
|
|
57956
57957
|
underlying: ["rsETH", "WETH"],
|
|
57957
57958
|
poolId: "0x58aadfb1afac0ad7fca1148f3cde6aedf5236b6d00000000000000000000067f"
|
|
57958
57959
|
},
|
|
57960
|
+
B_50WBTC_50WETH: {
|
|
57961
|
+
name: "Balancer WBTC/WETH",
|
|
57962
|
+
symbol: "B_50WBTC_50WETH",
|
|
57963
|
+
type: {
|
|
57964
|
+
AllNetworks: 10 /* BALANCER_LP_TOKEN */
|
|
57965
|
+
},
|
|
57966
|
+
underlying: ["WBTC", "WETH"],
|
|
57967
|
+
poolId: "0xa6f548df93de924d73be7d25dc02554c6bd66db500020000000000000000000e"
|
|
57968
|
+
},
|
|
57959
57969
|
rsETH_wETH_Arb: {
|
|
57960
57970
|
name: "Balancer rsETH/WETH Pool (Arbitrum)",
|
|
57961
57971
|
symbol: "rsETH_wETH_Arb",
|
|
@@ -59074,6 +59084,7 @@ var decimals = {
|
|
|
59074
59084
|
"33AURA_33ARB_33BAL": 18,
|
|
59075
59085
|
ezETH_wstETH: 18,
|
|
59076
59086
|
GHO_USDT_USDC: 18,
|
|
59087
|
+
B_50WBTC_50WETH: 18,
|
|
59077
59088
|
rsETH_WETH: 18,
|
|
59078
59089
|
rsETH_wETH_Arb: 18,
|
|
59079
59090
|
bpt_ethtri: 18,
|
|
@@ -60060,6 +60071,7 @@ var tokenDataByNetwork = {
|
|
|
60060
60071
|
bpt_ethtri: NOT_DEPLOYED,
|
|
60061
60072
|
pumpBTC_WBTC_BPT: "0x2238aB6c8c58473a5e81b86ec352322fB3f5Edd8",
|
|
60062
60073
|
eBTC_WBTC_BPT: "0xda17f3663C5D04C0B316cfA1A04Aa53eBBC8c12C",
|
|
60074
|
+
B_50WBTC_50WETH: "0xA6F548DF93de924d73be7D25dC02554c6bD66dB5",
|
|
60063
60075
|
// AURA
|
|
60064
60076
|
auraB_rETH_STABLE: "0x9497df26e5bD669Cb925eC68E730492b9300c482",
|
|
60065
60077
|
auraweETH_rETH: "0xb2912397566Dafc9cDee555a38e980661858a61a",
|
|
@@ -60341,6 +60353,7 @@ var tokenDataByNetwork = {
|
|
|
60341
60353
|
bpt_ethtri: NOT_DEPLOYED,
|
|
60342
60354
|
pumpBTC_WBTC_BPT: NOT_DEPLOYED,
|
|
60343
60355
|
eBTC_WBTC_BPT: NOT_DEPLOYED,
|
|
60356
|
+
B_50WBTC_50WETH: NOT_DEPLOYED,
|
|
60344
60357
|
// AURA
|
|
60345
60358
|
auraB_rETH_STABLE: NOT_DEPLOYED,
|
|
60346
60359
|
auraweETH_rETH: NOT_DEPLOYED,
|
|
@@ -60613,6 +60626,7 @@ var tokenDataByNetwork = {
|
|
|
60613
60626
|
GHO_USDT_USDC: NOT_DEPLOYED,
|
|
60614
60627
|
rsETH_WETH: NOT_DEPLOYED,
|
|
60615
60628
|
rsETH_wETH_Arb: NOT_DEPLOYED,
|
|
60629
|
+
B_50WBTC_50WETH: NOT_DEPLOYED,
|
|
60616
60630
|
BPT_rETH_ETH: "0x4Fd63966879300caFafBB35D157dC5229278Ed23",
|
|
60617
60631
|
BPT_WSTETH_ETH: "0x7B50775383d3D6f0215A8F290f2C9e2eEBBEceb2",
|
|
60618
60632
|
BPT_ROAD: "0x39965c9dAb5448482Cf7e002F583c812Ceb53046",
|
|
@@ -60894,6 +60908,7 @@ var tokenDataByNetwork = {
|
|
|
60894
60908
|
rsETH_wETH_Arb: NOT_DEPLOYED,
|
|
60895
60909
|
"33AURA_33ARB_33BAL": NOT_DEPLOYED,
|
|
60896
60910
|
ezETH_wstETH: NOT_DEPLOYED,
|
|
60911
|
+
B_50WBTC_50WETH: NOT_DEPLOYED,
|
|
60897
60912
|
BPT_rETH_ETH: NOT_DEPLOYED,
|
|
60898
60913
|
BPT_WSTETH_ETH: NOT_DEPLOYED,
|
|
60899
60914
|
BPT_ROAD: NOT_DEPLOYED,
|
|
@@ -62339,8 +62354,7 @@ var contractParams = {
|
|
|
62339
62354
|
name: "Curve USDeUSDC",
|
|
62340
62355
|
protocol: 2 /* Curve */,
|
|
62341
62356
|
version: 20,
|
|
62342
|
-
type:
|
|
62343
|
-
// NOTE: This is actually stable NG, however the old adapter is used in swap only mode before audits
|
|
62357
|
+
type: 23 /* CURVE_STABLE_NG */,
|
|
62344
62358
|
lpToken: "USDeUSDC",
|
|
62345
62359
|
tokens: ["USDe", "USDC"]
|
|
62346
62360
|
},
|
|
@@ -62348,8 +62362,7 @@ var contractParams = {
|
|
|
62348
62362
|
name: "Curve FRAXUSDe",
|
|
62349
62363
|
protocol: 2 /* Curve */,
|
|
62350
62364
|
version: 20,
|
|
62351
|
-
type:
|
|
62352
|
-
// NOTE: This is actually stable NG, however the old adapter is used in swap only mode before audits
|
|
62365
|
+
type: 23 /* CURVE_STABLE_NG */,
|
|
62353
62366
|
lpToken: "FRAXUSDe",
|
|
62354
62367
|
tokens: ["FRAX", "USDe"]
|
|
62355
62368
|
},
|
|
@@ -62357,8 +62370,7 @@ var contractParams = {
|
|
|
62357
62370
|
name: "Curve USDecrvUSD",
|
|
62358
62371
|
protocol: 2 /* Curve */,
|
|
62359
62372
|
version: 20,
|
|
62360
|
-
type:
|
|
62361
|
-
// NOTE: This is actually stable NG, however the old adapter is used in swap only mode before audits
|
|
62373
|
+
type: 23 /* CURVE_STABLE_NG */,
|
|
62362
62374
|
lpToken: "USDecrvUSD",
|
|
62363
62375
|
tokens: ["USDe", "crvUSD"]
|
|
62364
62376
|
},
|
|
@@ -62366,8 +62378,7 @@ var contractParams = {
|
|
|
62366
62378
|
name: "Curve USDeDAI",
|
|
62367
62379
|
protocol: 2 /* Curve */,
|
|
62368
62380
|
version: 20,
|
|
62369
|
-
type:
|
|
62370
|
-
// NOTE: This is actually stable NG, however the old adapter is used in swap only mode before audits
|
|
62381
|
+
type: 23 /* CURVE_STABLE_NG */,
|
|
62371
62382
|
lpToken: "USDeDAI",
|
|
62372
62383
|
tokens: ["USDe", "DAI"]
|
|
62373
62384
|
},
|
|
@@ -62375,8 +62386,7 @@ var contractParams = {
|
|
|
62375
62386
|
name: "Curve MtEthena",
|
|
62376
62387
|
protocol: 2 /* Curve */,
|
|
62377
62388
|
version: 20,
|
|
62378
|
-
type:
|
|
62379
|
-
// NOTE: This is actually stable NG, however the old adapter is used in swap only mode before audits
|
|
62389
|
+
type: 23 /* CURVE_STABLE_NG */,
|
|
62380
62390
|
lpToken: "MtEthena",
|
|
62381
62391
|
tokens: ["sDAI", "sUSDe"]
|
|
62382
62392
|
},
|
|
@@ -62384,8 +62394,7 @@ var contractParams = {
|
|
|
62384
62394
|
name: "Curve GHOUSDe",
|
|
62385
62395
|
protocol: 2 /* Curve */,
|
|
62386
62396
|
version: 20,
|
|
62387
|
-
type:
|
|
62388
|
-
// NOTE: This is actually stable NG, however the old adapter is used in swap only mode before audits
|
|
62397
|
+
type: 23 /* CURVE_STABLE_NG */,
|
|
62389
62398
|
lpToken: "GHOUSDe",
|
|
62390
62399
|
tokens: ["GHO", "USDe"]
|
|
62391
62400
|
},
|
|
@@ -66864,7 +66873,7 @@ var CreditAccountData_Legacy = class _CreditAccountData_Legacy {
|
|
|
66864
66873
|
const { quotas, initialQuotas, maxDebt, allowedToSpend, allowedToObtain } = props;
|
|
66865
66874
|
const quotaDecrease = Object.keys(allowedToSpend).reduce((acc, token) => {
|
|
66866
66875
|
const ch = this.getSingleQuotaChange(token, 0n, props);
|
|
66867
|
-
if (ch) acc[ch.token] = ch;
|
|
66876
|
+
if (ch && ch.balance < 0) acc[ch.token] = ch;
|
|
66868
66877
|
return acc;
|
|
66869
66878
|
}, {});
|
|
66870
66879
|
const quotaCap = this.roundUpQuota(maxDebt * 2n);
|
|
@@ -66888,7 +66897,7 @@ var CreditAccountData_Legacy = class _CreditAccountData_Legacy {
|
|
|
66888
66897
|
maxQuotaIncrease,
|
|
66889
66898
|
props
|
|
66890
66899
|
);
|
|
66891
|
-
if (ch) acc[ch.token] = ch;
|
|
66900
|
+
if (ch && ch.balance > 0) acc[ch.token] = ch;
|
|
66892
66901
|
return acc;
|
|
66893
66902
|
}, {});
|
|
66894
66903
|
const quotaChange = {
|
|
@@ -66944,7 +66953,7 @@ var CreditAccountData_Legacy = class _CreditAccountData_Legacy {
|
|
|
66944
66953
|
amount: amountInTarget
|
|
66945
66954
|
});
|
|
66946
66955
|
const unsafeQuotaChange = this.roundUpQuota(defaultQuota - initialQuota);
|
|
66947
|
-
const quotaChange = unsafeQuotaChange > 0 ? BigIntMath.min(maxQuotaIncrease, unsafeQuotaChange) :
|
|
66956
|
+
const quotaChange = unsafeQuotaChange > 0 ? BigIntMath.min(maxQuotaIncrease, unsafeQuotaChange) : unsafeQuotaChange < 0 && BigIntMath.abs(unsafeQuotaChange) >= initialQuota ? MIN_INT96 : unsafeQuotaChange;
|
|
66948
66957
|
const correctIncrease = assetAfter && props.allowedToObtain[token] && quotaChange > 0;
|
|
66949
66958
|
const correctDecrease = assetAfter && props.allowedToSpend[token] && quotaChange < 0;
|
|
66950
66959
|
if (correctIncrease || correctDecrease) {
|
package/dist/cjs/sdk/index.d.ts
CHANGED
|
@@ -92924,7 +92924,8 @@ declare enum AdapterInterface {
|
|
|
92924
92924
|
MELLOW_ERC4626_VAULT = 32,
|
|
92925
92925
|
DAI_USDS_EXCHANGE = 33,
|
|
92926
92926
|
STAKING_REWARDS = 34,
|
|
92927
|
-
EQUALIZER_ROUTER = 35
|
|
92927
|
+
EQUALIZER_ROUTER = 35,
|
|
92928
|
+
BALANCER_V3_ROUTER = 36
|
|
92928
92929
|
}
|
|
92929
92930
|
|
|
92930
92931
|
declare enum TradeType {
|
|
@@ -93137,7 +93138,7 @@ type ERC4626VaultOfCurveLPTokenData = {
|
|
|
93137
93138
|
declare const erc4626Tokens: Record<ERC4626LPToken, ERC4626VaultTokenData | ERC4626VaultOfCurveLPTokenData>;
|
|
93138
93139
|
declare const isERC4626LPToken: (t: unknown) => t is ERC4626LPToken;
|
|
93139
93140
|
|
|
93140
|
-
type BalancerLPToken = "USDC_DAI_USDT" | "B_rETH_STABLE" | "weETH_rETH" | "osETH_wETH_BPT" | "B_80BAL_20WETH" | "50WETH_50AURA" | "ezETH_WETH_BPT" | "weETH_ezETH_rswETH" | "GHO_USDT_USDC" | "rsETH_WETH" | "trenSTETH" | "DVstETH_wstETH_BPT" | "sUSDe_USDC_BPT" | "pumpBTC_WBTC_BPT" | "eBTC_WBTC_BPT" | "BPT_rETH_ETH" | "BPT_WSTETH_ETH" | "BPT_ROAD" | "ECLP_wstETH_WETH" | "bpt_ethtri" | "wstETH_WETH_BPT" | "wstETH_rETH_sfrxETH" | "wstETH_rETH_cbETH" | "rETH_WETH_BPT_deprecated" | "cbETH_rETH_wstETH" | "rETH_wETH_BPT" | "33AURA_33ARB_33BAL" | "ezETH_wstETH" | "rsETH_wETH_Arb";
|
|
93141
|
+
type BalancerLPToken = "USDC_DAI_USDT" | "B_rETH_STABLE" | "weETH_rETH" | "osETH_wETH_BPT" | "B_80BAL_20WETH" | "50WETH_50AURA" | "ezETH_WETH_BPT" | "weETH_ezETH_rswETH" | "GHO_USDT_USDC" | "rsETH_WETH" | "trenSTETH" | "DVstETH_wstETH_BPT" | "sUSDe_USDC_BPT" | "pumpBTC_WBTC_BPT" | "eBTC_WBTC_BPT" | "B_50WBTC_50WETH" | "BPT_rETH_ETH" | "BPT_WSTETH_ETH" | "BPT_ROAD" | "ECLP_wstETH_WETH" | "bpt_ethtri" | "wstETH_WETH_BPT" | "wstETH_rETH_sfrxETH" | "wstETH_rETH_cbETH" | "rETH_WETH_BPT_deprecated" | "cbETH_rETH_wstETH" | "rETH_wETH_BPT" | "33AURA_33ARB_33BAL" | "ezETH_wstETH" | "rsETH_wETH_Arb";
|
|
93141
93142
|
type BalancerLpTokenData = {
|
|
93142
93143
|
symbol: BalancerLPToken;
|
|
93143
93144
|
type: Partial<Record<TokenNetwork, TokenType.BALANCER_LP_TOKEN>>;
|
package/dist/esm/sdk/index.d.mts
CHANGED
|
@@ -92924,7 +92924,8 @@ declare enum AdapterInterface {
|
|
|
92924
92924
|
MELLOW_ERC4626_VAULT = 32,
|
|
92925
92925
|
DAI_USDS_EXCHANGE = 33,
|
|
92926
92926
|
STAKING_REWARDS = 34,
|
|
92927
|
-
EQUALIZER_ROUTER = 35
|
|
92927
|
+
EQUALIZER_ROUTER = 35,
|
|
92928
|
+
BALANCER_V3_ROUTER = 36
|
|
92928
92929
|
}
|
|
92929
92930
|
|
|
92930
92931
|
declare enum TradeType {
|
|
@@ -93137,7 +93138,7 @@ type ERC4626VaultOfCurveLPTokenData = {
|
|
|
93137
93138
|
declare const erc4626Tokens: Record<ERC4626LPToken, ERC4626VaultTokenData | ERC4626VaultOfCurveLPTokenData>;
|
|
93138
93139
|
declare const isERC4626LPToken: (t: unknown) => t is ERC4626LPToken;
|
|
93139
93140
|
|
|
93140
|
-
type BalancerLPToken = "USDC_DAI_USDT" | "B_rETH_STABLE" | "weETH_rETH" | "osETH_wETH_BPT" | "B_80BAL_20WETH" | "50WETH_50AURA" | "ezETH_WETH_BPT" | "weETH_ezETH_rswETH" | "GHO_USDT_USDC" | "rsETH_WETH" | "trenSTETH" | "DVstETH_wstETH_BPT" | "sUSDe_USDC_BPT" | "pumpBTC_WBTC_BPT" | "eBTC_WBTC_BPT" | "BPT_rETH_ETH" | "BPT_WSTETH_ETH" | "BPT_ROAD" | "ECLP_wstETH_WETH" | "bpt_ethtri" | "wstETH_WETH_BPT" | "wstETH_rETH_sfrxETH" | "wstETH_rETH_cbETH" | "rETH_WETH_BPT_deprecated" | "cbETH_rETH_wstETH" | "rETH_wETH_BPT" | "33AURA_33ARB_33BAL" | "ezETH_wstETH" | "rsETH_wETH_Arb";
|
|
93141
|
+
type BalancerLPToken = "USDC_DAI_USDT" | "B_rETH_STABLE" | "weETH_rETH" | "osETH_wETH_BPT" | "B_80BAL_20WETH" | "50WETH_50AURA" | "ezETH_WETH_BPT" | "weETH_ezETH_rswETH" | "GHO_USDT_USDC" | "rsETH_WETH" | "trenSTETH" | "DVstETH_wstETH_BPT" | "sUSDe_USDC_BPT" | "pumpBTC_WBTC_BPT" | "eBTC_WBTC_BPT" | "B_50WBTC_50WETH" | "BPT_rETH_ETH" | "BPT_WSTETH_ETH" | "BPT_ROAD" | "ECLP_wstETH_WETH" | "bpt_ethtri" | "wstETH_WETH_BPT" | "wstETH_rETH_sfrxETH" | "wstETH_rETH_cbETH" | "rETH_WETH_BPT_deprecated" | "cbETH_rETH_wstETH" | "rETH_wETH_BPT" | "33AURA_33ARB_33BAL" | "ezETH_wstETH" | "rsETH_wETH_Arb";
|
|
93141
93142
|
type BalancerLpTokenData = {
|
|
93142
93143
|
symbol: BalancerLPToken;
|
|
93143
93144
|
type: Partial<Record<TokenNetwork, TokenType.BALANCER_LP_TOKEN>>;
|
package/dist/esm/sdk/index.mjs
CHANGED
|
@@ -57414,6 +57414,7 @@ var AdapterInterface = /* @__PURE__ */ ((AdapterInterface2) => {
|
|
|
57414
57414
|
AdapterInterface2[AdapterInterface2["DAI_USDS_EXCHANGE"] = 33] = "DAI_USDS_EXCHANGE";
|
|
57415
57415
|
AdapterInterface2[AdapterInterface2["STAKING_REWARDS"] = 34] = "STAKING_REWARDS";
|
|
57416
57416
|
AdapterInterface2[AdapterInterface2["EQUALIZER_ROUTER"] = 35] = "EQUALIZER_ROUTER";
|
|
57417
|
+
AdapterInterface2[AdapterInterface2["BALANCER_V3_ROUTER"] = 36] = "BALANCER_V3_ROUTER";
|
|
57417
57418
|
return AdapterInterface2;
|
|
57418
57419
|
})(AdapterInterface || {});
|
|
57419
57420
|
|
|
@@ -57949,6 +57950,15 @@ var balancerLpTokens = {
|
|
|
57949
57950
|
underlying: ["rsETH", "WETH"],
|
|
57950
57951
|
poolId: "0x58aadfb1afac0ad7fca1148f3cde6aedf5236b6d00000000000000000000067f"
|
|
57951
57952
|
},
|
|
57953
|
+
B_50WBTC_50WETH: {
|
|
57954
|
+
name: "Balancer WBTC/WETH",
|
|
57955
|
+
symbol: "B_50WBTC_50WETH",
|
|
57956
|
+
type: {
|
|
57957
|
+
AllNetworks: 10 /* BALANCER_LP_TOKEN */
|
|
57958
|
+
},
|
|
57959
|
+
underlying: ["WBTC", "WETH"],
|
|
57960
|
+
poolId: "0xa6f548df93de924d73be7d25dc02554c6bd66db500020000000000000000000e"
|
|
57961
|
+
},
|
|
57952
57962
|
rsETH_wETH_Arb: {
|
|
57953
57963
|
name: "Balancer rsETH/WETH Pool (Arbitrum)",
|
|
57954
57964
|
symbol: "rsETH_wETH_Arb",
|
|
@@ -59067,6 +59077,7 @@ var decimals = {
|
|
|
59067
59077
|
"33AURA_33ARB_33BAL": 18,
|
|
59068
59078
|
ezETH_wstETH: 18,
|
|
59069
59079
|
GHO_USDT_USDC: 18,
|
|
59080
|
+
B_50WBTC_50WETH: 18,
|
|
59070
59081
|
rsETH_WETH: 18,
|
|
59071
59082
|
rsETH_wETH_Arb: 18,
|
|
59072
59083
|
bpt_ethtri: 18,
|
|
@@ -60053,6 +60064,7 @@ var tokenDataByNetwork = {
|
|
|
60053
60064
|
bpt_ethtri: NOT_DEPLOYED,
|
|
60054
60065
|
pumpBTC_WBTC_BPT: "0x2238aB6c8c58473a5e81b86ec352322fB3f5Edd8",
|
|
60055
60066
|
eBTC_WBTC_BPT: "0xda17f3663C5D04C0B316cfA1A04Aa53eBBC8c12C",
|
|
60067
|
+
B_50WBTC_50WETH: "0xA6F548DF93de924d73be7D25dC02554c6bD66dB5",
|
|
60056
60068
|
// AURA
|
|
60057
60069
|
auraB_rETH_STABLE: "0x9497df26e5bD669Cb925eC68E730492b9300c482",
|
|
60058
60070
|
auraweETH_rETH: "0xb2912397566Dafc9cDee555a38e980661858a61a",
|
|
@@ -60334,6 +60346,7 @@ var tokenDataByNetwork = {
|
|
|
60334
60346
|
bpt_ethtri: NOT_DEPLOYED,
|
|
60335
60347
|
pumpBTC_WBTC_BPT: NOT_DEPLOYED,
|
|
60336
60348
|
eBTC_WBTC_BPT: NOT_DEPLOYED,
|
|
60349
|
+
B_50WBTC_50WETH: NOT_DEPLOYED,
|
|
60337
60350
|
// AURA
|
|
60338
60351
|
auraB_rETH_STABLE: NOT_DEPLOYED,
|
|
60339
60352
|
auraweETH_rETH: NOT_DEPLOYED,
|
|
@@ -60606,6 +60619,7 @@ var tokenDataByNetwork = {
|
|
|
60606
60619
|
GHO_USDT_USDC: NOT_DEPLOYED,
|
|
60607
60620
|
rsETH_WETH: NOT_DEPLOYED,
|
|
60608
60621
|
rsETH_wETH_Arb: NOT_DEPLOYED,
|
|
60622
|
+
B_50WBTC_50WETH: NOT_DEPLOYED,
|
|
60609
60623
|
BPT_rETH_ETH: "0x4Fd63966879300caFafBB35D157dC5229278Ed23",
|
|
60610
60624
|
BPT_WSTETH_ETH: "0x7B50775383d3D6f0215A8F290f2C9e2eEBBEceb2",
|
|
60611
60625
|
BPT_ROAD: "0x39965c9dAb5448482Cf7e002F583c812Ceb53046",
|
|
@@ -60887,6 +60901,7 @@ var tokenDataByNetwork = {
|
|
|
60887
60901
|
rsETH_wETH_Arb: NOT_DEPLOYED,
|
|
60888
60902
|
"33AURA_33ARB_33BAL": NOT_DEPLOYED,
|
|
60889
60903
|
ezETH_wstETH: NOT_DEPLOYED,
|
|
60904
|
+
B_50WBTC_50WETH: NOT_DEPLOYED,
|
|
60890
60905
|
BPT_rETH_ETH: NOT_DEPLOYED,
|
|
60891
60906
|
BPT_WSTETH_ETH: NOT_DEPLOYED,
|
|
60892
60907
|
BPT_ROAD: NOT_DEPLOYED,
|
|
@@ -62332,8 +62347,7 @@ var contractParams = {
|
|
|
62332
62347
|
name: "Curve USDeUSDC",
|
|
62333
62348
|
protocol: 2 /* Curve */,
|
|
62334
62349
|
version: 20,
|
|
62335
|
-
type:
|
|
62336
|
-
// NOTE: This is actually stable NG, however the old adapter is used in swap only mode before audits
|
|
62350
|
+
type: 23 /* CURVE_STABLE_NG */,
|
|
62337
62351
|
lpToken: "USDeUSDC",
|
|
62338
62352
|
tokens: ["USDe", "USDC"]
|
|
62339
62353
|
},
|
|
@@ -62341,8 +62355,7 @@ var contractParams = {
|
|
|
62341
62355
|
name: "Curve FRAXUSDe",
|
|
62342
62356
|
protocol: 2 /* Curve */,
|
|
62343
62357
|
version: 20,
|
|
62344
|
-
type:
|
|
62345
|
-
// NOTE: This is actually stable NG, however the old adapter is used in swap only mode before audits
|
|
62358
|
+
type: 23 /* CURVE_STABLE_NG */,
|
|
62346
62359
|
lpToken: "FRAXUSDe",
|
|
62347
62360
|
tokens: ["FRAX", "USDe"]
|
|
62348
62361
|
},
|
|
@@ -62350,8 +62363,7 @@ var contractParams = {
|
|
|
62350
62363
|
name: "Curve USDecrvUSD",
|
|
62351
62364
|
protocol: 2 /* Curve */,
|
|
62352
62365
|
version: 20,
|
|
62353
|
-
type:
|
|
62354
|
-
// NOTE: This is actually stable NG, however the old adapter is used in swap only mode before audits
|
|
62366
|
+
type: 23 /* CURVE_STABLE_NG */,
|
|
62355
62367
|
lpToken: "USDecrvUSD",
|
|
62356
62368
|
tokens: ["USDe", "crvUSD"]
|
|
62357
62369
|
},
|
|
@@ -62359,8 +62371,7 @@ var contractParams = {
|
|
|
62359
62371
|
name: "Curve USDeDAI",
|
|
62360
62372
|
protocol: 2 /* Curve */,
|
|
62361
62373
|
version: 20,
|
|
62362
|
-
type:
|
|
62363
|
-
// NOTE: This is actually stable NG, however the old adapter is used in swap only mode before audits
|
|
62374
|
+
type: 23 /* CURVE_STABLE_NG */,
|
|
62364
62375
|
lpToken: "USDeDAI",
|
|
62365
62376
|
tokens: ["USDe", "DAI"]
|
|
62366
62377
|
},
|
|
@@ -62368,8 +62379,7 @@ var contractParams = {
|
|
|
62368
62379
|
name: "Curve MtEthena",
|
|
62369
62380
|
protocol: 2 /* Curve */,
|
|
62370
62381
|
version: 20,
|
|
62371
|
-
type:
|
|
62372
|
-
// NOTE: This is actually stable NG, however the old adapter is used in swap only mode before audits
|
|
62382
|
+
type: 23 /* CURVE_STABLE_NG */,
|
|
62373
62383
|
lpToken: "MtEthena",
|
|
62374
62384
|
tokens: ["sDAI", "sUSDe"]
|
|
62375
62385
|
},
|
|
@@ -62377,8 +62387,7 @@ var contractParams = {
|
|
|
62377
62387
|
name: "Curve GHOUSDe",
|
|
62378
62388
|
protocol: 2 /* Curve */,
|
|
62379
62389
|
version: 20,
|
|
62380
|
-
type:
|
|
62381
|
-
// NOTE: This is actually stable NG, however the old adapter is used in swap only mode before audits
|
|
62390
|
+
type: 23 /* CURVE_STABLE_NG */,
|
|
62382
62391
|
lpToken: "GHOUSDe",
|
|
62383
62392
|
tokens: ["GHO", "USDe"]
|
|
62384
62393
|
},
|
|
@@ -66857,7 +66866,7 @@ var CreditAccountData_Legacy = class _CreditAccountData_Legacy {
|
|
|
66857
66866
|
const { quotas, initialQuotas, maxDebt, allowedToSpend, allowedToObtain } = props;
|
|
66858
66867
|
const quotaDecrease = Object.keys(allowedToSpend).reduce((acc, token) => {
|
|
66859
66868
|
const ch = this.getSingleQuotaChange(token, 0n, props);
|
|
66860
|
-
if (ch) acc[ch.token] = ch;
|
|
66869
|
+
if (ch && ch.balance < 0) acc[ch.token] = ch;
|
|
66861
66870
|
return acc;
|
|
66862
66871
|
}, {});
|
|
66863
66872
|
const quotaCap = this.roundUpQuota(maxDebt * 2n);
|
|
@@ -66881,7 +66890,7 @@ var CreditAccountData_Legacy = class _CreditAccountData_Legacy {
|
|
|
66881
66890
|
maxQuotaIncrease,
|
|
66882
66891
|
props
|
|
66883
66892
|
);
|
|
66884
|
-
if (ch) acc[ch.token] = ch;
|
|
66893
|
+
if (ch && ch.balance > 0) acc[ch.token] = ch;
|
|
66885
66894
|
return acc;
|
|
66886
66895
|
}, {});
|
|
66887
66896
|
const quotaChange = {
|
|
@@ -66937,7 +66946,7 @@ var CreditAccountData_Legacy = class _CreditAccountData_Legacy {
|
|
|
66937
66946
|
amount: amountInTarget
|
|
66938
66947
|
});
|
|
66939
66948
|
const unsafeQuotaChange = this.roundUpQuota(defaultQuota - initialQuota);
|
|
66940
|
-
const quotaChange = unsafeQuotaChange > 0 ? BigIntMath.min(maxQuotaIncrease, unsafeQuotaChange) :
|
|
66949
|
+
const quotaChange = unsafeQuotaChange > 0 ? BigIntMath.min(maxQuotaIncrease, unsafeQuotaChange) : unsafeQuotaChange < 0 && BigIntMath.abs(unsafeQuotaChange) >= initialQuota ? MIN_INT96 : unsafeQuotaChange;
|
|
66941
66950
|
const correctIncrease = assetAfter && props.allowedToObtain[token] && quotaChange > 0;
|
|
66942
66951
|
const correctDecrease = assetAfter && props.allowedToSpend[token] && quotaChange < 0;
|
|
66943
66952
|
if (correctIncrease || correctDecrease) {
|