-
Hello, But when I click on it it does not return "uint256" but an error in the console which says
Do you know why ?function fund() public payable {
addressToAmountFunded[msg.sender] += msg.value;
// what the ETH -> USD conversion rate
}
function getVersion() public view returns (uint256) {
AggregatorV3Interface priceFeed = AggregatorV3Interface(0x8A753747A1Fa494EC906cE90E9f37563A8AF630e);
return priceFeed.version();
}
function getPrice() public view returns(uint256) {
AggregatorV3Interface priceFeed = AggregatorV3Interface(0x8A753747A1Fa494EC906cE90E9f37563A8AF630e);
(
uint80 roundId,
int256 answer,
uint256 startedAt,
uint256 updatedAt,
uint80 answeredInRound)
= priceFeed.latestRoundData();
return uint256(answer);
}
|
Beta Was this translation helpful? Give feedback.
Answered by
cromewar
Dec 23, 2021
Replies: 1 comment 2 replies
-
Hello @NinjaTurtles-cloud |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
cromewar
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello @NinjaTurtles-cloud
This address: 0x8A753747A1Fa494EC906cE90E9f37563A8AF630e is for RInkeby test network, so be sure you are using Rinkeby on your metamask.
Also could you please share the entire script so we could check it?