from pymaker.numeric import Wad balance = Wad(1000).to_dai() # Convert 1000 Wei to DAI print(balance) # 0.0000000000000001 DAI
from pymaker.numeric import Wad sai_amount = Wad(1000).to_sai() # Convert 1000 Wei to SAI dai_amount = sai_amount.to_dai() # Convert SAI to DAI print(dai_amount) # 1.00 DAIIn both examples, we use the `Wad` class to convert amounts between different Ethereum-based stablecoins. This class is part of the `pymaker.numeric` package library.