This repository includes the following scripts in the package.json
file:
npm run test
This command runs the test suite for the contract using the Hardhat testing framework. It will execute the command npx hardhat test
, which will run all the tests in the project. The tests are used to check that the contract behaves as expected and to ensure that any changes made to the contract don't break existing functionality.
npm run test:coverage
This command runs the test suite and generates a coverage report for the contract. It will execute the command npx hardhat coverage
, which will run all the tests in the project and also generate a coverage report. A coverage report shows how much of the contract's code is being executed by the test suite.
npm run compile
This command compiles the contract using the Hardhat compiler. It will execute the command npx hardhat compile
, which will compile the contract code, and generate the bytecode and ABI needed to deploy the contract on the Ethereum blockchain.
npm run lint:js
This command runs the ESLint linter on all TypeScript files in the project. It will execute the command npx eslint '**/*.js'
, which will check all TypeScript files in the project against a set of linting rules and report any errors or warnings.
npm run lint:js-fix
This command runs the ESLint linter on all TypeScript files in the project and automatically fix any issues it finds.
npm run lint:sol
This command runs the Prettier and Solhint linters on all the Solidity files in the project. It will execute the command npx prettier '**/*.{json,sol,md}' --check && npx solhint 'contracts/**/*.sol'
, which will check all the solidity files in the project against a set of linting rules and report any errors or warnings.
npm run lint:sol-fix
This command runs the Prettier and Solhint linters on all the Solidity files in the project and automatically fix any issues it finds.
npm run lint
This command runs both TypeScript and Solidity linters in the project.
npm run lint:fix
This command runs both TypeScript and Solidity linters in the project and automatically fix any issues it finds.
If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.