-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
524 additions
and
589 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,72 @@ | ||
# debtPayment | ||
# IncomeVault | ||
Contracts to perform coupon payment | ||
|
||
## Initialization | ||
|
||
You must first initialize the submodules, with | ||
|
||
``` | ||
forge install | ||
``` | ||
|
||
See also the command's [documentation](https://book.getfoundry.sh/reference/forge/forge-install). | ||
|
||
Later you can update all the submodules with: | ||
|
||
``` | ||
forge update | ||
``` | ||
|
||
See also the command's [documentation](https://book.getfoundry.sh/reference/forge/forge-update). | ||
|
||
|
||
|
||
## Compilation | ||
|
||
The official documentation is available in the Foundry [website](https://book.getfoundry.sh/reference/forge/build-commands) | ||
|
||
``` | ||
forge build --contracts src/RuleEngine.sol | ||
``` | ||
|
||
``` | ||
forge build --contracts src/RuleWhiteList.sol | ||
``` | ||
|
||
## Testing | ||
|
||
You can run the tests with | ||
|
||
``` | ||
forge test | ||
``` | ||
|
||
To run a specific test, use | ||
|
||
``` | ||
forge test --match-contract <contract name> --match-test <function name> | ||
``` | ||
|
||
See also the test framework's [official documentation](https://book.getfoundry.sh/forge/tests), and that of the [test commands](https://book.getfoundry.sh/reference/forge/test-commands). | ||
|
||
### Coverage | ||
|
||
* Perform a code coverage | ||
|
||
``` | ||
forge coverage --ffi | ||
``` | ||
|
||
* Generate LCOV report | ||
|
||
``` | ||
forge coverage --report lcov | ||
``` | ||
|
||
- Generate `index.html` | ||
|
||
```bash | ||
forge coverage --report lcov && genhtml lcov.info --branch-coverage --output-dir coverage | ||
``` | ||
|
||
See [Solidity Coverage in VS Code with Foundry](https://mirror.xyz/devanon.eth/RrDvKPnlD-pmpuW7hQeR5wWdVjklrpOgPCOA-PJkWFU) & [Foundry forge coverage](https://www.rareskills.io/post/foundry-forge-coverage) |
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.