I am implementing Chainlink in my contract. Should I request the decimals()
function periodically, or decimals are static, so I don't have to worry about any decimals change in a specific contract.
-
1No need to request it periodically, unless you're dealing with a scam token (and probably not even then).– goodvibrationCommented Nov 27, 2020 at 11:21
-
@goodvibration what about the address for a specific pair, does it stay the same?– drabCommented Nov 27, 2020 at 11:46
Add a comment
|
1 Answer
It stays the same, it will not change. The only thing to note is that all pairs have 8 decimals unless it's an ETH pair.
ie: ETH/USD has 8 decimals, and AAVE/ETH will have 18, since the second currency in the pair is ETH.