ethereum / solidity

Solidity, the Smart Contract Programming Language
https://soliditylang.org
GNU General Public License v3.0
23.21k stars 5.75k forks source link

Document the use cases for verbatim and why it cannot be used in inline assembly #15037

Open PaulRBerg opened 6 months ago

PaulRBerg commented 6 months ago

Page

https://docs.soliditylang.org/en/v0.8.25/yul.html#verbatim

Problem

The current documentation does not say much about the potential use cases for verbatim. My understanding is that this syntax was added in order for Optimism to avoid having to maintain a fork of solc. This seems like a problem that many rollups/ L2s will encounter, and so I think it should be more explicitly documented.

Furthermore, it would be helpful to add a note about why this syntax is unavailable in inline assembly, and why it will remain so in the near future.

More Context

I've asked some questions about verbatim in the Matrix server, which have been answered by @cameel. His answers would be a good starting point for an updated documentation:

SCR-20240417-mqol

Related

https://github.com/ethereum/solidity/issues/12067

nikola-matic commented 6 months ago

I've added it to our focus board so it doesn't get lost, but consider this triaged.

github-actions[bot] commented 3 months ago

This issue has been marked as stale due to inactivity for the last 90 days. It will be automatically closed in 7 days.

IaroslavMazur commented 3 months ago

@nikola-matic, is this issue still going to be taken care of?

nikola-matic commented 3 months ago

Heya @IaroslavMazur, I've removed the stale label from the issue. We'll get to it eventually, but at the moment we're working on a verbatim blog post (amongst other things, most recently we released a via-ir blog post) precisely because the community keeps asking about it, and we figure that initially we'll have greater reach with said blog post; of course, all of the relevant info will end up in the docs.

IaroslavMazur commented 3 months ago

Heya @IaroslavMazur, I've removed the stale label from the issue. We'll get to it eventually, but at the moment we're working on a verbatim blog post (amongst other things, most recently we released a via-ir blog post) precisely because the community keeps asking about it, and we figure that initially we'll have greater reach with said blog post; of course, all of the relevant info will end up in the docs.

Thank you for the update, Nikola.

Glad to hear that the 'verbatim' instruction is going to be documented better!

github-actions[bot] commented 1 day ago

This issue has been marked as stale due to inactivity for the last 90 days. It will be automatically closed in 7 days.

IaroslavMazur commented 1 day ago

Hey, @nikola-matic, could you, please, remove the 'stale' label again?