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(store): never allow empty FieldLayout #2122

Merged
merged 5 commits into from
Jan 12, 2024
Merged

Conversation

holic
Copy link
Member

@holic holic commented Jan 12, 2024

closes #2112

Copy link

changeset-bot bot commented Jan 12, 2024

🦋 Changeset detected

Latest commit: a2e806e

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

This PR includes changesets to release 30 packages
Name Type
@latticexyz/store Major
@latticexyz/cli Major
@latticexyz/dev-tools Major
@latticexyz/react Major
@latticexyz/store-indexer Major
@latticexyz/store-sync Major
@latticexyz/world-modules Major
@latticexyz/world 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

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

@holic holic marked this pull request as ready for review January 12, 2024 15:12
@holic holic requested a review from alvrs as a code owner January 12, 2024 15:12
@holic holic requested a review from dk1a January 12, 2024 15:12

uint256 _numStaticFields = fieldLayout.numStaticFields();
// FieldLayout must not have more than MAX_TOTAL_FIELDS in total
Copy link
Member Author

Choose a reason for hiding this comment

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

these comments seemed redundant and exactly describe the conditional below

yonadaa
yonadaa previously approved these changes Jan 12, 2024
@holic holic merged commit 3ac68ad into main Jan 12, 2024
11 checks passed
@holic holic deleted the holic/fieldlayout-never-empty branch January 12, 2024 16:17
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.

FieldLayout.validate should never allow empty
2 participants