Skip to content

Commit

Permalink
Format markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
chipshort committed May 23, 2024
1 parent 776e41a commit 00b10ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/MESSAGE_TYPES.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Rust types as well as `cosmwasm_std` types and how they are encoded in JSON.
| u128/i128 | number | `340282366920938463463374607431768211455, -2766523308300312711084346401884294402` | Supported in Rust. Other implementations do not support the full range. This used to be serialized as a string in serde-json-wasm. See [Dev Note #4: u128/i128 serialization][dev-note-4]. If you have any code relying on that serialization, switch to `Uint128` / `Int128`. |
| usize/isize | number | `123456` | 🚫 Don't use this type because it has a different size in unit tests (64 bit) and Wasm (32 bit). Also it tends to issue float instructions such that the contracts cannot be uploaded. |
| String | string | `"foo"` |
| &str | string | `"foo"` | 🚫 Unsupported since message types must be owned (DeserializeOwned) |
| &str | string | `"foo"` | 🚫 Unsupported since message types must be owned (DeserializeOwned) |
| Option\<T\> | `null` or JSON type of `T` | `null`, `{"foo":12}` | |
| Vec\<T\> | array of JSON type of `T` | `["one", "two", "three"]` (Vec\<String\>), `[true, false]` (Vec\<bool\>) |
| Vec\<u8\> | array of numbers from 0 to 255 | `[187, 61, 11, 250]` | ⚠️ Discouraged as this encoding is not as compact as it can be. See `Binary`. |
Expand Down

0 comments on commit 00b10ff

Please sign in to comment.