optimism icon indicating copy to clipboard operation
optimism copied to clipboard

Design motivation for reverting views?

Open pegahcarter opened this issue 1 year ago • 1 comments

Quick question: what is the design motivation for creating reverting reviews over views that return null values?

https://github.com/ethereum-optimism/optimism/blob/69d2d47b0f4ea0a41905b0ef52f3fa343ea7633e/packages/contracts-bedrock/src/L2/CrossL2Inbox.sol#L74

pegahcarter avatar Jul 10 '24 16:07 pegahcarter

You cannot tell the difference between a 0 value and a null value. Therefore revert on a null value (the value is not set).

tynes avatar Jul 14 '24 14:07 tynes