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

refactor(store): add StoreWrite and Store abstract contracts #2411

Merged
merged 27 commits into from
Mar 21, 2024

Conversation

yonadaa
Copy link
Contributor

@yonadaa yonadaa commented Mar 11, 2024

Fixes #2369

Added an abstract StoreKernel contract, which includes all Store interfaces except for registration, and implements write methods, protocolVersion and initializes StoreCore. Store extends StoreKernel with the IStoreRegistration interface. StoreData is removed as a separate interface/contract. World now extends StoreKernel (since the registration methods are added via the InitModule).

@yonadaa yonadaa requested review from alvrs and holic as code owners March 11, 2024 16:46
Copy link

changeset-bot bot commented Mar 11, 2024

🦋 Changeset detected

Latest commit: a56a7d2

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

This PR includes changesets to release 32 packages
Name Type
@latticexyz/store Major
@latticexyz/world Major
@latticexyz/cli Major
@latticexyz/dev-tools Major
@latticexyz/query Major
@latticexyz/react Major
@latticexyz/store-indexer Major
@latticexyz/store-sync Major
@latticexyz/world-modules Major
@latticexyz/abi-ts Major
@latticexyz/block-logs-stream Major
@latticexyz/common Major
@latticexyz/config Major
create-mud Major
@latticexyz/ecs-browser Major
@latticexyz/faucet Major
@latticexyz/gas-report Major
@latticexyz/network Major
@latticexyz/noise Major
@latticexyz/phaserx Major
@latticexyz/protocol-parser Major
@latticexyz/recs Major
@latticexyz/schema-type Major
@latticexyz/services Major
@latticexyz/solecs Major
solhint-config-mud Major
solhint-plugin-mud Major
@latticexyz/std-client Major
@latticexyz/std-contracts Major
@latticexyz/store-cache Major
@latticexyz/utils Major
mock-game-contracts Major

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

@yonadaa yonadaa changed the title refactor(store): add StoreWrite refactor(store): add StoreWrite, rename StoreData to Store Mar 12, 2024
@holic
Copy link
Member

holic commented Mar 12, 2024

docs need to be regenerated (and prob an issue of #2351 again)

@holic
Copy link
Member

holic commented Mar 12, 2024

I am now wondering if my protocol version tests are incorrect and should use IStore and IBaseWorld instead of the current approach (per our chat in Discord about "incomplete" implementations due to "diamond")

@yonadaa
Copy link
Contributor Author

yonadaa commented Mar 13, 2024

docs need to be regenerated (and prob an issue of #2351 again)

It wasn't actually, it was because the docs tried to read StoreData

I am now wondering if my protocol version tests are incorrect and should use IStore and IBaseWorld instead of the current approach (per our chat in Discord about "incomplete" implementations due to "diamond")

Interesting, so the tests should read different interfaces? As opposed to what?

packages/store/src/Store.sol Outdated Show resolved Hide resolved
packages/world/src/World.sol Outdated Show resolved Hide resolved
holic
holic previously approved these changes Mar 21, 2024
Copy link
Member

@holic holic left a comment

Choose a reason for hiding this comment

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

small docs changes but otherwise good to go

@holic holic merged commit 93390d8 into main Mar 21, 2024
11 checks passed
@holic holic deleted the yonadaaa/abstract-store branch March 21, 2024 12:55
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.

revisit abstract Store contract
3 participants