-
Notifications
You must be signed in to change notification settings - Fork 187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
@@ -84,8 +84,8 @@ We pass the message by executing `executeFunctionCrosschain` and passing the fol | |||
- `value`: In this case, it is `0` because the `setGreeting`is not payable. | |||
- `greeting`: This is the parameter that will be sent through the message. Try passing `“This message was crosschain!”` | |||
- `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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed!
gas limit
(along with mentioning refund) but keeps testnet message passing number