Skip to content

Comments

fix: correct type mismatch in adding-FHE tutorial#139

Open
giwaov wants to merge 1 commit intoFhenixProtocol:masterfrom
giwaov:fix/docs-type-mismatch-and-improvements
Open

fix: correct type mismatch in adding-FHE tutorial#139
giwaov wants to merge 1 commit intoFhenixProtocol:masterfrom
giwaov:fix/docs-type-mismatch-and-improvements

Conversation

@giwaov
Copy link

@giwaov giwaov commented Feb 16, 2026

Summary

  • Fixed getProposal() in the "Adding FHE to Existing Contract" tutorial where the return type declares uint256[] memory votes but the array is initialized as uint64[], causing a Solidity compilation error for anyone following the tutorial
  • Fixed in both the step-by-step diff section and the final complete contract listing

Details

The mismatch appears in two places:

  1. Step-by-step section: return type says uint256[], init says uint64[]
  2. Final contract: same mismatch

Both now correctly use uint256[] throughout.

Test plan

  • Verify the final contract in the tutorial compiles with solc ^0.8.20
  • Confirm getProposal() return types match the initialization

Closes #138

The `getProposal()` function declares return type `uint256[] memory votes`
but initializes the array as `uint64[]`, causing a Solidity compilation error.

Fixed in both the step-by-step diff and the final complete contract.

Closes FhenixProtocol#138
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.

Docs Audit: Type mismatch bug, syntax error, and several documentation gaps

1 participant