Skip to content
This repository has been archived by the owner on Sep 18, 2023. It is now read-only.

Commit

Permalink
Merge pull request #102 from Concordium/derive-forward-attribute
Browse files Browse the repository at this point in the history
Derive forward attribute
  • Loading branch information
limemloh committed Jul 14, 2023
2 parents fc127dd + 6915c9b commit b65a456
Show file tree
Hide file tree
Showing 5 changed files with 793 additions and 131 deletions.
3 changes: 3 additions & 0 deletions concordium-contracts-common-derive/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

- Support adding `#[concordium(repr(u))]` for enum types, where `u` is either `u8` or `u16`. Setting this changes the integer serialization used for the variant tags in derive macros such as `Serial`, `Deserial`, `DeserialWithState` and `SchemaType`.
- Support adding `#[concordium(tag = n)]` for enum variants, where `n` is some unsigned integer literal. Setting this attribute on a variant overrides the tag used in derive macros such as `Serial`, `Deserial`, `DeserialWithState` and `SchemaType`. Note that setting `#[concordium(repr(u*))]` is required when using this attribute.
- Support adding `#[concordium(forward = n)]`, for enum variants, where `n` is either an unsigned integer literal, `cis2_events`, `cis3_events`, `cis4_events` or an array of the same options.
Setting this attribute on a variant overrides the (de)serialization to flatten with the (de)serialization of the inner field when using derive macros such as `Serial`, `Deserial`, `DeserialWithState` and `SchemaType`.
Note that setting `#[concordium(repr(u*))]` is required when using this attribute.

## concordium-contracts-common-derive 3.0.0 (2023-06-16)

Expand Down
Loading

0 comments on commit b65a456

Please sign in to comment.