@stableflow/bridges 3.1.4 → 3.1.5
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 +10 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -150,6 +150,16 @@ interface GetAllQuoteParams {
|
|
|
150
150
|
/** When true (default), always calculate destination gas fee. When false, fee is 0 if fromTokenSymbol !== toTokenSymbol. */
|
|
151
151
|
forceCalculateFee?: boolean;
|
|
152
152
|
};
|
|
153
|
+
/**
|
|
154
|
+
* Optional pre-fetched EVM gas fees by chainId.
|
|
155
|
+
* Speeds up dry quotes; if omitted, the SDK falls back to provider.getFeeData().
|
|
156
|
+
*/
|
|
157
|
+
evmGasFees?: Record<string | number, {
|
|
158
|
+
gasPrice: string;
|
|
159
|
+
maxFeePerGas?: string;
|
|
160
|
+
maxPriorityFeePerGas?: string;
|
|
161
|
+
lastUpdated?: number;
|
|
162
|
+
}>;
|
|
153
163
|
}
|
|
154
164
|
/**
|
|
155
165
|
* Full cross-chain bridge API (multi-route quote, send, status).
|
package/dist/index.d.ts
CHANGED
|
@@ -150,6 +150,16 @@ interface GetAllQuoteParams {
|
|
|
150
150
|
/** When true (default), always calculate destination gas fee. When false, fee is 0 if fromTokenSymbol !== toTokenSymbol. */
|
|
151
151
|
forceCalculateFee?: boolean;
|
|
152
152
|
};
|
|
153
|
+
/**
|
|
154
|
+
* Optional pre-fetched EVM gas fees by chainId.
|
|
155
|
+
* Speeds up dry quotes; if omitted, the SDK falls back to provider.getFeeData().
|
|
156
|
+
*/
|
|
157
|
+
evmGasFees?: Record<string | number, {
|
|
158
|
+
gasPrice: string;
|
|
159
|
+
maxFeePerGas?: string;
|
|
160
|
+
maxPriorityFeePerGas?: string;
|
|
161
|
+
lastUpdated?: number;
|
|
162
|
+
}>;
|
|
153
163
|
}
|
|
154
164
|
/**
|
|
155
165
|
* Full cross-chain bridge API (multi-route quote, send, status).
|
package/dist/index.js
CHANGED
|
@@ -229,7 +229,7 @@ var OneClickService = class {
|
|
|
229
229
|
slippageTolerance: slippageTolerance * 100
|
|
230
230
|
};
|
|
231
231
|
for (const k in restParams) {
|
|
232
|
-
if (["evmAddress", "evmWallet", "destinationChain", "originChain"].includes(k)) {
|
|
232
|
+
if (["evmAddress", "evmWallet", "destinationChain", "originChain", "evmGasFees"].includes(k)) {
|
|
233
233
|
continue;
|
|
234
234
|
}
|
|
235
235
|
quoteParams[k] = restParams[k];
|
|
@@ -5087,7 +5087,7 @@ var OneClick2FraxZeroService = class extends FraxZeroService {
|
|
|
5087
5087
|
price: core.getPrice(prices, FRAXZERO_MIDDLE_TOKEN_USDC.nativeToken.symbol),
|
|
5088
5088
|
nativeToken: FRAXZERO_MIDDLE_TOKEN_USDC.nativeToken,
|
|
5089
5089
|
provider,
|
|
5090
|
-
gasPrice: dry ? evmGasFees[FRAXZERO_MIDDLE_TOKEN_USDC.chainId]
|
|
5090
|
+
gasPrice: dry ? evmGasFees?.[FRAXZERO_MIDDLE_TOKEN_USDC.chainId]?.gasPrice : void 0
|
|
5091
5091
|
});
|
|
5092
5092
|
execTime.log("middleChainWallet.getEstimateGas");
|
|
5093
5093
|
const secondStepGasToAmount = Big__default.default(usd || 0).div(core.getPrice(prices, fromToken.symbol) || 1).toFixed(fromToken.decimals);
|
|
@@ -6230,7 +6230,8 @@ var BridgeSFA = class _BridgeSFA {
|
|
|
6230
6230
|
prices: params.prices,
|
|
6231
6231
|
slippageTolerance: params.slippageTolerance,
|
|
6232
6232
|
evmWallet: params.evmWallet,
|
|
6233
|
-
evmAddress: params.evmAddress
|
|
6233
|
+
evmAddress: params.evmAddress,
|
|
6234
|
+
evmGasFees: params.evmGasFees
|
|
6234
6235
|
};
|
|
6235
6236
|
if ([
|
|
6236
6237
|
core.Service.OneClick,
|