Conversation
3c2536f to
c93145b
Compare
🦋 Changeset detectedLatest commit: 95dc04c The changes in this PR will be included in the next version bump. This PR includes changesets to release 28 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 |
|
Current dependencies on/for this PR:
This comment was auto-generated by Graphite. |
bb8cc29 to
84716aa
Compare
c93145b to
af1c6da
Compare
af1c6da to
6810138
Compare
Co-authored-by: Kevin Ingersoll <kingersoll@gmail.com>
48c5fdc to
09755c6
Compare
6810138 to
7232778
Compare
| bytes32 keysHash = keccak256(abi.encode(keyTuple)); | ||
|
|
||
| // If the key has not yet been set in the table... | ||
| // If the keyTuple has not yet been set in the table... |
There was a problem hiding this comment.
| // If the keyTuple has not yet been set in the table... | |
| // If the key has not yet been set in the table... |
| } | ||
|
|
||
| // Update the index to avoid duplicating this key in the array | ||
| // Update the index to avoid duplicating this keyTuple in the array |
There was a problem hiding this comment.
| // Update the index to avoid duplicating this keyTuple in the array | |
| // Update the index to avoid duplicating this key in the array |
| (bool has, uint40 index) = UsedKeysIndex.get(tableId, keysHash); | ||
|
|
||
| // If the key was part of the table... | ||
| // If the keyTuple was part of the table... |
There was a problem hiding this comment.
| // If the keyTuple was part of the table... | |
| // If the key was part of the table... |
| // If the keyTuple was part of the table... | ||
| if (has) { | ||
| // Delete the index as the key is not in the table | ||
| // Delete the index as the keyTuple is not in the table anymore |
There was a problem hiding this comment.
| // Delete the index as the keyTuple is not in the table anymore | |
| // Delete the index as the key is not in the table anymore |
| } | ||
|
|
||
| // Update the index of lastKey after swapping it with the deleted key | ||
| // Update the index of lastKey after swapping it with the deleted keyTuple |
There was a problem hiding this comment.
| // Update the index of lastKey after swapping it with the deleted keyTuple | |
| // Update the index of lastKey after swapping it with the deleted key |
|
|
||
| /** | ||
| * Get whether the key is in the given table. | ||
| * Get whether the keyTuple is in the given table. |
There was a problem hiding this comment.
| * Get whether the keyTuple is in the given table. | |
| * Get whether the key is in the given table. |
|
|
||
| /** | ||
| * Get whether the key is in the given table for the given store. | ||
| * Get whether the keyTuple is in the given table for the given store. |
There was a problem hiding this comment.
| * Get whether the keyTuple is in the given table for the given store. | |
| * Get whether the key is in the given table for the given store. |
…to alvrs/rename-key-tuple
|
re: |
|
did another pass of self-review, gonna go ahead with merging this to unblock other PRs |

Fixes #1128
https://www.notion.so/latticexyz/MUD-naming-conventions-66e11356a1934465b2aa1a951c61a299