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
Add transfer vault capability for crab v2 #518
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
Can you also add a simple test for this?
Do we want to add a timelock as well? If so you could look at https://github.com/compound-finance/compound-protocol/blob/master/contracts/Timelock.sol |
a73a9c1
to
0dc4b1e
Compare
@aparnakr How bout making a separate PR for this? |
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.
Generally lgtm, few small comments. Ok doing the timelock in separate PR, but do think it may change things a decent amount / larger scope. Fine with either way of doing it.
TLDR:
- Think easier to use optimizer to fix contract bytecode size for now, reverted later
- add missing natspec
- could consider public vs external/internal pattern especially if hit bytecode limit later
4c9bc2e
to
1a0564d
Compare
@@ -0,0 +1,191 @@ | |||
// SPDX-License-Identifier: BSD-3-Clause |
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 want to change any code from the compound, so I copied math lib too
@@ -212,7 +212,18 @@ const config: HardhatUserConfig = { | |||
solidity: { | |||
compilers: [ | |||
UNISWAP_SETTING, | |||
] | |||
], | |||
overrides: { |
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.
Timelock related contracts need 0.8.10
as it's used by compound
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.
Are the tests also mostly from Compound? It might be fine to just port over and edit their tests.
Is the contract size below the limit now? |
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
That's what I did almost |
Yep |
Will be merged in #530 |
Task:
Add vault transferring capability to crabV2
I am getting
Contract code size exceeds 24576 bytes
so I disabled it for now and we have to fix it laterDescription
transferVault
event