Skip to content

Allow enum types for I/O if underlying type is allowed - #6

Merged
Franziska-Mueller merged 3 commits into
Franziska-Mueller:mainfrom
N-010:patch-2
Apr 29, 2026
Merged

Allow enum types for I/O if underlying type is allowed#6
Franziska-Mueller merged 3 commits into
Franziska-Mueller:mainfrom
N-010:patch-2

Conversation

@N-010

@N-010 N-010 commented Apr 17, 2026

Copy link
Copy Markdown
Contributor

For Nost: qubic/core#842

@Franziska-Mueller

Copy link
Copy Markdown
Owner

the tool will flag custom structs as "allowed for input/output types" if all its member variables are already allowed. this is not the case here. AuctionData contains HashSet which is forbidden as described in our documentation (https://github.com/qubic/core/blob/main/doc/contracts.md#restrictions-of-c-language-features, last paragraph in the section).

N-010 added 2 commits April 26, 2026 00:47
Removed 'AuctionData' type from the defined types list.
@N-010

N-010 commented Apr 25, 2026

Copy link
Copy Markdown
Contributor Author

@Franziska-Mueller
Can we add this check for enum classes? It's inconvenient to use uint8 in _input _ouptu in SC, and then cast uint8 to and from the enum class within the project.

@Franziska-Mueller Franziska-Mueller changed the title Add 'AuctionData' type to defines.h Allow enum types for I/O if underlying type is allowed Apr 29, 2026

@Franziska-Mueller Franziska-Mueller left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for your contribution. looks good to me.

@Franziska-Mueller
Franziska-Mueller merged commit 475ae7b into Franziska-Mueller:main Apr 29, 2026
3 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.

2 participants