Skip to content
This repository has been archived by the owner on Oct 8, 2024. It is now read-only.

Modifications to demo contract #41

Closed
JesseAbram opened this issue Jan 28, 2020 · 1 comment
Closed

Modifications to demo contract #41

JesseAbram opened this issue Jan 28, 2020 · 1 comment

Comments

@JesseAbram
Copy link
Contributor

Hey, just went through the docs, got things to work. Just some comments. In the demo contract

contract PotLike {
    function chi() external returns (uint256);
    function rho() external returns (uint256);
    function drip() external returns (uint256);
    function join(uint256) external;
    function exit(uint256) external;
    function pie(address) public view returns (uint);

}

Chi should be sent to view so I can call it later here to get the proper balance

function balance() public view returns (uint256) {
       uint256 pie = pot.pie(address(this)); 
       uint256 chi = pot.chi();
       return pie * chi / RAY;
    }

Anyways thought I would point that out cheers!

@JesseAbram
Copy link
Contributor Author

JesseAbram commented Jan 28, 2020

This is linked to PR42

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant