Skip to content

refactor(diamond): split proxy mechanics into Diamond base#9

Merged
jayeshy14 merged 1 commit into
mainfrom
refactor/diamond-base
May 29, 2026
Merged

refactor(diamond): split proxy mechanics into Diamond base#9
jayeshy14 merged 1 commit into
mainfrom
refactor/diamond-base

Conversation

@jayeshy14
Copy link
Copy Markdown
Owner

Segregates the EIP-2535 proxy mechanics from the ERC-4626 vault economics.

  • New src/Diamond.sol (abstract): the delegatecall fallback(), receive(), the diamondCut+ownership wiring in its constructor, and the UnknownSelector error.
  • Vault is now contract Vault is Diamond, ERC4626, carrying only totalAssets, _deposit/_withdraw, _guard, _accrueFees, _decimalsOffset.

Pure source organisation — identical bytecode, storage, and behaviour (compile-time inheritance). The ERC-4626 surface stays native and non-upgradeable. 104/104 tests pass unchanged (incl. the fallback test); no storage collisions.

@jayeshy14 jayeshy14 merged commit a7b7228 into main May 29, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant