FundMe.sol gas requirement is infinite #310
              
                Unanswered
              
          
                  
                    
                      guillermo-palou
                    
                  
                
                  asked this question in
                Q&A
              
            Replies: 1 comment
-
| Hello @guillermo-palou, make sure your  function getPrice() public view returns(uint256){
      AggregatorV3Interface priceFeed = AggregatorV3Interface(0x8A753747A1Fa494EC906cE90E9f37563A8AF630e);
      (,int256 answer,,,) = priceFeed.latestRoundData();
       return uint256(answer * 10000000000);
  }Also don't forget to setup the correct amount of gas on REMIX | 
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
-
I am getting the following error on Lesson 3:
Gas requirement of function FundMe.getConversioRate is infinite: If the gas requirement of a function is higher than the block gas limit, it cannot be executed.
Here is the getConversionRate, I don't see any loops or anything
function getConversionRate(uint256 ethAmount) public view returns (uint256){
uint256 ethPrice = getPrice();
uint256 ethAmountInUsd = (ethPrice * ethAmount) / 1000000000000000000;
return ethAmountInUsd;
}
Beta Was this translation helpful? Give feedback.
All reactions