-
Notifications
You must be signed in to change notification settings - Fork 196
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
docs: add table tutorial #1273
docs: add table tutorial #1273
Conversation
|
…ticexyz/mud into 230802-minimal-extend-schema
…ticexyz/mud into 230802-minimal-extend-schema
In this case, the counter value is represented as a 32 bit unsigned integer, because that is what `Counter` uses. | ||
Block numbers and timestamps can be values up to `uint256`, so we'll use this type for these fields. | ||
|
||
</details> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we indent this to the same level as the 1.
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we should. However, when I do it the prettier script breaks it. :-(
When I try to indent and then commit, prettier
"fixes" it to this:
<details>
<summary>Explanation</summary>
A MUD table has two schemas:
- `keySchema`, the key used to find entries
- `schema`, the value in the entry (soon to be renamed to `valueSchema`)
Each schema is represented as a structure with field names as keys, and the appropriate [Solidity data types](https://docs.soliditylang.org/en/latest/types.html) as their values.
In this case, the counter value is represented as a 32 bit unsigned integer, because that is what `Counter` uses.
Block numbers and timestamps can be values up to `uint256`, so we'll use this type for these fields.
</details>
And then I get this error:
./pages/tutorials/minimal/add-table.mdx
Expected a closing tag for `<details>` (42:5-42:14) before the end of `listItem`
I spent enough time on it that I decided it's not worth hassling with anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the trick to get it to work is add a blank line between the opening/closing tags and the contents, like we did for the <CollapseCode>
.
Maybe there's an update to prettier that fixes these. Will look!
No description provided.