You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: website/docs/language/types.md
+8-6
Original file line number
Diff line number
Diff line change
@@ -185,12 +185,14 @@ Using `bytes20 placeholderPkh= bytes20(0)` will generate a 20 byte zero-array pr
185
185
`bytes20 placeholderPkh= 0x0000000000000000000000000000000000000000` will actually take 20 bytes of space in your contract.
186
186
:::
187
187
188
-
Casting an integer to a fixed-size byte-length can be a very important when storing local state in an nftCommitment. Developers need to consider what the preferable fixed-size length is for each indivual case depending on the interger range. Below we add a table with information on the maximum integer size for satoshis and fungible CashTokens:
| CashTokens | 9223 quadrillion | 8 bytes for max supply token |
188
+
Casting an integer to a fixed-size byte-length can be a very important when storing local state in an nftCommitment. When casting a script number to bytes, developers need to consider what the preferable fixed-size length is for each indivual case depending on the interger range. Below we add a table with info on the maximum integer size for common cases:
189
+
190
+
| Integer Type | Max integer value | Max Byte Size in Script Number Format |
VM numbers follow Script Number format (A.K.A. CSCriptNum), to convert VM number to bytes or the reverse, it's recommended to use helper functions for these conversions from libraries like Libauth.
0 commit comments