You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a need to get the seed in contract which extends TFHEExecutor.sol (for event). For this, we need to split the generation of the seed and the generation of the randomness in two functions. It will be easier to override the function.
We need to do it for fheRand and fheRandBounded.
/* TFHEExecutor.sol */function fheRand(bytes1randType) publicvirtualoverridereturns (uint256result) {
seed =generateSeed();
result =generateRand(randType, seed);
}
/* TFHEExecutorWithEvents.sol (Overloaded function for events) */function fheRand(bytes1randType) publicvirtualoverridereturns (uint256result) {
seed =generateSeed();
result =generateRand(randType, seed);
emitFheRand(randType, seed, result);
}
The text was updated successfully, but these errors were encountered:
There is a need to get the seed in contract which extends TFHEExecutor.sol (for event). For this, we need to split the generation of the seed and the generation of the randomness in two functions. It will be easier to override the function.
We need to do it for fheRand and fheRandBounded.
The text was updated successfully, but these errors were encountered: