@cowprotocol/cow-sdk 6.3.1 → 6.3.2-RC.1
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/bridging/const.d.ts +2 -1
- package/dist/bridging/providers/utils/getGasLimitEstimationForHook.d.ts +7 -1
- package/dist/bridging/types.d.ts +4 -2
- package/dist/{index-a7a09b84.js → index-30900188.js} +5 -5
- package/dist/index-30900188.js.map +1 -0
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +1 -1
- package/dist/index.module.js +4 -4
- package/dist/index.module.js.map +1 -1
- package/dist/package.json +1 -1
- package/dist/src/bridging/PROVIDER_README.md +1 -1
- package/dist/{utils-09b73cca.js → utils-a099ea1c.js} +2 -2
- package/dist/{utils-09b73cca.js.map → utils-a099ea1c.js.map} +1 -1
- package/dist/{utils-e4e218ad.js → utils-b896fbcb.js} +1 -1
- package/dist/{utils-e4e218ad.js.map → utils-b896fbcb.js.map} +1 -1
- package/dist/{utils-4843389e.js → utils-f8578eba.js} +1 -1
- package/dist/{utils-4843389e.js.map → utils-f8578eba.js.map} +1 -1
- package/package.json +1 -1
- package/dist/index-a7a09b84.js.map +0 -1
package/dist/bridging/const.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare const RAW_PROVIDERS_FILES_PATH = "https://raw.githubusercontent.com/cowprotocol/cow-sdk/refs/heads/main/src/bridging/providers";
|
|
2
2
|
export declare const DEFAULT_GAS_COST_FOR_HOOK_ESTIMATION = 240000;
|
|
3
|
-
export declare const DEFAULT_EXTRA_GAS_FOR_HOOK_ESTIMATION =
|
|
3
|
+
export declare const DEFAULT_EXTRA_GAS_FOR_HOOK_ESTIMATION = 200000;
|
|
4
4
|
export declare const COW_SHED_PROXY_CREATION_GAS = 360000;
|
|
5
|
+
export declare const DEFAULT_EXTRA_GAS_PROXY_CREATION = 400000;
|
|
5
6
|
export declare const HOOK_DAPP_BRIDGE_PROVIDER_PREFIX = "cow-sdk://bridging/providers";
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { QuoteBridgeRequest } from '../../types';
|
|
2
2
|
import type { JsonRpcProvider } from '@ethersproject/providers';
|
|
3
3
|
import { CowShedSdk } from '../../../cow-shed';
|
|
4
|
-
export declare function getGasLimitEstimationForHook(cowShedSdk
|
|
4
|
+
export declare function getGasLimitEstimationForHook({ cowShedSdk, request, provider, extraGas, extraGasProxyCreation, }: {
|
|
5
|
+
cowShedSdk: CowShedSdk;
|
|
6
|
+
request: QuoteBridgeRequest;
|
|
7
|
+
provider: JsonRpcProvider;
|
|
8
|
+
extraGas?: number;
|
|
9
|
+
extraGasProxyCreation?: number;
|
|
10
|
+
}): Promise<number>;
|
package/dist/bridging/types.d.ts
CHANGED
|
@@ -169,11 +169,13 @@ export interface BridgeProvider<Q extends BridgeQuoteResult> {
|
|
|
169
169
|
* 2. The final amount could affect hook gas costs
|
|
170
170
|
*
|
|
171
171
|
* By estimating gas costs independently, we can resolve this dependency cycle.
|
|
172
|
-
* For some providers, the `extraGas` flag adds a
|
|
173
|
-
*
|
|
172
|
+
* For some providers, the `extraGas` flag adds a 150,000 gas‐unit buffer to the hook
|
|
173
|
+
* and `extraGasProxyCreation` adds 360,000 gas‐unit buffer for the proxy creation
|
|
174
|
+
* (see DEFAULT_EXTRA_GAS_FOR_HOOK_ESTIMATION and DEFAULT_EXTRA_GAS_PROXY_CREATION).
|
|
174
175
|
*/
|
|
175
176
|
getGasLimitEstimationForHook(request: Omit<QuoteBridgeRequest, 'amount'> & {
|
|
176
177
|
extraGas?: number;
|
|
178
|
+
extraGasProxyCreation?: number;
|
|
177
179
|
}): Promise<number>;
|
|
178
180
|
/**
|
|
179
181
|
* Get a pre-authorized hook for initiating a bridge.
|