Skip to content

Commit

Permalink
Merge pull request #133 from zama-ai/petar/fix-rand-input-type
Browse files Browse the repository at this point in the history
Fix input type for the fheRand precompile
  • Loading branch information
dartdart26 authored Sep 14, 2023
2 parents 7eb6828 + 6e35f79 commit 88c72be
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion codegen/templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,7 @@ function implCustomMethods(): string {
}
function rand(uint8 randType) internal view returns(uint256 result) {
bytes32[1] memory input;
bytes1[1] memory input;
input[0] = bytes1(randType);
uint256 inputLen = 1;
Expand Down
4 changes: 2 additions & 2 deletions examples/Governor/GovernorZama.sol
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,8 @@ contract GovernorZama {
}

function cancel(uint proposalId) public {
ProposalState state = state(proposalId);
require(state != ProposalState.Executed, "GovernorAlpha::cancel: cannot cancel executed proposal");
ProposalState proposalState = state(proposalId);
require(proposalState != ProposalState.Executed, "GovernorAlpha::cancel: cannot cancel executed proposal");

Proposal storage proposal = proposals[proposalId];

Expand Down
2 changes: 1 addition & 1 deletion lib/Impl.sol
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ library Impl {
}

function rand(uint8 randType) internal view returns (uint256 result) {
bytes32[1] memory input;
bytes1[1] memory input;
input[0] = bytes1(randType);
uint256 inputLen = 1;

Expand Down

0 comments on commit 88c72be

Please sign in to comment.