You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
asyncfunctiongetGas(request: UpdateGasRequest,): Promise<[string,TransactionMeta['simulationFails']?,string?]>{const{ isCustomNetwork, chainId, txMeta }=request;if(txMeta.txParams.gas){log('Using value from request',txMeta.txParams.gas);return[txMeta.txParams.gas,undefined,txMeta.txParams.gas];}if(awaitrequiresFixedGas(request)){log('Using fixed value',FIXED_GAS);return[FIXED_GAS,undefined,FIXED_GAS];}const{ blockGasLimit, estimatedGas, simulationFails }=awaitestimateGas(txMeta.txParams,request.ethQuery,);if(isCustomNetwork||simulationFails){log(isCustomNetwork
? 'Using original estimate as custom network'
: 'Using original fallback estimate as simulation failed',);return[estimatedGas,simulationFails,estimatedGas];}constbufferMultiplier=GAS_BUFFER_CHAIN_OVERRIDES[chainIdaskeyoftypeofGAS_BUFFER_CHAIN_OVERRIDES]??DEFAULT_GAS_MULTIPLIER;constbufferedGas=addGasBuffer(estimatedGas,blockGasLimit,bufferMultiplier,);return[bufferedGas,simulationFails,estimatedGas];}
I appreciate the use of gas buffering in this function as it helps improve the chances of transaction acceptance. However, I noticed that when adding a custom network, there is currently no option to configure a gas buffer or even apply one to the gas limit. This creates challenges for platforms that integrate with MetaMask but don’t estimate gas or add a buffer before sending transactions to the extension. As a result, many integrations fail, leading to a suboptimal user experience.
I believe it would significantly enhance usability if MetaMask allowed users to configure gas buffering as part of the custom network setup. This could be either:
A toggle to enable gas buffering for a specific network in the network setup.
An option in the advanced network settings to apply a configurable buffer multiplier.
I understand that some networks already buffer gas during the estimateGas RPC call, and the behavior can vary between networks. However, enabling this feature at the user or network level would reduce the need for manual gas limit adjustments, saving users 2-3 extra clicks every time they edit the gas limit for transactions, also it can be disabled by default.
I hope you find this feedback constructive and consider introducing these options to further improve the user experience.
Thank you for your time and effort in building an amazing platform. I look forward to seeing how MetaMask continues to evolve!
The text was updated successfully, but these errors were encountered:
As we are in the era of booming new chains, this capability is crucial for Metamask's adaptability to
Ensure Metamask can support diverse network behaviors, especially for the new networks or specialized network
Allow dynamic gas estimation based on smart contract operations to optimize buffering, as some functions require minimal buffering, making large gas reserves inefficient.
Dear MetaMask Team,
I noticed the function getGas:
I appreciate the use of gas buffering in this function as it helps improve the chances of transaction acceptance. However, I noticed that when adding a custom network, there is currently no option to configure a gas buffer or even apply one to the gas limit. This creates challenges for platforms that integrate with MetaMask but don’t estimate gas or add a buffer before sending transactions to the extension. As a result, many integrations fail, leading to a suboptimal user experience.
I believe it would significantly enhance usability if MetaMask allowed users to configure gas buffering as part of the custom network setup. This could be either:
A toggle to enable gas buffering for a specific network in the network setup.
An option in the advanced network settings to apply a configurable buffer multiplier.
I understand that some networks already buffer gas during the estimateGas RPC call, and the behavior can vary between networks. However, enabling this feature at the user or network level would reduce the need for manual gas limit adjustments, saving users 2-3 extra clicks every time they edit the gas limit for transactions, also it can be disabled by default.
I hope you find this feedback constructive and consider introducing these options to further improve the user experience.
Thank you for your time and effort in building an amazing platform. I look forward to seeing how MetaMask continues to evolve!
The text was updated successfully, but these errors were encountered: