Skip to content

Commit ffaed29

Browse files
author
Beau Shinkle
committed
Add a CONTRIBUTING guide
Also adds a brief installation guide to the README
1 parent 3090465 commit ffaed29

File tree

2 files changed

+95
-0
lines changed

2 files changed

+95
-0
lines changed

CONTRIBUTING.adoc

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
= Keep Contribution Guide
2+
3+
🎉 Thanks for taking the time to contribute! 🎉 Contributions are welcome from
4+
anyone, and even the smallest of fixes is appreciated!
5+
6+
The following is a set of guidelines for contributing to Keep and its packages.
7+
These are mostly guidelines, not rules. Use your best judgment, and feel free to
8+
propose changes to this document in a pull request.
9+
10+
== Getting started
11+
12+
1. Fork https://github.com/keep-network/tbtc-v2[`keep-network/tbtc-v2`]
13+
2. Clone your fork
14+
3. Follow the
15+
link:README.adoc#Installation[installation & build steps] in the README.
16+
4. Set up the <<Development Tooling>>.
17+
5. Open a PR against the `main` branch and describe the change you are intending
18+
to undertake in the PR description.
19+
20+
Before marking the PR as ready for review, make sure:
21+
22+
* It passes the linter checks (see <<Pre-commit>> to make this automatic).
23+
* It passes the https://github.com/keep-network/tbtc-v2/actions[continuous
24+
integration tests].
25+
* Your changes have sufficient test coverage (e.g regression tests have
26+
been added for bug fixes, unit tests for new features)
27+
28+
== Development Tooling
29+
30+
Commits
31+
https://help.github.com/en/articles/about-commit-signature-verification[must
32+
be signed].
33+
34+
=== Continuous Integration
35+
36+
Keep uses https://github.com/keep-network/tbtc-v2/actions[Github Actions] for
37+
continuous integration. All jobs must be green to merge a PR.
38+
39+
=== Pre-commit
40+
41+
Pre-commit is a tool to install hooks that check code before commits are made.
42+
It can be helpful to install this, to automatically run linter checks and avoid
43+
pushing code that will not be accepted. Follow the
44+
https://pre-commit.com/[installation instructions here], and then run
45+
`pre-commit install` to install the hooks.
46+
47+
=== Linting
48+
49+
Linters and formatters for Solidity, JavaScript, and Go code are set up and run
50+
automatically as part of pre-commit hooks. These are checked again in CI builds
51+
to ensure they have been run and are passing.
52+
53+
If you want to change a rule, or add a custom rule, to the JavaScript or
54+
Solidity linting, please propose these changes to our
55+
https://github.com/keep-network/solium-config-keep[solium-config-keep] and
56+
https://github.com/keep-network/eslint-config-keep[eslint-config-keep] packages.
57+
All other packages have it as a dependency.

README.adoc

+38
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,41 @@ wallet accepts new deposits, and the oldest wallet serves redemptions.
5959
Depositing Bitcoin into the tBTCv2 bridge grants a transferable Bank balance, which
6060
can be used to mint a supply-pegged ERC-20: TBTC. For an in-depth explanation
6161
about the design, see link:docs/rfc/rfc-1.adoc[RFC 1: tBTCv2 Design].
62+
63+
== Installation
64+
65+
=== Prerequisites
66+
+ clone the repository
67+
+ link:https://nodejs.org/en/[Node.js] v14.21.2
68+
+ yarn: `$ npm install -g yarn`
69+
+ configure git to use https
70+
71+
```
72+
git config --global url."https://".insteadOf git://
73+
```
74+
75+
+ python v3.X. Must have a `python` binary pointing to version 3.X, not just an
76+
alias (for `node-gyp`). On osx, this did the trick:
77+
```
78+
brew install python
79+
sudo ln -s /opt/homebrew/bin/python3 /opt/homebrew/bin/python
80+
```
81+
82+
=== Install and Test Contracts
83+
84+
```
85+
cd solidity
86+
yarn install
87+
yarn build
88+
yarn test
89+
yarn test:integration
90+
```
91+
92+
=== Install and Test TypeScript Library
93+
94+
```
95+
cd typescript
96+
yarn install
97+
yarn build
98+
yarn test
99+
```

0 commit comments

Comments
 (0)