-
Notifications
You must be signed in to change notification settings - Fork 196
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
docs(world): add comments for prohibitDirectCallback modifier #2312
Changes from 1 commit
ae5d2c3
9e23496
e0d5c7c
cf3f153
3f9fa37
fa7e700
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,6 +51,9 @@ contract World is StoreData, IWorldKernel { | |
|
||
/** | ||
* @dev Prevents the World contract from calling itself. | ||
* The world is not able to call itself; all operations to internal tables happen as internal library calls, and all calls to root system happen as a delegatecall to the system. | ||
* However, since this is an important invariant, we make it explicit by reverting if `msg.sender` is `address(this)` in all `World` methods. | ||
* If it was possible to make the `World` call itself, it would be possible to access internal tables that only the `World` should have access to. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this feels a bit incomplete, like we should either expand on how/why or just remove
(maybe could workshop this exact sentence a bit more, but just providing a bit more context) |
||
*/ | ||
modifier prohibitDirectCallback() { | ||
if (msg.sender == address(this)) { | ||
|
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.