Skip to content
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

feat: introduce proxy clones #115

Open
wants to merge 2 commits into
base: refactor/transparent-proxy
Choose a base branch
from

Conversation

0x-r4bbit
Copy link
Collaborator

@0x-r4bbit 0x-r4bbit commented Jan 24, 2025

This commit introduces proxy clones to make create StakeVaults as
cheap as possible.

Major changes here are:

  • Introduce VaultFactory which takes care of creating clones and
    registering them with the stake manager
  • Make StakeVault and Initializable so it can be used as a
    "template" contract to later have proxies point to it
  • Adjust the deployment script to also deploy VaultFactory and ensure
    The proxy is whitelisted in the stake manager
  • Make use of the new proxy clones in tests
  • Add a test for TrustedCodehashAccess that ensures the proxy
    whitelisting works and setting up a (malicious) proxy is not going to
    work

Closes #101

Checklist

Ensure you completed all of the steps below before submitting your pull request:

  • Added natspec comments?
  • Ran pnpm adorno?
  • Ran pnpm verify?

This commit introduces proxy clones to make create `StakeVault`s as
cheap as possible.

Major changes here are:

- Introduce `VaultFactory` which takes care of creating clones and
  registering them with the stake manager
- Make `StakeVault` and `Initializable` so it can be used as a
  "template" contract to later have proxies point to it
- Adjust the deployment script to also deploy `VaultFactory` and ensure
  The proxy is whitelisted in the stake manager
- Make use of the new proxy clones in tests
- Add a test for `TrustedCodehashAccess` that ensures the proxy
  whitelisting works and setting up a (malicious) proxy is not going to
  work

Closes #101
@0x-r4bbit 0x-r4bbit changed the base branch from main to refactor/transparent-proxy February 3, 2025 13:10
@0x-r4bbit 0x-r4bbit changed the title WIP to make proxy clones work feat: introduce proxy clones Feb 3, 2025
@0x-r4bbit 0x-r4bbit marked this pull request as ready for review February 3, 2025 13:15
@0x-r4bbit 0x-r4bbit requested review from 3esmit and gravityblast and removed request for 3esmit February 3, 2025 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Ready to Merge
Development

Successfully merging this pull request may close these issues.

2 participants