Skip to content

Commit

Permalink
Merge pull request #430 from Concordium/cis5-add-serde
Browse files Browse the repository at this point in the history
[CIS-5] add serde to a number of types
  • Loading branch information
lassemoldrup authored May 14, 2024
2 parents e89117e + 167f309 commit 39a0dd1
Show file tree
Hide file tree
Showing 6 changed files with 293 additions and 16 deletions.
3 changes: 2 additions & 1 deletion concordium-cis2/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
## Unreleased changes

- Bump MSRV to 1.72
- Add `FromStr` implementations for `TokenId` types.
- Add a `serde` feature that derives `serde::Serialize` and `serde::Deserialize` for `TokenId` types, `TokenAmount` types, `OnReceivingCis2DataParams<T, A, D>`, `OnReceivingCis2Params<T, A>`, `AdditionalData`, and `Receiver`.
- Fix `SchemaType` implementation of `OnReceivingCis2DataParams<T, A, D>` so that it matches `Serial` and `Deserial` implementations.

## concordium-cis2 6.1.0 (2024-02-22)
Expand All @@ -28,7 +30,6 @@
call into other cis2 compatible smart contracts in a type safe way.
- Bump concordium-std to version 8.


## concordium-cis2 4.0.0 (2023-06-16)

- Bump concordium-std to version 7.
Expand Down
19 changes: 18 additions & 1 deletion concordium-cis2/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,27 @@ default-features = false
version = "0.11"
default-features = false

[dependencies.serde]
version = "1.0"
features = ["alloc", "derive"]
optional = true
default-features = false

[dependencies.concordium-contracts-common]
path = "../concordium-rust-sdk/concordium-base/smart-contracts/contracts-common/concordium-contracts-common"
version = "*"
optional = true
default-features = false

[features]
default = ["std"]
std = ["concordium-std/std"]
u256_amount = []
serde = [
"dep:serde",
"concordium-contracts-common/derive-serde",
"primitive-types/impl-serde",
]

[lib]
crate-type = ["rlib"]
Expand All @@ -36,5 +53,5 @@ opt-level = "s"
# exist on that platform.
targets = ["wasm32-unknown-unknown"]
# Default features to build documentation for.
features = ["std", "u256_amount"]
features = ["std", "u256_amount", "serde"]
rustc-args = ["--cfg", "docsrs"]
Loading

0 comments on commit 39a0dd1

Please sign in to comment.