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.
Asked
Active
Viewed 1,686 times
2
drab
- 245
- 2
- 8
-
1No need to request it periodically, unless you're dealing with a scam token (and probably not even then). – goodvibration Nov 27 '20 at 11:21
-
@goodvibration what about the address for a specific pair, does it stay the same? – drab Nov 27 '20 at 11:46
1 Answers
5
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.
Patrick Collins
- 11,186
- 5
- 44
- 97