-
Notifications
You must be signed in to change notification settings - Fork 32
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
Storage refactor #69
Storage refactor #69
Conversation
foundry.toml
Outdated
@@ -22,8 +22,7 @@ number_underscore = "preserve" | |||
override_spacing = true | |||
ignore = [ | |||
"src/EVault/EVault.sol", | |||
"src/EVault/shared/types/MarketStorage.sol", | |||
"src/EVault/shared/types/MarketCache.sol" | |||
"src/EVault/shared/types/Market.sol", |
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.
"src/EVault/shared/types/Market.sol" does it even exist?
src/EVault/modules/Initialize.sol
Outdated
@@ -8,7 +8,8 @@ import {BorrowUtils} from "../shared/BorrowUtils.sol"; | |||
import {DToken} from "../DToken.sol"; | |||
import {ProxyUtils} from "../shared/lib/ProxyUtils.sol"; | |||
import {RevertBytes} from "../shared/lib/RevertBytes.sol"; | |||
import {MarketCache} from "../shared/types/MarketCache.sol"; | |||
import {VaultCache} from "../shared/types/VaultCache.sol"; | |||
// import {SnapshotStorage} from "../shared/SnapshotStorage.sol"; |
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
|
||
function snapshotStorage() internal pure virtual returns (Snapshot storage data) { | ||
assembly { | ||
data.slot := SNAPSHOT_STORAGE // The extrenal struct's slot is the same as internal's |
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.
typo: extrenal
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.
forgot to remove 👍
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.
Looks OK to me. s/market/vault
make sense for sure.
I'm on the fence about the ERC-7201 stuff, slightly lean towards no. It adds more boilerplate everywhere we use storage, but maybe will make some things easier down the road.
abaf4ec
to
854966b
Compare
Storage refactored to ERC-7201 unstructured storage namespaces, following OZ's lead.