Problem Mock & package.json
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
pragma solidity ^0.8.0;
|
||||
|
||||
import "./PriceConverter.sol";
|
||||
// Save Gas - constant, immutable
|
||||
// Save Gas by using constant, immutable for variables
|
||||
|
||||
error NotOwner();
|
||||
|
||||
|
||||
@@ -6,10 +6,6 @@ import "@chainlink/contracts/src/v0.8/shared/interfaces/AggregatorV3Interface.so
|
||||
// Why is this a library and not abstract?
|
||||
// Why not an interface?
|
||||
library PriceConverter {
|
||||
// Sepolia ETH / USD Address
|
||||
// https://docs.chain.link/data-feeds/price-feeds/addresses#Sepolia%20Testnet
|
||||
//0x694AA1769357215DE4FAC081bf1f309aDC325306
|
||||
|
||||
// We could make this public, but then we'd have to deploy it
|
||||
function getPrice(
|
||||
AggregatorV3Interface priceFeed
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
pragma solidity ^0.8.8;
|
||||
|
||||
import "@chainlink/contracts/src/v0.8/tests/MockV3Aggregator.sol";
|
||||
|
||||
// Direct import from the github, located at local node_modules
|
||||
Reference in New Issue
Block a user