Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds a view method for getting current chi. #98

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Nov 8, 2019

  1. Adds a view method for getting current chi.

    This change makes it so a contract with a `view` function can know what `chi` would be in this block.  This is useful for contracts that have view functions that need to return values denominated in DAI when looking at DSR balances.
    
    An example use case for this is a token contract (DAI-GoUp) that wraps DAI held in DSR.  The `balanceOf` function of such a contract (which is `view`) needs to be able to calculate the current balance of an account denominated in DAI.  In order to do this, it must calculate what `chi` _would_ be if `drip` was called this block, but without actually calling `drip` (because that is not a view function).
    gbalabasquer authored and MicahZoltu committed Nov 8, 2019
    Configuration menu
    Copy the full SHA
    54a2a16 View commit details
    Browse the repository at this point in the history