Skip to content

Conversation

james-toussaint
Copy link
Contributor

@james-toussaint james-toussaint commented Mar 20, 2025

@james-toussaint james-toussaint self-assigned this Mar 20, 2025
Copy link

codecov bot commented Mar 21, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.83%. Comparing base (e111ed9) to head (62c93d5).
⚠️ Report is 212 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #213      +/-   ##
===========================================
+ Coverage    84.50%   84.83%   +0.33%     
===========================================
  Files           35       36       +1     
  Lines         1084     1108      +24     
  Branches       221      224       +3     
===========================================
+ Hits           916      940      +24     
  Misses         168      168              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@james-toussaint james-toussaint force-pushed the feature/erc-2535-diamond-proxy branch from fbf7626 to d879576 Compare March 24, 2025 11:25
pragma solidity >=0.6.0 <0.9.0;

abstract contract OwnableDiamondStore {
// Add storage slot padding for now to avoid updating the few tests using
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a todo remove ?

Comment on lines +42 to +43
// `receive` & `fallback` functions must be respectively added to diamond with
// 0x00000000 & 0xffffffff selectors.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this comments should be set few lines before (?)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

}
address facet = ds.selectorToFacetAndPosition[msg.sig].facetAddress;
if(facet == address(0)){
facet = ds.selectorToFacetAndPosition[0xffffffff].facetAddress; // fallback
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really get this line? What should be the output the address of the entrypoint ?

@gfournieriExec gfournieriExec requested a review from Copilot July 15, 2025 16:29
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR migrates the project from ERC-1538 proxy pattern to ERC-2535 Diamond proxy pattern, implementing a more standardized and flexible proxy architecture. The Diamond pattern provides better modularity and gas efficiency for upgradeable contracts.

Key changes include:

  • Replacement of ERC-1538 proxy with ERC-2535 Diamond proxy implementation
  • Migration of contract linking logic to use Diamond facets instead of ERC-1538 modules
  • Update of base contracts and storage patterns to support Diamond architecture

Reviewed Changes

Copilot reviewed 13 out of 14 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
utils/proxy-tools.ts Replaces ERC-1538 linking logic with Diamond facet management
deploy/0_deploy.ts Updates deployment script to use Diamond proxy instead of ERC-1538
contracts/Diamond.sol Adds new Diamond proxy contract implementation
contracts/OwnableDiamondStore.sol Introduces Diamond-compatible storage with ownership functionality
contracts/modules/DelegateBase.sol Removes ERC-1538 module inheritance
contracts/Store.sol Updates storage base class to use Diamond pattern
package.json Adds Diamond library dependency
Comments suppressed due to low confidence (1)

deploy/0_deploy.ts:86

  • The transferOwnershipCall variable is prepared but not used in the Diamond constructor. This appears to be dead code that should be removed.
            throw new Error('Failed to prepare transferOwnership data');

@zguesmi
Copy link
Member

zguesmi commented Jul 29, 2025

Closed in favor of #241

@zguesmi zguesmi closed this Jul 29, 2025
@Le-Caignec Le-Caignec deleted the feature/erc-2535-diamond-proxy branch July 30, 2025 08:39
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.

3 participants