https://github.com/samparsky/ssv-test
https://github.com/samparsky/ssv-test
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/samparsky/ssv-test
- Owner: samparsky
- Created: 2022-08-22T11:30:56.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2022-08-22T12:17:34.000Z (almost 3 years ago)
- Last Synced: 2023-10-26T11:51:41.809Z (over 1 year ago)
- Language: Solidity
- Size: 7.81 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Test
The uses the foundry / forge framework.
## Part B
This will follow the approach of using CourseSummary snapshots to calculate the expected salary of the teacher.
Since the teacher salary is based on per block basis and the number of students can change, we take snapshots of CourseSummary at block heights where it changes and use it to calculate the teacher salary.
**Potential Issues**
- We are following a lazy approach of evaluating the teacher salary it's possible when the teacher wants to claim there will be high gas cost depending on when last they claimed their salary. This is because we would have to loop through the pending snapshots to evaluate the user salary.
## Gas Report
```sh
forge test --gas-report
```