Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update readme and add changelog and contributing files #1

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
#### Summary


#### Related Pull Requests
- Has protocol-info changes (please link here)

Does PR adds a new protocol
Does this PR add a new protocol? If so has it been:
- [ ] Tested locally with running npm run client:dev
- [ ] Added the cname to the `protocolsToTest` array in packages/client-reference/src/components/ProtocolList.tsx, so the preview displays the new protocol
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
All notable changes to this project will be documented in this file.
We follow the [Semantic Versioning 2.0.0](http://semver.org/) format.

## 0.0.1 - 2023-11-20

### Added
- Initial Commit

### Deprecated
- Nothing.

### Removed
- Nothing.

### Fixed
- Nothing.
14 changes: 14 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
##There are two primary ways to help:

Using the issue tracker, and
Changing the code-base.

##Using the issue tracker

Use the issue tracker to suggest feature requests, report bugs, and ask questions. This is also a great way to connect with the developers of the project as well as others who are interested in this solution.

Use the issue tracker to find ways to contribute. Find a bug or a feature, mention in the issue that you will take on that effort, then follow the Changing the code-base guidance below.

##Changing the code-base

Generally speaking, you should fork this repository, make changes in your own fork, and then submit a pull request. All new code should be validated for the implemented features and the presence or lack of defects.
51 changes: 45 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ For usage and guides on actually using the SDK, see the GitBook documentation:

The in-repo documentation will primarily focus on architecture and implementation details.

## Getting help

If you have questions, concerns, bug reports, etc, please file an issue in this repository's Issue Tracker.

You can also reach out to us in our discord at https://discord.com/invite/CEZ8WfuK8s

## Repo Structure

The project is structured as a monorepo managed by lerna.
Expand All @@ -27,10 +33,6 @@ The project is structured as a monorepo managed by lerna.

* Packages should implement any cleanup of build artifacts, caches, etc in an optional `clean` npm script.

### IDE Integration

To help onboard contribution, portable IDE configuration should be checked into the repo.

## Architecture

<img width="1136" alt="Screen Shot 2021-09-22 at 8 47 54 AM" src="https://user-images.githubusercontent.com/644088/134356125-5ba3f4e6-7749-47a5-8014-5c79227ab527.png">
Expand All @@ -50,9 +52,46 @@ Common _adapter implementations_ are shipped in the `gov-adapters` package for g

## Development

Requirements:
### Testing and Configuration for using the reference client

The reference client can be used to test each aspect of the sdk.

A .env file will need to be created within /gov-sdk/packages/client-reference and API keys for various services will need to be added. To have every feature working within the reference client all keys will need to be added however most features will work with just the Alchemy key for the respective chain you are wishing to test on or the Snapshot API key if testing Snapshot protocols.

An example .env file without any keys:
```
ALCHEMY_MAINNET_KEY=""
ALCHEMY_OPTIMISM_KEY=""
ALCHEMY_ARBITRUM_KEY=""
ALCHEMY_GOERLI_KEY=""
BOARDROOM_API_KEY=""
ETHERSCAN_MAINNET_API_KEY=""
ETHERSCAN_OPTIMISM_API_KEY=""
SNAPSHOT_API_KEY=""
```

Within the ProtocolInfo.tsx file set the protocol cname to test as well as the adapter type and an address for vote power testing if applicable.

```
// Add the cnames of any protocols to test here
const protocolsToTest = ['ens'];
// Framework instance to test with. (default/snapshot/onchain)
const instancesToTest = ['onchain'];
// Add address that should have voting power here
const votePowerAddress = '0x8d5237037A590A2dB531F3CfB8f42605cF306f34';
```

Features within the ProtocolInfo.tsx file can be commented out to turn them on or off when running the client.

Run the reference client in debug mode (reloads on changes):

```
$ npm run client:dev
```

### Requirements:

* NodeJS v14 (`nvm` recommended)
* NodeJS v16 (`nvm` recommended)

Install all dependencies in all packages and bootstrap the monorepo:

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"build": "lerna run build",
"clean": "lerna run clean",
"nuke": "npm run clean && lerna clean -y && rm -rf ./node_modules",
"client:dev": "lerna run --stream dev --scope @boardroom/client-reference",
"client:compile": "lerna run --stream compile --scope @boardroom/client-reference",
"client:dev": "lerna run --stream dev --scope @boardroom/governance-client-reference",
"client:compile": "lerna run --stream compile --scope @boardroom/governance-client-reference",
"snapshots:update": "npm run build && npm test .snapshot. -- -u",
"version:bump": "lerna version --conventional-commits --no-changelog",
"version:prerelease": "lerna version --conventional-prerelease --no-changelog",
Expand Down