feat(store,world): replace ResourceSelector with ResourceId and WorldResourceId#1544
feat(store,world): replace ResourceSelector with ResourceId and WorldResourceId#1544
ResourceSelector with ResourceId and WorldResourceId#1544Conversation
🦋 Changeset detectedLatest commit: de9124e The changes in this PR will be included in the next version bump. This PR includes changesets to release 29 packages
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 |
95539e3 to
436f814
Compare
| bytes32 constant _tableId = bytes32(abi.encodePacked(bytes16(""), bytes16("Multi"))); | ||
| bytes32 constant MultiTableId = _tableId; | ||
| ResourceId constant _tableId = ResourceId.wrap( | ||
| bytes32(abi.encodePacked(RESOURCE_TABLE, bytes14(""), bytes16("Multi"))) |
There was a problem hiding this comment.
ooc is there any gas benefit to bytes.concat instead of abi.encodePacked here?
There was a problem hiding this comment.
bytes.concat is not considered a static function (so can't be used for constants), abi.encodePacked is 🤦♂️
| error RootInstallModeNotSupported(); | ||
| error NonRootInstallNotSupported(); |
There was a problem hiding this comment.
maybe for followup: should we make these more consistent by removing "mode" from one or adding it to the other?
There was a problem hiding this comment.
Oh I mean "root install mode not supported" vs "non root install not supported", we call it a "mode" in one instance but not the other
but yeah, can resolve as part of naming pass in #1126
There was a problem hiding this comment.
Oh I mean "root install mode not supported" vs "non root install not supported", we call it a "mode" in one instance but not the other
I understood, I meant we can do this renaming as part of the naming pass in 1126
Co-authored-by: Kevin Ingersoll <kingersoll@gmail.com>
fixes #1394
fixes #1367
TODO
ResourceIdinto a user type - had a bunch of runtime errors wherebytes14was automatically casted intobytes32, which would have been caught at compile time if resource type was a user typeTODOs in followups
bytes14 namespaceas argument, and useResourceId namespaceIdinstead (feat(world): useResourceId namespaceIdfor all methods acting on the namespace as a resource #1555)ResourceTypetable. Need to find a way to check whether a given resource already exists though (feat(store,world): replaceResourceTypetable withResourceIdtable and corresponding checks #1557)ResourceTypetable withResourceIdtable and corresponding checks #1557)