Skip to content

Conversation

0xNeshi
Copy link
Collaborator

@0xNeshi 0xNeshi commented Jul 10, 2025

No description provided.

@0xNeshi 0xNeshi self-assigned this Jul 10, 2025
Copy link

codecov bot commented Jul 10, 2025

Codecov Report

Attention: Patch coverage is 31.16883% with 106 lines in your changes missing coverage. Please review.

Project coverage is 85.1%. Comparing base (51d3438) to head (7487cb2).

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
contracts/src/proxy/erc1967/utils.rs 0.0% 71 Missing ⚠️
contracts/src/proxy/beacon/proxy.rs 0.0% 15 Missing ⚠️
contracts/src/proxy/erc1967/mod.rs 0.0% 10 Missing ⚠️
contracts/src/proxy/mod.rs 0.0% 10 Missing ⚠️
Additional details and impacted files
Files with missing lines Coverage Δ
...ntracts/src/token/erc721/extensions/consecutive.rs 95.7% <ø> (ø)
contracts/src/utils/storage_slot.rs 100.0% <100.0%> (+100.0%) ⬆️
contracts/src/proxy/erc1967/mod.rs 0.0% <0.0%> (ø)
contracts/src/proxy/mod.rs 0.0% <0.0%> (ø)
contracts/src/proxy/beacon/proxy.rs 0.0% <0.0%> (ø)
contracts/src/proxy/erc1967/utils.rs 0.0% <0.0%> (ø)

///
/// The success and return data of the delegated call will be returned back
/// to the caller of the proxy.
pub trait IProxy: TopLevelStorage + Sized {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is a novel approach to implementing overridable contracts that I've been thinking about - we define the contract logic in the trait itself using default implementations. One other necessary component of the design is to access contract storage within the default fn impls through another ContractStorage trait.

I'll be creating a draft PR soon to see if my idea is even doable with the current SDK, but if it works, this would open numerous possibilities for us:

  • support for overridable functions
  • we can do meaningful super traits with no problems
  • remove the need for passing base contract impls as function parameters (see Erc4626)
  • we align perfectly with current trait-based inheritance model, while removing the need to reimplement every public function!

Copy link
Collaborator

Choose a reason for hiding this comment

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

Sounds interesting but I would not spend too much time on refactoring our codebase during M3. This milestone is too short, it would be better to bring more value (features).

Copy link
Collaborator

@bidzyyys bidzyyys left a comment

Choose a reason for hiding this comment

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

I like it!

@bidzyyys bidzyyys merged commit 5baf4d0 into feature/proxy-uups Jul 11, 2025
8 of 15 checks passed
@bidzyyys bidzyyys deleted the abstract-proxy branch July 11, 2025 16:56
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.

2 participants