# Communities Contracts [![Github Actions][gha-badge]][gha] [![Codecov][codecov-badge]][codecov] [![Foundry][foundry-badge]][foundry] [gha]: https://github.com/status-im/communities-contracts/actions [gha-badge]: https://github.com/status-im/communities-contracts/actions/workflows/test.yml/badge.svg [codecov]: https://codecov.io/gh/status-im/communities-contracts [codecov-badge]: https://codecov.io/gh/status-im/communities-contracts/graph/badge.svg [foundry]: https://getfoundry.sh/ [foundry-badge]: https://img.shields.io/badge/Built%20with-Foundry-FFDB1C.svg ## Usage This is a list of the most frequently needed commands. ### Build Build the contracts: ```sh $ forge build ``` ### Clean Delete the build artifacts and cache directories: ```sh $ forge clean ``` ### Compile Compile the contracts: ```sh $ forge build ``` ### Coverage Get a test coverage report: ```sh $ forge coverage ``` ### Deploy Deploy to Anvil: ```sh $ forge script script/DeployOwnerToken.s.sol --broadcast --fork-url http://localhost:8545 ``` For this script to work, you need to have a `MNEMONIC` environment variable set to a valid [BIP39 mnemonic](https://iancoleman.io/bip39/). For instructions on how to deploy to a testnet or mainnet, check out the [Solidity Scripting](https://book.getfoundry.sh/tutorials/solidity-scripting.html) tutorial. ### Format Format the contracts: ```sh $ forge fmt ``` ### Gas Usage Get a gas report: ```sh $ forge test --gas-report ``` ### Lint Lint the contracts: ```sh $ pnpm lint ``` ### Test Run the tests: ```sh $ forge test ```