@octaflowlabs/onchain-sdk 1.0.0-test13 → 1.0.0-test15
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.
|
@@ -109,7 +109,7 @@ export const buildMaxNativeTransferTx = async (options) => {
|
|
|
109
109
|
throw new Error('Max native transfer requires a native token address');
|
|
110
110
|
const provisionalTx = await buildUnsignedTransferTx({
|
|
111
111
|
...options,
|
|
112
|
-
value:
|
|
112
|
+
value: '0',
|
|
113
113
|
tokenAddress: options.tokenAddress,
|
|
114
114
|
});
|
|
115
115
|
if (!provisionalTx.gasReserve)
|
|
@@ -11,6 +11,7 @@ export const estimateGasLimitFromProvider = async ({ provider, unsignedTx, walle
|
|
|
11
11
|
txForEstimation.maxPriorityFeePerGas = feeData.maxPriorityFeePerGas;
|
|
12
12
|
if (feeData.gasPrice !== undefined && txForEstimation.maxFeePerGas === undefined)
|
|
13
13
|
txForEstimation.gasPrice = feeData.gasPrice;
|
|
14
|
+
console.log('Estimating gas with transaction:!!!!!! ', txForEstimation);
|
|
14
15
|
const gasEstimated = await provider.estimateGas(txForEstimation);
|
|
15
16
|
lastGasEstimated = gasEstimated;
|
|
16
17
|
let congestionFactor = 1.5;
|
|
@@ -113,7 +113,7 @@ const buildMaxNativeTransferTx = async (options) => {
|
|
|
113
113
|
throw new Error('Max native transfer requires a native token address');
|
|
114
114
|
const provisionalTx = await (0, exports.buildUnsignedTransferTx)({
|
|
115
115
|
...options,
|
|
116
|
-
value:
|
|
116
|
+
value: '0',
|
|
117
117
|
tokenAddress: options.tokenAddress,
|
|
118
118
|
});
|
|
119
119
|
if (!provisionalTx.gasReserve)
|
|
@@ -14,6 +14,7 @@ const estimateGasLimitFromProvider = async ({ provider, unsignedTx, walletAddres
|
|
|
14
14
|
txForEstimation.maxPriorityFeePerGas = feeData.maxPriorityFeePerGas;
|
|
15
15
|
if (feeData.gasPrice !== undefined && txForEstimation.maxFeePerGas === undefined)
|
|
16
16
|
txForEstimation.gasPrice = feeData.gasPrice;
|
|
17
|
+
console.log('Estimating gas with transaction:!!!!!! ', txForEstimation);
|
|
17
18
|
const gasEstimated = await provider.estimateGas(txForEstimation);
|
|
18
19
|
lastGasEstimated = gasEstimated;
|
|
19
20
|
let congestionFactor = 1.5;
|