Skip to content
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

fix(world): use WorldContextConsumerLib._msgSender() instead of msg.sender #3436

Merged
merged 3 commits into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/heavy-eggs-smell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@latticexyz/world": patch
---

Use WorldContextConsumerLib._msgSender() instead of msg.sender in system libraries.
vdrg marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ export function renderSystemLibrary(options: RenderSystemLibraryOptions) {
symbol: "SystemCall",
path: `${worldImportPath}/SystemCall.sol`,
},
{
symbol: "WorldContextConsumerLib",
path: `${worldImportPath}/WorldContext.sol`,
},
{
symbol: "Systems",
path: `${worldImportPath}/codegen/tables/Systems.sol`,
Expand Down Expand Up @@ -96,7 +100,7 @@ export function renderSystemLibrary(options: RenderSystemLibraryOptions) {
}

function callAsRoot(${userTypeName} self) internal view returns (RootCallWrapper memory) {
return RootCallWrapper(self.toResourceId(), msg.sender);
return RootCallWrapper(self.toResourceId(), WorldContextConsumerLib._msgSender());
}

function callAsRootFrom(${userTypeName} self, address from) internal pure returns (RootCallWrapper memory) {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading