diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2536fee4e..3fefedaca 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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 ``` @@ -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 @@ -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= +IPFS_API_KEY_SECRET= +``` +Once you've define those environment variables, run the tests: ```sh yarn test ``` diff --git a/README.md b/README.md index 27f355065..b1516c013 100644 --- a/README.md +++ b/README.md @@ -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. @@ -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 diff --git a/package.json b/package.json index bd06c0a0a..916bf98d2 100644 --- a/package.json +++ b/package.json @@ -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" diff --git a/packages/demo/.env.example b/packages/demo/.env.example index 545cea459..d6132bbf5 100644 --- a/packages/demo/.env.example +++ b/packages/demo/.env.example @@ -1,5 +1,5 @@ PRIVATE_KEY= ALCHEMY_API_KEY= -IPFS_PROJECT_ID= -IPFS_API_KEY_SECRET= -DISABLE_ANALYTICS= \ No newline at end of file +IPFS_PROJECT_ID= +IPFS_API_KEY_SECRET= +DISABLE_ANALYTICS= diff --git a/packages/executor/.env.example b/packages/executor/.env.example index 20c0557fe..f2921b741 100644 --- a/packages/executor/.env.example +++ b/packages/executor/.env.example @@ -1,12 +1,12 @@ -# Required for all environments +# Required when testing +IPFS_PROJECT_ID= +IPFS_API_KEY_SECRET= + +# Required in production CHUGSPLASH_EXECUTOR__NETWORK= CHUGSPLASH_EXECUTOR__PORT=7300 CHUGSPLASH_EXECUTOR__PRIVATE_KEYS= CHUGSPLASH_EXECUTOR__URL= -IPFS_PROJECT_ID= -IPFS_API_KEY_SECRET= - -# Required in production CHUGSPLASH_EXECUTOR__AMPLITUDE_KEY= CHUGSPLASH_EXECUTOR__LOG_LEVEL= CHUGSPLASH_EXECUTOR__LOOP_INTERVAL_MS= diff --git a/packages/executor/test/Executor.test.ts b/packages/executor/test/Executor.test.ts index 800c54c51..971dc57bd 100644 --- a/packages/executor/test/Executor.test.ts +++ b/packages/executor/test/Executor.test.ts @@ -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 () => { diff --git a/packages/plugins/.env.example b/packages/plugins/.env.example index 21952317e..b19319bfe 100644 --- a/packages/plugins/.env.example +++ b/packages/plugins/.env.example @@ -1,10 +1,10 @@ -IPFS_PROJECT_ID= -IPFS_API_KEY_SECRET= +IPFS_PROJECT_ID= +IPFS_API_KEY_SECRET= PRIVATE_KEY= DISABLE_ANALYTICS=true DEV_FILE_PATH=./dist/foundry/index.js NETWORK=localhost ALCHEMY_API_KEY= CHUGSPLASH_INTERNAL__OWNER_PRIVATE_KEY= -CHUGSPLASH_API_KEY= -LOCAL_TEST_METATX_PROPOSE= +CHUGSPLASH_API_KEY= +LOCAL_TEST_METATX_PROPOSE=