Skip to content

Commit

Permalink
Merge pull request sphinx-labs#731 from chugsplash/pate/contributor-g…
Browse files Browse the repository at this point in the history
…uide

docs: Update contributor guide
  • Loading branch information
RPate97 authored May 26, 2023
2 parents 2fffcb6 + 252c1ca commit 7f3cade
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 15 deletions.
11 changes: 10 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ You'll need to have the following pieces of software installed before you can st
Once you've installed the necessary prerequisites, you'll need to clone the ChugSplash monorepo and install its dependencies:

```sh
git clone https://github.com/smartcontracts/chugsplash.git
git clone https://github.com/chugsplash/chugsplash.git
cd chugsplash
yarn install
```
Expand All @@ -52,6 +52,9 @@ Hopefully that wasn't too bad.

## Common development stuff

### Environment Variables
You'll want to define some environment variables when working with ChugSplash locally. Environment variables are required for the plugins, executor, and demo packages. You'll find `.env.example` files in each of those directories which describe the necessary variables.

### Building

```sh
Expand All @@ -66,7 +69,13 @@ yarn lint
```

### Testing
We currently have automated tests in our plugins and executor packages. To run the complete automated test suite, you'll need to create an `.env` file in the `packages/executor` directory with two environment variables:
```
IPFS_PROJECT_ID=<Infura ipfs project id to retrieve config file>
IPFS_API_KEY_SECRET=<Infura ipfs api key to retrieve config file>
```

Once you've define those environment variables, run the tests:
```sh
yarn test
```
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ The ChugSplash Managed Service is an optional product built on top of the ChugSp

## Supported Networks
* Ethereum Goerli
* Optimism Goerli

ChugSplash is capable of supporting any EVM compatible network. If you'd like to use ChugSplash on network that is not listed, please let us know and we'd be happy to take care of deploying the ChugSplash contracts to it.

Expand All @@ -63,7 +64,7 @@ ChugSplash is an experimental product and currently only supports test networks.

## Contributing

PRs accepted.
Contributors welcome, please read through [CONTRIBUTING.md](https://github.com/chugsplash/chugsplash/blob/develop/CONTRIBUTING.md) for an overview of the contributing process for this repository and to get your development environment up and running. Then check out the list of [Good First Issues](https://github.com/chugsplash/chugsplash/contribute) to find something to work on! If you're not sure where to start, [join the Discord](https://discord.gg/7Gc3DK33Np) and shoot us a message!

## License

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"scripts": {
"install:foundry": "git submodule update --init --recursive",
"build": "yarn workspaces run build",
"test": "yarn workspaces run test",
"test": "yarn workspaces run test:coverage",
"clean": "yarn workspaces run clean",
"lint": "yarn workspaces run lint",
"lint:fix": "yarn workspaces run lint:fix"
Expand Down
6 changes: 3 additions & 3 deletions packages/demo/.env.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PRIVATE_KEY=<private key>
ALCHEMY_API_KEY=<alchemy blockchain network api key>
IPFS_PROJECT_ID=<infura ipfs project id>
IPFS_API_KEY_SECRET=<infura ipfs api key secret>
DISABLE_ANALYTICS=<disable analytics reporting>
IPFS_PROJECT_ID=<Infura ipfs project id to retrieve config file>
IPFS_API_KEY_SECRET=<Infura ipfs api key to retrieve config file>
DISABLE_ANALYTICS=<disable analytics reporting>
10 changes: 5 additions & 5 deletions packages/executor/.env.example
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Required for all environments
# Required when testing
IPFS_PROJECT_ID=<Infura ipfs project id to retrieve config file>
IPFS_API_KEY_SECRET=<Infura ipfs api key to retrieve config file>

# Required in production
CHUGSPLASH_EXECUTOR__NETWORK=<name of the target network, used to fetch the etherscan verification endpoint>
CHUGSPLASH_EXECUTOR__PORT=7300
CHUGSPLASH_EXECUTOR__PRIVATE_KEYS=<private key to deploy with>
CHUGSPLASH_EXECUTOR__URL=<url of the network to monitor, http://host.docker.internal:8545 for local node>
IPFS_PROJECT_ID=<ipfs project id to retrieve config file>
IPFS_API_KEY_SECRET=<ipfs api key to retrieve config file>

# Required in production
CHUGSPLASH_EXECUTOR__AMPLITUDE_KEY=<amplitude api key for analytics (optional)>
CHUGSPLASH_EXECUTOR__LOG_LEVEL=<filter logs based on this level, i.e 'error', 'warning', 'info'>
CHUGSPLASH_EXECUTOR__LOOP_INTERVAL_MS=<amount of time to wait between loops>
Expand Down
6 changes: 6 additions & 0 deletions packages/executor/test/Executor.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ import { createChugSplashRuntime } from '../../plugins/src/utils'
const configPath = './chugsplash/ExecutorTest.config.ts'

describe('Remote Execution', () => {
if (!process.env.IPFS_API_KEY_SECRET || !process.env.IPFS_PROJECT_ID) {
throw new Error(
'IPFS_API_KEY_SECRET and IPFS_PROJECT_ID must be set to run automated executor tests'
)
}

let Proxy: Contract
let NonProxy: Contract
before(async () => {
Expand Down
8 changes: 4 additions & 4 deletions packages/plugins/.env.example
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
IPFS_PROJECT_ID=<ipfs project id to retrieve config file>
IPFS_API_KEY_SECRET=<ipfs api key to retrieve config file>
IPFS_PROJECT_ID=<Infura ipfs project id to retrieve config file>
IPFS_API_KEY_SECRET=<Infura ipfs api key to retrieve config file>
PRIVATE_KEY=<private key>
DISABLE_ANALYTICS=true
DEV_FILE_PATH=./dist/foundry/index.js
NETWORK=localhost
ALCHEMY_API_KEY=<Alchemy provider api key>
CHUGSPLASH_INTERNAL__OWNER_PRIVATE_KEY=<Private key of the system owner (optional, defaults to the multisign)>
CHUGSPLASH_API_KEY=<API key for the ChugSplash managed service>
LOCAL_TEST_METATX_PROPOSE=<Used to allow meta transactions on local networks for testing purposes>
CHUGSPLASH_API_KEY=<API key for the ChugSplash managed service (optional, only necessary when proposing deployments)>
LOCAL_TEST_METATX_PROPOSE=<Optional, used to allow meta transactions on local networks for testing purposes>

0 comments on commit 7f3cade

Please sign in to comment.