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

Unitroller has FuseAdmin hardcoded into its bytecode inside of FusePoolDirectory causes issues with unit testing #18

Open
zerosnacks opened this issue May 18, 2022 · 1 comment
Labels
blocker bug Something isn't working icebox

Comments

@zerosnacks
Copy link
Contributor

zerosnacks commented May 18, 2022

Midas Protocol has replaced the implementation with a dynamically constructed type(foo).creationCode + constructorData allowing you to pass in a fuseAdmin into the constructor.

Would it be feasible to replace our implementation where we have hardcoded the fuseAdmin address? @sriyantra
If not I can try to come up with ways that we can work around this limitation but it would mean that any tests we write are effectively integration tests.

https://github.com/Midas-Protocol/contracts/blob/a9c9f1d7d1c3106c545056d4af9105393aef29fc/contracts/FusePoolDirectory.sol#L144-L237

https://github.com/Midas-Protocol/contracts/blob/a9c9f1d7d1c3106c545056d4af9105393aef29fc/contracts/compound/Comptroller.sol#L1333-L1365

Related PR is #17

@sriyantra
Copy link
Collaborator

Midas Protocol has replaced the implementation with a dynamically constructed type(foo).creationCode + constructorData allowing you to pass in a fuseAdmin into the constructor.

Would it be feasible to replace our implementation where we have hardcoded the fuseAdmin address? @sriyantra If not I can try to come up with ways that we can work around this limitation but it would mean that any tests we write are effectively integration tests.

https://github.com/Midas-Protocol/contracts/blob/a9c9f1d7d1c3106c545056d4af9105393aef29fc/contracts/FusePoolDirectory.sol#L144-L237

https://github.com/Midas-Protocol/contracts/blob/a9c9f1d7d1c3106c545056d4af9105393aef29fc/contracts/compound/Comptroller.sol#L1333-L1365

Related PR is #17

I think the main issue here is compatibility with our current front-end setup. Let's see if there's a feasible workaround for now

@zerosnacks zerosnacks added icebox and removed to do labels May 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker bug Something isn't working icebox
Projects
None yet
Development

No branches or pull requests

2 participants