From 1b47ada7fc9a1bc24140a9722fb666aa243e4a93 Mon Sep 17 00:00:00 2001 From: Gabin Marignier Date: Wed, 5 Jun 2024 22:46:33 +0200 Subject: [PATCH] Update readme --- CONTRIBUTING.md | 34 +----------- README.md | 108 ++----------------------------------- docs/how-to-contribute.mdx | 14 ++++- starknetdart.dev | 0 4 files changed, 20 insertions(+), 136 deletions(-) create mode 100644 starknetdart.dev diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 316907bc..94de55e1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,33 +1,3 @@ -# Contributor Guide +# How to contribute -**starknet.dart** is a dart package allowing any dart program (mainly Flutter apps) to communicate with the [Starknet](https://starknet.io/docs/) blockchain. - -The [Starknet nodes](https://github.com/eqlabs/pathfinder/blob/06ea631557937d4319aa539a2021e312ec757ac2/crates/pathfinder/src/rpc.rs) expose a JSON-RPC API (see the [specs](https://github.com/starkware-libs/starknet-specs)) that we can call to call Smart Contract methods or even get information on blocks and past transactions. - -The goal of the project is thus to build a bridge between dart applications and Starknet, while staying consistent with the common abstractions used in other blockchain SDKs (see [ethers.js](https://docs.ethers.io/v5/)). - -## Why contributing to starknet.dart? - -Starknet is a revolution in the web3 world: it allows to [scale Ethereum](https://docs.ethhub.io/ethereum-roadmap/layer-2-scaling/zk-rollups/) and offers the best UX one can dream of on a blockchain thanks to unique features like [account abstraction](https://www.argent.xyz/blog/wtf-is-account-abstraction/) or [session keys](https://github.com/dontpanicdao/starknet-burner). - -But web3 mainstream adoption won't happen unless decentralized applications go to mobile. That's why it's a priority to build the best possible Starknet SDK for Flutter, one of the most used cross-platform mobile framework. - -If you want to contribute to the web3 adoption and more specifically Starknet one, then you probably **can't have more impact than working on this SDK** that will be used by the majority of Flutter dApps on Starknet! - -## How to contribute - -### You have a feature suggestion or want to report a bug - -Then you should first [check out if this issue does not exist already](https://github.com/gabsn/starknet.dart/issues). If it does, you can upvote the existing one. If it's a new issue, please go on the project [telegram chat](https://t.me/+CWezjfLIRYc0MDY0) and explain what's your problem and why it should be top priority. We'll then add your issue to the roadmap. - -### You want to implement a feature / fix a bug / update the doc - -1. ⚠️ Very important: if you want to get involved, please go to the [telegram chat](https://t.me/+CWezjfLIRYc0MDY0) and explain which issue you want to tackle. We'll try to do our best to support you and help you. -2. Fork the repository and create a branch prefixed by the issue number. -3. Implement your feature / bug fix and push it to your remote fork. We strongly recommend you to write the test first, then implement the feature (see [TDD](https://en.wikipedia.org/wiki/Test-driven_development)). -4. Go on github and create a Pull Request from your forked repo to the original one. -5. Ping us on telegram with your PR link so we can review it and merge it. - -### You want to become a core contributor - -After a few qualitative contributions, we'll probably offer you to join the core team to become a maintainer of the project and get paid for your work. +Please refer to [this section](https://starknetdart.dev/how-to-contribute) to know how to contribute. diff --git a/README.md b/README.md index ba1b8e88..41ee0b46 100644 --- a/README.md +++ b/README.md @@ -4,10 +4,14 @@ The goal of this SDK is to be able to interact with Starknet smart contracts in You can also call the JSON-RPC endpoint exposed by the Starknet full nodes (see the [specs](https://github.com/starkware-libs/starknet-specs)). -📚 [docs](https://pub.dev/packages/starknet) +📚 [docs](https://starknetdart.dev) 💬 [telegram chat](https://t.me/+CWezjfLIRYc0MDY0) +🎯 [roadmap](https://github.com/orgs/focustree/projects/1) + +🧑‍💻 [how to contribute](https://starknetdart.dev/how-to-contribute) + ## Motivation Starknet is a revolution in the web3 world: it allows to [scale Ethereum](https://docs.ethhub.io/ethereum-roadmap/layer-2-scaling/zk-rollups/) and offers the best possible UX thanks to unique features like [account abstraction](https://www.argent.xyz/blog/wtf-is-account-abstraction/) or [session keys](https://github.com/dontpanicdao/starknet-burner). @@ -15,105 +19,3 @@ Starknet is a revolution in the web3 world: it allows to [scale Ethereum](https: But web3 mainstream adoption won't happen unless decentralized applications go to mobile. That's why it's a priority to **build the best possible Starknet SDK for dart applications**, thus unlocking the era of Flutter mobile apps on Starknet. - -## Roadmap - -You can follow the progress of the project directly on the [kanban](https://github.com/users/gabsn/projects/1). - -## Contributing - -If you want to contribute to this project or have any suggestion, please check out our [Contributor Guide](CONTRIBUTING.md). - -## Dev Guide - -### Initial Setup - -1. Install python deps. Make sure to select the python interpreter from the local .venv created by poetry if you're using VS Code. - -```sh -poetry install -``` - -If you have an error about gmp install it like this : - -```sh -brew install gmp -``` - -2. Run devnet in one terminal - -```sh -poetry run devnet start -``` - -3. Setup devnet by deploying contracts - -```sh -poetry run devnet setup -``` - -You can also deploy contracts one by one: - -```sh -poetry run deploy balance -``` - -4. Interact with deployed contracts: - -```sh -poetry run interact get_balance -poetry run interact increase_balance 10 -``` - -### Run Tests - -You can run the tests with the following command: - -``` -dart test -``` - -To run the tests on **devnet** use the following command: - -``` -NETWORK=devnet dart test -t integration -``` - -### Release a new version to pub.dev - -You simply need to create a PR where you: - -1. Bump the package version -2. Add an entry to the `CHANGELOG` - -Make sure it passes all the CI tests, then merge it to release a new version of the package. - -### Generate freezed model classes - -To avoid writing too much boilerplate, we use the [freezed](https://github.com/rrousselGit/freezed) library to automatically generate serializer logic. - -You can run the following command to generate those classes: - -``` -dart run build_runner build -``` - -Alternatively, you can hit `Cmd + Shift + B` in vscode. - -### Generate docs - -To generate docs, run: - -``` -dart doc . -``` - -For more advanced features, check out the [dartdoc package](https://pub.dev/packages/dartdoc). - -### Compile cairo contracts - -```sh -protostar build -``` - -You can see compiled contracts in the `contracts/build` folder. diff --git a/docs/how-to-contribute.mdx b/docs/how-to-contribute.mdx index a56a3e84..f0b9c47c 100644 --- a/docs/how-to-contribute.mdx +++ b/docs/how-to-contribute.mdx @@ -79,7 +79,7 @@ And in another terminal, deploy the contracts: melos devnet:setup ``` -7. Run the tests: +## How to run the tests ```sh melos test @@ -96,6 +96,18 @@ melos test - `/examples` contains examples of apps using the packages. They should be accompanied by a tutorial in the docs to reproduce the app from scratch. - `/docs` contains the documentation of the project. Docs are automatically deployed when we merge to main. +### Generate freezed model classes + +To avoid writing too much boilerplate, we use the [freezed](https://github.com/rrousselGit/freezed) library to automatically generate serializer logic. + +You can run the following command to generate those classes: + +``` +dart run build_runner build +``` + +Alternatively, you can hit `Cmd + Shift + B` in vscode. + ## Troubleshooting Tools need to be at the right version to avoid any incompability: diff --git a/starknetdart.dev b/starknetdart.dev new file mode 100644 index 00000000..e69de29b