Closed leovct closed 1 year ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
evm-codes | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jun 16, 2023 2:07pm |
Thank you for your contribution.
We think it may be too much, as the formula is already clearly visible on the right side under the "Estimate your gas cost" (see example image)
For the other formula change, we determined that it would probably be clearer to do them as text. Especially if there is both formula and then text to add conditions to it, I fear people will skip the text and miss some part of it.
So I'm closing this PR, and thank you for challenging and making us think how to improve evm.codes :-)
I opened a first PR (#248) thinking that the gas computation for
log
opcodes was wrong. It turns out I was wrong but, as a newbie in this field, I find that the gas calculation is not 100% clear and could perhaps be improved? At the moment, the gas calculation mentions a static gas and a dynamic gas cost, but there's no formula linking the two (even if it's trivial, I can hear it). That's why I suggest adding the following formula:gas_cost = static_gas + dynamic_gas
at the top of gas computations, to make it a bit clearer.On top of that, I transformed some of the text into formulas. I think that it ensures consistency between the different ways of calculating gas. One thing I'm not 100% sure though is how to deal with multi-line formulas such as the one used for the
balance
opcode in theBerlin
hard fork.This is how it renders:
Another option may be the following: