Skip to content

Commit

Permalink
VRFConsumerHelper._withdrawLINK is internal instead of being Ownable;…
Browse files Browse the repository at this point in the history
… also remove generated.go files
  • Loading branch information
ARR4N committed Jan 4, 2022
1 parent 911a32c commit a3ef1d3
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 3,416 deletions.
8 changes: 2 additions & 6 deletions contracts/thirdparty/chainlink/VRFConsumerHelper.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ pragma solidity >=0.8.0 <0.9.0;

import "./Chainlink.sol";
import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

/**
Expand All @@ -13,7 +12,7 @@ know constants such as contract addresses.
@dev This contract should be used in an identical manner to Chainlink's standard
VRFConsumerBase, along with all the same best practices.
*/
abstract contract VRFConsumerHelper is Ownable, VRFConsumerBase {
abstract contract VRFConsumerHelper is VRFConsumerBase {
constructor()
VRFConsumerBase(Chainlink.vrfCoordinator(), Chainlink.linkToken())
{}
Expand All @@ -28,10 +27,7 @@ abstract contract VRFConsumerHelper is Ownable, VRFConsumerBase {
}

/// @notice Withdraws LINK tokens, sending them to the recipient.
function withdrawLINK(address recipient, uint256 amount)
external
onlyOwner
{
function _withdrawLINK(address recipient, uint256 amount) internal {
require(
IERC20(Chainlink.linkToken()).transfer(recipient, amount),
"VRFConsumerHelper: withdrawal failed"
Expand Down
Loading

0 comments on commit a3ef1d3

Please sign in to comment.