-
Notifications
You must be signed in to change notification settings - Fork 99
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
FIP-55: PCV Guardian #353
FIP-55: PCV Guardian #353
Conversation
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.
Needs an integration test or two, otherwise good.
SetupUpgradeFunc, | ||
TeardownUpgradeFunc, | ||
ValidateUpgradeFunc | ||
} from '../../types/types'; |
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.
use shorthand
@Joeysantoro I think we should add in a check when withdrawing to a safe address other than the DAOTimelock that the source and destination underlying token is the same. Otherwise, we could accidentally burn tokens by transferring them into a pcv deposit that can't handle them. |
Also there's an e2e test on this that is failing that I'd like to see fixed before approving. |
We shouldn't be able to burn tokens this way, because deposits have a |
Interesting. I think we need to sync on this because at a glance its a good idea but it removes the flexibility to rely on withdrawERC20. I think we should put this check inside the |
}; | ||
|
||
export const validate: ValidateUpgradeFunc = async (addresses, oldContracts, contracts) => { | ||
const pcvGuardian: PCVGuardian = contracts.pcvGuardian as PCVGuardian; |
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.
We shouldn't need to cast to type of PCVGuardian as the artifact that is loaded from contracts should be correct.
); | ||
|
||
expect(await contracts.rariPool8FeiPCVDeposit.paused()).to.be.true; | ||
expect(await contracts.fei.balanceOf(contractAddresses.feiDAOTimelock)).to.be.bignumber.equal( |
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.
We should add test to see delta between starting and ending balance.
https://tribe.fei.money/t/fip-55-pcv-guardian/3744
TODO