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). Commented Nov 27, 2020 at 11:21
  • @goodvibration what about the address for a specific pair, does it stay the same?
    – drab
    Commented Nov 27, 2020 at 11:46

1 Answer 1

6

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 and acknowledge you have read our privacy policy.

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