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

[CIS-5] add serde to a number of types #430

Merged
merged 4 commits into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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
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"]
lassemoldrup marked this conversation as resolved.
Show resolved Hide resolved
optional = true
default-features = false

[dependencies.concordium-contracts-common]
path = "../concordium-rust-sdk/concordium-base/smart-contracts/contracts-common/concordium-contracts-common"
version = "9.0"
lassemoldrup marked this conversation as resolved.
Show resolved Hide resolved
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
Loading