https://github.com/giveth/deploy-giv-economy
CLI to deploy GIV Economy contracts across all compatible networks
https://github.com/giveth/deploy-giv-economy
Last synced: 12 months ago
JSON representation
CLI to deploy GIV Economy contracts across all compatible networks
- Host: GitHub
- URL: https://github.com/giveth/deploy-giv-economy
- Owner: Giveth
- License: gpl-3.0
- Archived: true
- Created: 2022-02-05T13:43:21.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-02-15T16:13:28.000Z (over 3 years ago)
- Last Synced: 2025-06-12T08:52:50.190Z (about 1 year ago)
- Size: 14.6 KB
- Stars: 0
- Watchers: 10
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Deploy the Giveth GIV Economy contracts
This package contains the CLI script for deploying the Giveth GIVEconomy smart contracts across any EVM (Ethereum Virtual Machine) compatible networks.
## Licensing
This code is provided under the GNU GPL-3.0 Public License. See `LICENSE` file for more details.
The codebase relies heavily on the [deploy-v3 script](https://github.com/Uniswap/deploy-v3) by Uniswap.
## Usage
This package vends a CLI for executing a deployment script that results in a full deployment of the Giveth GIV Economy contract suite.
Get the arguments for running the latest version of the script via `npx @giveth/deploy-giv-economy --help`.
As of `v1.0.0` the arguments are:
```text
> npx @giveth/deploy-giv-economy --help
Usage: npx @giveth/deploy-giv-economy [options]
Options:
-pk, --private-key Private key used to deploy all contracts
-h, --help display help for command
```
The script runs a set of migrations, with each migration deploying a contract or executing a transaction. Migration state is
saved in a JSON file at the supplied path (by default `./state.json`).
To use the script, you must fund an address, and pass the private key of that address to the script so that it can construct
and broadcast the deployment transactions.
The block explorer verifi
cation process (e.g. Etherscan) is specific to the network you are deploying to. For the existing deployments,
we have used the `@nomiclabs/hardhat-etherscan` hardhat plugin in the individual repositories to verify the deployment addresses.
Note that in between deployment steps, the script waits for confirmations. By default, this is set to `2`. If the network
only mines blocks when the transactions is queued (e.g. a local testnet), you must set confirmations to `0`.
## Development
To run unit tests, run `yarn test`.
For testing the script, run `yarn start`.
To publish the script, first create a version: `npm version `, then publish via `npm publish`.
Don't forget to push your tagged commit!