@cowprotocol/sdk-cow-shed 0.1.0-monorepo.1 → 0.1.0-monorepo.2
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 +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -2
- package/dist/index.mjs +5 -4
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -139,7 +139,7 @@ declare class CowShedSdk {
|
|
|
139
139
|
*
|
|
140
140
|
* @returns pre-authorized multicall details
|
|
141
141
|
*/
|
|
142
|
-
signCalls({ calls, signer: signerParam, chainId, nonce, deadline, defaultGasLimit, signingScheme, }: SignAndEncodeTxArgs): Promise<CowShedCall>;
|
|
142
|
+
signCalls({ calls, signer: signerParam, chainId, nonce, deadline, gasLimit, defaultGasLimit, signingScheme, }: SignAndEncodeTxArgs): Promise<CowShedCall>;
|
|
143
143
|
protected getCowShedHooks(chainId: SupportedChainId, customOptions?: ICoWShedOptions): CowShedHooks;
|
|
144
144
|
protected static getNonce(): string;
|
|
145
145
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -139,7 +139,7 @@ declare class CowShedSdk {
|
|
|
139
139
|
*
|
|
140
140
|
* @returns pre-authorized multicall details
|
|
141
141
|
*/
|
|
142
|
-
signCalls({ calls, signer: signerParam, chainId, nonce, deadline, defaultGasLimit, signingScheme, }: SignAndEncodeTxArgs): Promise<CowShedCall>;
|
|
142
|
+
signCalls({ calls, signer: signerParam, chainId, nonce, deadline, gasLimit, defaultGasLimit, signingScheme, }: SignAndEncodeTxArgs): Promise<CowShedCall>;
|
|
143
143
|
protected getCowShedHooks(chainId: SupportedChainId, customOptions?: ICoWShedOptions): CowShedHooks;
|
|
144
144
|
protected static getNonce(): string;
|
|
145
145
|
}
|
package/dist/index.js
CHANGED
|
@@ -299,6 +299,7 @@ var CowShedSdk = class _CowShedSdk {
|
|
|
299
299
|
chainId,
|
|
300
300
|
nonce = _CowShedSdk.getNonce(),
|
|
301
301
|
deadline = import_sdk_common2.MAX_UINT256,
|
|
302
|
+
gasLimit,
|
|
302
303
|
defaultGasLimit,
|
|
303
304
|
signingScheme = import_sdk_contracts_ts2.ContractsSigningScheme.EIP712
|
|
304
305
|
}) {
|
|
@@ -315,7 +316,7 @@ var CowShedSdk = class _CowShedSdk {
|
|
|
315
316
|
data: callData,
|
|
316
317
|
value: BigInt(0)
|
|
317
318
|
};
|
|
318
|
-
const gasEstimate = await signer.estimateGas(factoryCall).catch((error) => {
|
|
319
|
+
const gasEstimate = gasLimit || await signer.estimateGas(factoryCall).catch((error) => {
|
|
319
320
|
const factoryCallString = JSON.stringify(factoryCall, import_sdk_common2.jsonWithBigintReplacer, 2);
|
|
320
321
|
const errorMessage = `Error estimating gas for the cow-shed call: ${factoryCallString}. Review the factory call`;
|
|
321
322
|
if (defaultGasLimit) {
|
|
@@ -327,7 +328,7 @@ var CowShedSdk = class _CowShedSdk {
|
|
|
327
328
|
return {
|
|
328
329
|
cowShedAccount,
|
|
329
330
|
signedMulticall: factoryCall,
|
|
330
|
-
gasLimit: gasEstimate
|
|
331
|
+
gasLimit: BigInt(gasEstimate.toString())
|
|
331
332
|
};
|
|
332
333
|
}
|
|
333
334
|
getCowShedHooks(chainId, customOptions) {
|
package/dist/index.mjs
CHANGED
|
@@ -244,10 +244,10 @@ import {
|
|
|
244
244
|
ContractsSigningScheme as SigningScheme
|
|
245
245
|
} from "@cowprotocol/sdk-contracts-ts";
|
|
246
246
|
import {
|
|
247
|
+
getGlobalAdapter as getGlobalAdapter2,
|
|
248
|
+
jsonWithBigintReplacer,
|
|
247
249
|
log,
|
|
248
250
|
MAX_UINT256 as NON_EXPIRING_DEADLINE,
|
|
249
|
-
jsonWithBigintReplacer,
|
|
250
|
-
getGlobalAdapter as getGlobalAdapter2,
|
|
251
251
|
setGlobalAdapter as setGlobalAdapter2
|
|
252
252
|
} from "@cowprotocol/sdk-common";
|
|
253
253
|
var CowShedSdk = class _CowShedSdk {
|
|
@@ -276,6 +276,7 @@ var CowShedSdk = class _CowShedSdk {
|
|
|
276
276
|
chainId,
|
|
277
277
|
nonce = _CowShedSdk.getNonce(),
|
|
278
278
|
deadline = NON_EXPIRING_DEADLINE,
|
|
279
|
+
gasLimit,
|
|
279
280
|
defaultGasLimit,
|
|
280
281
|
signingScheme = SigningScheme.EIP712
|
|
281
282
|
}) {
|
|
@@ -292,7 +293,7 @@ var CowShedSdk = class _CowShedSdk {
|
|
|
292
293
|
data: callData,
|
|
293
294
|
value: BigInt(0)
|
|
294
295
|
};
|
|
295
|
-
const gasEstimate = await signer.estimateGas(factoryCall).catch((error) => {
|
|
296
|
+
const gasEstimate = gasLimit || await signer.estimateGas(factoryCall).catch((error) => {
|
|
296
297
|
const factoryCallString = JSON.stringify(factoryCall, jsonWithBigintReplacer, 2);
|
|
297
298
|
const errorMessage = `Error estimating gas for the cow-shed call: ${factoryCallString}. Review the factory call`;
|
|
298
299
|
if (defaultGasLimit) {
|
|
@@ -304,7 +305,7 @@ var CowShedSdk = class _CowShedSdk {
|
|
|
304
305
|
return {
|
|
305
306
|
cowShedAccount,
|
|
306
307
|
signedMulticall: factoryCall,
|
|
307
|
-
gasLimit: gasEstimate
|
|
308
|
+
gasLimit: BigInt(gasEstimate.toString())
|
|
308
309
|
};
|
|
309
310
|
}
|
|
310
311
|
getCowShedHooks(chainId, customOptions) {
|