The original repo did not contain the MALWARE dir. It now contains the code of the malware ran by the malicious dependency chai-await-test
Below is the original README.md content
This is a Solidity coding problem for tech interviews. It is designed to take no more than a few hours.
Ensure you have installed:
Clone the repo locally and install the NPM dependencies using pnpm:
You only need to write code in the Token.sol file. Please ensure all the unit tests pass to successfully complete this part.
The contracts consist of a mintable ERC-20 Token (which is similar to a Wrapped ETH token). Callers mint tokens by depositing ETH. They can then burn their token balance to get the equivalent amount of deposited ETH back.
In addition, token holders can receive dividend payments in ETH in proportion to their token balance relative to the total supply. Dividends are assigned by looping through the list of holders.
Dividend payments are assigned to token holders' addresses. This means that even if a token holder were to send their tokens to somebody else later on or burn their tokens, they would still be entitled to the dividends they accrued whilst they were holding the tokens.
You will thus need to efficiently keep track of individual token holder addresses in order to assign dividend payouts to holders with minimal gas cost.
For a clearer understanding of how the code is supposed to work please refer to the tests in the test folder.
Your Solution must pass the test: pnpm run test - run the tests (Hardhat)
Record a short Loom video showing how it works, including the expected and actual behavior if you're testing.
Please complete and submit the result within 1 ~ 2 hours unless otherwise discussed.
