-
Notifications
You must be signed in to change notification settings - Fork 5
MicroStable updates #1
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
base: main
Are you sure you want to change the base?
Conversation
…re-compute address could be used instead
…impacting the collatRatio function
|
This is great! Will definitely merge this But could you keep the formatting I use. I don't like auto formatters. |
|
Regarding Line 51: You have to update the mapping first before you check the collatRatio. Because collatRatio needs the updated mapping. Line 73: You are correct and your fix is correct Line 20: Don't want to add that there tbh |
|
Ok, good stuff Shafu! Just on your comments... Line 51: let me know if I'm just getting confused here, but if we update the address2minted mapping first in the mint function is there every a situation where the "if(minted == 0)" code can be triggered in the collatRatio function... So minted here will always have a value > 0? Line 73: ok, thanks. Line 20: I have removed this in my local repo and am passing the managerContractAddress into the ShUSD contract instantiation. I'm still digging through the Foundry docs to figure out how to correctly use vm.computeCreateAddress. Re: the formatting... apologies, I tried to fix it, I must have a couple of linters installed, because disabling Prettier hasn't worked. |
|
Line 51: Yeah if you try to liquidate someone with 0 shUSD minted |
|
I fixed the liquidation btw. I could not wait on this. |
Hi Shafu,
I've added some tests for the MicroStable repo. All four are passing. I can add more another time if you'd like to get the coverage up.
Two changes were made to the Manager.sol file...
I made one change to the ShUSD.sol file...
I've also added an .example.env as the fork tests rely upon having an RPC URL set in .env.
Regards,
Adam