-
Notifications
You must be signed in to change notification settings - Fork 5
Add Minter module to frxUSD oft #118
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: feat/oft-upgrade-v1.1.1
Are you sure you want to change the base?
Add Minter module to frxUSD oft #118
Conversation
|
What if, instead of minting on remote chains, we hop to Fraxtal, mint there, and send the tokens back via hopCompose()? |
Add the minter_burn_from function as well as monotonic accounting variables
| /// @param minter_address Address of minter to add | ||
| function _addMinter(address minter_address) internal { | ||
| MinterModuleStorage storage $ = _getMinterModuleStorage(); | ||
| if ($.minters[minter_address]) revert AlreadyExists(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: add zero-address sanity checks similar to Fraxtal's frxUSD.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
contracts/modules/MinterModule.sol
Outdated
| // Views | ||
| //============================================================================== | ||
|
|
||
| function minters(address _address) public view returns(bool) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: these views can be external if they're not called internally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will fix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But playing devils advocate here, we do not know what cases these could be needed in the future
For example if we implement a burn module and want to fat it by minters
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh good point. I didn't think of that. Yeah in that case we would want the functions public. Okay, I am good with keeping them public.
Adds Minter Module to OFT tokens