Skip to content

Commit

Permalink
Merge pull request #354 from kleros/feat/chainlink-rng
Browse files Browse the repository at this point in the history
feat: update chainlink version and remove RNG
  • Loading branch information
MerlinEgalite authored Jul 5, 2021
2 parents d570e96 + 2eb1849 commit 64b9bd4
Show file tree
Hide file tree
Showing 3 changed files with 2,954 additions and 3,156 deletions.
14 changes: 3 additions & 11 deletions contracts/standard/rng/ChainlinkRNG.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
pragma solidity ^0.6.6;

import "@chainlink/contracts/src/v0.6/VRFConsumerBase.sol";
import "./RNG.sol";


interface IKlerosLiquid {
function passPhase() external;
Expand All @@ -26,7 +24,7 @@ interface IKlerosLiquid {
* @dev Chainlink documentation: https://docs.chain.link/docs/chainlink-vrf/
* @dev For SECURITY CONSIDERATIONS, you might also have look to: https://github.com/smartcontractkit/chainlink/blob/master/evm-contracts/src/v0.6/VRFConsumerBase.sol
*/
contract ChainlinkRNG is RNG, VRFConsumerBase {
contract ChainlinkRNG is VRFConsumerBase {

/* Storage */

Expand Down Expand Up @@ -96,17 +94,11 @@ contract ChainlinkRNG is RNG, VRFConsumerBase {

/**
* @dev Requests a random number.
* @dev The _seed parameter is vestigial, and is kept only for API
* @dev compatibility with older versions. It can't *hurt* to mix in some of
* @dev your own randomness, here, but it's not necessary because the VRF
* @dev oracle will mix the hash of the block containing your request into the
* @dev VRF seed it ultimately uses.
* @param _seed seed mixed into the input of the VRF.
* @return requestId unique ID for this request.
*/
function requestRN(uint _seed) external onlyByKleros returns (bytes32 requestId) {
function requestRN() external onlyByKleros returns (bytes32 requestId) {
require(LINK.balanceOf(address(this)) >= fee, "ChainlinkRNG: not enough LINK to pay the fee");
return requestRandomness(keyHash, fee, _seed);
return requestRandomness(keyHash, fee);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"dependencies": {
"@kleros/kleros": "^0.1.2",
"@realitio/realitio-contracts": "^2.0.5",
"@chainlink/contracts": "^0.1.7",
"@chainlink/contracts": "0.2.0",
"minimetoken": "^0.2.0",
"openzeppelin-solidity": "^1.12.0",
"web3-utils": "^1.2.1"
Expand Down
Loading

0 comments on commit 64b9bd4

Please sign in to comment.