103a374cac
* docs: fix gha-badge * docs: add codecov badge |
||
---|---|---|
.github | ||
contracts | ||
lib | ||
script | ||
specs | ||
test | ||
.editorconfig | ||
.env.example | ||
.gas-snapshot | ||
.gitattributes | ||
.gitignore | ||
.gitmodules | ||
.prettierignore | ||
.solhint.json | ||
PROPERTIES.md | ||
README.md | ||
codecov.yml | ||
foundry.toml | ||
package.json | ||
pnpm-lock.yaml | ||
prettierrc.yml | ||
remappings.txt | ||
slither.config.json | ||
specs.sh |
README.md
Communities Contracts
Usage
This is a list of the most frequently needed commands.
Build
Build the contracts:
$ forge build
Clean
Delete the build artifacts and cache directories:
$ forge clean
Compile
Compile the contracts:
$ forge build
Coverage
Get a test coverage report:
$ forge coverage
Deploy
Deploy to Anvil:
$ 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.
For instructions on how to deploy to a testnet or mainnet, check out the Solidity Scripting tutorial.
Format
Format the contracts:
$ forge fmt
Gas Usage
Get a gas report:
$ forge test --gas-report
Lint
Lint the contracts:
$ pnpm lint
Test
Run the tests:
$ forge test