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

feat(world): generate system libs #3587

Merged
merged 17 commits into from
Feb 11, 2025
Merged

feat(world): generate system libs #3587

merged 17 commits into from
Feb 11, 2025

Conversation

holic
Copy link
Member

@holic holic commented Feb 7, 2025

pulled out of #3586

Copy link

changeset-bot bot commented Feb 7, 2025

🦋 Changeset detected

Latest commit: 6501cd8

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 30 packages
Name Type
@latticexyz/world Patch
@latticexyz/store Patch
@latticexyz/cli Patch
@latticexyz/dev-tools Patch
@latticexyz/entrykit Patch
@latticexyz/explorer Patch
@latticexyz/store-sync Patch
@latticexyz/world-consumer Patch
@latticexyz/world-module-callwithsignature Patch
@latticexyz/world-module-erc20 Patch
@latticexyz/world-module-metadata Patch
@latticexyz/world-modules Patch
@latticexyz/react Patch
@latticexyz/stash Patch
@latticexyz/store-indexer Patch
@latticexyz/abi-ts Patch
@latticexyz/block-logs-stream Patch
@latticexyz/common Patch
@latticexyz/config Patch
create-mud Patch
@latticexyz/faucet Patch
@latticexyz/gas-report Patch
@latticexyz/paymaster Patch
@latticexyz/protocol-parser Patch
@latticexyz/recs Patch
@latticexyz/schema-type Patch
solhint-config-mud Patch
solhint-plugin-mud Patch
@latticexyz/utils Patch
vite-plugin-mud Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

alvrs
alvrs previously approved these changes Feb 7, 2025
Copy link
Contributor

@vdrg vdrg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm in general but maybe I would keep calldata args and fix at the system lib gen

Copy link
Contributor

@vdrg vdrg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leaving an initial review with a few questions but will look in more detail later

.changeset/dry-camels-accept.md Outdated Show resolved Hide resolved
packages/common/src/codegen/render-solidity/common.ts Outdated Show resolved Hide resolved
@@ -25,7 +26,7 @@ import { WorldRegistrationSystem } from "./WorldRegistrationSystem.sol";
* @author MUD (https://mud.dev) by Lattice (https://lattice.xyz)
* @dev This contract provides functionality for the registration of store-related resources within the World framework.
*/
contract StoreRegistrationSystem is System, IWorldErrors, LimitedCallContext {
abstract contract StoreRegistrationSystem is System, IWorldErrors, IStoreRegistration, LimitedCallContext {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wdyt of always inheriting from interfaces first? not really an issue in this case but feels cleaner to me in the sense that interfaces go before implementations (that might implement some of the interface functions).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't feel strongly. Does it impact anything on the compiler side?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in this case it doesn't, but if one of the interfaces declares one of the functions that is present in the other contracts it would not compile unless you put the interface first, so I feel following the convention I mentioned makes sense:

Screenshot 2025-02-10 at 9 30 17 AM

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like we're fairly inconsistent with it so maybe we can do a clean up pass separately?

image

@holic holic merged commit 06e48e0 into main Feb 11, 2025
16 checks passed
@holic holic deleted the holic/world-system-libs branch February 11, 2025 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants