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

fix(store): enforce unique table names across types #2736

Merged
merged 14 commits into from
Apr 25, 2024
20 changes: 20 additions & 0 deletions docs/pages/store/reference/misc.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1850,6 +1850,26 @@ function getType(ResourceId resourceId) internal pure returns (bytes2);
| -------- | -------- | ------------------------------------- |
| `<none>` | `bytes2` | The extracted 2-byte type identifier. |

#### getNameStore

Get the name from a resource ID.

```solidity
function getNameStore(ResourceId resourceId) internal pure returns (bytes30);
```

**Parameters**

| Name | Type | Description |
| ------------ | ------------ | ---------------- |
| `resourceId` | `ResourceId` | The resource ID. |

**Returns**

| Name | Type | Description |
| -------- | --------- | --------------- |
| `<none>` | `bytes30` | A 30-byte name. |

## ResourceIdLib

[Git Source](https://github.com/latticexyz/mud/blob/main/packages/store/src/ResourceId.sol)
Expand Down
Loading
Loading