Skip to content

Commit

Permalink
Merge pull request #1939 from CosmWasm/1626-upgrade-serde-json
Browse files Browse the repository at this point in the history
Upgrade `serde-json-wasm` to 1.0
  • Loading branch information
chipshort authored Nov 7, 2023
2 parents 79b1571 + 9f8a08e commit 9a1380a
Show file tree
Hide file tree
Showing 17 changed files with 129 additions and 107 deletions.
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

0 comments on commit 9a1380a

Please sign in to comment.