Skip to content

Add hex:"optional" tag for Daml Optional type encoding#17

Merged
JohnChangUK merged 1 commit intomainfrom
feat/hex-optional-encoding
Mar 6, 2026
Merged

Add hex:"optional" tag for Daml Optional type encoding#17
JohnChangUK merged 1 commit intomainfrom
feat/hex-optional-encoding

Conversation

@JohnChangUK
Copy link
Contributor

Description

  • Add hex:"optional" struct tag support to HexCodec for proper Daml Optional encoding
  • Daml expects [0x00] for None and [0x01][value] for Some, but pointers were previously encoded without presence flags
  • Update codegen template to emit hex:"optional" tag on all Optional (pointer) fields

@JohnChangUK JohnChangUK requested a review from a team as a code owner March 6, 2026 20:32
@github-actions
Copy link

github-actions bot commented Mar 6, 2026

👋 JohnChangUK, thanks for creating this pull request!

To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team.

Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks!

@JohnChangUK JohnChangUK enabled auto-merge (squash) March 6, 2026 20:32
@JohnChangUK JohnChangUK force-pushed the feat/hex-optional-encoding branch from abe67b6 to 6ebacfa Compare March 6, 2026 20:35
@JohnChangUK JohnChangUK merged commit 5d06c60 into main Mar 6, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants