Skip to content

Commit 8b33dae

Browse files
committed
fix(chainlinkRNG.sol): RN type, interface and kleros check address
1 parent 69f0f6f commit 8b33dae

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

contracts/standard/rng/ChainlinkRNG.sol

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import "./RNG.sol";
1212

1313

1414
interface IKlerosLiquid {
15-
function passPhase() external {}
15+
function passPhase() external;
1616
}
1717

1818

@@ -38,7 +38,7 @@ contract ChainlinkRNG is RNG, VRFConsumerBase {
3838
/* Modifier */
3939

4040
modifier onlyByKleros() {
41-
require(msg.sender == kleros, "ChainlinkRNG: not called by Kleros");
41+
require(msg.sender == address(kleros), "ChainlinkRNG: not called by Kleros");
4242
_;
4343
}
4444

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

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

0 commit comments

Comments
 (0)