|
1 | 1 | # Contributing |
2 | 2 |
|
3 | | -Any contributions are welcomed! |
| 3 | +Contributions are welcome. This guide covers how to contribute code, where to |
| 4 | +report issues, and how to get in touch. |
4 | 5 |
|
5 | | -## Update contracts |
| 6 | +## Contributing code |
6 | 7 |
|
7 | | -1. Update `.env` with new contract ID |
8 | | -2. Update `.env.example` with new contract ID |
9 | | -3. Update Xcode build settings (`STELLAR_CONTRACT_ID_TESTNET` or `STELLAR_CONTRACT_ID_MAINNET`) |
10 | | -4. Set the network `STELLAR_NETWORK`: `testnet` or `mainnet` |
| 8 | +1. Fork the repository at |
| 9 | + [Consulting-Manao/chimpdao-contracts](https://github.com/Consulting-Manao/chimpdao-contracts) |
| 10 | + and create a feature branch off `main`. |
| 11 | +2. Make sure your toolchain matches [`rust-toolchain.toml`](rust-toolchain.toml) |
| 12 | + and that the `wasm32v1-none` target is installed (`make install` covers |
| 13 | + this). |
| 14 | +3. Run the contract test suite before opening a pull request: |
| 15 | + |
| 16 | + ```bash |
| 17 | + make contract_build |
| 18 | + make contract_test # equivalent to cargo test across the workspace |
| 19 | + cargo fmt --all -- --check |
| 20 | + ``` |
| 21 | + |
| 22 | +4. For changes to the TypeScript dApp under [`dapp/`](dapp), run |
| 23 | + `bun run lint` and `bun run format` from that directory. |
| 24 | +5. Open a pull request against `main`. Continuous integration |
| 25 | + ([`.github/workflows/contract.yml`](.github/workflows/contract.yml)) |
| 26 | + re-runs the build and the test suite; please make sure it stays green. |
| 27 | +6. Smart contracts are security-sensitive code. Pull requests that touch |
| 28 | + [`contracts/`](contracts/) should describe the threat model implication of |
| 29 | + the change and reference the relevant tests. Maintainers may ask for an |
| 30 | + independent review before merging. |
| 31 | + |
| 32 | +## Reporting issues |
| 33 | + |
| 34 | +- General bug reports and feature requests: |
| 35 | + [GitHub Issues](https://github.com/Consulting-Manao/chimpdao-contracts/issues). |
| 36 | +- Suspected security vulnerabilities: see [`SECURITY.md`](SECURITY.md) and |
| 37 | + use GitHub's private vulnerability reporting flow rather than opening a |
| 38 | + public issue. |
| 39 | +- Documentation problems are tracked through the same issue tracker; please |
| 40 | + prefix the title with `docs:`. |
| 41 | + |
| 42 | +## Getting in touch |
| 43 | + |
| 44 | +- Public discussion happens in |
| 45 | + [GitHub Issues](https://github.com/Consulting-Manao/chimpdao-contracts/issues) |
| 46 | + and pull requests. |
| 47 | +- Project funding history and roadmap: the |
| 48 | + [SCF #38 submission](https://communityfund.stellar.org/submissions/rece7XluClIM1t7EL). |
| 49 | + |
| 50 | +All interactions are governed by the |
| 51 | +[Code of Conduct](CODE_OF_CONDUCT.md). |
| 52 | + |
| 53 | +## Updating deployments |
| 54 | + |
| 55 | +When deploying a new version of the contracts: |
| 56 | + |
| 57 | +1. Update the relevant ID file under |
| 58 | + [`.config/stellar/`](.config/stellar) (for example, |
| 59 | + `collection_testnet_id` or `nfc_nft_chi1_mainnet_id`). |
| 60 | +2. Update `.env` and `.env.example` in [`dapp/`](dapp) with the new contract |
| 61 | + ID. |
| 62 | +3. Update the Xcode build settings in the companion iOS application |
| 63 | + (`STELLAR_CONTRACT_ID_TESTNET` or `STELLAR_CONTRACT_ID_MAINNET`). |
| 64 | +4. Set the network in the dApp configuration (`STELLAR_NETWORK`: `testnet` |
| 65 | + or `mainnet`). |
0 commit comments