https://github.com/jbx-protocol/juice-extension-template
A template to easily create Juicebox V2 treasury extensions.
https://github.com/jbx-protocol/juice-extension-template
ethereum juicebox solidity
Last synced: about 2 months ago
JSON representation
A template to easily create Juicebox V2 treasury extensions.
- Host: GitHub
- URL: https://github.com/jbx-protocol/juice-extension-template
- Owner: jbx-protocol
- Created: 2022-06-29T20:32:58.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-06-29T21:20:45.000Z (about 4 years ago)
- Last Synced: 2025-01-09T09:26:18.351Z (over 1 year ago)
- Topics: ethereum, juicebox, solidity
- Language: Solidity
- Homepage:
- Size: 28.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Juice Extension Templates
This repo provides some implementation templates of peripheral contracts of the Juicebox V2 ecosystem.
# Install Foundry
To get set up:
1. Install [Foundry](https://github.com/gakonst/foundry).
```bash
curl -L https://foundry.paradigm.xyz | sh
```
2. Install external lib(s)
```bash
git submodule update --init && yarn install
```
then run
```bash
forge update
```
If git modules are failing to clone, not installing, etc (ie overall submodule misbehaving), use `git submodule update --init --recursive --force`
3. Run tests:
```bash
forge test
```
4. Update Foundry periodically:
```bash
foundryup
```
## Content
This repo is organised as follow:
- contracts/Allocator: contains an IJBSplitsAllocator implementation template (Allocator.sol)
- contracts/DatasourceDelegate: contains an IJBFundingCycleDataSource, IJBPayDelegate and IJBRedemptionDelegate implementation templates (DataSourceDelegate.sol).
- contracts/Terminal: contains an IJBPaymentTerminal and IJBRedemptionTerminal implementation template.
# Deploy & verify
#### Setup
Configure the .env variables, and add a mnemonic.txt file with the mnemonic of the deployer wallet. The sender address in the .env must correspond to the mnemonic account.
## Rinkeby
```bash
yarn deploy-rinkeby
```
## Mainnet
```bash
yarn deploy-mainnet
```
The deployments are stored in ./broadcast
See the [Foundry Book for available options](https://book.getfoundry.sh/reference/forge/forge-create.html).