{"id":49724660,"url":"https://github.com/fomoweth/proxy-forge","last_synced_at":"2026-05-09T03:47:15.570Z","repository":{"id":317107988,"uuid":"1019190079","full_name":"fomoweth/proxy-forge","owner":"fomoweth","description":"Lightweight and gas-efficient framework for deploying and managing upgradeable proxies.","archived":false,"fork":false,"pushed_at":"2025-09-28T21:02:20.000Z","size":98,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-28T23:12:35.651Z","etag":null,"topics":["ethereum","evm","solidity","yul"],"latest_commit_sha":null,"homepage":"","language":"Solidity","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fomoweth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-13T23:52:22.000Z","updated_at":"2025-09-28T21:02:23.000Z","dependencies_parsed_at":"2025-09-28T23:12:37.763Z","dependency_job_id":"c9f99134-7b90-47c7-bbb5-67ac44640b79","html_url":"https://github.com/fomoweth/proxy-forge","commit_stats":null,"previous_names":["fomoweth/proxy-forge"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/fomoweth/proxy-forge","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fomoweth%2Fproxy-forge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fomoweth%2Fproxy-forge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fomoweth%2Fproxy-forge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fomoweth%2Fproxy-forge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fomoweth","download_url":"https://codeload.github.com/fomoweth/proxy-forge/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fomoweth%2Fproxy-forge/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32806687,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"online","status_checked_at":"2026-05-09T02:00:06.633Z","response_time":123,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ethereum","evm","solidity","yul"],"created_at":"2026-05-09T03:47:14.674Z","updated_at":"2026-05-09T03:47:15.555Z","avatar_url":"https://github.com/fomoweth.png","language":"Solidity","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Proxy Forge\n\n**ProxyForge** is a lightweight, gas-optimized framework for deploying and managing upgradeable proxies on the Ethereum Virtual Machine (EVM). It maintains compatibility with OpenZeppelin's proxy architecture while introducing low-level optimizations and slot-based metadata tracking.\n\n## Features\n\n-   **Transparent Proxy Pattern**: ERC-1967 compliant with admin isolation for security\n-   **Assembly Optimized**: Extensive use of inline assembly for maximum efficiency\n-   **Gas-Optimized Deployments**: Highly efficient CREATE and CREATE2 proxy deployments\n-   **Comprehensive Management**: Deploy, upgrade, transfer ownership, and revoke proxies\n-   **Deterministic Addresses**: CREATE2 support with collision-resistant salt validation\n-   **Modular Design**: Components can be used independently or via the factory\n\n## Architecture\n\n### Directory\n\n```text\nproxy-forge/\n\t├── deployments/...\n\t├── script/\n\t│   ├── BaseScript.sol\n\t│   ├── Deploy.s.sol\n\t│   ├── DeployProxy.s.sol\n\t│   └── UpgradeProxy.s.sol\n\t├── src/\n\t│   ├── interfaces/\n\t│   │   ├── IForgeProxy.sol\n\t│   │   ├── IForgeProxyAdmin.sol\n\t│   │   └── IProxyForge.sol\n\t│   ├── proxy/\n\t│   │   ├── ForgeProxy.sol\n\t│   │   └── ForgeProxyAdmin.sol\n\t│   └── ProxyForge.sol\n\t└── test/\n\t\t├── proxy/\n\t\t│   ├── ForgeProxy.t.sol\n\t\t│   └── ForgeProxyAdmin.t.sol\n\t\t├── shared/...\n\t\t├── ProxyForge.fuzz.t.sol\n\t\t└── ProxyForge.t.sol\n```\n\n### Core Contracts\n\n**ProxyForge**: The main factory contract that handles deployment and management operations\n\n-   Deploys new proxy instances using CREATE or CREATE2\n-   Manages proxy ownership and implementation upgrades\n-   Provides deterministic address computation\n\n**ForgeProxy**: Gas-optimized upgradeable proxy implementation\n\n-   Follows ERC-1967 standard for storage slots\n-   Automatic admin contract deployment during construction\n-   Assembly-optimized fallback routing for maximum efficiency\n\n**ForgeProxyAdmin**: Ultra-lightweight admin contract for proxy management\n\n-   Handles upgrade operations with calldata transformation\n-   Implements standard ownership patterns\n-   Compatible with OpenZeppelin ProxyAdmin interface (v5.0.0)\n\n## Deployments\n\n**ForgeProxy** is deployed on the following chains:\n\n| Network          | Chain ID | Address                                                                                                                          |\n| ---------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------- |\n| Ethereum         | 1        | [0x58b819827cB18Ba425906C69E1Bfb22F27Cb1bCe](https://etherscan.io/address/0x58b819827cB18Ba425906C69E1Bfb22F27Cb1bCe)            |\n| Ethereum Sepolia | 11155111 | [0x58b819827cB18Ba425906C69E1Bfb22F27Cb1bCe](https://sepolia.etherscan.io/address/0x58b819827cB18Ba425906C69E1Bfb22F27Cb1bCe)    |\n| Optimism         | 10       | [0x58b819827cB18Ba425906C69E1Bfb22F27Cb1bCe](https://optimistic.etherscan.io/address/0x58b819827cB18Ba425906C69E1Bfb22F27Cb1bCe) |\n| Polygon          | 137      | [0x58b819827cB18Ba425906C69E1Bfb22F27Cb1bCe](https://polygonscan.com/address/0x58b819827cB18Ba425906C69E1Bfb22F27Cb1bCe)         |\n| Base             | 8453     | [0x58b819827cB18Ba425906C69E1Bfb22F27Cb1bCe](https://basescan.org/address/0x58b819827cB18Ba425906C69E1Bfb22F27Cb1bCe)            |\n| Base Sepolia     | 84532    | [0x58b819827cB18Ba425906C69E1Bfb22F27Cb1bCe](https://sepolia.basescan.org/address/0x58b819827cB18Ba425906C69E1Bfb22F27Cb1bCe)    |\n| Arbitrum One     | 42161    | [0x58b819827cB18Ba425906C69E1Bfb22F27Cb1bCe](https://arbiscan.io/address/0x58b819827cB18Ba425906C69E1Bfb22F27Cb1bCe)             |\n| Arbitrum Sepolia | 421614   | [0x58b819827cB18Ba425906C69E1Bfb22F27Cb1bCe](https://sepolia.arbiscan.io/address/0x58b819827cB18Ba425906C69E1Bfb22F27Cb1bCe)     |\n\n## Usage\n\n### Installation\n\n#### Foundry\n\n```bash\nforge install fomoweth/proxy-forge\n```\n\n#### Clone\n\n```bash\ngit clone https://github.com/fomoweth/proxy-forge.git\n```\n\n### Build\n\n```bash\nforge build --sizes\n```\n\n### Test\n\n```bash\n# Run all tests\nforge test\n\n# Run with detailed logs\nforge test -vvv\n\n# Run with gas reporting\nforge test --gas-report\n\n# Run specific test\nforge test --match-path test/ProxyForge.fuzz.t.sol\n```\n\n### Deploy\n\n#### To Deploy Contract\n\n```bash\nforge script \\\n\tscript/Deploy.s.sol:Deploy \\\n\t-vvv \\\n\t--slow \\\n\t--multi \\\n\t--broadcast\n```\n\n#### To Verify Contract\n\n```bash\nforge verify-contract \u003cCONTRACT_ADDRESS\u003e \\\n\tsrc/ProxyForge.sol:ProxyForge \\\n\t--compiler-version v0.8.30+commit.73712a01 \\\n\t--verifier etherscan \\\n\t--etherscan-api-key \u003cETHERSCAN_API_KEY\u003e \\\n\t--chain-id \u003cCHAIN_ID\u003e\n```\n\n### Basic Usage\n\n```solidity\nimport {IProxyForge} from \"lib/proxy-forge/interfaces/IProxyForge.sol\";\n\ncontract MyContract {\n    IProxyForge public constant PROXY_FORGE = IProxyForge(0x58b819827cB18Ba425906C69E1Bfb22F27Cb1bCe);\n\n    function deployProxy(address implementation) external returns (address proxy) {\n        // Deploy a new proxy with msg.sender as owner\n        return PROXY_FORGE.deploy(implementation, msg.sender);\n    }\n\n    function deployProxy(address implementation, uint96 identifier) external returns (address proxy) {\n        // Create a deterministic salt (first 20 bytes must be caller or zero address)\n        bytes32 salt = bytes32((uint256(uint160(msg.sender)) \u003c\u003c 96) | uint256(identifier));\n        // Deploy with CREATE2 for deterministic address\n        return PROXY_FORGE.deployDeterministic(implementation, msg.sender, salt);\n    }\n\n    function deployProxy(address implementation, bytes memory data) external returns (address proxy) {\n        // Encode initialization call data\n        bytes memory initData = abi.encodeWithSignature(\"initialize(bytes)\", data);\n        // Deploy and initialize in one transaction\n        return PROXY_FORGE.deployAndCall(implementation, msg.sender, initData);\n    }\n}\n```\n\n## API Reference\n\n### Core Functions\n\n#### Deployment Functions\n\n```solidity\nfunction deploy(address implementation, address owner) external payable returns (address proxy);\nfunction deployAndCall(address implementation, address owner, bytes calldata data) external payable returns (address proxy);\nfunction deployDeterministic(address implementation, address owner, bytes32 salt) external payable returns (address proxy);\nfunction deployDeterministicAndCall(address implementation, address owner, bytes32 salt, bytes calldata data) external payable returns (address proxy);\n```\n\n#### Management Functions\n\n```solidity\nfunction upgrade(address proxy, address implementation) external payable;\nfunction upgradeAndCall(address proxy, address implementation, bytes calldata data) external payable;\nfunction revoke(address proxy) external payable;\nfunction changeOwner(address proxy, address owner) external payable;\n```\n\n#### View Functions\n\n```solidity\nfunction adminOf(address proxy) external view returns (address admin);\nfunction implementationOf(address proxy) external view returns (address implementation);\nfunction ownerOf(address proxy) external view returns (address owner);\nfunction computeProxyAddress(uint256 nonce) external view returns (address proxy);\nfunction computeProxyAddress(address implementation, bytes32 salt, bytes calldata data) external view returns (address proxy);\n```\n\n### Events\n\n```solidity\nevent ProxyDeployed(address indexed proxy, address indexed owner, bytes32 indexed salt);\nevent ProxyUpgraded(address indexed proxy, address indexed implementation);\nevent ProxyOwnerChanged(address indexed proxy, address indexed owner);\nevent ProxyRevoked(address indexed proxy);\n```\n\n### Errors\n\n```solidity\nerror InvalidProxy();\nerror InvalidProxyImplementation();\nerror InvalidProxyOwner();\nerror InvalidSalt();\nerror UnauthorizedAccount(address account);\nerror UpgradeFailed();\n```\n\n## Acknowledgements\n\nThe following repositories served as key references during the development of this project:\n\n-   [OpenZeppelin](https://github.com/OpenZeppelin/openzeppelin-contracts)\n-   [Solady](https://github.com/Vectorized/solady)\n\n## Author\n\n-   [fomoweth](https://github.com/fomoweth)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffomoweth%2Fproxy-forge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffomoweth%2Fproxy-forge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffomoweth%2Fproxy-forge/lists"}