Contributing as a Developer
Getting Started
We are using a pnpm
workspace, installing things via npm will result in broken dependencies.
Prerequisites
You're using a version of node that's on/after version 16.13.2
Install node by visiting https://nodejs.org/en/download/
You have pnpm installed.
You can install pnpm by running in your terminal
Installation
Fork our Repository
Go to the forked repo and click the green "Code" button
Copy the HTTPS link (i.e https://github.com/your-username/nft-gallery.git)
Go to your IDE and open the terminal
Type in the terminal "git clone your-HTTPS-link".
For example,
Then paste these two commands in the terminal
If you come across ERR_PNPM_UNSUPPORTED_ENGINE Unsupported environment (bad pnpm and/or Node.js version), run
Lastly, start the server by running
KodaDot will be available at localhost:9090.
Using KodaDot on Kusama
If you want to try out our KodaDot on Kusama, you must have Docker (install here) and docker-compose (install here) installed to have a local setup and node.
Installation
Build the docker image
Check if the container is up:
Run:
KodaDot will be available at localhost:9090.
KodaDot supports Hot Module Replacement on Docker; any changes made will take effect immediately.
Running local Polkadot and Subquery nodes
To run the complete local environment, we recommend running a Polkadot/Kusama node. In case you are using Apple M1, we have a tutorial for that 🍏
Current Indexers, we have/use:
SubSquid
RMRK: rubick
Checking your code
Linting code
Show all problems
Show only errors
Fix errors
Generating changelog
To generate a changelog, use GitHub CLI List only merged
If you need a limit, use -L
Troubleshooting
How can I resolve conflict on yarn.lock?
CONFLICT (content): Merge conflict in yarn.lock
When you see conflict on yarn.lock
and you are on your pull-request branch, merge the upstream branch and run yarn
, unless you have a conflict on package.json
, which requires manual resolution.
How can I read some data from GraphQL?
Every .graphql
file is located in the src/queries/
.
To use it inside the .vue
file, we can import it like a regular module: For specific purposes, we also need to import the PrefixMixin
. Thanks to that app, know which indexer is using.
PrefixMixin is only applicable to the SubQuery indexers. To use SubSquid, please use client: 'subsquid' in the query call.
Then we can use it like this:
How can I read on-chain data from the RPC node?
Is it possible to subscribe to the on-chain data from the RPC node?
How can I make an on-chain transaction?
How can I test Kodadot without spending KSM?
You can obtain some Westend (WND)
You can change the network in the navbar. Currently supported networks are Kusama, Westend, statemine, westmint
. Do you want to add more networks? Open a PR on vuex-options
Notice for contributors before January 15, 2022
If you've forked nft-gallery before January 15, 2022, you have an older fork that doesn't include our newest additions.
There are two ways you can work around this:
Learn more about these issues here:
Contributing Guidelines
Before submitting your pull request, read up on our documentation and make sure it follows:
Failure to do so can lead to your PR being rejected
We reward our contributors in $KSM for their time and effort with every issue they solve. If you're finding yourself to be more involved with KodaDot, we are always hiring.
Meta-Hours
We have bi-weekly meetings with contributors of KodaDot to share each other's progress as well as future goals in our Discord server. Before speaking, please make sure you're prepared as a speaker.
Is this your first time joining? Feel free to catch up on our past Meta_Hour!
References
This is the original posting from our Meta_Hours 2 bi-weekly digests on progress and development
Last updated