2

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.

2
  • 1
    No need to request it periodically, unless you're dealing with a scam token (and probably not even then). Nov 27 '20 at 11:21
  • @goodvibration what about the address for a specific pair, does it stay the same?
    – abullock
    Nov 27 '20 at 11:46
3

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.