Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wighawag/forge-deploy
https://github.com/wighawag/forge-deploy
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/wighawag/forge-deploy
- Owner: wighawag
- License: mit
- Created: 2023-04-16T06:09:19.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-11-07T09:27:53.000Z (3 months ago)
- Last Synced: 2024-11-07T10:30:46.896Z (3 months ago)
- Language: Rust
- Size: 214 KB
- Stars: 113
- Watchers: 3
- Forks: 10
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-foundry - Forge Deploy - A cli and associated contracts to keep track of deployments by name and reuse them in solidity. It tries to keep compatibility with hardhat-deploy as far as possible (work in progress). (Tools)
README
# forge-deploy
A cli and associated contracts to keep track of deployments by name and reuse them in solidity.
It tries to keep compatibility with [hardhat-deploy](https://github.com/wighawag/hardhat-deploy) as far as possible (work in progress).
forge-deploy aims at providing the minimal set of function to provide an elegant deployment system for foundry.
## Template to get started:
https://github.com/wighawag/template-foundry
## Features
- generate type-safe deployment function for forge contracts. no need to pass in string of text and hope the abi encoded args are in the correct order or of the correct type.
- save deployments in json file (based on hardhat-deploy schema)
- modular system based on templates and solidity library## Modularity
The system is modular. The deploy functions provided by default offer a basic set of feature but the system can be extended by custom function easily. See [contracts/DefaultDeployerFunction.sol](./contracts/DefaultDeployerFunction.sol) and how this is a simple library that you can provide yourself. The only thing forge-deploy really provide is the specific set of functions in [contrats/Deployer.sol](./contracts/Deployer.sol) to `save` and `get` deployments
## How to use
There are 2 way to get started, one [without npm](#without-npm) and one [with npm](#with-npm)
### with npm
1. have a forge project with npm and cd into it
```bash
mkdir my-project;
cd my-project;
forge init;
npm init
```1. add the forge-deploy package
```bash
npm i -D forge-deploy
```This will install the forge-deploy binary automatically
1. add to .gitignore the generated files
```bash
cat >> .gitignore <> foundry.toml <
```You could also download the binaries (if you dont want to use cargo): https://github.com/wighawag/forge-deploy/releases
1. add to .gitignore the generated file + the binary we just installed
```bash
cat >> .gitignore <> foundry.toml <> foundry.toml <> .gitignore < script/Deploy.s.sol <