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

Upgrade serde-json-wasm to 1.0 #1939

Merged
merged 8 commits into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,17 @@ and this project adheres to
add constructor for `Binary`. ([#1876])
- cosmwasm-vm: Make inner value of `Size` private and add constructor. ([#1876])
- cosmwasm-vm: Reduce gas values by a factor of 1000. ([#1884])
- cosmwasm-std: Upgrade to `serde-json-wasm` 1.0. This means `u128` and `i128`
are now serialized as numbers instead of strings. Use `Uint128` and `Int128`
instead. ([#1939])

[#1874]: https://github.com/CosmWasm/cosmwasm/pull/1874
[#1876]: https://github.com/CosmWasm/cosmwasm/pull/1876
[#1879]: https://github.com/CosmWasm/cosmwasm/pull/1879
[#1884]: https://github.com/CosmWasm/cosmwasm/pull/1884
[#1898]: https://github.com/CosmWasm/cosmwasm/pull/1898
[#1902]: https://github.com/CosmWasm/cosmwasm/pull/1902
[#1939]: https://github.com/CosmWasm/cosmwasm/pull/1939

### Removed

Expand Down
12 changes: 6 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions MIGRATING.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,24 @@ major releases of `cosmwasm`. Note that you can also view the
+canonical_addr.as_slice()
```

- If you use any `u128` or `i128` in storage or message types, replace them with
`Uint128` and `Int128` respectively to preserve the current serialization.
Failing to do this will result in deserialization errors!

```diff
#[cw_serde]
struct MyStorage {
- a: u128,
- b: i128,
+ a: Uint128,
+ b: Int128,
}
const map: Map<u128, MyStorage> = Map::new("map");

-const item: Item<u128> = Item::new("item");
+const item: Item<Uint128> = Item::new("item");
```

## 1.4.x -> 1.5.0

- Update `cosmwasm-*` dependencies in Cargo.toml (skip the ones you don't use):
Expand Down
14 changes: 7 additions & 7 deletions contracts/burner/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions contracts/crypto-verify/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions contracts/cyberpunk/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions contracts/floaty/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions contracts/hackatom/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions contracts/ibc-reflect-send/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions contracts/ibc-reflect/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions contracts/queue/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading