I am encountering a Compilation Error #42
Unanswered
Vermitrude
asked this question in
Q&A
Replies: 1 comment
-
The function @internal
@view
def _get_eth_to_usd_rate(eth_amount: uint256) -> uint256:
"""
Chris sent us 0.01 ETH for us to buy a coffee
Is that more or less than $5?
"""
price: int256 = staticcall PRICE_FEED.latestAnswer()
eth_price: uint256 = (convert(price, uint256)) * (10**10)
eth_amount_in_usd: uint256 = (eth_price * eth_amount) // PRECISION
return eth_amount_in_usd # 18 0's, 18 decimal places |
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
-
this is the reference image.
Any help?
Beta Was this translation helpful? Give feedback.
All reactions