rln-contract/README.md

61 lines
1.5 KiB
Markdown
Raw Permalink Normal View History

# Hardhat Project for rln-contract
## Requirements
The following will need to be installed in order to use this repo. Please follow the links and instructions.
2023-03-30 12:59:06 +00:00
- [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
- You'll know you've done it right if you can run `git --version`
- [Foundry / Foundryup](https://github.com/gakonst/foundry)
- This will install `forge`, `cast`, and `anvil`
- You can test you've installed them right by running `forge --version` and get an output like: `forge 0.2.0 (92f8951 2022-08-06T00:09:32.96582Z)`
- To get the latest of each, just run `foundryup`
- [Yarn](https://classic.yarnpkg.com/lang/en/docs/install)
2022-06-23 13:36:10 +00:00
2022-09-25 21:49:21 +00:00
## Compilation
2022-06-23 13:36:10 +00:00
```shell
yarn compile
```
## Testing with Hardhat
2023-03-30 12:59:06 +00:00
```shell
yarn test:hardhat
2022-06-23 13:36:10 +00:00
```
## Testing with Foundry
2023-03-30 12:59:06 +00:00
2022-09-25 21:49:21 +00:00
```shell
yarn test:foundry
2022-09-25 21:49:21 +00:00
```
2022-06-23 13:36:10 +00:00
2022-09-25 21:49:21 +00:00
## Deploying
2022-06-23 13:36:10 +00:00
2023-03-30 12:59:06 +00:00
### Locally
- To deploy on a local node, first start the local node and then run the deploy script
2022-06-23 13:36:10 +00:00
```shell
yarn node
2023-03-30 12:59:06 +00:00
yarn deploy:localhost
2022-06-23 13:36:10 +00:00
```
2023-03-30 12:59:06 +00:00
### Sepolia
- To deploy to an target network (like Sepolia), use the name as mentioned in the Hardhat config file.
2022-06-23 13:36:10 +00:00
```shell
yarn deploy:sepolia
2023-03-30 12:59:06 +00:00
# You may verify the contract using
yarn verify:sepolia # Ensure you have set ETHERSCAN_API_KEY in your env
2022-06-23 13:36:10 +00:00
```
2023-03-30 12:59:06 +00:00
2022-09-25 21:49:21 +00:00
## References
2022-06-23 13:36:10 +00:00
For more information, see https://hardhat.org/hardhat-runner/docs/guides/project-setup
## License
2023-03-30 12:59:06 +00:00
Dual-licensed under MIT or Apache 2.0, refer to [LICENSE-MIT](LICENSE-MIT) or [LICENSE-APACHE](LICENSE-APACHE) for more information.