@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.
@@ -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 = 100000;
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: CowShedSdk, request: QuoteBridgeRequest, provider: JsonRpcProvider, extraGas?: number): Promise<number>;
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>;
@@ -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 100,000 gas‐unit buffer to the hook
173
- * (see DEFAULT_EXTRA_GAS_FOR_HOOK_ESTIMATION).
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.