Skip to content

miss-yusrah/Upgradable-contract

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Upgradeable Staking Facet (Diamond, Add-Only)

Minimal EIP-2535-style Diamond that supports only adding facets (no replace/remove yet), plus a native-token staking facet that uses a dedicated storage slot.

Contracts

  • Diamond proxy: src/Diamond.sol
  • DiamondCut interface: src/interfaces/IDiamondCut.sol
  • Add-only diamond logic: src/libraries/LibDiamond.sol
  • DiamondCut facet: src/facets/DiamondCutFacet.sol
  • Staking storage: src/libraries/LibStaking.sol
  • Staking facet: src/facets/StakingFacet.sol

Test

  • test/StakingFacetDiamond.t.sol deploys the diamond, adds StakingFacet via diamondCut(Add), then stakes/withdraws through the diamond address.

Quickstart

forge build
forge test

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors