-
Notifications
You must be signed in to change notification settings - Fork 4
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
[NES-255] make pUSD a ComponentToken #97
base: main
Are you sure you want to change the base?
Conversation
…PSUpgradeable, ComponentToken
…(lines&functions), fix small problems with pUSD
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.
LGTM
address(pUSDToken), | ||
abi.encodeCall(pUSD.initialize, (NEST_ADMIN_ADDRESS, IERC20(USDC_ADDRESS), VAULT_ADDRESS)) | ||
); | ||
|
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.
Remove deploying pUSD here since we have a different script to deploy pUSD
function convertToShares( | ||
uint256 assets | ||
) public view virtual override returns (uint256) { | ||
return _convertToShares(assets, Math.Rounding.Floor); |
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.
Check which should be Floor and which should be Ceil
return _balances[account]; | ||
} | ||
|
||
function setBeforeTransferHook( |
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.
Don't need
if (newVault == address(0)) { | ||
revert InvalidVault(); | ||
} | ||
|
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.
Could add supportsInterface
check here for ERC-20 (imo unnecessary)
What's new in this PR?
make pUSD a ComponentToken.
need to have a second look and add tests..
WIP