How to contribute
I'm really glad you're reading this, because we need volunteer developers to help this project come to fruition.
#
Getting StartedThese instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
#
PrerequisitesYou will need nvm
installed.
#
InstallingAfter cloning/downloading this repository enable correct version of Node
by following command
Note: This may take a while if you don't have the needed Node version installed.
Now you can setup the project by running:
This will setup all the needed dependencies from all the packages.
#
BuildingYou can build all the packages by running:
Or you can specify particular package to build with:
#
RecipesYou can run recipes to quickly test whether a query is working or not
Ex: You can run ping
query of coingecko polywrapper by running following command inside coingecko directory
Note: If you don't specify any specific query it will run all the queries by default
#
TestingYou can run all tests with following command
Or run test of a particular package by changing current working directory to the root directory
of that package and running yarn test
.
#
LintingYou can lint all the packages with following command
If you found any issues while linting, you maybe able to auto fix them with following command
#
FormattingYou need to format the code according to our coding style standard. Don't worry we don't tell you to do it manually, We have a handy command for that.
#
How to guides:- How to add a Lazy Resolver for extending support for new EVM compatible chain
- How to add a protocol adapter?
- How to add a new coingecko endpoint?
#
Submitting changesPlease send a GitHub Pull Request to defiwrapper with a clear list of what you've done (read more about pull requests). When you send a pull request. We can always use more test coverage. Please follow our coding conventions (below) and make sure all of your commits are atomic (one feature per commit).
Always write a clear log message for your commits. One-line messages are fine for small changes, but bigger changes should look like this:
#
Coding conventionsStart reading our code and you'll get the hang of it. We optimize for readability:
- We indent using two spaces
- We ALWAYS put spaces after array items and method parameters (
[1, 2, 3]
, not[1,2,3]
), around operators (x += 1
, notx+=1
), and around hash arrows. - This is open source software. Consider the people who will read your code, and make it look nice for them. It's sort of like driving a car: Perhaps you love doing donuts when you're alone, but with passengers the goal is to make the ride as smooth as possible.
Thanks, defiwrapper maintainer.