Skip to content

Commit

Permalink
fix(chainlinkRNG.sol): RN type, interface and kleros check address
Browse files Browse the repository at this point in the history
  • Loading branch information
MerlinEgalite committed Jun 3, 2021
1 parent 69f0f6f commit 8b33dae
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions contracts/standard/rng/ChainlinkRNG.sol
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import "./RNG.sol";


interface IKlerosLiquid {
function passPhase() external {}
function passPhase() external;
}


Expand All @@ -38,7 +38,7 @@ contract ChainlinkRNG is RNG, VRFConsumerBase {
/* Modifier */

modifier onlyByKleros() {
require(msg.sender == kleros, "ChainlinkRNG: not called by Kleros");
require(msg.sender == address(kleros), "ChainlinkRNG: not called by Kleros");
_;
}

Expand Down Expand Up @@ -114,7 +114,7 @@ contract ChainlinkRNG is RNG, VRFConsumerBase {
* @param _requestId The request Id initially returned by requestRN.
* @return RN Random Number. If the number is not ready or has not been required it returns 0.
*/
function getRN(bytes32 _requestId) external returns (bytes32 RN) {
function getRN(bytes32 _requestId) external view returns (uint256 RN) {
return randomNumber[_requestId];
}

Expand All @@ -130,4 +130,4 @@ contract ChainlinkRNG is RNG, VRFConsumerBase {
randomNumber[_requestId] = _randomness;
IKlerosLiquid(kleros).passPhase();
}
}
}

0 comments on commit 8b33dae

Please sign in to comment.