Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
kumaryash90 committed Mar 19, 2024
1 parent 2fa9b0f commit 353017f
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 16 deletions.
28 changes: 28 additions & 0 deletions contracts/external-deps/chainlink/LinkTokenInterface.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface LinkTokenInterface {
function allowance(address owner, address spender) external view returns (uint256 remaining);

function approve(address spender, uint256 value) external returns (bool success);

function balanceOf(address owner) external view returns (uint256 balance);

function decimals() external view returns (uint8 decimalPlaces);

function decreaseApproval(address spender, uint256 addedValue) external returns (bool success);

function increaseApproval(address spender, uint256 subtractedValue) external;

function name() external view returns (string memory tokenName);

function symbol() external view returns (string memory tokenSymbol);

function totalSupply() external view returns (uint256 totalTokensIssued);

function transfer(address to, uint256 value) external returns (bool success);

function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool success);

function transferFrom(address from, address to, uint256 value) external returns (bool success);
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@chainlink/contracts/src/v0.8/shared/interfaces/LinkTokenInterface.sol";
import "@chainlink/contracts/src/v0.8/vrf/interfaces/VRFV2WrapperInterface.sol";
import "./LinkTokenInterface.sol";
import "./VRFV2WrapperInterface.sol";

/** *******************************************************************************
* @notice Interface for contracts using VRF randomness through the VRF V2 wrapper
Expand Down
32 changes: 32 additions & 0 deletions contracts/external-deps/chainlink/VRFV2WrapperInterface.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface VRFV2WrapperInterface {
/**
* @return the request ID of the most recent VRF V2 request made by this wrapper. This should only
* be relied option within the same transaction that the request was made.
*/
function lastRequestId() external view returns (uint256);

/**
* @notice Calculates the price of a VRF request with the given callbackGasLimit at the current
* @notice block.
*
* @dev This function relies on the transaction gas price which is not automatically set during
* @dev simulation. To estimate the price at a specific gas price, use the estimatePrice function.
*
* @param _callbackGasLimit is the gas limit used to estimate the price.
*/
function calculateRequestPrice(uint32 _callbackGasLimit) external view returns (uint256);

/**
* @notice Estimates the price of a VRF request with a specific gas limit and gas price.
*
* @dev This is a convenience function that can be called in simulation to better understand
* @dev pricing.
*
* @param _callbackGasLimit is the gas limit used to estimate the price.
* @param _requestGasPriceWei is the gas price in wei used for the estimation.
*/
function estimateRequestPrice(uint32 _callbackGasLimit, uint256 _requestGasPriceWei) external view returns (uint256);
}
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"/contracts/**/*.sol"
],
"devDependencies": {
"@chainlink/contracts": "^0.8.0",
"@openzeppelin/contracts": "^4.9.3",
"@openzeppelin/contracts-upgradeable": "^4.9.3",
"@thirdweb-dev/chains": "^0.1.54",
Expand Down
Loading

0 comments on commit 353017f

Please sign in to comment.