-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Radek Svarz
committed
Oct 15, 2024
1 parent
cfcdd82
commit 1350067
Showing
1 changed file
with
26 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,38 @@ | ||
# Pure entrypoint ERC-1967 proxy for UUPS upgradeable contracts - deployment example | ||
|
||
Example of https://github.com/radeksvarz/erc1967uupsentrypoint | ||
Example of https://github.com/radeksvarz/erc1967uupsentrypoint - the lightweight ERC-1967 proxy implementation. | ||
|
||
Having 2 step deploy script using Create-X CREATE3 https://github.com/radeksvarz/createx-forge for deterministic entrypoint proxy address immune to solc / mbor / source code comment changes in time. | ||
|
||
Deployed on Sepolia: https://eth-sepolia.blockscout.com/address/0xC0bf4d3F67B0B516930B28A90fe4022F20bEbE96?tab=contract | ||
|
||
Uses Create-X CREATE3 deployment script to ensure Entrypoint is deployed to the same address among chains when compiler output changes in time. Beware of setting up proper `--sender` when invoking `forge script`, otherwise deployed address does not match. | ||
Beware of setting up proper `--sender` when invoking `forge script`, otherwise deployed address does not match. | ||
|
||
Example implementation uses ERC-7201 storage to mitigate upgrade storage issues. | ||
Example `Implementation` uses ERC-7201 storage to mitigate upgrade storage collision issues / hacks. | ||
|
||
``` | ||
┌──────────────────┐ | ||
│ Entrypoint │ | ||
├──────────────────┤ | ||
│ │ | ||
│ (ERC1967 proxy) │ | ||
│ │ | ||
└─────────┬────────┘ | ||
┌──────────────────────┐ | ||
│ Entrypoint │ | ||
├──────────────────────┤ | ||
│ │ | ||
│ (ERC1967 proxy) │ | ||
│ │ | ||
│ Immune to OZ changes │ | ||
│ in the future │ | ||
│ │ | ||
└─────────┬────────────┘ | ||
│ | ||
│ delegatecall | ||
│ | ||
┌─────────▼──────────────┐ | ||
│ Implementation │ | ||
│ │ | ||
│ (UUPS based contract) │ | ||
│ │ | ||
└────────────────────────┘ | ||
┌─────────▼─────────────────┐ | ||
│ Implementation │ | ||
├───────────────────────────┤ | ||
│ (UUPS based contract) │ | ||
│ │ | ||
│ w/ safer ERC-7201 storage │ | ||
│ for future upgrades │ | ||
│ │ | ||
└───────────────────────────┘ | ||
``` | ||
|
||
# License MIT |