Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bandohq/create3-proxy
CREATE3 deterministic addresses for upgradeable smart contracts
https://github.com/bandohq/create3-proxy
bando ethereum evm foundry solidity web3
Last synced: 16 days ago
JSON representation
CREATE3 deterministic addresses for upgradeable smart contracts
- Host: GitHub
- URL: https://github.com/bandohq/create3-proxy
- Owner: bandohq
- License: mit
- Created: 2024-09-20T04:39:56.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2024-09-20T06:02:33.000Z (about 2 months ago)
- Last Synced: 2024-10-15T20:41:01.681Z (about 1 month ago)
- Topics: bando, ethereum, evm, foundry, solidity, web3
- Language: Solidity
- Homepage:
- Size: 4.37 MB
- Stars: 14
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# CREATE3 for Upgradeable Proxies
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/bandohq/create3-proxy/blob/main/LICENSE)
[![Build](https://github.com/bandohq/create3-proxy/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/bandohq/create3-proxy/actions/workflows/CI.yml)
[![npm version](https://img.shields.io/npm/v/create3-proxy.svg)](https://www.npmjs.com/package/create3-proxy)A Solidity library for deploying upgradeable proxies using the CREATE3 pattern, enabling deterministic addresses across different chains without relying on nonces or code.
## Overview
CREATE3 Proxy combines the power of CREATE3 for deterministic contract deployment with the upgradeability of UUPS (Universal Upgradeable Proxy Standard) proxies. This library allows developers to deploy upgradeable contracts to the same address across multiple networks, simplifying cross-chain development and management.
## Features
- Deterministic addresses across different chains
- UUPS (ERC1967) proxy pattern for upgradeability
- Gas-efficient deployment using CREATE3
- Easy-to-use interface for deploying proxies## Installation
### Install with Foundry:
```bash
forge install bandohq/create3-proxy
```### Install with npm:
```bash
npm i create3-proxy
```
### Install with yarn:```bash
yarn add create3-proxy
```## Usage
To use the library in your project, follow these steps:
### Deploy a UUPS (ERC1967) Proxy
1. Import the library into your contract:
```solidity
import "create3-proxy/src/CREATE3UUPSProxy.sol";
```2. Deploy using your implementation contract:
```solidity
bytes32 salt = keccak256("my_proxy");
bytes memory creationCode = type(MyUUPSContract).creationCode;
bytes memory initializerData = abi.encodeWithSignature("myInitialize(uint256)", initialValue);
address proxy = CREATE3UUPSProxy.deploy(salt, creationCode, initializerData);
```## Contributing
We welcome contributions to this library. Please open an issue or submit a pull request.
Read more on our [contributing guidelines](./CONTRIBUTING.md).### Code of Conduct
We have a [code of conduct](./CODE_OF_CONDUCT.md) that we expect all contributors to adhere to.
### Building from source
```bash
forge build
```### Test
```bash
forge test
```