diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..63a75c4 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @drspacemn @glihm \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/01_FEATURE_REQUEST.md b/.github/ISSUE_TEMPLATE/01_FEATURE_REQUEST.md new file mode 100644 index 0000000..ff34057 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/01_FEATURE_REQUEST.md @@ -0,0 +1,11 @@ +--- +name: Feature request +about: suggest new feature +title: "[feat] " +labels: "feature" +assignees: "" +--- + + + +#### References diff --git a/.github/ISSUE_TEMPLATE/02_BUG_REPORT.md b/.github/ISSUE_TEMPLATE/02_BUG_REPORT.md new file mode 100644 index 0000000..57a92f1 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/02_BUG_REPORT.md @@ -0,0 +1,13 @@ +--- +name: Bug report +about: create bug report +title: "[bug] " +labels: "bug" +assignees: "" +--- + +**ver:** + + + +**How to reproduce:** diff --git a/.github/ISSUE_TEMPLATE/03_CODEBASE_IMPROVEMENT.md b/.github/ISSUE_TEMPLATE/03_CODEBASE_IMPROVEMENT.md new file mode 100644 index 0000000..0132b95 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/03_CODEBASE_IMPROVEMENT.md @@ -0,0 +1,7 @@ +--- +name: Codebase improvement +about: docs, ci, tooling, other +title: "[dev] " +labels: "dev" +assignees: "" +--- diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..539461b --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ + + +- [ ] issue # +- [ ] follows contribution [guide](../CONTRIBUTING.md) +- [ ] code change includes tests +- [ ] breaking change + + diff --git a/.github/linter/base_style.rb b/.github/linter/base_style.rb new file mode 100644 index 0000000..8d98105 --- /dev/null +++ b/.github/linter/base_style.rb @@ -0,0 +1,4 @@ +all +# lame rules +exclude_rule 'MD002' +exclude_rule 'MD041' diff --git a/.github/linter/readme_style.rb b/.github/linter/readme_style.rb new file mode 100644 index 0000000..9b6cfc9 --- /dev/null +++ b/.github/linter/readme_style.rb @@ -0,0 +1,10 @@ +all +# allow inline HTML for README fmt +exclude_rule 'MD033' +# badges trigger rule +exclude_rule 'MD034' +# README img serves as 'First Header' +exclude_rule 'MD002' +exclude_rule 'MD041' +# TODO: disable/enable not working for all-contribs +exclude_rule 'MD013' diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..a46b060 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,18 @@ +name: build + +on: + workflow_dispatch: + push: + branches: + - main + pull_request: +permissions: read-all + +jobs: + check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: asdf-vm/actions/install@v3 + - run: scarb fmt --check + - run: scarb build diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml new file mode 100644 index 0000000..6b0977a --- /dev/null +++ b/.github/workflows/check.yml @@ -0,0 +1,26 @@ +name: check + +on: + workflow_dispatch: + push: + branches: + - main + pull_request: +permissions: read-all + +jobs: + markdown: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: | + sudo gem install mdl + mdl -s .github/linter/readme_style.rb README.md + mdl -s .github/linter/base_style.rb book .github + + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: asdf-vm/actions/install@v3 + - run: snforge test diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..85caaf6 --- /dev/null +++ b/.gitignore @@ -0,0 +1,10 @@ +# Sys files +**/.DS_Store + +# Scarb and Starknet Foundry +**/target +.snfoundry_cache/ + +# Starkli +**/account.json +**/keystore.json diff --git a/.tool-versions b/.tool-versions new file mode 100644 index 0000000..4267afd --- /dev/null +++ b/.tool-versions @@ -0,0 +1,2 @@ +scarb 2.4.4 +starknet-foundry 0.16.0 diff --git a/Contributing.md b/Contributing.md new file mode 100644 index 0000000..4baec02 --- /dev/null +++ b/Contributing.md @@ -0,0 +1,58 @@ +## 🛠️ Contributing to Piltover 🛠️ + +Welcome, contributing to `piltover` is easy! + +1. Submit or comment your intent on an issue +1. We will try to respond quickly +1. Fork this repo +1. Submit your PR against `main` +1. Address PR Review + +### Issue + +Project tracking is done via GitHub [issues](https://github.com/keep-starknet-strange/piltover/issues). +First look at open issues to see if your request is already submitted. +If it is comment on the issue requesting assignment, if not open an issue. + +We use 3 issue labels for development: + +- `feat` -> suggest new feature +- `bug` -> create a reproducible bug report +- `dev` -> non-functional repository changes + +These labels are used as prefixes as follows for `issue`, `branch name`, `pr title`: + +- `[feat]` -> `feat/{issue #}-{issue name}` -> `feat:` +- `[bug]` -> `bug/{issue #}-{issue name}` -> `bug:` +- `[dev]` -> `dev/{issue #}-{issue name}` -> `dev:` + +### Submit PR + +Ensure your code is well formatted, well tested and well documented. A core contributor +will review your work. Address changes, ensure ci passes, +and voilà you're a piltover contributor. + +Markdown [linter](https://github.com/markdownlint/markdownlint?tab=readme-ov-file#markdown-lint-tool): + +```bash +mdl -s .github/linter/readme_style.rb README.md +``` + +Scarb linter: + +```bash +scarb fmt +``` + +### Additional Resources + +- [Cairo Book](https://book.cairo-lang.org/) +- [Starknet Book](https://book.starknet.io/) +- [Starknet Foundry Book](https://foundry-rs.github.io/starknet-foundry/) +- [Starknet By Example](https://starknet-by-example.voyager.online/) +- [Starkli Book](https://book.starkli.rs/) +- [Syncing a Fork](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork) + +## + +Thank you for your contribution! diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..885707a --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Keep Starknet Strange + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..4bd68c9 --- /dev/null +++ b/README.md @@ -0,0 +1,29 @@ +