fix: Clarity and copy changes on enforced txs and gas limit and zktrie#121
fix: Clarity and copy changes on enforced txs and gas limit and zktrie#121
Conversation
✅ Deploy Preview for scroll-documentation ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
isabellewei
left a comment
There was a problem hiding this comment.
Sorry I think I didn't explain very clearly, gas limit is NOT refunded, but any extra msg.value will be and a too low msg.value will cause the tx to revert, which is why msg.value should always err on being set very high.
The gas limit does affect the fee that is deducted from the user, I think we can mention somewhere that they can use eth_estimateGas to get a more accurate real-time estimate for what to set it
| - `gasLimit`: | ||
| - If you are sending the message from L1 to L2, around `5000` gas limit should be more than enough. | ||
| - If you are sending the message from L2 to L1, pass `0`, as the transaction be completed by executing an additional transaction on L1. | ||
| - If you are sending the message from L1 to L2, around `5000` gas limit should be more than enough. That said, if you set this too high, any unused portion of the fee will be refunded. |
There was a problem hiding this comment.
The gas limit is not refunded. The gasLimit * baseFee is the fee that is charged, and if the msg.value is higher than this fee, the remainder of the msg.value is refunded. Conversely, if the msg.value is lower than this fee, the tx will revert
gas limit(along with mentioning refund) but keeps testnet message passing number