mirror of
https://github.com/logos-messaging/logos-messaging-rlnv2-contract.git
synced 2026-01-02 14:03:07 +00:00
* chore: tests * fix: add helper to get all metadata from idCommitment * fix: max runs * fix: full tree test * fix: refactor, reuse function for memberExists * fix: getCommitments range and cut scope from other tests * fix: range for assert on pagination * fix: duped conditionals
waku-rlnv2-contract

Waku's RLNv2 contracts, which include -
- LazyIMT, which allows the root of the chain to be accessible on-chain.
What's Inside
- Forge: compile, test, fuzz, format, and deploy smart contracts
- Forge Std: collection of helpful contracts and cheatcodes for testing
- Solhint Community: linter for Solidity code
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/Deploy.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
Fixing linting issues
For any errors in solidity files, run forge fmt. For errors in any other file type, run pnpm prettier:write.
Test
Run the tests:
$ forge test
Notes
- Foundry uses git submodules to manage dependencies. For detailed instructions on working with dependencies, please refer to the guide in the book
- You don't have to create a
.envfile, but filling in the environment variables may be useful when debugging and testing against a fork.
License
This project is licensed under MIT.
Description
Languages
Shell
100%