-
Notifications
You must be signed in to change notification settings - Fork 193
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(world): change requireOwnerOrSelf to requireOwner (#1457)
- Loading branch information
Showing
27 changed files
with
660 additions
and
187 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
"@latticexyz/world": major | ||
--- | ||
|
||
- The access control library no longer allows calls by the `World` contract to itself to bypass the ownership check. | ||
This is a breaking change for root modules that relied on this mechanism to register root tables, systems or function selectors. | ||
To upgrade, root modules must use `delegatecall` instead of a regular `call` to install root tables, systems or function selectors. | ||
|
||
```diff | ||
- world.registerSystem(rootSystemId, rootSystemAddress); | ||
+ address(world).delegatecall(abi.encodeCall(world.registerSystem, (rootSystemId, rootSystemAddress))); | ||
``` | ||
|
||
- An `installRoot` method was added to the `IModule` interface. | ||
This method is now called when installing a root module via `world.installRootModule`. | ||
When installing non-root modules via `world.installModule`, the module's `install` function continues to be called. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.